@cimplify/sdk 0.18.0 → 0.20.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/dist/advanced.d.mts +2 -2
  2. package/dist/advanced.d.ts +2 -2
  3. package/dist/advanced.js +21 -21
  4. package/dist/advanced.mjs +2 -2
  5. package/dist/{chunk-RYQ5IPWX.js → chunk-2BSYTQAY.js} +18 -28
  6. package/dist/{chunk-KTTQC5HG.mjs → chunk-676BJ3EU.mjs} +43 -8
  7. package/dist/{chunk-2JI47EYJ.mjs → chunk-7KH2XJIW.mjs} +67 -12
  8. package/dist/{chunk-MJECWMOY.js → chunk-AVVLN353.js} +76 -40
  9. package/dist/{chunk-FTL2SXCG.mjs → chunk-HG7GG3TT.mjs} +18 -28
  10. package/dist/{chunk-DYKFSV77.js → chunk-KSN3RJFL.js} +86 -30
  11. package/dist/{client-BFFfuzJr.d.mts → client-D4E9aJy7.d.mts} +141 -7
  12. package/dist/{client-B1UtuyOg.d.ts → client-VyO6Bqz2.d.ts} +141 -7
  13. package/dist/index.d.mts +38 -5
  14. package/dist/index.d.ts +38 -5
  15. package/dist/index.js +101 -97
  16. package/dist/index.mjs +3 -3
  17. package/dist/{payment-D9FTaOse.d.mts → payment-CKqMU4xT.d.mts} +1052 -934
  18. package/dist/{payment-D9FTaOse.d.ts → payment-CKqMU4xT.d.ts} +1052 -934
  19. package/dist/{price-BD1iioLh.d.ts → price-BqV_DjjQ.d.mts} +1 -1
  20. package/dist/{price-9JsPuknm.d.mts → price-e4beObLZ.d.ts} +1 -1
  21. package/dist/react.d.mts +463 -11
  22. package/dist/react.d.ts +463 -11
  23. package/dist/react.js +1630 -113
  24. package/dist/react.mjs +1566 -65
  25. package/dist/styles.css +1 -1
  26. package/dist/utils.d.mts +2 -2
  27. package/dist/utils.d.ts +2 -2
  28. package/dist/utils.js +28 -28
  29. package/dist/utils.mjs +1 -1
  30. package/package.json +2 -2
  31. package/registry/availability-badge.json +1 -1
  32. package/registry/booking-page.json +1 -1
  33. package/registry/bundle-selector.json +1 -1
  34. package/registry/cart-summary.json +1 -1
  35. package/registry/composite-selector.json +1 -1
  36. package/registry/order-summary.json +1 -1
  37. package/registry/product-customizer.json +1 -1
  38. package/registry/search-input.json +1 -1
  39. package/registry/service-card.json +1 -1
  40. package/registry/variant-selector.json +1 -1
@@ -84,1118 +84,1236 @@ declare function enrichError(error: CimplifyError, options?: {
84
84
  }): CimplifyError;
85
85
  declare function isRetryableError(error: unknown): boolean;
86
86
 
87
- type ProductType = "product" | "service" | "digital" | "bundle" | "composite";
88
- type ProductRenderHint = "food" | "physical" | "general";
89
- type DisplayMode = "card" | "page";
90
- type InventoryType = "one_to_one" | "composition" | "none";
91
- type VariantStrategy = "fetch_all" | "use_axes";
92
- type DigitalProductType = "download" | "license" | "event_ticket" | "access_pass" | "gift_code";
93
- type DepositType = "none" | "fixed" | "percentage";
94
- type SalesChannel = "pos" | "online" | "marketplace" | "partners";
95
- type AttributeType = "text" | "textarea" | "number" | "currency" | "boolean" | "single_select" | "multi_select" | "radio" | "date" | "url" | "color" | "image" | "file";
96
- type AttributeAppliesTo = "product" | "variant" | "both";
97
- interface CustomAttributeDefinition {
98
- id: string;
99
- business_id: string;
100
- name: string;
101
- slug: string;
102
- description?: string;
103
- attribute_type: AttributeType;
104
- options?: string[];
105
- unit?: string;
106
- is_required: boolean;
107
- is_filterable: boolean;
108
- is_visible: boolean;
109
- display_order: number;
110
- group_name?: string;
111
- applies_to: AttributeAppliesTo;
112
- created_at: string;
113
- updated_at: string;
114
- }
115
- interface CustomAttributeValue {
116
- definition_id: string;
117
- name: string;
118
- slug: string;
119
- attribute_type: AttributeType;
120
- group_name?: string;
121
- unit?: string;
122
- value: string | number | boolean | string[] | null;
123
- is_filterable: boolean;
124
- }
125
- type PropertySource = "attribute" | "variant";
126
- interface ProductProperty {
127
- name: string;
128
- slug: string;
129
- source: PropertySource;
130
- value_type: string;
131
- values: (string | number | boolean | null)[];
132
- group_name?: string;
133
- unit?: string;
134
- is_filterable: boolean;
135
- }
136
- interface PropertyFacet {
137
- name: string;
138
- slug: string;
139
- source: string;
140
- values: FacetValue[];
141
- }
142
- interface FacetValue {
143
- value: string;
144
- count: number;
145
- }
146
- interface TaxonomyAttributeTemplate {
147
- id: string;
148
- taxonomy_id: string;
149
- name: string;
150
- slug: string;
151
- attribute_type: "boolean" | "single_select";
152
- options?: string[];
153
- is_required: boolean;
154
- display_order: number;
155
- gpc_attribute_code?: number;
156
- created_at: string;
157
- }
158
- interface Product {
159
- id: string;
160
- business_id: string;
161
- category_id?: string;
162
- name: string;
163
- slug: string;
164
- description?: string;
165
- image_url?: string;
166
- default_price: Money;
167
- type: ProductType;
168
- render_hint?: ProductRenderHint;
169
- display_mode?: DisplayMode;
170
- inventory_type: InventoryType;
171
- variant_strategy: VariantStrategy;
172
- inventory_status?: {
173
- in_stock: boolean;
174
- stock_level?: number;
175
- low_stock: boolean;
87
+ type CartStatus = "active" | "converting" | "converted" | "expired" | "abandoned";
88
+ type CartChannel = "qr" | "taker" | "staff" | "web" | "dashboard" | "tap" | "chat";
89
+ type PriceSource = "default_item" | "custom" | {
90
+ location_specific: string;
91
+ } | {
92
+ variant: string;
93
+ } | {
94
+ composite: string;
95
+ } | {
96
+ bundle: string;
97
+ };
98
+ type AdjustmentType = "time_based" | {
99
+ location_based: string;
100
+ } | {
101
+ variant_based: string;
102
+ } | {
103
+ customer_segment: string;
104
+ } | {
105
+ customer_loyalty: string;
106
+ } | {
107
+ channel_markup: string;
108
+ } | {
109
+ discount: string;
110
+ } | {
111
+ bundle: string;
112
+ } | {
113
+ manual: string;
114
+ } | {
115
+ time_limited_promotion: {
116
+ promotion_id: string;
117
+ valid_until: string;
176
118
  };
177
- is_active: boolean;
178
- created_at: string;
179
- updated_at: string;
180
- metadata?: Record<string, unknown>;
181
- tags?: string[];
182
- images?: string[];
183
- calories?: number;
184
- allergies?: string[];
185
- recipe?: Record<string, unknown>;
186
- sku?: string;
187
- barcode?: string;
188
- ean?: string;
189
- upc?: string;
190
- is_trackable?: boolean;
191
- is_tracked?: boolean;
192
- is_tracked_in_store?: boolean;
193
- is_tracked_in_warehouse?: boolean;
194
- inventory_threshold?: number;
195
- external_id?: string;
196
- external_source?: string;
197
- download_url?: string;
198
- digital_type?: DigitalProductType;
199
- max_downloads?: number;
200
- license_key_required?: boolean;
201
- file_size_mb?: number;
202
- file_hash?: string;
203
- file_type?: string;
204
- version?: string;
205
- download_expires_days?: number;
206
- license_key_format?: string;
207
- max_activations?: number;
208
- validity_days?: number;
209
- event_id?: string;
210
- event_date?: string;
211
- venue?: string;
212
- ticket_type?: string;
213
- seat_info?: Record<string, unknown>;
214
- access_type?: string;
215
- access_level?: string;
216
- access_duration_days?: number;
217
- code_type?: string;
218
- code_value?: Money;
219
- code_currency?: CurrencyCode;
220
- duration_minutes?: number;
221
- preparation_time_minutes?: number;
222
- staff_required_count?: number;
223
- buffer_before_minutes?: number;
224
- buffer_after_minutes?: number;
225
- general_service_capacity?: number;
226
- deposit_type?: DepositType;
227
- deposit_amount?: Money;
228
- cancellation_window_minutes?: number;
229
- no_show_fee?: Money;
230
- requires_specific_staff?: boolean;
231
- requires_specific_resource?: boolean;
232
- hs_code?: string;
233
- mid_code?: string;
234
- material?: string;
235
- allow_backorder?: boolean;
236
- item_condition?: string;
237
- vendor?: string;
238
- length_mm?: number;
239
- width_mm?: number;
240
- height_mm?: number;
241
- channels?: SalesChannel[];
242
- meta_title?: string;
243
- meta_description?: string;
244
- is_discountable?: boolean;
245
- taxonomy_id?: string;
246
- bundle_price?: Money;
247
- discount_value?: Money;
248
- pricing_type?: BundlePriceType;
249
- components?: BundleComponentView[];
250
- composite_id?: string;
251
- groups?: CompositeGroupView[];
252
- custom_attributes?: CustomAttributeValue[];
253
- properties?: ProductProperty[];
254
- }
255
- interface ProductWithDetails extends Product {
256
- category?: Category;
257
- variants?: ProductVariant[];
258
- add_ons?: AddOnWithOptions[];
259
- variant_axes?: VariantAxisWithValues[];
260
- location_prices?: LocationProductPrice[];
261
- location_availability?: ProductAvailability[];
262
- time_profiles?: ProductTimeProfile[];
263
- }
264
- interface ProductVariant {
265
- id: string;
266
- name?: string;
267
- business_id: string;
268
- product_id: string;
269
- component_multiplier: Money;
270
- price_adjustment: Money;
271
- is_default: boolean;
272
- created_at: string;
273
- updated_at: string;
274
- is_active?: boolean;
275
- is_archived?: boolean;
276
- is_deleted?: boolean;
277
- inventory_threshold?: number;
278
- images?: string[];
279
- external_id?: string;
280
- external_source?: string;
281
- ean?: string;
282
- upc?: string;
283
- is_trackable?: boolean;
284
- is_tracked?: boolean;
285
- is_tracked_in_store?: boolean;
286
- is_tracked_in_warehouse?: boolean;
287
- sku?: string;
288
- barcode?: string;
289
- download_url?: string;
290
- metadata?: Record<string, unknown>;
291
- duration_minutes?: number;
292
- max_downloads?: number;
293
- license_key?: string;
294
- display_attributes?: VariantDisplayAttribute[];
295
- }
296
- interface VariantDisplayAttribute {
297
- axis_id: string;
298
- axis_name: string;
299
- value_id: string;
300
- value_name: string;
119
+ };
120
+ interface PriceAdjustment {
121
+ adjustment_type: AdjustmentType;
122
+ amount: Money;
123
+ percentage?: Money;
124
+ reason: string;
125
+ applied_at: string;
301
126
  }
302
- interface VariantAxis {
303
- id: string;
304
- business_id: string;
305
- product_id: string;
127
+ interface TaxPathComponent {
306
128
  name: string;
307
- display_order: number;
308
- affects_recipe: boolean;
309
- created_at: string;
310
- updated_at: string;
311
- metadata?: Record<string, unknown>;
312
- }
313
- interface VariantAxisWithValues extends VariantAxis {
314
- values: VariantAxisValue[];
129
+ rate: Money;
315
130
  }
316
- interface VariantAxisValue {
317
- id: string;
318
- business_id: string;
319
- axis_id: string;
320
- name: string;
321
- display_order: number;
322
- created_at: string;
323
- updated_at: string;
324
- metadata?: Record<string, unknown>;
131
+ interface PricePathTaxInfo {
132
+ tax_rate: Money;
133
+ tax_amount: Money;
134
+ is_inclusive: boolean;
135
+ components: TaxPathComponent[];
325
136
  }
326
- interface ProductVariantValue {
327
- variant_id: string;
328
- axis_value_id: string;
329
- business_id: string;
330
- created_at: string;
331
- updated_at: string;
332
- metadata?: Record<string, unknown>;
137
+ interface PriceDecisionPath {
138
+ base_price_source: PriceSource;
139
+ adjustments: PriceAdjustment[];
140
+ context?: Record<string, unknown>;
333
141
  }
334
- interface VariantLocationAvailability {
335
- id: string;
336
- variant_id: string;
337
- location_id: string;
338
- business_id: string;
339
- is_available: boolean;
340
- is_in_stock: boolean;
341
- created_at: string;
342
- updated_at: string;
343
- metadata?: Record<string, unknown>;
142
+ interface ChosenPrice {
143
+ base_price: Money;
144
+ final_price: Money;
145
+ markup_percentage: Money;
146
+ markup_amount: Money;
147
+ markup_discount_percentage: Money;
148
+ markup_discount_amount: Money;
149
+ currency?: CurrencyCode;
150
+ custom_fields?: Record<string, unknown>;
151
+ decision_path?: PriceDecisionPath;
152
+ tax_info?: PricePathTaxInfo;
153
+ pre_tax_price?: Money;
344
154
  }
345
- interface VariantAxisSelection {
346
- [axisName: string]: string;
155
+ type BenefitType = "percentage" | "fixed" | "points" | "free_item" | "buy_x_get_y_free";
156
+ interface AppliedDiscount {
157
+ discount_id: string;
158
+ discount_code?: string;
159
+ discount_type: BenefitType;
160
+ discount_value: Money;
161
+ discount_amount: Money;
162
+ applied_at: string;
163
+ targeted_item_ids?: string[];
347
164
  }
348
- interface AddOn {
349
- id: string;
350
- business_id: string;
351
- name: string;
352
- is_multiple_allowed: boolean;
353
- is_required: boolean;
354
- is_mutually_exclusive: boolean;
355
- min_selections?: number;
356
- max_selections?: number;
357
- created_at: string;
358
- updated_at: string;
359
- metadata?: Record<string, unknown>;
165
+ interface DiscountBreakdown {
166
+ item_discounts: Record<string, AppliedDiscount[]>;
167
+ order_discounts: AppliedDiscount[];
360
168
  }
361
- interface AddOnWithOptions extends AddOn {
362
- options: AddOnOption[];
169
+ interface DiscountDetails {
170
+ discounts: AppliedDiscount[];
171
+ total_discount_amount: Money;
172
+ breakdown: DiscountBreakdown;
363
173
  }
364
- interface AddOnOption {
365
- id: string;
174
+ interface SelectedAddOnOption {
175
+ option_id: string;
366
176
  add_on_id: string;
367
- business_id: string;
368
177
  name: string;
369
- option_sku?: string;
370
- default_price?: Money;
371
- description?: string;
372
- is_required: boolean;
373
- is_mutually_exclusive: boolean;
374
- created_at: string;
375
- updated_at: string;
376
- metadata?: Record<string, unknown>;
377
- }
378
- interface AddOnOptionPrice {
379
- id: string;
380
- add_on_option_id: string;
381
- location_id: string;
382
- business_id: string;
383
178
  price: Money;
384
- created_at: string;
385
- updated_at: string;
386
- metadata?: Record<string, unknown>;
179
+ quantity: number;
180
+ is_required: boolean;
181
+ selected_at: string;
182
+ price_info?: ChosenPrice;
387
183
  }
388
- interface ProductAddOn {
389
- id: string;
390
- business_id: string;
391
- product_id: string;
392
- add_on_id: string;
393
- created_at: string;
394
- updated_at: string;
395
- metadata?: Record<string, unknown>;
184
+ interface AddOnDetails {
185
+ selected_options: SelectedAddOnOption[];
186
+ total_add_on_price: Money;
187
+ add_ons: CartAddOn[];
396
188
  }
397
- interface Category {
398
- id: string;
399
- business_id: string;
189
+ interface CartAddOn {
190
+ add_on_id: string;
400
191
  name: string;
401
- slug: string;
402
- description?: string;
403
- product_count?: number;
404
- created_at: string;
405
- updated_at: string;
406
- metadata?: Record<string, unknown>;
192
+ min_selections: number;
193
+ max_selections: number;
194
+ selected_options: string[];
195
+ is_required: boolean;
407
196
  }
408
- interface CategorySummary extends Category {
409
- product_count: number;
197
+ interface VariantDetails {
198
+ variant_id: string;
199
+ sku?: string;
200
+ properties: Record<string, string>;
410
201
  }
411
- interface Collection {
412
- id: string;
413
- business_id: string;
414
- name: string;
415
- slug: string;
416
- description?: string;
417
- tags?: string[];
418
- image_url?: string;
419
- channels?: SalesChannel[];
420
- product_count?: number;
421
- created_at: string;
422
- updated_at: string;
423
- metadata?: Record<string, unknown>;
202
+ interface BundleSelectionInput {
203
+ component_id: string;
204
+ variant_id?: string;
205
+ quantity: number;
206
+ scheduled_start?: string;
207
+ scheduled_end?: string;
424
208
  }
425
- interface CollectionSummary extends Collection {
426
- product_count: number;
209
+ interface ComponentSchedulingData {
210
+ scheduled_start?: string;
211
+ scheduled_end?: string;
212
+ service_status: string;
213
+ confirmation_code?: string;
214
+ appointment_id?: string;
427
215
  }
428
- interface CollectionProduct {
429
- id: string;
430
- collection_id: string;
216
+ interface BundleStoredSelection {
217
+ component_id: string;
431
218
  product_id: string;
432
- display_order?: number;
433
- created_at: string;
434
- updated_at: string;
435
- metadata?: Record<string, unknown>;
219
+ product_name: string;
220
+ variant_id?: string;
221
+ variant_name?: string;
222
+ quantity: number;
223
+ unit_price: Money;
224
+ product_type?: ProductType;
225
+ scheduling?: ComponentSchedulingData;
436
226
  }
437
- type BundlePriceType = "fixed" | "percentage_discount" | "fixed_discount";
438
- interface Bundle {
227
+ interface BundleSelectionData {
228
+ bundle_id: string;
229
+ selections: BundleStoredSelection[];
230
+ }
231
+ interface CompositeStoredSelection {
232
+ component_id: string;
233
+ component_name: string;
234
+ quantity: number;
235
+ group_id: string;
236
+ source_type: "product" | "stock" | "add_on" | "standalone";
237
+ source_product_id?: string;
238
+ source_stock_id?: string;
239
+ unit_price: Money;
240
+ product_type?: ProductType;
241
+ scheduling?: ComponentSchedulingData;
242
+ }
243
+ interface CompositePriceBreakdown {
244
+ base_price: Money;
245
+ components_total: Money;
246
+ tier_applied?: string;
247
+ final_price: Money;
248
+ }
249
+ interface CompositeSelectionData {
250
+ composite_id: string;
251
+ selections: CompositeStoredSelection[];
252
+ breakdown: CompositePriceBreakdown;
253
+ }
254
+
255
+ type LineConfiguration = {
256
+ type: "simple";
257
+ variant?: VariantDetails;
258
+ add_ons?: AddOnDetails;
259
+ } | {
260
+ type: "service";
261
+ variant?: VariantDetails;
262
+ add_ons?: AddOnDetails;
263
+ scheduled_start?: string;
264
+ scheduled_end?: string;
265
+ confirmation_code?: string;
266
+ service_status?: string;
267
+ primary_staff_id?: string;
268
+ scheduling_metadata?: Record<string, unknown>;
269
+ } | {
270
+ type: "bundle";
271
+ variant?: VariantDetails;
272
+ input: BundleSelectionInput[];
273
+ resolved?: BundleSelectionData;
274
+ add_ons?: AddOnDetails;
275
+ } | {
276
+ type: "composite";
277
+ variant?: VariantDetails;
278
+ input: ComponentSelectionInput[];
279
+ resolved?: CompositeSelectionData;
280
+ add_ons?: AddOnDetails;
281
+ } | {
282
+ type: "digital";
283
+ variant?: VariantDetails;
284
+ add_ons?: AddOnDetails;
285
+ digital_type?: string;
286
+ fulfillment_id?: string;
287
+ };
288
+ interface Cart {
439
289
  id: string;
440
290
  business_id: string;
441
- product_id: string;
442
- name: string;
443
- slug: string;
444
- description?: string;
445
- image_url?: string;
446
- pricing_type: BundlePriceType;
447
- bundle_price?: Money;
448
- discount_value?: Money;
449
- product_count?: number;
291
+ customer_id?: string;
292
+ session_id?: string;
293
+ location_id?: string;
450
294
  created_at: string;
451
295
  updated_at: string;
296
+ expires_at: string;
297
+ subtotal: Money;
298
+ tax_amount: Money;
299
+ service_charge: Money;
300
+ total_discounts: Money;
301
+ total_price: Money;
302
+ delivery_fee: Money;
303
+ total_items: number;
304
+ tax_rate?: Money;
305
+ service_charge_rate?: Money;
306
+ price_info: ChosenPrice;
307
+ applied_discount_ids: string[];
308
+ applied_discount_codes: string[];
309
+ discount_details?: DiscountDetails;
310
+ currency: CurrencyCode;
311
+ customer_name?: string;
312
+ customer_email?: string;
313
+ customer_phone?: string;
314
+ customer_address?: string;
315
+ source: string;
316
+ status: CartStatus;
317
+ channel: string;
318
+ order_id?: string;
452
319
  metadata?: Record<string, unknown>;
320
+ items: CartItem[];
453
321
  }
454
- interface BundleSummary extends Bundle {
455
- product_count: number;
456
- }
457
- interface BundleProduct {
322
+ interface CartItem {
458
323
  id: string;
459
- bundle_id: string;
460
- product_id: string;
461
- variant_id?: string;
462
- allow_variant_choice: boolean;
324
+ cart_id: string;
325
+ item_id: string;
463
326
  quantity: number;
327
+ line_key: string;
328
+ configuration: LineConfiguration;
329
+ price: Money;
330
+ add_ons_price: Money;
331
+ price_info: ChosenPrice;
332
+ applied_discount_ids: string[];
333
+ item_discount_amount: Money;
334
+ discount_details?: DiscountDetails;
464
335
  created_at: string;
465
336
  updated_at: string;
466
337
  metadata?: Record<string, unknown>;
467
338
  }
468
- interface BundleWithDetails extends Bundle {
469
- product: Product;
470
- components: BundleComponentData[];
471
- schedules?: ProductTimeProfile[];
472
- availability?: Record<string, ProductAvailability>;
339
+ interface CartTotals {
340
+ subtotal: Money;
341
+ tax_amount: Money;
342
+ service_charge: Money;
343
+ total_discounts: Money;
344
+ total_price: Money;
345
+ tax_rate?: Money;
346
+ service_charge_rate?: Money;
347
+ applied_discount_ids: string[];
348
+ applied_discount_codes: string[];
349
+ discount_details?: DiscountDetails;
473
350
  }
474
- interface BundleComponentData {
475
- component: BundleProduct;
476
- product: Product;
477
- variants: ProductVariant[];
478
- variant_axes: VariantAxis[];
479
- variant_axis_values: VariantAxisValue[];
480
- product_variant_values: ProductVariantValue[];
351
+ interface DisplayCart {
352
+ id: string;
353
+ business_id: string;
354
+ customer_id?: string;
355
+ session_id?: string;
356
+ location_id?: string;
357
+ subtotal: Money;
358
+ tax_amount: Money;
359
+ service_charge: Money;
360
+ total_discounts: Money;
361
+ total_price: Money;
362
+ delivery_fee: Money;
363
+ total_items: number;
364
+ tax_rate?: Money;
365
+ service_charge_rate?: Money;
366
+ currency: CurrencyCode;
367
+ channel: string;
368
+ status: string;
369
+ business_name: string;
370
+ business_logo?: string;
371
+ location_name?: string;
372
+ customer_name?: string;
373
+ customer_email?: string;
374
+ customer_phone?: string;
375
+ customer_address?: string;
376
+ items: DisplayCartItem[];
377
+ applied_discount_codes: string[];
378
+ discount_details?: DiscountDetails;
481
379
  }
482
- interface BundleComponentInfo {
380
+ interface DisplayCartItem {
483
381
  id: string;
484
- product_id: string;
485
- variant_id?: string;
382
+ cart_id: string;
383
+ item_id: string;
486
384
  quantity: number;
385
+ name: string;
386
+ description?: string;
387
+ image_url?: string;
388
+ category_name?: string;
389
+ is_available: boolean;
390
+ preparation_time?: number;
391
+ unit_price: Money;
392
+ total_price: Money;
393
+ add_ons_price: Money;
394
+ price_info: ChosenPrice;
395
+ item_discount_amount: Money;
396
+ discount_details?: DiscountDetails;
397
+ add_ons: DisplayAddOn[];
398
+ special_instructions?: string;
487
399
  }
488
- interface BundleComponentView {
400
+ interface DisplayAddOn {
489
401
  id: string;
490
- product_id: string;
491
- product_name: string;
492
- product_description?: string;
493
- product_image_url?: string;
494
- effective_price: Money;
495
- quantity: number;
496
- variant_id?: string;
497
- allow_variant_choice: boolean;
498
- available_variants: BundleComponentVariantView[];
499
- variant_axes?: VariantAxisView[];
402
+ name: string;
403
+ min_selections: number;
404
+ max_selections: number;
405
+ is_required: boolean;
406
+ selected_options: DisplayAddOnOption[];
500
407
  }
501
- interface BundleComponentVariantView {
408
+ interface DisplayAddOnOption {
502
409
  id: string;
503
- is_default: boolean;
504
- display_name: string;
505
- price_adjustment: Money;
410
+ name: string;
411
+ price: Money;
412
+ quantity: number;
413
+ image_url?: string;
414
+ description?: string;
506
415
  }
507
- interface VariantAxisView {
508
- id: string;
416
+ interface UICartBusiness {
509
417
  name: string;
510
- values: VariantAxisValueView[];
418
+ logo_url?: string;
419
+ contact_email?: string;
420
+ contact_phone?: string;
511
421
  }
512
- interface VariantAxisValueView {
513
- id: string;
514
- value: string;
422
+ interface UICartLocation {
423
+ id?: string;
424
+ name?: string;
515
425
  }
516
- type CompositePricingMode = "additive" | "highest_per_group" | "highest_overall" | "tiered";
517
- type GroupPricingBehavior = "additive" | "first_n_free" | "flat_fee" | "highest_only";
518
- type ComponentSourceType = "product" | "stock" | "add_on" | "standalone";
519
- interface Composite {
520
- id: string;
521
- business_id: string;
522
- product_id: string;
523
- base_price: Money;
524
- pricing_mode: CompositePricingMode;
525
- min_order_quantity?: number;
526
- max_order_quantity?: number;
527
- created_at: string;
528
- updated_at: string;
529
- metadata?: Record<string, unknown>;
426
+ interface UICartCustomer {
427
+ id?: string;
428
+ name?: string;
429
+ email?: string;
430
+ phone?: string;
431
+ address?: string;
530
432
  }
531
- interface CompositeWithDetails extends Composite {
532
- product: Product;
533
- groups: ComponentGroupWithComponents[];
433
+ interface UICartPricing {
434
+ subtotal: Money;
435
+ tax_amount: Money;
436
+ service_charge: Money;
437
+ total_discounts: Money;
438
+ total_price: Money;
439
+ tax_rate?: Money;
440
+ service_charge_rate?: Money;
441
+ currency: CurrencyCode;
534
442
  }
535
- interface ComponentGroup {
443
+ interface AddOnOptionDetails {
536
444
  id: string;
537
- composite_id: string;
538
445
  name: string;
446
+ price?: Money;
447
+ is_required: boolean;
539
448
  description?: string;
540
- display_order: number;
541
- min_selections: number;
542
- max_selections?: number;
543
- allow_quantity: boolean;
544
- max_quantity_per_component?: number;
545
- pricing_behavior: GroupPricingBehavior;
546
- pricing_behavior_config?: Record<string, unknown>;
547
- icon?: string;
548
- color?: string;
549
- created_at: string;
550
- updated_at: string;
551
- }
552
- interface ComponentGroupWithComponents extends ComponentGroup {
553
- components: CompositeComponent[];
449
+ image_url?: string;
554
450
  }
555
- interface CompositeGroupView {
451
+ interface AddOnGroupDetails {
556
452
  id: string;
557
453
  name: string;
558
- description?: string;
454
+ is_multiple_allowed: boolean;
559
455
  min_selections: number;
560
456
  max_selections: number;
561
- allow_quantity: boolean;
562
- max_quantity_per_component?: number;
563
- display_order: number;
564
- components: CompositeComponentView[];
457
+ required: boolean;
458
+ options: AddOnOptionDetails[];
565
459
  }
566
- interface CompositeComponentView {
460
+ interface VariantDetailsDTO {
567
461
  id: string;
568
- display_name?: string;
569
- display_description?: string;
570
- display_image_url?: string;
462
+ name: string;
571
463
  price: Money;
572
- calories?: number;
573
- display_order: number;
574
- is_popular: boolean;
575
- is_premium: boolean;
576
- is_available: boolean;
577
- is_archived: boolean;
464
+ price_adjustment: Money;
465
+ is_default: boolean;
578
466
  }
579
- interface CompositeComponent {
467
+ interface CartItemDetails {
580
468
  id: string;
581
- group_id: string;
582
- product_id?: string;
583
- variant_id?: string;
584
- stock_id?: string;
585
- add_on_id?: string;
586
- add_on_option_id?: string;
587
- display_name?: string;
588
- display_description?: string;
589
- display_image_url?: string;
590
- price: Money;
591
- price_per_additional?: Money;
592
- quantity_per_selection?: Money;
593
- waste_percentage?: Money;
594
- calories?: number;
595
- allergens?: string[];
596
- display_order: number;
597
- is_popular: boolean;
598
- is_premium: boolean;
599
- is_available: boolean;
600
- is_archived: boolean;
601
- created_at: string;
602
- updated_at: string;
603
- }
604
- interface ComponentSelectionInput {
605
- component_id: string;
469
+ cart_id: string;
470
+ item_id: string;
606
471
  quantity: number;
472
+ line_key: string;
473
+ line_type: "simple" | "service" | "bundle" | "composite" | "digital";
474
+ name: string;
475
+ description?: string;
476
+ image_url?: string;
477
+ category_id?: string;
478
+ category_name?: string;
479
+ is_available: boolean;
607
480
  variant_id?: string;
608
- add_on_option_id?: string;
609
- }
610
- interface CompositePriceResult {
481
+ variant_details?: VariantDetails;
482
+ variant_name?: string;
483
+ variant_info?: VariantDetailsDTO;
611
484
  base_price: Money;
612
- components_total: Money;
613
- tier_applied?: string;
614
- final_price: Money;
615
- breakdown: ComponentPriceBreakdown[];
616
- }
617
- interface ComponentPriceBreakdown {
618
- component_id: string;
619
- component_name: string;
620
- quantity: number;
621
- unit_price: Money;
485
+ add_ons_price: Money;
622
486
  total_price: Money;
623
- group_id: string;
624
- source_type: ComponentSourceType;
625
- source_product_id?: string;
626
- source_stock_id?: string;
627
- }
628
- type PriceEntryType = "base" | "location" | "time" | "channel";
629
- interface Price {
630
- id: string;
631
- product_id: string;
632
- location_id: string;
633
- business_id: string;
634
- price: Money;
635
- entry_type: PriceEntryType;
487
+ item_discount_amount: Money;
488
+ price_info: ChosenPrice;
489
+ add_on_option_ids: string[];
490
+ add_on_ids: string[];
491
+ add_on_details: AddOnDetails;
492
+ add_on_options: AddOnOptionDetails[];
493
+ add_ons: AddOnGroupDetails[];
494
+ special_instructions?: string;
495
+ scheduled_start?: string;
496
+ scheduled_end?: string;
497
+ confirmation_code?: string;
498
+ service_status?: string;
499
+ staff_id?: string;
500
+ scheduling_metadata?: Record<string, unknown>;
501
+ bundle_selections?: BundleSelectionInput[];
502
+ bundle_resolved?: BundleSelectionData;
503
+ composite_selections?: ComponentSelectionInput[];
504
+ composite_resolved?: CompositeSelectionData;
505
+ applied_discount_ids: string[];
506
+ discount_details?: DiscountDetails;
636
507
  created_at: string;
637
508
  updated_at: string;
638
509
  metadata?: Record<string, unknown>;
639
510
  }
640
- type LocationProductPrice = Price;
641
- interface ProductAvailability {
511
+ interface UICart {
642
512
  id: string;
643
513
  business_id: string;
644
- location_id: string;
645
- product_id: string;
646
- is_available: boolean;
647
- is_in_stock: boolean;
514
+ session_id?: string;
515
+ customer_id?: string;
516
+ location_id?: string;
648
517
  created_at: string;
649
518
  updated_at: string;
519
+ expires_at: string;
520
+ status: string;
521
+ source: string;
522
+ channel: string;
523
+ business_details?: UICartBusiness;
524
+ location_details?: UICartLocation;
525
+ customer_info: UICartCustomer;
526
+ items: CartItemDetails[];
527
+ pricing: UICartPricing;
650
528
  metadata?: Record<string, unknown>;
651
529
  }
652
- interface ProductTimeProfile {
530
+ interface UICartResponse {
531
+ cart: UICart;
532
+ cart_count: number;
533
+ message?: string | null;
534
+ }
535
+ interface AddToCartInput {
536
+ item_id: string;
537
+ quantity?: number;
538
+ variant_id?: string;
539
+ quote_id?: string;
540
+ add_on_options?: string[];
541
+ special_instructions?: string;
542
+ bundle_selections?: BundleSelectionInput[];
543
+ composite_selections?: ComponentSelectionInput[];
544
+ scheduled_start?: string;
545
+ scheduled_end?: string;
546
+ staff_id?: string;
547
+ }
548
+ interface UpdateCartItemInput {
549
+ quantity?: number;
550
+ variant_id?: string;
551
+ add_on_options?: string[];
552
+ notes?: string;
553
+ bundle_selections?: BundleSelectionInput[];
554
+ composite_selections?: ComponentSelectionInput[];
555
+ scheduled_start?: string;
556
+ scheduled_end?: string;
557
+ staff_id?: string;
558
+ }
559
+ interface CartSummary {
560
+ item_count: number;
561
+ total_items: number;
562
+ subtotal: Money;
563
+ discount_amount: Money;
564
+ tax_amount: Money;
565
+ total: Money;
566
+ currency: CurrencyCode;
567
+ }
568
+
569
+ type BillingFrequency = "weekly" | "monthly" | "quarterly" | "annually";
570
+ type BillingPlanType = "subscription" | "installment";
571
+ type BillingMarkupType = "fixed" | "percentage";
572
+ interface ProductBillingPlan {
653
573
  id: string;
654
- business_id: string;
655
574
  product_id: string;
656
- day_of_week: number;
657
- start_time: string;
658
- end_time: string;
575
+ business_id: string;
576
+ frequency: BillingFrequency;
577
+ fulfillment_frequency?: BillingFrequency | null;
578
+ plan_type: BillingPlanType;
579
+ installment_periods?: number | null;
580
+ trial_days: number;
581
+ setup_fee: number;
582
+ markup_type?: BillingMarkupType | null;
583
+ markup_amount?: number | null;
584
+ customer_group_id?: string | null;
585
+ min_quantity?: number | null;
586
+ min_order_value?: number | null;
587
+ max_cycles?: number | null;
588
+ is_active: boolean;
659
589
  created_at: string;
660
590
  updated_at: string;
661
591
  metadata?: Record<string, unknown>;
662
592
  }
663
- interface ProductTaxonomy {
593
+ interface EligiblePlansQuery {
594
+ customer_id?: string;
595
+ quantity?: number;
596
+ order_value?: number;
597
+ }
598
+ interface FormattedPlanOption {
599
+ plan: ProductBillingPlan;
600
+ label: string;
601
+ pricePerPeriod: number;
602
+ totalPrice?: number;
603
+ }
604
+
605
+ type ProductType = "product" | "service" | "digital" | "bundle" | "composite";
606
+ type ProductRenderHint = "food" | "physical" | "general";
607
+ type DisplayMode = "card" | "page";
608
+ type InventoryType = "one_to_one" | "composition" | "none";
609
+ type VariantStrategy = "fetch_all" | "use_axes";
610
+ type DigitalProductType = "download" | "license" | "event_ticket" | "access_pass" | "gift_code";
611
+ type DepositType = "none" | "fixed" | "percentage";
612
+ type DurationUnit = "minutes" | "hours" | "days" | "nights" | "weeks" | "months" | "years";
613
+ type SalesChannel = "pos" | "online" | "marketplace" | "partners";
614
+ type AttributeType = "text" | "textarea" | "number" | "currency" | "boolean" | "single_select" | "multi_select" | "radio" | "date" | "url" | "color" | "image" | "file" | "product_reference" | "category_reference" | "collection_reference" | "variant_reference" | "list_text" | "list_number" | "list_date" | "dimension" | "weight" | "volume";
615
+ type AttributeAppliesTo = "product" | "variant" | "both" | "category" | "collection" | "all";
616
+ type AttributeVisibility = "admin_only" | "storefront_read" | "public";
617
+ type MeasurementValue = {
618
+ value: number;
619
+ unit: string;
620
+ };
621
+ interface AttributeValidationRules {
622
+ min_length?: number;
623
+ max_length?: number;
624
+ regex?: string;
625
+ min?: number | string;
626
+ max?: number | string;
627
+ max_precision?: number;
628
+ min_selections?: number;
629
+ max_selections?: number;
630
+ }
631
+ interface CustomAttributeDefinition {
664
632
  id: string;
665
- code: string;
633
+ business_id: string;
634
+ namespace: string;
666
635
  name: string;
636
+ slug: string;
667
637
  description?: string;
668
- parent_id?: string;
669
- level: number;
670
- is_active: boolean;
638
+ attribute_type: AttributeType;
639
+ options?: string[];
640
+ unit?: string;
641
+ validation?: AttributeValidationRules | null;
642
+ is_required: boolean;
643
+ is_filterable: boolean;
644
+ visibility: AttributeVisibility;
645
+ display_order: number;
646
+ group_name?: string;
647
+ applies_to: AttributeAppliesTo;
671
648
  created_at: string;
672
649
  updated_at: string;
673
650
  }
674
- interface TaxonomyWithChildren extends ProductTaxonomy {
675
- children: ProductTaxonomy[];
676
- }
677
- interface ProductAvailabilityNow {
678
- is_available: boolean;
679
- schedules_today: ProductTimeProfile[];
651
+ interface CustomAttributeValue {
652
+ definition_id: string;
653
+ namespace: string;
654
+ name: string;
655
+ slug: string;
656
+ attribute_type: AttributeType;
657
+ group_name?: string;
658
+ unit?: string;
659
+ value: string | number | boolean | string[] | MeasurementValue | null;
660
+ is_filterable: boolean;
661
+ visibility: AttributeVisibility;
680
662
  }
681
- type DealBenefitType = "percentage" | "fixed" | "free_item" | "buy_x_get_y_free" | "points";
682
- interface Deal {
683
- id: string;
684
- description: string;
685
- benefit_type: DealBenefitType;
686
- value: Money;
687
- min_order_value?: Money;
688
- buy_quantity?: number;
689
- get_quantity?: number;
690
- stackable: boolean;
691
- starts_at: string;
692
- ends_at: string;
693
- product_ids: string[];
694
- category_ids: string[];
695
- collection_ids: string[];
663
+ type PropertySource = "attribute" | "variant";
664
+ interface ProductProperty {
665
+ name: string;
666
+ slug: string;
667
+ source: PropertySource;
668
+ value_type: string;
669
+ values: (string | number | boolean | null)[];
670
+ group_name?: string;
671
+ unit?: string;
672
+ is_filterable: boolean;
696
673
  }
697
- interface ProductDealInfo {
698
- product_id: string;
699
- deal_id: string;
700
- deal_name: string;
701
- benefit_type: DealBenefitType;
702
- value: Money;
703
- label: string;
674
+ interface PropertyFacet {
675
+ name: string;
676
+ slug: string;
677
+ source: string;
678
+ values: FacetValue[];
704
679
  }
705
- interface DiscountValidation {
706
- is_eligible: boolean;
707
- discount_amount?: Money;
708
- deal?: Deal;
709
- ineligibility_reason?: string;
680
+ interface FacetValue {
681
+ value: string;
682
+ count: number;
710
683
  }
711
- interface Tag {
684
+ interface TaxonomyAttributeTemplate {
712
685
  id: string;
686
+ taxonomy_id: string;
713
687
  name: string;
714
688
  slug: string;
715
- color?: string;
716
- icon?: string;
717
- description?: string;
718
- tag_group?: string;
719
- sort_order: number;
720
- usage_count: number;
689
+ attribute_type: "boolean" | "single_select";
690
+ options?: string[];
691
+ is_required: boolean;
692
+ display_order: number;
693
+ gpc_attribute_code?: number;
721
694
  created_at: string;
722
- updated_at: string;
723
695
  }
724
- interface TagsResponse {
725
- items: Tag[];
726
- total: number;
727
- limit: number;
728
- offset: number;
696
+ interface KnowledgeArticle {
697
+ id: string;
698
+ title: string;
699
+ slug: string;
700
+ content: string;
701
+ category?: string;
702
+ tags: string[];
703
+ created_at: string;
704
+ updated_at: string;
729
705
  }
730
-
731
- type CartStatus = "active" | "converting" | "converted" | "expired" | "abandoned";
732
- type CartChannel = "qr" | "taker" | "staff" | "web" | "dashboard";
733
- type PriceSource = "default_item" | "custom" | {
734
- location_specific: string;
735
- } | {
736
- variant: string;
737
- } | {
738
- composite: string;
739
- } | {
740
- bundle: string;
741
- };
742
- type AdjustmentType = "time_based" | {
743
- location_based: string;
744
- } | {
745
- variant_based: string;
746
- } | {
747
- customer_segment: string;
748
- } | {
749
- customer_loyalty: string;
750
- } | {
751
- channel_markup: string;
752
- } | {
753
- discount: string;
754
- } | {
755
- bundle: string;
756
- } | {
757
- manual: string;
758
- } | {
759
- time_limited_promotion: {
760
- promotion_id: string;
761
- valid_until: string;
706
+ interface Product {
707
+ id: string;
708
+ business_id: string;
709
+ category_id?: string;
710
+ name: string;
711
+ slug: string;
712
+ description?: string;
713
+ image_url?: string;
714
+ default_price: Money;
715
+ type: ProductType;
716
+ render_hint?: ProductRenderHint;
717
+ display_mode?: DisplayMode;
718
+ inventory_type: InventoryType;
719
+ variant_strategy: VariantStrategy;
720
+ inventory_status?: {
721
+ in_stock: boolean;
722
+ stock_level?: number;
723
+ low_stock: boolean;
762
724
  };
763
- };
764
- interface PriceAdjustment {
765
- adjustment_type: AdjustmentType;
766
- amount: Money;
767
- percentage?: Money;
768
- reason: string;
769
- applied_at: string;
725
+ is_active: boolean;
726
+ created_at: string;
727
+ updated_at: string;
728
+ metadata?: Record<string, unknown>;
729
+ tags?: string[];
730
+ images?: string[];
731
+ calories?: number;
732
+ allergies?: string[];
733
+ recipe?: Record<string, unknown>;
734
+ sku?: string;
735
+ barcode?: string;
736
+ ean?: string;
737
+ upc?: string;
738
+ is_trackable?: boolean;
739
+ is_tracked?: boolean;
740
+ is_tracked_in_store?: boolean;
741
+ is_tracked_in_warehouse?: boolean;
742
+ inventory_threshold?: number;
743
+ external_id?: string;
744
+ external_source?: string;
745
+ download_url?: string;
746
+ digital_type?: DigitalProductType;
747
+ max_downloads?: number;
748
+ license_key_required?: boolean;
749
+ file_size_mb?: number;
750
+ file_hash?: string;
751
+ file_type?: string;
752
+ version?: string;
753
+ download_expires_days?: number;
754
+ license_key_format?: string;
755
+ max_activations?: number;
756
+ validity_days?: number;
757
+ event_id?: string;
758
+ event_date?: string;
759
+ venue?: string;
760
+ ticket_type?: string;
761
+ seat_info?: Record<string, unknown>;
762
+ access_type?: string;
763
+ access_level?: string;
764
+ access_duration_days?: number;
765
+ code_type?: string;
766
+ code_value?: Money;
767
+ code_currency?: CurrencyCode;
768
+ duration_minutes?: number;
769
+ duration_unit?: DurationUnit;
770
+ preparation_time_minutes?: number;
771
+ staff_required_count?: number;
772
+ buffer_before_minutes?: number;
773
+ buffer_after_minutes?: number;
774
+ general_service_capacity?: number;
775
+ deposit_type?: DepositType;
776
+ deposit_amount?: Money;
777
+ cancellation_window_minutes?: number;
778
+ no_show_fee?: Money;
779
+ requires_specific_staff?: boolean;
780
+ requires_specific_resource?: boolean;
781
+ hs_code?: string;
782
+ mid_code?: string;
783
+ material?: string;
784
+ allow_backorder?: boolean;
785
+ item_condition?: string;
786
+ vendor?: string;
787
+ length_mm?: number;
788
+ width_mm?: number;
789
+ height_mm?: number;
790
+ channels?: SalesChannel[];
791
+ meta_title?: string;
792
+ meta_description?: string;
793
+ is_discountable?: boolean;
794
+ taxonomy_id?: string;
795
+ bundle_price?: Money;
796
+ discount_value?: Money;
797
+ pricing_type?: BundlePriceType;
798
+ components?: BundleComponentView[];
799
+ composite_id?: string;
800
+ groups?: CompositeGroupView[];
801
+ custom_attributes?: CustomAttributeValue[];
802
+ properties?: ProductProperty[];
803
+ billing_plans?: ProductBillingPlan[];
804
+ upsells?: RelatedProductView[];
805
+ cross_sells?: RelatedProductView[];
770
806
  }
771
- interface TaxPathComponent {
807
+ interface RelatedProductView {
808
+ product_id: string;
772
809
  name: string;
773
- rate: Money;
774
- }
775
- interface PricePathTaxInfo {
776
- tax_rate: Money;
777
- tax_amount: Money;
778
- is_inclusive: boolean;
779
- components: TaxPathComponent[];
780
- }
781
- interface PriceDecisionPath {
782
- base_price_source: PriceSource;
783
- adjustments: PriceAdjustment[];
784
- context?: Record<string, unknown>;
810
+ slug: string;
811
+ image_url?: string;
812
+ price: Money;
813
+ source: string;
785
814
  }
786
- interface ChosenPrice {
787
- base_price: Money;
788
- final_price: Money;
789
- markup_percentage: Money;
790
- markup_amount: Money;
791
- markup_discount_percentage: Money;
792
- markup_discount_amount: Money;
793
- currency?: CurrencyCode;
794
- custom_fields?: Record<string, unknown>;
795
- decision_path?: PriceDecisionPath;
796
- tax_info?: PricePathTaxInfo;
797
- pre_tax_price?: Money;
815
+ interface ProductWithDetails extends Product {
816
+ category?: Category;
817
+ variants?: VariantView[];
818
+ add_ons?: AddOnWithOptions[];
819
+ variant_axes?: VariantAxisWithValues[];
820
+ location_prices?: LocationProductPrice[];
821
+ location_availability?: ProductAvailability[];
822
+ time_profiles?: ProductTimeProfile[];
798
823
  }
799
- type BenefitType = "percentage" | "fixed" | "points" | "free_item" | "buy_x_get_y_free";
800
- interface AppliedDiscount {
801
- discount_id: string;
802
- discount_code?: string;
803
- discount_type: BenefitType;
804
- discount_value: Money;
805
- discount_amount: Money;
806
- applied_at: string;
807
- targeted_item_ids?: string[];
824
+ interface VariantView {
825
+ id: string;
826
+ name: string;
827
+ is_default: boolean;
828
+ price_adjustment: Money;
829
+ location_prices?: Record<string, ChosenPrice>;
830
+ axis_selections?: Record<string, string>;
831
+ display_attributes?: VariantDisplayAttribute[];
832
+ images?: string[];
833
+ duration_minutes?: number;
834
+ duration_unit?: DurationUnit;
835
+ skill_level_required?: string;
836
+ staff_count_override?: number;
837
+ capacity_override?: number;
808
838
  }
809
- interface DiscountBreakdown {
810
- item_discounts: Record<string, AppliedDiscount[]>;
811
- order_discounts: AppliedDiscount[];
839
+ interface ProductVariant {
840
+ id: string;
841
+ name?: string;
842
+ business_id: string;
843
+ product_id: string;
844
+ component_multiplier: Money;
845
+ price_adjustment: Money;
846
+ is_default: boolean;
847
+ created_at: string;
848
+ updated_at: string;
849
+ is_active?: boolean;
850
+ is_archived?: boolean;
851
+ is_deleted?: boolean;
852
+ inventory_threshold?: number;
853
+ images?: string[];
854
+ external_id?: string;
855
+ external_source?: string;
856
+ ean?: string;
857
+ upc?: string;
858
+ is_trackable?: boolean;
859
+ is_tracked?: boolean;
860
+ is_tracked_in_store?: boolean;
861
+ is_tracked_in_warehouse?: boolean;
862
+ sku?: string;
863
+ barcode?: string;
864
+ download_url?: string;
865
+ metadata?: Record<string, unknown>;
866
+ duration_minutes?: number;
867
+ duration_unit?: DurationUnit;
868
+ max_downloads?: number;
869
+ license_key?: string;
870
+ display_attributes?: VariantDisplayAttribute[];
812
871
  }
813
- interface DiscountDetails {
814
- discounts: AppliedDiscount[];
815
- total_discount_amount: Money;
816
- breakdown: DiscountBreakdown;
872
+ interface VariantDisplayAttribute {
873
+ axis_id: string;
874
+ axis_name: string;
875
+ value_id: string;
876
+ value_name: string;
817
877
  }
818
- interface SelectedAddOnOption {
819
- option_id: string;
820
- add_on_id: string;
878
+ interface VariantAxis {
879
+ id: string;
880
+ business_id: string;
881
+ product_id: string;
821
882
  name: string;
822
- price: Money;
823
- quantity: number;
824
- is_required: boolean;
825
- selected_at: string;
826
- price_info?: ChosenPrice;
883
+ display_order: number;
884
+ affects_recipe: boolean;
885
+ created_at: string;
886
+ updated_at: string;
887
+ metadata?: Record<string, unknown>;
827
888
  }
828
- interface AddOnDetails {
829
- selected_options: SelectedAddOnOption[];
830
- total_add_on_price: Money;
831
- add_ons: CartAddOn[];
889
+ interface VariantAxisWithValues extends VariantAxis {
890
+ values: VariantAxisValue[];
832
891
  }
833
- interface CartAddOn {
834
- add_on_id: string;
892
+ interface VariantAxisValue {
893
+ id: string;
894
+ business_id: string;
895
+ axis_id: string;
835
896
  name: string;
836
- min_selections: number;
837
- max_selections: number;
838
- selected_options: string[];
839
- is_required: boolean;
897
+ display_order: number;
898
+ color_hex?: string;
899
+ image_url?: string;
900
+ created_at: string;
901
+ updated_at: string;
902
+ metadata?: Record<string, unknown>;
840
903
  }
841
- interface VariantDetails {
904
+ interface ProductVariantValue {
842
905
  variant_id: string;
843
- sku?: string;
844
- properties: Record<string, string>;
845
- }
846
- interface BundleSelectionInput {
847
- component_id: string;
848
- variant_id?: string;
849
- quantity: number;
850
- }
851
- interface BundleStoredSelection {
852
- component_id: string;
853
- product_id: string;
854
- product_name: string;
855
- variant_id?: string;
856
- variant_name?: string;
857
- quantity: number;
858
- unit_price: Money;
906
+ axis_value_id: string;
907
+ business_id: string;
908
+ created_at: string;
909
+ updated_at: string;
910
+ metadata?: Record<string, unknown>;
859
911
  }
860
- interface BundleSelectionData {
861
- bundle_id: string;
862
- selections: BundleStoredSelection[];
912
+ interface VariantLocationAvailability {
913
+ id: string;
914
+ variant_id: string;
915
+ location_id: string;
916
+ business_id: string;
917
+ is_available: boolean;
918
+ is_in_stock: boolean;
919
+ created_at: string;
920
+ updated_at: string;
921
+ metadata?: Record<string, unknown>;
863
922
  }
864
- interface CompositeStoredSelection {
865
- component_id: string;
866
- component_name: string;
867
- quantity: number;
868
- group_id: string;
869
- source_type: "product" | "stock" | "add_on" | "standalone";
870
- source_product_id?: string;
871
- source_stock_id?: string;
872
- unit_price: Money;
923
+ interface VariantAxisSelection {
924
+ [axisName: string]: string;
873
925
  }
874
- interface CompositePriceBreakdown {
875
- base_price: Money;
876
- components_total: Money;
877
- tier_applied?: string;
878
- final_price: Money;
926
+ interface AddOn {
927
+ id: string;
928
+ business_id: string;
929
+ name: string;
930
+ is_multiple_allowed: boolean;
931
+ is_required: boolean;
932
+ is_mutually_exclusive: boolean;
933
+ min_selections?: number;
934
+ max_selections?: number;
935
+ created_at: string;
936
+ updated_at: string;
937
+ metadata?: Record<string, unknown>;
879
938
  }
880
- interface CompositeSelectionData {
881
- composite_id: string;
882
- selections: CompositeStoredSelection[];
883
- breakdown: CompositePriceBreakdown;
939
+ interface AddOnWithOptions extends AddOn {
940
+ options: AddOnOption[];
884
941
  }
885
-
886
- type LineConfiguration = {
887
- type: "simple";
888
- variant?: VariantDetails;
889
- add_ons?: AddOnDetails;
890
- } | {
891
- type: "service";
892
- variant?: VariantDetails;
893
- add_ons?: AddOnDetails;
894
- scheduled_start?: string;
895
- scheduled_end?: string;
896
- confirmation_code?: string;
897
- service_status?: string;
898
- primary_staff_id?: string;
899
- scheduling_metadata?: Record<string, unknown>;
900
- } | {
901
- type: "bundle";
902
- variant?: VariantDetails;
903
- input: BundleSelectionInput[];
904
- resolved?: BundleSelectionData;
905
- add_ons?: AddOnDetails;
906
- } | {
907
- type: "composite";
908
- variant?: VariantDetails;
909
- input: ComponentSelectionInput[];
910
- resolved?: CompositeSelectionData;
911
- add_ons?: AddOnDetails;
912
- } | {
913
- type: "digital";
914
- variant?: VariantDetails;
915
- add_ons?: AddOnDetails;
916
- digital_type?: string;
917
- fulfillment_id?: string;
918
- };
919
- interface Cart {
942
+ interface AddOnOption {
920
943
  id: string;
944
+ add_on_id: string;
921
945
  business_id: string;
922
- customer_id?: string;
923
- session_id?: string;
924
- location_id?: string;
946
+ name: string;
947
+ option_sku?: string;
948
+ default_price?: Money;
949
+ description?: string;
950
+ is_required: boolean;
951
+ is_mutually_exclusive: boolean;
925
952
  created_at: string;
926
953
  updated_at: string;
927
- expires_at: string;
928
- subtotal: Money;
929
- tax_amount: Money;
930
- service_charge: Money;
931
- total_discounts: Money;
932
- total_price: Money;
933
- total_items: number;
934
- tax_rate?: Money;
935
- service_charge_rate?: Money;
936
- price_info: ChosenPrice;
937
- applied_discount_ids: string[];
938
- applied_discount_codes: string[];
939
- discount_details?: DiscountDetails;
940
- currency: CurrencyCode;
941
- customer_name?: string;
942
- customer_email?: string;
943
- customer_phone?: string;
944
- customer_address?: string;
945
- source: string;
946
- status: CartStatus;
947
- channel: string;
948
- order_id?: string;
949
954
  metadata?: Record<string, unknown>;
950
- items: CartItem[];
951
955
  }
952
- interface CartItem {
956
+ interface AddOnOptionPrice {
953
957
  id: string;
954
- cart_id: string;
955
- item_id: string;
956
- quantity: number;
957
- line_key: string;
958
- configuration: LineConfiguration;
958
+ add_on_option_id: string;
959
+ location_id: string;
960
+ business_id: string;
959
961
  price: Money;
960
- add_ons_price: Money;
961
- price_info: ChosenPrice;
962
- applied_discount_ids: string[];
963
- item_discount_amount: Money;
964
- discount_details?: DiscountDetails;
965
962
  created_at: string;
966
963
  updated_at: string;
967
964
  metadata?: Record<string, unknown>;
968
965
  }
969
- interface CartTotals {
970
- subtotal: Money;
971
- tax_amount: Money;
972
- service_charge: Money;
973
- total_discounts: Money;
974
- total_price: Money;
975
- tax_rate?: Money;
976
- service_charge_rate?: Money;
977
- applied_discount_ids: string[];
978
- applied_discount_codes: string[];
979
- discount_details?: DiscountDetails;
966
+ interface ProductAddOn {
967
+ id: string;
968
+ business_id: string;
969
+ product_id: string;
970
+ add_on_id: string;
971
+ created_at: string;
972
+ updated_at: string;
973
+ metadata?: Record<string, unknown>;
980
974
  }
981
- interface DisplayCart {
975
+ interface Category {
982
976
  id: string;
983
977
  business_id: string;
984
- customer_id?: string;
985
- session_id?: string;
986
- location_id?: string;
987
- subtotal: Money;
988
- tax_amount: Money;
989
- service_charge: Money;
990
- total_discounts: Money;
991
- total_price: Money;
992
- total_items: number;
993
- tax_rate?: Money;
994
- service_charge_rate?: Money;
995
- currency: CurrencyCode;
996
- channel: string;
997
- status: string;
998
- business_name: string;
999
- business_logo?: string;
1000
- location_name?: string;
1001
- customer_name?: string;
1002
- customer_email?: string;
1003
- customer_phone?: string;
1004
- customer_address?: string;
1005
- items: DisplayCartItem[];
1006
- applied_discount_codes: string[];
1007
- discount_details?: DiscountDetails;
978
+ name: string;
979
+ slug: string;
980
+ description?: string;
981
+ product_count?: number;
982
+ created_at: string;
983
+ updated_at: string;
984
+ metadata?: Record<string, unknown>;
1008
985
  }
1009
- interface DisplayCartItem {
986
+ interface CategorySummary extends Category {
987
+ product_count: number;
988
+ }
989
+ interface Collection {
1010
990
  id: string;
1011
- cart_id: string;
1012
- item_id: string;
1013
- quantity: number;
991
+ business_id: string;
1014
992
  name: string;
993
+ slug: string;
1015
994
  description?: string;
995
+ tags?: string[];
1016
996
  image_url?: string;
1017
- category_name?: string;
1018
- is_available: boolean;
1019
- preparation_time?: number;
1020
- unit_price: Money;
1021
- total_price: Money;
1022
- add_ons_price: Money;
1023
- price_info: ChosenPrice;
1024
- item_discount_amount: Money;
1025
- discount_details?: DiscountDetails;
1026
- add_ons: DisplayAddOn[];
1027
- special_instructions?: string;
997
+ channels?: SalesChannel[];
998
+ product_count?: number;
999
+ created_at: string;
1000
+ updated_at: string;
1001
+ metadata?: Record<string, unknown>;
1028
1002
  }
1029
- interface DisplayAddOn {
1003
+ interface CollectionSummary extends Collection {
1004
+ product_count: number;
1005
+ }
1006
+ interface CollectionProduct {
1030
1007
  id: string;
1031
- name: string;
1032
- min_selections: number;
1033
- max_selections: number;
1034
- is_required: boolean;
1035
- selected_options: DisplayAddOnOption[];
1008
+ collection_id: string;
1009
+ product_id: string;
1010
+ display_order?: number;
1011
+ created_at: string;
1012
+ updated_at: string;
1013
+ metadata?: Record<string, unknown>;
1036
1014
  }
1037
- interface DisplayAddOnOption {
1015
+ type BundlePriceType = "fixed" | "percentage_discount" | "fixed_discount";
1016
+ interface Bundle {
1038
1017
  id: string;
1018
+ business_id: string;
1019
+ product_id: string;
1039
1020
  name: string;
1040
- price: Money;
1041
- quantity: number;
1042
- image_url?: string;
1021
+ slug: string;
1043
1022
  description?: string;
1023
+ image_url?: string;
1024
+ pricing_type: BundlePriceType;
1025
+ bundle_price?: Money;
1026
+ discount_value?: Money;
1027
+ product_count?: number;
1028
+ created_at: string;
1029
+ updated_at: string;
1030
+ metadata?: Record<string, unknown>;
1044
1031
  }
1045
- interface UICartBusiness {
1046
- name: string;
1047
- logo_url?: string;
1048
- contact_email?: string;
1049
- contact_phone?: string;
1032
+ interface BundleSummary extends Bundle {
1033
+ product_count: number;
1050
1034
  }
1051
- interface UICartLocation {
1052
- id?: string;
1053
- name?: string;
1035
+ interface BundleProduct {
1036
+ id: string;
1037
+ bundle_id: string;
1038
+ product_id: string;
1039
+ variant_id?: string;
1040
+ allow_variant_choice: boolean;
1041
+ quantity: number;
1042
+ created_at: string;
1043
+ updated_at: string;
1044
+ metadata?: Record<string, unknown>;
1054
1045
  }
1055
- interface UICartCustomer {
1056
- id?: string;
1057
- name?: string;
1058
- email?: string;
1059
- phone?: string;
1060
- address?: string;
1046
+ interface BundleWithDetails extends Bundle {
1047
+ product: Product;
1048
+ components: BundleComponentData[];
1049
+ schedules?: ProductTimeProfile[];
1050
+ availability?: Record<string, ProductAvailability>;
1061
1051
  }
1062
- interface UICartPricing {
1063
- subtotal: Money;
1064
- tax_amount: Money;
1065
- service_charge: Money;
1066
- total_discounts: Money;
1067
- total_price: Money;
1068
- tax_rate?: Money;
1069
- service_charge_rate?: Money;
1070
- currency: CurrencyCode;
1052
+ interface BundleComponentData {
1053
+ component: BundleProduct;
1054
+ product: Product;
1055
+ variants: ProductVariant[];
1056
+ variant_axes: VariantAxis[];
1057
+ variant_axis_values: VariantAxisValue[];
1058
+ product_variant_values: ProductVariantValue[];
1071
1059
  }
1072
- interface AddOnOptionDetails {
1060
+ interface BundleComponentInfo {
1061
+ id: string;
1062
+ product_id: string;
1063
+ variant_id?: string;
1064
+ quantity: number;
1065
+ }
1066
+ interface BundleComponentView {
1067
+ id: string;
1068
+ product_id: string;
1069
+ product_name: string;
1070
+ product_description?: string;
1071
+ product_image_url?: string;
1072
+ product_type?: ProductType;
1073
+ effective_price: Money;
1074
+ quantity: number;
1075
+ variant_id?: string;
1076
+ allow_variant_choice: boolean;
1077
+ available_variants: BundleComponentVariantView[];
1078
+ variant_axes?: VariantAxisView[];
1079
+ duration_minutes?: number;
1080
+ duration_unit?: DurationUnit;
1081
+ }
1082
+ interface BundleComponentVariantView {
1083
+ id: string;
1084
+ is_default: boolean;
1085
+ display_name: string;
1086
+ price_adjustment: Money;
1087
+ }
1088
+ interface VariantAxisView {
1073
1089
  id: string;
1074
1090
  name: string;
1075
- price?: Money;
1076
- is_required: boolean;
1091
+ values: VariantAxisValueView[];
1092
+ }
1093
+ interface VariantAxisValueView {
1094
+ id: string;
1095
+ value: string;
1096
+ }
1097
+ type CompositePricingMode = "additive" | "highest_per_group" | "highest_overall" | "tiered";
1098
+ type GroupPricingBehavior = "additive" | "first_n_free" | "flat_fee" | "highest_only";
1099
+ type ComponentSourceType = "product" | "stock" | "add_on" | "standalone";
1100
+ interface Composite {
1101
+ id: string;
1102
+ business_id: string;
1103
+ product_id: string;
1104
+ base_price: Money;
1105
+ pricing_mode: CompositePricingMode;
1106
+ min_order_quantity?: number;
1107
+ max_order_quantity?: number;
1108
+ created_at: string;
1109
+ updated_at: string;
1110
+ metadata?: Record<string, unknown>;
1111
+ }
1112
+ interface CompositeWithDetails extends Composite {
1113
+ product: Product;
1114
+ groups: ComponentGroupWithComponents[];
1115
+ }
1116
+ interface ComponentGroup {
1117
+ id: string;
1118
+ composite_id: string;
1119
+ name: string;
1077
1120
  description?: string;
1078
- image_url?: string;
1121
+ display_order: number;
1122
+ min_selections: number;
1123
+ max_selections?: number;
1124
+ allow_quantity: boolean;
1125
+ max_quantity_per_component?: number;
1126
+ pricing_behavior: GroupPricingBehavior;
1127
+ pricing_behavior_config?: Record<string, unknown>;
1128
+ icon?: string;
1129
+ color?: string;
1130
+ created_at: string;
1131
+ updated_at: string;
1079
1132
  }
1080
- interface AddOnGroupDetails {
1133
+ interface ComponentGroupWithComponents extends ComponentGroup {
1134
+ components: CompositeComponent[];
1135
+ }
1136
+ interface CompositeGroupView {
1081
1137
  id: string;
1082
1138
  name: string;
1083
- is_multiple_allowed: boolean;
1139
+ description?: string;
1084
1140
  min_selections: number;
1085
1141
  max_selections: number;
1086
- required: boolean;
1087
- options: AddOnOptionDetails[];
1142
+ allow_quantity: boolean;
1143
+ max_quantity_per_component?: number;
1144
+ display_order: number;
1145
+ components: CompositeComponentView[];
1088
1146
  }
1089
- interface VariantDetailsDTO {
1147
+ interface CompositeComponentView {
1090
1148
  id: string;
1091
- name: string;
1149
+ display_name?: string;
1150
+ display_description?: string;
1151
+ display_image_url?: string;
1092
1152
  price: Money;
1093
- price_adjustment: Money;
1094
- is_default: boolean;
1153
+ calories?: number;
1154
+ display_order: number;
1155
+ is_popular: boolean;
1156
+ is_premium: boolean;
1157
+ is_available: boolean;
1158
+ is_archived: boolean;
1159
+ product_type?: ProductType;
1160
+ source_type?: ComponentSourceType;
1095
1161
  }
1096
- interface CartItemDetails {
1162
+ interface CompositeComponent {
1097
1163
  id: string;
1098
- cart_id: string;
1099
- item_id: string;
1100
- quantity: number;
1101
- line_key: string;
1102
- line_type: "simple" | "service" | "bundle" | "composite" | "digital";
1103
- name: string;
1104
- description?: string;
1105
- image_url?: string;
1106
- category_id?: string;
1107
- category_name?: string;
1164
+ group_id: string;
1165
+ product_id?: string;
1166
+ variant_id?: string;
1167
+ stock_id?: string;
1168
+ add_on_id?: string;
1169
+ add_on_option_id?: string;
1170
+ display_name?: string;
1171
+ display_description?: string;
1172
+ display_image_url?: string;
1173
+ price: Money;
1174
+ price_per_additional?: Money;
1175
+ quantity_per_selection?: Money;
1176
+ waste_percentage?: Money;
1177
+ calories?: number;
1178
+ allergens?: string[];
1179
+ display_order: number;
1180
+ is_popular: boolean;
1181
+ is_premium: boolean;
1108
1182
  is_available: boolean;
1183
+ is_archived: boolean;
1184
+ created_at: string;
1185
+ updated_at: string;
1186
+ }
1187
+ interface ComponentSelectionInput {
1188
+ component_id: string;
1189
+ quantity: number;
1109
1190
  variant_id?: string;
1110
- variant_details?: VariantDetails;
1111
- variant_name?: string;
1112
- variant_info?: VariantDetailsDTO;
1113
- base_price: Money;
1114
- add_ons_price: Money;
1115
- total_price: Money;
1116
- item_discount_amount: Money;
1117
- price_info: ChosenPrice;
1118
- add_on_option_ids: string[];
1119
- add_on_ids: string[];
1120
- add_on_details: AddOnDetails;
1121
- add_on_options: AddOnOptionDetails[];
1122
- add_ons: AddOnGroupDetails[];
1123
- special_instructions?: string;
1191
+ add_on_option_id?: string;
1124
1192
  scheduled_start?: string;
1125
1193
  scheduled_end?: string;
1126
- confirmation_code?: string;
1127
- service_status?: string;
1128
- staff_id?: string;
1129
- scheduling_metadata?: Record<string, unknown>;
1130
- bundle_selections?: BundleSelectionInput[];
1131
- bundle_resolved?: BundleSelectionData;
1132
- composite_selections?: ComponentSelectionInput[];
1133
- composite_resolved?: CompositeSelectionData;
1134
- applied_discount_ids: string[];
1135
- discount_details?: DiscountDetails;
1194
+ }
1195
+ interface CompositePriceResult {
1196
+ base_price: Money;
1197
+ components_total: Money;
1198
+ tier_applied?: string;
1199
+ final_price: Money;
1200
+ breakdown: ComponentPriceBreakdown[];
1201
+ }
1202
+ interface ComponentPriceBreakdown {
1203
+ component_id: string;
1204
+ component_name: string;
1205
+ quantity: number;
1206
+ unit_price: Money;
1207
+ total_price: Money;
1208
+ group_id: string;
1209
+ source_type: ComponentSourceType;
1210
+ source_product_id?: string;
1211
+ source_stock_id?: string;
1212
+ }
1213
+ type PriceEntryType = "base" | "location" | "time" | "channel";
1214
+ interface Price {
1215
+ id: string;
1216
+ product_id: string;
1217
+ location_id: string;
1218
+ business_id: string;
1219
+ price: Money;
1220
+ entry_type: PriceEntryType;
1136
1221
  created_at: string;
1137
1222
  updated_at: string;
1138
1223
  metadata?: Record<string, unknown>;
1139
1224
  }
1140
- interface UICart {
1225
+ type LocationProductPrice = Price;
1226
+ interface ProductAvailability {
1141
1227
  id: string;
1142
1228
  business_id: string;
1143
- session_id?: string;
1144
- customer_id?: string;
1145
- location_id?: string;
1229
+ location_id: string;
1230
+ product_id: string;
1231
+ is_available: boolean;
1232
+ is_in_stock: boolean;
1146
1233
  created_at: string;
1147
1234
  updated_at: string;
1148
- expires_at: string;
1149
- status: string;
1150
- source: string;
1151
- channel: string;
1152
- business_details?: UICartBusiness;
1153
- location_details?: UICartLocation;
1154
- customer_info: UICartCustomer;
1155
- items: CartItemDetails[];
1156
- pricing: UICartPricing;
1157
1235
  metadata?: Record<string, unknown>;
1158
1236
  }
1159
- interface UICartResponse {
1160
- cart: UICart;
1161
- cart_count: number;
1162
- message?: string | null;
1237
+ interface ProductTimeProfile {
1238
+ id: string;
1239
+ business_id: string;
1240
+ product_id: string;
1241
+ day_of_week: number;
1242
+ start_time: string;
1243
+ end_time: string;
1244
+ created_at: string;
1245
+ updated_at: string;
1246
+ metadata?: Record<string, unknown>;
1163
1247
  }
1164
- interface AddToCartInput {
1165
- item_id: string;
1166
- quantity?: number;
1167
- variant_id?: string;
1168
- quote_id?: string;
1169
- add_on_options?: string[];
1170
- special_instructions?: string;
1171
- bundle_selections?: BundleSelectionInput[];
1172
- composite_selections?: ComponentSelectionInput[];
1173
- scheduled_start?: string;
1174
- scheduled_end?: string;
1175
- staff_id?: string;
1248
+ interface ProductTaxonomy {
1249
+ id: string;
1250
+ code: string;
1251
+ name: string;
1252
+ description?: string;
1253
+ parent_id?: string;
1254
+ level: number;
1255
+ is_active: boolean;
1256
+ created_at: string;
1257
+ updated_at: string;
1176
1258
  }
1177
- interface UpdateCartItemInput {
1178
- quantity?: number;
1179
- variant_id?: string;
1180
- add_on_options?: string[];
1181
- notes?: string;
1182
- bundle_selections?: BundleSelectionInput[];
1183
- composite_selections?: ComponentSelectionInput[];
1184
- scheduled_start?: string;
1185
- scheduled_end?: string;
1186
- staff_id?: string;
1259
+ interface TaxonomyWithChildren extends ProductTaxonomy {
1260
+ children: ProductTaxonomy[];
1187
1261
  }
1188
- interface CartSummary {
1189
- item_count: number;
1190
- total_items: number;
1191
- subtotal: Money;
1192
- discount_amount: Money;
1193
- tax_amount: Money;
1194
- total: Money;
1195
- currency: CurrencyCode;
1262
+ interface ProductAvailabilityNow {
1263
+ is_available: boolean;
1264
+ schedules_today: ProductTimeProfile[];
1265
+ }
1266
+ type DealBenefitType = "percentage" | "fixed" | "free_item" | "buy_x_get_y_free" | "points";
1267
+ interface Deal {
1268
+ id: string;
1269
+ description: string;
1270
+ benefit_type: DealBenefitType;
1271
+ value: Money;
1272
+ min_order_value?: Money;
1273
+ buy_quantity?: number;
1274
+ get_quantity?: number;
1275
+ stackable: boolean;
1276
+ starts_at: string;
1277
+ ends_at: string;
1278
+ product_ids: string[];
1279
+ category_ids: string[];
1280
+ collection_ids: string[];
1281
+ }
1282
+ interface ProductDealInfo {
1283
+ product_id: string;
1284
+ deal_id: string;
1285
+ deal_name: string;
1286
+ benefit_type: DealBenefitType;
1287
+ value: Money;
1288
+ label: string;
1289
+ }
1290
+ interface DiscountValidation {
1291
+ is_eligible: boolean;
1292
+ discount_amount?: Money;
1293
+ deal?: Deal;
1294
+ ineligibility_reason?: string;
1295
+ }
1296
+ interface Tag {
1297
+ id: string;
1298
+ name: string;
1299
+ slug: string;
1300
+ color?: string;
1301
+ icon?: string;
1302
+ description?: string;
1303
+ tag_group?: string;
1304
+ sort_order: number;
1305
+ usage_count: number;
1306
+ created_at: string;
1307
+ updated_at: string;
1308
+ }
1309
+ interface TagsResponse {
1310
+ items: Tag[];
1311
+ total: number;
1312
+ limit: number;
1313
+ offset: number;
1196
1314
  }
1197
1315
 
1198
- type PaymentStatus = "initialized" | "pending" | "processing" | "authorized" | "captured" | "failed" | "cancelled" | "refunded" | "unknown" | "voided" | "requires_action" | "abandoned" | "reversed" | "disputed" | "refund_pending" | "created" | "pending_confirmation" | "success" | "succeeded" | "declined" | "partially_refunded" | "partially_paid" | "paid" | "unpaid" | "requires_payment_method" | "requires_capture" | "completed" | "error";
1316
+ type PaymentStatus = "initialized" | "pending" | "processing" | "authorized" | "captured" | "failed" | "cancelled" | "refunded" | "unknown" | "voided" | "requires_action" | "abandoned" | "reversed" | "disputed" | "refund_pending";
1199
1317
  type PaymentProvider = "stripe" | "paystack" | "cellulant" | "mtnmomo" | "offline" | "mtn" | "vodafone" | "airtel" | "cash" | "manual";
1200
1318
  type PaymentMethodType = "card" | "bank_transfer" | "cash" | {
1201
1319
  mobile_money: {
@@ -1305,4 +1423,4 @@ interface SubmitAuthorizationInput {
1305
1423
  value: string;
1306
1424
  }
1307
1425
 
1308
- export { type Collection as $, type ApiError as A, type ProductVariant as B, type CurrencyCode as C, type DisplayMode as D, ErrorCode as E, type FacetValue as F, type VariantDisplayAttribute as G, type VariantAxis as H, type InventoryType as I, type VariantAxisWithValues as J, type VariantAxisValue as K, type ProductVariantValue as L, type Money as M, type VariantLocationAvailability as N, type VariantAxisSelection as O, type PaginationParams as P, type AddOn as Q, type AddOnWithOptions as R, type SalesChannel as S, type TaxonomyAttributeTemplate as T, type AddOnOption as U, type VariantStrategy as V, type AddOnOptionPrice as W, type ProductAddOn as X, type Category as Y, ZERO as Z, type CategorySummary as _, moneyFromNumber as a, type LineConfiguration as a$, type CollectionSummary as a0, type CollectionProduct as a1, type BundlePriceType as a2, type Bundle as a3, type BundleSummary as a4, type BundleProduct as a5, type BundleWithDetails as a6, type BundleComponentData as a7, type BundleComponentInfo as a8, type BundleComponentView as a9, type ProductDealInfo as aA, type DiscountValidation as aB, type Tag as aC, type TagsResponse as aD, type CartStatus as aE, type CartChannel as aF, type PriceSource as aG, type AdjustmentType as aH, type PriceAdjustment as aI, type TaxPathComponent as aJ, type PricePathTaxInfo as aK, type PriceDecisionPath as aL, type ChosenPrice as aM, type BenefitType as aN, type AppliedDiscount as aO, type DiscountBreakdown as aP, type DiscountDetails as aQ, type SelectedAddOnOption as aR, type AddOnDetails as aS, type CartAddOn as aT, type VariantDetails as aU, type BundleSelectionInput as aV, type BundleStoredSelection as aW, type BundleSelectionData as aX, type CompositeStoredSelection as aY, type CompositePriceBreakdown as aZ, type CompositeSelectionData as a_, type BundleComponentVariantView as aa, type VariantAxisView as ab, type VariantAxisValueView as ac, type CompositePricingMode as ad, type GroupPricingBehavior as ae, type ComponentSourceType as af, type Composite as ag, type CompositeWithDetails as ah, type ComponentGroup as ai, type ComponentGroupWithComponents as aj, type CompositeGroupView as ak, type CompositeComponentView as al, type CompositeComponent as am, type ComponentSelectionInput as an, type CompositePriceResult as ao, type ComponentPriceBreakdown as ap, type PriceEntryType as aq, type Price as ar, type LocationProductPrice as as, type ProductAvailability as at, type ProductTimeProfile as au, type ProductTaxonomy as av, type TaxonomyWithChildren as aw, type ProductAvailabilityNow as ax, type DealBenefitType as ay, type Deal as az, type Pagination as b, type Cart as b0, type CartItem as b1, type CartTotals as b2, type DisplayCart as b3, type DisplayCartItem as b4, type DisplayAddOn as b5, type DisplayAddOnOption as b6, type UICartBusiness as b7, type UICartLocation as b8, type UICartCustomer as b9, type UICartPricing as ba, type AddOnOptionDetails as bb, type AddOnGroupDetails as bc, type VariantDetailsDTO as bd, type CartItemDetails as be, type UICart as bf, type UICartResponse as bg, type AddToCartInput as bh, type UpdateCartItemInput as bi, type CartSummary as bj, type PaymentStatus as bk, type PaymentProvider as bl, type PaymentMethodType as bm, type AddressAuthorizationData as bn, type AuthorizationType as bo, type PaymentProcessingState as bp, type PaymentMethod as bq, type Payment as br, type InitializePaymentResult as bs, type PaymentResponse as bt, type PaymentStatusResponse as bu, type PaymentErrorDetails as bv, type SubmitAuthorizationInput as bw, currencyCode as c, type ErrorCodeType as d, type ErrorHint as e, ERROR_HINTS as f, CimplifyError as g, isCimplifyError as h, isSupportedCurrency as i, getErrorHint as j, enrichError as k, isRetryableError as l, money as m, type ProductType as n, type ProductRenderHint as o, type DigitalProductType as p, type DepositType as q, type AttributeType as r, type AttributeAppliesTo as s, type CustomAttributeDefinition as t, type CustomAttributeValue as u, type PropertySource as v, type ProductProperty as w, type PropertyFacet as x, type Product as y, type ProductWithDetails as z };
1426
+ export { type VariantAxisSelection as $, type ApiError as A, type PropertySource as B, type ChosenPrice as C, type DisplayMode as D, ErrorCode as E, type ProductProperty as F, type PropertyFacet as G, type FacetValue as H, type InventoryType as I, type Product as J, type KnowledgeArticle as K, type ProductWithDetails as L, type Money as M, type VariantView as N, type ProductVariant as O, type PaginationParams as P, type VariantDisplayAttribute as Q, type RelatedProductView as R, type SalesChannel as S, type TaxonomyAttributeTemplate as T, type VariantAxis as U, type VariantStrategy as V, type VariantAxisWithValues as W, type VariantAxisValue as X, type ProductVariantValue as Y, ZERO as Z, type VariantLocationAvailability as _, type CurrencyCode as a, type VariantDetails as a$, type AddOn as a0, type AddOnWithOptions as a1, type AddOnOption as a2, type AddOnOptionPrice as a3, type ProductAddOn as a4, type Category as a5, type CategorySummary as a6, type Collection as a7, type CollectionSummary as a8, type CollectionProduct as a9, type LocationProductPrice as aA, type ProductAvailability as aB, type ProductTimeProfile as aC, type ProductTaxonomy as aD, type TaxonomyWithChildren as aE, type ProductAvailabilityNow as aF, type DealBenefitType as aG, type Deal as aH, type ProductDealInfo as aI, type DiscountValidation as aJ, type Tag as aK, type TagsResponse as aL, type CartStatus as aM, type CartChannel as aN, type PriceSource as aO, type AdjustmentType as aP, type PriceAdjustment as aQ, type TaxPathComponent as aR, type PricePathTaxInfo as aS, type PriceDecisionPath as aT, type BenefitType as aU, type AppliedDiscount as aV, type DiscountBreakdown as aW, type DiscountDetails as aX, type SelectedAddOnOption as aY, type AddOnDetails as aZ, type CartAddOn as a_, type BundlePriceType as aa, type Bundle as ab, type BundleSummary as ac, type BundleProduct as ad, type BundleWithDetails as ae, type BundleComponentData as af, type BundleComponentInfo as ag, type BundleComponentView as ah, type BundleComponentVariantView as ai, type VariantAxisView as aj, type VariantAxisValueView as ak, type CompositePricingMode as al, type GroupPricingBehavior as am, type ComponentSourceType as an, type Composite as ao, type CompositeWithDetails as ap, type ComponentGroup as aq, type ComponentGroupWithComponents as ar, type CompositeGroupView as as, type CompositeComponentView as at, type CompositeComponent as au, type ComponentSelectionInput as av, type CompositePriceResult as aw, type ComponentPriceBreakdown as ax, type PriceEntryType as ay, type Price as az, moneyFromNumber as b, type BundleSelectionInput as b0, type ComponentSchedulingData as b1, type BundleStoredSelection as b2, type BundleSelectionData as b3, type CompositeStoredSelection as b4, type CompositePriceBreakdown as b5, type CompositeSelectionData as b6, type LineConfiguration as b7, type Cart as b8, type CartItem as b9, type InitializePaymentResult as bA, type PaymentResponse as bB, type PaymentStatusResponse as bC, type PaymentErrorDetails as bD, type SubmitAuthorizationInput as bE, type BillingFrequency as bF, type BillingPlanType as bG, type BillingMarkupType as bH, type ProductBillingPlan as bI, type EligiblePlansQuery as bJ, type FormattedPlanOption as bK, type CartTotals as ba, type DisplayCart as bb, type DisplayCartItem as bc, type DisplayAddOn as bd, type DisplayAddOnOption as be, type UICartBusiness as bf, type UICartLocation as bg, type UICartCustomer as bh, type UICartPricing as bi, type AddOnOptionDetails as bj, type AddOnGroupDetails as bk, type VariantDetailsDTO as bl, type CartItemDetails as bm, type UICart as bn, type UICartResponse as bo, type AddToCartInput as bp, type UpdateCartItemInput as bq, type CartSummary as br, type PaymentStatus as bs, type PaymentProvider as bt, type PaymentMethodType as bu, type AddressAuthorizationData as bv, type AuthorizationType as bw, type PaymentProcessingState as bx, type PaymentMethod as by, type Payment as bz, currencyCode as c, type Pagination as d, type ErrorCodeType as e, type ErrorHint as f, ERROR_HINTS as g, CimplifyError as h, isSupportedCurrency as i, isCimplifyError as j, getErrorHint as k, enrichError as l, money as m, isRetryableError as n, type ProductType as o, type ProductRenderHint as p, type DigitalProductType as q, type DepositType as r, type DurationUnit as s, type AttributeType as t, type AttributeAppliesTo as u, type AttributeVisibility as v, type MeasurementValue as w, type AttributeValidationRules as x, type CustomAttributeDefinition as y, type CustomAttributeValue as z };