arky-sdk 0.9.11 → 0.9.12

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.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, aU as createAdmin } from './admin-CAwQrMOX.cjs';
2
- import './api-DJI3S6XA.cjs';
3
- import './index-u-gjHnKs.cjs';
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-D8HiRDCl.cjs';
2
+ import './api-D4lMmvF0.cjs';
3
+ import './index-BS2x278C.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, aU as createAdmin } from './admin-BKXmDIVk.js';
2
- import './api-DJI3S6XA.js';
3
- import './index-BaSBPLdF.js';
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-Dnnv18wN.js';
2
+ import './api-D4lMmvF0.js';
3
+ import './index-Be8suRwP.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);
@@ -2135,6 +2183,14 @@ var createShippingApi = (apiConfig) => {
2135
2183
  payload,
2136
2184
  options
2137
2185
  );
2186
+ },
2187
+ async refundLabel(params, options) {
2188
+ const { order_id, shipment_id } = params;
2189
+ return apiConfig.httpClient.post(
2190
+ `/v1/stores/${apiConfig.storeId}/orders/${order_id}/shipments/${shipment_id}/label/refund`,
2191
+ {},
2192
+ options
2193
+ );
2138
2194
  }
2139
2195
  };
2140
2196
  };
@@ -3127,7 +3183,8 @@ function createAdmin(config) {
3127
3183
  processRefund: eshopApi.processRefund,
3128
3184
  downloadDigitalAccess: eshopApi.downloadDigitalAccess,
3129
3185
  getShippingRates: shippingApi.getRates,
3130
- ship: shippingApi.ship
3186
+ ship: shippingApi.ship,
3187
+ refundShippingLabel: shippingApi.refundLabel
3131
3188
  },
3132
3189
  cart: {
3133
3190
  create: eshopApi.createCart,
@@ -3196,6 +3253,12 @@ function createAdmin(config) {
3196
3253
  automation: {
3197
3254
  workflow: workflowPublicApi,
3198
3255
  support: {
3256
+ createChannel: supportApi.channel.create,
3257
+ getChannel: supportApi.channel.get,
3258
+ findChannels: supportApi.channel.find,
3259
+ updateChannel: supportApi.channel.update,
3260
+ deleteChannel: supportApi.channel.delete,
3261
+ receiveChannelMessage: supportApi.channel.receiveMessage,
3199
3262
  createAgent: supportApi.agent.create,
3200
3263
  getAgent: supportApi.agent.get,
3201
3264
  findAgents: supportApi.agent.find,