完善发货链接签名和作废恢复
This commit is contained in:
+26
-11
@@ -8,6 +8,7 @@ import type {
|
||||
CreateTestOrderResult,
|
||||
DeliveryBindResult,
|
||||
DeliveryOrderInfo,
|
||||
DeliveryLinkResult,
|
||||
DeliverySubmitResult,
|
||||
FulfillmentOrder,
|
||||
LoginResult,
|
||||
@@ -68,6 +69,12 @@ export const merchantApi = {
|
||||
note?: string
|
||||
fulfillment_status?: 'pending' | 'failed'
|
||||
}) => request.post('/merchant/orders/test', data).then((r) => r.data.data as CreateTestOrderResult),
|
||||
getDeliveryLink: (orderNo: string) =>
|
||||
request.get(`/merchant/orders/${encodeURIComponent(orderNo)}/delivery-link`).then((r) => r.data.data as DeliveryLinkResult),
|
||||
revokeDeliveryLink: (orderNo: string) =>
|
||||
request.post(`/merchant/orders/${encodeURIComponent(orderNo)}/delivery-link/revoke`).then((r) => r.data.data),
|
||||
restoreDeliveryLink: (orderNo: string) =>
|
||||
request.post(`/merchant/orders/${encodeURIComponent(orderNo)}/delivery-link/restore`).then((r) => r.data.data as DeliveryLinkResult),
|
||||
wallet: () =>
|
||||
request.get('/merchant/wallet').then((r) => r.data.data as WalletAccount),
|
||||
ledger: (params?: Record<string, unknown>) =>
|
||||
@@ -97,17 +104,25 @@ export const merchantApi = {
|
||||
}
|
||||
|
||||
export const deliveryApi = {
|
||||
getOrder: (orderNo: string) =>
|
||||
request.get(`/delivery/v1/orders/${encodeURIComponent(orderNo)}`).then((r) => r.data.data as DeliveryOrderInfo),
|
||||
bind: (orderNo: string, gameAccount: string) =>
|
||||
request.post(`/delivery/v1/orders/${encodeURIComponent(orderNo)}/bind`, {
|
||||
game_account: gameAccount,
|
||||
}).then((r) => r.data.data as DeliveryBindResult),
|
||||
submit: (orderNo: string, gameAccount: string, bindUUID: string) =>
|
||||
request.post(`/delivery/v1/orders/${encodeURIComponent(orderNo)}/submit`, {
|
||||
game_account: gameAccount,
|
||||
bind_uuid: bindUUID,
|
||||
}).then((r) => r.data.data as DeliverySubmitResult),
|
||||
getOrder: (orderNo: string, auth?: { exp?: string; sign?: string }) =>
|
||||
request.get(`/delivery/v1/orders/${encodeURIComponent(orderNo)}`, { params: auth }).then((r) => r.data.data as DeliveryOrderInfo),
|
||||
bind: (orderNo: string, gameAccount: string, auth?: { exp?: string; sign?: string }) =>
|
||||
request.post(
|
||||
`/delivery/v1/orders/${encodeURIComponent(orderNo)}/bind`,
|
||||
{
|
||||
game_account: gameAccount,
|
||||
},
|
||||
{ params: auth },
|
||||
).then((r) => r.data.data as DeliveryBindResult),
|
||||
submit: (orderNo: string, gameAccount: string, bindUUID: string, auth?: { exp?: string; sign?: string }) =>
|
||||
request.post(
|
||||
`/delivery/v1/orders/${encodeURIComponent(orderNo)}/submit`,
|
||||
{
|
||||
game_account: gameAccount,
|
||||
bind_uuid: bindUUID,
|
||||
},
|
||||
{ params: auth },
|
||||
).then((r) => r.data.data as DeliverySubmitResult),
|
||||
}
|
||||
|
||||
export const platformApi = {
|
||||
|
||||
Reference in New Issue
Block a user