@cimplify/sdk 0.100.6 → 0.101.1

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 (68) hide show
  1. package/dist/advanced.d.mts +3 -3
  2. package/dist/advanced.d.ts +3 -3
  3. package/dist/advanced.js +20 -20
  4. package/dist/advanced.mjs +1 -1
  5. package/dist/{chunk-KLJLKT6C.mjs → chunk-7H6IL7CX.mjs} +2 -2
  6. package/dist/{chunk-BMFWQNYZ.mjs → chunk-DKLHCZ5M.mjs} +4 -1
  7. package/dist/{chunk-PNTINRAU.js → chunk-H5SSGN7W.js} +28 -0
  8. package/dist/{chunk-BSZJSR62.js → chunk-ICCCSVN3.js} +4 -4
  9. package/dist/{chunk-D3FWJB7Y.js → chunk-YDA46OZ6.js} +50 -47
  10. package/dist/{chunk-3HU5I5VG.js → chunk-YER7DIOM.js} +15 -0
  11. package/dist/{chunk-RQPXLXB2.mjs → chunk-YHPMFTMN.mjs} +28 -0
  12. package/dist/{chunk-Z7M6GAHS.mjs → chunk-Z3K2D3TE.mjs} +15 -0
  13. package/dist/{client-CrPglBBz.d.ts → client-CdTx7X_X.d.mts} +12 -2
  14. package/dist/{client-CPcZIrjC.d.ts → client-D40kI8z2.d.ts} +2 -2
  15. package/dist/{client-BwRAAk4y.d.mts → client-Db554902.d.ts} +12 -2
  16. package/dist/{client-DGrvLiJv.d.mts → client-WkUcvRvO.d.mts} +2 -2
  17. package/dist/{index-D-LUYk1Y.d.mts → index-BjWUkYgY.d.mts} +3 -3
  18. package/dist/{index-B_RYmvlF.d.ts → index-D3UXgAYl.d.ts} +3 -3
  19. package/dist/index.d.mts +7 -7
  20. package/dist/index.d.ts +7 -7
  21. package/dist/index.js +69 -69
  22. package/dist/index.mjs +3 -3
  23. package/dist/mock/cli.mjs +28 -0
  24. package/dist/mock/library.js +28 -0
  25. package/dist/mock/library.mjs +28 -0
  26. package/dist/mock/msw.js +28 -0
  27. package/dist/mock/msw.mjs +28 -0
  28. package/dist/{payment-BSzy7sly.d.mts → payment-CRqjGrx6.d.mts} +1 -1
  29. package/dist/{payment-jK8ztICx.d.ts → payment-DO1Z1Ip6.d.ts} +1 -1
  30. package/dist/{price-D96h6c6L.d.mts → price-CiQUd_XX.d.mts} +1 -1
  31. package/dist/{price-CJLfcYKd.d.ts → price-D9EOj8y8.d.ts} +1 -1
  32. package/dist/{product-CeV8euw4.d.mts → product-DwKdC_to.d.mts} +727 -625
  33. package/dist/{product-CeV8euw4.d.ts → product-DwKdC_to.d.ts} +727 -625
  34. package/dist/react.d.mts +7 -4
  35. package/dist/react.d.ts +7 -4
  36. package/dist/react.js +75 -34
  37. package/dist/react.mjs +52 -11
  38. package/dist/server/evict.d.mts +12 -8
  39. package/dist/server/evict.d.ts +12 -8
  40. package/dist/server/evict.js +53 -7
  41. package/dist/server/evict.mjs +53 -7
  42. package/dist/server/tanstack.d.mts +4 -2
  43. package/dist/server/tanstack.d.ts +4 -2
  44. package/dist/server/tanstack.js +53 -14
  45. package/dist/server/tanstack.mjs +53 -14
  46. package/dist/{server-zyrpzJVn.d.ts → server-CeDb93WA.d.ts} +13 -1
  47. package/dist/{server-DRAW2OOX.d.mts → server-D-nSkrUr.d.mts} +13 -1
  48. package/dist/server.d.mts +4 -4
  49. package/dist/server.d.ts +4 -4
  50. package/dist/server.js +7 -7
  51. package/dist/server.mjs +2 -2
  52. package/dist/testing/msw.d.mts +2 -2
  53. package/dist/testing/msw.d.ts +2 -2
  54. package/dist/testing/msw.js +2 -2
  55. package/dist/testing/msw.mjs +1 -1
  56. package/dist/testing/suite.d.mts +6 -6
  57. package/dist/testing/suite.d.ts +6 -6
  58. package/dist/testing/suite.js +23 -23
  59. package/dist/testing/suite.mjs +4 -4
  60. package/dist/testing.d.mts +5 -5
  61. package/dist/testing.d.ts +5 -5
  62. package/dist/testing.js +79 -79
  63. package/dist/testing.mjs +5 -5
  64. package/dist/utils.d.mts +4 -4
  65. package/dist/utils.d.ts +4 -4
  66. package/package.json +1 -1
  67. package/registry/cart-summary.json +1 -1
  68. package/registry/chat-widget.json +1 -1
@@ -104,629 +104,6 @@ declare function enrichError(error: CimplifyError, options?: {
104
104
  }): CimplifyError;
105
105
  declare function isRetryableError(error: unknown): boolean;
106
106
 
107
- type CartStatus = "active" | "converting" | "converted" | "expired" | "abandoned";
108
- type CartChannel = "qr" | "taker" | "staff" | "web" | "dashboard" | "tap" | "chat";
109
- type PriceSource = "default_item" | "custom" | {
110
- location_specific: string;
111
- } | {
112
- price_list: {
113
- list_id: string;
114
- item_id: string;
115
- };
116
- } | {
117
- variant: string;
118
- } | {
119
- catalog: {
120
- catalog_id: string;
121
- item_id?: string | null;
122
- };
123
- } | {
124
- composite: string;
125
- } | {
126
- bundle: string;
127
- };
128
- type AdjustmentType = "time_based" | {
129
- location_based: string;
130
- } | {
131
- variant_based: string;
132
- } | {
133
- customer_segment: string;
134
- } | {
135
- customer_loyalty: string;
136
- } | {
137
- channel_markup: string;
138
- } | {
139
- discount: string;
140
- } | {
141
- bundle: string;
142
- } | {
143
- manual: string;
144
- } | {
145
- time_limited_promotion: {
146
- promotion_id: string;
147
- valid_until: string;
148
- };
149
- } | {
150
- price_list_override: {
151
- price_list_id: string;
152
- quantity_break?: number | null;
153
- };
154
- } | {
155
- catalog_override: {
156
- catalog_id: string;
157
- adjustment_type?: string | null;
158
- };
159
- };
160
- interface PriceAdjustment {
161
- adjustment_type: AdjustmentType;
162
- amount: Money;
163
- percentage?: Money;
164
- reason: string;
165
- applied_at: string;
166
- }
167
- interface TaxPathComponent {
168
- name: string;
169
- rate: Money;
170
- }
171
- interface PricePathTaxInfo {
172
- tax_rate: Money;
173
- tax_amount: Money;
174
- is_inclusive: boolean;
175
- components: TaxPathComponent[];
176
- }
177
- interface PriceDecisionPath {
178
- base_price_source: PriceSource;
179
- adjustments: PriceAdjustment[];
180
- context?: Record<string, unknown>;
181
- }
182
- interface ChosenPrice {
183
- base_price: Money;
184
- final_price: Money;
185
- markup_percentage: Money;
186
- markup_amount: Money;
187
- markup_discount_percentage: Money;
188
- markup_discount_amount: Money;
189
- currency?: CurrencyCode;
190
- custom_fields?: Record<string, unknown>;
191
- decision_path?: PriceDecisionPath;
192
- tax_info?: PricePathTaxInfo;
193
- pre_tax_price?: Money;
194
- }
195
- type BenefitType = "percentage" | "fixed" | "points" | "free_item" | "buy_x_get_y_free";
196
- interface AppliedDiscount {
197
- discount_id: string;
198
- discount_code?: string;
199
- discount_type: BenefitType;
200
- discount_value: Money;
201
- discount_amount: Money;
202
- applied_at: string;
203
- targeted_item_ids?: string[];
204
- }
205
- interface DiscountBreakdown {
206
- item_discounts: Record<string, AppliedDiscount[]>;
207
- order_discounts: AppliedDiscount[];
208
- }
209
- interface DiscountDetails {
210
- discounts: AppliedDiscount[];
211
- total_discount_amount: Money;
212
- breakdown: DiscountBreakdown;
213
- }
214
- interface SelectedAddOnOption {
215
- option_id: string;
216
- add_on_id: string;
217
- name: string;
218
- price: Money;
219
- quantity: number;
220
- is_required: boolean;
221
- selected_at: string;
222
- price_info?: ChosenPrice;
223
- }
224
- interface AddOnDetails {
225
- selected_options: SelectedAddOnOption[];
226
- total_add_on_price: Money;
227
- add_ons: CartAddOn[];
228
- }
229
- interface CartAddOn {
230
- add_on_id: string;
231
- name: string;
232
- min_selections: number;
233
- max_selections: number;
234
- selected_options: string[];
235
- is_required: boolean;
236
- }
237
- interface VariantDetails {
238
- variant_id: string;
239
- sku?: string;
240
- properties: Record<string, string>;
241
- }
242
- interface BundleSelectionInput {
243
- component_id: string;
244
- variant_id?: string;
245
- quantity: number;
246
- scheduled_start?: string;
247
- scheduled_end?: string;
248
- }
249
- interface ComponentSchedulingData {
250
- scheduled_start?: string;
251
- scheduled_end?: string;
252
- service_status: string;
253
- confirmation_code?: string;
254
- booking_id?: string;
255
- primary_resource_id?: string;
256
- }
257
- interface BundleStoredSelection {
258
- component_id: string;
259
- product_id: string;
260
- product_name: string;
261
- variant_id?: string;
262
- variant_name?: string;
263
- quantity: number;
264
- unit_price: Money;
265
- product_type?: ProductType;
266
- scheduling?: ComponentSchedulingData;
267
- }
268
- interface BundleSelectionData {
269
- bundle_id: string;
270
- selections: BundleStoredSelection[];
271
- }
272
- interface CompositeStoredSelection {
273
- component_id: string;
274
- component_name: string;
275
- quantity: number;
276
- group_id: string;
277
- source_type: "product" | "stock" | "add_on" | "standalone";
278
- source_product_id?: string;
279
- source_stock_id?: string;
280
- unit_price: Money;
281
- product_type?: ProductType;
282
- scheduling?: ComponentSchedulingData;
283
- }
284
- interface CompositePriceBreakdown {
285
- base_price: Money;
286
- components_total: Money;
287
- tier_applied?: string;
288
- final_price: Money;
289
- }
290
- interface CompositeSelectionData {
291
- composite_id: string;
292
- selections: CompositeStoredSelection[];
293
- breakdown: CompositePriceBreakdown;
294
- }
295
-
296
- type LineConfiguration = {
297
- type: "simple";
298
- variant?: VariantDetails;
299
- add_ons?: AddOnDetails;
300
- customer_inputs?: CustomerInputValue[];
301
- } | {
302
- type: "service";
303
- variant?: VariantDetails;
304
- add_ons?: AddOnDetails;
305
- customer_inputs?: CustomerInputValue[];
306
- scheduled_start?: string;
307
- scheduled_end?: string;
308
- confirmation_code?: string;
309
- service_status?: string;
310
- primary_staff_id?: string;
311
- primary_resource_id?: string;
312
- scheduling_metadata?: Record<string, unknown>;
313
- price_basis?: "flat" | "per_person" | "per_duration_unit";
314
- units?: number;
315
- duration_unit?: DurationUnit;
316
- } | {
317
- type: "bundle";
318
- variant?: VariantDetails;
319
- input: BundleSelectionInput[];
320
- resolved?: BundleSelectionData;
321
- add_ons?: AddOnDetails;
322
- customer_inputs?: CustomerInputValue[];
323
- } | {
324
- type: "composite";
325
- variant?: VariantDetails;
326
- input: ComponentSelectionInput[];
327
- resolved?: CompositeSelectionData;
328
- add_ons?: AddOnDetails;
329
- customer_inputs?: CustomerInputValue[];
330
- } | {
331
- type: "digital";
332
- variant?: VariantDetails;
333
- add_ons?: AddOnDetails;
334
- customer_inputs?: CustomerInputValue[];
335
- digital_type?: string;
336
- fulfillment_id?: string;
337
- };
338
- interface Cart {
339
- id: string;
340
- business_id: string;
341
- customer_id?: string;
342
- session_id?: string;
343
- location_id?: string;
344
- created_at: string;
345
- updated_at: string;
346
- expires_at: string;
347
- subtotal: Money;
348
- tax_amount: Money;
349
- service_charge: Money;
350
- total_discounts: Money;
351
- total_price: Money;
352
- delivery_fee: Money;
353
- total_items: number;
354
- tax_rate?: Money;
355
- service_charge_rate?: Money;
356
- price_info: ChosenPrice;
357
- applied_discount_ids: string[];
358
- applied_discount_codes: string[];
359
- discount_details?: DiscountDetails;
360
- currency: CurrencyCode;
361
- customer_name?: string;
362
- customer_email?: string;
363
- customer_phone?: string;
364
- customer_address?: string;
365
- source: string;
366
- status: CartStatus;
367
- channel: string;
368
- order_id?: string;
369
- metadata?: Record<string, unknown>;
370
- items: CartItem[];
371
- }
372
- interface CartItem {
373
- id: string;
374
- cart_id: string;
375
- item_id: string;
376
- quantity: number;
377
- line_key: string;
378
- configuration: LineConfiguration;
379
- price: Money;
380
- add_ons_price: Money;
381
- price_info: ChosenPrice;
382
- applied_discount_ids: string[];
383
- item_discount_amount: Money;
384
- discount_details?: DiscountDetails;
385
- created_at: string;
386
- updated_at: string;
387
- metadata?: Record<string, unknown>;
388
- }
389
- interface CartTotals {
390
- subtotal: Money;
391
- tax_amount: Money;
392
- service_charge: Money;
393
- total_discounts: Money;
394
- total_price: Money;
395
- tax_rate?: Money;
396
- service_charge_rate?: Money;
397
- applied_discount_ids: string[];
398
- applied_discount_codes: string[];
399
- discount_details?: DiscountDetails;
400
- }
401
- interface DisplayCart {
402
- id: string;
403
- business_id: string;
404
- customer_id?: string;
405
- session_id?: string;
406
- location_id?: string;
407
- subtotal: Money;
408
- tax_amount: Money;
409
- service_charge: Money;
410
- total_discounts: Money;
411
- total_price: Money;
412
- delivery_fee: Money;
413
- total_items: number;
414
- tax_rate?: Money;
415
- service_charge_rate?: Money;
416
- currency: CurrencyCode;
417
- channel: string;
418
- status: string;
419
- business_name: string;
420
- business_logo?: string;
421
- location_name?: string;
422
- customer_name?: string;
423
- customer_email?: string;
424
- customer_phone?: string;
425
- customer_address?: string;
426
- items: DisplayCartItem[];
427
- applied_discount_codes: string[];
428
- discount_details?: DiscountDetails;
429
- }
430
- interface DisplayCartItem {
431
- id: string;
432
- cart_id: string;
433
- item_id: string;
434
- quantity: number;
435
- name: string;
436
- description?: string;
437
- image_url?: string;
438
- category_name?: string;
439
- is_available: boolean;
440
- preparation_time?: number;
441
- unit_price: Money;
442
- total_price: Money;
443
- add_ons_price: Money;
444
- price_info: ChosenPrice;
445
- item_discount_amount: Money;
446
- discount_details?: DiscountDetails;
447
- add_ons: DisplayAddOn[];
448
- special_instructions?: string;
449
- }
450
- interface DisplayAddOn {
451
- id: string;
452
- name: string;
453
- min_selections: number;
454
- max_selections: number;
455
- is_required: boolean;
456
- selected_options: DisplayAddOnOption[];
457
- }
458
- interface DisplayAddOnOption {
459
- id: string;
460
- name: string;
461
- price: Money;
462
- quantity: number;
463
- image_url?: string;
464
- description?: string;
465
- }
466
- interface UICartBusiness {
467
- name: string;
468
- logo_url?: string;
469
- contact_email?: string;
470
- contact_phone?: string;
471
- }
472
- interface UICartLocation {
473
- id?: string;
474
- name?: string;
475
- }
476
- interface UICartCustomer {
477
- id?: string;
478
- name?: string;
479
- email?: string;
480
- phone?: string;
481
- address?: string;
482
- }
483
- interface UICartPricing {
484
- subtotal: Money;
485
- tax_amount: Money;
486
- service_charge: Money;
487
- total_discounts: Money;
488
- total_price: Money;
489
- tax_rate?: Money;
490
- service_charge_rate?: Money;
491
- currency: CurrencyCode;
492
- /** Tax is baked into the prices (e.g. Ghana VAT), so `tax_amount` is the
493
- * portion already inside `subtotal`/`total_price`, not an addition. */
494
- tax_inclusive: boolean;
495
- /** Deposit computed from the catalogue when the cart has deposit-eligible
496
- * service items; lets checkout offer "pay deposit now, balance later". */
497
- deposit_required?: boolean;
498
- deposit_amount?: Money;
499
- }
500
- interface AddOnOptionDetails {
501
- id: string;
502
- name: string;
503
- price?: Money;
504
- is_required: boolean;
505
- description?: string;
506
- image_url?: string;
507
- }
508
- interface AddOnGroupDetails {
509
- id: string;
510
- name: string;
511
- is_multiple_allowed: boolean;
512
- min_selections: number;
513
- max_selections: number;
514
- required: boolean;
515
- options: AddOnOptionDetails[];
516
- }
517
- interface VariantDetailsDTO {
518
- id: string;
519
- name: string;
520
- price: Money;
521
- price_adjustment: Money;
522
- is_default: boolean;
523
- }
524
- interface CartItemDetails {
525
- id: string;
526
- cart_id: string;
527
- item_id: string;
528
- quantity: number;
529
- line_key: string;
530
- line_type: "simple" | "service" | "bundle" | "composite" | "digital";
531
- name: string;
532
- description?: string;
533
- image_url?: string;
534
- category_id?: string;
535
- category_name?: string;
536
- is_available: boolean;
537
- variant_id?: string;
538
- variant_details?: VariantDetails;
539
- variant_name?: string;
540
- variant_info?: VariantDetailsDTO;
541
- base_price: Money;
542
- add_ons_price: Money;
543
- total_price: Money;
544
- item_discount_amount: Money;
545
- price_info: ChosenPrice;
546
- add_on_option_ids: string[];
547
- add_on_ids: string[];
548
- add_on_details: AddOnDetails;
549
- add_on_options: AddOnOptionDetails[];
550
- add_ons: AddOnGroupDetails[];
551
- special_instructions?: string;
552
- scheduled_start?: string;
553
- scheduled_end?: string;
554
- confirmation_code?: string;
555
- service_status?: string;
556
- staff_id?: string;
557
- units?: number;
558
- scheduling_metadata?: Record<string, unknown>;
559
- bundle_selections?: BundleSelectionInput[];
560
- bundle_resolved?: BundleSelectionData;
561
- composite_selections?: ComponentSelectionInput[];
562
- composite_resolved?: CompositeSelectionData;
563
- customer_inputs?: Array<{
564
- field_id: string;
565
- field_name: string;
566
- field_type: string;
567
- value: unknown;
568
- }>;
569
- applied_discount_ids: string[];
570
- discount_details?: DiscountDetails;
571
- created_at: string;
572
- updated_at: string;
573
- metadata?: Record<string, unknown>;
574
- }
575
- interface UICart {
576
- id: string;
577
- business_id: string;
578
- session_id?: string;
579
- customer_id?: string;
580
- location_id?: string;
581
- created_at: string;
582
- updated_at: string;
583
- expires_at: string;
584
- status: string;
585
- source: string;
586
- channel: string;
587
- business_details?: UICartBusiness;
588
- location_details?: UICartLocation;
589
- customer_info: UICartCustomer;
590
- items: CartItemDetails[];
591
- pricing: UICartPricing;
592
- requires_delivery?: boolean;
593
- metadata?: Record<string, unknown>;
594
- }
595
- interface CartNotice {
596
- kind: "info" | "warning";
597
- text: string;
598
- }
599
- interface CartMutationResult {
600
- cart: UICart;
601
- notice?: CartNotice;
602
- }
603
- interface AddToCartInput {
604
- item_id: string;
605
- quantity?: number;
606
- variant_id?: string;
607
- quote_id?: string;
608
- add_on_options?: string[];
609
- special_instructions?: string;
610
- bundle_selections?: BundleSelectionInput[];
611
- composite_selections?: ComponentSelectionInput[];
612
- scheduled_start?: string;
613
- scheduled_end?: string;
614
- staff_id?: string;
615
- resource_id?: string;
616
- units?: number;
617
- billing_plan_id?: string;
618
- customer_inputs?: Array<{
619
- field_id: string;
620
- value: unknown;
621
- }>;
622
- }
623
- interface UpdateCartItemInput {
624
- quantity?: number;
625
- special_instructions?: string;
626
- }
627
- interface CartSummary {
628
- item_count: number;
629
- total_items: number;
630
- subtotal: Money;
631
- discount_amount: Money;
632
- tax_amount: Money;
633
- total: Money;
634
- currency: CurrencyCode;
635
- }
636
-
637
- type BillingFrequency = "weekly" | "biweekly" | "monthly" | "quarterly" | "annually";
638
- type BillingPlanType = "subscription" | "installment";
639
- type BillingMarkupType = "fixed" | "percentage";
640
- interface ProductBillingPlan {
641
- id: string;
642
- product_id: string;
643
- business_id: string;
644
- frequency: BillingFrequency;
645
- fulfillment_frequency?: BillingFrequency | null;
646
- plan_type: BillingPlanType;
647
- installment_periods?: number | null;
648
- trial_days: number;
649
- setup_fee: number;
650
- markup_type?: BillingMarkupType | null;
651
- markup_amount?: number | null;
652
- customer_group_id?: string | null;
653
- min_quantity?: number | null;
654
- min_order_value?: number | null;
655
- max_cycles?: number | null;
656
- is_active: boolean;
657
- created_at: string;
658
- updated_at: string;
659
- metadata?: Record<string, unknown>;
660
- }
661
- interface EligiblePlansQuery {
662
- customer_id?: string;
663
- quantity?: number;
664
- order_value?: number;
665
- }
666
- interface FormattedPlanOption {
667
- plan: ProductBillingPlan;
668
- label: string;
669
- pricePerPeriod: number;
670
- totalPrice?: number;
671
- }
672
- type SubscriptionStatus = "incomplete" | "incomplete_expired" | "trialing" | "active" | "past_due" | "canceled" | "unpaid" | "paused";
673
- interface Subscription {
674
- id: string;
675
- customer_id: string;
676
- billing_plan_id?: string;
677
- business_id?: string;
678
- status: SubscriptionStatus;
679
- current_period_start: string;
680
- current_period_end: string;
681
- next_billing_date?: string;
682
- trial_start?: string;
683
- trial_end?: string;
684
- canceled_at?: string;
685
- cancel_at_period_end: boolean;
686
- location_id?: string;
687
- installment_total?: number;
688
- installment_per_period?: number;
689
- installment_periods_remaining?: number;
690
- origin_order_id?: string;
691
- skip_next_renewal: boolean;
692
- cycles_completed: number;
693
- source?: string;
694
- source_id?: string;
695
- frequency?: BillingFrequency | null;
696
- fulfillment_frequency?: BillingFrequency | null;
697
- contract_ends_at?: string;
698
- created_at: string;
699
- updated_at: string;
700
- metadata?: Record<string, unknown>;
701
- }
702
- interface SubscriptionItem {
703
- id: string;
704
- subscription_id: string;
705
- product_id: string;
706
- quantity: number;
707
- added_at: string;
708
- removed_at?: string;
709
- metadata?: Record<string, unknown>;
710
- }
711
- interface SubscriptionInvoice {
712
- id: string;
713
- subscription_id: string;
714
- amount_due: number;
715
- amount_paid: number;
716
- currency: string;
717
- status: string;
718
- period_start: string;
719
- period_end: string;
720
- created_at: string;
721
- }
722
- interface SubscriptionWithDetails {
723
- subscription: Subscription;
724
- billing_plan?: ProductBillingPlan | null;
725
- catalogue_product?: Product | null;
726
- items: SubscriptionItem[];
727
- latest_invoice?: SubscriptionInvoice | null;
728
- }
729
-
730
107
  interface components {
731
108
  schemas: {
732
109
  AccessPassView: components["schemas"]["ProductBase"] & {
@@ -1566,6 +943,12 @@ interface components {
1566
943
  tax_rate?: string | null;
1567
944
  service_charge_rate?: string | null;
1568
945
  currency: string;
946
+ /**
947
+ * @description Jurisdiction resolved by the checkout tax decision (for example,
948
+ * `Austin, TX`). `None` means this cart has not received a destination
949
+ * decision yet; clients must not infer it from the preview rate.
950
+ */
951
+ tax_jurisdiction_label?: string | null;
1569
952
  /**
1570
953
  * @description Tax is baked into the prices (e.g. Ghana VAT), so `tax_amount` is the
1571
954
  * portion already inside `subtotal`/`total_price`, not an addition. Checkout
@@ -1720,6 +1103,28 @@ interface components {
1720
1103
  public_key?: string | null;
1721
1104
  next_action: components["schemas"]["NextAction"];
1722
1105
  };
1106
+ CheckoutDestinationQuoteRequest: {
1107
+ order_type: components["schemas"]["OrderType"];
1108
+ address_info: components["schemas"]["AddressInfo"];
1109
+ delivery_rate_id?: string | null;
1110
+ };
1111
+ CheckoutDestinationQuoteResponse: {
1112
+ subtotal: string;
1113
+ tax_amount: string;
1114
+ service_charge: string;
1115
+ total_discounts: string;
1116
+ delivery_fee: string;
1117
+ statutory_charge_total: string;
1118
+ statutory_charges: components["schemas"]["StatutoryChargeReceiptLine"][];
1119
+ total: string;
1120
+ currency: string;
1121
+ tax_jurisdiction_label: string;
1122
+ tax_inclusive: boolean;
1123
+ /** @description Effective tax rate in percentage points (for example, `8.25`). */
1124
+ tax_rate?: string | null;
1125
+ delivery_fee_details?: null | components["schemas"]["DeliveryFeeDetails"];
1126
+ address_info: components["schemas"]["AddressInfo"];
1127
+ };
1723
1128
  /**
1724
1129
  * @description How taxes are displayed at checkout
1725
1130
  * @enum {string}
@@ -1772,6 +1177,29 @@ interface components {
1772
1177
  /** @description Storefront analytics session; always overwritten server-side at the edge. */
1773
1178
  session_token?: string | null;
1774
1179
  };
1180
+ CheckoutSessionBusiness: {
1181
+ name: string;
1182
+ logo_url?: string | null;
1183
+ };
1184
+ CheckoutSessionCart: {
1185
+ items: components["schemas"]["CheckoutSessionCartItem"][];
1186
+ subtotal: string;
1187
+ tax_amount: string;
1188
+ total: string;
1189
+ currency: string;
1190
+ tax_jurisdiction_label?: string | null;
1191
+ tax_inclusive: boolean;
1192
+ /** @description Effective tax rate in percentage points (for example, `8.25`). */
1193
+ tax_rate?: string | null;
1194
+ };
1195
+ CheckoutSessionCartItem: {
1196
+ product_id: string;
1197
+ name?: string | null;
1198
+ /** Format: int32 */
1199
+ quantity: number;
1200
+ unit_price: string;
1201
+ total: string;
1202
+ };
1775
1203
  /**
1776
1204
  * @description A unified structure to hold pricing information for items
1777
1205
  * This is stored as JSONB in the database and used by both CartItem and LineItem
@@ -2343,6 +1771,7 @@ interface components {
2343
1771
  */
2344
1772
  rate_id?: string | null;
2345
1773
  rate_name?: string | null;
1774
+ transport_mode?: components["schemas"]["DeliveryTransportMode"];
2346
1775
  distance_km?: string | null;
2347
1776
  base_fee?: string | null;
2348
1777
  per_km_fee?: string | null;
@@ -2387,6 +1816,13 @@ interface components {
2387
1816
  options: components["schemas"]["DeliveryOption"][];
2388
1817
  message?: string | null;
2389
1818
  };
1819
+ /**
1820
+ * @description Fulfillment evidence used by document-level statutory charges. `Unknown`
1821
+ * is deliberately distinct from `NonMotorized`: compliance code must never
1822
+ * infer a motor-vehicle delivery from the existence of a delivery fee.
1823
+ * @enum {string}
1824
+ */
1825
+ DeliveryTransportMode: "unknown" | "motor_vehicle" | "non_motorized";
2390
1826
  /** @description Department-specific messaging rules */
2391
1827
  DepartmentMessagingRules: {
2392
1828
  /** @description Department identifier */
@@ -2868,6 +2304,12 @@ interface components {
2868
2304
  preferences?: Record<string, never> | null;
2869
2305
  metadata?: Record<string, never> | null;
2870
2306
  country_code: string;
2307
+ /**
2308
+ * @description Canonical seller-origin state/region code. Historical locations may be
2309
+ * unset; tax checkout must then fail explicitly instead of parsing free
2310
+ * text or guessing from coordinates.
2311
+ */
2312
+ state_code?: string | null;
2871
2313
  timezone: string;
2872
2314
  /** Format: double */
2873
2315
  latitude?: number | null;
@@ -3360,7 +2802,7 @@ interface components {
3360
2802
  city?: string | null;
3361
2803
  region?: string | null;
3362
2804
  postal_code?: string | null;
3363
- country?: string | null;
2805
+ country: string;
3364
2806
  /** Format: double */
3365
2807
  latitude: number;
3366
2808
  /** Format: double */
@@ -3370,6 +2812,7 @@ interface components {
3370
2812
  PlaceDetailsBody: {
3371
2813
  place_id: string;
3372
2814
  sessionToken?: string | null;
2815
+ country: string;
3373
2816
  };
3374
2817
  PlaceDetailsResponse: {
3375
2818
  success: boolean;
@@ -3378,6 +2821,7 @@ interface components {
3378
2821
  PlacesAutocompleteBody: {
3379
2822
  input: string;
3380
2823
  sessionToken?: string | null;
2824
+ country?: string | null;
3381
2825
  };
3382
2826
  PlacesAutocompleteResponse: {
3383
2827
  success: boolean;
@@ -3822,6 +3266,23 @@ interface components {
3822
3266
  * @enum {string}
3823
3267
  */
3824
3268
  ProviderResolutionSource: "zone" | "hint" | "fallback" | "rate" | "best_price";
3269
+ PublicCheckoutSessionResponse: {
3270
+ id: string;
3271
+ status: string;
3272
+ business_id: string;
3273
+ cart_id: string;
3274
+ public_key?: string | null;
3275
+ business: components["schemas"]["CheckoutSessionBusiness"];
3276
+ cart: components["schemas"]["CheckoutSessionCart"];
3277
+ order_types: string[];
3278
+ default_order_type?: string | null;
3279
+ appearance?: Record<string, never> | null;
3280
+ submit_label?: string | null;
3281
+ success_url?: string | null;
3282
+ cancel_url?: string | null;
3283
+ /** Format: date-time */
3284
+ expires_at: string;
3285
+ };
3825
3286
  QuantityPricingTier: {
3826
3287
  /** Format: int32 */
3827
3288
  min_quantity: number;
@@ -4307,6 +3768,13 @@ interface components {
4307
3768
  modified_by_staff: boolean;
4308
3769
  served_by?: string | null;
4309
3770
  };
3771
+ StatutoryChargeReceiptLine: {
3772
+ decision_id: string;
3773
+ code: string;
3774
+ name: string;
3775
+ amount: string;
3776
+ currency: string;
3777
+ };
4310
3778
  /** @description Actions to take when approval step times out */
4311
3779
  StepTimeoutAction: "Continue" | "Fail" | {
4312
3780
  /** @description Escalate to backup approvers */
@@ -4674,6 +4142,640 @@ interface components {
4674
4142
  pathItems: never;
4675
4143
  }
4676
4144
 
4145
+ type DestinationQuote = components["schemas"]["CheckoutDestinationQuoteResponse"];
4146
+ type DestinationQuoteAddress = components["schemas"]["AddressInfo"];
4147
+ interface DestinationQuoteInput {
4148
+ order_type: string;
4149
+ address_info: DestinationQuoteAddress;
4150
+ delivery_rate_id?: string | null;
4151
+ }
4152
+ type CartStatus = "active" | "converting" | "converted" | "expired" | "abandoned";
4153
+ type CartChannel = "qr" | "taker" | "staff" | "web" | "dashboard" | "tap" | "chat";
4154
+ type PriceSource = "default_item" | "custom" | {
4155
+ location_specific: string;
4156
+ } | {
4157
+ price_list: {
4158
+ list_id: string;
4159
+ item_id: string;
4160
+ };
4161
+ } | {
4162
+ variant: string;
4163
+ } | {
4164
+ catalog: {
4165
+ catalog_id: string;
4166
+ item_id?: string | null;
4167
+ };
4168
+ } | {
4169
+ composite: string;
4170
+ } | {
4171
+ bundle: string;
4172
+ };
4173
+ type AdjustmentType = "time_based" | {
4174
+ location_based: string;
4175
+ } | {
4176
+ variant_based: string;
4177
+ } | {
4178
+ customer_segment: string;
4179
+ } | {
4180
+ customer_loyalty: string;
4181
+ } | {
4182
+ channel_markup: string;
4183
+ } | {
4184
+ discount: string;
4185
+ } | {
4186
+ bundle: string;
4187
+ } | {
4188
+ manual: string;
4189
+ } | {
4190
+ time_limited_promotion: {
4191
+ promotion_id: string;
4192
+ valid_until: string;
4193
+ };
4194
+ } | {
4195
+ price_list_override: {
4196
+ price_list_id: string;
4197
+ quantity_break?: number | null;
4198
+ };
4199
+ } | {
4200
+ catalog_override: {
4201
+ catalog_id: string;
4202
+ adjustment_type?: string | null;
4203
+ };
4204
+ };
4205
+ interface PriceAdjustment {
4206
+ adjustment_type: AdjustmentType;
4207
+ amount: Money;
4208
+ percentage?: Money;
4209
+ reason: string;
4210
+ applied_at: string;
4211
+ }
4212
+ interface TaxPathComponent {
4213
+ name: string;
4214
+ rate: Money;
4215
+ }
4216
+ interface PricePathTaxInfo {
4217
+ tax_rate: Money;
4218
+ tax_amount: Money;
4219
+ is_inclusive: boolean;
4220
+ components: TaxPathComponent[];
4221
+ }
4222
+ interface PriceDecisionPath {
4223
+ base_price_source: PriceSource;
4224
+ adjustments: PriceAdjustment[];
4225
+ context?: Record<string, unknown>;
4226
+ }
4227
+ interface ChosenPrice {
4228
+ base_price: Money;
4229
+ final_price: Money;
4230
+ markup_percentage: Money;
4231
+ markup_amount: Money;
4232
+ markup_discount_percentage: Money;
4233
+ markup_discount_amount: Money;
4234
+ currency?: CurrencyCode;
4235
+ custom_fields?: Record<string, unknown>;
4236
+ decision_path?: PriceDecisionPath;
4237
+ tax_info?: PricePathTaxInfo;
4238
+ pre_tax_price?: Money;
4239
+ }
4240
+ type BenefitType = "percentage" | "fixed" | "points" | "free_item" | "buy_x_get_y_free";
4241
+ interface AppliedDiscount {
4242
+ discount_id: string;
4243
+ discount_code?: string;
4244
+ discount_type: BenefitType;
4245
+ discount_value: Money;
4246
+ discount_amount: Money;
4247
+ applied_at: string;
4248
+ targeted_item_ids?: string[];
4249
+ }
4250
+ interface DiscountBreakdown {
4251
+ item_discounts: Record<string, AppliedDiscount[]>;
4252
+ order_discounts: AppliedDiscount[];
4253
+ }
4254
+ interface DiscountDetails {
4255
+ discounts: AppliedDiscount[];
4256
+ total_discount_amount: Money;
4257
+ breakdown: DiscountBreakdown;
4258
+ }
4259
+ interface SelectedAddOnOption {
4260
+ option_id: string;
4261
+ add_on_id: string;
4262
+ name: string;
4263
+ price: Money;
4264
+ quantity: number;
4265
+ is_required: boolean;
4266
+ selected_at: string;
4267
+ price_info?: ChosenPrice;
4268
+ }
4269
+ interface AddOnDetails {
4270
+ selected_options: SelectedAddOnOption[];
4271
+ total_add_on_price: Money;
4272
+ add_ons: CartAddOn[];
4273
+ }
4274
+ interface CartAddOn {
4275
+ add_on_id: string;
4276
+ name: string;
4277
+ min_selections: number;
4278
+ max_selections: number;
4279
+ selected_options: string[];
4280
+ is_required: boolean;
4281
+ }
4282
+ interface VariantDetails {
4283
+ variant_id: string;
4284
+ sku?: string;
4285
+ properties: Record<string, string>;
4286
+ }
4287
+ interface BundleSelectionInput {
4288
+ component_id: string;
4289
+ variant_id?: string;
4290
+ quantity: number;
4291
+ scheduled_start?: string;
4292
+ scheduled_end?: string;
4293
+ }
4294
+ interface ComponentSchedulingData {
4295
+ scheduled_start?: string;
4296
+ scheduled_end?: string;
4297
+ service_status: string;
4298
+ confirmation_code?: string;
4299
+ booking_id?: string;
4300
+ primary_resource_id?: string;
4301
+ }
4302
+ interface BundleStoredSelection {
4303
+ component_id: string;
4304
+ product_id: string;
4305
+ product_name: string;
4306
+ variant_id?: string;
4307
+ variant_name?: string;
4308
+ quantity: number;
4309
+ unit_price: Money;
4310
+ product_type?: ProductType;
4311
+ scheduling?: ComponentSchedulingData;
4312
+ }
4313
+ interface BundleSelectionData {
4314
+ bundle_id: string;
4315
+ selections: BundleStoredSelection[];
4316
+ }
4317
+ interface CompositeStoredSelection {
4318
+ component_id: string;
4319
+ component_name: string;
4320
+ quantity: number;
4321
+ group_id: string;
4322
+ source_type: "product" | "stock" | "add_on" | "standalone";
4323
+ source_product_id?: string;
4324
+ source_stock_id?: string;
4325
+ unit_price: Money;
4326
+ product_type?: ProductType;
4327
+ scheduling?: ComponentSchedulingData;
4328
+ }
4329
+ interface CompositePriceBreakdown {
4330
+ base_price: Money;
4331
+ components_total: Money;
4332
+ tier_applied?: string;
4333
+ final_price: Money;
4334
+ }
4335
+ interface CompositeSelectionData {
4336
+ composite_id: string;
4337
+ selections: CompositeStoredSelection[];
4338
+ breakdown: CompositePriceBreakdown;
4339
+ }
4340
+
4341
+ type LineConfiguration = {
4342
+ type: "simple";
4343
+ variant?: VariantDetails;
4344
+ add_ons?: AddOnDetails;
4345
+ customer_inputs?: CustomerInputValue[];
4346
+ } | {
4347
+ type: "service";
4348
+ variant?: VariantDetails;
4349
+ add_ons?: AddOnDetails;
4350
+ customer_inputs?: CustomerInputValue[];
4351
+ scheduled_start?: string;
4352
+ scheduled_end?: string;
4353
+ confirmation_code?: string;
4354
+ service_status?: string;
4355
+ primary_staff_id?: string;
4356
+ primary_resource_id?: string;
4357
+ scheduling_metadata?: Record<string, unknown>;
4358
+ price_basis?: "flat" | "per_person" | "per_duration_unit";
4359
+ units?: number;
4360
+ duration_unit?: DurationUnit;
4361
+ } | {
4362
+ type: "bundle";
4363
+ variant?: VariantDetails;
4364
+ input: BundleSelectionInput[];
4365
+ resolved?: BundleSelectionData;
4366
+ add_ons?: AddOnDetails;
4367
+ customer_inputs?: CustomerInputValue[];
4368
+ } | {
4369
+ type: "composite";
4370
+ variant?: VariantDetails;
4371
+ input: ComponentSelectionInput[];
4372
+ resolved?: CompositeSelectionData;
4373
+ add_ons?: AddOnDetails;
4374
+ customer_inputs?: CustomerInputValue[];
4375
+ } | {
4376
+ type: "digital";
4377
+ variant?: VariantDetails;
4378
+ add_ons?: AddOnDetails;
4379
+ customer_inputs?: CustomerInputValue[];
4380
+ digital_type?: string;
4381
+ fulfillment_id?: string;
4382
+ };
4383
+ interface Cart {
4384
+ id: string;
4385
+ business_id: string;
4386
+ customer_id?: string;
4387
+ session_id?: string;
4388
+ location_id?: string;
4389
+ created_at: string;
4390
+ updated_at: string;
4391
+ expires_at: string;
4392
+ subtotal: Money;
4393
+ tax_amount: Money;
4394
+ service_charge: Money;
4395
+ total_discounts: Money;
4396
+ total_price: Money;
4397
+ delivery_fee: Money;
4398
+ total_items: number;
4399
+ tax_rate?: Money;
4400
+ service_charge_rate?: Money;
4401
+ price_info: ChosenPrice;
4402
+ applied_discount_ids: string[];
4403
+ applied_discount_codes: string[];
4404
+ discount_details?: DiscountDetails;
4405
+ currency: CurrencyCode;
4406
+ customer_name?: string;
4407
+ customer_email?: string;
4408
+ customer_phone?: string;
4409
+ customer_address?: string;
4410
+ source: string;
4411
+ status: CartStatus;
4412
+ channel: string;
4413
+ order_id?: string;
4414
+ metadata?: Record<string, unknown>;
4415
+ items: CartItem[];
4416
+ }
4417
+ interface CartItem {
4418
+ id: string;
4419
+ cart_id: string;
4420
+ item_id: string;
4421
+ quantity: number;
4422
+ line_key: string;
4423
+ configuration: LineConfiguration;
4424
+ price: Money;
4425
+ add_ons_price: Money;
4426
+ price_info: ChosenPrice;
4427
+ applied_discount_ids: string[];
4428
+ item_discount_amount: Money;
4429
+ discount_details?: DiscountDetails;
4430
+ created_at: string;
4431
+ updated_at: string;
4432
+ metadata?: Record<string, unknown>;
4433
+ }
4434
+ interface CartTotals {
4435
+ subtotal: Money;
4436
+ tax_amount: Money;
4437
+ service_charge: Money;
4438
+ total_discounts: Money;
4439
+ total_price: Money;
4440
+ tax_rate?: Money;
4441
+ service_charge_rate?: Money;
4442
+ applied_discount_ids: string[];
4443
+ applied_discount_codes: string[];
4444
+ discount_details?: DiscountDetails;
4445
+ }
4446
+ interface DisplayCart {
4447
+ id: string;
4448
+ business_id: string;
4449
+ customer_id?: string;
4450
+ session_id?: string;
4451
+ location_id?: string;
4452
+ subtotal: Money;
4453
+ tax_amount: Money;
4454
+ service_charge: Money;
4455
+ total_discounts: Money;
4456
+ total_price: Money;
4457
+ delivery_fee: Money;
4458
+ total_items: number;
4459
+ tax_rate?: Money;
4460
+ service_charge_rate?: Money;
4461
+ currency: CurrencyCode;
4462
+ channel: string;
4463
+ status: string;
4464
+ business_name: string;
4465
+ business_logo?: string;
4466
+ location_name?: string;
4467
+ customer_name?: string;
4468
+ customer_email?: string;
4469
+ customer_phone?: string;
4470
+ customer_address?: string;
4471
+ items: DisplayCartItem[];
4472
+ applied_discount_codes: string[];
4473
+ discount_details?: DiscountDetails;
4474
+ }
4475
+ interface DisplayCartItem {
4476
+ id: string;
4477
+ cart_id: string;
4478
+ item_id: string;
4479
+ quantity: number;
4480
+ name: string;
4481
+ description?: string;
4482
+ image_url?: string;
4483
+ category_name?: string;
4484
+ is_available: boolean;
4485
+ preparation_time?: number;
4486
+ unit_price: Money;
4487
+ total_price: Money;
4488
+ add_ons_price: Money;
4489
+ price_info: ChosenPrice;
4490
+ item_discount_amount: Money;
4491
+ discount_details?: DiscountDetails;
4492
+ add_ons: DisplayAddOn[];
4493
+ special_instructions?: string;
4494
+ }
4495
+ interface DisplayAddOn {
4496
+ id: string;
4497
+ name: string;
4498
+ min_selections: number;
4499
+ max_selections: number;
4500
+ is_required: boolean;
4501
+ selected_options: DisplayAddOnOption[];
4502
+ }
4503
+ interface DisplayAddOnOption {
4504
+ id: string;
4505
+ name: string;
4506
+ price: Money;
4507
+ quantity: number;
4508
+ image_url?: string;
4509
+ description?: string;
4510
+ }
4511
+ interface UICartBusiness {
4512
+ name: string;
4513
+ logo_url?: string;
4514
+ contact_email?: string;
4515
+ contact_phone?: string;
4516
+ }
4517
+ interface UICartLocation {
4518
+ id?: string;
4519
+ name?: string;
4520
+ }
4521
+ interface UICartCustomer {
4522
+ id?: string;
4523
+ name?: string;
4524
+ email?: string;
4525
+ phone?: string;
4526
+ address?: string;
4527
+ }
4528
+ interface UICartPricing {
4529
+ subtotal: Money;
4530
+ tax_amount: Money;
4531
+ service_charge: Money;
4532
+ total_discounts: Money;
4533
+ total_price: Money;
4534
+ tax_rate?: Money;
4535
+ service_charge_rate?: Money;
4536
+ currency: CurrencyCode;
4537
+ /** Tax is baked into the prices (e.g. Ghana VAT), so `tax_amount` is the
4538
+ * portion already inside `subtotal`/`total_price`, not an addition. */
4539
+ tax_inclusive: boolean;
4540
+ /** Jurisdiction resolved by the checkout tax decision (for example,
4541
+ * `Austin, TX`). Absent until the cart has a destination decision;
4542
+ * clients must not infer it from the preview rate. */
4543
+ tax_jurisdiction_label?: string | null;
4544
+ /** Deposit computed from the catalogue when the cart has deposit-eligible
4545
+ * service items; lets checkout offer "pay deposit now, balance later". */
4546
+ deposit_required?: boolean;
4547
+ deposit_amount?: Money;
4548
+ }
4549
+ interface AddOnOptionDetails {
4550
+ id: string;
4551
+ name: string;
4552
+ price?: Money;
4553
+ is_required: boolean;
4554
+ description?: string;
4555
+ image_url?: string;
4556
+ }
4557
+ interface AddOnGroupDetails {
4558
+ id: string;
4559
+ name: string;
4560
+ is_multiple_allowed: boolean;
4561
+ min_selections: number;
4562
+ max_selections: number;
4563
+ required: boolean;
4564
+ options: AddOnOptionDetails[];
4565
+ }
4566
+ interface VariantDetailsDTO {
4567
+ id: string;
4568
+ name: string;
4569
+ price: Money;
4570
+ price_adjustment: Money;
4571
+ is_default: boolean;
4572
+ }
4573
+ interface CartItemDetails {
4574
+ id: string;
4575
+ cart_id: string;
4576
+ item_id: string;
4577
+ quantity: number;
4578
+ line_key: string;
4579
+ line_type: "simple" | "service" | "bundle" | "composite" | "digital";
4580
+ name: string;
4581
+ description?: string;
4582
+ image_url?: string;
4583
+ category_id?: string;
4584
+ category_name?: string;
4585
+ is_available: boolean;
4586
+ variant_id?: string;
4587
+ variant_details?: VariantDetails;
4588
+ variant_name?: string;
4589
+ variant_info?: VariantDetailsDTO;
4590
+ base_price: Money;
4591
+ add_ons_price: Money;
4592
+ total_price: Money;
4593
+ item_discount_amount: Money;
4594
+ price_info: ChosenPrice;
4595
+ add_on_option_ids: string[];
4596
+ add_on_ids: string[];
4597
+ add_on_details: AddOnDetails;
4598
+ add_on_options: AddOnOptionDetails[];
4599
+ add_ons: AddOnGroupDetails[];
4600
+ special_instructions?: string;
4601
+ scheduled_start?: string;
4602
+ scheduled_end?: string;
4603
+ confirmation_code?: string;
4604
+ service_status?: string;
4605
+ staff_id?: string;
4606
+ units?: number;
4607
+ scheduling_metadata?: Record<string, unknown>;
4608
+ bundle_selections?: BundleSelectionInput[];
4609
+ bundle_resolved?: BundleSelectionData;
4610
+ composite_selections?: ComponentSelectionInput[];
4611
+ composite_resolved?: CompositeSelectionData;
4612
+ customer_inputs?: Array<{
4613
+ field_id: string;
4614
+ field_name: string;
4615
+ field_type: string;
4616
+ value: unknown;
4617
+ }>;
4618
+ applied_discount_ids: string[];
4619
+ discount_details?: DiscountDetails;
4620
+ created_at: string;
4621
+ updated_at: string;
4622
+ metadata?: Record<string, unknown>;
4623
+ }
4624
+ interface UICart {
4625
+ id: string;
4626
+ business_id: string;
4627
+ session_id?: string;
4628
+ customer_id?: string;
4629
+ location_id?: string;
4630
+ created_at: string;
4631
+ updated_at: string;
4632
+ expires_at: string;
4633
+ status: string;
4634
+ source: string;
4635
+ channel: string;
4636
+ business_details?: UICartBusiness;
4637
+ location_details?: UICartLocation;
4638
+ customer_info: UICartCustomer;
4639
+ items: CartItemDetails[];
4640
+ pricing: UICartPricing;
4641
+ requires_delivery?: boolean;
4642
+ metadata?: Record<string, unknown>;
4643
+ }
4644
+ interface CartNotice {
4645
+ kind: "info" | "warning";
4646
+ text: string;
4647
+ }
4648
+ interface CartMutationResult {
4649
+ cart: UICart;
4650
+ notice?: CartNotice;
4651
+ }
4652
+ interface AddToCartInput {
4653
+ item_id: string;
4654
+ quantity?: number;
4655
+ variant_id?: string;
4656
+ quote_id?: string;
4657
+ add_on_options?: string[];
4658
+ special_instructions?: string;
4659
+ bundle_selections?: BundleSelectionInput[];
4660
+ composite_selections?: ComponentSelectionInput[];
4661
+ scheduled_start?: string;
4662
+ scheduled_end?: string;
4663
+ staff_id?: string;
4664
+ resource_id?: string;
4665
+ units?: number;
4666
+ billing_plan_id?: string;
4667
+ customer_inputs?: Array<{
4668
+ field_id: string;
4669
+ value: unknown;
4670
+ }>;
4671
+ }
4672
+ interface UpdateCartItemInput {
4673
+ quantity?: number;
4674
+ special_instructions?: string;
4675
+ }
4676
+ interface CartSummary {
4677
+ item_count: number;
4678
+ total_items: number;
4679
+ subtotal: Money;
4680
+ discount_amount: Money;
4681
+ tax_amount: Money;
4682
+ total: Money;
4683
+ currency: CurrencyCode;
4684
+ }
4685
+
4686
+ type BillingFrequency = "weekly" | "biweekly" | "monthly" | "quarterly" | "annually";
4687
+ type BillingPlanType = "subscription" | "installment";
4688
+ type BillingMarkupType = "fixed" | "percentage";
4689
+ interface ProductBillingPlan {
4690
+ id: string;
4691
+ product_id: string;
4692
+ business_id: string;
4693
+ frequency: BillingFrequency;
4694
+ fulfillment_frequency?: BillingFrequency | null;
4695
+ plan_type: BillingPlanType;
4696
+ installment_periods?: number | null;
4697
+ trial_days: number;
4698
+ setup_fee: number;
4699
+ markup_type?: BillingMarkupType | null;
4700
+ markup_amount?: number | null;
4701
+ customer_group_id?: string | null;
4702
+ min_quantity?: number | null;
4703
+ min_order_value?: number | null;
4704
+ max_cycles?: number | null;
4705
+ is_active: boolean;
4706
+ created_at: string;
4707
+ updated_at: string;
4708
+ metadata?: Record<string, unknown>;
4709
+ }
4710
+ interface EligiblePlansQuery {
4711
+ customer_id?: string;
4712
+ quantity?: number;
4713
+ order_value?: number;
4714
+ }
4715
+ interface FormattedPlanOption {
4716
+ plan: ProductBillingPlan;
4717
+ label: string;
4718
+ pricePerPeriod: number;
4719
+ totalPrice?: number;
4720
+ }
4721
+ type SubscriptionStatus = "incomplete" | "incomplete_expired" | "trialing" | "active" | "past_due" | "canceled" | "unpaid" | "paused";
4722
+ interface Subscription {
4723
+ id: string;
4724
+ customer_id: string;
4725
+ billing_plan_id?: string;
4726
+ business_id?: string;
4727
+ status: SubscriptionStatus;
4728
+ current_period_start: string;
4729
+ current_period_end: string;
4730
+ next_billing_date?: string;
4731
+ trial_start?: string;
4732
+ trial_end?: string;
4733
+ canceled_at?: string;
4734
+ cancel_at_period_end: boolean;
4735
+ location_id?: string;
4736
+ installment_total?: number;
4737
+ installment_per_period?: number;
4738
+ installment_periods_remaining?: number;
4739
+ origin_order_id?: string;
4740
+ skip_next_renewal: boolean;
4741
+ cycles_completed: number;
4742
+ source?: string;
4743
+ source_id?: string;
4744
+ frequency?: BillingFrequency | null;
4745
+ fulfillment_frequency?: BillingFrequency | null;
4746
+ contract_ends_at?: string;
4747
+ created_at: string;
4748
+ updated_at: string;
4749
+ metadata?: Record<string, unknown>;
4750
+ }
4751
+ interface SubscriptionItem {
4752
+ id: string;
4753
+ subscription_id: string;
4754
+ product_id: string;
4755
+ quantity: number;
4756
+ added_at: string;
4757
+ removed_at?: string;
4758
+ metadata?: Record<string, unknown>;
4759
+ }
4760
+ interface SubscriptionInvoice {
4761
+ id: string;
4762
+ subscription_id: string;
4763
+ amount_due: number;
4764
+ amount_paid: number;
4765
+ currency: string;
4766
+ status: string;
4767
+ period_start: string;
4768
+ period_end: string;
4769
+ created_at: string;
4770
+ }
4771
+ interface SubscriptionWithDetails {
4772
+ subscription: Subscription;
4773
+ billing_plan?: ProductBillingPlan | null;
4774
+ catalogue_product?: Product | null;
4775
+ items: SubscriptionItem[];
4776
+ latest_invoice?: SubscriptionInvoice | null;
4777
+ }
4778
+
4677
4779
  type S = components["schemas"];
4678
4780
  /** Live claim progress for a capped sale ("73 of 100 claimed"). */
4679
4781
  type SaleCapInfo = S["SaleCapInfo"];
@@ -5561,4 +5663,4 @@ interface TagsResponse {
5561
5663
  offset: number;
5562
5664
  }
5563
5665
 
5564
- export { type ComponentPriceBreakdown as $, type AddOn as A, BOUNDARY_KIND as B, type BundleProduct as C, type BundleSelectionData as D, type BundleSelectionInput as E, type BundleStoredSelection as F, type BundleSummary as G, type BundleWithDetails as H, type Cart as I, type CartAddOn as J, type CartChannel as K, type CartItem as L, type CartItemDetails as M, type CartMutationResult as N, type CartNotice as O, type CartStatus as P, type CartSummary as Q, type CartTotals as R, type Category as S, type CategorySummary as T, type ChosenPrice as U, CimplifyError as V, type Collection as W, type CollectionProduct as X, type CollectionSummary as Y, type ComponentGroup as Z, type ComponentGroupWithComponents as _, type AddOnDetails as a, type ProductAvailability as a$, type ComponentSchedulingData as a0, type ComponentSelectionInput as a1, type ComponentSourceType as a2, type Composite as a3, type CompositeComponent as a4, type CompositeComponentView as a5, type CompositeGroupView as a6, type CompositePriceBreakdown as a7, type CompositePriceResult as a8, type CompositePricingMode as a9, type ErrorHint as aA, type FacetValue as aB, type FormattedPlanOption as aC, type GroupPricingBehavior as aD, INPUT_FIELD_TYPE as aE, IdempotencyMismatchError as aF, type InputFieldType as aG, type InputFieldValidation as aH, type InventoryType as aI, type KnowledgeArticle as aJ, type LineConfiguration as aK, type LocationProductPrice as aL, type LocationValue as aM, type MeasurementValue as aN, type Money as aO, PRODUCT_TYPE as aP, type Pagination as aQ, type PaginationParams as aR, type PhoneValue as aS, type Price as aT, type PriceAdjustment as aU, type PriceDecisionPath as aV, type PriceEntryType as aW, type PricePathTaxInfo as aX, type PriceSource as aY, type Product as aZ, type ProductAddOn as a_, type CompositeSelectionData as aa, type CompositeStoredSelection as ab, type CompositeWithDetails as ac, type CurrencyCode as ad, type CustomAttributeDefinition as ae, type CustomAttributeValue as af, type CustomerInputValue as ag, DURATION_UNIT as ah, type DateRangeValue as ai, type Deal as aj, type DealBenefitType as ak, type DepositType as al, type DigitalProductType as am, type DiscountBreakdown as an, type DiscountDetails as ao, type DiscountValidation as ap, type DisplayAddOn as aq, type DisplayAddOnOption as ar, type DisplayCart as as, type DisplayCartItem as at, type DisplayMode as au, type DurationUnit as av, ERROR_HINTS as aw, type EligiblePlansQuery as ax, ErrorCode as ay, type ErrorCodeType as az, type AddOnGroupDetails as b, isSupportedCurrency as b$, type ProductAvailabilityNow as b0, type ProductBillingPlan as b1, type ProductDealInfo as b2, type ProductInputField as b3, type ProductProperty as b4, type ProductRenderHint as b5, type ProductTaxonomy as b6, type ProductTimeProfile as b7, type ProductType as b8, type ProductVariant as b9, type UICartCustomer as bA, type UICartLocation as bB, type UICartPricing as bC, type UpcomingSale as bD, type UpdateCartItemInput as bE, type VariantAxis as bF, type VariantAxisSelection as bG, type VariantAxisValue as bH, type VariantAxisValueView as bI, type VariantAxisView as bJ, type VariantAxisWithValues as bK, type VariantDetails as bL, type VariantDetailsDTO as bM, type VariantDisplayAttribute as bN, type VariantLocationAvailability as bO, type VariantStrategy as bP, type VariantView as bQ, ZERO as bR, type components as bS, currencyCode as bT, enrichError as bU, getErrorHint as bV, isCimplifyError as bW, isIdempotencyMismatchError as bX, isQuoteConflictRequiringConsent as bY, isQuoteError as bZ, isRetryableError as b_, type ProductVariantValue as ba, type ProductWithDetails as bb, type PropertyFacet as bc, type PropertySource as bd, type QuantityPricingTier as be, RENDER_HINT as bf, type RelatedProductView as bg, type SaleCapInfo as bh, type SaleInfo as bi, type SalesChannel as bj, type SchedulingMode as bk, type SelectedAddOnOption as bl, type SemanticKind as bm, type SignatureValue as bn, type Subscription as bo, type SubscriptionInvoice as bp, type SubscriptionItem as bq, type SubscriptionStatus as br, type SubscriptionWithDetails as bs, type Tag as bt, type TagsResponse as bu, type TaxPathComponent as bv, type TaxonomyAttributeTemplate as bw, type TaxonomyWithChildren as bx, type UICart as by, type UICartBusiness as bz, type AddOnOption as c, money as c0, moneyFromNumber as c1, type AddOnOptionDetails as d, type AddOnOptionPrice as e, type AddOnWithOptions as f, type AddToCartInput as g, type AddressValue as h, type AdjustmentType as i, type ApiError as j, type AppliedDiscount as k, type AttributeAppliesTo as l, type AttributeType as m, type AttributeValidationRules as n, type AttributeVisibility as o, type BenefitType as p, type BillingFrequency as q, type BillingMarkupType as r, type BillingPlanType as s, type BoundaryKind as t, type Bundle as u, type BundleComponentData as v, type BundleComponentInfo as w, type BundleComponentVariantView as x, type BundleComponentView as y, type BundlePriceType as z };
5666
+ export { type ComponentPriceBreakdown as $, type AddOn as A, BOUNDARY_KIND as B, type BundleProduct as C, type BundleSelectionData as D, type BundleSelectionInput as E, type BundleStoredSelection as F, type BundleSummary as G, type BundleWithDetails as H, type Cart as I, type CartAddOn as J, type CartChannel as K, type CartItem as L, type CartItemDetails as M, type CartMutationResult as N, type CartNotice as O, type CartStatus as P, type CartSummary as Q, type CartTotals as R, type Category as S, type CategorySummary as T, type ChosenPrice as U, CimplifyError as V, type Collection as W, type CollectionProduct as X, type CollectionSummary as Y, type ComponentGroup as Z, type ComponentGroupWithComponents as _, type AddOnDetails as a, type PriceSource as a$, type ComponentSchedulingData as a0, type ComponentSelectionInput as a1, type ComponentSourceType as a2, type Composite as a3, type CompositeComponent as a4, type CompositeComponentView as a5, type CompositeGroupView as a6, type CompositePriceBreakdown as a7, type CompositePriceResult as a8, type CompositePricingMode as a9, type EligiblePlansQuery as aA, ErrorCode as aB, type ErrorCodeType as aC, type ErrorHint as aD, type FacetValue as aE, type FormattedPlanOption as aF, type GroupPricingBehavior as aG, INPUT_FIELD_TYPE as aH, IdempotencyMismatchError as aI, type InputFieldType as aJ, type InputFieldValidation as aK, type InventoryType as aL, type KnowledgeArticle as aM, type LineConfiguration as aN, type LocationProductPrice as aO, type LocationValue as aP, type MeasurementValue as aQ, type Money as aR, PRODUCT_TYPE as aS, type Pagination as aT, type PaginationParams as aU, type PhoneValue as aV, type Price as aW, type PriceAdjustment as aX, type PriceDecisionPath as aY, type PriceEntryType as aZ, type PricePathTaxInfo as a_, type CompositeSelectionData as aa, type CompositeStoredSelection as ab, type CompositeWithDetails as ac, type CurrencyCode as ad, type CustomAttributeDefinition as ae, type CustomAttributeValue as af, type CustomerInputValue as ag, DURATION_UNIT as ah, type DateRangeValue as ai, type Deal as aj, type DealBenefitType as ak, type DepositType as al, type DestinationQuote as am, type DestinationQuoteAddress as an, type DestinationQuoteInput as ao, type DigitalProductType as ap, type DiscountBreakdown as aq, type DiscountDetails as ar, type DiscountValidation as as, type DisplayAddOn as at, type DisplayAddOnOption as au, type DisplayCart as av, type DisplayCartItem as aw, type DisplayMode as ax, type DurationUnit as ay, ERROR_HINTS as az, type AddOnGroupDetails as b, isQuoteConflictRequiringConsent as b$, type Product as b0, type ProductAddOn as b1, type ProductAvailability as b2, type ProductAvailabilityNow as b3, type ProductBillingPlan as b4, type ProductDealInfo as b5, type ProductInputField as b6, type ProductProperty as b7, type ProductRenderHint as b8, type ProductTaxonomy as b9, type TaxonomyWithChildren as bA, type UICart as bB, type UICartBusiness as bC, type UICartCustomer as bD, type UICartLocation as bE, type UICartPricing as bF, type UpcomingSale as bG, type UpdateCartItemInput as bH, type VariantAxis as bI, type VariantAxisSelection as bJ, type VariantAxisValue as bK, type VariantAxisValueView as bL, type VariantAxisView as bM, type VariantAxisWithValues as bN, type VariantDetails as bO, type VariantDetailsDTO as bP, type VariantDisplayAttribute as bQ, type VariantLocationAvailability as bR, type VariantStrategy as bS, type VariantView as bT, ZERO as bU, type components as bV, currencyCode as bW, enrichError as bX, getErrorHint as bY, isCimplifyError as bZ, isIdempotencyMismatchError as b_, type ProductTimeProfile as ba, type ProductType as bb, type ProductVariant as bc, type ProductVariantValue as bd, type ProductWithDetails as be, type PropertyFacet as bf, type PropertySource as bg, type QuantityPricingTier as bh, RENDER_HINT as bi, type RelatedProductView as bj, type SaleCapInfo as bk, type SaleInfo as bl, type SalesChannel as bm, type SchedulingMode as bn, type SelectedAddOnOption as bo, type SemanticKind as bp, type SignatureValue as bq, type Subscription as br, type SubscriptionInvoice as bs, type SubscriptionItem as bt, type SubscriptionStatus as bu, type SubscriptionWithDetails as bv, type Tag as bw, type TagsResponse as bx, type TaxPathComponent as by, type TaxonomyAttributeTemplate as bz, type AddOnOption as c, isQuoteError as c0, isRetryableError as c1, isSupportedCurrency as c2, money as c3, moneyFromNumber as c4, type AddOnOptionDetails as d, type AddOnOptionPrice as e, type AddOnWithOptions as f, type AddToCartInput as g, type AddressValue as h, type AdjustmentType as i, type ApiError as j, type AppliedDiscount as k, type AttributeAppliesTo as l, type AttributeType as m, type AttributeValidationRules as n, type AttributeVisibility as o, type BenefitType as p, type BillingFrequency as q, type BillingMarkupType as r, type BillingPlanType as s, type BoundaryKind as t, type Bundle as u, type BundleComponentData as v, type BundleComponentInfo as w, type BundleComponentVariantView as x, type BundleComponentView as y, type BundlePriceType as z };