@cimplify/sdk 0.38.3 → 0.38.5

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/advanced.js CHANGED
@@ -1,83 +1,83 @@
1
1
  'use strict';
2
2
 
3
- var chunkHKVRUGM6_js = require('./chunk-HKVRUGM6.js');
3
+ var chunkBAWKQRIB_js = require('./chunk-BAWKQRIB.js');
4
4
  require('./chunk-V2O5AO7I.js');
5
5
 
6
6
 
7
7
 
8
8
  Object.defineProperty(exports, "AuthService", {
9
9
  enumerable: true,
10
- get: function () { return chunkHKVRUGM6_js.AuthService; }
10
+ get: function () { return chunkBAWKQRIB_js.AuthService; }
11
11
  });
12
12
  Object.defineProperty(exports, "BusinessService", {
13
13
  enumerable: true,
14
- get: function () { return chunkHKVRUGM6_js.BusinessService; }
14
+ get: function () { return chunkBAWKQRIB_js.BusinessService; }
15
15
  });
16
16
  Object.defineProperty(exports, "CartOperations", {
17
17
  enumerable: true,
18
- get: function () { return chunkHKVRUGM6_js.CartOperations; }
18
+ get: function () { return chunkBAWKQRIB_js.CartOperations; }
19
19
  });
20
20
  Object.defineProperty(exports, "CatalogueQueries", {
21
21
  enumerable: true,
22
- get: function () { return chunkHKVRUGM6_js.CatalogueQueries; }
22
+ get: function () { return chunkBAWKQRIB_js.CatalogueQueries; }
23
23
  });
24
24
  Object.defineProperty(exports, "CheckoutOperations", {
25
25
  enumerable: true,
26
- get: function () { return chunkHKVRUGM6_js.CheckoutService; }
26
+ get: function () { return chunkBAWKQRIB_js.CheckoutService; }
27
27
  });
28
28
  Object.defineProperty(exports, "CheckoutService", {
29
29
  enumerable: true,
30
- get: function () { return chunkHKVRUGM6_js.CheckoutService; }
30
+ get: function () { return chunkBAWKQRIB_js.CheckoutService; }
31
31
  });
32
32
  Object.defineProperty(exports, "CimplifyElement", {
33
33
  enumerable: true,
34
- get: function () { return chunkHKVRUGM6_js.CimplifyElement; }
34
+ get: function () { return chunkBAWKQRIB_js.CimplifyElement; }
35
35
  });
36
36
  Object.defineProperty(exports, "CimplifyElements", {
37
37
  enumerable: true,
38
- get: function () { return chunkHKVRUGM6_js.CimplifyElements; }
38
+ get: function () { return chunkBAWKQRIB_js.CimplifyElements; }
39
39
  });
40
40
  Object.defineProperty(exports, "ELEMENT_TYPES", {
41
41
  enumerable: true,
42
- get: function () { return chunkHKVRUGM6_js.ELEMENT_TYPES; }
42
+ get: function () { return chunkBAWKQRIB_js.ELEMENT_TYPES; }
43
43
  });
44
44
  Object.defineProperty(exports, "EVENT_TYPES", {
45
45
  enumerable: true,
46
- get: function () { return chunkHKVRUGM6_js.EVENT_TYPES; }
46
+ get: function () { return chunkBAWKQRIB_js.EVENT_TYPES; }
47
47
  });
48
48
  Object.defineProperty(exports, "FxService", {
49
49
  enumerable: true,
50
- get: function () { return chunkHKVRUGM6_js.FxService; }
50
+ get: function () { return chunkBAWKQRIB_js.FxService; }
51
51
  });
52
52
  Object.defineProperty(exports, "InventoryService", {
53
53
  enumerable: true,
54
- get: function () { return chunkHKVRUGM6_js.InventoryService; }
54
+ get: function () { return chunkBAWKQRIB_js.InventoryService; }
55
55
  });
56
56
  Object.defineProperty(exports, "LinkService", {
57
57
  enumerable: true,
58
- get: function () { return chunkHKVRUGM6_js.LinkService; }
58
+ get: function () { return chunkBAWKQRIB_js.LinkService; }
59
59
  });
60
60
  Object.defineProperty(exports, "LiteService", {
61
61
  enumerable: true,
62
- get: function () { return chunkHKVRUGM6_js.LiteService; }
62
+ get: function () { return chunkBAWKQRIB_js.LiteService; }
63
63
  });
64
64
  Object.defineProperty(exports, "MESSAGE_TYPES", {
65
65
  enumerable: true,
66
- get: function () { return chunkHKVRUGM6_js.MESSAGE_TYPES; }
66
+ get: function () { return chunkBAWKQRIB_js.MESSAGE_TYPES; }
67
67
  });
68
68
  Object.defineProperty(exports, "OrderQueries", {
69
69
  enumerable: true,
70
- get: function () { return chunkHKVRUGM6_js.OrderQueries; }
70
+ get: function () { return chunkBAWKQRIB_js.OrderQueries; }
71
71
  });
72
72
  Object.defineProperty(exports, "SchedulingService", {
73
73
  enumerable: true,
74
- get: function () { return chunkHKVRUGM6_js.SchedulingService; }
74
+ get: function () { return chunkBAWKQRIB_js.SchedulingService; }
75
75
  });
76
76
  Object.defineProperty(exports, "createElements", {
77
77
  enumerable: true,
78
- get: function () { return chunkHKVRUGM6_js.createElements; }
78
+ get: function () { return chunkBAWKQRIB_js.createElements; }
79
79
  });
80
80
  Object.defineProperty(exports, "generateIdempotencyKey", {
81
81
  enumerable: true,
82
- get: function () { return chunkHKVRUGM6_js.generateIdempotencyKey; }
82
+ get: function () { return chunkBAWKQRIB_js.generateIdempotencyKey; }
83
83
  });
package/dist/advanced.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export { AuthService, BusinessService, CartOperations, CatalogueQueries, CheckoutService as CheckoutOperations, CheckoutService, CimplifyElement, CimplifyElements, ELEMENT_TYPES, EVENT_TYPES, FxService, InventoryService, LinkService, LiteService, MESSAGE_TYPES, OrderQueries, SchedulingService, createElements, generateIdempotencyKey } from './chunk-TFHKVQLL.mjs';
1
+ export { AuthService, BusinessService, CartOperations, CatalogueQueries, CheckoutService as CheckoutOperations, CheckoutService, CimplifyElement, CimplifyElements, ELEMENT_TYPES, EVENT_TYPES, FxService, InventoryService, LinkService, LiteService, MESSAGE_TYPES, OrderQueries, SchedulingService, createElements, generateIdempotencyKey } from './chunk-EZK2FXTM.mjs';
2
2
  import './chunk-6TVQQYQ5.mjs';
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkHKVRUGM6_js = require('./chunk-HKVRUGM6.js');
3
+ var chunkBAWKQRIB_js = require('./chunk-BAWKQRIB.js');
4
4
  var chunkV2O5AO7I_js = require('./chunk-V2O5AO7I.js');
5
5
 
6
6
  // src/activity.ts
@@ -29,7 +29,7 @@ var ActivityService = class {
29
29
  this.sendEvents([event]);
30
30
  }
31
31
  async getState() {
32
- return chunkHKVRUGM6_js.safe(this.client.get("/api/v1/activity/state"));
32
+ return chunkBAWKQRIB_js.safe(this.client.get("/api/v1/activity/state"));
33
33
  }
34
34
  async getRecommendations(options) {
35
35
  const params = new URLSearchParams();
@@ -37,10 +37,10 @@ var ActivityService = class {
37
37
  if (options?.limit) params.set("limit", String(options.limit));
38
38
  const query = params.toString();
39
39
  const path = query ? `/api/v1/activity/recommendations?${query}` : "/api/v1/activity/recommendations";
40
- return chunkHKVRUGM6_js.safe(this.client.get(path));
40
+ return chunkBAWKQRIB_js.safe(this.client.get(path));
41
41
  }
42
42
  async dismissMessage(code) {
43
- return chunkHKVRUGM6_js.safe(
43
+ return chunkBAWKQRIB_js.safe(
44
44
  this.client.post("/api/v1/activity/messages/dismiss", { code })
45
45
  );
46
46
  }
@@ -62,16 +62,16 @@ var SubscriptionService = class {
62
62
  this.client = client;
63
63
  }
64
64
  async list() {
65
- return chunkHKVRUGM6_js.safe(this.client.get("/api/v1/subscriptions"));
65
+ return chunkBAWKQRIB_js.safe(this.client.get("/api/v1/subscriptions"));
66
66
  }
67
67
  async get(id) {
68
68
  const encodedId = encodeURIComponent(id);
69
- return chunkHKVRUGM6_js.safe(this.client.get(`/api/v1/subscriptions/${encodedId}`));
69
+ return chunkBAWKQRIB_js.safe(this.client.get(`/api/v1/subscriptions/${encodedId}`));
70
70
  }
71
71
  async cancel(id, reason, opts) {
72
72
  const encodedId = encodeURIComponent(id);
73
- const idempotencyKey = opts?.idempotencyKey ?? chunkHKVRUGM6_js.generateIdempotencyKey();
74
- return chunkHKVRUGM6_js.safe(
73
+ const idempotencyKey = opts?.idempotencyKey ?? chunkBAWKQRIB_js.generateIdempotencyKey();
74
+ return chunkBAWKQRIB_js.safe(
75
75
  this.client.post(
76
76
  `/api/v1/subscriptions/${encodedId}/cancel`,
77
77
  { reason },
@@ -81,20 +81,20 @@ var SubscriptionService = class {
81
81
  }
82
82
  async pause(id) {
83
83
  const encodedId = encodeURIComponent(id);
84
- return chunkHKVRUGM6_js.safe(
84
+ return chunkBAWKQRIB_js.safe(
85
85
  this.client.post(`/api/v1/subscriptions/${encodedId}/pause`)
86
86
  );
87
87
  }
88
88
  async resume(id) {
89
89
  const encodedId = encodeURIComponent(id);
90
- return chunkHKVRUGM6_js.safe(
90
+ return chunkBAWKQRIB_js.safe(
91
91
  this.client.post(`/api/v1/subscriptions/${encodedId}/resume`)
92
92
  );
93
93
  }
94
94
  async skipNextRenewal(id, opts) {
95
95
  const encodedId = encodeURIComponent(id);
96
- const idempotencyKey = opts?.idempotencyKey ?? chunkHKVRUGM6_js.generateIdempotencyKey();
97
- return chunkHKVRUGM6_js.safe(
96
+ const idempotencyKey = opts?.idempotencyKey ?? chunkBAWKQRIB_js.generateIdempotencyKey();
97
+ return chunkBAWKQRIB_js.safe(
98
98
  this.client.post(
99
99
  `/api/v1/subscriptions/${encodedId}/skip`,
100
100
  void 0,
@@ -110,8 +110,8 @@ var UploadService = class {
110
110
  this.client = client;
111
111
  }
112
112
  async init(filename, contentType, sizeBytes, opts) {
113
- const idempotencyKey = opts?.idempotencyKey ?? chunkHKVRUGM6_js.generateIdempotencyKey();
114
- return chunkHKVRUGM6_js.safe(
113
+ const idempotencyKey = opts?.idempotencyKey ?? chunkBAWKQRIB_js.generateIdempotencyKey();
114
+ return chunkBAWKQRIB_js.safe(
115
115
  this.client.post(
116
116
  "/api/v1/uploads/init",
117
117
  {
@@ -124,7 +124,7 @@ var UploadService = class {
124
124
  );
125
125
  }
126
126
  async confirm(uploadId) {
127
- return chunkHKVRUGM6_js.safe(
127
+ return chunkBAWKQRIB_js.safe(
128
128
  this.client.post("/api/v1/uploads/confirm", {
129
129
  upload_id: uploadId
130
130
  })
@@ -170,7 +170,7 @@ var PlacesService = class {
170
170
  this.client = client;
171
171
  }
172
172
  async autocomplete(input, sessionToken) {
173
- return chunkHKVRUGM6_js.safe(
173
+ return chunkBAWKQRIB_js.safe(
174
174
  this.client.post("/api/v1/places/autocomplete", {
175
175
  input,
176
176
  sessionToken
@@ -178,7 +178,7 @@ var PlacesService = class {
178
178
  );
179
179
  }
180
180
  async details(placeId, sessionToken) {
181
- return chunkHKVRUGM6_js.safe(
181
+ return chunkBAWKQRIB_js.safe(
182
182
  this.client.post("/api/v1/places/details", {
183
183
  place_id: placeId,
184
184
  sessionToken
@@ -197,7 +197,7 @@ var DeliveryService = class {
197
197
  params.set("dropoff_lat", String(dropoffLat));
198
198
  params.set("dropoff_lng", String(dropoffLng));
199
199
  if (country) params.set("country", country);
200
- return chunkHKVRUGM6_js.safe(
200
+ return chunkBAWKQRIB_js.safe(
201
201
  this.client.get(`/api/v1/delivery/fee?${params.toString()}`)
202
202
  );
203
203
  }
@@ -210,8 +210,8 @@ var SupportService = class {
210
210
  }
211
211
  /** Open (or resume) the customer's widget conversation. */
212
212
  async openConversation(opts) {
213
- const idempotencyKey = opts?.idempotencyKey ?? chunkHKVRUGM6_js.generateIdempotencyKey();
214
- return chunkHKVRUGM6_js.safe(
213
+ const idempotencyKey = opts?.idempotencyKey ?? chunkBAWKQRIB_js.generateIdempotencyKey();
214
+ return chunkBAWKQRIB_js.safe(
215
215
  this.client.post("/api/v1/support/conversation", void 0, {
216
216
  idempotencyKey
217
217
  })
@@ -219,8 +219,8 @@ var SupportService = class {
219
219
  }
220
220
  /** Send a message in the active conversation. */
221
221
  async sendMessage(content, opts) {
222
- const idempotencyKey = opts?.idempotencyKey ?? chunkHKVRUGM6_js.generateIdempotencyKey();
223
- return chunkHKVRUGM6_js.safe(
222
+ const idempotencyKey = opts?.idempotencyKey ?? chunkBAWKQRIB_js.generateIdempotencyKey();
223
+ return chunkBAWKQRIB_js.safe(
224
224
  this.client.post(
225
225
  "/api/v1/support/conversation/messages",
226
226
  { content },
@@ -235,7 +235,7 @@ var SupportService = class {
235
235
  if (options.limit) params.set("limit", String(options.limit));
236
236
  const query = params.toString();
237
237
  const path = query ? `/api/v1/support/conversation/messages?${query}` : "/api/v1/support/conversation/messages";
238
- return chunkHKVRUGM6_js.safe(this.client.get(path));
238
+ return chunkBAWKQRIB_js.safe(this.client.get(path));
239
239
  }
240
240
  };
241
241
 
@@ -821,25 +821,25 @@ var CimplifyClient = class {
821
821
  }
822
822
  get catalogue() {
823
823
  if (!this._catalogue) {
824
- this._catalogue = new chunkHKVRUGM6_js.CatalogueQueries(this);
824
+ this._catalogue = new chunkBAWKQRIB_js.CatalogueQueries(this);
825
825
  }
826
826
  return this._catalogue;
827
827
  }
828
828
  get cart() {
829
829
  if (!this._cart) {
830
- this._cart = new chunkHKVRUGM6_js.CartOperations(this);
830
+ this._cart = new chunkBAWKQRIB_js.CartOperations(this);
831
831
  }
832
832
  return this._cart;
833
833
  }
834
834
  get checkout() {
835
835
  if (!this._checkout) {
836
- this._checkout = new chunkHKVRUGM6_js.CheckoutService(this);
836
+ this._checkout = new chunkBAWKQRIB_js.CheckoutService(this);
837
837
  }
838
838
  return this._checkout;
839
839
  }
840
840
  get orders() {
841
841
  if (!this._orders) {
842
- this._orders = new chunkHKVRUGM6_js.OrderQueries(this);
842
+ this._orders = new chunkBAWKQRIB_js.OrderQueries(this);
843
843
  }
844
844
  return this._orders;
845
845
  }
@@ -863,43 +863,43 @@ var CimplifyClient = class {
863
863
  }
864
864
  get link() {
865
865
  if (!this._link) {
866
- this._link = new chunkHKVRUGM6_js.LinkService(this);
866
+ this._link = new chunkBAWKQRIB_js.LinkService(this);
867
867
  }
868
868
  return this._link;
869
869
  }
870
870
  get auth() {
871
871
  if (!this._auth) {
872
- this._auth = new chunkHKVRUGM6_js.AuthService(this);
872
+ this._auth = new chunkBAWKQRIB_js.AuthService(this);
873
873
  }
874
874
  return this._auth;
875
875
  }
876
876
  get business() {
877
877
  if (!this._business) {
878
- this._business = new chunkHKVRUGM6_js.BusinessService(this);
878
+ this._business = new chunkBAWKQRIB_js.BusinessService(this);
879
879
  }
880
880
  return this._business;
881
881
  }
882
882
  get inventory() {
883
883
  if (!this._inventory) {
884
- this._inventory = new chunkHKVRUGM6_js.InventoryService(this);
884
+ this._inventory = new chunkBAWKQRIB_js.InventoryService(this);
885
885
  }
886
886
  return this._inventory;
887
887
  }
888
888
  get scheduling() {
889
889
  if (!this._scheduling) {
890
- this._scheduling = new chunkHKVRUGM6_js.SchedulingService(this);
890
+ this._scheduling = new chunkBAWKQRIB_js.SchedulingService(this);
891
891
  }
892
892
  return this._scheduling;
893
893
  }
894
894
  get lite() {
895
895
  if (!this._lite) {
896
- this._lite = new chunkHKVRUGM6_js.LiteService(this);
896
+ this._lite = new chunkBAWKQRIB_js.LiteService(this);
897
897
  }
898
898
  return this._lite;
899
899
  }
900
900
  get fx() {
901
901
  if (!this._fx) {
902
- this._fx = new chunkHKVRUGM6_js.FxService(this);
902
+ this._fx = new chunkBAWKQRIB_js.FxService(this);
903
903
  }
904
904
  return this._fx;
905
905
  }
@@ -934,7 +934,7 @@ var CimplifyClient = class {
934
934
  if (businessId) {
935
935
  this.setBusinessId(businessId);
936
936
  }
937
- return chunkHKVRUGM6_js.createElements(this, businessId ?? this.businessId ?? void 0, options);
937
+ return chunkBAWKQRIB_js.createElements(this, businessId ?? this.businessId ?? void 0, options);
938
938
  }
939
939
  };
940
940
  function createCimplifyClient(config = {}) {
@@ -844,7 +844,12 @@ async function openPaystackPopup(options, signal) {
844
844
  }
845
845
  let PaystackPop;
846
846
  try {
847
- const imported = await import('@paystack/inline-js');
847
+ const specifier = "@paystack/inline-js";
848
+ const imported = await import(
849
+ /* webpackIgnore: true */
850
+ /* @vite-ignore */
851
+ specifier
852
+ );
848
853
  PaystackPop = imported.default;
849
854
  } catch {
850
855
  return { success: false, error: "PROVIDER_UNAVAILABLE" };
@@ -842,7 +842,12 @@ async function openPaystackPopup(options, signal) {
842
842
  }
843
843
  let PaystackPop;
844
844
  try {
845
- const imported = await import('@paystack/inline-js');
845
+ const specifier = "@paystack/inline-js";
846
+ const imported = await import(
847
+ /* webpackIgnore: true */
848
+ /* @vite-ignore */
849
+ specifier
850
+ );
846
851
  PaystackPop = imported.default;
847
852
  } catch {
848
853
  return { success: false, error: "PROVIDER_UNAVAILABLE" };
@@ -1,4 +1,4 @@
1
- import { safe, generateIdempotencyKey, CatalogueQueries, CartOperations, CheckoutService, OrderQueries, LinkService, AuthService, BusinessService, InventoryService, SchedulingService, LiteService, FxService, createElements } from './chunk-TFHKVQLL.mjs';
1
+ import { safe, generateIdempotencyKey, CatalogueQueries, CartOperations, CheckoutService, OrderQueries, LinkService, AuthService, BusinessService, InventoryService, SchedulingService, LiteService, FxService, createElements } from './chunk-EZK2FXTM.mjs';
2
2
  import { CimplifyError, ErrorCode, IdempotencyMismatchError, enrichError } from './chunk-6TVQQYQ5.mjs';
3
3
 
4
4
  // src/activity.ts