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.d.cts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { Y as AdminSession, ae as ApiConfig, A as AuthStateListener, r as AuthStorage, al as CreateAdminConfig, M as HttpClientConfig,
|
|
2
|
-
import './api-
|
|
3
|
-
import './index-
|
|
1
|
+
export { Y as AdminSession, ae as ApiConfig, A as AuthStateListener, r as AuthStorage, al as CreateAdminConfig, M as HttpClientConfig, b3 as createAdmin } from './admin-Q9MBFwCb.cjs';
|
|
2
|
+
import './api-DvsFdOaF.cjs';
|
|
3
|
+
import './index-BC06yiuv.cjs';
|
package/dist/admin.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { Y as AdminSession, ae as ApiConfig, A as AuthStateListener, r as AuthStorage, al as CreateAdminConfig, M as HttpClientConfig,
|
|
2
|
-
import './api-
|
|
3
|
-
import './index-
|
|
1
|
+
export { Y as AdminSession, ae as ApiConfig, A as AuthStateListener, r as AuthStorage, al as CreateAdminConfig, M as HttpClientConfig, b3 as createAdmin } from './admin-ZLXD4_en.js';
|
|
2
|
+
import './api-DvsFdOaF.js';
|
|
3
|
+
import './index-CQd9b_7n.js';
|
package/dist/admin.js
CHANGED
|
@@ -1630,6 +1630,52 @@ function supportConversationQuery(params) {
|
|
|
1630
1630
|
function createAdminSupportApi(config) {
|
|
1631
1631
|
const { httpClient } = config;
|
|
1632
1632
|
return {
|
|
1633
|
+
channel: {
|
|
1634
|
+
async create(params, opts) {
|
|
1635
|
+
return httpClient.post(
|
|
1636
|
+
`/v1/stores/${params.store_id}/support/channels`,
|
|
1637
|
+
params,
|
|
1638
|
+
opts
|
|
1639
|
+
);
|
|
1640
|
+
},
|
|
1641
|
+
async get(params, opts) {
|
|
1642
|
+
return httpClient.get(
|
|
1643
|
+
`/v1/stores/${params.store_id}/support/channels/${params.id}?store_id=${params.store_id}`,
|
|
1644
|
+
opts
|
|
1645
|
+
);
|
|
1646
|
+
},
|
|
1647
|
+
async find(params, opts) {
|
|
1648
|
+
const qs = new URLSearchParams({ store_id: params.store_id });
|
|
1649
|
+
if (params.status) qs.set("status", params.status);
|
|
1650
|
+
if (params.channel_type) qs.set("channel_type", params.channel_type);
|
|
1651
|
+
if (params.limit) qs.set("limit", String(params.limit));
|
|
1652
|
+
if (params.cursor) qs.set("cursor", params.cursor);
|
|
1653
|
+
return httpClient.get(
|
|
1654
|
+
`/v1/stores/${params.store_id}/support/channels?${qs}`,
|
|
1655
|
+
opts
|
|
1656
|
+
);
|
|
1657
|
+
},
|
|
1658
|
+
async update(params, opts) {
|
|
1659
|
+
return httpClient.put(
|
|
1660
|
+
`/v1/stores/${params.store_id}/support/channels/${params.id}`,
|
|
1661
|
+
params,
|
|
1662
|
+
opts
|
|
1663
|
+
);
|
|
1664
|
+
},
|
|
1665
|
+
async delete(params, opts) {
|
|
1666
|
+
return httpClient.delete(
|
|
1667
|
+
`/v1/stores/${params.store_id}/support/channels/${params.id}?store_id=${params.store_id}`,
|
|
1668
|
+
opts
|
|
1669
|
+
);
|
|
1670
|
+
},
|
|
1671
|
+
async receiveMessage(params, opts) {
|
|
1672
|
+
return httpClient.post(
|
|
1673
|
+
`/v1/stores/${params.store_id}/support/channels/${params.channel_id}/messages`,
|
|
1674
|
+
params,
|
|
1675
|
+
opts
|
|
1676
|
+
);
|
|
1677
|
+
}
|
|
1678
|
+
},
|
|
1633
1679
|
agent: {
|
|
1634
1680
|
async create(params, opts) {
|
|
1635
1681
|
return httpClient.post(
|
|
@@ -1673,6 +1719,8 @@ function createAdminSupportApi(config) {
|
|
|
1673
1719
|
const qs = new URLSearchParams({ store_id: params.store_id });
|
|
1674
1720
|
if (params.status) qs.set("status", params.status);
|
|
1675
1721
|
if (params.agent_id) qs.set("agent_id", params.agent_id);
|
|
1722
|
+
if (params.channel_id) qs.set("channel_id", params.channel_id);
|
|
1723
|
+
if (params.channel_type) qs.set("channel_type", params.channel_type);
|
|
1676
1724
|
if (params.query) qs.set("query", params.query);
|
|
1677
1725
|
if (params.limit) qs.set("limit", String(params.limit));
|
|
1678
1726
|
if (params.cursor) qs.set("cursor", params.cursor);
|
|
@@ -2063,15 +2111,6 @@ var createWorkflowApi = (apiConfig) => {
|
|
|
2063
2111
|
options
|
|
2064
2112
|
);
|
|
2065
2113
|
},
|
|
2066
|
-
async connectWorkflowAccount(params, options) {
|
|
2067
|
-
const { store_id, type, ...payload } = params;
|
|
2068
|
-
const target_store_id = store_id || apiConfig.storeId;
|
|
2069
|
-
return apiConfig.httpClient.post(
|
|
2070
|
-
`/v1/stores/${target_store_id}/workflow-accounts/connect`,
|
|
2071
|
-
{ ...payload, type, store_id: target_store_id },
|
|
2072
|
-
options
|
|
2073
|
-
);
|
|
2074
|
-
},
|
|
2075
2114
|
async deleteWorkflowAccount(params, options) {
|
|
2076
2115
|
const store_id = params.store_id || apiConfig.storeId;
|
|
2077
2116
|
return apiConfig.httpClient.delete(
|
|
@@ -2135,6 +2174,14 @@ var createShippingApi = (apiConfig) => {
|
|
|
2135
2174
|
payload,
|
|
2136
2175
|
options
|
|
2137
2176
|
);
|
|
2177
|
+
},
|
|
2178
|
+
async refundLabel(params, options) {
|
|
2179
|
+
const { order_id, shipment_id } = params;
|
|
2180
|
+
return apiConfig.httpClient.post(
|
|
2181
|
+
`/v1/stores/${apiConfig.storeId}/orders/${order_id}/shipments/${shipment_id}/label/refund`,
|
|
2182
|
+
{},
|
|
2183
|
+
options
|
|
2184
|
+
);
|
|
2138
2185
|
}
|
|
2139
2186
|
};
|
|
2140
2187
|
};
|
|
@@ -2973,7 +3020,6 @@ function createAdmin(config) {
|
|
|
2973
3020
|
getExecution: workflowApi.getWorkflowExecution,
|
|
2974
3021
|
listAccounts: workflowApi.getWorkflowAccounts,
|
|
2975
3022
|
getAccountConnectUrl: workflowApi.getWorkflowAccountConnectUrl,
|
|
2976
|
-
connectAccount: workflowApi.connectWorkflowAccount,
|
|
2977
3023
|
deleteAccount: workflowApi.deleteWorkflowAccount
|
|
2978
3024
|
};
|
|
2979
3025
|
const formApi = createFormApi(apiConfig);
|
|
@@ -3127,7 +3173,8 @@ function createAdmin(config) {
|
|
|
3127
3173
|
processRefund: eshopApi.processRefund,
|
|
3128
3174
|
downloadDigitalAccess: eshopApi.downloadDigitalAccess,
|
|
3129
3175
|
getShippingRates: shippingApi.getRates,
|
|
3130
|
-
ship: shippingApi.ship
|
|
3176
|
+
ship: shippingApi.ship,
|
|
3177
|
+
refundShippingLabel: shippingApi.refundLabel
|
|
3131
3178
|
},
|
|
3132
3179
|
cart: {
|
|
3133
3180
|
create: eshopApi.createCart,
|
|
@@ -3196,6 +3243,12 @@ function createAdmin(config) {
|
|
|
3196
3243
|
automation: {
|
|
3197
3244
|
workflow: workflowPublicApi,
|
|
3198
3245
|
support: {
|
|
3246
|
+
createChannel: supportApi.channel.create,
|
|
3247
|
+
getChannel: supportApi.channel.get,
|
|
3248
|
+
findChannels: supportApi.channel.find,
|
|
3249
|
+
updateChannel: supportApi.channel.update,
|
|
3250
|
+
deleteChannel: supportApi.channel.delete,
|
|
3251
|
+
receiveChannelMessage: supportApi.channel.receiveMessage,
|
|
3199
3252
|
createAgent: supportApi.agent.create,
|
|
3200
3253
|
getAgent: supportApi.agent.get,
|
|
3201
3254
|
findAgents: supportApi.agent.find,
|