@cimplify/sdk 0.70.2 → 0.71.0

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.
Files changed (52) hide show
  1. package/dist/advanced.d.mts +1 -1
  2. package/dist/advanced.d.ts +1 -1
  3. package/dist/advanced.js +20 -20
  4. package/dist/advanced.mjs +1 -1
  5. package/dist/{chunk-M2CXZQHS.mjs → chunk-3BKMNVTR.mjs} +2 -1
  6. package/dist/{chunk-6XXVA3IV.mjs → chunk-BYWJSPT4.mjs} +2 -2
  7. package/dist/{chunk-BCWPRPK7.js → chunk-CV5QMDQS.js} +2 -1
  8. package/dist/{chunk-EAVXSFAB.mjs → chunk-H337NF4O.mjs} +1 -1
  9. package/dist/{chunk-O3ECKVOM.mjs → chunk-J7L5LHGK.mjs} +30 -11
  10. package/dist/{chunk-I4MP2XZS.js → chunk-OGQFDCZM.js} +30 -11
  11. package/dist/{chunk-QZQEGRGB.js → chunk-QS4XDVHI.js} +35 -35
  12. package/dist/{chunk-SC5DUKGD.js → chunk-Y64AIRGW.js} +4 -4
  13. package/dist/{client-Des_GqmQ.d.ts → client-BvqaIlJ0.d.ts} +2 -2
  14. package/dist/{client-DRJvXz54.d.mts → client-C7EMuGoz.d.mts} +9 -7
  15. package/dist/{client-DjQhg6yr.d.ts → client-D6CZ2Ggp.d.ts} +9 -7
  16. package/dist/{client-BRGGjeny.d.mts → client-DWA_XIh3.d.mts} +2 -2
  17. package/dist/index.d.mts +1 -1
  18. package/dist/index.d.ts +1 -1
  19. package/dist/index.js +68 -68
  20. package/dist/index.mjs +3 -3
  21. package/dist/mock/cli.mjs +30 -11
  22. package/dist/mock/library.js +30 -11
  23. package/dist/mock/library.mjs +30 -11
  24. package/dist/mock/msw.js +30 -11
  25. package/dist/mock/msw.mjs +30 -11
  26. package/dist/react.d.mts +1 -1
  27. package/dist/react.d.ts +1 -1
  28. package/dist/react.js +16 -16
  29. package/dist/react.mjs +2 -2
  30. package/dist/server/tanstack.d.mts +74 -0
  31. package/dist/server/tanstack.d.ts +74 -0
  32. package/dist/server/tanstack.js +291 -0
  33. package/dist/server/tanstack.mjs +279 -0
  34. package/dist/{server-D8rwqZQ6.d.mts → server-DDQ1O3XR.d.mts} +4 -1
  35. package/dist/{server-BQzz921M.d.ts → server-DMvQp27Z.d.ts} +4 -1
  36. package/dist/server.d.mts +2 -2
  37. package/dist/server.d.ts +2 -2
  38. package/dist/server.js +7 -7
  39. package/dist/server.mjs +2 -2
  40. package/dist/testing/msw.d.mts +1 -1
  41. package/dist/testing/msw.d.ts +1 -1
  42. package/dist/testing/msw.js +2 -2
  43. package/dist/testing/msw.mjs +1 -1
  44. package/dist/testing/suite.d.mts +4 -4
  45. package/dist/testing/suite.d.ts +4 -4
  46. package/dist/testing/suite.js +23 -23
  47. package/dist/testing/suite.mjs +4 -4
  48. package/dist/testing.d.mts +18 -18
  49. package/dist/testing.d.ts +18 -18
  50. package/dist/testing.js +79 -79
  51. package/dist/testing.mjs +5 -5
  52. package/package.json +7 -1
@@ -1,4 +1,4 @@
1
- export { k as AuthService, C as BusinessService, P as CartOperations, Q as CatalogueQueries, a9 as CheckoutOperations, a9 as CheckoutService, af as CimplifyElement, ag as CimplifyElements, aF as ELEMENT_TYPES, aG as EVENT_TYPES, aJ as ElementEventType, aK as ElementOptions, aL as ElementType, aT as ElementsOptions, a$ as FetchQuoteInput, b7 as FxService, ba as GetProductsOptions, bd as InventoryService, bk as LinkService, bo as LiteService, bv as MESSAGE_TYPES, bY as OrderQueries, cf as PriceQuote, cl as QuoteBundleSelectionInput, cm as QuoteCompositeSelectionInput, cn as QuoteDynamicBuckets, co as QuoteStatus, cp as QuoteUiMessage, cr as RefreshQuoteInput, cs as RefreshQuoteResult, cT as SchedulingService, dw as createElements } from './client-DRJvXz54.mjs';
1
+ export { k as AuthService, C as BusinessService, P as CartOperations, Q as CatalogueQueries, a9 as CheckoutOperations, a9 as CheckoutService, af as CimplifyElement, ag as CimplifyElements, aF as ELEMENT_TYPES, aG as EVENT_TYPES, aJ as ElementEventType, aK as ElementOptions, aL as ElementType, aT as ElementsOptions, a$ as FetchQuoteInput, b7 as FxService, ba as GetProductsOptions, bd as InventoryService, bk as LinkService, bo as LiteService, bv as MESSAGE_TYPES, bY as OrderQueries, cf as PriceQuote, cl as QuoteBundleSelectionInput, cm as QuoteCompositeSelectionInput, cn as QuoteDynamicBuckets, co as QuoteStatus, cp as QuoteUiMessage, cr as RefreshQuoteInput, cs as RefreshQuoteResult, cT as SchedulingService, dw as createElements } from './client-C7EMuGoz.mjs';
2
2
  import './product-B_kS4Oxa.mjs';
3
3
  import './payment-DVS7ZUEp.mjs';
4
4
 
@@ -1,4 +1,4 @@
1
- export { k as AuthService, C as BusinessService, P as CartOperations, Q as CatalogueQueries, a9 as CheckoutOperations, a9 as CheckoutService, af as CimplifyElement, ag as CimplifyElements, aF as ELEMENT_TYPES, aG as EVENT_TYPES, aJ as ElementEventType, aK as ElementOptions, aL as ElementType, aT as ElementsOptions, a$ as FetchQuoteInput, b7 as FxService, ba as GetProductsOptions, bd as InventoryService, bk as LinkService, bo as LiteService, bv as MESSAGE_TYPES, bY as OrderQueries, cf as PriceQuote, cl as QuoteBundleSelectionInput, cm as QuoteCompositeSelectionInput, cn as QuoteDynamicBuckets, co as QuoteStatus, cp as QuoteUiMessage, cr as RefreshQuoteInput, cs as RefreshQuoteResult, cT as SchedulingService, dw as createElements } from './client-DjQhg6yr.js';
1
+ export { k as AuthService, C as BusinessService, P as CartOperations, Q as CatalogueQueries, a9 as CheckoutOperations, a9 as CheckoutService, af as CimplifyElement, ag as CimplifyElements, aF as ELEMENT_TYPES, aG as EVENT_TYPES, aJ as ElementEventType, aK as ElementOptions, aL as ElementType, aT as ElementsOptions, a$ as FetchQuoteInput, b7 as FxService, ba as GetProductsOptions, bd as InventoryService, bk as LinkService, bo as LiteService, bv as MESSAGE_TYPES, bY as OrderQueries, cf as PriceQuote, cl as QuoteBundleSelectionInput, cm as QuoteCompositeSelectionInput, cn as QuoteDynamicBuckets, co as QuoteStatus, cp as QuoteUiMessage, cr as RefreshQuoteInput, cs as RefreshQuoteResult, cT as SchedulingService, dw as createElements } from './client-D6CZ2Ggp.js';
2
2
  import './product-B_kS4Oxa.js';
3
3
  import './payment-sn-yGL7v.js';
4
4
 
package/dist/advanced.js CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkBCWPRPK7_js = require('./chunk-BCWPRPK7.js');
3
+ var chunkCV5QMDQS_js = require('./chunk-CV5QMDQS.js');
4
4
  require('./chunk-7Y2O3E4D.js');
5
5
  require('./chunk-XA3ZNR75.js');
6
6
  require('./chunk-OWW5GUSB.js');
@@ -9,77 +9,77 @@ require('./chunk-OWW5GUSB.js');
9
9
 
10
10
  Object.defineProperty(exports, "AuthService", {
11
11
  enumerable: true,
12
- get: function () { return chunkBCWPRPK7_js.AuthService; }
12
+ get: function () { return chunkCV5QMDQS_js.AuthService; }
13
13
  });
14
14
  Object.defineProperty(exports, "BusinessService", {
15
15
  enumerable: true,
16
- get: function () { return chunkBCWPRPK7_js.BusinessService; }
16
+ get: function () { return chunkCV5QMDQS_js.BusinessService; }
17
17
  });
18
18
  Object.defineProperty(exports, "CartOperations", {
19
19
  enumerable: true,
20
- get: function () { return chunkBCWPRPK7_js.CartOperations; }
20
+ get: function () { return chunkCV5QMDQS_js.CartOperations; }
21
21
  });
22
22
  Object.defineProperty(exports, "CatalogueQueries", {
23
23
  enumerable: true,
24
- get: function () { return chunkBCWPRPK7_js.CatalogueQueries; }
24
+ get: function () { return chunkCV5QMDQS_js.CatalogueQueries; }
25
25
  });
26
26
  Object.defineProperty(exports, "CheckoutOperations", {
27
27
  enumerable: true,
28
- get: function () { return chunkBCWPRPK7_js.CheckoutService; }
28
+ get: function () { return chunkCV5QMDQS_js.CheckoutService; }
29
29
  });
30
30
  Object.defineProperty(exports, "CheckoutService", {
31
31
  enumerable: true,
32
- get: function () { return chunkBCWPRPK7_js.CheckoutService; }
32
+ get: function () { return chunkCV5QMDQS_js.CheckoutService; }
33
33
  });
34
34
  Object.defineProperty(exports, "CimplifyElement", {
35
35
  enumerable: true,
36
- get: function () { return chunkBCWPRPK7_js.CimplifyElement; }
36
+ get: function () { return chunkCV5QMDQS_js.CimplifyElement; }
37
37
  });
38
38
  Object.defineProperty(exports, "CimplifyElements", {
39
39
  enumerable: true,
40
- get: function () { return chunkBCWPRPK7_js.CimplifyElements; }
40
+ get: function () { return chunkCV5QMDQS_js.CimplifyElements; }
41
41
  });
42
42
  Object.defineProperty(exports, "ELEMENT_TYPES", {
43
43
  enumerable: true,
44
- get: function () { return chunkBCWPRPK7_js.ELEMENT_TYPES; }
44
+ get: function () { return chunkCV5QMDQS_js.ELEMENT_TYPES; }
45
45
  });
46
46
  Object.defineProperty(exports, "EVENT_TYPES", {
47
47
  enumerable: true,
48
- get: function () { return chunkBCWPRPK7_js.EVENT_TYPES; }
48
+ get: function () { return chunkCV5QMDQS_js.EVENT_TYPES; }
49
49
  });
50
50
  Object.defineProperty(exports, "FxService", {
51
51
  enumerable: true,
52
- get: function () { return chunkBCWPRPK7_js.FxService; }
52
+ get: function () { return chunkCV5QMDQS_js.FxService; }
53
53
  });
54
54
  Object.defineProperty(exports, "InventoryService", {
55
55
  enumerable: true,
56
- get: function () { return chunkBCWPRPK7_js.InventoryService; }
56
+ get: function () { return chunkCV5QMDQS_js.InventoryService; }
57
57
  });
58
58
  Object.defineProperty(exports, "LinkService", {
59
59
  enumerable: true,
60
- get: function () { return chunkBCWPRPK7_js.LinkService; }
60
+ get: function () { return chunkCV5QMDQS_js.LinkService; }
61
61
  });
62
62
  Object.defineProperty(exports, "LiteService", {
63
63
  enumerable: true,
64
- get: function () { return chunkBCWPRPK7_js.LiteService; }
64
+ get: function () { return chunkCV5QMDQS_js.LiteService; }
65
65
  });
66
66
  Object.defineProperty(exports, "MESSAGE_TYPES", {
67
67
  enumerable: true,
68
- get: function () { return chunkBCWPRPK7_js.MESSAGE_TYPES; }
68
+ get: function () { return chunkCV5QMDQS_js.MESSAGE_TYPES; }
69
69
  });
70
70
  Object.defineProperty(exports, "OrderQueries", {
71
71
  enumerable: true,
72
- get: function () { return chunkBCWPRPK7_js.OrderQueries; }
72
+ get: function () { return chunkCV5QMDQS_js.OrderQueries; }
73
73
  });
74
74
  Object.defineProperty(exports, "SchedulingService", {
75
75
  enumerable: true,
76
- get: function () { return chunkBCWPRPK7_js.SchedulingService; }
76
+ get: function () { return chunkCV5QMDQS_js.SchedulingService; }
77
77
  });
78
78
  Object.defineProperty(exports, "createElements", {
79
79
  enumerable: true,
80
- get: function () { return chunkBCWPRPK7_js.createElements; }
80
+ get: function () { return chunkCV5QMDQS_js.createElements; }
81
81
  });
82
82
  Object.defineProperty(exports, "generateIdempotencyKey", {
83
83
  enumerable: true,
84
- get: function () { return chunkBCWPRPK7_js.generateIdempotencyKey; }
84
+ get: function () { return chunkCV5QMDQS_js.generateIdempotencyKey; }
85
85
  });
package/dist/advanced.mjs CHANGED
@@ -1,4 +1,4 @@
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-M2CXZQHS.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-3BKMNVTR.mjs';
2
2
  import './chunk-TD3AY34U.mjs';
3
3
  import './chunk-AMZXALF6.mjs';
4
4
  import './chunk-3G6RQLXK.mjs';
@@ -794,7 +794,8 @@ var AUTHORIZATION_TYPE = {
794
794
  var DEVICE_TYPE = {
795
795
  MOBILE: "mobile",
796
796
  DESKTOP: "desktop",
797
- TABLET: "tablet"
797
+ TABLET: "tablet",
798
+ UNKNOWN: "unknown"
798
799
  };
799
800
  var CONTACT_TYPE = {
800
801
  PHONE: "phone",
@@ -1,5 +1,5 @@
1
- import { createMockApp } from './chunk-O3ECKVOM.mjs';
2
- import { createCimplifyClient } from './chunk-EAVXSFAB.mjs';
1
+ import { createMockApp } from './chunk-J7L5LHGK.mjs';
2
+ import { createCimplifyClient } from './chunk-H337NF4O.mjs';
3
3
  import { z } from 'zod';
4
4
 
5
5
  var cimplifyRegistry = z.registry();
@@ -796,7 +796,8 @@ var AUTHORIZATION_TYPE = {
796
796
  var DEVICE_TYPE = {
797
797
  MOBILE: "mobile",
798
798
  DESKTOP: "desktop",
799
- TABLET: "tablet"
799
+ TABLET: "tablet",
800
+ UNKNOWN: "unknown"
800
801
  };
801
802
  var CONTACT_TYPE = {
802
803
  PHONE: "phone",
@@ -1,4 +1,4 @@
1
- import { safe, generateIdempotencyKey, CatalogueQueries, CartOperations, CheckoutService, OrderQueries, LinkService, AuthService, BusinessService, InventoryService, SchedulingService, LiteService, FxService, createElements } from './chunk-M2CXZQHS.mjs';
1
+ import { safe, generateIdempotencyKey, CatalogueQueries, CartOperations, CheckoutService, OrderQueries, LinkService, AuthService, BusinessService, InventoryService, SchedulingService, LiteService, FxService, createElements } from './chunk-3BKMNVTR.mjs';
2
2
  import { CimplifyError, ErrorCode, IdempotencyMismatchError, enrichError } from './chunk-AMZXALF6.mjs';
3
3
 
4
4
  // src/activity.ts
@@ -3088,16 +3088,21 @@ function buildLink(deps) {
3088
3088
  const body = await c.req.json().catch(() => ({}));
3089
3089
  return tryRoute(c, () => {
3090
3090
  const cid = customerId(c);
3091
- const prefs = deps.link.enroll(cid, body.business_id ?? deps.defaultBusinessId);
3091
+ const orderId = body.order_id ?? "";
3092
+ const businessId = body.business_id ?? deps.defaultBusinessId;
3093
+ const prefs = deps.link.enroll(cid, businessId);
3092
3094
  const address = body.address ? deps.link.createAddress(cid, body.address) : null;
3093
3095
  const mobile_money = body.mobile_money ? deps.link.createMobileMoney(cid, body.mobile_money) : null;
3094
3096
  return {
3095
3097
  success: true,
3096
3098
  customer_id: cid,
3097
- order_id: body.order_id,
3098
- preferences: prefs,
3099
- address,
3100
- mobile_money
3099
+ order_id: orderId,
3100
+ enrollment_result: {
3101
+ preferences: prefs,
3102
+ address,
3103
+ mobile_money
3104
+ },
3105
+ linked_at: deps.clock.iso()
3101
3106
  };
3102
3107
  });
3103
3108
  });
@@ -3197,14 +3202,23 @@ function buildLink(deps) {
3197
3202
  "/sessions",
3198
3203
  (c) => tryRoute(c, () => {
3199
3204
  const count = deps.link.revokeAllSessions(customerId(c));
3200
- return { success: true, revoked: count };
3205
+ return {
3206
+ success: true,
3207
+ revoked_count: count,
3208
+ message: `Revoked ${count} sessions`
3209
+ };
3201
3210
  })
3202
3211
  );
3203
3212
  app.delete(
3204
3213
  "/sessions/:id",
3205
3214
  (c) => tryRoute(c, () => {
3206
- deps.link.revokeSession(customerId(c), c.req.param("id"));
3207
- return { success: true };
3215
+ const sessionId = c.req.param("id");
3216
+ deps.link.revokeSession(customerId(c), sessionId);
3217
+ return {
3218
+ success: true,
3219
+ session_id: sessionId,
3220
+ message: "Session revoked successfully"
3221
+ };
3208
3222
  })
3209
3223
  );
3210
3224
  return app;
@@ -5509,8 +5523,11 @@ function createLinkService({ clock, ids }) {
5509
5523
  email: seed.email ?? null,
5510
5524
  phone: seed.phone ?? null,
5511
5525
  name: seed.name ?? "Test User",
5526
+ delivery_address: null,
5512
5527
  created_at: now,
5513
- updated_at: now
5528
+ updated_at: now,
5529
+ metadata: null,
5530
+ account_id: customerId
5514
5531
  },
5515
5532
  addresses: /* @__PURE__ */ new Map(),
5516
5533
  mobileMoney: /* @__PURE__ */ new Map(),
@@ -5524,7 +5541,7 @@ function createLinkService({ clock, ids }) {
5524
5541
  created_at: now,
5525
5542
  last_used_at: now,
5526
5543
  device_type: "desktop",
5527
- ip: null,
5544
+ ip_address: null,
5528
5545
  user_agent: null,
5529
5546
  is_current: true
5530
5547
  });
@@ -5567,8 +5584,10 @@ function createLinkService({ clock, ids }) {
5567
5584
  return Boolean(s?.preferences.is_link_enabled);
5568
5585
  },
5569
5586
  checkStatus(contact) {
5587
+ const normalized = contact.trim();
5588
+ const emailContact = normalized.includes("@") ? normalized.toLowerCase() : normalized;
5570
5589
  for (const s of customers.values()) {
5571
- if (s.preferences.is_link_enabled && (s.customer.email === contact || s.customer.phone === contact)) {
5590
+ if (s.preferences.is_link_enabled && (s.customer.email?.toLowerCase() === emailContact || s.customer.phone === normalized)) {
5572
5591
  return true;
5573
5592
  }
5574
5593
  }
@@ -3090,16 +3090,21 @@ function buildLink(deps) {
3090
3090
  const body = await c.req.json().catch(() => ({}));
3091
3091
  return tryRoute(c, () => {
3092
3092
  const cid = customerId(c);
3093
- const prefs = deps.link.enroll(cid, body.business_id ?? deps.defaultBusinessId);
3093
+ const orderId = body.order_id ?? "";
3094
+ const businessId = body.business_id ?? deps.defaultBusinessId;
3095
+ const prefs = deps.link.enroll(cid, businessId);
3094
3096
  const address = body.address ? deps.link.createAddress(cid, body.address) : null;
3095
3097
  const mobile_money = body.mobile_money ? deps.link.createMobileMoney(cid, body.mobile_money) : null;
3096
3098
  return {
3097
3099
  success: true,
3098
3100
  customer_id: cid,
3099
- order_id: body.order_id,
3100
- preferences: prefs,
3101
- address,
3102
- mobile_money
3101
+ order_id: orderId,
3102
+ enrollment_result: {
3103
+ preferences: prefs,
3104
+ address,
3105
+ mobile_money
3106
+ },
3107
+ linked_at: deps.clock.iso()
3103
3108
  };
3104
3109
  });
3105
3110
  });
@@ -3199,14 +3204,23 @@ function buildLink(deps) {
3199
3204
  "/sessions",
3200
3205
  (c) => tryRoute(c, () => {
3201
3206
  const count = deps.link.revokeAllSessions(customerId(c));
3202
- return { success: true, revoked: count };
3207
+ return {
3208
+ success: true,
3209
+ revoked_count: count,
3210
+ message: `Revoked ${count} sessions`
3211
+ };
3203
3212
  })
3204
3213
  );
3205
3214
  app.delete(
3206
3215
  "/sessions/:id",
3207
3216
  (c) => tryRoute(c, () => {
3208
- deps.link.revokeSession(customerId(c), c.req.param("id"));
3209
- return { success: true };
3217
+ const sessionId = c.req.param("id");
3218
+ deps.link.revokeSession(customerId(c), sessionId);
3219
+ return {
3220
+ success: true,
3221
+ session_id: sessionId,
3222
+ message: "Session revoked successfully"
3223
+ };
3210
3224
  })
3211
3225
  );
3212
3226
  return app;
@@ -5511,8 +5525,11 @@ function createLinkService({ clock, ids }) {
5511
5525
  email: seed.email ?? null,
5512
5526
  phone: seed.phone ?? null,
5513
5527
  name: seed.name ?? "Test User",
5528
+ delivery_address: null,
5514
5529
  created_at: now,
5515
- updated_at: now
5530
+ updated_at: now,
5531
+ metadata: null,
5532
+ account_id: customerId
5516
5533
  },
5517
5534
  addresses: /* @__PURE__ */ new Map(),
5518
5535
  mobileMoney: /* @__PURE__ */ new Map(),
@@ -5526,7 +5543,7 @@ function createLinkService({ clock, ids }) {
5526
5543
  created_at: now,
5527
5544
  last_used_at: now,
5528
5545
  device_type: "desktop",
5529
- ip: null,
5546
+ ip_address: null,
5530
5547
  user_agent: null,
5531
5548
  is_current: true
5532
5549
  });
@@ -5569,8 +5586,10 @@ function createLinkService({ clock, ids }) {
5569
5586
  return Boolean(s?.preferences.is_link_enabled);
5570
5587
  },
5571
5588
  checkStatus(contact) {
5589
+ const normalized = contact.trim();
5590
+ const emailContact = normalized.includes("@") ? normalized.toLowerCase() : normalized;
5572
5591
  for (const s of customers.values()) {
5573
- if (s.preferences.is_link_enabled && (s.customer.email === contact || s.customer.phone === contact)) {
5592
+ if (s.preferences.is_link_enabled && (s.customer.email?.toLowerCase() === emailContact || s.customer.phone === normalized)) {
5574
5593
  return true;
5575
5594
  }
5576
5595
  }
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkBCWPRPK7_js = require('./chunk-BCWPRPK7.js');
3
+ var chunkCV5QMDQS_js = require('./chunk-CV5QMDQS.js');
4
4
  var chunkXA3ZNR75_js = require('./chunk-XA3ZNR75.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 chunkBCWPRPK7_js.safe(this.client.get("/api/v1/activity/state"));
32
+ return chunkCV5QMDQS_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 chunkBCWPRPK7_js.safe(this.client.get(path));
40
+ return chunkCV5QMDQS_js.safe(this.client.get(path));
41
41
  }
42
42
  async dismissMessage(code) {
43
- return chunkBCWPRPK7_js.safe(
43
+ return chunkCV5QMDQS_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 chunkBCWPRPK7_js.safe(this.client.get("/api/v1/subscriptions"));
65
+ return chunkCV5QMDQS_js.safe(this.client.get("/api/v1/subscriptions"));
66
66
  }
67
67
  async get(id) {
68
68
  const encodedId = encodeURIComponent(id);
69
- return chunkBCWPRPK7_js.safe(this.client.get(`/api/v1/subscriptions/${encodedId}`));
69
+ return chunkCV5QMDQS_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 ?? chunkBCWPRPK7_js.generateIdempotencyKey();
74
- return chunkBCWPRPK7_js.safe(
73
+ const idempotencyKey = opts?.idempotencyKey ?? chunkCV5QMDQS_js.generateIdempotencyKey();
74
+ return chunkCV5QMDQS_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 chunkBCWPRPK7_js.safe(
84
+ return chunkCV5QMDQS_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 chunkBCWPRPK7_js.safe(
90
+ return chunkCV5QMDQS_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 ?? chunkBCWPRPK7_js.generateIdempotencyKey();
97
- return chunkBCWPRPK7_js.safe(
96
+ const idempotencyKey = opts?.idempotencyKey ?? chunkCV5QMDQS_js.generateIdempotencyKey();
97
+ return chunkCV5QMDQS_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 ?? chunkBCWPRPK7_js.generateIdempotencyKey();
114
- return chunkBCWPRPK7_js.safe(
113
+ const idempotencyKey = opts?.idempotencyKey ?? chunkCV5QMDQS_js.generateIdempotencyKey();
114
+ return chunkCV5QMDQS_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 chunkBCWPRPK7_js.safe(
127
+ return chunkCV5QMDQS_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 chunkBCWPRPK7_js.safe(
173
+ return chunkCV5QMDQS_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 chunkBCWPRPK7_js.safe(
181
+ return chunkCV5QMDQS_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 chunkBCWPRPK7_js.safe(
200
+ return chunkCV5QMDQS_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 ?? chunkBCWPRPK7_js.generateIdempotencyKey();
214
- return chunkBCWPRPK7_js.safe(
213
+ const idempotencyKey = opts?.idempotencyKey ?? chunkCV5QMDQS_js.generateIdempotencyKey();
214
+ return chunkCV5QMDQS_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 ?? chunkBCWPRPK7_js.generateIdempotencyKey();
223
- return chunkBCWPRPK7_js.safe(
222
+ const idempotencyKey = opts?.idempotencyKey ?? chunkCV5QMDQS_js.generateIdempotencyKey();
223
+ return chunkCV5QMDQS_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 chunkBCWPRPK7_js.safe(this.client.get(path));
238
+ return chunkCV5QMDQS_js.safe(this.client.get(path));
239
239
  }
240
240
  };
241
241
 
@@ -814,25 +814,25 @@ var CimplifyClient = class {
814
814
  }
815
815
  get catalogue() {
816
816
  if (!this._catalogue) {
817
- this._catalogue = new chunkBCWPRPK7_js.CatalogueQueries(this);
817
+ this._catalogue = new chunkCV5QMDQS_js.CatalogueQueries(this);
818
818
  }
819
819
  return this._catalogue;
820
820
  }
821
821
  get cart() {
822
822
  if (!this._cart) {
823
- this._cart = new chunkBCWPRPK7_js.CartOperations(this);
823
+ this._cart = new chunkCV5QMDQS_js.CartOperations(this);
824
824
  }
825
825
  return this._cart;
826
826
  }
827
827
  get checkout() {
828
828
  if (!this._checkout) {
829
- this._checkout = new chunkBCWPRPK7_js.CheckoutService(this);
829
+ this._checkout = new chunkCV5QMDQS_js.CheckoutService(this);
830
830
  }
831
831
  return this._checkout;
832
832
  }
833
833
  get orders() {
834
834
  if (!this._orders) {
835
- this._orders = new chunkBCWPRPK7_js.OrderQueries(this);
835
+ this._orders = new chunkCV5QMDQS_js.OrderQueries(this);
836
836
  }
837
837
  return this._orders;
838
838
  }
@@ -856,43 +856,43 @@ var CimplifyClient = class {
856
856
  }
857
857
  get link() {
858
858
  if (!this._link) {
859
- this._link = new chunkBCWPRPK7_js.LinkService(this);
859
+ this._link = new chunkCV5QMDQS_js.LinkService(this);
860
860
  }
861
861
  return this._link;
862
862
  }
863
863
  get auth() {
864
864
  if (!this._auth) {
865
- this._auth = new chunkBCWPRPK7_js.AuthService(this);
865
+ this._auth = new chunkCV5QMDQS_js.AuthService(this);
866
866
  }
867
867
  return this._auth;
868
868
  }
869
869
  get business() {
870
870
  if (!this._business) {
871
- this._business = new chunkBCWPRPK7_js.BusinessService(this);
871
+ this._business = new chunkCV5QMDQS_js.BusinessService(this);
872
872
  }
873
873
  return this._business;
874
874
  }
875
875
  get inventory() {
876
876
  if (!this._inventory) {
877
- this._inventory = new chunkBCWPRPK7_js.InventoryService(this);
877
+ this._inventory = new chunkCV5QMDQS_js.InventoryService(this);
878
878
  }
879
879
  return this._inventory;
880
880
  }
881
881
  get scheduling() {
882
882
  if (!this._scheduling) {
883
- this._scheduling = new chunkBCWPRPK7_js.SchedulingService(this);
883
+ this._scheduling = new chunkCV5QMDQS_js.SchedulingService(this);
884
884
  }
885
885
  return this._scheduling;
886
886
  }
887
887
  get lite() {
888
888
  if (!this._lite) {
889
- this._lite = new chunkBCWPRPK7_js.LiteService(this);
889
+ this._lite = new chunkCV5QMDQS_js.LiteService(this);
890
890
  }
891
891
  return this._lite;
892
892
  }
893
893
  get fx() {
894
894
  if (!this._fx) {
895
- this._fx = new chunkBCWPRPK7_js.FxService(this);
895
+ this._fx = new chunkCV5QMDQS_js.FxService(this);
896
896
  }
897
897
  return this._fx;
898
898
  }
@@ -927,7 +927,7 @@ var CimplifyClient = class {
927
927
  if (businessId) {
928
928
  this.setBusinessId(businessId);
929
929
  }
930
- return chunkBCWPRPK7_js.createElements(this, businessId ?? this.businessId ?? void 0, options);
930
+ return chunkCV5QMDQS_js.createElements(this, businessId ?? this.businessId ?? void 0, options);
931
931
  }
932
932
  };
933
933
  function createCimplifyClient(config = {}) {
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var chunkI4MP2XZS_js = require('./chunk-I4MP2XZS.js');
4
- var chunkQZQEGRGB_js = require('./chunk-QZQEGRGB.js');
3
+ var chunkOGQFDCZM_js = require('./chunk-OGQFDCZM.js');
4
+ var chunkQS4XDVHI_js = require('./chunk-QS4XDVHI.js');
5
5
  var zod = require('zod');
6
6
 
7
7
  var cimplifyRegistry = zod.z.registry();
@@ -595,7 +595,7 @@ async function toForwardedRequest(input, init) {
595
595
  };
596
596
  }
597
597
  function createTestClient(options = {}) {
598
- const mock = chunkI4MP2XZS_js.createMockApp(options);
598
+ const mock = chunkOGQFDCZM_js.createMockApp(options);
599
599
  let sessionToken;
600
600
  const fetchImpl = async (input, init) => {
601
601
  const url = typeof input === "string" ? input : input instanceof URL ? input.toString() : input.url;
@@ -614,7 +614,7 @@ function createTestClient(options = {}) {
614
614
  if (echoed) sessionToken = echoed;
615
615
  return res;
616
616
  };
617
- const client = chunkQZQEGRGB_js.createCimplifyClient({
617
+ const client = chunkQS4XDVHI_js.createCimplifyClient({
618
618
  baseUrl: TEST_BASE_URL,
619
619
  // Link mock lives at /v1/link on the same Hono app, so point the SDK's
620
620
  // separate Link transport at the same TEST_BASE_URL.
@@ -1,5 +1,5 @@
1
- import { ad as CimplifyClient } from './client-DjQhg6yr.js';
2
- import { A as AppHandle, C as CreateAppOptions } from './server-BQzz921M.js';
1
+ import { ad as CimplifyClient } from './client-D6CZ2Ggp.js';
2
+ import { A as AppHandle, C as CreateAppOptions } from './server-DMvQp27Z.js';
3
3
 
4
4
  /**
5
5
  * Test client + fixtures.
@@ -787,6 +787,7 @@ declare const DEVICE_TYPE: {
787
787
  readonly MOBILE: "mobile";
788
788
  readonly DESKTOP: "desktop";
789
789
  readonly TABLET: "tablet";
790
+ readonly UNKNOWN: "unknown";
790
791
  };
791
792
  declare const CONTACT_TYPE: {
792
793
  readonly PHONE: "phone";
@@ -843,7 +844,8 @@ interface Customer {
843
844
  delivery_address: string | null;
844
845
  created_at: string;
845
846
  updated_at: string;
846
- metadata?: Record<string, unknown>;
847
+ metadata?: Record<string, unknown> | null;
848
+ account_id?: string | null;
847
849
  }
848
850
  interface CustomerAddress {
849
851
  id: string;
@@ -869,7 +871,7 @@ interface CustomerMobileMoney {
869
871
  id: string;
870
872
  customer_id: string;
871
873
  phone_number: string;
872
- provider: MobileMoneyProvider;
874
+ provider: string;
873
875
  label: string;
874
876
  is_verified: boolean | null;
875
877
  verification_date: string | null;
@@ -1376,11 +1378,11 @@ interface SuccessResult {
1376
1378
  * - Updates use `POST /resource/:id` with a partial body (not PUT/PATCH).
1377
1379
  * Both create and update share the same verb; payload completeness
1378
1380
  * distinguishes them. This matches the production Rust handlers.
1379
- * - Mobile-money `provider` is a plain string. Canonical values are
1380
- * `"mtn"`, `"vodafone"`, `"airtel"` (defined in
1381
- * {@link MobileMoneyProvider}). The backend's
1382
- * `normalize_mobile_money_provider` accepts case/spelling variations
1383
- * and maps them to one of the three canonical values.
1381
+ * - Mobile-money `provider` is a plain string. User-facing provider
1382
+ * values include `"mtn"`, `"vodafone"`, `"telecel"`, `"airtel"`,
1383
+ * `"airteltigo"`, and `"mpesa"` (defined in {@link MobileMoneyProvider}).
1384
+ * The backend's `normalize_mobile_money_provider` accepts legacy
1385
+ * spellings and maps them to provider-specific processor codes.
1384
1386
  * - Address inputs use the wire shape (`street_address` / `apartment` /
1385
1387
  * `region`) — same field names you read off the response. There is no
1386
1388
  * translation layer.