arky-sdk 0.9.11 → 0.9.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{admin-CAwQrMOX.d.cts → admin-Q9MBFwCb.d.cts} +115 -15
- package/dist/{admin-BKXmDIVk.d.ts → admin-ZLXD4_en.d.ts} +115 -15
- package/dist/admin.cjs +64 -11
- package/dist/admin.cjs.map +1 -1
- package/dist/admin.d.cts +3 -3
- package/dist/admin.d.ts +3 -3
- package/dist/admin.js +64 -11
- package/dist/admin.js.map +1 -1
- package/dist/{api-DJI3S6XA.d.cts → api-DvsFdOaF.d.cts} +144 -19
- package/dist/{api-DJI3S6XA.d.ts → api-DvsFdOaF.d.ts} +144 -19
- package/dist/{index-u-gjHnKs.d.cts → index-BC06yiuv.d.cts} +1 -1
- package/dist/{index-BaSBPLdF.d.ts → index-CQd9b_7n.d.ts} +1 -1
- package/dist/index.cjs +72 -11
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +72 -11
- package/dist/index.js.map +1 -1
- package/dist/storefront.cjs +8 -0
- package/dist/storefront.cjs.map +1 -1
- package/dist/storefront.d.cts +6 -4
- package/dist/storefront.d.ts +6 -4
- package/dist/storefront.js +8 -0
- package/dist/storefront.js.map +1 -1
- package/dist/types.cjs.map +1 -1
- package/dist/types.d.cts +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/types.js.map +1 -1
- package/dist/utils.d.cts +2 -2
- package/dist/utils.d.ts +2 -2
- package/package.json +1 -1
- package/scripts/contract-admin.mjs +2 -19
package/dist/admin.cjs
CHANGED
|
@@ -1632,6 +1632,52 @@ function supportConversationQuery(params) {
|
|
|
1632
1632
|
function createAdminSupportApi(config) {
|
|
1633
1633
|
const { httpClient } = config;
|
|
1634
1634
|
return {
|
|
1635
|
+
channel: {
|
|
1636
|
+
async create(params, opts) {
|
|
1637
|
+
return httpClient.post(
|
|
1638
|
+
`/v1/stores/${params.store_id}/support/channels`,
|
|
1639
|
+
params,
|
|
1640
|
+
opts
|
|
1641
|
+
);
|
|
1642
|
+
},
|
|
1643
|
+
async get(params, opts) {
|
|
1644
|
+
return httpClient.get(
|
|
1645
|
+
`/v1/stores/${params.store_id}/support/channels/${params.id}?store_id=${params.store_id}`,
|
|
1646
|
+
opts
|
|
1647
|
+
);
|
|
1648
|
+
},
|
|
1649
|
+
async find(params, opts) {
|
|
1650
|
+
const qs = new URLSearchParams({ store_id: params.store_id });
|
|
1651
|
+
if (params.status) qs.set("status", params.status);
|
|
1652
|
+
if (params.channel_type) qs.set("channel_type", params.channel_type);
|
|
1653
|
+
if (params.limit) qs.set("limit", String(params.limit));
|
|
1654
|
+
if (params.cursor) qs.set("cursor", params.cursor);
|
|
1655
|
+
return httpClient.get(
|
|
1656
|
+
`/v1/stores/${params.store_id}/support/channels?${qs}`,
|
|
1657
|
+
opts
|
|
1658
|
+
);
|
|
1659
|
+
},
|
|
1660
|
+
async update(params, opts) {
|
|
1661
|
+
return httpClient.put(
|
|
1662
|
+
`/v1/stores/${params.store_id}/support/channels/${params.id}`,
|
|
1663
|
+
params,
|
|
1664
|
+
opts
|
|
1665
|
+
);
|
|
1666
|
+
},
|
|
1667
|
+
async delete(params, opts) {
|
|
1668
|
+
return httpClient.delete(
|
|
1669
|
+
`/v1/stores/${params.store_id}/support/channels/${params.id}?store_id=${params.store_id}`,
|
|
1670
|
+
opts
|
|
1671
|
+
);
|
|
1672
|
+
},
|
|
1673
|
+
async receiveMessage(params, opts) {
|
|
1674
|
+
return httpClient.post(
|
|
1675
|
+
`/v1/stores/${params.store_id}/support/channels/${params.channel_id}/messages`,
|
|
1676
|
+
params,
|
|
1677
|
+
opts
|
|
1678
|
+
);
|
|
1679
|
+
}
|
|
1680
|
+
},
|
|
1635
1681
|
agent: {
|
|
1636
1682
|
async create(params, opts) {
|
|
1637
1683
|
return httpClient.post(
|
|
@@ -1675,6 +1721,8 @@ function createAdminSupportApi(config) {
|
|
|
1675
1721
|
const qs = new URLSearchParams({ store_id: params.store_id });
|
|
1676
1722
|
if (params.status) qs.set("status", params.status);
|
|
1677
1723
|
if (params.agent_id) qs.set("agent_id", params.agent_id);
|
|
1724
|
+
if (params.channel_id) qs.set("channel_id", params.channel_id);
|
|
1725
|
+
if (params.channel_type) qs.set("channel_type", params.channel_type);
|
|
1678
1726
|
if (params.query) qs.set("query", params.query);
|
|
1679
1727
|
if (params.limit) qs.set("limit", String(params.limit));
|
|
1680
1728
|
if (params.cursor) qs.set("cursor", params.cursor);
|
|
@@ -2065,15 +2113,6 @@ var createWorkflowApi = (apiConfig) => {
|
|
|
2065
2113
|
options
|
|
2066
2114
|
);
|
|
2067
2115
|
},
|
|
2068
|
-
async connectWorkflowAccount(params, options) {
|
|
2069
|
-
const { store_id, type, ...payload } = params;
|
|
2070
|
-
const target_store_id = store_id || apiConfig.storeId;
|
|
2071
|
-
return apiConfig.httpClient.post(
|
|
2072
|
-
`/v1/stores/${target_store_id}/workflow-accounts/connect`,
|
|
2073
|
-
{ ...payload, type, store_id: target_store_id },
|
|
2074
|
-
options
|
|
2075
|
-
);
|
|
2076
|
-
},
|
|
2077
2116
|
async deleteWorkflowAccount(params, options) {
|
|
2078
2117
|
const store_id = params.store_id || apiConfig.storeId;
|
|
2079
2118
|
return apiConfig.httpClient.delete(
|
|
@@ -2137,6 +2176,14 @@ var createShippingApi = (apiConfig) => {
|
|
|
2137
2176
|
payload,
|
|
2138
2177
|
options
|
|
2139
2178
|
);
|
|
2179
|
+
},
|
|
2180
|
+
async refundLabel(params, options) {
|
|
2181
|
+
const { order_id, shipment_id } = params;
|
|
2182
|
+
return apiConfig.httpClient.post(
|
|
2183
|
+
`/v1/stores/${apiConfig.storeId}/orders/${order_id}/shipments/${shipment_id}/label/refund`,
|
|
2184
|
+
{},
|
|
2185
|
+
options
|
|
2186
|
+
);
|
|
2140
2187
|
}
|
|
2141
2188
|
};
|
|
2142
2189
|
};
|
|
@@ -2975,7 +3022,6 @@ function createAdmin(config) {
|
|
|
2975
3022
|
getExecution: workflowApi.getWorkflowExecution,
|
|
2976
3023
|
listAccounts: workflowApi.getWorkflowAccounts,
|
|
2977
3024
|
getAccountConnectUrl: workflowApi.getWorkflowAccountConnectUrl,
|
|
2978
|
-
connectAccount: workflowApi.connectWorkflowAccount,
|
|
2979
3025
|
deleteAccount: workflowApi.deleteWorkflowAccount
|
|
2980
3026
|
};
|
|
2981
3027
|
const formApi = createFormApi(apiConfig);
|
|
@@ -3129,7 +3175,8 @@ function createAdmin(config) {
|
|
|
3129
3175
|
processRefund: eshopApi.processRefund,
|
|
3130
3176
|
downloadDigitalAccess: eshopApi.downloadDigitalAccess,
|
|
3131
3177
|
getShippingRates: shippingApi.getRates,
|
|
3132
|
-
ship: shippingApi.ship
|
|
3178
|
+
ship: shippingApi.ship,
|
|
3179
|
+
refundShippingLabel: shippingApi.refundLabel
|
|
3133
3180
|
},
|
|
3134
3181
|
cart: {
|
|
3135
3182
|
create: eshopApi.createCart,
|
|
@@ -3198,6 +3245,12 @@ function createAdmin(config) {
|
|
|
3198
3245
|
automation: {
|
|
3199
3246
|
workflow: workflowPublicApi,
|
|
3200
3247
|
support: {
|
|
3248
|
+
createChannel: supportApi.channel.create,
|
|
3249
|
+
getChannel: supportApi.channel.get,
|
|
3250
|
+
findChannels: supportApi.channel.find,
|
|
3251
|
+
updateChannel: supportApi.channel.update,
|
|
3252
|
+
deleteChannel: supportApi.channel.delete,
|
|
3253
|
+
receiveChannelMessage: supportApi.channel.receiveMessage,
|
|
3201
3254
|
createAgent: supportApi.agent.create,
|
|
3202
3255
|
getAgent: supportApi.agent.get,
|
|
3203
3256
|
findAgents: supportApi.agent.find,
|