@cimplify/sdk 0.86.0 → 0.88.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 (62) hide show
  1. package/dist/advanced.d.mts +3 -3
  2. package/dist/advanced.d.ts +3 -3
  3. package/dist/advanced.js +20 -20
  4. package/dist/advanced.mjs +1 -1
  5. package/dist/{chunk-ESGKWRQS.js → chunk-6JA4HBBD.js} +4 -4
  6. package/dist/{chunk-MRL53WP6.mjs → chunk-A7NODD4Q.mjs} +12 -1
  7. package/dist/{chunk-D6JWYYTG.mjs → chunk-APBLFZ2I.mjs} +3 -3
  8. package/dist/{chunk-VUG4HTUM.js → chunk-GHFDYM5K.js} +113 -5
  9. package/dist/{chunk-E6T5VJMG.mjs → chunk-OZDDHSIB.mjs} +9 -1
  10. package/dist/{chunk-X4UNISYG.js → chunk-ROBTTS3Q.js} +3 -3
  11. package/dist/{chunk-IQLJJW2H.js → chunk-T7Z25EY4.js} +9 -0
  12. package/dist/{chunk-A2GXDCSI.mjs → chunk-VU5LFNEX.mjs} +2 -2
  13. package/dist/{chunk-HJEKXCG2.js → chunk-W5BVGAO6.js} +48 -37
  14. package/dist/{chunk-NN3WC7XZ.mjs → chunk-ZU4ZRYUR.mjs} +113 -5
  15. package/dist/{client-DowGNrTh.d.mts → client-B-8ceVyt.d.mts} +2 -2
  16. package/dist/{client-CMJO_8zo.d.ts → client-B3FBDfTg.d.ts} +2 -2
  17. package/dist/{client-BQSRj4iK.d.mts → client-D0PrO1-Q.d.ts} +29 -8
  18. package/dist/{client-BdI24jUT.d.ts → client-r5VSGFRU.d.mts} +29 -8
  19. package/dist/{index-BRwHpMY-.d.ts → index-C-Pxrzna.d.ts} +3 -3
  20. package/dist/{index-DLb_Ldl6.d.mts → index-DLulxmF1.d.mts} +3 -3
  21. package/dist/index.d.mts +6 -6
  22. package/dist/index.d.ts +6 -6
  23. package/dist/index.js +85 -81
  24. package/dist/index.mjs +4 -4
  25. package/dist/mock/cli.mjs +3 -3
  26. package/dist/mock/library.js +3 -3
  27. package/dist/mock/library.mjs +3 -3
  28. package/dist/mock/msw.js +3 -3
  29. package/dist/mock/msw.mjs +3 -3
  30. package/dist/{payment-BA7KNBxg.d.ts → payment-Cfoo9MT7.d.ts} +1 -1
  31. package/dist/{payment-CFev-fOE.d.mts → payment-TnJUoHqL.d.mts} +1 -1
  32. package/dist/{price-BNhGVB5q.d.ts → price-CCDSrIsc.d.ts} +1 -1
  33. package/dist/{price-nRxqVNGq.d.mts → price-CM0zVSyM.d.mts} +1 -1
  34. package/dist/{product-BGxIfTqJ.d.mts → product-DoA36Eqh.d.mts} +65 -4
  35. package/dist/{product-BGxIfTqJ.d.ts → product-DoA36Eqh.d.ts} +65 -4
  36. package/dist/react.d.mts +22 -5
  37. package/dist/react.d.ts +22 -5
  38. package/dist/react.js +101 -63
  39. package/dist/react.mjs +40 -5
  40. package/dist/{server-BH7DTaaz.d.ts → server-CHfYeTAa.d.ts} +2 -2
  41. package/dist/{server-9u0LiG5U.d.mts → server-CI1CUFVu.d.mts} +2 -2
  42. package/dist/server.d.mts +4 -4
  43. package/dist/server.d.ts +4 -4
  44. package/dist/server.js +7 -7
  45. package/dist/server.mjs +2 -2
  46. package/dist/styles.css +1 -1
  47. package/dist/testing/msw.d.mts +2 -2
  48. package/dist/testing/msw.d.ts +2 -2
  49. package/dist/testing/msw.js +2 -2
  50. package/dist/testing/msw.mjs +1 -1
  51. package/dist/testing/suite.d.mts +6 -6
  52. package/dist/testing/suite.d.ts +6 -6
  53. package/dist/testing/suite.js +23 -23
  54. package/dist/testing/suite.mjs +4 -4
  55. package/dist/testing.d.mts +5 -5
  56. package/dist/testing.d.ts +5 -5
  57. package/dist/testing.js +79 -79
  58. package/dist/testing.mjs +5 -5
  59. package/dist/utils.d.mts +4 -4
  60. package/dist/utils.d.ts +4 -4
  61. package/package.json +1 -1
  62. package/registry/product-card.json +1 -1
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkVUG4HTUM_js = require('./chunk-VUG4HTUM.js');
3
+ var chunkGHFDYM5K_js = require('./chunk-GHFDYM5K.js');
4
4
  var chunkAETVRBKI_js = require('./chunk-AETVRBKI.js');
5
5
 
6
6
  // src/store-credit.ts
@@ -13,7 +13,7 @@ var StoreCreditQueries = class {
13
13
  * currency. Requires a signed-in customer; returns an error otherwise.
14
14
  */
15
15
  async balance() {
16
- return chunkVUG4HTUM_js.safe(this.client.get("/api/v1/store-credit/balance"));
16
+ return chunkGHFDYM5K_js.safe(this.client.get("/api/v1/store-credit/balance"));
17
17
  }
18
18
  };
19
19
 
@@ -95,7 +95,7 @@ var ActivityService = class {
95
95
  this.sendEvents([event]);
96
96
  }
97
97
  async getState() {
98
- return chunkVUG4HTUM_js.safe(this.client.get("/api/v1/activity/state"));
98
+ return chunkGHFDYM5K_js.safe(this.client.get("/api/v1/activity/state"));
99
99
  }
100
100
  async getRecommendations(options) {
101
101
  const params = new URLSearchParams();
@@ -103,10 +103,10 @@ var ActivityService = class {
103
103
  if (options?.limit) params.set("limit", String(options.limit));
104
104
  const query = params.toString();
105
105
  const path = query ? `/api/v1/activity/recommendations?${query}` : "/api/v1/activity/recommendations";
106
- return chunkVUG4HTUM_js.safe(this.client.get(path));
106
+ return chunkGHFDYM5K_js.safe(this.client.get(path));
107
107
  }
108
108
  async dismissMessage(code) {
109
- return chunkVUG4HTUM_js.safe(
109
+ return chunkGHFDYM5K_js.safe(
110
110
  this.client.post("/api/v1/activity/messages/dismiss", { code })
111
111
  );
112
112
  }
@@ -142,16 +142,16 @@ var SubscriptionService = class {
142
142
  this.client = client;
143
143
  }
144
144
  async list() {
145
- return chunkVUG4HTUM_js.safe(this.client.get("/api/v1/subscriptions"));
145
+ return chunkGHFDYM5K_js.safe(this.client.get("/api/v1/subscriptions"));
146
146
  }
147
147
  async get(id) {
148
148
  const encodedId = encodeURIComponent(id);
149
- return chunkVUG4HTUM_js.safe(this.client.get(`/api/v1/subscriptions/${encodedId}`));
149
+ return chunkGHFDYM5K_js.safe(this.client.get(`/api/v1/subscriptions/${encodedId}`));
150
150
  }
151
151
  async cancel(id, reason, opts) {
152
152
  const encodedId = encodeURIComponent(id);
153
- const idempotencyKey = opts?.idempotencyKey ?? chunkVUG4HTUM_js.generateIdempotencyKey();
154
- return chunkVUG4HTUM_js.safe(
153
+ const idempotencyKey = opts?.idempotencyKey ?? chunkGHFDYM5K_js.generateIdempotencyKey();
154
+ return chunkGHFDYM5K_js.safe(
155
155
  this.client.post(
156
156
  `/api/v1/subscriptions/${encodedId}/cancel`,
157
157
  { reason },
@@ -161,20 +161,20 @@ var SubscriptionService = class {
161
161
  }
162
162
  async pause(id) {
163
163
  const encodedId = encodeURIComponent(id);
164
- return chunkVUG4HTUM_js.safe(
164
+ return chunkGHFDYM5K_js.safe(
165
165
  this.client.post(`/api/v1/subscriptions/${encodedId}/pause`)
166
166
  );
167
167
  }
168
168
  async resume(id) {
169
169
  const encodedId = encodeURIComponent(id);
170
- return chunkVUG4HTUM_js.safe(
170
+ return chunkGHFDYM5K_js.safe(
171
171
  this.client.post(`/api/v1/subscriptions/${encodedId}/resume`)
172
172
  );
173
173
  }
174
174
  async skipNextRenewal(id, opts) {
175
175
  const encodedId = encodeURIComponent(id);
176
- const idempotencyKey = opts?.idempotencyKey ?? chunkVUG4HTUM_js.generateIdempotencyKey();
177
- return chunkVUG4HTUM_js.safe(
176
+ const idempotencyKey = opts?.idempotencyKey ?? chunkGHFDYM5K_js.generateIdempotencyKey();
177
+ return chunkGHFDYM5K_js.safe(
178
178
  this.client.post(
179
179
  `/api/v1/subscriptions/${encodedId}/skip`,
180
180
  void 0,
@@ -190,8 +190,8 @@ var UploadService = class {
190
190
  this.client = client;
191
191
  }
192
192
  async init(filename, contentType, sizeBytes, opts) {
193
- const idempotencyKey = opts?.idempotencyKey ?? chunkVUG4HTUM_js.generateIdempotencyKey();
194
- return chunkVUG4HTUM_js.safe(
193
+ const idempotencyKey = opts?.idempotencyKey ?? chunkGHFDYM5K_js.generateIdempotencyKey();
194
+ return chunkGHFDYM5K_js.safe(
195
195
  this.client.post(
196
196
  "/api/v1/uploads/init",
197
197
  {
@@ -204,7 +204,7 @@ var UploadService = class {
204
204
  );
205
205
  }
206
206
  async confirm(uploadId) {
207
- return chunkVUG4HTUM_js.safe(
207
+ return chunkGHFDYM5K_js.safe(
208
208
  this.client.post("/api/v1/uploads/confirm", {
209
209
  upload_id: uploadId
210
210
  })
@@ -250,7 +250,7 @@ var PlacesService = class {
250
250
  this.client = client;
251
251
  }
252
252
  async autocomplete(input, sessionToken) {
253
- return chunkVUG4HTUM_js.safe(
253
+ return chunkGHFDYM5K_js.safe(
254
254
  this.client.post("/api/v1/places/autocomplete", {
255
255
  input,
256
256
  sessionToken
@@ -258,7 +258,7 @@ var PlacesService = class {
258
258
  );
259
259
  }
260
260
  async details(placeId, sessionToken) {
261
- return chunkVUG4HTUM_js.safe(
261
+ return chunkGHFDYM5K_js.safe(
262
262
  this.client.post("/api/v1/places/details", {
263
263
  place_id: placeId,
264
264
  sessionToken
@@ -277,7 +277,7 @@ var DeliveryService = class {
277
277
  params.set("dropoff_lat", String(dropoffLat));
278
278
  params.set("dropoff_lng", String(dropoffLng));
279
279
  if (country) params.set("country", country);
280
- return chunkVUG4HTUM_js.safe(
280
+ return chunkGHFDYM5K_js.safe(
281
281
  this.client.get(`/api/v1/delivery/fee?${params.toString()}`)
282
282
  );
283
283
  }
@@ -289,7 +289,7 @@ var DeliveryService = class {
289
289
  params.set("dropoff_lng", String(dropoffLng));
290
290
  if (opts?.country) params.set("country", opts.country);
291
291
  if (opts?.orderValue != null) params.set("order_value", String(opts.orderValue));
292
- return chunkVUG4HTUM_js.safe(
292
+ return chunkGHFDYM5K_js.safe(
293
293
  this.client.get(`/api/v1/delivery/options?${params.toString()}`)
294
294
  );
295
295
  }
@@ -302,8 +302,8 @@ var SupportService = class {
302
302
  }
303
303
  /** Open (or resume) the customer's widget conversation. */
304
304
  async openConversation(opts) {
305
- const idempotencyKey = opts?.idempotencyKey ?? chunkVUG4HTUM_js.generateIdempotencyKey();
306
- return chunkVUG4HTUM_js.safe(
305
+ const idempotencyKey = opts?.idempotencyKey ?? chunkGHFDYM5K_js.generateIdempotencyKey();
306
+ return chunkGHFDYM5K_js.safe(
307
307
  this.client.post("/api/v1/support/conversation", void 0, {
308
308
  idempotencyKey
309
309
  })
@@ -311,8 +311,8 @@ var SupportService = class {
311
311
  }
312
312
  /** Send a message in the active conversation. */
313
313
  async sendMessage(content, opts) {
314
- const idempotencyKey = opts?.idempotencyKey ?? chunkVUG4HTUM_js.generateIdempotencyKey();
315
- return chunkVUG4HTUM_js.safe(
314
+ const idempotencyKey = opts?.idempotencyKey ?? chunkGHFDYM5K_js.generateIdempotencyKey();
315
+ return chunkGHFDYM5K_js.safe(
316
316
  this.client.post(
317
317
  "/api/v1/support/conversation/messages",
318
318
  { content },
@@ -327,7 +327,7 @@ var SupportService = class {
327
327
  if (options.limit) params.set("limit", String(options.limit));
328
328
  const query = params.toString();
329
329
  const path = query ? `/api/v1/support/conversation/messages?${query}` : "/api/v1/support/conversation/messages";
330
- return chunkVUG4HTUM_js.safe(this.client.get(path));
330
+ return chunkGHFDYM5K_js.safe(this.client.get(path));
331
331
  }
332
332
  };
333
333
 
@@ -602,6 +602,17 @@ var CimplifyClient = class {
602
602
  }
603
603
  this.businessId = normalized;
604
604
  }
605
+ // Set the storefront public key after construction. Needed by hosts that
606
+ // create the client before they know the key (e.g. the Link element, which
607
+ // receives it in its INIT message) — without it, storefront calls carry no
608
+ // X-API-Key and the business can't be resolved.
609
+ setPublicKey(publicKey) {
610
+ const normalized = publicKey.trim();
611
+ if (!normalized) {
612
+ return;
613
+ }
614
+ this.publicKey = normalized;
615
+ }
605
616
  getBusinessId() {
606
617
  return this.businessId;
607
618
  }
@@ -922,25 +933,25 @@ var CimplifyClient = class {
922
933
  }
923
934
  get catalogue() {
924
935
  if (!this._catalogue) {
925
- this._catalogue = new chunkVUG4HTUM_js.CatalogueQueries(this);
936
+ this._catalogue = new chunkGHFDYM5K_js.CatalogueQueries(this);
926
937
  }
927
938
  return this._catalogue;
928
939
  }
929
940
  get cart() {
930
941
  if (!this._cart) {
931
- this._cart = new chunkVUG4HTUM_js.CartOperations(this);
942
+ this._cart = new chunkGHFDYM5K_js.CartOperations(this);
932
943
  }
933
944
  return this._cart;
934
945
  }
935
946
  get checkout() {
936
947
  if (!this._checkout) {
937
- this._checkout = new chunkVUG4HTUM_js.CheckoutService(this);
948
+ this._checkout = new chunkGHFDYM5K_js.CheckoutService(this);
938
949
  }
939
950
  return this._checkout;
940
951
  }
941
952
  get orders() {
942
953
  if (!this._orders) {
943
- this._orders = new chunkVUG4HTUM_js.OrderQueries(this);
954
+ this._orders = new chunkGHFDYM5K_js.OrderQueries(this);
944
955
  }
945
956
  return this._orders;
946
957
  }
@@ -970,43 +981,43 @@ var CimplifyClient = class {
970
981
  }
971
982
  get link() {
972
983
  if (!this._link) {
973
- this._link = new chunkVUG4HTUM_js.LinkService(this);
984
+ this._link = new chunkGHFDYM5K_js.LinkService(this);
974
985
  }
975
986
  return this._link;
976
987
  }
977
988
  get auth() {
978
989
  if (!this._auth) {
979
- this._auth = new chunkVUG4HTUM_js.AuthService(this);
990
+ this._auth = new chunkGHFDYM5K_js.AuthService(this);
980
991
  }
981
992
  return this._auth;
982
993
  }
983
994
  get business() {
984
995
  if (!this._business) {
985
- this._business = new chunkVUG4HTUM_js.BusinessService(this);
996
+ this._business = new chunkGHFDYM5K_js.BusinessService(this);
986
997
  }
987
998
  return this._business;
988
999
  }
989
1000
  get inventory() {
990
1001
  if (!this._inventory) {
991
- this._inventory = new chunkVUG4HTUM_js.InventoryService(this);
1002
+ this._inventory = new chunkGHFDYM5K_js.InventoryService(this);
992
1003
  }
993
1004
  return this._inventory;
994
1005
  }
995
1006
  get scheduling() {
996
1007
  if (!this._scheduling) {
997
- this._scheduling = new chunkVUG4HTUM_js.SchedulingService(this);
1008
+ this._scheduling = new chunkGHFDYM5K_js.SchedulingService(this);
998
1009
  }
999
1010
  return this._scheduling;
1000
1011
  }
1001
1012
  get lite() {
1002
1013
  if (!this._lite) {
1003
- this._lite = new chunkVUG4HTUM_js.LiteService(this);
1014
+ this._lite = new chunkGHFDYM5K_js.LiteService(this);
1004
1015
  }
1005
1016
  return this._lite;
1006
1017
  }
1007
1018
  get fx() {
1008
1019
  if (!this._fx) {
1009
- this._fx = new chunkVUG4HTUM_js.FxService(this);
1020
+ this._fx = new chunkGHFDYM5K_js.FxService(this);
1010
1021
  }
1011
1022
  return this._fx;
1012
1023
  }
@@ -1041,7 +1052,7 @@ var CimplifyClient = class {
1041
1052
  if (businessId) {
1042
1053
  this.setBusinessId(businessId);
1043
1054
  }
1044
- return chunkVUG4HTUM_js.createElements(this, businessId ?? this.businessId ?? void 0, options);
1055
+ return chunkGHFDYM5K_js.createElements(this, businessId ?? this.businessId ?? void 0, options);
1045
1056
  }
1046
1057
  };
1047
1058
  function createCimplifyClient(config = {}) {
@@ -1551,15 +1551,43 @@ function toTerminalFailure(code, message, recoverable) {
1551
1551
  }
1552
1552
  };
1553
1553
  }
1554
+ function isValidCustomerName(name) {
1555
+ const trimmed = (name ?? "").trim();
1556
+ return trimmed.length >= 2 && /\p{L}/u.test(trimmed);
1557
+ }
1558
+ function isOfflinePaymentMethod(method) {
1559
+ return method === "cash" || method === "offline";
1560
+ }
1554
1561
  var CheckoutService = class {
1555
1562
  constructor(client) {
1556
1563
  this.client = client;
1557
1564
  }
1565
+ validateCheckoutData(data) {
1566
+ if (isOfflinePaymentMethod(data.payment_method)) {
1567
+ return new CimplifyError(
1568
+ "INVALID_PAYMENT_METHOD",
1569
+ "Offline payment isn't available for online checkout. Please pay by card or mobile money.",
1570
+ false
1571
+ );
1572
+ }
1573
+ if (!isValidCustomerName(data.customer?.name)) {
1574
+ return new CimplifyError(
1575
+ "INVALID_CUSTOMER_NAME",
1576
+ "Enter your name, not a phone number.",
1577
+ false
1578
+ );
1579
+ }
1580
+ return null;
1581
+ }
1558
1582
  orderTokenParam(orderId) {
1559
1583
  const token = this.client.getOrderToken(orderId);
1560
1584
  return token ? `?token=${encodeURIComponent(token)}` : "";
1561
1585
  }
1562
1586
  async process(data) {
1587
+ const invalid = this.validateCheckoutData(data);
1588
+ if (invalid) {
1589
+ return err(invalid);
1590
+ }
1563
1591
  const checkoutData = {
1564
1592
  ...data,
1565
1593
  idempotency_key: data.idempotency_key || generateIdempotencyKey()
@@ -2220,9 +2248,9 @@ var LiteService = class {
2220
2248
  async getBootstrap() {
2221
2249
  return safe(this.client.get("/api/v1/lite/bootstrap"));
2222
2250
  }
2223
- async getTable(tableId) {
2224
- const encodedId = encodeURIComponent(tableId);
2225
- return safe(this.client.get(`/api/v1/lite/tables/${encodedId}`));
2251
+ async getResource(resourceId) {
2252
+ const encodedId = encodeURIComponent(resourceId);
2253
+ return safe(this.client.get(`/api/v1/lite/resources/${encodedId}`));
2226
2254
  }
2227
2255
  async getMenu() {
2228
2256
  return safe(this.client.get("/api/v1/lite/menu"));
@@ -2276,6 +2304,7 @@ var MESSAGE_TYPES = {
2276
2304
  PAYMENT_METHOD_SELECTED: "payment_method_selected",
2277
2305
  LOGOUT_COMPLETE: "logout_complete",
2278
2306
  AUTH_REQUESTED: "auth_requested",
2307
+ SESSION_ESTABLISHED: "session_established",
2279
2308
  CONTACT_PROVIDED: "contact_provided",
2280
2309
  CHECKOUT_STATUS: "checkout_status",
2281
2310
  CHECKOUT_COMPLETE: "checkout_complete",
@@ -2770,6 +2799,7 @@ var CimplifyElements = class {
2770
2799
  if (typeof window !== "undefined") {
2771
2800
  window.addEventListener("message", this.boundHandleMessage);
2772
2801
  }
2802
+ void this.restoreSession();
2773
2803
  }
2774
2804
  debug(...args) {
2775
2805
  if (this.client.isTestMode()) {
@@ -3059,6 +3089,56 @@ var CimplifyElements = class {
3059
3089
  }
3060
3090
  return null;
3061
3091
  }
3092
+ // Refresh token kept first-party (keyed by public key) so a signed-in shopper
3093
+ // survives reloads. Standard SPA tradeoff; far safer than the third-party
3094
+ // iframe, whose storage/cookies are partitioned or blocked.
3095
+ sessionStorageKey() {
3096
+ const key = this.client.getPublicKey().trim();
3097
+ return key ? `cimplify.link.rt.${key}` : null;
3098
+ }
3099
+ persistRefreshToken(refreshToken) {
3100
+ if (typeof window === "undefined") return;
3101
+ const storageKey = this.sessionStorageKey();
3102
+ if (!storageKey) return;
3103
+ try {
3104
+ if (refreshToken) {
3105
+ window.localStorage.setItem(storageKey, refreshToken);
3106
+ } else {
3107
+ window.localStorage.removeItem(storageKey);
3108
+ }
3109
+ } catch {
3110
+ }
3111
+ }
3112
+ clearPersistedSession() {
3113
+ if (typeof window === "undefined") return;
3114
+ const storageKey = this.sessionStorageKey();
3115
+ if (!storageKey) return;
3116
+ try {
3117
+ window.localStorage.removeItem(storageKey);
3118
+ } catch {
3119
+ }
3120
+ }
3121
+ async restoreSession() {
3122
+ if (typeof window === "undefined" || this.accessToken) return;
3123
+ const storageKey = this.sessionStorageKey();
3124
+ if (!storageKey) return;
3125
+ let refreshToken = null;
3126
+ try {
3127
+ refreshToken = window.localStorage.getItem(storageKey);
3128
+ } catch {
3129
+ return;
3130
+ }
3131
+ if (!refreshToken) return;
3132
+ const result = await this.client.link.refreshSession(refreshToken);
3133
+ if (!result.ok || !result.value.session_token) {
3134
+ this.clearPersistedSession();
3135
+ return;
3136
+ }
3137
+ this.persistRefreshToken(result.value.refresh_token ?? void 0);
3138
+ const data = await this.applyAccessToken(result.value.session_token);
3139
+ this.broadcastAccessToken(result.value.session_token);
3140
+ this.elements.forEach((element) => element._emitAuthenticated(data));
3141
+ }
3062
3142
  async applyAccessToken(token) {
3063
3143
  this.accessToken = token;
3064
3144
  this.accountId = decodeJwtSub(token);
@@ -3141,6 +3221,13 @@ var CimplifyElements = class {
3141
3221
  case MESSAGE_TYPES.AUTH_REQUESTED:
3142
3222
  this.startEmbeddedAuth(sourceElement, message);
3143
3223
  break;
3224
+ case MESSAGE_TYPES.SESSION_ESTABLISHED:
3225
+ this.persistRefreshToken(message.refreshToken);
3226
+ void this.applyAccessToken(message.accessToken).then((data) => {
3227
+ this.broadcastAccessToken(message.accessToken);
3228
+ sourceElement._emitAuthenticated(data);
3229
+ });
3230
+ break;
3144
3231
  case MESSAGE_TYPES.ADDRESS_CHANGED:
3145
3232
  case MESSAGE_TYPES.ADDRESS_SELECTED:
3146
3233
  this.addressData = message.address;
@@ -3168,6 +3255,7 @@ var CimplifyElements = class {
3168
3255
  this.customerData = null;
3169
3256
  this.addressData = null;
3170
3257
  this.paymentData = null;
3258
+ this.clearPersistedSession();
3171
3259
  this.client.clearSession();
3172
3260
  break;
3173
3261
  }
@@ -3199,6 +3287,7 @@ var CimplifyElement = class {
3199
3287
  this.pendingInit = null;
3200
3288
  this.eventHandlers = /* @__PURE__ */ new Map();
3201
3289
  this.resolvers = /* @__PURE__ */ new Map();
3290
+ this.lastReportedHeight = 0;
3202
3291
  this.listening = false;
3203
3292
  this.type = type;
3204
3293
  this.businessId = businessId;
@@ -3207,11 +3296,29 @@ var CimplifyElement = class {
3207
3296
  this.parent = parent;
3208
3297
  this.nonce = generateNonce();
3209
3298
  this.boundHandleMessage = this.handleMessage.bind(this);
3299
+ this.boundHandleResize = () => this.applyHeight();
3210
3300
  if (typeof window !== "undefined") {
3211
3301
  window.addEventListener("message", this.boundHandleMessage);
3302
+ window.addEventListener("resize", this.boundHandleResize);
3212
3303
  this.listening = true;
3213
3304
  }
3214
3305
  }
3306
+ /**
3307
+ * Size the iframe to the element's reported content height (in pixels). We do
3308
+ * NOT cap checkout at the viewport: capping forced a tall checkout to scroll
3309
+ * *inside* a viewport-height iframe — a nested scroll-within-scroll. Sizing to
3310
+ * content lets the iframe grow and the host page scroll naturally as one
3311
+ * surface, which is the standard embedded-checkout behaviour.
3312
+ */
3313
+ applyHeight(reportedHeight) {
3314
+ if (!this.iframe) return;
3315
+ if (typeof reportedHeight === "number" && reportedHeight > 0) {
3316
+ this.lastReportedHeight = reportedHeight;
3317
+ }
3318
+ const content = this.lastReportedHeight;
3319
+ if (!content) return;
3320
+ this.iframe.style.height = `${Math.max(320, content)}px`;
3321
+ }
3215
3322
  mount(container) {
3216
3323
  if (this.mounted) {
3217
3324
  console.warn(`Element ${this.type} is already mounted`);
@@ -3244,6 +3351,7 @@ var CimplifyElement = class {
3244
3351
  this.resolvers.clear();
3245
3352
  if (this.listening && typeof window !== "undefined") {
3246
3353
  window.removeEventListener("message", this.boundHandleMessage);
3354
+ window.removeEventListener("resize", this.boundHandleResize);
3247
3355
  this.listening = false;
3248
3356
  }
3249
3357
  this.parent._removeElement(this.type, this);
@@ -3369,7 +3477,7 @@ var CimplifyElement = class {
3369
3477
  switch (message.type) {
3370
3478
  case MESSAGE_TYPES.READY:
3371
3479
  this.ready = true;
3372
- if (this.iframe && message.height) this.iframe.style.height = `${message.height}px`;
3480
+ if (message.height) this.applyHeight(message.height);
3373
3481
  if (this.pendingInit) {
3374
3482
  const { publicKey } = this.pendingInit;
3375
3483
  this.sendMessage({
@@ -3393,7 +3501,7 @@ var CimplifyElement = class {
3393
3501
  this.emit(EVENT_TYPES.READY, { height: message.height });
3394
3502
  break;
3395
3503
  case MESSAGE_TYPES.HEIGHT_CHANGE:
3396
- if (this.iframe) this.iframe.style.height = `${message.height}px`;
3504
+ this.applyHeight(message.height);
3397
3505
  break;
3398
3506
  case MESSAGE_TYPES.ERROR:
3399
3507
  this.emit(EVENT_TYPES.ERROR, { code: message.code, message: message.message });
@@ -1,5 +1,5 @@
1
- import { ac as CimplifyClient } from './client-BQSRj4iK.mjs';
2
- import { A as AppHandle, C as CreateAppOptions } from './server-9u0LiG5U.mjs';
1
+ import { ac as CimplifyClient } from './client-r5VSGFRU.mjs';
2
+ import { A as AppHandle, C as CreateAppOptions } from './server-CI1CUFVu.mjs';
3
3
 
4
4
  /**
5
5
  * Test client + fixtures.
@@ -1,5 +1,5 @@
1
- import { ac as CimplifyClient } from './client-BdI24jUT.js';
2
- import { A as AppHandle, C as CreateAppOptions } from './server-BH7DTaaz.js';
1
+ import { ac as CimplifyClient } from './client-D0PrO1-Q.js';
2
+ import { A as AppHandle, C as CreateAppOptions } from './server-CHfYeTAa.js';
3
3
 
4
4
  /**
5
5
  * Test client + fixtures.
@@ -1,5 +1,5 @@
1
- import { T as CimplifyError, Q as Category, aX as Product, f as AddOnWithOptions, aO as Pagination, b9 as ProductWithDetails, b7 as ProductVariant, bD as VariantAxis, bE as VariantAxisSelection, A as AddOn, U as Collection, E as BundleSummary, s as Bundle, a1 as Composite, $ as ComponentSelectionInput, a6 as CompositePriceResult, S as ChosenPrice, b4 as ProductTaxonomy, bv as TaxonomyWithChildren, av as EligiblePlansQuery, a$ as ProductBillingPlan, b5 as ProductTimeProfile, a_ as ProductAvailabilityNow, ah as Deal, b0 as ProductDealInfo, an as DiscountValidation, bs as TagsResponse, ac as CustomAttributeDefinition, ad as CustomAttributeValue, ba as PropertyFacet, bu as TaxonomyAttributeTemplate, aH as KnowledgeArticle, bw as UICart, J as CartItem, O as CartSummary, g as AddToCartInput, L as CartMutationResult, bC as UpdateCartItemInput, am as DiscountDetails, aM as Money, ab as CurrencyCode, aI as LineConfiguration, bJ as VariantDetails, bK as VariantDetailsDTO, a as AddOnDetails, d as AddOnOptionDetails, b as AddOnGroupDetails, z as BundleSelectionData, a8 as CompositeSelectionData, ae as CustomerInputValue, bQ as components, bi as SchedulingMode, at as DurationUnit, bm as Subscription, bq as SubscriptionWithDetails } from './product-BGxIfTqJ.mjs';
2
- import { a as AuthorizationType, c as PaymentMethod, I as InitializePaymentResult, S as SubmitAuthorizationInput, i as PaymentStatusResponse } from './payment-CFev-fOE.mjs';
1
+ import { V as CimplifyError, S as Category, aZ as Product, f as AddOnWithOptions, aQ as Pagination, bb as ProductWithDetails, b9 as ProductVariant, bF as VariantAxis, bG as VariantAxisSelection, A as AddOn, W as Collection, G as BundleSummary, u as Bundle, a3 as Composite, a1 as ComponentSelectionInput, a8 as CompositePriceResult, U as ChosenPrice, b6 as ProductTaxonomy, bx as TaxonomyWithChildren, ax as EligiblePlansQuery, b1 as ProductBillingPlan, b7 as ProductTimeProfile, b0 as ProductAvailabilityNow, aj as Deal, b2 as ProductDealInfo, ap as DiscountValidation, bu as TagsResponse, ae as CustomAttributeDefinition, af as CustomAttributeValue, bc as PropertyFacet, bw as TaxonomyAttributeTemplate, aJ as KnowledgeArticle, by as UICart, L as CartItem, Q as CartSummary, g as AddToCartInput, N as CartMutationResult, bE as UpdateCartItemInput, ao as DiscountDetails, aO as Money, ad as CurrencyCode, aK as LineConfiguration, bL as VariantDetails, bM as VariantDetailsDTO, a as AddOnDetails, d as AddOnOptionDetails, b as AddOnGroupDetails, D as BundleSelectionData, aa as CompositeSelectionData, ag as CustomerInputValue, bS as components, bk as SchedulingMode, av as DurationUnit, bo as Subscription, bs as SubscriptionWithDetails } from './product-DoA36Eqh.js';
2
+ import { a as AuthorizationType, c as PaymentMethod, I as InitializePaymentResult, S as SubmitAuthorizationInput, i as PaymentStatusResponse } from './payment-Cfoo9MT7.js';
3
3
 
4
4
  interface RequestContext {
5
5
  method: "GET" | "POST" | "PATCH" | "DELETE";
@@ -1052,6 +1052,7 @@ declare const MESSAGE_TYPES: {
1052
1052
  readonly PAYMENT_METHOD_SELECTED: "payment_method_selected";
1053
1053
  readonly LOGOUT_COMPLETE: "logout_complete";
1054
1054
  readonly AUTH_REQUESTED: "auth_requested";
1055
+ readonly SESSION_ESTABLISHED: "session_established";
1055
1056
  readonly CONTACT_PROVIDED: "contact_provided";
1056
1057
  readonly CHECKOUT_STATUS: "checkout_status";
1057
1058
  readonly CHECKOUT_COMPLETE: "checkout_complete";
@@ -1269,6 +1270,10 @@ type IframeToParentMessage = {
1269
1270
  saveToLink: boolean;
1270
1271
  } | {
1271
1272
  type: typeof MESSAGE_TYPES.LOGOUT_COMPLETE;
1273
+ } | {
1274
+ type: typeof MESSAGE_TYPES.SESSION_ESTABLISHED;
1275
+ accessToken: string;
1276
+ refreshToken?: string;
1272
1277
  } | {
1273
1278
  type: typeof MESSAGE_TYPES.AUTH_REQUESTED;
1274
1279
  loginHint?: string;
@@ -1474,6 +1479,7 @@ type AbortablePromise<T> = Promise<T> & {
1474
1479
  declare class CheckoutService {
1475
1480
  private client;
1476
1481
  constructor(client: CimplifyClient);
1482
+ private validateCheckoutData;
1477
1483
  private orderTokenParam;
1478
1484
  process(data: CheckoutFormData): Promise<Result<CheckoutResult, CimplifyError>>;
1479
1485
  initializePayment(_orderId: string, _method: PaymentMethod): Promise<Result<InitializePaymentResult, CimplifyError>>;
@@ -2232,21 +2238,21 @@ interface LiteBootstrap {
2232
2238
  categories: LiteBootstrapCategory[];
2233
2239
  location?: LiteBootstrapLocation | null;
2234
2240
  }
2235
- interface LiteTable {
2241
+ interface LiteResource {
2236
2242
  id: string;
2237
2243
  name: string;
2238
2244
  location_id?: string | null;
2239
2245
  }
2240
- interface LiteTableResponse {
2241
- table: LiteTable;
2246
+ interface LiteResourceResponse {
2247
+ resource: LiteResource;
2242
2248
  tab: Record<string, unknown> | null;
2243
2249
  }
2244
- type TableInfo = LiteTableResponse;
2250
+ type ResourceInfo = LiteResourceResponse;
2245
2251
  declare class LiteService {
2246
2252
  private client;
2247
2253
  constructor(client: CimplifyClient);
2248
2254
  getBootstrap(): Promise<Result<LiteBootstrap, CimplifyError>>;
2249
- getTable(tableId: string): Promise<Result<LiteTableResponse, CimplifyError>>;
2255
+ getResource(resourceId: string): Promise<Result<LiteResourceResponse, CimplifyError>>;
2250
2256
  getMenu(): Promise<Result<Product[], CimplifyError>>;
2251
2257
  getMenuByCategory(categoryId: string): Promise<Result<Product[], CimplifyError>>;
2252
2258
  }
@@ -2556,6 +2562,10 @@ declare class CimplifyElements {
2556
2562
  getAppearance(): ElementsOptions["appearance"];
2557
2563
  private hydrateCustomerData;
2558
2564
  private sourceElementFor;
2565
+ private sessionStorageKey;
2566
+ private persistRefreshToken;
2567
+ private clearPersistedSession;
2568
+ private restoreSession;
2559
2569
  private applyAccessToken;
2560
2570
  private broadcastAccessToken;
2561
2571
  private startEmbeddedAuth;
@@ -2580,8 +2590,18 @@ declare class CimplifyElement {
2580
2590
  private eventHandlers;
2581
2591
  private resolvers;
2582
2592
  private boundHandleMessage;
2593
+ private boundHandleResize;
2594
+ private lastReportedHeight;
2583
2595
  private listening;
2584
2596
  constructor(type: ElementType, businessId: string | null, linkUrl: string, options: ElementOptions, parent: CimplifyElements);
2597
+ /**
2598
+ * Size the iframe to the element's reported content height (in pixels). We do
2599
+ * NOT cap checkout at the viewport: capping forced a tall checkout to scroll
2600
+ * *inside* a viewport-height iframe — a nested scroll-within-scroll. Sizing to
2601
+ * content lets the iframe grow and the host page scroll naturally as one
2602
+ * surface, which is the standard embedded-checkout behaviour.
2603
+ */
2604
+ private applyHeight;
2585
2605
  mount(container: string | HTMLElement): void;
2586
2606
  destroy(): void;
2587
2607
  on(event: ElementEventType, handler: ElementEventHandler): void;
@@ -2701,6 +2721,7 @@ declare class CimplifyClient {
2701
2721
  setLocationId(locationId: string | null): void;
2702
2722
  getLocationId(): string | null;
2703
2723
  setBusinessId(businessId: string): void;
2724
+ setPublicKey(publicKey: string): void;
2704
2725
  getBusinessId(): string | null;
2705
2726
  resolveBusinessId(): Promise<string>;
2706
2727
  private authedFetch;
@@ -2742,4 +2763,4 @@ declare class CimplifyClient {
2742
2763
  }
2743
2764
  declare function createCimplifyClient(config?: CimplifyConfig): CimplifyClient;
2744
2765
 
2745
- export { type CheckoutCartData as $, AUTHORIZATION_TYPE as A, type Booking as B, BusinessService as C, type BusinessSettings as D, type BusinessWithLocations as E, CHECKOUT_MODE as F, CHECKOUT_MUTATION as G, CHECKOUT_STEP as H, CONTACT_TYPE as I, type CacheOptions as J, type CancelBookingInput as K, type CancelBookingResult as L, type CancelOrderInput as M, type CancellationPolicy as N, CartOperations as O, CatalogueQueries as P, type CatalogueResult as Q, type CatalogueSnapshot as R, type CategoryInfo as S, type ChatAttachment as T, type ChatConversation as U, type ChatConversationResponse as V, type ChatMessage as W, type ChatWidgetStarter as X, type CheckSlotAvailabilityInput as Y, type CheckSlotAvailabilityResult as Z, type CheckoutAddressInfo as _, AUTH_MUTATION as a, type FeeBearerType as a$, type CheckoutCartItem as a0, type CheckoutCustomerInfo as a1, type CheckoutFormData as a2, type CheckoutInput as a3, type CheckoutMode as a4, type CheckoutOrderType as a5, type CheckoutPaymentMethod as a6, type CheckoutResult as a7, CheckoutService as a8, type CheckoutStatus as a9, type DepositResult as aA, type DeviceType as aB, type DismissMessageResponse as aC, ELEMENTS_AUTH_CONTACT_TYPES as aD, ELEMENTS_AUTH_MODES as aE, ELEMENTS_AUTH_PROMPTS as aF, ELEMENT_TYPES as aG, EVENT_TYPES as aH, type ElementAppearance as aI, type ElementEventHandler as aJ, type ElementEventType as aK, type ElementOptions as aL, type ElementType as aM, type ElementsAuthContactType as aN, type ElementsAuthMode as aO, type ElementsAuthOptions as aP, type ElementsAuthPrompt as aQ, type ElementsCheckoutData as aR, type ElementsCheckoutResult as aS, type ElementsCustomerInfo as aT, type ElementsOptions as aU, type EnrichedOrder as aV, type EnrichedOrderItem as aW, type EnrollAndLinkOrderInput as aX, type EnrollAndLinkOrderResult as aY, type EnrollmentData as aZ, type Err as a_, type CheckoutStatusContext as aa, type CheckoutStep as ab, CimplifyClient as ac, type CimplifyConfig as ad, CimplifyElement as ae, CimplifyElements as af, type ContactType as ag, type ContentType as ah, type CreateAddressInput as ai, type CreateMobileMoneyInput as aj, type Customer as ak, type CustomerAddress as al, type CustomerBooking as am, type CustomerBookingServiceItem as an, type CustomerLinkPreferences as ao, type CustomerMobileMoney as ap, type CustomerServicePreferences as aq, DEFAULT_COUNTRY as ar, DEFAULT_CURRENCY as as, DEVICE_TYPE as at, type DayAvailability as au, type DeliveryFeeDetails as av, type DeliveryFeeResponse as aw, type DeliveryOption as ax, type DeliveryOptionsResponse as ay, DeliveryService as az, type AbortablePromise as b, OrderQueries as b$, type FetchQuoteInput as b0, type FulfillmentLink as b1, type FulfillmentStatus as b2, type FulfillmentSummaryDTO as b3, type FulfillmentType as b4, type FxQuote as b5, type FxQuoteRequest as b6, type FxQuoteStatus as b7, type FxRateResponse as b8, FxService as b9, MOBILE_MONEY_PROVIDER as bA, type MobileMoneyData as bB, type MobileMoneyDetails as bC, type MobileMoneyProvider as bD, type NextAction as bE, ORDER_MUTATION as bF, ORDER_TYPE as bG, type ObservabilityHooks as bH, type Ok as bI, type Order as bJ, type OrderCustomerInfo as bK, type OrderDiscountInfo as bL, type OrderFilter as bM, type OrderFulfillmentSummary as bN, type OrderGroup as bO, type OrderGroupDetails as bP, type OrderGroupPayment as bQ, type OrderGroupPaymentState as bR, type OrderGroupPaymentStatus as bS, type OrderGroupPaymentSummary as bT, type OrderGroupStatus as bU, type OrderHistory as bV, type OrderLineState as bW, type OrderLineStatus as bX, type OrderLocationInfo as bY, type OrderPaymentEvent as bZ, type OrderPricingView as b_, type GetAvailableSlotsInput as ba, type GetDeliveryOptionsParams as bb, type GetOrdersOptions as bc, type GetProductsOptions as bd, type GroupOrderInfo as be, type IframeToParentMessage as bf, InventoryService as bg, LINK_MUTATION as bh, LINK_QUERY as bi, type LifecyclePhase as bj, type LineItem as bk, type LineType as bl, type LinkData as bm, type LinkEnrollResult as bn, LinkService as bo, type LinkSession as bp, type LinkStatusResult as bq, type LiteBootstrap as br, LiteService as bs, type Location as bt, type LocationBooking as bu, type LocationTaxBehavior as bv, type LocationTaxOverrides as bw, type LocationTimeProfile as bx, type LocationWithDetails as by, MESSAGE_TYPES as bz, type ActivityRecommendation as c, type Service as c$, type OrderSplitDetail as c0, type OrderStaffInfo as c1, type OrderStatus as c2, type OrderTimestampsDTO as c3, type OrderType as c4, type Origin as c5, type OriginActor as c6, type OriginChannel as c7, type OtpResult as c8, PAYMENT_METHOD as c9, type RelatedCandidate as cA, type RelatedProduct as cB, type RelatedProductsEnrichment as cC, type RelationType as cD, type ReminderMethod as cE, type ReminderSettings as cF, type ReorderResult as cG, type RequestContext as cH, type RequestErrorEvent as cI, type RequestOptions as cJ, type RequestOtpInput as cK, type RequestSource as cL, type RequestStartEvent as cM, type RequestSuccessEvent as cN, type RescheduleBookingInput as cO, type RescheduleBookingResult as cP, type RescheduleHistoryRecord as cQ, type ResourceAssignment as cR, type Result as cS, type RetryEvent as cT, type RevokeAllSessionsResult as cU, type RevokeSessionResult as cV, type Room as cW, type SchedulingMetadata as cX, type SchedulingResult as cY, SchedulingService as cZ, type SenderType as c_, PAYMENT_MUTATION as ca, PAYMENT_STATE as cb, PICKUP_TIME_TYPE as cc, type ParentToIframeMessage as cd, type PaymentInfoDTO as ce, type PaymentMethodInfo as cf, type PaymentState as cg, type PickupTime as ch, type PickupTimeType as ci, type PlaceDetailsResponse as cj, PlacesService as ck, type PriceQuote as cl, type PricingOverrides as cm, type ProcessAndResolveOptions as cn, type ProcessCheckoutOptions as co, type ProcessCheckoutResult as cp, type ProviderResolutionSource as cq, type QuoteBundleSelectionInput as cr, type QuoteCompositeSelectionInput as cs, type QuoteDynamicBuckets as ct, type QuoteStatus as cu, type QuoteUiMessage as cv, type ReadRequestOptions as cw, type RefreshQuoteInput as cx, type RefreshQuoteResult as cy, type RefundOrderInput as cz, type ActivityRecommendationsResponse as d, type ServiceAvailabilityParams as d0, type ServiceAvailabilityResult as d1, type ServiceCharge as d2, type ServiceNotes as d3, type ServiceScheduleRequest as d4, type ServiceStatus as d5, type SessionActivityData as d6, type SessionChangeEvent as d7, type SessionMessage as d8, type SlotResourceInfo as d9, type VerifyOtpInput as dA, combine as dB, combineObject as dC, createCimplifyClient as dD, createElements as dE, err as dF, flatMap as dG, fromPromise as dH, getOrElse as dI, isErr as dJ, isOk as dK, mapError as dL, mapResult as dM, ok as dN, toNullable as dO, tryCatch as dP, unwrap as dQ, type SlotStaffInfo as da, type Staff as db, type StaffAssignment as dc, type StaffRole as dd, type StaffScheduleItem as de, type StockLevel as df, type StockStatus as dg, type StoreCreditBalance as dh, StoreCreditQueries as di, type StorefrontBootstrap as dj, SubscriptionService as dk, SupportService as dl, type Table as dm, type TableInfo as dn, type TimeRange as dp, type TimeRanges as dq, type TimeSlot as dr, type TrackCategoryViewOptions as ds, type TrackProductViewOptions as dt, type UpdateAddressInput as du, type UpdateOrderStatusInput as dv, type UpdateProfileInput as dw, type UploadInitResponse as dx, type UploadResult as dy, UploadService as dz, ActivityService as e, type ActivityStateResponse as f, type AddressData as g, type AddressInfo as h, type AmountToPay as i, type AuthResponse as j, AuthService as k, type AuthStatus as l, type AuthenticatedCustomer as m, type AuthenticatedData as n, type AutocompletePrediction as o, type AutocompleteResponse as p, type AvailabilityResult as q, type AvailableSlot as r, type BookingModificationType as s, type BookingStatus as t, type BookingWithDetails as u, type BufferTimes as v, type Business as w, type BusinessDetailsDTO as x, type BusinessHours as y, type BusinessPreferences as z };
2766
+ export { type CheckoutCartData as $, AUTHORIZATION_TYPE as A, type Booking as B, BusinessService as C, type BusinessSettings as D, type BusinessWithLocations as E, CHECKOUT_MODE as F, CHECKOUT_MUTATION as G, CHECKOUT_STEP as H, CONTACT_TYPE as I, type CacheOptions as J, type CancelBookingInput as K, type CancelBookingResult as L, type CancelOrderInput as M, type CancellationPolicy as N, CartOperations as O, CatalogueQueries as P, type CatalogueResult as Q, type CatalogueSnapshot as R, type CategoryInfo as S, type ChatAttachment as T, type ChatConversation as U, type ChatConversationResponse as V, type ChatMessage as W, type ChatWidgetStarter as X, type CheckSlotAvailabilityInput as Y, type CheckSlotAvailabilityResult as Z, type CheckoutAddressInfo as _, AUTH_MUTATION as a, type FeeBearerType as a$, type CheckoutCartItem as a0, type CheckoutCustomerInfo as a1, type CheckoutFormData as a2, type CheckoutInput as a3, type CheckoutMode as a4, type CheckoutOrderType as a5, type CheckoutPaymentMethod as a6, type CheckoutResult as a7, CheckoutService as a8, type CheckoutStatus as a9, type DepositResult as aA, type DeviceType as aB, type DismissMessageResponse as aC, ELEMENTS_AUTH_CONTACT_TYPES as aD, ELEMENTS_AUTH_MODES as aE, ELEMENTS_AUTH_PROMPTS as aF, ELEMENT_TYPES as aG, EVENT_TYPES as aH, type ElementAppearance as aI, type ElementEventHandler as aJ, type ElementEventType as aK, type ElementOptions as aL, type ElementType as aM, type ElementsAuthContactType as aN, type ElementsAuthMode as aO, type ElementsAuthOptions as aP, type ElementsAuthPrompt as aQ, type ElementsCheckoutData as aR, type ElementsCheckoutResult as aS, type ElementsCustomerInfo as aT, type ElementsOptions as aU, type EnrichedOrder as aV, type EnrichedOrderItem as aW, type EnrollAndLinkOrderInput as aX, type EnrollAndLinkOrderResult as aY, type EnrollmentData as aZ, type Err as a_, type CheckoutStatusContext as aa, type CheckoutStep as ab, CimplifyClient as ac, type CimplifyConfig as ad, CimplifyElement as ae, CimplifyElements as af, type ContactType as ag, type ContentType as ah, type CreateAddressInput as ai, type CreateMobileMoneyInput as aj, type Customer as ak, type CustomerAddress as al, type CustomerBooking as am, type CustomerBookingServiceItem as an, type CustomerLinkPreferences as ao, type CustomerMobileMoney as ap, type CustomerServicePreferences as aq, DEFAULT_COUNTRY as ar, DEFAULT_CURRENCY as as, DEVICE_TYPE as at, type DayAvailability as au, type DeliveryFeeDetails as av, type DeliveryFeeResponse as aw, type DeliveryOption as ax, type DeliveryOptionsResponse as ay, DeliveryService as az, type AbortablePromise as b, OrderQueries as b$, type FetchQuoteInput as b0, type FulfillmentLink as b1, type FulfillmentStatus as b2, type FulfillmentSummaryDTO as b3, type FulfillmentType as b4, type FxQuote as b5, type FxQuoteRequest as b6, type FxQuoteStatus as b7, type FxRateResponse as b8, FxService as b9, MOBILE_MONEY_PROVIDER as bA, type MobileMoneyData as bB, type MobileMoneyDetails as bC, type MobileMoneyProvider as bD, type NextAction as bE, ORDER_MUTATION as bF, ORDER_TYPE as bG, type ObservabilityHooks as bH, type Ok as bI, type Order as bJ, type OrderCustomerInfo as bK, type OrderDiscountInfo as bL, type OrderFilter as bM, type OrderFulfillmentSummary as bN, type OrderGroup as bO, type OrderGroupDetails as bP, type OrderGroupPayment as bQ, type OrderGroupPaymentState as bR, type OrderGroupPaymentStatus as bS, type OrderGroupPaymentSummary as bT, type OrderGroupStatus as bU, type OrderHistory as bV, type OrderLineState as bW, type OrderLineStatus as bX, type OrderLocationInfo as bY, type OrderPaymentEvent as bZ, type OrderPricingView as b_, type GetAvailableSlotsInput as ba, type GetDeliveryOptionsParams as bb, type GetOrdersOptions as bc, type GetProductsOptions as bd, type GroupOrderInfo as be, type IframeToParentMessage as bf, InventoryService as bg, LINK_MUTATION as bh, LINK_QUERY as bi, type LifecyclePhase as bj, type LineItem as bk, type LineType as bl, type LinkData as bm, type LinkEnrollResult as bn, LinkService as bo, type LinkSession as bp, type LinkStatusResult as bq, type LiteBootstrap as br, LiteService as bs, type Location as bt, type LocationBooking as bu, type LocationTaxBehavior as bv, type LocationTaxOverrides as bw, type LocationTimeProfile as bx, type LocationWithDetails as by, MESSAGE_TYPES as bz, type ActivityRecommendation as c, type SenderType as c$, type OrderSplitDetail as c0, type OrderStaffInfo as c1, type OrderStatus as c2, type OrderTimestampsDTO as c3, type OrderType as c4, type Origin as c5, type OriginActor as c6, type OriginChannel as c7, type OtpResult as c8, PAYMENT_METHOD as c9, type RelatedCandidate as cA, type RelatedProduct as cB, type RelatedProductsEnrichment as cC, type RelationType as cD, type ReminderMethod as cE, type ReminderSettings as cF, type ReorderResult as cG, type RequestContext as cH, type RequestErrorEvent as cI, type RequestOptions as cJ, type RequestOtpInput as cK, type RequestSource as cL, type RequestStartEvent as cM, type RequestSuccessEvent as cN, type RescheduleBookingInput as cO, type RescheduleBookingResult as cP, type RescheduleHistoryRecord as cQ, type ResourceAssignment as cR, type ResourceInfo as cS, type Result as cT, type RetryEvent as cU, type RevokeAllSessionsResult as cV, type RevokeSessionResult as cW, type Room as cX, type SchedulingMetadata as cY, type SchedulingResult as cZ, SchedulingService as c_, PAYMENT_MUTATION as ca, PAYMENT_STATE as cb, PICKUP_TIME_TYPE as cc, type ParentToIframeMessage as cd, type PaymentInfoDTO as ce, type PaymentMethodInfo as cf, type PaymentState as cg, type PickupTime as ch, type PickupTimeType as ci, type PlaceDetailsResponse as cj, PlacesService as ck, type PriceQuote as cl, type PricingOverrides as cm, type ProcessAndResolveOptions as cn, type ProcessCheckoutOptions as co, type ProcessCheckoutResult as cp, type ProviderResolutionSource as cq, type QuoteBundleSelectionInput as cr, type QuoteCompositeSelectionInput as cs, type QuoteDynamicBuckets as ct, type QuoteStatus as cu, type QuoteUiMessage as cv, type ReadRequestOptions as cw, type RefreshQuoteInput as cx, type RefreshQuoteResult as cy, type RefundOrderInput as cz, type ActivityRecommendationsResponse as d, type Service as d0, type ServiceAvailabilityParams as d1, type ServiceAvailabilityResult as d2, type ServiceCharge as d3, type ServiceNotes as d4, type ServiceScheduleRequest as d5, type ServiceStatus as d6, type SessionActivityData as d7, type SessionChangeEvent as d8, type SessionMessage as d9, type VerifyOtpInput as dA, combine as dB, combineObject as dC, createCimplifyClient as dD, createElements as dE, err as dF, flatMap as dG, fromPromise as dH, getOrElse as dI, isErr as dJ, isOk as dK, mapError as dL, mapResult as dM, ok as dN, toNullable as dO, tryCatch as dP, unwrap as dQ, type SlotResourceInfo as da, type SlotStaffInfo as db, type Staff as dc, type StaffAssignment as dd, type StaffRole as de, type StaffScheduleItem as df, type StockLevel as dg, type StockStatus as dh, type StoreCreditBalance as di, StoreCreditQueries as dj, type StorefrontBootstrap as dk, SubscriptionService as dl, SupportService as dm, type Table as dn, type TimeRange as dp, type TimeRanges as dq, type TimeSlot as dr, type TrackCategoryViewOptions as ds, type TrackProductViewOptions as dt, type UpdateAddressInput as du, type UpdateOrderStatusInput as dv, type UpdateProfileInput as dw, type UploadInitResponse as dx, type UploadResult as dy, UploadService as dz, ActivityService as e, type ActivityStateResponse as f, type AddressData as g, type AddressInfo as h, type AmountToPay as i, type AuthResponse as j, AuthService as k, type AuthStatus as l, type AuthenticatedCustomer as m, type AuthenticatedData as n, type AutocompletePrediction as o, type AutocompleteResponse as p, type AvailabilityResult as q, type AvailableSlot as r, type BookingModificationType as s, type BookingStatus as t, type BookingWithDetails as u, type BufferTimes as v, type Business as w, type BusinessDetailsDTO as x, type BusinessHours as y, type BusinessPreferences as z };