@cimplify/sdk 0.104.0 → 0.105.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 (71) hide show
  1. package/dist/advanced.d.mts +3 -7
  2. package/dist/advanced.d.ts +3 -7
  3. package/dist/advanced.js +23 -23
  4. package/dist/advanced.mjs +4 -4
  5. package/dist/{client-BuLcOWLv.d.ts → catalogue-D1jkpGcr.d.ts} +415 -763
  6. package/dist/{client-D5AoobFc.d.mts → catalogue-DjutZ0FC.d.mts} +415 -763
  7. package/dist/{payment-g0HFkEDU.d.mts → checkout-XoV4HNg2.d.mts} +4156 -1498
  8. package/dist/{payment-g0HFkEDU.d.ts → checkout-XoV4HNg2.d.ts} +4156 -1498
  9. package/dist/{chunk-GOHSXBKW.mjs → chunk-33VCYWVL.mjs} +25 -1
  10. package/dist/{chunk-OKADBZAI.mjs → chunk-37ZZCE7P.mjs} +808 -574
  11. package/dist/{chunk-5BDYDZ4U.js → chunk-3IMPJEUI.js} +892 -657
  12. package/dist/{chunk-YVAEY3VC.js → chunk-7PMMV5X4.js} +1040 -364
  13. package/dist/{chunk-H3RATH4B.mjs → chunk-AVXA4F6G.js} +293 -2
  14. package/dist/{chunk-CNN7Z2IP.js → chunk-EV2EVOYS.js} +27 -0
  15. package/dist/{chunk-4BKOKHE3.js → chunk-NJYR6GGM.mjs} +244 -19
  16. package/dist/{chunk-DYIAX3WI.mjs → chunk-NYDVVNZI.mjs} +11 -2
  17. package/dist/{chunk-E4K2VQDD.js → chunk-PDTXSUHZ.js} +559 -16
  18. package/dist/{chunk-2WPVUIHX.mjs → chunk-Q5HX7LVE.mjs} +1036 -360
  19. package/dist/{chunk-5RT4HYMP.mjs → chunk-TINYV5E2.mjs} +542 -15
  20. package/dist/{chunk-7PDEX54K.js → chunk-UYFTOIFW.js} +13 -3
  21. package/dist/{chunk-OCCNG6MO.mjs → chunk-X7RPMALQ.mjs} +1310 -722
  22. package/dist/{chunk-IQFFSKE2.js → chunk-XHVQDEVO.js} +1345 -746
  23. package/dist/{client-BVNWjk6W.d.ts → client-BBZj15JJ.d.ts} +2 -2
  24. package/dist/{client-fM716k7G.d.mts → client-CZ8MjJ_o.d.mts} +2 -2
  25. package/dist/index-CZjNWbQf.d.ts +8 -0
  26. package/dist/index-DNxWfRHF.d.mts +8 -0
  27. package/dist/{index-BtcoqrY1.d.ts → index-DRMBo26v.d.mts} +9 -4
  28. package/dist/{index-D7Tf3v7c.d.mts → index-DweR60Cv.d.ts} +9 -4
  29. package/dist/index.d.mts +31 -14
  30. package/dist/index.d.ts +31 -14
  31. package/dist/index.js +325 -133
  32. package/dist/index.mjs +6 -6
  33. package/dist/mock/cli.mjs +1450 -386
  34. package/dist/mock/library.js +1176 -352
  35. package/dist/mock/library.mjs +1176 -352
  36. package/dist/mock/msw.js +1176 -352
  37. package/dist/mock/msw.mjs +1176 -352
  38. package/dist/{price-BLIeAb8K.d.ts → price-CUGIYRtD.d.mts} +1 -1
  39. package/dist/{price-Czq_cTC_.d.mts → price-De-sxcuj.d.ts} +1 -1
  40. package/dist/react.d.mts +10 -5
  41. package/dist/react.d.ts +10 -5
  42. package/dist/react.js +227 -197
  43. package/dist/react.mjs +90 -60
  44. package/dist/{server-DKK_D-PP.d.ts → server-Byr4d0hL.d.mts} +31 -57
  45. package/dist/{server-BkVhOIwn.d.mts → server-C_RIDnHU.d.ts} +31 -57
  46. package/dist/server.d.mts +3 -4
  47. package/dist/server.d.ts +3 -4
  48. package/dist/server.js +11 -11
  49. package/dist/server.mjs +5 -5
  50. package/dist/styles.css +2 -2
  51. package/dist/testing/msw.d.mts +2 -2
  52. package/dist/testing/msw.d.ts +2 -2
  53. package/dist/testing/msw.js +4 -4
  54. package/dist/testing/msw.mjs +3 -3
  55. package/dist/testing/suite.d.mts +5 -6
  56. package/dist/testing/suite.d.ts +5 -6
  57. package/dist/testing/suite.js +29 -28
  58. package/dist/testing/suite.mjs +10 -9
  59. package/dist/testing.d.mts +2478 -14
  60. package/dist/testing.d.ts +2478 -14
  61. package/dist/testing.js +167 -89
  62. package/dist/testing.mjs +24 -10
  63. package/dist/utils.d.mts +3 -4
  64. package/dist/utils.d.ts +3 -4
  65. package/dist/utils.js +35 -31
  66. package/dist/utils.mjs +2 -2
  67. package/package.json +9 -9
  68. package/registry/order-history.json +1 -1
  69. package/registry/order-summary.json +1 -1
  70. package/dist/link-D9iSVxt5.d.mts +0 -308
  71. package/dist/link-D9iSVxt5.d.ts +0 -308
@@ -1,5 +1,4 @@
1
- import { X as CimplifyError, U as Category, be as Product, f as AddOnWithOptions, aW as Pagination, bs as ProductWithDetails, bq as ProductVariant, bY as VariantAxis, bZ as VariantAxisSelection, A as AddOn, Y as Collection, I as BundleSummary, w as Bundle, a5 as Composite, a3 as ComponentSelectionInput, aa as CompositePriceResult, af as CurrencyCode, W as ChosenPrice, bz as SaleInfo, bn as ProductTaxonomy, bQ as TaxonomyWithChildren, aC as EligiblePlansQuery, bi as ProductBillingPlan, bo as ProductTimeProfile, bh as ProductAvailabilityNow, al as Deal, bj as ProductDealInfo, au as DiscountValidation, bM as TagsResponse, ag as CustomAttributeDefinition, ah as CustomAttributeValue, bt as PropertyFacet, bP as TaxonomyAttributeTemplate, aP as KnowledgeArticle, bR as UICart, N as CartItem, aq as DestinationQuoteInput, ao as DestinationQuote, S as CartSummary, g as AddToCartInput, P as CartMutationResult, bX as UpdateCartItemInput, at as DiscountDetails, aU as Money, aQ as LineConfiguration, bO as TaxPriceDisplayMode, q as AuthorizationType, aZ as PaymentAuthorizationKind, a_ as PaymentAuthorizationSubmission, b0 as PaymentMethod, aL as InitializePaymentResult, bF as SubmitAuthorizationInput, b6 as PaymentStatusResponse, c2 as VariantDetails, c3 as VariantDetailsDTO, a as AddOnDetails, d as AddOnOptionDetails, b as AddOnGroupDetails, F as BundleSelectionData, ac as CompositeSelectionData, ai as CustomerInputValue, c9 as components, bB as SchedulingMode, aA as DurationUnit, bG as Subscription, bK as SubscriptionWithDetails } from './payment-g0HFkEDU.mjs';
2
- import { P as PAYMENT_METHOD, B as ORDER_TYPE, z as MobileMoneyProvider, C as CHECKOUT_MODE, e as CHECKOUT_STEP, H as PICKUP_TIME_TYPE, R as RequestOtpInput, I as RequestOtpResult$1, V as VerifyOtpInput, c as AuthResponse, w as LinkStatusResult, t as LinkData, k as CustomerAddress, m as CustomerMobileMoney, l as CustomerLinkPreferences, j as Customer, r as EnrollmentData, u as LinkEnrollResult, E as EnrollAndLinkOrderInput, q as EnrollAndLinkOrderResult, h as CreateAddressInput, U as UpdateAddressInput, i as CreateMobileMoneyInput, v as LinkSession, K as RevokeSessionResult, J as RevokeAllSessionsResult } from './link-D9iSVxt5.mjs';
1
+ import { c as CimplifyError, eJ as UICart, ap as CartItem, bC as DestinationQuoteInput, bA as DestinationQuote, au as CartSummary, t as AddToCartInput, ar as CartMutationResult, eQ as UpdateCartItemInput, bG as DiscountDetails, cH as Money, a as ChosenPrice, C as CurrencyCode, cq as LineConfiguration, cL as NextAction, ab as CHECKOUT_NEXT_ACTION, c8 as ErrorCode, aC as CheckoutCollectionOptions, aI as CheckoutFormData, aU as CheckoutResult, dm as PaymentMethod, ch as InitializePaymentResult, ex as SubmitAuthorizationInput, dx as PaymentStatusResponse, aG as CheckoutCustomerInfo, dI as ProcessAndResolveOptions, dK as ProcessCheckoutResult, i as ConfirmPurchaseIntentRequest, bh as ConfirmPurchaseIntentResponse, d7 as PURCHASE_INTENT_RESOLVE_STATUS, d$ as PurchaseIntentActionResponse, c_ as PURCHASE_INTENT_ACTION_DECISION, ey as SubmitPurchaseIntentActionRequest, c$ as PURCHASE_INTENT_CONFIRM_STATUS, e6 as PurchaseIntentResolution, cC as MintPurchaseIntentRequest, ed as PurchaseIntentView, dB as PreparePurchaseIntentRequest, eX as VariantDetails, eY as VariantDetailsDTO, n as AddOnDetails, q as AddOnOptionDetails, o as AddOnGroupDetails, a0 as BundleSelectionData, be as CompositeSelectionData, bp as CustomerInputValue, el as RequestOtpInput, em as RequestOtpResult$1, f1 as VerifyOtpInput, H as AuthResponse, cu as LinkStatusResult, cr as LinkData, bo as CustomerAddress, br as CustomerMobileMoney, bq as CustomerLinkPreferences, bn as Customer, c7 as EnrollmentData, cs as LinkEnrollResult, c5 as EnrollAndLinkOrderInput, c6 as EnrollAndLinkOrderResult, bj as CreateAddressInput, eP as UpdateAddressInput, bk as CreateMobileMoneyInput, ct as LinkSession, eo as RevokeSessionResult, en as RevokeAllSessionsResult, fe as components, er as SchedulingMode, D as DurationUnit, P as Product, ez as Subscription, eD as SubscriptionWithDetails, c3 as ElementsOptions, bX as ElementType, bW as ElementOptions, bV as ElementEventType, bU as ElementEventHandler, ay as CheckoutCartData, df as ParentToIframeMessage, cg as IframeToParentMessage, J as AuthenticatedData, c0 as ElementsCheckoutData, c1 as ElementsCheckoutResult, dJ as ProcessCheckoutOptions, l as AbortablePromise, w as AddressInfo, dn as PaymentMethodInfo, bY as ElementsAuthContactType, b as Category, s as AddOnWithOptions, dd as Pagination, e as ProductWithDetails, dW as ProductVariant, eR as VariantAxis, eS as VariantAxisSelection, m as AddOn, d as Collection, a3 as BundleSummary, V as Bundle, b7 as Composite, b5 as ComponentSelectionInput, bc as CompositePriceResult, S as SaleInfo, dT as ProductTaxonomy, eI as TaxonomyWithChildren, c4 as EligiblePlansQuery, dO as ProductBillingPlan, dU as ProductTimeProfile, dN as ProductAvailabilityNow, bx as Deal, dP as ProductDealInfo, bH as DiscountValidation, eF as TagsResponse, bl as CustomAttributeDefinition, bm as CustomAttributeValue, dY as PropertyFacet, eH as TaxonomyAttributeTemplate, cl as KnowledgeArticle } from './checkout-XoV4HNg2.mjs';
3
2
 
4
3
  interface RequestContext {
5
4
  method: "GET" | "POST" | "PATCH" | "DELETE";
@@ -26,10 +25,16 @@ interface RetryEvent extends RequestContext {
26
25
  delayMs: number;
27
26
  error: Error;
28
27
  }
28
+ declare const SESSION_CHANGE_SOURCE: {
29
+ readonly RESPONSE: "response";
30
+ readonly MANUAL: "manual";
31
+ readonly CLEAR: "clear";
32
+ };
33
+ type SessionChangeSource = (typeof SESSION_CHANGE_SOURCE)[keyof typeof SESSION_CHANGE_SOURCE];
29
34
  interface SessionChangeEvent {
30
35
  previousToken: string | null;
31
36
  newToken: string | null;
32
- source: "response" | "manual" | "clear";
37
+ source: SessionChangeSource;
33
38
  }
34
39
  interface ObservabilityHooks {
35
40
  onRequestStart?: (event: RequestStartEvent) => void;
@@ -111,21 +116,6 @@ interface ClientEvents {
111
116
  emit<K extends ClientEventName>(name: K, payload: ClientEventMap[K]): void;
112
117
  }
113
118
 
114
- interface CatalogueResult<T> {
115
- items: T[];
116
- is_complete: boolean;
117
- total_available?: number;
118
- pagination?: Pagination;
119
- }
120
- interface CatalogueSnapshot {
121
- categories: Category[];
122
- products: Product[];
123
- add_ons: AddOnWithOptions[];
124
- is_complete: boolean;
125
- total_available?: number;
126
- pagination?: Pagination;
127
- }
128
-
129
119
  type Result<T, E = Error> = Ok<T> | Err<E>;
130
120
  interface Ok<T> {
131
121
  readonly ok: true;
@@ -155,188 +145,6 @@ declare function combineObject<T extends Record<string, Result<unknown, unknown>
155
145
  interface IdempotencyOption$9 {
156
146
  idempotencyKey?: string;
157
147
  }
158
- interface GetProductsOptions {
159
- category?: string;
160
- taxonomy?: string;
161
- search?: string;
162
- page?: number;
163
- limit?: number;
164
- offset?: number;
165
- cursor?: string;
166
- tags?: string[];
167
- featured?: boolean;
168
- in_stock?: boolean;
169
- min_price?: number;
170
- max_price?: number;
171
- sort_by?: "name" | "price" | "created_at" | "updated_at";
172
- sort_order?: "asc" | "desc";
173
- /** Property filters — e.g. { material: "Cotton", size: "M,L" }. Values are comma-separated for multi-value. */
174
- properties?: Record<string, string>;
175
- }
176
- interface QuoteCompositeSelectionInput {
177
- component_id: string;
178
- quantity: number;
179
- variant_id?: string;
180
- add_on_option_id?: string;
181
- }
182
- interface QuoteBundleSelectionInput {
183
- component_id: string;
184
- quantity: number;
185
- variant_id?: string;
186
- }
187
- interface FetchQuoteInput {
188
- product_id: string;
189
- variant_id?: string;
190
- location_id?: string;
191
- quantity?: number;
192
- add_on_option_ids?: string[];
193
- bundle_selections?: QuoteBundleSelectionInput[];
194
- composite_selections?: QuoteCompositeSelectionInput[];
195
- }
196
- interface RefreshQuoteInput {
197
- quote_id: string;
198
- product_id?: string;
199
- variant_id?: string;
200
- location_id?: string;
201
- quantity?: number;
202
- add_on_option_ids?: string[];
203
- bundle_selections?: QuoteBundleSelectionInput[];
204
- composite_selections?: QuoteCompositeSelectionInput[];
205
- }
206
- type QuoteStatus = "pending" | "used" | "expired";
207
- interface QuoteDynamicBuckets {
208
- intent?: string;
209
- demand?: string;
210
- inventory?: string;
211
- competition?: string;
212
- }
213
- interface QuoteUiMessage {
214
- code: string;
215
- level: "info" | "warn" | "error" | string;
216
- text: string;
217
- countdown_seconds?: number;
218
- }
219
- type RequestSource = "web" | "qr_code" | "order_taker" | "ucp_a2a";
220
- interface PriceQuote {
221
- quote_id: string;
222
- business_id: string;
223
- product_id: string;
224
- variant_id?: string | null;
225
- location_id?: string | null;
226
- source: RequestSource;
227
- customer_id?: string | null;
228
- customer_segment_id?: string | null;
229
- storefront_id?: string | null;
230
- attribution_id?: string | null;
231
- quantity: number;
232
- currency?: CurrencyCode | null;
233
- snapshot_id?: string | null;
234
- snapshot_markup_version?: string | null;
235
- snapshot_tax_version?: string | null;
236
- item_price_info: ChosenPrice;
237
- variant_price_info?: ChosenPrice | null;
238
- final_price_info: ChosenPrice;
239
- sale?: SaleInfo | null;
240
- add_on_option_ids: string[];
241
- bundle_selections?: QuoteBundleSelectionInput[];
242
- add_ons_price_info?: ChosenPrice | null;
243
- quoted_total_price_info?: ChosenPrice | null;
244
- composite_selections?: QuoteCompositeSelectionInput[];
245
- dynamic_buckets: QuoteDynamicBuckets;
246
- ui_messages: QuoteUiMessage[];
247
- created_at: string;
248
- expires_at: string;
249
- next_change_at?: string | null;
250
- status: QuoteStatus;
251
- }
252
- interface RefreshQuoteResult {
253
- previous_quote_id: string;
254
- quote: PriceQuote;
255
- }
256
- declare class CatalogueQueries {
257
- private client;
258
- constructor(client: CimplifyClient);
259
- getCatalogue(opts?: ReadRequestOptions): Promise<Result<CatalogueSnapshot, CimplifyError>>;
260
- getProducts(options?: GetProductsOptions, opts?: ReadRequestOptions): Promise<Result<CatalogueResult<Product>, CimplifyError>>;
261
- getProduct(id: string, opts?: ReadRequestOptions): Promise<Result<ProductWithDetails, CimplifyError>>;
262
- getProductBySlug(slug: string, opts?: ReadRequestOptions): Promise<Result<ProductWithDetails, CimplifyError>>;
263
- getVariants(productId: string): Promise<Result<ProductVariant[], CimplifyError>>;
264
- getVariantAxes(productId: string): Promise<Result<VariantAxis[], CimplifyError>>;
265
- getVariantByAxisSelections(productId: string, selections: VariantAxisSelection): Promise<Result<ProductVariant | null, CimplifyError>>;
266
- getVariantById(productId: string, variantId: string): Promise<Result<ProductVariant, CimplifyError>>;
267
- getAddOns(productId: string, opts?: ReadRequestOptions): Promise<Result<AddOn[], CimplifyError>>;
268
- getCategories(opts?: ReadRequestOptions): Promise<Result<Category[], CimplifyError>>;
269
- getCategory(id: string, opts?: ReadRequestOptions): Promise<Result<Category, CimplifyError>>;
270
- getCategoryBySlug(slug: string, opts?: ReadRequestOptions): Promise<Result<Category, CimplifyError>>;
271
- getCategoryProducts(categoryId: string, options?: {
272
- limit?: number;
273
- offset?: number;
274
- }, opts?: ReadRequestOptions): Promise<Result<Product[], CimplifyError>>;
275
- getCollections(opts?: ReadRequestOptions): Promise<Result<Collection[], CimplifyError>>;
276
- getCollection(id: string, opts?: ReadRequestOptions): Promise<Result<Collection, CimplifyError>>;
277
- getCollectionBySlug(slug: string, opts?: ReadRequestOptions): Promise<Result<Collection, CimplifyError>>;
278
- getCollectionProducts(collectionId: string, options?: {
279
- limit?: number;
280
- offset?: number;
281
- }, opts?: ReadRequestOptions): Promise<Result<Product[], CimplifyError>>;
282
- searchCollections(query: string, limit?: number): Promise<Result<Collection[], CimplifyError>>;
283
- getBundles(): Promise<Result<BundleSummary[], CimplifyError>>;
284
- getBundle(id: string): Promise<Result<Bundle, CimplifyError>>;
285
- getBundleBySlug(slug: string): Promise<Result<Bundle, CimplifyError>>;
286
- searchBundles(query: string, limit?: number): Promise<Result<Bundle[], CimplifyError>>;
287
- getComposites(options?: {
288
- limit?: number;
289
- }): Promise<Result<Composite[], CimplifyError>>;
290
- getComposite(id: string): Promise<Result<Composite, CimplifyError>>;
291
- getCompositeByProduct(productId: string): Promise<Result<Composite, CimplifyError>>;
292
- calculateCompositePrice(compositeId: string, selections: ComponentSelectionInput[], locationId?: string): Promise<Result<CompositePriceResult, CimplifyError>>;
293
- fetchQuote(input: FetchQuoteInput, opts?: IdempotencyOption$9): Promise<Result<PriceQuote, CimplifyError>>;
294
- getQuote(quoteId: string): Promise<Result<PriceQuote, CimplifyError>>;
295
- refreshQuote(input: RefreshQuoteInput): Promise<Result<RefreshQuoteResult, CimplifyError>>;
296
- getTaxonomies(parentId?: string): Promise<Result<ProductTaxonomy[], CimplifyError>>;
297
- getTaxonomy(id: string): Promise<Result<TaxonomyWithChildren, CimplifyError>>;
298
- getTaxonomyPath(id: string): Promise<Result<ProductTaxonomy[], CimplifyError>>;
299
- searchTaxonomies(query: string, limit?: number): Promise<Result<ProductTaxonomy[], CimplifyError>>;
300
- getEligibleBillingPlans(productId: string, query?: EligiblePlansQuery): Promise<Result<ProductBillingPlan[], CimplifyError>>;
301
- getProductSchedules(productId: string): Promise<Result<ProductTimeProfile[], CimplifyError>>;
302
- checkProductAvailableNow(productId: string, locationId: string): Promise<Result<ProductAvailabilityNow, CimplifyError>>;
303
- getDeals(locationId?: string): Promise<Result<Deal[], CimplifyError>>;
304
- getProductsOnSale(): Promise<Result<ProductDealInfo[], CimplifyError>>;
305
- getProductDeals(productId: string): Promise<Result<Deal[], CimplifyError>>;
306
- getCategoryDeals(categoryId: string): Promise<Result<Deal[], CimplifyError>>;
307
- getCollectionDeals(collectionId: string): Promise<Result<Deal[], CimplifyError>>;
308
- validateDiscountCode(code: string, orderSubtotal: string, locationId?: string): Promise<Result<DiscountValidation, CimplifyError>>;
309
- search(query: string, options?: Omit<GetProductsOptions, "search">, opts?: ReadRequestOptions): Promise<Result<Product[], CimplifyError>>;
310
- searchProducts(query: string, options?: Omit<GetProductsOptions, "search">, opts?: ReadRequestOptions): Promise<Result<Product[], CimplifyError>>;
311
- getMenu(options?: {
312
- category?: string;
313
- limit?: number;
314
- }): Promise<Result<Product[], CimplifyError>>;
315
- getMenuCategory(categoryId: string): Promise<Result<Product[], CimplifyError>>;
316
- getMenuItem(itemId: string): Promise<Result<ProductWithDetails, CimplifyError>>;
317
- getTags(options?: {
318
- tag_group?: string;
319
- search?: string;
320
- min_usage?: number;
321
- limit?: number;
322
- offset?: number;
323
- }): Promise<Result<TagsResponse, CimplifyError>>;
324
- getAttributeDefinitions(namespace?: string): Promise<Result<CustomAttributeDefinition[], CimplifyError>>;
325
- getProductAttributes(productId: string): Promise<Result<CustomAttributeValue[], CimplifyError>>;
326
- getCategoryAttributes(categoryId: string): Promise<Result<CustomAttributeValue[], CimplifyError>>;
327
- getCollectionAttributes(collectionId: string): Promise<Result<CustomAttributeValue[], CimplifyError>>;
328
- getPropertyFacets(options?: {
329
- category_id?: string;
330
- product_type?: string;
331
- }): Promise<Result<PropertyFacet[], CimplifyError>>;
332
- getTaxonomyAttributes(taxonomyId: string): Promise<Result<TaxonomyAttributeTemplate[], CimplifyError>>;
333
- searchKnowledge(query: string, limit?: number): Promise<Result<KnowledgeArticle[], CimplifyError>>;
334
- getKnowledgeArticles(): Promise<Result<KnowledgeArticle[], CimplifyError>>;
335
- }
336
-
337
- interface IdempotencyOption$8 {
338
- idempotencyKey?: string;
339
- }
340
148
  interface ReorderResult {
341
149
  added: {
342
150
  item_id: string;
@@ -355,12 +163,12 @@ declare class CartOperations {
355
163
  getTotal(): Promise<Result<string, CimplifyError>>;
356
164
  quoteDestination(input: DestinationQuoteInput): Promise<Result<DestinationQuote, CimplifyError>>;
357
165
  getSummary(): Promise<Result<CartSummary, CimplifyError>>;
358
- addItem(input: AddToCartInput, opts?: IdempotencyOption$8): Promise<Result<CartMutationResult, CimplifyError>>;
166
+ addItem(input: AddToCartInput, opts?: IdempotencyOption$9): Promise<Result<CartMutationResult, CimplifyError>>;
359
167
  updateItem(cartItemId: string, updates: UpdateCartItemInput): Promise<Result<CartMutationResult, CimplifyError>>;
360
168
  updateQuantity(cartItemId: string, quantity: number): Promise<Result<CartMutationResult, CimplifyError>>;
361
169
  removeItem(cartItemId: string): Promise<Result<CartMutationResult, CimplifyError>>;
362
170
  clear(): Promise<Result<CartMutationResult, CimplifyError>>;
363
- applyCoupon(code: string, opts?: IdempotencyOption$8): Promise<Result<CartMutationResult, CimplifyError>>;
171
+ applyCoupon(code: string, opts?: IdempotencyOption$9): Promise<Result<CartMutationResult, CimplifyError>>;
364
172
  removeCoupon(): Promise<Result<CartMutationResult, CimplifyError>>;
365
173
  reorderFromOrder(orderId: string): Promise<Result<ReorderResult, CimplifyError>>;
366
174
  isEmpty(): Promise<Result<boolean, CimplifyError>>;
@@ -368,7 +176,7 @@ declare class CartOperations {
368
176
  findItem(productId: string, variantId?: string): Promise<Result<CartItem | undefined, CimplifyError>>;
369
177
  }
370
178
 
371
- type OrderStatus = "pending" | "created" | "confirmed" | "in_preparation" | "ready_to_serve" | "partially_served" | "served" | "delivered" | "picked_up" | "completed" | "cancelled" | "refunded";
179
+ type OrderStatus = "pending" | "created" | "confirmed" | "in_preparation" | "ready_to_serve" | "partially_served" | "served" | "delivered" | "picked_up" | "completed" | "cancelled";
372
180
  type PaymentState = "not_paid" | "partially_paid" | "paid" | "partially_refunded" | "refunded";
373
181
  type OriginChannel = "web" | "qr" | "desk" | "tap" | "chat" | "whatsapp" | "instagram" | "telegram" | "messenger" | "sms" | "email" | "agent";
374
182
  type OriginActor = "customer" | "staff" | "agent" | "system";
@@ -766,531 +574,30 @@ interface RelatedProduct {
766
574
  updated_at: string;
767
575
  metadata?: Record<string, unknown>;
768
576
  }
769
- interface RelatedCandidate {
770
- product_id: string;
771
- relation_type: RelationType;
772
- source: string;
773
- score: number;
774
- is_enabled: boolean;
775
- display_order: number;
776
- }
777
- interface RelatedProductsEnrichment {
778
- upsells: RelatedCandidate[];
779
- cross_sells: RelatedCandidate[];
780
- }
781
-
782
- type OrderType = "delivery" | "pickup" | "dine-in" | "walk-in";
783
- declare const ELEMENT_TYPES: {
784
- readonly AUTH: "auth";
785
- readonly ADDRESS: "address";
786
- readonly PAYMENT: "payment";
787
- readonly CHECKOUT: "checkout";
788
- readonly ACCOUNT: "account";
789
- };
790
- type ElementType = (typeof ELEMENT_TYPES)[keyof typeof ELEMENT_TYPES];
791
- declare const MESSAGE_TYPES: {
792
- readonly INIT: "init";
793
- readonly SET_TOKEN: "set_token";
794
- readonly SET_SESSION: "set_session";
795
- readonly SESSION_CLEARED: "session_cleared";
796
- readonly SET_CART: "set_cart";
797
- readonly GET_DATA: "get_data";
798
- readonly NAVIGATE: "navigate";
799
- readonly REFRESH_TOKEN: "refresh_token";
800
- readonly LOGOUT: "logout";
801
- readonly PROCESS_CHECKOUT: "process_checkout";
802
- readonly ABORT_CHECKOUT: "abort_checkout";
803
- readonly READY: "ready";
804
- readonly HEIGHT_CHANGE: "height_change";
805
- readonly ERROR: "error";
806
- readonly ADDRESS_CHANGED: "address_changed";
807
- readonly ADDRESS_SELECTED: "address_selected";
808
- readonly PAYMENT_METHOD_SELECTED: "payment_method_selected";
809
- readonly LOGOUT_COMPLETE: "logout_complete";
810
- readonly AUTH_REQUESTED: "auth_requested";
811
- readonly SESSION_ESTABLISHED: "session_established";
812
- readonly SESSION_ESTABLISHMENT_FAILED: "session_establishment_failed";
813
- readonly CONTINUE_WITHOUT_SAVED_DETAILS: "continue_without_saved_details";
814
- readonly CONTACT_PROVIDED: "contact_provided";
815
- readonly CHECKOUT_STATUS: "checkout_status";
816
- readonly CHECKOUT_COMPLETE: "checkout_complete";
817
- readonly ORDER_TYPE_CHANGED: "order_type_changed";
818
- readonly REQUEST_SUBMIT: "request_submit";
819
- };
820
- interface ElementsOptions {
821
- linkUrl?: string;
822
- appearance?: ElementAppearance;
823
- auth?: ElementsAuthOptions;
824
- }
825
- interface ElementsAuthOptions {
826
- clientId?: string;
827
- redirectUri?: string;
828
- callbackUri?: string;
829
- scope?: string;
830
- issuer?: string;
831
- authUrl?: string;
832
- }
833
- interface ElementAppearance {
834
- theme?: "light" | "dark";
835
- variables?: {
836
- primaryColor?: string;
837
- fontFamily?: string;
838
- borderRadius?: string;
839
- };
840
- }
841
- interface ElementOptions {
842
- mode?: "shipping" | "billing";
843
- prefillEmail?: string;
844
- amount?: number;
845
- currency?: CurrencyCode;
846
- orderTypes?: OrderType[];
847
- defaultOrderType?: OrderType;
848
- submitLabel?: string;
849
- }
850
- interface AddressInfo {
851
- id?: string;
852
- latitude?: number;
853
- longitude?: number;
854
- street_address: string;
855
- apartment?: string;
856
- city: string;
857
- region: string;
858
- postal_code?: string;
859
- country?: string;
860
- delivery_instructions?: string;
861
- phone_for_delivery?: string;
862
- }
863
- interface PaymentMethodInfo {
864
- id?: string;
865
- type: "mobile_money" | "card" | "cash";
866
- provider?: string;
867
- last_four?: string;
868
- phone_number?: string;
869
- label?: string;
870
- }
871
- interface AuthenticatedCustomer {
872
- name: string;
873
- email: string | null;
874
- phone: string | null;
875
- }
876
- type ElementsCustomerInfo = {
877
- name: string;
878
- email: string | null;
879
- phone: string | null;
880
- } | null;
881
- declare const ELEMENTS_AUTH_CONTACT_TYPES: {
882
- readonly EMAIL: "email";
883
- readonly PHONE: "phone";
884
- };
885
- type ElementsAuthContactType = (typeof ELEMENTS_AUTH_CONTACT_TYPES)[keyof typeof ELEMENTS_AUTH_CONTACT_TYPES];
886
- declare const ELEMENTS_AUTH_PROMPTS: {
887
- readonly LOGIN: "login";
888
- };
889
- type ElementsAuthPrompt = (typeof ELEMENTS_AUTH_PROMPTS)[keyof typeof ELEMENTS_AUTH_PROMPTS];
890
- declare const ELEMENTS_AUTH_MODES: {
891
- readonly CHECKOUT: "checkout";
892
- readonly DEFAULT: "default";
893
- };
894
- type ElementsAuthMode = (typeof ELEMENTS_AUTH_MODES)[keyof typeof ELEMENTS_AUTH_MODES];
895
- interface AuthenticatedData {
896
- accountId: string;
897
- customerId: string;
898
- token: string;
899
- customer: AuthenticatedCustomer;
900
- }
901
- interface ElementsCheckoutData {
902
- cart_id: string;
903
- order_type?: OrderType;
904
- location_id?: string;
905
- scheduled_time?: string;
906
- tip_amount?: number;
907
- notes?: string;
908
- }
909
- interface ElementsCheckoutResult {
910
- success: boolean;
911
- order?: {
912
- id: string;
913
- status: string;
914
- total: string;
915
- };
916
- error?: {
917
- code: string;
918
- message: string;
919
- };
920
- }
921
- interface CheckoutCartItem {
922
- name: string;
923
- quantity: number;
924
- unit_price: string;
925
- total_price: string;
926
- image_url?: string;
927
- line_type: "simple" | "service" | "bundle" | "composite" | "digital";
928
- variant_name?: string;
929
- scheduled_start?: string;
930
- scheduled_end?: string;
931
- selections?: {
932
- name: string;
933
- quantity: number;
934
- variant_name?: string;
935
- }[];
936
- add_ons?: {
937
- name: string;
938
- price: string;
939
- }[];
940
- special_instructions?: string;
941
- }
942
- interface CheckoutCartData {
943
- items: CheckoutCartItem[];
944
- subtotal: string;
945
- tax_amount: string;
946
- total_discounts: string;
947
- service_charge: string;
948
- /** Server-quoted delivery fee selected in checkout. The cart total excludes
949
- * this value until checkout has a delivery address and rate. */
950
- delivery_fee?: string;
951
- total: string;
952
- currency: string;
953
- /** Tax is baked into the prices (e.g. Ghana VAT), so `tax_amount` is already
954
- * inside `subtotal`/`total`. Checkout labels it "included" rather than
955
- * summing it onto the total. */
956
- tax_inclusive: boolean;
957
- /** Tax rate in percentage points (8.25 means 8.25%). */
958
- tax_rate?: string | number;
959
- /** Reviewed presentation policy; `gross_required` markets show inclusive
960
- * prices even when the tax arithmetic is exclusive. */
961
- price_display_mode?: TaxPriceDisplayMode;
962
- /** Deposit due now when the cart has deposit-eligible service items, so the
963
- * checkout can offer "pay deposit now, balance later". Absent/0 otherwise. */
964
- deposit_required?: boolean;
965
- deposit_amount?: string;
966
- requires_delivery?: boolean;
967
- }
968
- type ParentToIframeMessage = {
969
- type: typeof MESSAGE_TYPES.INIT;
970
- businessId: string;
971
- publicKey: string;
972
- prefillEmail?: string;
973
- appearance?: ElementAppearance;
974
- orderTypes?: OrderType[];
975
- defaultOrderType?: OrderType;
976
- renderSubmitButton?: boolean;
977
- submitLabel?: string;
978
- token?: string;
979
- merchantName?: string;
980
- } | {
981
- type: typeof MESSAGE_TYPES.SET_TOKEN;
982
- token: string;
983
- } | {
984
- /** Host could not claim the iframe-verified Link identity. The echoed
985
- * bearer correlates this response to the still-current OTP handoff. */
986
- type: typeof MESSAGE_TYPES.SESSION_ESTABLISHMENT_FAILED;
987
- accessToken: string;
988
- code: string;
989
- message: string;
990
- } | {
991
- /** Host cart session; the iframe adopts it so destination quotes read the host's cart. */
992
- type: typeof MESSAGE_TYPES.SET_SESSION;
993
- sessionToken: string;
994
- } | {
995
- /** The host rotated back to anonymous authority. Every sibling iframe
996
- * must discard its bearer and identity-derived projections. */
997
- type: typeof MESSAGE_TYPES.SESSION_CLEARED;
998
- sessionToken: string;
999
- } | {
1000
- type: typeof MESSAGE_TYPES.NAVIGATE;
1001
- path: string;
1002
- } | {
1003
- type: typeof MESSAGE_TYPES.SET_CART;
1004
- cart: CheckoutCartData;
1005
- } | {
1006
- type: typeof MESSAGE_TYPES.GET_DATA;
1007
- } | {
1008
- type: typeof MESSAGE_TYPES.REFRESH_TOKEN;
1009
- } | {
1010
- type: typeof MESSAGE_TYPES.LOGOUT;
1011
- } | {
1012
- type: typeof MESSAGE_TYPES.PROCESS_CHECKOUT;
1013
- cart_id: string;
1014
- order_type?: OrderType;
1015
- location_id?: string;
1016
- notes?: string;
1017
- scheduled_time?: string;
1018
- tip_amount?: number;
1019
- pay_currency?: CurrencyCode;
1020
- enroll_in_link?: boolean;
1021
- address?: AddressInfo;
1022
- customer?: ElementsCustomerInfo;
1023
- account_id?: string;
1024
- customer_id?: string;
1025
- } | {
1026
- type: typeof MESSAGE_TYPES.ABORT_CHECKOUT;
1027
- };
1028
- type IframeToParentMessage = {
1029
- type: typeof MESSAGE_TYPES.READY;
1030
- height: number;
1031
- } | {
1032
- type: typeof MESSAGE_TYPES.HEIGHT_CHANGE;
1033
- height: number;
1034
- } | {
1035
- type: typeof MESSAGE_TYPES.CONTACT_PROVIDED;
1036
- contact: string;
1037
- contactType: ElementsAuthContactType;
1038
- } | {
1039
- type: typeof MESSAGE_TYPES.ERROR;
1040
- code: string;
1041
- message: string;
1042
- } | {
1043
- type: typeof MESSAGE_TYPES.ADDRESS_CHANGED;
1044
- address: AddressInfo;
1045
- saveToLink: boolean;
1046
- } | {
1047
- type: typeof MESSAGE_TYPES.ADDRESS_SELECTED;
1048
- address: AddressInfo;
1049
- } | {
1050
- type: typeof MESSAGE_TYPES.PAYMENT_METHOD_SELECTED;
1051
- method: PaymentMethodInfo;
1052
- saveToLink: boolean;
1053
- } | {
1054
- type: typeof MESSAGE_TYPES.LOGOUT_COMPLETE;
1055
- } | {
1056
- /** Buyer declined or could not establish Link saved-detail authority.
1057
- * The merchant host decides whether its current session must rotate. */
1058
- type: typeof MESSAGE_TYPES.CONTINUE_WITHOUT_SAVED_DETAILS;
1059
- contact: string;
1060
- contactType: ElementsAuthContactType;
1061
- } | {
1062
- type: typeof MESSAGE_TYPES.SESSION_ESTABLISHED;
1063
- accessToken: string;
1064
- refreshToken?: string;
1065
- } | {
1066
- type: typeof MESSAGE_TYPES.AUTH_REQUESTED;
1067
- loginHint?: string;
1068
- contactType?: ElementsAuthContactType;
1069
- mode?: ElementsAuthMode;
1070
- prompt?: ElementsAuthPrompt;
1071
- } | {
1072
- type: typeof MESSAGE_TYPES.CHECKOUT_STATUS;
1073
- status: CheckoutStatus;
1074
- context: CheckoutStatusContext;
1075
- } | {
1076
- type: typeof MESSAGE_TYPES.CHECKOUT_COMPLETE;
1077
- success: boolean;
1078
- order?: {
1079
- id: string;
1080
- order_number: string;
1081
- status: string;
1082
- total: string;
1083
- currency: CurrencyCode;
1084
- };
1085
- error?: {
1086
- code: string;
1087
- message: string;
1088
- recoverable: boolean;
1089
- };
1090
- enrolled_in_link?: boolean;
1091
- } | {
1092
- type: typeof MESSAGE_TYPES.ORDER_TYPE_CHANGED;
1093
- orderType: OrderType;
1094
- } | {
1095
- type: typeof MESSAGE_TYPES.REQUEST_SUBMIT;
1096
- };
1097
- declare const EVENT_TYPES: {
1098
- readonly READY: "ready";
1099
- readonly AUTHENTICATED: "authenticated";
1100
- readonly ERROR: "error";
1101
- readonly CHANGE: "change";
1102
- readonly BLUR: "blur";
1103
- readonly FOCUS: "focus";
1104
- readonly ORDER_TYPE_CHANGED: "order_type_changed";
1105
- readonly REQUEST_SUBMIT: "request_submit";
1106
- };
1107
- type ElementEventType = (typeof EVENT_TYPES)[keyof typeof EVENT_TYPES];
1108
- type ElementEventHandler<T = unknown> = (data: T) => void;
1109
-
1110
- type CheckoutMode = (typeof CHECKOUT_MODE)[keyof typeof CHECKOUT_MODE];
1111
- type CheckoutOrderType = (typeof ORDER_TYPE)[keyof typeof ORDER_TYPE];
1112
- type CheckoutPaymentMethod = (typeof PAYMENT_METHOD)[keyof typeof PAYMENT_METHOD];
1113
- type CheckoutStep = (typeof CHECKOUT_STEP)[keyof typeof CHECKOUT_STEP];
1114
- type PickupTimeType = (typeof PICKUP_TIME_TYPE)[keyof typeof PICKUP_TIME_TYPE];
1115
- type CheckoutCollectionMethod = (typeof PAYMENT_METHOD)[keyof typeof PAYMENT_METHOD];
1116
- /** Storefront-safe collection capability. Provider and route identities stay server-side. */
1117
- type CheckoutCollectionOption = {
1118
- method: typeof PAYMENT_METHOD.CARD;
1119
- network: null;
1120
- } | {
1121
- method: typeof PAYMENT_METHOD.MOBILE_MONEY;
1122
- network: string;
1123
- };
1124
- interface CheckoutCollectionOptions {
1125
- presentment_currency: CurrencyCode;
1126
- options: CheckoutCollectionOption[];
1127
- }
1128
- interface PickupTime {
1129
- type: PickupTimeType;
1130
- scheduled_time?: string;
1131
- }
1132
- interface CheckoutAddressInfo {
1133
- street_address?: string;
1134
- apartment?: string;
1135
- city?: string;
1136
- region?: string;
1137
- postal_code?: string;
1138
- country?: string;
1139
- delivery_instructions?: string;
1140
- phone_for_delivery?: string;
1141
- latitude?: number;
1142
- longitude?: number;
1143
- pickup_time?: string;
1144
- guest_count?: number;
1145
- seating_time?: string;
1146
- seating_requests?: string;
1147
- }
1148
- interface MobileMoneyDetails {
1149
- phone_number: string;
1150
- provider: MobileMoneyProvider;
1151
- provider_other?: string;
1152
- }
1153
- interface CheckoutCustomerInfo {
1154
- name: string;
1155
- email: string;
1156
- phone: string;
1157
- notes?: string;
1158
- save_details: boolean;
1159
- }
1160
- interface CheckoutFormData {
1161
- cart_id: string;
1162
- location_id?: string;
1163
- customer: CheckoutCustomerInfo;
1164
- order_type: CheckoutOrderType;
1165
- address_info: CheckoutAddressInfo;
1166
- /** Named delivery rate the customer selected (from `delivery.getOptions`).
1167
- * Selection only — the fee is always recomputed server-side. Omit for the
1168
- * merchant's default option. */
1169
- delivery_rate_id?: string;
1170
- payment_method: string;
1171
- mobile_money_details?: MobileMoneyDetails;
1172
- special_instructions?: string;
1173
- link_address_id?: string;
1174
- link_payment_method_id?: string;
1175
- idempotency_key?: string;
1176
- metadata?: Record<string, unknown>;
1177
- pay_currency?: CurrencyCode;
1178
- fx_quote_id?: string;
1179
- /** Apply the shopper's available store credit (capped at the amount owed) as a
1180
- * fee-exempt tender before charging the rail. */
1181
- use_store_credit?: boolean;
1182
- /** Store-credit voucher / gift code to claim into the wallet and apply to this
1183
- * order. Presenting a code implies applying store credit. */
1184
- voucher_code?: string;
1185
- /** Pay only the required deposit now (balance collected later) instead of the
1186
- * full total. Only honored when the order is deposit-eligible and paying in
1187
- * the order's native currency. */
1188
- pay_deposit?: boolean;
1189
- }
1190
- type NextAction = {
1191
- type: "none";
1192
- } | {
1193
- type: "card_popup";
1194
- provider: string;
1195
- client_secret: string;
1196
- public_key: string;
1197
- provider_account_id?: string;
1198
- } | {
1199
- type: "redirect";
1200
- authorization_url: string;
1201
- } | {
1202
- type: "authorization";
1203
- authorization_type: AuthorizationType;
1204
- display_text?: string;
1205
- } | {
1206
- type: "poll";
1207
- };
1208
- interface CheckoutResult {
1209
- order_id: string;
1210
- order_number: string;
1211
- bill_token?: string;
1212
- /** Tenant-scoped Cimplify payment id used for payment mutations. */
1213
- payment_id?: string;
1214
- payment_reference?: string;
1215
- payment_status: string;
1216
- requires_authorization: boolean;
1217
- authorization_type?: AuthorizationType;
1218
- authorization_url?: string;
1219
- display_text?: string;
1220
- provider?: string;
1221
- client_secret?: string;
1222
- public_key?: string;
1223
- next_action?: NextAction;
1224
- fx?: {
1225
- base_currency: CurrencyCode;
1226
- base_amount: Money;
1227
- pay_currency: CurrencyCode;
1228
- pay_amount: Money;
1229
- rate: number;
1230
- quote_id: string;
1231
- };
1232
- }
1233
- type CheckoutStatus = "preparing" | "recovering" | "processing" | "awaiting_authorization" | "polling" | "finalizing" | "success" | "failed";
1234
- interface CheckoutStatusContext {
1235
- display_text?: string;
1236
- authorization_type?: PaymentAuthorizationKind;
1237
- poll_attempt?: number;
1238
- max_poll_attempts?: number;
1239
- order_id?: string;
1240
- order_number?: string;
1241
- provider?: string;
1242
- }
1243
- interface ProcessCheckoutOptions {
1244
- cart_id: string;
1245
- order_type: OrderType;
1246
- location_id?: string;
1247
- notes?: string;
1248
- scheduled_time?: string;
1249
- tip_amount?: number;
1250
- enroll_in_link?: boolean;
1251
- pay_currency?: CurrencyCode;
1252
- timeout_ms?: number;
1253
- on_status_change?: (status: CheckoutStatus, context: CheckoutStatusContext) => void;
1254
- }
1255
- interface ProcessCheckoutResult {
1256
- success: boolean;
1257
- order?: {
1258
- id: string;
1259
- order_number: string;
1260
- status: string;
1261
- total: string;
1262
- currency: CurrencyCode;
1263
- };
1264
- error?: {
1265
- code: string;
1266
- message: string;
1267
- recoverable: boolean;
1268
- docs_url?: string;
1269
- suggestion?: string;
1270
- };
1271
- enrolled_in_link?: boolean;
1272
- }
1273
- interface ProcessAndResolveOptions {
1274
- enroll_in_link?: boolean;
1275
- allow_popups?: boolean;
1276
- poll_interval_ms?: number;
1277
- max_poll_attempts?: number;
1278
- on_status_change?: (status: CheckoutStatus, context: CheckoutStatusContext) => void;
1279
- /**
1280
- * Reports the lifetime of provider-owned authorization UI. Hosts with their
1281
- * own modal focus boundary can suspend it while the provider surface is open.
1282
- */
1283
- on_authorization_ui_change?: (open: boolean) => void;
1284
- on_authorization_required?: (type: PaymentAuthorizationKind, submit: (authorization: PaymentAuthorizationSubmission) => Promise<void>) => void | Promise<void>;
1285
- return_url?: string;
1286
- signal?: AbortSignal;
577
+ interface RelatedCandidate {
578
+ product_id: string;
579
+ relation_type: RelationType;
580
+ source: string;
581
+ score: number;
582
+ is_enabled: boolean;
583
+ display_order: number;
584
+ }
585
+ interface RelatedProductsEnrichment {
586
+ upsells: RelatedCandidate[];
587
+ cross_sells: RelatedCandidate[];
1287
588
  }
1288
- type AbortablePromise<T> = Promise<T> & {
1289
- abort: () => void;
1290
- };
1291
589
 
590
+ declare const PAYMENT_AUTHORIZATION_OUTCOME_STATUS: {
591
+ readonly SUBMITTED: "submitted";
592
+ readonly CANCELLED: "cancelled";
593
+ readonly FAILED: "failed";
594
+ };
595
+ declare const PAYMENT_AUTHORIZATION_PROVIDER: {
596
+ readonly PAYSTACK: "paystack";
597
+ readonly STRIPE: "stripe";
598
+ };
1292
599
  type CardPopupAction = Extract<NextAction, {
1293
- type: "card_popup";
600
+ type: typeof CHECKOUT_NEXT_ACTION.CARD_POPUP;
1294
601
  }>;
1295
602
  interface PaymentAuthorizationContext {
1296
603
  action: CardPopupAction;
@@ -1307,13 +614,13 @@ type AuthorizeCardPopupOptions = Omit<PaymentAuthorizationContext, "action">;
1307
614
  * that money was collected.
1308
615
  */
1309
616
  type PaymentAuthorizationOutcome = {
1310
- status: "submitted";
617
+ status: typeof PAYMENT_AUTHORIZATION_OUTCOME_STATUS.SUBMITTED;
1311
618
  reference?: string;
1312
619
  } | {
1313
- status: "cancelled";
620
+ status: typeof PAYMENT_AUTHORIZATION_OUTCOME_STATUS.CANCELLED;
1314
621
  } | {
1315
- status: "failed";
1316
- code: "POPUP_BLOCKED" | "PROVIDER_UNAVAILABLE" | "AUTHORIZATION_FAILED" | "PAYMENT_FAILED";
622
+ status: typeof PAYMENT_AUTHORIZATION_OUTCOME_STATUS.FAILED;
623
+ code: typeof ErrorCode.POPUP_BLOCKED | typeof ErrorCode.PROVIDER_UNAVAILABLE | typeof ErrorCode.AUTHORIZATION_FAILED | typeof ErrorCode.PAYMENT_FAILED;
1317
624
  message: string;
1318
625
  recoverable: boolean;
1319
626
  };
@@ -1341,6 +648,10 @@ declare function createDefaultPaymentAuthorizationAdapterRegistry(): PaymentAuth
1341
648
 
1342
649
  declare class CheckoutService {
1343
650
  private client;
651
+ /** Raw checkout material is component-lifetime only, never browser storage. */
652
+ private readonly intentCommands;
653
+ /** Opaque owner/attempt authority for deprecated action submission. */
654
+ private readonly actionAuthorities;
1344
655
  constructor(client: CimplifyClient);
1345
656
  private validateCheckoutData;
1346
657
  private orderTokenParam;
@@ -1351,15 +662,131 @@ declare class CheckoutService {
1351
662
  * outcome is not proof of payment; callers must poll/verify with Cimplify.
1352
663
  */
1353
664
  authorizeCardPopup(action: CardPopupAction, options: AuthorizeCardPopupOptions): Promise<PaymentAuthorizationOutcome>;
1354
- process(data: CheckoutFormData): Promise<Result<CheckoutResult, CimplifyError>>;
665
+ private startIntentCheckout;
666
+ /** @deprecated Use `client.purchaseIntents.mint()` then `confirm()`. */
667
+ process(data: CheckoutFormData, options?: RequestOptions): Promise<Result<CheckoutResult, CimplifyError>>;
1355
668
  initializePayment(_orderId: string, _method: PaymentMethod): Promise<Result<InitializePaymentResult, CimplifyError>>;
1356
- submitAuthorization(input: SubmitAuthorizationInput): Promise<Result<CheckoutResult, CimplifyError>>;
1357
- pollPaymentStatus(orderId: string): Promise<Result<PaymentStatusResponse, CimplifyError>>;
669
+ /**
670
+ * @deprecated Use `client.purchaseIntents.submitAction()`. This adapter works
671
+ * only while this CheckoutService instance retains the opaque authority
672
+ * returned by its own `process()` call; it never falls back to a payment-id
673
+ * mutation.
674
+ */
675
+ submitAuthorization(input: SubmitAuthorizationInput, options?: RequestOptions): Promise<Result<CheckoutResult, CimplifyError>>;
676
+ private reconcileActionAuthority;
677
+ pollPaymentStatus(orderId: string, options?: ReadRequestOptions): Promise<Result<PaymentStatusResponse, CimplifyError>>;
1358
678
  updateOrderCustomer(orderId: string, customer: CheckoutCustomerInfo): Promise<Result<Order, CimplifyError>>;
1359
679
  verifyPayment(orderId: string): Promise<Result<Order, CimplifyError>>;
680
+ private maybeEnrollResolvedOrder;
681
+ /** @deprecated Use `client.purchaseIntents.resolve()`. */
1360
682
  processAndResolve(data: CheckoutFormData & ProcessAndResolveOptions): Promise<Result<ProcessCheckoutResult, CimplifyError>>;
1361
683
  }
1362
684
 
685
+ type PurchaseIntentResolveStatus = (typeof PURCHASE_INTENT_RESOLVE_STATUS)[keyof typeof PURCHASE_INTENT_RESOLVE_STATUS];
686
+ type PurchaseIntentActionDecision = typeof PURCHASE_INTENT_ACTION_DECISION.CONTINUE | typeof PURCHASE_INTENT_ACTION_DECISION.STOP | {
687
+ kind: typeof PURCHASE_INTENT_ACTION_DECISION.SUBMIT;
688
+ request: SubmitPurchaseIntentActionRequest;
689
+ };
690
+ interface PurchaseIntentResolveOptions {
691
+ confirmation: ConfirmPurchaseIntentRequest;
692
+ initialResponse?: ConfirmPurchaseIntentResponse;
693
+ pollIntervalMs?: number;
694
+ maxPollAttempts?: number;
695
+ maxActionSteps?: number;
696
+ maxTermsReviewSteps?: number;
697
+ signal?: AbortSignal;
698
+ onStatusChange?: (status: PurchaseIntentResolveStatus, response?: ConfirmPurchaseIntentResponse) => void;
699
+ /**
700
+ * Run provider-owned UI, then return `continue` to replay the same durable
701
+ * attempt. For a typed provider challenge, return `submit` with only the
702
+ * requested authorization value; the SDK sends it through the owner-fenced
703
+ * attempt endpoint. Neither arm can alter the accepted terms.
704
+ */
705
+ onActionRequired?: (action: PurchaseIntentActionResponse) => PurchaseIntentActionDecision | Promise<PurchaseIntentActionDecision>;
706
+ /** Returning a request is explicit consent to replacement terms. */
707
+ onTermsChanged?: (response: Extract<ConfirmPurchaseIntentResponse, {
708
+ status: typeof PURCHASE_INTENT_CONFIRM_STATUS.TERMS_CHANGED;
709
+ }>) => ConfirmPurchaseIntentRequest | null | Promise<ConfirmPurchaseIntentRequest | null>;
710
+ }
711
+ interface PurchaseIntentConfirmationPort {
712
+ confirm(intentId: string, request: ConfirmPurchaseIntentRequest, options?: {
713
+ signal?: AbortSignal;
714
+ }): Promise<Result<ConfirmPurchaseIntentResponse, CimplifyError>>;
715
+ submitAction?(intentId: string, attemptId: string, request: SubmitPurchaseIntentActionRequest, options?: {
716
+ signal?: AbortSignal;
717
+ }): Promise<Result<ConfirmPurchaseIntentResponse, CimplifyError>>;
718
+ }
719
+ interface PurchaseIntentResolverDependencies {
720
+ confirmation: PurchaseIntentConfirmationPort;
721
+ wait?: (milliseconds: number, signal?: AbortSignal) => Promise<void>;
722
+ }
723
+ /**
724
+ * Pure purchase-intent state machine. Transport stays behind the narrow
725
+ * confirmation port, while UI policy is supplied through callbacks.
726
+ */
727
+ declare class PurchaseIntentResolver {
728
+ private readonly confirmation;
729
+ private readonly wait;
730
+ constructor(dependencies: PurchaseIntentResolverDependencies);
731
+ resolve(intentId: string, options: PurchaseIntentResolveOptions): Promise<Result<PurchaseIntentResolution, CimplifyError>>;
732
+ private ensureActive;
733
+ private notify;
734
+ }
735
+
736
+ declare const PURCHASE_INTENT_ROUTE: {
737
+ readonly DIRECT_COLLECTION: "/api/v1/purchase-intents";
738
+ readonly HOSTED_SESSION_COLLECTION: "/v1/checkout/sessions";
739
+ readonly PREPARE: "prepare";
740
+ readonly REFRESH: "refresh";
741
+ readonly CONFIRM: "confirm";
742
+ readonly REPLAY: "replay";
743
+ readonly ATTEMPTS: "attempts";
744
+ readonly ACTIONS: "actions";
745
+ };
746
+ /** Narrow transport port keeps the service independent of client internals. */
747
+ interface PurchaseIntentTransport {
748
+ get<T = unknown>(path: string, opts?: ReadRequestOptions): Promise<T>;
749
+ post<T = unknown>(path: string, body?: unknown, opts?: RequestOptions): Promise<T>;
750
+ }
751
+ interface PurchaseIntentRequestOptions {
752
+ signal?: AbortSignal;
753
+ timeoutMs?: number;
754
+ }
755
+ declare class PurchaseIntentService {
756
+ private readonly transport;
757
+ private readonly resolver;
758
+ constructor(transport: PurchaseIntentTransport);
759
+ mint(request: MintPurchaseIntentRequest, options?: PurchaseIntentRequestOptions): Promise<Result<PurchaseIntentView, CimplifyError>>;
760
+ get(intentId: string, options?: PurchaseIntentRequestOptions): Promise<Result<PurchaseIntentView, CimplifyError>>;
761
+ refresh(intentId: string, expectedRevision: number, options?: PurchaseIntentRequestOptions): Promise<Result<PurchaseIntentView, CimplifyError>>;
762
+ confirm(intentId: string, request: ConfirmPurchaseIntentRequest, options?: PurchaseIntentRequestOptions): Promise<Result<ConfirmPurchaseIntentResponse, CimplifyError>>;
763
+ submitAction(intentId: string, attemptId: string, request: SubmitPurchaseIntentActionRequest, options?: PurchaseIntentRequestOptions): Promise<Result<ConfirmPurchaseIntentResponse, CimplifyError>>;
764
+ resolve(intentId: string, options: PurchaseIntentResolveOptions): Promise<Result<PurchaseIntentResolution, CimplifyError>>;
765
+ /**
766
+ * Bind subsequent preparation/confirmation to one hosted checkout-session
767
+ * owner. The session ID is a route authority, not an intent-owner rewrite.
768
+ */
769
+ forHostedSession(sessionId: string): HostedPurchaseIntentService;
770
+ private intentPath;
771
+ }
772
+ /**
773
+ * Owner-specific hosted checkout port. Hosted drafts belong to the durable
774
+ * checkout session ID, whereas direct storefront intents belong to the API
775
+ * session/account; keeping separate route objects makes that distinction
776
+ * unrepresentable as a caller-supplied owner field.
777
+ */
778
+ declare class HostedPurchaseIntentService {
779
+ private readonly transport;
780
+ private readonly resolver;
781
+ private readonly sessionPath;
782
+ constructor(transport: PurchaseIntentTransport, sessionId: string);
783
+ prepare(request: PreparePurchaseIntentRequest, options?: PurchaseIntentRequestOptions): Promise<Result<PurchaseIntentView, CimplifyError>>;
784
+ confirm(_intentId: string, request: ConfirmPurchaseIntentRequest, options?: PurchaseIntentRequestOptions): Promise<Result<ConfirmPurchaseIntentResponse, CimplifyError>>;
785
+ replay(options?: PurchaseIntentRequestOptions): Promise<Result<ConfirmPurchaseIntentResponse, CimplifyError>>;
786
+ submitAction(_intentId: string, attemptId: string, request: SubmitPurchaseIntentActionRequest, options?: PurchaseIntentRequestOptions): Promise<Result<ConfirmPurchaseIntentResponse, CimplifyError>>;
787
+ resolve(intentId: string, options: PurchaseIntentResolveOptions): Promise<Result<PurchaseIntentResolution, CimplifyError>>;
788
+ }
789
+
1363
790
  interface BusinessDetailsDTO {
1364
791
  name: string;
1365
792
  logo_url?: string;
@@ -1507,7 +934,7 @@ interface EnrichedOrder {
1507
934
  metadata?: Record<string, unknown>;
1508
935
  }
1509
936
 
1510
- interface IdempotencyOption$7 {
937
+ interface IdempotencyOption$8 {
1511
938
  idempotencyKey?: string;
1512
939
  }
1513
940
  interface GetOrdersOptions {
@@ -1529,7 +956,7 @@ declare class OrderQueries {
1529
956
  getDetail(orderId: string): Promise<Result<EnrichedOrder, CimplifyError>>;
1530
957
  getRecent(limit?: number): Promise<Result<Order[], CimplifyError>>;
1531
958
  getByStatus(status: OrderStatus): Promise<Result<Order[], CimplifyError>>;
1532
- cancel(orderId: string, reason?: string, opts?: IdempotencyOption$7): Promise<Result<Order, CimplifyError>>;
959
+ cancel(orderId: string, reason?: string, opts?: IdempotencyOption$8): Promise<Result<Order, CimplifyError>>;
1533
960
  }
1534
961
 
1535
962
  interface StoreCreditBalance {
@@ -1567,10 +994,10 @@ interface GetLinkOrderOptions {
1567
994
  */
1568
995
  businessId?: string;
1569
996
  }
1570
- interface IdempotencyOption$6 {
997
+ interface IdempotencyOption$7 {
1571
998
  idempotencyKey?: string;
1572
999
  }
1573
- interface LinkAuthOption extends IdempotencyOption$6 {
1000
+ interface LinkAuthOption extends IdempotencyOption$7 {
1574
1001
  /** Return verified credentials without installing them on the shared client. */
1575
1002
  activateSession?: boolean;
1576
1003
  }
@@ -1610,7 +1037,7 @@ declare class LinkService {
1610
1037
  private isActivationFenceCurrent;
1611
1038
  private supersededActivation;
1612
1039
  private activateAuthenticatedSession;
1613
- requestOtp(input: RequestOtpInput, opts?: IdempotencyOption$6): Promise<Result<RequestOtpResult$1, CimplifyError>>;
1040
+ requestOtp(input: RequestOtpInput, opts?: IdempotencyOption$7): Promise<Result<RequestOtpResult$1, CimplifyError>>;
1614
1041
  verifyOtp(input: VerifyOtpInput, opts?: LinkAuthOption): Promise<Result<AuthResponse, CimplifyError>>;
1615
1042
  refreshSession(sessionToken?: string, opts?: LinkAuthOption): Promise<Result<AuthResponse, CimplifyError>>;
1616
1043
  logout(): Promise<Result<SuccessResult, CimplifyError>>;
@@ -1626,25 +1053,25 @@ declare class LinkService {
1626
1053
  }): Promise<Result<Customer, CimplifyError>>;
1627
1054
  getOrders(options?: GetLinkOrdersOptions): Promise<Result<Order[], CimplifyError>>;
1628
1055
  getOrder(orderId: string, options?: GetLinkOrderOptions): Promise<Result<Order, CimplifyError>>;
1629
- enroll(data: EnrollmentData, opts?: IdempotencyOption$6): Promise<Result<LinkEnrollResult, CimplifyError>>;
1630
- enrollAndLinkOrder(data: EnrollAndLinkOrderInput, opts?: IdempotencyOption$6): Promise<Result<EnrollAndLinkOrderResult, CimplifyError>>;
1056
+ enroll(data: EnrollmentData, opts?: IdempotencyOption$7): Promise<Result<LinkEnrollResult, CimplifyError>>;
1057
+ enrollAndLinkOrder(data: EnrollAndLinkOrderInput, opts?: IdempotencyOption$7): Promise<Result<EnrollAndLinkOrderResult, CimplifyError>>;
1631
1058
  updatePreferences(preferences: Partial<CustomerLinkPreferences>): Promise<Result<SuccessResult, CimplifyError>>;
1632
- createAddress(input: CreateAddressInput, opts?: IdempotencyOption$6): Promise<Result<CustomerAddress, CimplifyError>>;
1059
+ createAddress(input: CreateAddressInput, opts?: IdempotencyOption$7): Promise<Result<CustomerAddress, CimplifyError>>;
1633
1060
  updateAddress(input: UpdateAddressInput): Promise<Result<SuccessResult, CimplifyError>>;
1634
1061
  deleteAddress(addressId: string): Promise<Result<SuccessResult, CimplifyError>>;
1635
1062
  setDefaultAddress(addressId: string): Promise<Result<SuccessResult, CimplifyError>>;
1636
1063
  trackAddressUsage(addressId: string): Promise<Result<SuccessResult, CimplifyError>>;
1637
- createMobileMoney(input: CreateMobileMoneyInput, opts?: IdempotencyOption$6): Promise<Result<CustomerMobileMoney, CimplifyError>>;
1064
+ createMobileMoney(input: CreateMobileMoneyInput, opts?: IdempotencyOption$7): Promise<Result<CustomerMobileMoney, CimplifyError>>;
1638
1065
  deleteMobileMoney(mobileMoneyId: string): Promise<Result<SuccessResult, CimplifyError>>;
1639
1066
  setDefaultMobileMoney(mobileMoneyId: string): Promise<Result<SuccessResult, CimplifyError>>;
1640
1067
  trackMobileMoneyUsage(mobileMoneyId: string): Promise<Result<SuccessResult, CimplifyError>>;
1641
- verifyMobileMoney(mobileMoneyId: string, opts?: IdempotencyOption$6): Promise<Result<SuccessResult, CimplifyError>>;
1068
+ verifyMobileMoney(mobileMoneyId: string, opts?: IdempotencyOption$7): Promise<Result<SuccessResult, CimplifyError>>;
1642
1069
  getSessions(): Promise<Result<LinkSession[], CimplifyError>>;
1643
1070
  revokeSession(sessionId: string): Promise<Result<RevokeSessionResult, CimplifyError>>;
1644
1071
  revokeAllSessions(): Promise<Result<RevokeAllSessionsResult, CimplifyError>>;
1645
1072
  }
1646
1073
 
1647
- interface IdempotencyOption$5 {
1074
+ interface IdempotencyOption$6 {
1648
1075
  idempotencyKey?: string;
1649
1076
  }
1650
1077
  interface AuthStatus {
@@ -1683,8 +1110,8 @@ declare class AuthService {
1683
1110
  getStatus(): Promise<Result<AuthStatus, CimplifyError>>;
1684
1111
  getCurrentUser(): Promise<Result<Customer | null, CimplifyError>>;
1685
1112
  isAuthenticated(): Promise<Result<boolean, CimplifyError>>;
1686
- requestOtp(contact: string, contactType?: "phone" | "email", opts?: IdempotencyOption$5): Promise<Result<RequestOtpResult, CimplifyError>>;
1687
- verifyOtp(code: string, contact?: string, opts?: IdempotencyOption$5): Promise<Result<OtpResult, CimplifyError>>;
1113
+ requestOtp(contact: string, contactType?: "phone" | "email", opts?: IdempotencyOption$6): Promise<Result<RequestOtpResult, CimplifyError>>;
1114
+ verifyOtp(code: string, contact?: string, opts?: IdempotencyOption$6): Promise<Result<OtpResult, CimplifyError>>;
1688
1115
  logout(): Promise<Result<LogoutResult, CimplifyError>>;
1689
1116
  updateProfile(input: UpdateProfileInput): Promise<Result<UpdateProfileResult, CimplifyError>>;
1690
1117
  }
@@ -2081,7 +1508,7 @@ interface RescheduleHistoryRecord {
2081
1508
  metadata?: Record<string, unknown> | null;
2082
1509
  }
2083
1510
 
2084
- interface IdempotencyOption$4 {
1511
+ interface IdempotencyOption$5 {
2085
1512
  idempotencyKey?: string;
2086
1513
  }
2087
1514
  declare class SchedulingService {
@@ -2096,8 +1523,8 @@ declare class SchedulingService {
2096
1523
  getCustomerBookings(customerId?: string): Promise<Result<CustomerBooking[], CimplifyError>>;
2097
1524
  getUpcomingBookings(): Promise<Result<CustomerBooking[], CimplifyError>>;
2098
1525
  getPastBookings(limit?: number): Promise<Result<CustomerBooking[], CimplifyError>>;
2099
- cancelBooking(input: CancelBookingInput, opts?: IdempotencyOption$4): Promise<Result<CancelBookingResult, CimplifyError>>;
2100
- rescheduleBooking(input: RescheduleBookingInput, opts?: IdempotencyOption$4): Promise<Result<RescheduleBookingResult, CimplifyError>>;
1526
+ cancelBooking(input: CancelBookingInput, opts?: IdempotencyOption$5): Promise<Result<CancelBookingResult, CimplifyError>>;
1527
+ rescheduleBooking(input: RescheduleBookingInput, opts?: IdempotencyOption$5): Promise<Result<RescheduleBookingResult, CimplifyError>>;
2101
1528
  getNextAvailableSlot(serviceId: string, fromDate?: string): Promise<Result<AvailableSlot | null, CimplifyError>>;
2102
1529
  hasAvailabilityOn(serviceId: string, date: string): Promise<Result<boolean, CimplifyError>>;
2103
1530
  }
@@ -2178,14 +1605,14 @@ type FxQuote = S["LockedFxQuote"];
2178
1605
  type FxRateResponse = S["FxQuote"];
2179
1606
  type FxQuoteStatus = S["FxQuoteStatus"];
2180
1607
 
2181
- interface IdempotencyOption$3 {
1608
+ interface IdempotencyOption$4 {
2182
1609
  idempotencyKey?: string;
2183
1610
  }
2184
1611
  declare class FxService {
2185
1612
  private client;
2186
1613
  constructor(client: CimplifyClient);
2187
1614
  getRate(from: CurrencyCode, to: CurrencyCode): Promise<Result<FxRateResponse, CimplifyError>>;
2188
- lockQuote(request: FxQuoteRequest, opts?: IdempotencyOption$3): Promise<Result<FxQuote, CimplifyError>>;
1615
+ lockQuote(request: FxQuoteRequest, opts?: IdempotencyOption$4): Promise<Result<FxQuote, CimplifyError>>;
2189
1616
  }
2190
1617
 
2191
1618
  interface TrackPageViewOptions {
@@ -2258,7 +1685,8 @@ interface DismissMessageResponse {
2258
1685
  }
2259
1686
  declare class ActivityService {
2260
1687
  private client;
2261
- private readonly sessions;
1688
+ private sessions;
1689
+ private localGeneration;
2262
1690
  private bootstrapRequest;
2263
1691
  constructor(client: CimplifyClient);
2264
1692
  /**
@@ -2271,6 +1699,8 @@ declare class ActivityService {
2271
1699
  refreshIdentity(): void;
2272
1700
  /** A signed-out browser starts a fresh anonymous analytics session. */
2273
1701
  resetSession(): void;
1702
+ /** Drop the old storefront's analytics state before binding this service to the new one. */
1703
+ resetForStorefrontIdentityChange(): void;
2274
1704
  private buildSessionPayload;
2275
1705
  /** Route-level page view. Product/category interactions are tracked separately. */
2276
1706
  trackPageView(options?: TrackPageViewOptions): void;
@@ -2287,9 +1717,13 @@ declare class ActivityService {
2287
1717
  private sendEvents;
2288
1718
  private postEvents;
2289
1719
  private bootstrapSession;
1720
+ private captureGeneration;
1721
+ private isCurrentGeneration;
1722
+ private invalidatePendingActivity;
1723
+ private createSessionCoordinator;
2290
1724
  }
2291
1725
 
2292
- interface IdempotencyOption$2 {
1726
+ interface IdempotencyOption$3 {
2293
1727
  idempotencyKey?: string;
2294
1728
  }
2295
1729
  declare class SubscriptionService {
@@ -2297,7 +1731,7 @@ declare class SubscriptionService {
2297
1731
  constructor(client: CimplifyClient);
2298
1732
  list(): Promise<Result<Subscription[], CimplifyError>>;
2299
1733
  get(id: string): Promise<Result<SubscriptionWithDetails, CimplifyError>>;
2300
- cancel(id: string, reason?: string, opts?: IdempotencyOption$2): Promise<Result<{
1734
+ cancel(id: string, reason?: string, opts?: IdempotencyOption$3): Promise<Result<{
2301
1735
  success: boolean;
2302
1736
  }, CimplifyError>>;
2303
1737
  pause(id: string): Promise<Result<{
@@ -2306,12 +1740,12 @@ declare class SubscriptionService {
2306
1740
  resume(id: string): Promise<Result<{
2307
1741
  success: boolean;
2308
1742
  }, CimplifyError>>;
2309
- skipNextRenewal(id: string, opts?: IdempotencyOption$2): Promise<Result<{
1743
+ skipNextRenewal(id: string, opts?: IdempotencyOption$3): Promise<Result<{
2310
1744
  success: boolean;
2311
1745
  }, CimplifyError>>;
2312
1746
  }
2313
1747
 
2314
- interface IdempotencyOption$1 {
1748
+ interface IdempotencyOption$2 {
2315
1749
  idempotencyKey?: string;
2316
1750
  }
2317
1751
  interface UploadInitResponse {
@@ -2329,7 +1763,7 @@ interface UploadResult {
2329
1763
  declare class UploadService {
2330
1764
  private client;
2331
1765
  constructor(client: CimplifyClient);
2332
- init(filename: string, contentType: string, sizeBytes: number, opts?: IdempotencyOption$1): Promise<Result<UploadInitResponse, CimplifyError>>;
1766
+ init(filename: string, contentType: string, sizeBytes: number, opts?: IdempotencyOption$2): Promise<Result<UploadInitResponse, CimplifyError>>;
2333
1767
  confirm(uploadId: string): Promise<Result<UploadResult, CimplifyError>>;
2334
1768
  upload(file: File): Promise<Result<UploadResult, CimplifyError>>;
2335
1769
  }
@@ -2532,7 +1966,7 @@ interface ChatWidgetStarter {
2532
1966
  text: string;
2533
1967
  }
2534
1968
 
2535
- interface IdempotencyOption {
1969
+ interface IdempotencyOption$1 {
2536
1970
  idempotencyKey?: string;
2537
1971
  }
2538
1972
  declare class SupportService {
@@ -2571,7 +2005,7 @@ declare class SupportService {
2571
2005
  */
2572
2006
  peekConversation(): Promise<Result<ChatConversationResponse | null, CimplifyError>>;
2573
2007
  /** Open (or resume) the customer's widget conversation. */
2574
- openConversation(opts?: IdempotencyOption): Promise<Result<ChatConversationResponse, CimplifyError>>;
2008
+ openConversation(opts?: IdempotencyOption$1): Promise<Result<ChatConversationResponse, CimplifyError>>;
2575
2009
  /**
2576
2010
  * Send a message in the active conversation.
2577
2011
  *
@@ -2580,7 +2014,7 @@ declare class SupportService {
2580
2014
  * `replyToMessageId` quotes another message by its `ChatMessage.id`; the
2581
2015
  * server resolves it thread-scoped and echoes the quote as `reply_to`.
2582
2016
  */
2583
- sendMessage(content: string, opts?: IdempotencyOption & {
2017
+ sendMessage(content: string, opts?: IdempotencyOption$1 & {
2584
2018
  replyToMessageId?: string;
2585
2019
  attachments?: ChatUploadAttachment[];
2586
2020
  }): Promise<Result<ChatMessage, CimplifyError>>;
@@ -2596,7 +2030,7 @@ declare class SupportService {
2596
2030
  /** React to a message in the active conversation by its `ChatMessage.id`. */
2597
2031
  reactToMessage(messageId: string, emoji: string): Promise<Result<ChatMessage, CimplifyError>>;
2598
2032
  /** Ask for a person: flags the thread for the merchant's inbox. */
2599
- requestHuman(opts?: IdempotencyOption): Promise<Result<ChatHandoffResponse, CimplifyError>>;
2033
+ requestHuman(opts?: IdempotencyOption$1): Promise<Result<ChatHandoffResponse, CimplifyError>>;
2600
2034
  }
2601
2035
 
2602
2036
  declare class CimplifyElements {
@@ -2649,7 +2083,7 @@ declare class CimplifyElements {
2649
2083
  private handleMessage;
2650
2084
  _setAddressData(data: AddressInfo): void;
2651
2085
  _setPaymentData(data: PaymentMethodInfo): void;
2652
- _setGuestContact(contact: string, contactType: "email" | "phone"): void;
2086
+ _setGuestContact(contact: string, contactType: ElementsAuthContactType): void;
2653
2087
  }
2654
2088
  declare class CimplifyElement {
2655
2089
  private type;
@@ -2702,10 +2136,18 @@ declare class CimplifyElement {
2702
2136
  }
2703
2137
  declare function createElements(client: CimplifyClient, businessId?: string, options?: ElementsOptions): CimplifyElements;
2704
2138
 
2139
+ interface RequestRetryPolicy {
2140
+ /** Per-call retry ceiling after the initial attempt; never raises the client-wide limit. */
2141
+ maxRetries: number;
2142
+ /** Positive jitter range as a fraction of the base delay. */
2143
+ jitterRatio?: number;
2144
+ }
2705
2145
  interface RequestOptions {
2706
2146
  idempotencyKey?: string;
2707
2147
  headers?: Record<string, string>;
2708
2148
  timeoutMs?: number;
2149
+ retryPolicy?: RequestRetryPolicy;
2150
+ signal?: AbortSignal;
2709
2151
  }
2710
2152
  /**
2711
2153
  * Per-call cache hints for server-side reads. Forwarded as `next: { revalidate, tags }`
@@ -2724,6 +2166,9 @@ interface CacheOptions {
2724
2166
  }
2725
2167
  interface ReadRequestOptions {
2726
2168
  cacheOptions?: CacheOptions;
2169
+ timeoutMs?: number;
2170
+ retryPolicy?: RequestRetryPolicy;
2171
+ signal?: AbortSignal;
2727
2172
  }
2728
2173
  interface CimplifyConfig {
2729
2174
  publicKey?: string;
@@ -2767,6 +2212,9 @@ declare class CimplifyClient {
2767
2212
  private businessId;
2768
2213
  private businessIdResolvePromise;
2769
2214
  private publicKeyEpoch;
2215
+ private stopCrossTabSessionWatch;
2216
+ private latestSessionSyncAt;
2217
+ private latestSessionSyncOrderKey;
2770
2218
  readonly authorizationAdapters: PaymentAuthorizationAdapterRegistry;
2771
2219
  private inflightRequests;
2772
2220
  /**
@@ -2780,6 +2228,7 @@ declare class CimplifyClient {
2780
2228
  private _catalogue?;
2781
2229
  private _cart?;
2782
2230
  private _checkout?;
2231
+ private _purchaseIntents?;
2783
2232
  private _orders?;
2784
2233
  private _storeCredit?;
2785
2234
  private _subscriptions?;
@@ -2798,6 +2247,8 @@ declare class CimplifyClient {
2798
2247
  constructor(config?: CimplifyConfig);
2799
2248
  private stopPageViewTracking;
2800
2249
  stopTrackingPageViews(): void;
2250
+ /** Release window-level subscriptions and automatic tracking owned by this client. */
2251
+ destroy(): void;
2801
2252
  getAccessToken(): string | null;
2802
2253
  getPublicKey(): string;
2803
2254
  getBaseUrl(): string;
@@ -2832,7 +2283,9 @@ declare class CimplifyClient {
2832
2283
  hasClaimedSessionAuthority(): boolean;
2833
2284
  publishSessionClaimed(customerName: string | null): void;
2834
2285
  private broadcastSessionSync;
2835
- private watchCrossTabSession;
2286
+ private applyCrossTabSession;
2287
+ private observeSessionSync;
2288
+ private nextSessionSyncTimestamp;
2836
2289
  setOrderToken(orderId: string, token: string): void;
2837
2290
  getOrderToken(orderId: string): string | null;
2838
2291
  clearOrderTokens(): void;
@@ -2845,6 +2298,7 @@ declare class CimplifyClient {
2845
2298
  private authedFetch;
2846
2299
  private safeStorage;
2847
2300
  private loadSessionToken;
2301
+ private loadSessionSyncPayload;
2848
2302
  /**
2849
2303
  * Mint the session token client-side so the very first request already
2850
2304
  * carries it. Without this, parallel first-load requests each get a
@@ -2872,6 +2326,7 @@ declare class CimplifyClient {
2872
2326
  get catalogue(): CatalogueQueries;
2873
2327
  get cart(): CartOperations;
2874
2328
  get checkout(): CheckoutService;
2329
+ get purchaseIntents(): PurchaseIntentService;
2875
2330
  get orders(): OrderQueries;
2876
2331
  get storeCredit(): StoreCreditQueries;
2877
2332
  get subscriptions(): SubscriptionService;
@@ -2892,4 +2347,201 @@ declare class CimplifyClient {
2892
2347
  }
2893
2348
  declare function createCimplifyClient(config?: CimplifyConfig): CimplifyClient;
2894
2349
 
2895
- export { type CheckoutCollectionOption as $, type AbortablePromise as A, type Booking as B, type CacheOptions as C, type CancelBookingInput as D, type CancelBookingResult as E, type CancelOrderInput as F, type CancellationPolicy as G, type CardPopupAction as H, CartOperations as I, CatalogueQueries as J, type CatalogueResult as K, type CatalogueSnapshot as L, type CategoryInfo as M, type ChatAttachment as N, type ChatConversation as O, type ChatConversationResponse as P, type ChatMessage as Q, type ChatReplyCard as R, type ChatReplyContext as S, type ChatUploadAttachment as T, type ChatWidgetStarter as U, type CheckSlotAvailabilityInput as V, type CheckSlotAvailabilityResult as W, type CheckoutAddressInfo as X, type CheckoutCartData as Y, type CheckoutCartItem as Z, type CheckoutCollectionMethod as _, type ActivityRecommendation as a, type FxQuoteStatus as a$, type CheckoutCollectionOptions 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, EVENT_TYPES as aA, type ElementAppearance as aB, type ElementEventHandler as aC, type ElementEventType as aD, type ElementOptions as aE, type ElementType as aF, type ElementsAuthContactType as aG, type ElementsAuthMode as aH, type ElementsAuthOptions as aI, type ElementsAuthPrompt as aJ, type ElementsCheckoutData as aK, type ElementsCheckoutResult as aL, type ElementsCustomerInfo as aM, type ElementsOptions as aN, type EnrichedOrder as aO, type EnrichedOrderItem as aP, type Err as aQ, type ExternalChatClaimAttempt as aR, type ExternalChatClaimDisposition as aS, type FeeBearerType as aT, type FetchQuoteInput as aU, type FulfillmentLink as aV, type FulfillmentStatus as aW, type FulfillmentSummaryDTO as aX, type FulfillmentType as aY, type FxQuote as aZ, type FxQuoteRequest as a_, type CheckoutStatusContext as aa, type CheckoutStep as ab, CimplifyClient as ac, type CimplifyConfig as ad, CimplifyElement as ae, CimplifyElements as af, type ClaimConversationResult as ag, type ClaimExternalChatsResult as ah, type ContentType as ai, type CustomerBooking as aj, type CustomerBookingServiceItem as ak, type CustomerServicePreferences as al, type DayAvailability as am, type DeliveryFeeDetails as an, type DeliveryFeeResponse as ao, type DeliveryFeeStatus as ap, type DeliveryOption as aq, type DeliveryOptionsQuery as ar, type DeliveryOptionsResponse as as, DeliveryService as at, type DepositResult as au, type DismissMessageResponse as av, ELEMENTS_AUTH_CONTACT_TYPES as aw, ELEMENTS_AUTH_MODES as ax, ELEMENTS_AUTH_PROMPTS as ay, ELEMENT_TYPES as az, type ActivityRecommendationsResponse as b, type PaymentState as b$, type FxRateResponse as b0, FxService as b1, type GetAvailableSlotsInput as b2, type GetDeliveryOptionsParams as b3, type GetOrdersOptions as b4, type GetProductsOptions as b5, type GroupOrderInfo as b6, type IframeToParentMessage as b7, InventoryService as b8, type LifecyclePhase as b9, type OrderGroupPaymentState as bA, type OrderGroupPaymentStatus as bB, type OrderGroupPaymentSummary as bC, type OrderGroupStatus as bD, type OrderHistory as bE, type OrderLineState as bF, type OrderLineStatus as bG, type OrderLocationInfo as bH, type OrderPaymentEvent as bI, type OrderPricingView as bJ, OrderQueries as bK, type OrderSplitDetail as bL, type OrderStaffInfo as bM, type OrderStatus as bN, type OrderTimestampsDTO as bO, type OrderType as bP, type Origin as bQ, type OriginActor as bR, type OriginChannel as bS, type OtpResult as bT, type ParentToIframeMessage as bU, type PaymentAuthorizationAdapter as bV, PaymentAuthorizationAdapterRegistry as bW, type PaymentAuthorizationContext as bX, type PaymentAuthorizationOutcome as bY, type PaymentInfoDTO as bZ, type PaymentMethodInfo as b_, type LineItem as ba, type LineType as bb, LinkService as bc, type LiteBootstrap as bd, type LiteDayHours as be, type LiteHoursRange as bf, LiteService as bg, type Location as bh, type LocationBooking as bi, type LocationTaxBehavior as bj, type LocationTaxOverrides as bk, type LocationTimeProfile as bl, type LocationWithDetails as bm, MESSAGE_TYPES as bn, type MobileMoneyDetails as bo, type NextAction as bp, type ObservabilityHooks as bq, type Ok as br, type Order as bs, type OrderCustomerInfo as bt, type OrderDiscountInfo as bu, type OrderFilter as bv, type OrderFulfillmentSummary as bw, type OrderGroup as bx, type OrderGroupDetails as by, type OrderGroupPayment as bz, ActivityService as c, StoreCreditQueries as c$, type PickupTime as c0, type PickupTimeType as c1, type PlaceDetailsResponse as c2, PlacesService as c3, type PriceQuote as c4, type PricingOverrides as c5, type ProcessAndResolveOptions as c6, type ProcessCheckoutOptions as c7, type ProcessCheckoutResult as c8, type ProviderResolutionSource as c9, type ResourceInfo as cA, type Result as cB, type RetryEvent as cC, type Room as cD, type SchedulingMetadata as cE, type SchedulingResult as cF, SchedulingService as cG, type SenderType as cH, type Service as cI, type ServiceAvailabilityParams as cJ, type ServiceAvailabilityResult as cK, type ServiceCharge as cL, type ServiceNotes as cM, type ServiceScheduleRequest as cN, type ServiceStatus as cO, type SessionActivityData as cP, type SessionChangeEvent as cQ, type SessionMessage as cR, type SlotResourceInfo as cS, type SlotStaffInfo as cT, type Staff as cU, type StaffAssignment as cV, type StaffRole as cW, type StaffScheduleItem as cX, type StockLevel as cY, type StockStatus as cZ, type StoreCreditBalance as c_, type QuoteBundleSelectionInput as ca, type QuoteCompositeSelectionInput as cb, type QuoteDynamicBuckets as cc, type QuoteStatus as cd, type QuoteUiMessage as ce, type ReadRequestOptions as cf, type RefreshQuoteInput as cg, type RefreshQuoteResult as ch, type RefundOrderInput as ci, type RelatedCandidate as cj, type RelatedProduct as ck, type RelatedProductsEnrichment as cl, type RelationType as cm, type ReminderMethod as cn, type ReminderSettings as co, type ReorderResult as cp, type RequestContext as cq, type RequestErrorEvent as cr, type RequestOptions as cs, type RequestSource as ct, type RequestStartEvent as cu, type RequestSuccessEvent as cv, type RescheduleBookingInput as cw, type RescheduleBookingResult as cx, type RescheduleHistoryRecord as cy, type ResourceAssignment as cz, type ActivityStateResponse as d, type StorefrontBootstrap as d0, SubscriptionService as d1, SupportService as d2, type Table as d3, type TimeRange as d4, type TimeRanges as d5, type TimeSlot as d6, type TrackCategoryViewOptions as d7, type TrackProductViewOptions as d8, type UpdateOrderStatusInput as d9, type UpdateProfileInput as da, type UploadInitResponse as db, type UploadResult as dc, UploadService as dd, combine as de, combineObject as df, createCimplifyClient as dg, createDefaultPaymentAuthorizationAdapterRegistry as dh, createElements as di, err as dj, flatMap as dk, fromPromise as dl, getOrElse as dm, isErr as dn, isOk as dp, mapError as dq, mapResult as dr, ok as ds, toNullable as dt, tryCatch as du, unwrap as dv, type AddressInfo as e, type AmountToPay as f, AuthService as g, type AuthStatus as h, type AuthenticatedCustomer as i, type AuthenticatedData as j, type AuthorizeCardPopupOptions as k, type AutocompletePrediction as l, type AutocompleteResponse as m, type AvailabilityResult as n, type AvailableSlot as o, type BookingModificationType as p, type BookingStatus as q, type BookingWithDetails as r, type BufferTimes as s, type Business as t, type BusinessDetailsDTO as u, type BusinessHours as v, type BusinessPreferences as w, BusinessService as x, type BusinessSettings as y, type BusinessWithLocations as z };
2350
+ interface CatalogueResult<T> {
2351
+ items: T[];
2352
+ is_complete: boolean;
2353
+ total_available?: number;
2354
+ pagination?: Pagination;
2355
+ }
2356
+ interface CatalogueSnapshot {
2357
+ categories: Category[];
2358
+ products: Product[];
2359
+ add_ons: AddOnWithOptions[];
2360
+ is_complete: boolean;
2361
+ total_available?: number;
2362
+ pagination?: Pagination;
2363
+ }
2364
+
2365
+ interface IdempotencyOption {
2366
+ idempotencyKey?: string;
2367
+ }
2368
+ interface GetProductsOptions {
2369
+ category?: string;
2370
+ taxonomy?: string;
2371
+ search?: string;
2372
+ page?: number;
2373
+ limit?: number;
2374
+ offset?: number;
2375
+ cursor?: string;
2376
+ tags?: string[];
2377
+ featured?: boolean;
2378
+ in_stock?: boolean;
2379
+ min_price?: number;
2380
+ max_price?: number;
2381
+ sort_by?: "name" | "price" | "created_at" | "updated_at";
2382
+ sort_order?: "asc" | "desc";
2383
+ /** Property filters — e.g. { material: "Cotton", size: "M,L" }. Values are comma-separated for multi-value. */
2384
+ properties?: Record<string, string>;
2385
+ }
2386
+ interface QuoteCompositeSelectionInput {
2387
+ component_id: string;
2388
+ quantity: number;
2389
+ variant_id?: string;
2390
+ add_on_option_id?: string;
2391
+ }
2392
+ interface QuoteBundleSelectionInput {
2393
+ component_id: string;
2394
+ quantity: number;
2395
+ variant_id?: string;
2396
+ }
2397
+ interface FetchQuoteInput {
2398
+ product_id: string;
2399
+ variant_id?: string;
2400
+ location_id?: string;
2401
+ quantity?: number;
2402
+ add_on_option_ids?: string[];
2403
+ bundle_selections?: QuoteBundleSelectionInput[];
2404
+ composite_selections?: QuoteCompositeSelectionInput[];
2405
+ }
2406
+ interface RefreshQuoteInput {
2407
+ quote_id: string;
2408
+ product_id?: string;
2409
+ variant_id?: string;
2410
+ location_id?: string;
2411
+ quantity?: number;
2412
+ add_on_option_ids?: string[];
2413
+ bundle_selections?: QuoteBundleSelectionInput[];
2414
+ composite_selections?: QuoteCompositeSelectionInput[];
2415
+ }
2416
+ type QuoteStatus = "pending" | "used" | "expired";
2417
+ interface QuoteDynamicBuckets {
2418
+ intent?: string;
2419
+ demand?: string;
2420
+ inventory?: string;
2421
+ competition?: string;
2422
+ }
2423
+ interface QuoteUiMessage {
2424
+ code: string;
2425
+ level: "info" | "warn" | "error" | string;
2426
+ text: string;
2427
+ countdown_seconds?: number;
2428
+ }
2429
+ type RequestSource = "web" | "qr_code" | "order_taker" | "ucp_a2a";
2430
+ interface PriceQuote {
2431
+ quote_id: string;
2432
+ business_id: string;
2433
+ product_id: string;
2434
+ variant_id?: string | null;
2435
+ location_id?: string | null;
2436
+ source: RequestSource;
2437
+ customer_id?: string | null;
2438
+ customer_segment_id?: string | null;
2439
+ storefront_id?: string | null;
2440
+ attribution_id?: string | null;
2441
+ quantity: number;
2442
+ currency?: CurrencyCode | null;
2443
+ snapshot_id?: string | null;
2444
+ snapshot_markup_version?: string | null;
2445
+ snapshot_tax_version?: string | null;
2446
+ item_price_info: ChosenPrice;
2447
+ variant_price_info?: ChosenPrice | null;
2448
+ final_price_info: ChosenPrice;
2449
+ sale?: SaleInfo | null;
2450
+ add_on_option_ids: string[];
2451
+ bundle_selections?: QuoteBundleSelectionInput[];
2452
+ add_ons_price_info?: ChosenPrice | null;
2453
+ quoted_total_price_info?: ChosenPrice | null;
2454
+ composite_selections?: QuoteCompositeSelectionInput[];
2455
+ dynamic_buckets: QuoteDynamicBuckets;
2456
+ ui_messages: QuoteUiMessage[];
2457
+ created_at: string;
2458
+ expires_at: string;
2459
+ next_change_at?: string | null;
2460
+ status: QuoteStatus;
2461
+ }
2462
+ interface RefreshQuoteResult {
2463
+ previous_quote_id: string;
2464
+ quote: PriceQuote;
2465
+ }
2466
+ declare class CatalogueQueries {
2467
+ private client;
2468
+ constructor(client: CimplifyClient);
2469
+ getCatalogue(opts?: ReadRequestOptions): Promise<Result<CatalogueSnapshot, CimplifyError>>;
2470
+ getProducts(options?: GetProductsOptions, opts?: ReadRequestOptions): Promise<Result<CatalogueResult<Product>, CimplifyError>>;
2471
+ getProduct(id: string, opts?: ReadRequestOptions): Promise<Result<ProductWithDetails, CimplifyError>>;
2472
+ getProductBySlug(slug: string, opts?: ReadRequestOptions): Promise<Result<ProductWithDetails, CimplifyError>>;
2473
+ getVariants(productId: string): Promise<Result<ProductVariant[], CimplifyError>>;
2474
+ getVariantAxes(productId: string): Promise<Result<VariantAxis[], CimplifyError>>;
2475
+ getVariantByAxisSelections(productId: string, selections: VariantAxisSelection): Promise<Result<ProductVariant | null, CimplifyError>>;
2476
+ getVariantById(productId: string, variantId: string): Promise<Result<ProductVariant, CimplifyError>>;
2477
+ getAddOns(productId: string, opts?: ReadRequestOptions): Promise<Result<AddOn[], CimplifyError>>;
2478
+ getCategories(opts?: ReadRequestOptions): Promise<Result<Category[], CimplifyError>>;
2479
+ getCategory(id: string, opts?: ReadRequestOptions): Promise<Result<Category, CimplifyError>>;
2480
+ getCategoryBySlug(slug: string, opts?: ReadRequestOptions): Promise<Result<Category, CimplifyError>>;
2481
+ getCategoryProducts(categoryId: string, options?: {
2482
+ limit?: number;
2483
+ offset?: number;
2484
+ }, opts?: ReadRequestOptions): Promise<Result<Product[], CimplifyError>>;
2485
+ getCollections(opts?: ReadRequestOptions): Promise<Result<Collection[], CimplifyError>>;
2486
+ getCollection(id: string, opts?: ReadRequestOptions): Promise<Result<Collection, CimplifyError>>;
2487
+ getCollectionBySlug(slug: string, opts?: ReadRequestOptions): Promise<Result<Collection, CimplifyError>>;
2488
+ getCollectionProducts(collectionId: string, options?: {
2489
+ limit?: number;
2490
+ offset?: number;
2491
+ }, opts?: ReadRequestOptions): Promise<Result<Product[], CimplifyError>>;
2492
+ searchCollections(query: string, limit?: number): Promise<Result<Collection[], CimplifyError>>;
2493
+ getBundles(): Promise<Result<BundleSummary[], CimplifyError>>;
2494
+ getBundle(id: string): Promise<Result<Bundle, CimplifyError>>;
2495
+ getBundleBySlug(slug: string): Promise<Result<Bundle, CimplifyError>>;
2496
+ searchBundles(query: string, limit?: number): Promise<Result<Bundle[], CimplifyError>>;
2497
+ getComposites(options?: {
2498
+ limit?: number;
2499
+ }): Promise<Result<Composite[], CimplifyError>>;
2500
+ getComposite(id: string): Promise<Result<Composite, CimplifyError>>;
2501
+ getCompositeByProduct(productId: string): Promise<Result<Composite, CimplifyError>>;
2502
+ calculateCompositePrice(compositeId: string, selections: ComponentSelectionInput[], locationId?: string): Promise<Result<CompositePriceResult, CimplifyError>>;
2503
+ fetchQuote(input: FetchQuoteInput, opts?: IdempotencyOption): Promise<Result<PriceQuote, CimplifyError>>;
2504
+ getQuote(quoteId: string): Promise<Result<PriceQuote, CimplifyError>>;
2505
+ refreshQuote(input: RefreshQuoteInput): Promise<Result<RefreshQuoteResult, CimplifyError>>;
2506
+ getTaxonomies(parentId?: string): Promise<Result<ProductTaxonomy[], CimplifyError>>;
2507
+ getTaxonomy(id: string): Promise<Result<TaxonomyWithChildren, CimplifyError>>;
2508
+ getTaxonomyPath(id: string): Promise<Result<ProductTaxonomy[], CimplifyError>>;
2509
+ searchTaxonomies(query: string, limit?: number): Promise<Result<ProductTaxonomy[], CimplifyError>>;
2510
+ getEligibleBillingPlans(productId: string, query?: EligiblePlansQuery): Promise<Result<ProductBillingPlan[], CimplifyError>>;
2511
+ getProductSchedules(productId: string): Promise<Result<ProductTimeProfile[], CimplifyError>>;
2512
+ checkProductAvailableNow(productId: string, locationId: string): Promise<Result<ProductAvailabilityNow, CimplifyError>>;
2513
+ getDeals(locationId?: string): Promise<Result<Deal[], CimplifyError>>;
2514
+ getProductsOnSale(): Promise<Result<ProductDealInfo[], CimplifyError>>;
2515
+ getProductDeals(productId: string): Promise<Result<Deal[], CimplifyError>>;
2516
+ getCategoryDeals(categoryId: string): Promise<Result<Deal[], CimplifyError>>;
2517
+ getCollectionDeals(collectionId: string): Promise<Result<Deal[], CimplifyError>>;
2518
+ validateDiscountCode(code: string, orderSubtotal: string, locationId?: string): Promise<Result<DiscountValidation, CimplifyError>>;
2519
+ search(query: string, options?: Omit<GetProductsOptions, "search">, opts?: ReadRequestOptions): Promise<Result<Product[], CimplifyError>>;
2520
+ searchProducts(query: string, options?: Omit<GetProductsOptions, "search">, opts?: ReadRequestOptions): Promise<Result<Product[], CimplifyError>>;
2521
+ getMenu(options?: {
2522
+ category?: string;
2523
+ limit?: number;
2524
+ }): Promise<Result<Product[], CimplifyError>>;
2525
+ getMenuCategory(categoryId: string): Promise<Result<Product[], CimplifyError>>;
2526
+ getMenuItem(itemId: string): Promise<Result<ProductWithDetails, CimplifyError>>;
2527
+ getTags(options?: {
2528
+ tag_group?: string;
2529
+ search?: string;
2530
+ min_usage?: number;
2531
+ limit?: number;
2532
+ offset?: number;
2533
+ }): Promise<Result<TagsResponse, CimplifyError>>;
2534
+ getAttributeDefinitions(namespace?: string): Promise<Result<CustomAttributeDefinition[], CimplifyError>>;
2535
+ getProductAttributes(productId: string): Promise<Result<CustomAttributeValue[], CimplifyError>>;
2536
+ getCategoryAttributes(categoryId: string): Promise<Result<CustomAttributeValue[], CimplifyError>>;
2537
+ getCollectionAttributes(collectionId: string): Promise<Result<CustomAttributeValue[], CimplifyError>>;
2538
+ getPropertyFacets(options?: {
2539
+ category_id?: string;
2540
+ product_type?: string;
2541
+ }): Promise<Result<PropertyFacet[], CimplifyError>>;
2542
+ getTaxonomyAttributes(taxonomyId: string): Promise<Result<TaxonomyAttributeTemplate[], CimplifyError>>;
2543
+ searchKnowledge(query: string, limit?: number): Promise<Result<KnowledgeArticle[], CimplifyError>>;
2544
+ getKnowledgeArticles(): Promise<Result<KnowledgeArticle[], CimplifyError>>;
2545
+ }
2546
+
2547
+ export { type CimplifyConfig as $, type ActivityRecommendation as A, type Booking as B, CimplifyClient as C, type BusinessWithLocations as D, type CancelBookingInput as E, type CancelBookingResult as F, type CancelOrderInput as G, type CancellationPolicy as H, type CardPopupAction as I, CartOperations as J, CatalogueQueries as K, type CatalogueResult as L, type CatalogueSnapshot as M, type CategoryInfo as N, type ChatAttachment as O, type PaymentAuthorizationAdapter as P, type ChatConversation as Q, type ReadRequestOptions as R, type ChatConversationResponse as S, type ChatMessage as T, type ChatReplyContext as U, type ChatUploadAttachment as V, type ChatWidgetStarter as W, type CheckSlotAvailabilityInput as X, type CheckSlotAvailabilityResult as Y, type CheckoutInput as Z, CheckoutService as _, type CacheOptions as a, type OrderGroupDetails as a$, CimplifyElement as a0, CimplifyElements as a1, type ClaimConversationResult as a2, type ClaimExternalChatsResult as a3, type ContentType as a4, type CustomerBooking as a5, type CustomerBookingServiceItem as a6, type CustomerServicePreferences as a7, type DayAvailability as a8, type DeliveryFeeDetails as a9, type GetOrdersOptions as aA, type GetProductsOptions as aB, type GroupOrderInfo as aC, HostedPurchaseIntentService as aD, InventoryService as aE, type LifecyclePhase as aF, type LineItem as aG, type LineType as aH, LinkService as aI, type LiteBootstrap as aJ, type LiteDayHours as aK, type LiteHoursRange as aL, LiteService as aM, type Location as aN, type LocationBooking as aO, type LocationTaxBehavior as aP, type LocationTaxOverrides as aQ, type LocationTimeProfile as aR, type LocationWithDetails as aS, type ObservabilityHooks as aT, type Ok as aU, type Order as aV, type OrderCustomerInfo as aW, type OrderDiscountInfo as aX, type OrderFilter as aY, type OrderFulfillmentSummary as aZ, type OrderGroup as a_, type DeliveryFeeResponse as aa, type DeliveryFeeStatus as ab, type DeliveryOption as ac, type DeliveryOptionsQuery as ad, type DeliveryOptionsResponse as ae, DeliveryService as af, type DepositResult as ag, type DismissMessageResponse as ah, type EnrichedOrder as ai, type EnrichedOrderItem as aj, type Err as ak, type ExternalChatClaimAttempt as al, type ExternalChatClaimDisposition as am, type FeeBearerType as an, type FetchQuoteInput as ao, type FulfillmentLink as ap, type FulfillmentStatus as aq, type FulfillmentSummaryDTO as ar, type FulfillmentType as as, type FxQuote as at, type FxQuoteRequest as au, type FxQuoteStatus as av, type FxRateResponse as aw, FxService as ax, type GetAvailableSlotsInput as ay, type GetDeliveryOptionsParams as az, type Result as b, type ResourceAssignment as b$, type OrderGroupPayment as b0, type OrderGroupPaymentState as b1, type OrderGroupPaymentStatus as b2, type OrderGroupPaymentSummary as b3, type OrderGroupStatus as b4, type OrderHistory as b5, type OrderLineState as b6, type OrderLineStatus as b7, type OrderLocationInfo as b8, type OrderPaymentEvent as b9, PurchaseIntentService as bA, type PurchaseIntentTransport as bB, type QuoteBundleSelectionInput as bC, type QuoteCompositeSelectionInput as bD, type QuoteDynamicBuckets as bE, type QuoteStatus as bF, type QuoteUiMessage as bG, type RefreshQuoteInput as bH, type RefreshQuoteResult as bI, type RefundOrderInput as bJ, type RelatedCandidate as bK, type RelatedProduct as bL, type RelatedProductsEnrichment as bM, type RelationType as bN, type ReminderMethod as bO, type ReminderSettings as bP, type ReorderResult as bQ, type RequestContext as bR, type RequestErrorEvent as bS, type RequestOptions as bT, type RequestRetryPolicy as bU, type RequestSource as bV, type RequestStartEvent as bW, type RequestSuccessEvent as bX, type RescheduleBookingInput as bY, type RescheduleBookingResult as bZ, type RescheduleHistoryRecord as b_, type OrderPricingView as ba, OrderQueries as bb, type OrderSplitDetail as bc, type OrderStaffInfo as bd, type OrderStatus as be, type OrderTimestampsDTO as bf, type Origin as bg, type OriginActor as bh, type OriginChannel as bi, type OtpResult as bj, PAYMENT_AUTHORIZATION_OUTCOME_STATUS as bk, PAYMENT_AUTHORIZATION_PROVIDER as bl, PURCHASE_INTENT_ROUTE as bm, PaymentAuthorizationAdapterRegistry as bn, type PaymentInfoDTO as bo, type PaymentState as bp, type PlaceDetailsResponse as bq, PlacesService as br, type PriceQuote as bs, type PricingOverrides as bt, type ProviderResolutionSource as bu, type PurchaseIntentActionDecision as bv, type PurchaseIntentRequestOptions as bw, type PurchaseIntentResolveOptions as bx, type PurchaseIntentResolveStatus as by, PurchaseIntentResolver as bz, type PaymentAuthorizationContext as c, type ResourceInfo as c0, type RetryEvent as c1, type Room as c2, SESSION_CHANGE_SOURCE as c3, type SchedulingMetadata as c4, type SchedulingResult as c5, SchedulingService as c6, type SenderType as c7, type Service as c8, type ServiceAvailabilityParams as c9, type TrackCategoryViewOptions as cA, type TrackProductViewOptions as cB, type UpdateOrderStatusInput as cC, type UpdateProfileInput as cD, type UploadInitResponse as cE, type UploadResult as cF, UploadService as cG, combine as cH, combineObject as cI, createCimplifyClient as cJ, createDefaultPaymentAuthorizationAdapterRegistry as cK, createElements as cL, err as cM, flatMap as cN, fromPromise as cO, getOrElse as cP, isErr as cQ, isOk as cR, mapError as cS, mapResult as cT, ok as cU, toNullable as cV, tryCatch as cW, unwrap as cX, type ServiceAvailabilityResult as ca, type ServiceCharge as cb, type ServiceNotes as cc, type ServiceScheduleRequest as cd, type ServiceStatus as ce, type SessionActivityData as cf, type SessionChangeEvent as cg, type SessionChangeSource as ch, type SessionMessage as ci, type SlotResourceInfo as cj, type SlotStaffInfo as ck, type Staff as cl, type StaffAssignment as cm, type StaffRole as cn, type StaffScheduleItem as co, type StockLevel as cp, type StockStatus as cq, type StoreCreditBalance as cr, StoreCreditQueries as cs, type StorefrontBootstrap as ct, SubscriptionService as cu, SupportService as cv, type Table as cw, type TimeRange as cx, type TimeRanges as cy, type TimeSlot as cz, type PaymentAuthorizationOutcome as d, type ChatReplyCard as e, type ActivityRecommendationsResponse as f, ActivityService as g, type ActivityStateResponse as h, type AmountToPay as i, AuthService as j, type AuthStatus as k, type AuthorizeCardPopupOptions as l, type AutocompletePrediction as m, type AutocompleteResponse as n, type AvailabilityResult as o, type AvailableSlot as p, type BookingModificationType as q, type BookingStatus as r, type BookingWithDetails as s, type BufferTimes as t, type Business as u, type BusinessDetailsDTO as v, type BusinessHours as w, type BusinessPreferences as x, BusinessService as y, type BusinessSettings as z };