@cimplify/sdk 0.54.0 → 0.55.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 (43) 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-EJUKGJTZ.js → chunk-6W3AH4QW.js} +2 -2
  6. package/dist/{chunk-NEK7CVE2.mjs → chunk-F4WS3OIF.mjs} +1 -1
  7. package/dist/{chunk-B3Y4C4A7.mjs → chunk-I4IXPQIX.mjs} +7 -4
  8. package/dist/{chunk-YJLOOC3L.js → chunk-JGBDWEPJ.js} +7 -4
  9. package/dist/chunk-JYPLT56O.js +272 -0
  10. package/dist/{chunk-IJ32BXKZ.js → chunk-MW7ICTVK.js} +35 -35
  11. package/dist/{chunk-6QZQQRBB.mjs → chunk-SQ7U3BWY.mjs} +1 -1
  12. package/dist/chunk-XYI4NXWG.mjs +259 -0
  13. package/dist/{client-D1Gknspz.d.mts → client-Bhvlelij.d.mts} +1 -1
  14. package/dist/{client-Bj2apl_y.d.mts → client-DKg-5OWu.d.mts} +16 -1
  15. package/dist/{client-306peWZ0.d.ts → client-Dfg_hmkP.d.ts} +16 -1
  16. package/dist/{client-C2bKMy5g.d.ts → client-DlGJqSDd.d.ts} +1 -1
  17. package/dist/index.d.mts +18 -3
  18. package/dist/index.d.ts +18 -3
  19. package/dist/index.js +160 -72
  20. package/dist/index.mjs +91 -3
  21. package/dist/react.d.mts +52 -5
  22. package/dist/react.d.ts +52 -5
  23. package/dist/react.js +592 -512
  24. package/dist/react.mjs +136 -58
  25. package/dist/server.d.mts +43 -3
  26. package/dist/server.d.ts +43 -3
  27. package/dist/server.js +170 -3
  28. package/dist/server.mjs +163 -3
  29. package/dist/{ads-C2c2Aald.d.mts → sign-in-TL01-awQ.d.mts} +17 -1
  30. package/dist/{ads-C2c2Aald.d.ts → sign-in-TL01-awQ.d.ts} +17 -1
  31. package/dist/styles.css +1 -1
  32. package/dist/testing/suite.d.mts +2 -2
  33. package/dist/testing/suite.d.ts +2 -2
  34. package/dist/testing/suite.js +22 -22
  35. package/dist/testing/suite.mjs +3 -3
  36. package/dist/testing.d.mts +2 -2
  37. package/dist/testing.d.ts +2 -2
  38. package/dist/testing.js +78 -78
  39. package/dist/testing.mjs +4 -4
  40. package/package.json +2 -1
  41. package/registry/account.json +1 -1
  42. package/dist/chunk-MN4PNKJA.js +0 -129
  43. package/dist/chunk-NRDRVZ62.mjs +0 -119
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkYJLOOC3L_js = require('./chunk-YJLOOC3L.js');
3
+ var chunkJGBDWEPJ_js = require('./chunk-JGBDWEPJ.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 chunkYJLOOC3L_js.safe(this.client.get("/api/v1/activity/state"));
32
+ return chunkJGBDWEPJ_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 chunkYJLOOC3L_js.safe(this.client.get(path));
40
+ return chunkJGBDWEPJ_js.safe(this.client.get(path));
41
41
  }
42
42
  async dismissMessage(code) {
43
- return chunkYJLOOC3L_js.safe(
43
+ return chunkJGBDWEPJ_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 chunkYJLOOC3L_js.safe(this.client.get("/api/v1/subscriptions"));
65
+ return chunkJGBDWEPJ_js.safe(this.client.get("/api/v1/subscriptions"));
66
66
  }
67
67
  async get(id) {
68
68
  const encodedId = encodeURIComponent(id);
69
- return chunkYJLOOC3L_js.safe(this.client.get(`/api/v1/subscriptions/${encodedId}`));
69
+ return chunkJGBDWEPJ_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 ?? chunkYJLOOC3L_js.generateIdempotencyKey();
74
- return chunkYJLOOC3L_js.safe(
73
+ const idempotencyKey = opts?.idempotencyKey ?? chunkJGBDWEPJ_js.generateIdempotencyKey();
74
+ return chunkJGBDWEPJ_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 chunkYJLOOC3L_js.safe(
84
+ return chunkJGBDWEPJ_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 chunkYJLOOC3L_js.safe(
90
+ return chunkJGBDWEPJ_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 ?? chunkYJLOOC3L_js.generateIdempotencyKey();
97
- return chunkYJLOOC3L_js.safe(
96
+ const idempotencyKey = opts?.idempotencyKey ?? chunkJGBDWEPJ_js.generateIdempotencyKey();
97
+ return chunkJGBDWEPJ_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 ?? chunkYJLOOC3L_js.generateIdempotencyKey();
114
- return chunkYJLOOC3L_js.safe(
113
+ const idempotencyKey = opts?.idempotencyKey ?? chunkJGBDWEPJ_js.generateIdempotencyKey();
114
+ return chunkJGBDWEPJ_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 chunkYJLOOC3L_js.safe(
127
+ return chunkJGBDWEPJ_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 chunkYJLOOC3L_js.safe(
173
+ return chunkJGBDWEPJ_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 chunkYJLOOC3L_js.safe(
181
+ return chunkJGBDWEPJ_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 chunkYJLOOC3L_js.safe(
200
+ return chunkJGBDWEPJ_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 ?? chunkYJLOOC3L_js.generateIdempotencyKey();
214
- return chunkYJLOOC3L_js.safe(
213
+ const idempotencyKey = opts?.idempotencyKey ?? chunkJGBDWEPJ_js.generateIdempotencyKey();
214
+ return chunkJGBDWEPJ_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 ?? chunkYJLOOC3L_js.generateIdempotencyKey();
223
- return chunkYJLOOC3L_js.safe(
222
+ const idempotencyKey = opts?.idempotencyKey ?? chunkJGBDWEPJ_js.generateIdempotencyKey();
223
+ return chunkJGBDWEPJ_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 chunkYJLOOC3L_js.safe(this.client.get(path));
238
+ return chunkJGBDWEPJ_js.safe(this.client.get(path));
239
239
  }
240
240
  };
241
241
 
@@ -833,25 +833,25 @@ var CimplifyClient = class {
833
833
  }
834
834
  get catalogue() {
835
835
  if (!this._catalogue) {
836
- this._catalogue = new chunkYJLOOC3L_js.CatalogueQueries(this);
836
+ this._catalogue = new chunkJGBDWEPJ_js.CatalogueQueries(this);
837
837
  }
838
838
  return this._catalogue;
839
839
  }
840
840
  get cart() {
841
841
  if (!this._cart) {
842
- this._cart = new chunkYJLOOC3L_js.CartOperations(this);
842
+ this._cart = new chunkJGBDWEPJ_js.CartOperations(this);
843
843
  }
844
844
  return this._cart;
845
845
  }
846
846
  get checkout() {
847
847
  if (!this._checkout) {
848
- this._checkout = new chunkYJLOOC3L_js.CheckoutService(this);
848
+ this._checkout = new chunkJGBDWEPJ_js.CheckoutService(this);
849
849
  }
850
850
  return this._checkout;
851
851
  }
852
852
  get orders() {
853
853
  if (!this._orders) {
854
- this._orders = new chunkYJLOOC3L_js.OrderQueries(this);
854
+ this._orders = new chunkJGBDWEPJ_js.OrderQueries(this);
855
855
  }
856
856
  return this._orders;
857
857
  }
@@ -875,43 +875,43 @@ var CimplifyClient = class {
875
875
  }
876
876
  get link() {
877
877
  if (!this._link) {
878
- this._link = new chunkYJLOOC3L_js.LinkService(this);
878
+ this._link = new chunkJGBDWEPJ_js.LinkService(this);
879
879
  }
880
880
  return this._link;
881
881
  }
882
882
  get auth() {
883
883
  if (!this._auth) {
884
- this._auth = new chunkYJLOOC3L_js.AuthService(this);
884
+ this._auth = new chunkJGBDWEPJ_js.AuthService(this);
885
885
  }
886
886
  return this._auth;
887
887
  }
888
888
  get business() {
889
889
  if (!this._business) {
890
- this._business = new chunkYJLOOC3L_js.BusinessService(this);
890
+ this._business = new chunkJGBDWEPJ_js.BusinessService(this);
891
891
  }
892
892
  return this._business;
893
893
  }
894
894
  get inventory() {
895
895
  if (!this._inventory) {
896
- this._inventory = new chunkYJLOOC3L_js.InventoryService(this);
896
+ this._inventory = new chunkJGBDWEPJ_js.InventoryService(this);
897
897
  }
898
898
  return this._inventory;
899
899
  }
900
900
  get scheduling() {
901
901
  if (!this._scheduling) {
902
- this._scheduling = new chunkYJLOOC3L_js.SchedulingService(this);
902
+ this._scheduling = new chunkJGBDWEPJ_js.SchedulingService(this);
903
903
  }
904
904
  return this._scheduling;
905
905
  }
906
906
  get lite() {
907
907
  if (!this._lite) {
908
- this._lite = new chunkYJLOOC3L_js.LiteService(this);
908
+ this._lite = new chunkJGBDWEPJ_js.LiteService(this);
909
909
  }
910
910
  return this._lite;
911
911
  }
912
912
  get fx() {
913
913
  if (!this._fx) {
914
- this._fx = new chunkYJLOOC3L_js.FxService(this);
914
+ this._fx = new chunkJGBDWEPJ_js.FxService(this);
915
915
  }
916
916
  return this._fx;
917
917
  }
@@ -946,7 +946,7 @@ var CimplifyClient = class {
946
946
  if (businessId) {
947
947
  this.setBusinessId(businessId);
948
948
  }
949
- return chunkYJLOOC3L_js.createElements(this, businessId ?? this.businessId ?? void 0, options);
949
+ return chunkJGBDWEPJ_js.createElements(this, businessId ?? this.businessId ?? void 0, options);
950
950
  }
951
951
  };
952
952
  function createCimplifyClient(config = {}) {
@@ -1,4 +1,4 @@
1
- import { safe, generateIdempotencyKey, CatalogueQueries, CartOperations, CheckoutService, OrderQueries, LinkService, AuthService, BusinessService, InventoryService, SchedulingService, LiteService, FxService, createElements } from './chunk-B3Y4C4A7.mjs';
1
+ import { safe, generateIdempotencyKey, CatalogueQueries, CartOperations, CheckoutService, OrderQueries, LinkService, AuthService, BusinessService, InventoryService, SchedulingService, LiteService, FxService, createElements } from './chunk-I4IXPQIX.mjs';
2
2
  import { CimplifyError, ErrorCode, IdempotencyMismatchError, enrichError } from './chunk-AMZXALF6.mjs';
3
3
 
4
4
  // src/activity.ts
@@ -0,0 +1,259 @@
1
+ // src/utils/variant.ts
2
+ function stripProductPrefix(variantName, productName) {
3
+ if (!variantName || !productName) return variantName || productName;
4
+ const lower = variantName.toLowerCase().trim();
5
+ if (lower === "default" || lower === "standard") return productName;
6
+ if (lower.endsWith("-default") || lower.endsWith("-standard")) return productName;
7
+ if (variantName.startsWith(productName)) {
8
+ const rest = variantName.slice(productName.length);
9
+ const match = rest.match(/^\s*[-–—]\s*(.*)/);
10
+ if (match && match[1].length > 0) return match[1];
11
+ }
12
+ const lowerProduct = productName.toLowerCase().trim();
13
+ if (lower.startsWith(lowerProduct)) {
14
+ const rest = variantName.slice(productName.length);
15
+ const match = rest.match(/^\s*[-–—]\s*(.*)/);
16
+ if (match && match[1].length > 0) return match[1];
17
+ }
18
+ const lastDash = variantName.lastIndexOf("-");
19
+ if (lastDash > 0 && lastDash < variantName.length - 1) {
20
+ const prefix = variantName.slice(0, lastDash).trim();
21
+ const suffix = variantName.slice(lastDash + 1).trim();
22
+ if (suffix.length > 0 && prefix.length > suffix.length * 2) {
23
+ return suffix;
24
+ }
25
+ }
26
+ return variantName;
27
+ }
28
+ function getVariantDisplayName(variant, productName) {
29
+ if (variant.display_attributes?.length) {
30
+ return variant.display_attributes.map((a) => a.value_name).join(" / ");
31
+ }
32
+ if (variant.name) {
33
+ return productName ? stripProductPrefix(variant.name, productName) : variant.name;
34
+ }
35
+ return productName || (variant.is_default ? "Default" : "Option");
36
+ }
37
+
38
+ // src/types/product.ts
39
+ var PRODUCT_TYPE = {
40
+ Product: "product",
41
+ Service: "service",
42
+ Digital: "digital",
43
+ Bundle: "bundle",
44
+ Composite: "composite"
45
+ };
46
+ var RENDER_HINT = {
47
+ Food: "food",
48
+ Physical: "physical",
49
+ General: "general"
50
+ };
51
+ var DURATION_UNIT = {
52
+ Minutes: "minutes",
53
+ Hours: "hours",
54
+ Days: "days",
55
+ Nights: "nights",
56
+ Weeks: "weeks",
57
+ Months: "months",
58
+ Years: "years"
59
+ };
60
+ var INPUT_FIELD_TYPE = {
61
+ Text: "text",
62
+ Textarea: "textarea",
63
+ Number: "number",
64
+ Select: "select",
65
+ Radio: "radio",
66
+ Checkbox: "checkbox",
67
+ Color: "color",
68
+ Date: "date",
69
+ File: "file",
70
+ Image: "image",
71
+ Url: "url",
72
+ Address: "address",
73
+ Phone: "phone",
74
+ Email: "email",
75
+ DateTime: "date_time",
76
+ Time: "time",
77
+ Signature: "signature",
78
+ MultiSelect: "multi_select",
79
+ DateRange: "date_range",
80
+ Location: "location"
81
+ };
82
+
83
+ // src/internal/pkce.ts
84
+ var VERIFIER_BYTES = 64;
85
+ async function generatePkce() {
86
+ const random = new Uint8Array(VERIFIER_BYTES);
87
+ crypto.getRandomValues(random);
88
+ const verifier = base64UrlEncode(random);
89
+ const digest = await crypto.subtle.digest("SHA-256", new TextEncoder().encode(verifier));
90
+ const challenge = base64UrlEncode(new Uint8Array(digest));
91
+ return { verifier, challenge, method: "S256" };
92
+ }
93
+ function generateState(byteLength = 16) {
94
+ const buf = new Uint8Array(byteLength);
95
+ crypto.getRandomValues(buf);
96
+ return base64UrlEncode(buf);
97
+ }
98
+ function base64UrlEncode(bytes) {
99
+ let str = "";
100
+ for (const byte of bytes) str += String.fromCharCode(byte);
101
+ return btoa(str).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
102
+ }
103
+
104
+ // src/internal/modal-iframe.ts
105
+ function openModalIframe(opts) {
106
+ const overlay = document.createElement("div");
107
+ overlay.dataset.cimplifyModal = "1";
108
+ Object.assign(overlay.style, {
109
+ position: "fixed",
110
+ inset: "0",
111
+ background: "rgba(15, 18, 24, 0.55)",
112
+ zIndex: "2147483647",
113
+ display: "grid",
114
+ placeItems: "center",
115
+ backdropFilter: "blur(2px)"
116
+ });
117
+ const card = document.createElement("div");
118
+ Object.assign(card.style, {
119
+ width: `${opts.width ?? 440}px`,
120
+ maxWidth: "calc(100vw - 24px)",
121
+ height: `${opts.height ?? 620}px`,
122
+ maxHeight: "calc(100vh - 48px)",
123
+ background: "#fff",
124
+ borderRadius: "14px",
125
+ overflow: "hidden",
126
+ boxShadow: "0 24px 64px rgba(0,0,0,0.25)"
127
+ });
128
+ const iframe = document.createElement("iframe");
129
+ iframe.src = opts.src;
130
+ iframe.style.width = "100%";
131
+ iframe.style.height = "100%";
132
+ iframe.style.border = "none";
133
+ iframe.setAttribute(
134
+ "sandbox",
135
+ opts.sandbox ?? "allow-scripts allow-same-origin allow-forms allow-popups"
136
+ );
137
+ iframe.setAttribute("allow", "publickey-credentials-get; publickey-credentials-create");
138
+ card.appendChild(iframe);
139
+ overlay.appendChild(card);
140
+ document.body.appendChild(overlay);
141
+ const close = () => {
142
+ overlay.remove();
143
+ document.removeEventListener("keydown", onKey);
144
+ opts.onClose?.();
145
+ };
146
+ const onKey = (e) => {
147
+ if (e.key === "Escape") close();
148
+ };
149
+ overlay.addEventListener("click", (e) => {
150
+ if (e.target === overlay) close();
151
+ });
152
+ document.addEventListener("keydown", onKey);
153
+ return { iframe, close };
154
+ }
155
+
156
+ // src/sign-in.ts
157
+ var DEFAULT_AUTH_URL = "https://auth.cimplify.io";
158
+ var DEFAULT_SCOPE = "openid email phone profile";
159
+ async function startSignIn(opts) {
160
+ const authUrl = (opts.authUrl ?? DEFAULT_AUTH_URL).replace(/\/$/, "");
161
+ const callbackUri = opts.callbackUri ?? "/auth/callback";
162
+ const pkce = await generatePkce();
163
+ const state = generateState();
164
+ const params = new URLSearchParams({
165
+ response_type: "code",
166
+ response_mode: "web_message",
167
+ client_id: opts.clientId,
168
+ redirect_uri: opts.redirectUri,
169
+ scope: opts.scope ?? DEFAULT_SCOPE,
170
+ state,
171
+ code_challenge: pkce.challenge,
172
+ code_challenge_method: pkce.method
173
+ });
174
+ if (opts.loginHint) params.set("login_hint", opts.loginHint);
175
+ if (opts.prompt) params.set("prompt", opts.prompt);
176
+ const src = `${authUrl}/oauth/authorize?${params.toString()}`;
177
+ const expectedOrigin = new URL(authUrl).origin;
178
+ const modal = openModalIframe({
179
+ src,
180
+ onClose: () => {
181
+ window.removeEventListener("message", handler);
182
+ }
183
+ });
184
+ const handler = async (event) => {
185
+ if (event.origin !== expectedOrigin) return;
186
+ const data = event.data;
187
+ if (!data || typeof data !== "object" || data.type !== "authorization_response") return;
188
+ const response = data.response;
189
+ if (response.error) {
190
+ modal.close();
191
+ opts.onError?.({ error: response.error, description: response.error_description });
192
+ return;
193
+ }
194
+ if (!response.code) return;
195
+ if (response.state !== state) {
196
+ modal.close();
197
+ opts.onError?.({ error: "state_mismatch" });
198
+ return;
199
+ }
200
+ try {
201
+ const res = await fetch(callbackUri, {
202
+ method: "POST",
203
+ credentials: "include",
204
+ headers: { "Content-Type": "application/json" },
205
+ body: JSON.stringify({ code: response.code, codeVerifier: pkce.verifier, state })
206
+ });
207
+ if (!res.ok) {
208
+ const body = await res.text().catch(() => "");
209
+ opts.onError?.({ error: "callback_failed", description: body });
210
+ modal.close();
211
+ return;
212
+ }
213
+ modal.close();
214
+ opts.onSuccess?.();
215
+ } catch (e) {
216
+ opts.onError?.({ error: "callback_exception", description: String(e) });
217
+ modal.close();
218
+ }
219
+ };
220
+ window.addEventListener("message", handler);
221
+ }
222
+
223
+ // src/assets/url.ts
224
+ var DEFAULT_CDN_BASE_URL = "https://storefrontassetscdn.cimplify.io";
225
+ var CIMPLIFY_CDN_HOSTS = [
226
+ "storefrontassetscdn.cimplify.io",
227
+ "cdn.cimplify.io",
228
+ "static-tmp.cimplify.io"
229
+ ];
230
+ var ABSOLUTE_URL_RE = /^https?:\/\//i;
231
+ var MOCK_PASSTHROUGH_RE = /^\/(img|elements|_mock)\//;
232
+ function assetUrl(path, opts = {}) {
233
+ if (!path) return path;
234
+ if (ABSOLUTE_URL_RE.test(path)) return appendTransform(path, opts);
235
+ if (MOCK_PASSTHROUGH_RE.test(path)) return appendTransform(path, opts);
236
+ const base = (opts.base ?? DEFAULT_CDN_BASE_URL).replace(/\/+$/, "");
237
+ const normalized = path.replace(/^\/+/, "");
238
+ return appendTransform(`${base}/${normalized}`, opts);
239
+ }
240
+ function isCimplifyAsset(src, base) {
241
+ if (!src) return false;
242
+ if (!ABSOLUTE_URL_RE.test(src)) return true;
243
+ if (MOCK_PASSTHROUGH_RE.test(src)) return true;
244
+ const resolvedBase = (base ?? DEFAULT_CDN_BASE_URL).replace(/\/+$/, "");
245
+ if (resolvedBase && src.startsWith(resolvedBase)) return true;
246
+ return CIMPLIFY_CDN_HOSTS.some((host) => src.startsWith(`https://${host}/`));
247
+ }
248
+ function appendTransform(url, t) {
249
+ const params = new URLSearchParams();
250
+ if (t.w != null) params.set("w", String(t.w));
251
+ if (t.h != null) params.set("h", String(t.h));
252
+ if (t.quality != null) params.set("quality", String(t.quality));
253
+ if (t.format != null) params.set("format", t.format);
254
+ const query = params.toString();
255
+ if (!query) return url;
256
+ return `${url}${url.includes("?") ? "&" : "?"}${query}`;
257
+ }
258
+
259
+ export { CIMPLIFY_CDN_HOSTS, DEFAULT_CDN_BASE_URL, DURATION_UNIT, INPUT_FIELD_TYPE, PRODUCT_TYPE, RENDER_HINT, assetUrl, generatePkce, generateState, getVariantDisplayName, isCimplifyAsset, startSignIn };
@@ -1,4 +1,4 @@
1
- import { ac as CimplifyClient } from './client-Bj2apl_y.mjs';
1
+ import { ac as CimplifyClient } from './client-DKg-5OWu.mjs';
2
2
  import { A as AppHandle, C as CreateAppOptions } from './server-D8rwqZQ6.mjs';
3
3
 
4
4
  /**
@@ -999,6 +999,7 @@ interface VerifyOtpInput {
999
999
  contact: string;
1000
1000
  contact_type: ContactType;
1001
1001
  otp_code: string;
1002
+ business_id?: string;
1002
1003
  }
1003
1004
  interface AuthResponse {
1004
1005
  success: boolean;
@@ -1190,6 +1191,20 @@ interface GetLinkOrdersOptions {
1190
1191
  status?: OrderStatus;
1191
1192
  limit?: number;
1192
1193
  offset?: number;
1194
+ /**
1195
+ * Per-merchant scope. When set, only orders placed with this business
1196
+ * are returned. Pass it from the embedded account widget on a merchant
1197
+ * storefront; omit for the cross-merchant view on link.cimplify.io.
1198
+ */
1199
+ businessId?: string;
1200
+ }
1201
+ interface GetLinkOrderOptions {
1202
+ /**
1203
+ * Per-merchant scope. When set, the order must belong to this business
1204
+ * or the request 404s. Used by the embedded account widget to prevent
1205
+ * cross-merchant enumeration.
1206
+ */
1207
+ businessId?: string;
1193
1208
  }
1194
1209
  interface IdempotencyOption$6 {
1195
1210
  idempotencyKey?: string;
@@ -1231,7 +1246,7 @@ declare class LinkService {
1231
1246
  getMobileMoney(): Promise<Result<CustomerMobileMoney[], CimplifyError>>;
1232
1247
  getPreferences(): Promise<Result<CustomerLinkPreferences, CimplifyError>>;
1233
1248
  getOrders(options?: GetLinkOrdersOptions): Promise<Result<Order[], CimplifyError>>;
1234
- getOrder(orderId: string): Promise<Result<Order, CimplifyError>>;
1249
+ getOrder(orderId: string, options?: GetLinkOrderOptions): Promise<Result<Order, CimplifyError>>;
1235
1250
  enroll(data: EnrollmentData, opts?: IdempotencyOption$6): Promise<Result<LinkEnrollResult, CimplifyError>>;
1236
1251
  enrollAndLinkOrder(data: EnrollAndLinkOrderInput, opts?: IdempotencyOption$6): Promise<Result<EnrollAndLinkOrderResult, CimplifyError>>;
1237
1252
  updatePreferences(preferences: Partial<CustomerLinkPreferences>): Promise<Result<SuccessResult$1, CimplifyError>>;
@@ -999,6 +999,7 @@ interface VerifyOtpInput {
999
999
  contact: string;
1000
1000
  contact_type: ContactType;
1001
1001
  otp_code: string;
1002
+ business_id?: string;
1002
1003
  }
1003
1004
  interface AuthResponse {
1004
1005
  success: boolean;
@@ -1190,6 +1191,20 @@ interface GetLinkOrdersOptions {
1190
1191
  status?: OrderStatus;
1191
1192
  limit?: number;
1192
1193
  offset?: number;
1194
+ /**
1195
+ * Per-merchant scope. When set, only orders placed with this business
1196
+ * are returned. Pass it from the embedded account widget on a merchant
1197
+ * storefront; omit for the cross-merchant view on link.cimplify.io.
1198
+ */
1199
+ businessId?: string;
1200
+ }
1201
+ interface GetLinkOrderOptions {
1202
+ /**
1203
+ * Per-merchant scope. When set, the order must belong to this business
1204
+ * or the request 404s. Used by the embedded account widget to prevent
1205
+ * cross-merchant enumeration.
1206
+ */
1207
+ businessId?: string;
1193
1208
  }
1194
1209
  interface IdempotencyOption$6 {
1195
1210
  idempotencyKey?: string;
@@ -1231,7 +1246,7 @@ declare class LinkService {
1231
1246
  getMobileMoney(): Promise<Result<CustomerMobileMoney[], CimplifyError>>;
1232
1247
  getPreferences(): Promise<Result<CustomerLinkPreferences, CimplifyError>>;
1233
1248
  getOrders(options?: GetLinkOrdersOptions): Promise<Result<Order[], CimplifyError>>;
1234
- getOrder(orderId: string): Promise<Result<Order, CimplifyError>>;
1249
+ getOrder(orderId: string, options?: GetLinkOrderOptions): Promise<Result<Order, CimplifyError>>;
1235
1250
  enroll(data: EnrollmentData, opts?: IdempotencyOption$6): Promise<Result<LinkEnrollResult, CimplifyError>>;
1236
1251
  enrollAndLinkOrder(data: EnrollAndLinkOrderInput, opts?: IdempotencyOption$6): Promise<Result<EnrollAndLinkOrderResult, CimplifyError>>;
1237
1252
  updatePreferences(preferences: Partial<CustomerLinkPreferences>): Promise<Result<SuccessResult$1, CimplifyError>>;
@@ -1,4 +1,4 @@
1
- import { ac as CimplifyClient } from './client-306peWZ0.js';
1
+ import { ac as CimplifyClient } from './client-Dfg_hmkP.js';
2
2
  import { A as AppHandle, C as CreateAppOptions } from './server-BQzz921M.js';
3
3
 
4
4
  /**
package/dist/index.d.mts CHANGED
@@ -1,8 +1,8 @@
1
- export { A as AUTHORIZATION_TYPE, a as AUTH_MUTATION, b as AbortablePromise, c as ActivityRecommendation, d as ActivityRecommendationsResponse, e as ActivityService, f as ActivityStateResponse, g as AddressData, h as AddressInfo, i as AmountToPay, j as AuthResponse, k as AuthService, l as AuthStatus, m as AuthenticatedCustomer, n as AuthenticatedData, o as AutocompletePrediction, p as AutocompleteResponse, q as AvailabilityResult, r as AvailableSlot, B as Booking, s as BookingModificationType, t as BookingStatus, u as BookingWithDetails, v as BufferTimes, w as Business, x as BusinessHours, y as BusinessPreferences, z as BusinessService, C as BusinessSettings, D as BusinessType, E as BusinessWithLocations, F as CHECKOUT_MODE, G as CHECKOUT_MUTATION, H as CHECKOUT_STEP, I as CONTACT_TYPE, J as CacheOptions, K as CancelBookingInput, L as CancelBookingResult, M as CancelOrderInput, N as CancellationPolicy, O as CartOperations, P as CatalogueQueries, Q as CatalogueResult, R as CatalogueSnapshot, S as CategoryInfo, T as ChatAttachment, U as ChatConversation, V as ChatConversationResponse, W as ChatMessage, X as ChatWidgetStarter, Y as CheckSlotAvailabilityInput, Z as CheckSlotAvailabilityResult, _ as CheckoutAddressInfo, $ as CheckoutCartData, a0 as CheckoutCartItem, a1 as CheckoutCustomerInfo, a2 as CheckoutFormData, a3 as CheckoutInput, a4 as CheckoutMode, a8 as CheckoutOperations, a5 as CheckoutOrderType, a6 as CheckoutPaymentMethod, a7 as CheckoutResult, a8 as CheckoutService, a9 as CheckoutStatus, aa as CheckoutStatusContext, ab as CheckoutStep, ac as CimplifyClient, ad as CimplifyConfig, ae as CimplifyElement, af as CimplifyElements, ag as ContactType, ah as ContentType, ai as CreateAddressInput, aj as CreateMobileMoneyInput, ak as Customer, al as CustomerAddress, am as CustomerBooking, an as CustomerBookingServiceItem, ao as CustomerLinkPreferences, ap as CustomerMobileMoney, aq as CustomerServicePreferences, ar as DEFAULT_COUNTRY, as as DEFAULT_CURRENCY, at as DEVICE_TYPE, au as DayAvailability, av as DeliveryFeeDetails, aw as DeliveryFeeResponse, ax as DeliveryService, ay as DepositResult, az as DeviceType, aA as DismissMessageResponse, aB as ELEMENT_TYPES, aC as EVENT_TYPES, aD as ElementAppearance, aE as ElementEventHandler, aF as ElementEventType, aG as ElementOptions, aH as ElementType, aI as ElementsCheckoutData, aJ as ElementsCheckoutResult, aK as ElementsCustomerInfo, aL as ElementsOptions, aM as EnrollAndLinkOrderInput, aN as EnrollAndLinkOrderResult, aO as EnrollmentData, aP as Err, aQ as FeeBearerType, aR as FetchQuoteInput, aS as FulfillmentLink, aT as FulfillmentStatus, aU as FulfillmentType, aV as FxQuote, aW as FxQuoteRequest, aX as FxRateResponse, aY as FxService, aZ as GetAvailableSlotsInput, a_ as GetOrdersOptions, a$ as GetProductsOptions, b0 as IframeToParentMessage, b1 as InventoryService, b2 as LINK_MUTATION, b3 as LINK_QUERY, b4 as LineItem, b5 as LineType, b6 as LinkData, b7 as LinkEnrollResult, b8 as LinkService, b9 as LinkSession, ba as LinkStatusResult, bb as LiteBootstrap, bc as LiteService, bd as Location, be as LocationBooking, bf as LocationTaxBehavior, bg as LocationTaxOverrides, bh as LocationTimeProfile, bi as LocationWithDetails, bj as MESSAGE_TYPES, bk as MOBILE_MONEY_PROVIDER, bl as MobileMoneyData, bm as MobileMoneyDetails, bn as MobileMoneyProvider, bo as NextAction, bp as ORDER_MUTATION, bq as ORDER_TYPE, br as ObservabilityHooks, bs as Ok, bt as Order, bu as OrderChannel, bv as OrderFilter, bw as OrderFulfillmentSummary, bx as OrderGroup, by as OrderGroupDetails, bz as OrderGroupPayment, bA as OrderGroupPaymentState, bB as OrderGroupPaymentStatus, bC as OrderGroupPaymentSummary, bD as OrderGroupStatus, bE as OrderHistory, bF as OrderLineState, bG as OrderLineStatus, bH as OrderPaymentEvent, bI as OrderQueries, bJ as OrderSplitDetail, bK as OrderStatus, bL as OrderType, bM as OtpResult, bN as PAYMENT_METHOD, bO as PAYMENT_MUTATION, bP as PAYMENT_STATE, bQ as PICKUP_TIME_TYPE, bR as ParentToIframeMessage, bS as PaymentMethodInfo, bT as PaymentState, bU as PickupTime, bV as PickupTimeType, bW as PlaceDetailsResponse, bX as PlacesService, bY as PriceQuote, bZ as PricingOverrides, b_ as ProcessAndResolveOptions, b$ as ProcessCheckoutOptions, c0 as ProcessCheckoutResult, c1 as ProviderResolutionSource, c2 as QuoteBundleSelectionInput, c3 as QuoteCompositeSelectionInput, c4 as QuoteDynamicBuckets, c5 as QuoteStatus, c6 as QuoteUiMessage, c7 as ReadRequestOptions, c8 as RefreshQuoteInput, c9 as RefreshQuoteResult, ca as RefundOrderInput, cb as RelatedCandidate, cc as RelatedProduct, cd as RelatedProductsEnrichment, ce as RelationType, cf as ReminderMethod, cg as ReminderSettings, ch as ReorderResult, ci as RequestContext, cj as RequestErrorEvent, ck as RequestOptions, cl as RequestOtpInput, cm as RequestSource, cn as RequestStartEvent, co as RequestSuccessEvent, cp as RescheduleBookingInput, cq as RescheduleBookingResult, cr as RescheduleHistoryRecord, cs as ResourceAssignment, ct as Result, cu as RetryEvent, cv as RevokeAllSessionsResult, cw as RevokeSessionResult, cx as Room, cy as SchedulingMetadata, cz as SchedulingResult, cA as SchedulingService, cB as SenderType, cC as Service, cD as ServiceAvailabilityParams, cE as ServiceAvailabilityResult, cF as ServiceCharge, cG as ServiceNotes, cH as ServiceScheduleRequest, cI as ServiceStatus, cJ as SessionActivityData, cK as SessionChangeEvent, cL as SessionMessage, cM as SlotResourceInfo, cN as SlotStaffInfo, cO as Staff, cP as StaffAssignment, cQ as StaffRole, cR as StaffScheduleItem, cS as StockLevel, cT as StockStatus, cU as StorefrontBootstrap, cV as SubscriptionService, cW as SupportService, cX as Table, cY as TableInfo, cZ as TimeRange, c_ as TimeRanges, c$ as TimeSlot, d0 as TrackCategoryViewOptions, d1 as TrackProductViewOptions, d2 as UpdateAddressInput, d3 as UpdateOrderStatusInput, d4 as UpdateProfileInput, d5 as UploadInitResponse, d6 as UploadResult, d7 as UploadService, d8 as VerifyOtpInput, d9 as combine, da as combineObject, db as createCimplifyClient, dc as createElements, dd as err, de as flatMap, df as fromPromise, dg as getOrElse, dh as isErr, di as isOk, dj as mapError, dk as mapResult, dl as ok, dm as toNullable, dn as tryCatch, dp as unwrap } from './client-Bj2apl_y.mjs';
1
+ export { A as AUTHORIZATION_TYPE, a as AUTH_MUTATION, b as AbortablePromise, c as ActivityRecommendation, d as ActivityRecommendationsResponse, e as ActivityService, f as ActivityStateResponse, g as AddressData, h as AddressInfo, i as AmountToPay, j as AuthResponse, k as AuthService, l as AuthStatus, m as AuthenticatedCustomer, n as AuthenticatedData, o as AutocompletePrediction, p as AutocompleteResponse, q as AvailabilityResult, r as AvailableSlot, B as Booking, s as BookingModificationType, t as BookingStatus, u as BookingWithDetails, v as BufferTimes, w as Business, x as BusinessHours, y as BusinessPreferences, z as BusinessService, C as BusinessSettings, D as BusinessType, E as BusinessWithLocations, F as CHECKOUT_MODE, G as CHECKOUT_MUTATION, H as CHECKOUT_STEP, I as CONTACT_TYPE, J as CacheOptions, K as CancelBookingInput, L as CancelBookingResult, M as CancelOrderInput, N as CancellationPolicy, O as CartOperations, P as CatalogueQueries, Q as CatalogueResult, R as CatalogueSnapshot, S as CategoryInfo, T as ChatAttachment, U as ChatConversation, V as ChatConversationResponse, W as ChatMessage, X as ChatWidgetStarter, Y as CheckSlotAvailabilityInput, Z as CheckSlotAvailabilityResult, _ as CheckoutAddressInfo, $ as CheckoutCartData, a0 as CheckoutCartItem, a1 as CheckoutCustomerInfo, a2 as CheckoutFormData, a3 as CheckoutInput, a4 as CheckoutMode, a8 as CheckoutOperations, a5 as CheckoutOrderType, a6 as CheckoutPaymentMethod, a7 as CheckoutResult, a8 as CheckoutService, a9 as CheckoutStatus, aa as CheckoutStatusContext, ab as CheckoutStep, ac as CimplifyClient, ad as CimplifyConfig, ae as CimplifyElement, af as CimplifyElements, ag as ContactType, ah as ContentType, ai as CreateAddressInput, aj as CreateMobileMoneyInput, ak as Customer, al as CustomerAddress, am as CustomerBooking, an as CustomerBookingServiceItem, ao as CustomerLinkPreferences, ap as CustomerMobileMoney, aq as CustomerServicePreferences, ar as DEFAULT_COUNTRY, as as DEFAULT_CURRENCY, at as DEVICE_TYPE, au as DayAvailability, av as DeliveryFeeDetails, aw as DeliveryFeeResponse, ax as DeliveryService, ay as DepositResult, az as DeviceType, aA as DismissMessageResponse, aB as ELEMENT_TYPES, aC as EVENT_TYPES, aD as ElementAppearance, aE as ElementEventHandler, aF as ElementEventType, aG as ElementOptions, aH as ElementType, aI as ElementsCheckoutData, aJ as ElementsCheckoutResult, aK as ElementsCustomerInfo, aL as ElementsOptions, aM as EnrollAndLinkOrderInput, aN as EnrollAndLinkOrderResult, aO as EnrollmentData, aP as Err, aQ as FeeBearerType, aR as FetchQuoteInput, aS as FulfillmentLink, aT as FulfillmentStatus, aU as FulfillmentType, aV as FxQuote, aW as FxQuoteRequest, aX as FxRateResponse, aY as FxService, aZ as GetAvailableSlotsInput, a_ as GetOrdersOptions, a$ as GetProductsOptions, b0 as IframeToParentMessage, b1 as InventoryService, b2 as LINK_MUTATION, b3 as LINK_QUERY, b4 as LineItem, b5 as LineType, b6 as LinkData, b7 as LinkEnrollResult, b8 as LinkService, b9 as LinkSession, ba as LinkStatusResult, bb as LiteBootstrap, bc as LiteService, bd as Location, be as LocationBooking, bf as LocationTaxBehavior, bg as LocationTaxOverrides, bh as LocationTimeProfile, bi as LocationWithDetails, bj as MESSAGE_TYPES, bk as MOBILE_MONEY_PROVIDER, bl as MobileMoneyData, bm as MobileMoneyDetails, bn as MobileMoneyProvider, bo as NextAction, bp as ORDER_MUTATION, bq as ORDER_TYPE, br as ObservabilityHooks, bs as Ok, bt as Order, bu as OrderChannel, bv as OrderFilter, bw as OrderFulfillmentSummary, bx as OrderGroup, by as OrderGroupDetails, bz as OrderGroupPayment, bA as OrderGroupPaymentState, bB as OrderGroupPaymentStatus, bC as OrderGroupPaymentSummary, bD as OrderGroupStatus, bE as OrderHistory, bF as OrderLineState, bG as OrderLineStatus, bH as OrderPaymentEvent, bI as OrderQueries, bJ as OrderSplitDetail, bK as OrderStatus, bL as OrderType, bM as OtpResult, bN as PAYMENT_METHOD, bO as PAYMENT_MUTATION, bP as PAYMENT_STATE, bQ as PICKUP_TIME_TYPE, bR as ParentToIframeMessage, bS as PaymentMethodInfo, bT as PaymentState, bU as PickupTime, bV as PickupTimeType, bW as PlaceDetailsResponse, bX as PlacesService, bY as PriceQuote, bZ as PricingOverrides, b_ as ProcessAndResolveOptions, b$ as ProcessCheckoutOptions, c0 as ProcessCheckoutResult, c1 as ProviderResolutionSource, c2 as QuoteBundleSelectionInput, c3 as QuoteCompositeSelectionInput, c4 as QuoteDynamicBuckets, c5 as QuoteStatus, c6 as QuoteUiMessage, c7 as ReadRequestOptions, c8 as RefreshQuoteInput, c9 as RefreshQuoteResult, ca as RefundOrderInput, cb as RelatedCandidate, cc as RelatedProduct, cd as RelatedProductsEnrichment, ce as RelationType, cf as ReminderMethod, cg as ReminderSettings, ch as ReorderResult, ci as RequestContext, cj as RequestErrorEvent, ck as RequestOptions, cl as RequestOtpInput, cm as RequestSource, cn as RequestStartEvent, co as RequestSuccessEvent, cp as RescheduleBookingInput, cq as RescheduleBookingResult, cr as RescheduleHistoryRecord, cs as ResourceAssignment, ct as Result, cu as RetryEvent, cv as RevokeAllSessionsResult, cw as RevokeSessionResult, cx as Room, cy as SchedulingMetadata, cz as SchedulingResult, cA as SchedulingService, cB as SenderType, cC as Service, cD as ServiceAvailabilityParams, cE as ServiceAvailabilityResult, cF as ServiceCharge, cG as ServiceNotes, cH as ServiceScheduleRequest, cI as ServiceStatus, cJ as SessionActivityData, cK as SessionChangeEvent, cL as SessionMessage, cM as SlotResourceInfo, cN as SlotStaffInfo, cO as Staff, cP as StaffAssignment, cQ as StaffRole, cR as StaffScheduleItem, cS as StockLevel, cT as StockStatus, cU as StorefrontBootstrap, cV as SubscriptionService, cW as SupportService, cX as Table, cY as TableInfo, cZ as TimeRange, c_ as TimeRanges, c$ as TimeSlot, d0 as TrackCategoryViewOptions, d1 as TrackProductViewOptions, d2 as UpdateAddressInput, d3 as UpdateOrderStatusInput, d4 as UpdateProfileInput, d5 as UploadInitResponse, d6 as UploadResult, d7 as UploadService, d8 as VerifyOtpInput, d9 as combine, da as combineObject, db as createCimplifyClient, dc as createElements, dd as err, de as flatMap, df as fromPromise, dg as getOrElse, dh as isErr, di as isOk, dj as mapError, dk as mapResult, dl as ok, dm as toNullable, dn as tryCatch, dp as unwrap } from './client-DKg-5OWu.mjs';
2
2
  import { j as ApiError } from './product-B_kS4Oxa.mjs';
3
3
  export { A as AddOn, a as AddOnDetails, b as AddOnGroupDetails, c as AddOnOption, d as AddOnOptionDetails, e as AddOnOptionPrice, f as AddOnWithOptions, g as AddToCartInput, h as AddressValue, i as AdjustmentType, k as AppliedDiscount, l as AttributeAppliesTo, m as AttributeType, n as AttributeValidationRules, o as AttributeVisibility, B as BenefitType, p as BillingFrequency, q as BillingMarkupType, r as BillingPlanType, s as Bundle, t as BundleComponentData, u as BundleComponentInfo, v as BundleComponentVariantView, w as BundleComponentView, x as BundlePriceType, y as BundleProduct, z as BundleSelectionData, C as BundleSelectionInput, D as BundleStoredSelection, E as BundleSummary, F as BundleWithDetails, G as Cart, H as CartAddOn, I as CartChannel, J as CartItem, K as CartItemDetails, L as CartMutationResult, M as CartNotice, N as CartStatus, O as CartSummary, P as CartTotals, Q as Category, R as CategorySummary, S as ChosenPrice, T as CimplifyError, U as Collection, V as CollectionProduct, W as CollectionSummary, X as ComponentGroup, Y as ComponentGroupWithComponents, Z as ComponentPriceBreakdown, _ as ComponentSchedulingData, $ as ComponentSelectionInput, a0 as ComponentSourceType, a1 as Composite, a2 as CompositeComponent, a3 as CompositeComponentView, a4 as CompositeGroupView, a5 as CompositePriceBreakdown, a6 as CompositePriceResult, a7 as CompositePricingMode, a8 as CompositeSelectionData, $ as CompositeSelectionInput, a9 as CompositeStoredSelection, aa as CompositeWithDetails, ab as CurrencyCode, ac as CustomAttributeDefinition, ad as CustomAttributeValue, ae as CustomerInputValue, af as DURATION_UNIT, ag as DateRangeValue, ah as Deal, ai as DealBenefitType, aj as DepositType, ak as DigitalProductType, al as DiscountBreakdown, am as DiscountDetails, an as DiscountValidation, ao as DisplayAddOn, ap as DisplayAddOnOption, aq as DisplayCart, ar as DisplayCartItem, as as DisplayMode, at as DurationUnit, au as ERROR_HINTS, av as EligiblePlansQuery, aw as ErrorCode, ax as ErrorCodeType, ay as ErrorHint, az as FacetValue, aA as FormattedPlanOption, aB as GroupPricingBehavior, aC as INPUT_FIELD_TYPE, aD as IdempotencyMismatchError, aE as InputFieldType, aF as InputFieldValidation, aG as InventoryType, aH as KnowledgeArticle, aI as LineConfiguration, aJ as LocationProductPrice, aK as LocationValue, aL as MeasurementValue, aM as Money, aN as PRODUCT_TYPE, aO as Pagination, aP as PaginationParams, aQ as PhoneValue, aR as Price, aS as PriceAdjustment, aT as PriceDecisionPath, aU as PriceEntryType, aV as PricePathTaxInfo, aW as PriceSource, aX as Product, aY as ProductAddOn, aZ as ProductAvailability, a_ as ProductAvailabilityNow, a$ as ProductBillingPlan, b0 as ProductDealInfo, b1 as ProductInputField, b2 as ProductProperty, b3 as ProductRenderHint, b4 as ProductTaxonomy, b5 as ProductTimeProfile, b6 as ProductType, b7 as ProductVariant, b8 as ProductVariantValue, b9 as ProductWithDetails, ba as PropertyFacet, bb as PropertySource, bc as QuantityPricingTier, bd as RENDER_HINT, be as RelatedProductView, bf as SalesChannel, bg as SchedulingMode, bh as SelectedAddOnOption, bi as SemanticKind, bj as SignatureValue, bk as Subscription, bl as SubscriptionInvoice, bm as SubscriptionItem, bn as SubscriptionStatus, bo as SubscriptionWithDetails, bp as Tag, bq as TagsResponse, br as TaxPathComponent, bs as TaxonomyAttributeTemplate, bt as TaxonomyWithChildren, bu as UICart, bv as UICartBusiness, bw as UICartCustomer, bx as UICartLocation, by as UICartPricing, bz as UpdateCartItemInput, bA as VariantAxis, bB as VariantAxisSelection, bC as VariantAxisValue, bD as VariantAxisValueView, bE as VariantAxisView, bF as VariantAxisWithValues, bG as VariantDetails, bH as VariantDetailsDTO, bI as VariantDisplayAttribute, bJ as VariantLocationAvailability, bK as VariantStrategy, bL as VariantView, bM as ZERO, bN as currencyCode, bO as enrichError, bP as getErrorHint, bQ as isCimplifyError, bR as isIdempotencyMismatchError, bS as isQuoteConflictRequiringConsent, bT as isQuoteError, bU as isRetryableError, bV as isSupportedCurrency, bW as money, bX as moneyFromNumber } from './product-B_kS4Oxa.mjs';
4
4
  export { C as CURRENCY_SYMBOLS, M as MOBILE_MONEY_PROVIDERS, c as categorizePaymentError, d as detectMobileMoneyProvider, f as formatMoney, a as formatNumberCompact, b as formatPrice, e as formatPriceAdjustment, g as formatPriceCompact, h as formatPriceRange, i as formatPriceWithTax, j as formatProductPrice, k as getBasePrice, l as getCurrencySymbol, m as getDiscountPercentage, n as getDisplayPrice, o as getMarkupPercentage, p as getPriceRange, q as getProductCurrency, r as getTaxAmount, s as getUnitPriceAtQuantity, t as hasTaxInfo, u as isOnSale, v as isPaymentStatusFailure, w as isPaymentStatusRequiresAction, x as isPaymentStatusSuccess, y as isTaxInclusive, z as isValidPhoneForContext, A as normalizePaymentResponse, B as normalizePhoneToE164, D as normalizeStatusResponse, E as parsePrice, F as resolvePhoneCountryCode } from './index-D8vnKlOQ.mjs';
5
- export { A as AdConfig, a as AdContextValue, b as AdCreative, c as AdPosition, d as AdSlot, e as AdTheme, g as getVariantDisplayName } from './ads-C2c2Aald.mjs';
5
+ export { A as AdConfig, a as AdContextValue, b as AdCreative, c as AdPosition, d as AdSlot, e as AdTheme, S as SignInOptions, g as getVariantDisplayName, s as startSignIn } from './sign-in-TL01-awQ.mjs';
6
6
  export { A as AddressAuthorizationData, a as AuthorizationType, I as InitializePaymentResult, P as Payment, b as PaymentErrorDetails, c as PaymentMethod, d as PaymentMethodType, e as PaymentProcessingState, f as PaymentProvider, g as PaymentResponse, h as PaymentStatus, i as PaymentStatusResponse, S as SubmitAuthorizationInput } from './payment-DVS7ZUEp.mjs';
7
7
  export { F as FormatCompactOptions, a as FormatPriceOptions, P as ProductWithPrice } from './price-Cm0tU0V5.mjs';
8
8
  export { generateIdempotencyKey } from './advanced.mjs';
@@ -66,6 +66,21 @@ interface ApiResponse<T> {
66
66
  metadata?: ResponseMetadata;
67
67
  }
68
68
 
69
+ interface SilentSignInOptions {
70
+ clientId: string;
71
+ redirectUri: string;
72
+ callbackUri?: string;
73
+ sessionUri?: string;
74
+ scope?: string;
75
+ authUrl?: string;
76
+ timeoutMs?: number;
77
+ }
78
+ interface SilentSignInResult {
79
+ ok: boolean;
80
+ reason?: "already_signed_in" | "login_required" | "callback_failed" | "timeout" | "state_mismatch" | "exception";
81
+ }
82
+ declare function signInSilent(opts: SilentSignInOptions): Promise<SilentSignInResult>;
83
+
69
84
  declare const DEFAULT_CDN_BASE_URL = "https://storefrontassetscdn.cimplify.io";
70
85
  declare const CIMPLIFY_CDN_HOSTS: readonly ["storefrontassetscdn.cimplify.io", "cdn.cimplify.io", "static-tmp.cimplify.io"];
71
86
  interface AssetTransform {
@@ -80,4 +95,4 @@ interface AssetUrlOptions extends AssetTransform {
80
95
  declare function assetUrl(path: string, opts?: AssetUrlOptions): string;
81
96
  declare function isCimplifyAsset(src: string, base?: string): boolean;
82
97
 
83
- export { ApiError, type ApiResponse, type AssetTransform, type AssetUrlOptions, CIMPLIFY_CDN_HOSTS, type CustomerGroup, type CustomerPricingInfo, DEFAULT_CDN_BASE_URL, type FrontendContext, type MutationRequest, type PriceListItem, type QuantityBreak, type QueryRequest, type ResolvedQuantityBreak, type ResponseMetadata, assetUrl, isCimplifyAsset };
98
+ export { ApiError, type ApiResponse, type AssetTransform, type AssetUrlOptions, CIMPLIFY_CDN_HOSTS, type CustomerGroup, type CustomerPricingInfo, DEFAULT_CDN_BASE_URL, type FrontendContext, type MutationRequest, type PriceListItem, type QuantityBreak, type QueryRequest, type ResolvedQuantityBreak, type ResponseMetadata, type SilentSignInOptions, type SilentSignInResult, assetUrl, isCimplifyAsset, signInSilent };