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