@cimplify/sdk 0.6.11 → 0.6.12

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.
@@ -1,4 +1,4 @@
1
- import { M as Money, C as CurrencyCode, h as CimplifyError, q as AuthorizationType, s as PaymentMethod, I as InitializePaymentResult, S as SubmitAuthorizationInput, v as PaymentStatusResponse } from './payment-Cu75tmUc.mjs';
1
+ import { d as Pagination, q as Product, h as CimplifyError, r as ProductWithDetails, s as ProductVariant, u as VariantAxis, z as VariantAxisSelection, B as AddOn, K as Category, N as Collection, T as Bundle, X as BundleWithDetails, a2 as Composite, a3 as CompositeWithDetails, a7 as ComponentSelectionInput, a8 as CompositePriceResult, an as ChosenPrice, aS as UICart, aD as Cart, aE as CartItem, aW as CartSummary, aU as AddToCartInput, aV as UpdateCartItemInput, ar as DiscountDetails, M as Money, C as CurrencyCode, aC as LineConfiguration, a_ as AuthorizationType, b0 as PaymentMethod, b2 as InitializePaymentResult, b6 as SubmitAuthorizationInput, b4 as PaymentStatusResponse } from './payment-CLIWNMaP.js';
2
2
 
3
3
  /**
4
4
  * Observability hooks for monitoring SDK behavior.
@@ -94,930 +94,15 @@ interface ObservabilityHooks {
94
94
  onSessionChange?: (event: SessionChangeEvent) => void;
95
95
  }
96
96
 
97
- type ProductType = "product" | "service" | "digital" | "bundle" | "composite";
98
- type InventoryType = "one_to_one" | "composition" | "none";
99
- type VariantStrategy = "fetch_all" | "use_axes";
100
- type DigitalProductType = "download" | "license_key" | "ticket" | "access_grant" | "redemption_code";
101
- type DepositType = "none" | "fixed" | "percentage";
102
- type SalesChannel = "pos" | "online" | "marketplace" | "partners";
103
- interface Product {
104
- id: string;
105
- business_id: string;
106
- category_id?: string;
107
- name: string;
108
- slug: string;
109
- description?: string;
110
- image_url?: string;
111
- default_price: Money;
112
- product_type: ProductType;
113
- inventory_type: InventoryType;
114
- variant_strategy: VariantStrategy;
115
- is_active: boolean;
116
- created_at: string;
117
- updated_at: string;
118
- metadata?: Record<string, unknown>;
119
- tags?: string[];
120
- images?: string[];
121
- calories?: number;
122
- allergies?: string[];
123
- recipe?: Record<string, unknown>;
124
- sku?: string;
125
- barcode?: string;
126
- ean?: string;
127
- upc?: string;
128
- is_trackable?: boolean;
129
- is_tracked?: boolean;
130
- is_tracked_in_store?: boolean;
131
- is_tracked_in_warehouse?: boolean;
132
- inventory_threshold?: number;
133
- external_id?: string;
134
- external_source?: string;
135
- download_url?: string;
136
- digital_type?: DigitalProductType;
137
- max_downloads?: number;
138
- license_key_required?: boolean;
139
- file_size_mb?: number;
140
- file_hash?: string;
141
- file_type?: string;
142
- version?: string;
143
- download_expires_days?: number;
144
- license_key_format?: string;
145
- max_activations?: number;
146
- validity_days?: number;
147
- event_id?: string;
148
- event_date?: string;
149
- venue?: string;
150
- ticket_type?: string;
151
- seat_info?: Record<string, unknown>;
152
- access_type?: string;
153
- access_level?: string;
154
- access_duration_days?: number;
155
- code_type?: string;
156
- code_value?: Money;
157
- code_currency?: CurrencyCode;
158
- duration_minutes?: number;
159
- preparation_time_minutes?: number;
160
- staff_required_count?: number;
161
- buffer_before_minutes?: number;
162
- buffer_after_minutes?: number;
163
- general_service_capacity?: number;
164
- deposit_type?: DepositType;
165
- deposit_amount?: Money;
166
- cancellation_window_minutes?: number;
167
- no_show_fee?: Money;
168
- requires_specific_staff?: boolean;
169
- requires_specific_resource?: boolean;
170
- hs_code?: string;
171
- mid_code?: string;
172
- material?: string;
173
- allow_backorder?: boolean;
174
- item_condition?: string;
175
- vendor?: string;
176
- length_mm?: number;
177
- width_mm?: number;
178
- height_mm?: number;
179
- channels?: SalesChannel[];
180
- meta_title?: string;
181
- meta_description?: string;
182
- is_discountable?: boolean;
183
- taxonomy_id?: string;
184
- }
185
- interface ProductWithDetails extends Product {
186
- category?: Category;
187
- variants?: ProductVariant[];
188
- add_ons?: AddOnWithOptions[];
189
- variant_axes?: VariantAxisWithValues[];
190
- location_prices?: LocationProductPrice[];
191
- location_availability?: ProductAvailability[];
192
- time_profiles?: ProductTimeProfile[];
193
- }
194
- interface ProductVariant {
195
- id: string;
196
- name: string;
197
- business_id: string;
198
- product_id: string;
199
- component_multiplier: Money;
200
- price_adjustment: Money;
201
- is_default: boolean;
202
- created_at: string;
203
- updated_at: string;
204
- is_active?: boolean;
205
- is_archived?: boolean;
206
- is_deleted?: boolean;
207
- inventory_threshold?: number;
208
- images?: string[];
209
- external_id?: string;
210
- external_source?: string;
211
- ean?: string;
212
- upc?: string;
213
- is_trackable?: boolean;
214
- is_tracked?: boolean;
215
- is_tracked_in_store?: boolean;
216
- is_tracked_in_warehouse?: boolean;
217
- sku?: string;
218
- barcode?: string;
219
- download_url?: string;
220
- metadata?: Record<string, unknown>;
221
- duration_minutes?: number;
222
- max_downloads?: number;
223
- license_key?: string;
224
- display_attributes?: VariantDisplayAttribute[];
225
- }
226
- interface VariantDisplayAttribute {
227
- axis_id: string;
228
- axis_name: string;
229
- value_id: string;
230
- value_name: string;
231
- }
232
- interface VariantAxis {
233
- id: string;
234
- business_id: string;
235
- product_id: string;
236
- name: string;
237
- display_order: number;
238
- affects_recipe: boolean;
239
- created_at: string;
240
- updated_at: string;
241
- metadata?: Record<string, unknown>;
242
- }
243
- interface VariantAxisWithValues extends VariantAxis {
244
- values: VariantAxisValue[];
245
- }
246
- interface VariantAxisValue {
247
- id: string;
248
- business_id: string;
249
- axis_id: string;
250
- name: string;
251
- display_order: number;
252
- created_at: string;
253
- updated_at: string;
254
- metadata?: Record<string, unknown>;
255
- }
256
- interface ProductVariantValue {
257
- variant_id: string;
258
- axis_value_id: string;
259
- business_id: string;
260
- created_at: string;
261
- updated_at: string;
262
- metadata?: Record<string, unknown>;
263
- }
264
- interface VariantLocationAvailability {
265
- id: string;
266
- variant_id: string;
267
- location_id: string;
268
- business_id: string;
269
- is_available: boolean;
270
- is_in_stock: boolean;
271
- created_at: string;
272
- updated_at: string;
273
- metadata?: Record<string, unknown>;
274
- }
275
- /** Input for selecting a variant by axis values */
276
- interface VariantAxisSelection {
277
- [axisName: string]: string;
278
- }
279
- interface AddOn {
280
- id: string;
281
- business_id: string;
282
- name: string;
283
- is_multiple_allowed: boolean;
284
- is_required: boolean;
285
- is_mutually_exclusive: boolean;
286
- min_selections?: number;
287
- max_selections?: number;
288
- created_at: string;
289
- updated_at: string;
290
- metadata?: Record<string, unknown>;
291
- }
292
- interface AddOnWithOptions extends AddOn {
293
- options: AddOnOption[];
294
- }
295
- interface AddOnOption {
296
- id: string;
297
- add_on_id: string;
298
- business_id: string;
299
- name: string;
300
- option_sku?: string;
301
- default_price?: Money;
302
- description?: string;
303
- is_required: boolean;
304
- is_mutually_exclusive: boolean;
305
- created_at: string;
306
- updated_at: string;
307
- metadata?: Record<string, unknown>;
308
- }
309
- interface AddOnOptionPrice {
310
- id: string;
311
- add_on_option_id: string;
312
- location_id: string;
313
- business_id: string;
314
- price: Money;
315
- created_at: string;
316
- updated_at: string;
317
- metadata?: Record<string, unknown>;
318
- }
319
- interface ProductAddOn {
320
- id: string;
321
- business_id: string;
322
- product_id: string;
323
- add_on_id: string;
324
- created_at: string;
325
- updated_at: string;
326
- metadata?: Record<string, unknown>;
327
- }
328
- interface Category {
329
- id: string;
330
- business_id: string;
331
- name: string;
332
- slug: string;
333
- description?: string;
334
- created_at: string;
335
- updated_at: string;
336
- metadata?: Record<string, unknown>;
337
- }
338
- interface CategorySummary extends Category {
339
- product_count: number;
340
- }
341
- interface Collection {
342
- id: string;
343
- business_id: string;
344
- name: string;
345
- slug: string;
346
- description?: string;
347
- tags?: string[];
348
- image_url?: string;
349
- channels?: SalesChannel[];
350
- created_at: string;
351
- updated_at: string;
352
- metadata?: Record<string, unknown>;
353
- }
354
- interface CollectionSummary extends Collection {
355
- product_count: number;
356
- }
357
- interface CollectionProduct {
358
- id: string;
359
- collection_id: string;
360
- product_id: string;
361
- display_order?: number;
362
- created_at: string;
363
- updated_at: string;
364
- metadata?: Record<string, unknown>;
365
- }
366
- type BundlePriceType = "fixed" | "percentage_discount" | "fixed_discount";
367
- interface Bundle {
368
- id: string;
369
- business_id: string;
370
- product_id: string;
371
- name: string;
372
- slug: string;
373
- description?: string;
374
- image_url?: string;
375
- pricing_type: BundlePriceType;
376
- bundle_price?: Money;
377
- discount_value?: Money;
378
- created_at: string;
379
- updated_at: string;
380
- metadata?: Record<string, unknown>;
381
- }
382
- interface BundleSummary extends Bundle {
383
- product_count: number;
384
- }
385
- interface BundleProduct {
386
- id: string;
387
- bundle_id: string;
388
- product_id: string;
389
- variant_id?: string;
390
- allow_variant_choice: boolean;
391
- quantity: number;
392
- created_at: string;
393
- updated_at: string;
394
- metadata?: Record<string, unknown>;
395
- }
396
- interface BundleWithDetails extends Bundle {
397
- product: Product;
398
- components: BundleComponentData[];
399
- schedules?: ProductTimeProfile[];
400
- availability?: Record<string, ProductAvailability>;
401
- }
402
- interface BundleComponentData {
403
- component: BundleProduct;
404
- product: Product;
405
- variants: ProductVariant[];
406
- variant_axes: VariantAxis[];
407
- variant_axis_values: VariantAxisValue[];
408
- product_variant_values: ProductVariantValue[];
409
- }
410
- interface BundleComponentInfo {
411
- id: string;
412
- product_id: string;
413
- variant_id?: string;
414
- quantity: number;
415
- }
416
- type CompositePricingMode = "additive" | "highest_per_group" | "highest_overall" | "tiered";
417
- type GroupPricingBehavior = "additive" | "first_n_free" | "flat_fee" | "highest_only";
418
- type ComponentSourceType = "product" | "stock" | "add_on" | "standalone";
419
- interface Composite {
420
- id: string;
421
- business_id: string;
422
- product_id: string;
423
- base_price: Money;
424
- pricing_mode: CompositePricingMode;
425
- min_order_quantity?: number;
426
- max_order_quantity?: number;
427
- created_at: string;
428
- updated_at: string;
429
- metadata?: Record<string, unknown>;
430
- }
431
- interface CompositeWithDetails extends Composite {
432
- product: Product;
433
- groups: ComponentGroupWithComponents[];
434
- }
435
- interface ComponentGroup {
436
- id: string;
437
- composite_id: string;
438
- name: string;
439
- description?: string;
440
- display_order: number;
441
- min_selections: number;
442
- max_selections?: number;
443
- allow_quantity: boolean;
444
- max_quantity_per_component?: number;
445
- pricing_behavior: GroupPricingBehavior;
446
- pricing_behavior_config?: Record<string, unknown>;
447
- icon?: string;
448
- color?: string;
449
- created_at: string;
450
- updated_at: string;
451
- }
452
- interface ComponentGroupWithComponents extends ComponentGroup {
453
- components: CompositeComponent[];
454
- }
455
- interface CompositeComponent {
456
- id: string;
457
- group_id: string;
458
- product_id?: string;
459
- variant_id?: string;
460
- stock_id?: string;
461
- add_on_id?: string;
462
- add_on_option_id?: string;
463
- display_name?: string;
464
- display_description?: string;
465
- display_image_url?: string;
466
- price: Money;
467
- price_per_additional?: Money;
468
- quantity_per_selection?: Money;
469
- waste_percentage?: Money;
470
- calories?: number;
471
- allergens?: string[];
472
- display_order: number;
473
- is_popular: boolean;
474
- is_premium: boolean;
475
- is_available: boolean;
476
- is_archived: boolean;
477
- created_at: string;
478
- updated_at: string;
479
- }
480
- /** Input for calculating composite price or adding to cart */
481
- interface ComponentSelectionInput {
482
- component_id: string;
483
- quantity: number;
484
- variant_id?: string;
485
- add_on_option_id?: string;
486
- }
487
- /** Result of composite price calculation */
488
- interface CompositePriceResult {
489
- base_price: Money;
490
- components_total: Money;
491
- tier_applied?: string;
492
- final_price: Money;
493
- breakdown: ComponentPriceBreakdown[];
494
- }
495
- interface ComponentPriceBreakdown {
496
- component_id: string;
497
- component_name: string;
498
- quantity: number;
499
- unit_price: Money;
500
- total_price: Money;
501
- group_id: string;
502
- source_type: ComponentSourceType;
503
- source_product_id?: string;
504
- source_stock_id?: string;
505
- }
506
- type PriceEntryType = "base" | "location" | "time" | "channel";
507
- interface Price {
508
- id: string;
509
- product_id: string;
510
- location_id: string;
511
- business_id: string;
512
- price: Money;
513
- entry_type: PriceEntryType;
514
- created_at: string;
515
- updated_at: string;
516
- metadata?: Record<string, unknown>;
517
- }
518
- type LocationProductPrice = Price;
519
- interface ProductAvailability {
520
- id: string;
521
- business_id: string;
522
- location_id: string;
523
- product_id: string;
524
- is_available: boolean;
525
- is_in_stock: boolean;
526
- created_at: string;
527
- updated_at: string;
528
- metadata?: Record<string, unknown>;
529
- }
530
- interface ProductTimeProfile {
531
- id: string;
532
- business_id: string;
533
- product_id: string;
534
- day_of_week: number;
535
- start_time: string;
536
- end_time: string;
537
- created_at: string;
538
- updated_at: string;
539
- metadata?: Record<string, unknown>;
540
- }
541
-
542
- type CartStatus = "active" | "converting" | "converted" | "expired" | "abandoned";
543
- type CartChannel = "qr" | "taker" | "staff" | "web" | "dashboard";
544
- type PriceSource = {
545
- type: "default_item";
546
- } | {
547
- type: "location_specific";
548
- location_id: string;
549
- } | {
550
- type: "variant";
551
- variant_id: string;
552
- } | {
553
- type: "composite";
554
- composite_id: string;
555
- } | {
556
- type: "custom";
557
- };
558
- type AdjustmentType = {
559
- type: "location_based";
560
- location_id: string;
561
- } | {
562
- type: "variant_based";
563
- variant_id: string;
564
- } | {
565
- type: "time_based";
566
- } | {
567
- type: "customer_segment";
568
- segment_id: string;
569
- } | {
570
- type: "customer_loyalty";
571
- tier: string;
572
- } | {
573
- type: "channel_markup";
574
- channel: string;
575
- } | {
576
- type: "discount";
577
- discount_id: string;
578
- } | {
579
- type: "bundle";
580
- bundle_id: string;
581
- } | {
582
- type: "manual";
583
- reason: string;
584
- } | {
585
- type: "time_limited_promotion";
586
- promotion_id: string;
587
- valid_until: string;
588
- };
589
- interface PriceAdjustment {
590
- adjustment_type: AdjustmentType;
591
- amount: Money;
592
- percentage?: Money;
593
- reason: string;
594
- applied_at: string;
595
- }
596
- interface TaxPathComponent {
597
- name: string;
598
- rate: Money;
599
- }
600
- interface PricePathTaxInfo {
601
- tax_rate: Money;
602
- tax_amount: Money;
603
- is_inclusive: boolean;
604
- components: TaxPathComponent[];
605
- }
606
- interface PriceDecisionPath {
607
- base_price_source: PriceSource;
608
- adjustments: PriceAdjustment[];
609
- context?: Record<string, unknown>;
610
- }
611
- interface ChosenPrice {
612
- base_price: Money;
613
- final_price: Money;
614
- markup_percentage: Money;
615
- markup_amount: Money;
616
- markup_discount_percentage: Money;
617
- markup_discount_amount: Money;
618
- currency?: CurrencyCode;
619
- custom_fields?: Record<string, unknown>;
620
- decision_path?: PriceDecisionPath;
621
- tax_info?: PricePathTaxInfo;
622
- }
623
- type BenefitType = "percentage" | "fixed_amount" | "free_item" | "buy_x_get_y";
624
- interface AppliedDiscount {
625
- discount_id: string;
626
- discount_code?: string;
627
- discount_type: BenefitType;
628
- discount_value: Money;
629
- discount_amount: Money;
630
- applied_at: string;
631
- }
632
- interface DiscountBreakdown {
633
- item_discounts: Record<string, AppliedDiscount[]>;
634
- order_discounts: AppliedDiscount[];
635
- }
636
- interface DiscountDetails {
637
- discounts: AppliedDiscount[];
638
- total_discount_amount: Money;
639
- breakdown: DiscountBreakdown;
640
- }
641
- interface SelectedAddOnOption {
642
- option_id: string;
643
- add_on_id: string;
644
- name: string;
645
- price: Money;
646
- quantity: number;
647
- is_required: boolean;
648
- selected_at: string;
649
- price_info?: ChosenPrice;
650
- }
651
- interface AddOnDetails {
652
- selected_options: SelectedAddOnOption[];
653
- total_add_on_price: Money;
654
- add_ons: CartAddOn[];
655
- }
656
- interface CartAddOn {
657
- add_on_id: string;
658
- name: string;
659
- min_selections: number;
660
- max_selections: number;
661
- selected_options: string[];
662
- is_required: boolean;
663
- }
664
- interface VariantDetails {
665
- variant_id: string;
666
- sku?: string;
667
- properties: Record<string, string>;
668
- }
669
- interface BundleSelectionInput {
670
- component_id: string;
671
- variant_id?: string;
672
- quantity: number;
673
- }
674
- interface BundleStoredSelection {
675
- component_id: string;
676
- product_id: string;
677
- product_name: string;
678
- variant_id?: string;
679
- variant_name?: string;
680
- quantity: number;
681
- unit_price: Money;
682
- }
683
- interface BundleSelectionData {
684
- bundle_id: string;
685
- selections: BundleStoredSelection[];
686
- }
687
- interface CompositeStoredSelection {
688
- component_id: string;
689
- component_name: string;
690
- quantity: number;
691
- group_id: string;
692
- source_type: "product" | "stock" | "add_on" | "standalone";
693
- source_product_id?: string;
694
- source_stock_id?: string;
695
- unit_price: Money;
696
- }
697
- interface CompositePriceBreakdown {
698
- base_price: Money;
699
- components_total: Money;
700
- tier_applied?: string;
701
- final_price: Money;
702
- }
703
- interface CompositeSelectionData {
704
- composite_id: string;
705
- selections: CompositeStoredSelection[];
706
- breakdown: CompositePriceBreakdown;
707
- }
708
-
709
- type LineConfiguration = {
710
- type: "simple";
711
- variant?: VariantDetails;
712
- add_ons?: AddOnDetails;
713
- } | {
714
- type: "service";
715
- variant?: VariantDetails;
716
- add_ons?: AddOnDetails;
717
- scheduled_start?: string;
718
- scheduled_end?: string;
719
- confirmation_code?: string;
720
- service_status?: string;
721
- primary_staff_id?: string;
722
- scheduling_metadata?: Record<string, unknown>;
723
- } | {
724
- type: "bundle";
725
- variant?: VariantDetails;
726
- input: BundleSelectionInput[];
727
- resolved?: BundleSelectionData;
728
- add_ons?: AddOnDetails;
729
- } | {
730
- type: "composite";
731
- variant?: VariantDetails;
732
- input: ComponentSelectionInput[];
733
- resolved?: CompositeSelectionData;
734
- add_ons?: AddOnDetails;
735
- } | {
736
- type: "digital";
737
- variant?: VariantDetails;
738
- add_ons?: AddOnDetails;
739
- digital_type?: string;
740
- fulfillment_id?: string;
741
- };
742
- interface Cart {
743
- id: string;
744
- business_id: string;
745
- customer_id?: string;
746
- session_id?: string;
747
- location_id?: string;
748
- created_at: string;
749
- updated_at: string;
750
- expires_at: string;
751
- subtotal: Money;
752
- tax_amount: Money;
753
- service_charge: Money;
754
- total_discounts: Money;
755
- total_price: Money;
756
- total_items: number;
757
- tax_rate?: Money;
758
- service_charge_rate?: Money;
759
- price_info: ChosenPrice;
760
- applied_discount_ids: string[];
761
- applied_discount_codes: string[];
762
- discount_details?: DiscountDetails;
763
- currency: CurrencyCode;
764
- customer_name?: string;
765
- customer_email?: string;
766
- customer_phone?: string;
767
- customer_address?: string;
768
- source: string;
769
- status: CartStatus;
770
- channel: string;
771
- order_id?: string;
772
- metadata?: Record<string, unknown>;
773
- items: CartItem[];
774
- }
775
- interface CartItem {
776
- id: string;
777
- cart_id: string;
778
- item_id: string;
779
- quantity: number;
780
- line_key: string;
781
- configuration: LineConfiguration;
782
- price: Money;
783
- add_ons_price: Money;
784
- price_info: ChosenPrice;
785
- applied_discount_ids: string[];
786
- item_discount_amount: Money;
787
- discount_details?: DiscountDetails;
788
- created_at: string;
789
- updated_at: string;
790
- metadata?: Record<string, unknown>;
791
- }
792
- interface CartTotals {
793
- subtotal: Money;
794
- tax_amount: Money;
795
- service_charge: Money;
796
- total_discounts: Money;
797
- total_price: Money;
798
- tax_rate?: Money;
799
- service_charge_rate?: Money;
800
- applied_discount_ids: string[];
801
- applied_discount_codes: string[];
802
- discount_details?: DiscountDetails;
803
- }
804
- interface DisplayCart {
805
- id: string;
806
- business_id: string;
807
- customer_id?: string;
808
- session_id?: string;
809
- location_id?: string;
810
- subtotal: Money;
811
- tax_amount: Money;
812
- service_charge: Money;
813
- total_discounts: Money;
814
- total_price: Money;
815
- total_items: number;
816
- tax_rate?: Money;
817
- service_charge_rate?: Money;
818
- currency: CurrencyCode;
819
- channel: string;
820
- status: string;
821
- business_name: string;
822
- business_logo?: string;
823
- location_name?: string;
824
- customer_name?: string;
825
- customer_email?: string;
826
- customer_phone?: string;
827
- customer_address?: string;
828
- items: DisplayCartItem[];
829
- applied_discount_codes: string[];
830
- discount_details?: DiscountDetails;
831
- }
832
- interface DisplayCartItem {
833
- id: string;
834
- cart_id: string;
835
- item_id: string;
836
- quantity: number;
837
- name: string;
838
- description?: string;
839
- image_url?: string;
840
- category_name?: string;
841
- is_available: boolean;
842
- preparation_time?: number;
843
- unit_price: Money;
844
- total_price: Money;
845
- add_ons_price: Money;
846
- price_info: ChosenPrice;
847
- item_discount_amount: Money;
848
- discount_details?: DiscountDetails;
849
- add_ons: DisplayAddOn[];
850
- special_instructions?: string;
851
- }
852
- interface DisplayAddOn {
853
- id: string;
854
- name: string;
855
- min_selections: number;
856
- max_selections: number;
857
- is_required: boolean;
858
- selected_options: DisplayAddOnOption[];
859
- }
860
- interface DisplayAddOnOption {
861
- id: string;
862
- name: string;
863
- price: Money;
864
- quantity: number;
865
- image_url?: string;
866
- description?: string;
867
- }
868
- interface UICartBusiness {
869
- name: string;
870
- logo_url?: string;
871
- contact_email?: string;
872
- contact_phone?: string;
873
- }
874
- interface UICartLocation {
875
- id?: string;
876
- name?: string;
877
- }
878
- interface UICartCustomer {
879
- id?: string;
880
- name?: string;
881
- email?: string;
882
- phone?: string;
883
- address?: string;
884
- }
885
- interface UICartPricing {
886
- subtotal: Money;
887
- tax_amount: Money;
888
- service_charge: Money;
889
- total_discounts: Money;
890
- total_price: Money;
891
- tax_rate?: Money;
892
- service_charge_rate?: Money;
893
- currency: CurrencyCode;
894
- }
895
- interface AddOnOptionDetails {
896
- id: string;
897
- name: string;
898
- price?: Money;
899
- is_required: boolean;
900
- description?: string;
901
- image_url?: string;
902
- }
903
- interface AddOnGroupDetails {
904
- id: string;
905
- name: string;
906
- is_multiple_allowed: boolean;
907
- min_selections: number;
908
- max_selections: number;
909
- required: boolean;
910
- options: AddOnOptionDetails[];
911
- }
912
- interface VariantDetailsDTO {
913
- id: string;
914
- name: string;
915
- price: Money;
916
- price_adjustment: Money;
917
- is_default: boolean;
918
- }
919
- interface CartItemDetails {
920
- id: string;
921
- cart_id: string;
922
- item_id: string;
923
- quantity: number;
924
- line_key: string;
925
- line_type: "simple" | "service" | "bundle" | "composite" | "digital";
926
- name: string;
927
- description?: string;
928
- image_url?: string;
929
- category_id?: string;
930
- category_name?: string;
931
- is_available: boolean;
932
- variant_id?: string;
933
- variant_details?: VariantDetails;
934
- variant_name?: string;
935
- variant_info?: VariantDetailsDTO;
936
- base_price: Money;
937
- add_ons_price: Money;
938
- total_price: Money;
939
- item_discount_amount: Money;
940
- price_info: ChosenPrice;
941
- add_on_option_ids: string[];
942
- add_on_ids: string[];
943
- add_on_details: AddOnDetails;
944
- add_on_options: AddOnOptionDetails[];
945
- add_ons: AddOnGroupDetails[];
946
- special_instructions?: string;
947
- scheduled_start?: string;
948
- scheduled_end?: string;
949
- confirmation_code?: string;
950
- service_status?: string;
951
- staff_id?: string;
952
- scheduling_metadata?: Record<string, unknown>;
953
- bundle_selections?: BundleSelectionInput[];
954
- bundle_resolved?: BundleSelectionData;
955
- composite_selections?: ComponentSelectionInput[];
956
- composite_resolved?: CompositeSelectionData;
957
- applied_discount_ids: string[];
958
- discount_details?: DiscountDetails;
959
- created_at: string;
960
- updated_at: string;
961
- metadata?: Record<string, unknown>;
962
- }
963
- /** Enriched cart returned by cart#enriched - matches cart_dto.rs UICart */
964
- interface UICart {
965
- id: string;
966
- business_id: string;
967
- session_id?: string;
968
- customer_id?: string;
969
- location_id?: string;
970
- created_at: string;
971
- updated_at: string;
972
- expires_at: string;
973
- status: string;
974
- source: string;
975
- channel: string;
976
- business_details?: UICartBusiness;
977
- location_details?: UICartLocation;
978
- customer_info: UICartCustomer;
979
- items: CartItemDetails[];
980
- pricing: UICartPricing;
981
- metadata?: Record<string, unknown>;
982
- }
983
- /** Envelope returned by cart#enriched query */
984
- interface UICartResponse {
985
- cart: UICart;
986
- cart_count: number;
987
- message?: string | null;
988
- }
989
- interface AddToCartInput {
990
- item_id: string;
991
- quantity?: number;
992
- variant_id?: string;
993
- quote_id?: string;
994
- add_on_options?: string[];
995
- special_instructions?: string;
996
- bundle_selections?: BundleSelectionInput[];
997
- composite_selections?: ComponentSelectionInput[];
998
- scheduled_start?: string;
999
- scheduled_end?: string;
1000
- staff_id?: string;
1001
- }
1002
- interface UpdateCartItemInput {
1003
- quantity?: number;
1004
- variant_id?: string;
1005
- add_on_options?: string[];
1006
- notes?: string;
1007
- bundle_selections?: BundleSelectionInput[];
1008
- composite_selections?: ComponentSelectionInput[];
1009
- scheduled_start?: string;
1010
- scheduled_end?: string;
1011
- staff_id?: string;
1012
- }
1013
- interface CartSummary {
1014
- item_count: number;
1015
- total_items: number;
1016
- subtotal: Money;
1017
- discount_amount: Money;
1018
- tax_amount: Money;
1019
- total: Money;
1020
- currency: CurrencyCode;
97
+ /** Catalogue listing response with server metadata. */
98
+ interface CatalogueResult<T> {
99
+ items: T[];
100
+ /** true when the full catalogue is returned; false when truncated by server cap. */
101
+ is_complete: boolean;
102
+ /** Total available items before truncation (present when truncated). */
103
+ total_available?: number;
104
+ /** Pagination metadata when listing is paginated. */
105
+ pagination?: Pagination;
1021
106
  }
1022
107
 
1023
108
  /**
@@ -1174,8 +259,10 @@ interface GetProductsOptions {
1174
259
  category?: string;
1175
260
  collection?: string;
1176
261
  search?: string;
262
+ page?: number;
1177
263
  limit?: number;
1178
264
  offset?: number;
265
+ cursor?: string;
1179
266
  tags?: string[];
1180
267
  featured?: boolean;
1181
268
  in_stock?: boolean;
@@ -1263,6 +350,7 @@ declare class CatalogueQueries {
1263
350
  private client;
1264
351
  constructor(client: CimplifyClient);
1265
352
  getProducts(options?: GetProductsOptions): Promise<Result<Product[], CimplifyError>>;
353
+ getProductsWithMeta(options?: GetProductsOptions): Promise<Result<CatalogueResult<Product>, CimplifyError>>;
1266
354
  getProduct(id: string): Promise<Result<ProductWithDetails, CimplifyError>>;
1267
355
  getProductBySlug(slug: string): Promise<Result<ProductWithDetails, CimplifyError>>;
1268
356
  getVariants(productId: string): Promise<Result<ProductVariant[], CimplifyError>>;
@@ -3246,6 +2334,7 @@ declare class CimplifyClient {
3246
2334
  call<T = unknown>(method: string, args?: unknown): Promise<T>;
3247
2335
  get<T = unknown>(path: string): Promise<T>;
3248
2336
  post<T = unknown>(path: string, body?: unknown): Promise<T>;
2337
+ patch<T = unknown>(path: string, body?: unknown): Promise<T>;
3249
2338
  delete<T = unknown>(path: string): Promise<T>;
3250
2339
  linkGet<T = unknown>(path: string): Promise<T>;
3251
2340
  linkPost<T = unknown>(path: string, body?: unknown): Promise<T>;
@@ -3281,4 +2370,4 @@ declare class CimplifyClient {
3281
2370
  }
3282
2371
  declare function createCimplifyClient(config?: CimplifyConfig): CimplifyClient;
3283
2372
 
3284
- export { type ProcessAndResolveOptions as $, AuthService as A, BusinessService as B, CimplifyClient as C, type ElementType as D, EVENT_TYPES as E, type FetchQuoteInput as F, type GetProductsOptions as G, type ElementEventType as H, InventoryService as I, type CheckoutMode as J, type KitchenOrderItem as K, LinkService as L, MESSAGE_TYPES as M, type CheckoutOrderType as N, OrderQueries as O, type PriceQuote as P, type QuoteCompositeSelectionInput as Q, type RefreshQuoteInput as R, type SearchOptions as S, type TableInfo as T, type UpdateProfileInput as U, type CheckoutPaymentMethod as V, type CheckoutStep as W, type CheckoutFormData as X, type CheckoutResult as Y, type ProcessCheckoutOptions as Z, type ProcessCheckoutResult as _, type CimplifyConfig as a, type CategorySummary as a$, type CheckoutStatus as a0, type CheckoutStatusContext as a1, type AbortablePromise as a2, type MobileMoneyProvider as a3, type DeviceType as a4, type ContactType as a5, CHECKOUT_MODE as a6, ORDER_TYPE as a7, PAYMENT_METHOD as a8, CHECKOUT_STEP as a9, toNullable as aA, fromPromise as aB, tryCatch as aC, combine as aD, combineObject as aE, type ProductType as aF, type InventoryType as aG, type VariantStrategy as aH, type DigitalProductType as aI, type DepositType as aJ, type SalesChannel as aK, type Product as aL, type ProductWithDetails as aM, type ProductVariant as aN, type VariantDisplayAttribute as aO, type VariantAxis as aP, type VariantAxisWithValues as aQ, type VariantAxisValue as aR, type ProductVariantValue as aS, type VariantLocationAvailability as aT, type VariantAxisSelection as aU, type AddOn as aV, type AddOnWithOptions as aW, type AddOnOption as aX, type AddOnOptionPrice as aY, type ProductAddOn as aZ, type Category as a_, PAYMENT_STATE as aa, PICKUP_TIME_TYPE as ab, MOBILE_MONEY_PROVIDER as ac, AUTHORIZATION_TYPE as ad, DEVICE_TYPE as ae, CONTACT_TYPE as af, LINK_QUERY as ag, LINK_MUTATION as ah, AUTH_MUTATION as ai, CHECKOUT_MUTATION as aj, PAYMENT_MUTATION as ak, ORDER_MUTATION as al, DEFAULT_CURRENCY as am, DEFAULT_COUNTRY as an, type Result as ao, type Ok as ap, type Err as aq, ok as ar, err as as, isOk as at, isErr as au, mapResult as av, mapError as aw, flatMap as ax, getOrElse as ay, unwrap as az, CatalogueQueries as b, type VariantDetailsDTO as b$, type Collection as b0, type CollectionSummary as b1, type CollectionProduct as b2, type BundlePriceType as b3, type Bundle as b4, type BundleSummary as b5, type BundleProduct as b6, type BundleWithDetails as b7, type BundleComponentData as b8, type BundleComponentInfo as b9, type AppliedDiscount as bA, type DiscountBreakdown as bB, type DiscountDetails as bC, type SelectedAddOnOption as bD, type AddOnDetails as bE, type CartAddOn as bF, type VariantDetails as bG, type BundleSelectionInput as bH, type BundleStoredSelection as bI, type BundleSelectionData as bJ, type CompositeStoredSelection as bK, type CompositePriceBreakdown as bL, type CompositeSelectionData as bM, type LineConfiguration as bN, type Cart as bO, type CartItem as bP, type CartTotals as bQ, type DisplayCart as bR, type DisplayCartItem as bS, type DisplayAddOn as bT, type DisplayAddOnOption as bU, type UICartBusiness as bV, type UICartLocation as bW, type UICartCustomer as bX, type UICartPricing as bY, type AddOnOptionDetails as bZ, type AddOnGroupDetails as b_, type CompositePricingMode as ba, type GroupPricingBehavior as bb, type ComponentSourceType as bc, type Composite as bd, type CompositeWithDetails as be, type ComponentGroup as bf, type ComponentGroupWithComponents as bg, type CompositeComponent as bh, type ComponentSelectionInput as bi, type CompositePriceResult as bj, type ComponentPriceBreakdown as bk, type PriceEntryType as bl, type Price as bm, type LocationProductPrice as bn, type ProductAvailability as bo, type ProductTimeProfile as bp, type CartStatus as bq, type CartChannel as br, type PriceSource as bs, type AdjustmentType as bt, type PriceAdjustment as bu, type TaxPathComponent as bv, type PricePathTaxInfo as bw, type PriceDecisionPath as bx, type ChosenPrice as by, type BenefitType as bz, createCimplifyClient as c, type BusinessWithLocations as c$, type CartItemDetails as c0, type UICart as c1, type UICartResponse as c2, type AddToCartInput as c3, type UpdateCartItemInput as c4, type CartSummary as c5, type OrderStatus as c6, type PaymentState as c7, type OrderChannel as c8, type LineType as c9, type CustomerServicePreferences as cA, type BufferTimes as cB, type ReminderSettings as cC, type CancellationPolicy as cD, type ServiceNotes as cE, type PricingOverrides as cF, type SchedulingMetadata as cG, type StaffAssignment as cH, type ResourceAssignment as cI, type SchedulingResult as cJ, type DepositResult as cK, type ServiceScheduleRequest as cL, type StaffScheduleItem as cM, type LocationAppointment as cN, type BusinessType as cO, type BusinessPreferences as cP, type Business as cQ, type LocationTaxBehavior as cR, type LocationTaxOverrides as cS, type Location as cT, type TimeRange as cU, type TimeRanges as cV, type LocationTimeProfile as cW, type Table as cX, type Room as cY, type ServiceCharge as cZ, type StorefrontBootstrap as c_, type OrderLineState as ca, type OrderLineStatus as cb, type FulfillmentType as cc, type FulfillmentStatus as cd, type FulfillmentLink as ce, type OrderFulfillmentSummary as cf, type FeeBearerType as cg, type AmountToPay as ch, type LineItem as ci, type Order as cj, type OrderHistory as ck, type OrderGroupPaymentState as cl, type OrderGroup as cm, type OrderGroupPayment as cn, type OrderSplitDetail as co, type OrderGroupPaymentSummary as cp, type OrderGroupDetails as cq, type OrderPaymentEvent as cr, type OrderFilter as cs, type CheckoutInput as ct, type UpdateOrderStatusInput as cu, type CancelOrderInput as cv, type RefundOrderInput as cw, type ServiceStatus as cx, type StaffRole as cy, type ReminderMethod as cz, type QuoteBundleSelectionInput as d, type CheckoutAddressInfo as d$, type LocationWithDetails as d0, type BusinessSettings as d1, type BusinessHours as d2, type CategoryInfo as d3, type ServiceAvailabilityRule as d4, type ServiceAvailabilityException as d5, type StaffAvailabilityRule as d6, type StaffAvailabilityException as d7, type ResourceAvailabilityRule as d8, type ResourceAvailabilityException as d9, type LocationStock as dA, type AvailabilityCheck as dB, type AvailabilityResult as dC, type InventorySummary as dD, type Customer as dE, type CustomerAddress as dF, type CustomerMobileMoney as dG, type CustomerLinkPreferences as dH, type LinkData as dI, type CreateAddressInput as dJ, type UpdateAddressInput as dK, type CreateMobileMoneyInput as dL, type EnrollmentData as dM, type AddressData as dN, type MobileMoneyData as dO, type EnrollAndLinkOrderInput as dP, type LinkStatusResult as dQ, type LinkEnrollResult as dR, type EnrollAndLinkOrderResult as dS, type LinkSession as dT, type RevokeSessionResult as dU, type RevokeAllSessionsResult as dV, type RequestOtpInput as dW, type VerifyOtpInput as dX, type AuthResponse as dY, type PickupTimeType as dZ, type PickupTime as d_, type StaffBookingProfile as da, type ServiceStaffRequirement as db, type BookingRequirementOverride as dc, type ResourceType as dd, type Service as de, type ServiceWithStaff as df, type Staff as dg, type TimeSlot as dh, type AvailableSlot as di, type DayAvailability as dj, type BookingStatus as dk, type Booking as dl, type BookingWithDetails as dm, type GetAvailableSlotsInput as dn, type CheckSlotAvailabilityInput as dp, type RescheduleBookingInput as dq, type CancelBookingInput as dr, type ServiceAvailabilityParams as ds, type ServiceAvailabilityResult as dt, type StockOwnershipType as du, type StockStatus as dv, type Stock as dw, type StockLevel as dx, type ProductStock as dy, type VariantStock as dz, type QuoteStatus as e, type MobileMoneyDetails as e0, type CheckoutCustomerInfo as e1, type FxQuoteRequest as e2, type FxQuote as e3, type FxRateResponse as e4, type RequestContext as e5, type RequestStartEvent as e6, type RequestSuccessEvent as e7, type RequestErrorEvent as e8, type RetryEvent as e9, type SessionChangeEvent as ea, type ObservabilityHooks as eb, type ElementAppearance as ec, type AddressInfo as ed, type PaymentMethodInfo as ee, type AuthenticatedCustomer as ef, type ElementsCustomerInfo as eg, type AuthenticatedData as eh, type ElementsCheckoutData as ei, type ElementsCheckoutResult as ej, type ParentToIframeMessage as ek, type IframeToParentMessage as el, type ElementEventHandler as em, type QuoteDynamicBuckets as f, type QuoteUiMessage as g, type RefreshQuoteResult as h, CartOperations as i, CheckoutService as j, generateIdempotencyKey as k, type GetOrdersOptions as l, type AuthStatus as m, type OtpResult as n, type ChangePasswordInput as o, SchedulingService as p, LiteService as q, FxService as r, type LiteBootstrap as s, type KitchenOrderResult as t, CimplifyElements as u, CimplifyElement as v, createElements as w, ELEMENT_TYPES as x, type ElementsOptions as y, type ElementOptions as z };
2373
+ export { type ProcessAndResolveOptions as $, AuthService as A, BusinessService as B, CimplifyClient as C, type ElementType as D, EVENT_TYPES as E, type FetchQuoteInput as F, type GetProductsOptions as G, type ElementEventType as H, InventoryService as I, type CheckoutMode as J, type KitchenOrderItem as K, LinkService as L, MESSAGE_TYPES as M, type CheckoutOrderType as N, OrderQueries as O, type PriceQuote as P, type QuoteCompositeSelectionInput as Q, type RefreshQuoteInput as R, type SearchOptions as S, type TableInfo as T, type UpdateProfileInput as U, type CheckoutPaymentMethod as V, type CheckoutStep as W, type CheckoutFormData as X, type CheckoutResult as Y, type ProcessCheckoutOptions as Z, type ProcessCheckoutResult as _, type CimplifyConfig as a, type OrderPaymentEvent as a$, type CheckoutStatus as a0, type CheckoutStatusContext as a1, type AbortablePromise as a2, type MobileMoneyProvider as a3, type DeviceType as a4, type ContactType as a5, CHECKOUT_MODE as a6, ORDER_TYPE as a7, PAYMENT_METHOD as a8, CHECKOUT_STEP as a9, toNullable as aA, fromPromise as aB, tryCatch as aC, combine as aD, combineObject as aE, type CatalogueResult as aF, type OrderStatus as aG, type PaymentState as aH, type OrderChannel as aI, type LineType as aJ, type OrderLineState as aK, type OrderLineStatus as aL, type FulfillmentType as aM, type FulfillmentStatus as aN, type FulfillmentLink as aO, type OrderFulfillmentSummary as aP, type FeeBearerType as aQ, type AmountToPay as aR, type LineItem as aS, type Order as aT, type OrderHistory as aU, type OrderGroupPaymentState as aV, type OrderGroup as aW, type OrderGroupPayment as aX, type OrderSplitDetail as aY, type OrderGroupPaymentSummary as aZ, type OrderGroupDetails as a_, PAYMENT_STATE as aa, PICKUP_TIME_TYPE as ab, MOBILE_MONEY_PROVIDER as ac, AUTHORIZATION_TYPE as ad, DEVICE_TYPE as ae, CONTACT_TYPE as af, LINK_QUERY as ag, LINK_MUTATION as ah, AUTH_MUTATION as ai, CHECKOUT_MUTATION as aj, PAYMENT_MUTATION as ak, ORDER_MUTATION as al, DEFAULT_CURRENCY as am, DEFAULT_COUNTRY as an, type Result as ao, type Ok as ap, type Err as aq, ok as ar, err as as, isOk as at, isErr as au, mapResult as av, mapError as aw, flatMap as ax, getOrElse as ay, unwrap as az, CatalogueQueries as b, type ServiceAvailabilityParams as b$, type OrderFilter as b0, type CheckoutInput as b1, type UpdateOrderStatusInput as b2, type CancelOrderInput as b3, type RefundOrderInput as b4, type ServiceStatus as b5, type StaffRole as b6, type ReminderMethod as b7, type CustomerServicePreferences as b8, type BufferTimes as b9, type LocationWithDetails as bA, type BusinessSettings as bB, type BusinessHours as bC, type CategoryInfo as bD, type ServiceAvailabilityRule as bE, type ServiceAvailabilityException as bF, type StaffAvailabilityRule as bG, type StaffAvailabilityException as bH, type ResourceAvailabilityRule as bI, type ResourceAvailabilityException as bJ, type StaffBookingProfile as bK, type ServiceStaffRequirement as bL, type BookingRequirementOverride as bM, type ResourceType as bN, type Service as bO, type ServiceWithStaff as bP, type Staff as bQ, type TimeSlot as bR, type AvailableSlot as bS, type DayAvailability as bT, type BookingStatus as bU, type Booking as bV, type BookingWithDetails as bW, type GetAvailableSlotsInput as bX, type CheckSlotAvailabilityInput as bY, type RescheduleBookingInput as bZ, type CancelBookingInput as b_, type ReminderSettings as ba, type CancellationPolicy as bb, type ServiceNotes as bc, type PricingOverrides as bd, type SchedulingMetadata as be, type StaffAssignment as bf, type ResourceAssignment as bg, type SchedulingResult as bh, type DepositResult as bi, type ServiceScheduleRequest as bj, type StaffScheduleItem as bk, type LocationAppointment as bl, type BusinessType as bm, type BusinessPreferences as bn, type Business as bo, type LocationTaxBehavior as bp, type LocationTaxOverrides as bq, type Location as br, type TimeRange as bs, type TimeRanges as bt, type LocationTimeProfile as bu, type Table as bv, type Room as bw, type ServiceCharge as bx, type StorefrontBootstrap as by, type BusinessWithLocations as bz, createCimplifyClient as c, type ServiceAvailabilityResult as c0, type StockOwnershipType as c1, type StockStatus as c2, type Stock as c3, type StockLevel as c4, type ProductStock as c5, type VariantStock as c6, type LocationStock as c7, type AvailabilityCheck as c8, type AvailabilityResult as c9, type CheckoutCustomerInfo as cA, type FxQuoteRequest as cB, type FxQuote as cC, type FxRateResponse as cD, type RequestContext as cE, type RequestStartEvent as cF, type RequestSuccessEvent as cG, type RequestErrorEvent as cH, type RetryEvent as cI, type SessionChangeEvent as cJ, type ObservabilityHooks as cK, type ElementAppearance as cL, type AddressInfo as cM, type PaymentMethodInfo as cN, type AuthenticatedCustomer as cO, type ElementsCustomerInfo as cP, type AuthenticatedData as cQ, type ElementsCheckoutData as cR, type ElementsCheckoutResult as cS, type ParentToIframeMessage as cT, type IframeToParentMessage as cU, type ElementEventHandler as cV, type InventorySummary as ca, type Customer as cb, type CustomerAddress as cc, type CustomerMobileMoney as cd, type CustomerLinkPreferences as ce, type LinkData as cf, type CreateAddressInput as cg, type UpdateAddressInput as ch, type CreateMobileMoneyInput as ci, type EnrollmentData as cj, type AddressData as ck, type MobileMoneyData as cl, type EnrollAndLinkOrderInput as cm, type LinkStatusResult as cn, type LinkEnrollResult as co, type EnrollAndLinkOrderResult as cp, type LinkSession as cq, type RevokeSessionResult as cr, type RevokeAllSessionsResult as cs, type RequestOtpInput as ct, type VerifyOtpInput as cu, type AuthResponse as cv, type PickupTimeType as cw, type PickupTime as cx, type CheckoutAddressInfo as cy, type MobileMoneyDetails as cz, type QuoteBundleSelectionInput as d, type QuoteStatus as e, type QuoteDynamicBuckets as f, type QuoteUiMessage as g, type RefreshQuoteResult as h, CartOperations as i, CheckoutService as j, generateIdempotencyKey as k, type GetOrdersOptions as l, type AuthStatus as m, type OtpResult as n, type ChangePasswordInput as o, SchedulingService as p, LiteService as q, FxService as r, type LiteBootstrap as s, type KitchenOrderResult as t, CimplifyElements as u, CimplifyElement as v, createElements as w, ELEMENT_TYPES as x, type ElementsOptions as y, type ElementOptions as z };