docs: migrate guides to TSDoc references (#6100)
This commit is contained in:
@@ -195,6 +195,16 @@ export const useAdminCancelClaim = (
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* The details of the claim's fulfillment.
|
||||
*/
|
||||
export type AdminFulfillClaimReq = AdminPostOrdersOrderClaimsClaimFulfillmentsReq & {
|
||||
/**
|
||||
* The claim's ID.
|
||||
*/
|
||||
claim_id: string
|
||||
}
|
||||
|
||||
/**
|
||||
* This hook creates a Fulfillment for a Claim, and change its fulfillment status to `partially_fulfilled` or `fulfilled` depending on whether all the items were fulfilled.
|
||||
* It may also change the status to `requires_action` if any actions are required.
|
||||
@@ -238,12 +248,7 @@ export const useAdminFulfillClaim = (
|
||||
options?: UseMutationOptions<
|
||||
Response<AdminOrdersRes>,
|
||||
Error,
|
||||
AdminPostOrdersOrderClaimsClaimFulfillmentsReq & {
|
||||
/**
|
||||
* The claim's ID.
|
||||
*/
|
||||
claim_id: string
|
||||
}
|
||||
AdminFulfillClaimReq
|
||||
>
|
||||
) => {
|
||||
const { client } = useMedusa()
|
||||
@@ -253,7 +258,7 @@ export const useAdminFulfillClaim = (
|
||||
({
|
||||
claim_id,
|
||||
...payload
|
||||
}: AdminPostOrdersOrderClaimsClaimFulfillmentsReq & { claim_id: string }) =>
|
||||
}: AdminFulfillClaimReq) =>
|
||||
client.admin.orders.fulfillClaim(orderId, claim_id, payload),
|
||||
buildOptions(
|
||||
queryClient,
|
||||
|
||||
@@ -203,6 +203,16 @@ export const useCreatePaymentSession = (
|
||||
return useMutation(() => client.carts.createPaymentSessions(cartId), options)
|
||||
}
|
||||
|
||||
/**
|
||||
* The details of the payment session to update.
|
||||
*/
|
||||
export type UpdatePaymentSessionReq = StorePostCartsCartPaymentSessionUpdateReq & {
|
||||
/**
|
||||
* The payment provider's identifier.
|
||||
*/
|
||||
provider_id: string
|
||||
}
|
||||
|
||||
/**
|
||||
* This hook updates a Payment Session with additional data. This can be useful depending on the payment provider used.
|
||||
* All payment sessions are updated and cart totals are recalculated afterwards.
|
||||
@@ -248,17 +258,12 @@ export const useUpdatePaymentSession = (
|
||||
options?: UseMutationOptions<
|
||||
StoreCartsRes,
|
||||
Error,
|
||||
{
|
||||
/**
|
||||
* The payment provider's identifier.
|
||||
*/
|
||||
provider_id: string
|
||||
} & StorePostCartsCartPaymentSessionUpdateReq
|
||||
UpdatePaymentSessionReq
|
||||
>
|
||||
) => {
|
||||
const { client } = useMedusa()
|
||||
return useMutation(
|
||||
({ data, provider_id }) =>
|
||||
({ data, provider_id }: UpdatePaymentSessionReq) =>
|
||||
client.carts.updatePaymentSession(cartId, provider_id, { data }),
|
||||
options
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user