@cimplify/sdk 0.85.0 → 0.87.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 +22 -22
- package/dist/advanced.mjs +3 -3
- package/dist/{chunk-XA3ZNR75.js → chunk-AETVRBKI.js} +1 -1
- package/dist/{chunk-GIFVSWYJ.mjs → chunk-APBLFZ2I.mjs} +5 -5
- package/dist/{chunk-HPN5R3K2.js → chunk-FWEF2DHR.js} +80 -28
- package/dist/{chunk-DU4IX2I2.mjs → chunk-J7JDCPNW.mjs} +2 -2
- package/dist/{chunk-AMZXALF6.mjs → chunk-K5EN2W2Q.mjs} +1 -1
- package/dist/{chunk-TD3AY34U.mjs → chunk-KFLGQGMC.mjs} +3 -3
- package/dist/{chunk-E6T5VJMG.mjs → chunk-OZDDHSIB.mjs} +9 -1
- package/dist/{chunk-GFM5JW45.js → chunk-P3352VXA.js} +62 -62
- package/dist/{chunk-7Y2O3E4D.js → chunk-PTPOQVXS.js} +5 -5
- package/dist/{chunk-A6J7W6DH.js → chunk-PWDX5N2M.js} +4 -4
- package/dist/{chunk-NWUEWUX2.mjs → chunk-RCGSHS2Q.mjs} +2 -2
- package/dist/{chunk-NWTCBGJ2.js → chunk-ROBTTS3Q.js} +7 -7
- package/dist/{chunk-IQLJJW2H.js → chunk-T7Z25EY4.js} +9 -0
- package/dist/{chunk-7BM56JET.mjs → chunk-U57TYZLD.mjs} +60 -8
- package/dist/{client-WKKxIiF1.d.ts → client-BIt37FjS.d.mts} +541 -542
- package/dist/{client-BEhIE0Dm.d.mts → client-BMOdyC1F.d.mts} +2 -2
- package/dist/{client-BT5gaiGR.d.ts → client-BvWtk822.d.ts} +2 -2
- package/dist/{client-DLtwQ-jI.d.mts → client-Dfl6WY2F.d.ts} +541 -542
- package/dist/{index-DZz6hdrT.d.mts → index-BxOJ3BLn.d.mts} +3 -3
- package/dist/{index-BrC1x2kK.d.ts → index-DW6JifS1.d.ts} +3 -3
- package/dist/index.d.mts +6 -6
- package/dist/index.d.ts +6 -6
- package/dist/index.js +133 -129
- package/dist/index.mjs +6 -6
- package/dist/mock/cli.mjs +5 -5
- package/dist/mock/library.js +5 -5
- package/dist/mock/library.mjs +5 -5
- package/dist/mock/msw.js +5 -5
- package/dist/mock/msw.mjs +5 -5
- package/dist/{payment-D1f3ZQPC.d.ts → payment-CLp__KpE.d.mts} +3 -3
- package/dist/{payment-Dh-6cRcV.d.mts → payment-DJrvivO_.d.ts} +3 -3
- package/dist/{price-CQdOJoX-.d.ts → price-B7_UzClY.d.ts} +1 -1
- package/dist/{price-4T7dlhxM.d.mts → price-Ddk8Vr8z.d.mts} +1 -1
- package/dist/product-C0Lr81ze.d.mts +5439 -0
- package/dist/product-C0Lr81ze.d.ts +5439 -0
- package/dist/react.d.mts +24 -7
- package/dist/react.d.ts +24 -7
- package/dist/react.js +224 -186
- package/dist/react.mjs +57 -22
- package/dist/{server-DjK98UW-.d.mts → server-0TnEJt8U.d.mts} +2 -2
- package/dist/{server-DvThXldo.d.ts → server-P2G43ENi.d.ts} +2 -2
- package/dist/server.d.mts +4 -4
- package/dist/server.d.ts +4 -4
- package/dist/server.js +10 -10
- package/dist/server.mjs +4 -4
- package/dist/styles.css +1 -1
- package/dist/testing/msw.d.mts +2 -2
- package/dist/testing/msw.d.ts +2 -2
- package/dist/testing/msw.js +3 -3
- package/dist/testing/msw.mjs +2 -2
- package/dist/testing/suite.d.mts +6 -6
- package/dist/testing/suite.d.ts +6 -6
- package/dist/testing/suite.js +25 -25
- package/dist/testing/suite.mjs +6 -6
- package/dist/testing.d.mts +5 -5
- package/dist/testing.d.ts +5 -5
- package/dist/testing.js +81 -81
- package/dist/testing.mjs +7 -7
- package/dist/utils.d.mts +4 -4
- package/dist/utils.d.ts +4 -4
- package/dist/utils.js +29 -29
- package/dist/utils.mjs +2 -2
- package/package.json +5 -2
- package/registry/currency-selector.json +1 -1
- package/registry/digital-product-card.json +1 -1
- package/registry/digital-product-layout.json +1 -1
- package/registry/product-card.json +1 -1
- package/dist/product-RJMIdCAf.d.mts +0 -1582
- package/dist/product-RJMIdCAf.d.ts +0 -1582
|
@@ -1,1582 +0,0 @@
|
|
|
1
|
-
declare const __money: unique symbol;
|
|
2
|
-
type Money = (string | number) & {
|
|
3
|
-
readonly [__money]: true;
|
|
4
|
-
};
|
|
5
|
-
declare function money(value: string | number): Money;
|
|
6
|
-
declare function moneyFromNumber(value: number): Money;
|
|
7
|
-
declare const ZERO: Money;
|
|
8
|
-
type CurrencyCode = "USD" | "EUR" | "GBP" | "JPY" | "CNY" | "CHF" | "CAD" | "AUD" | "GHS" | "NGN" | "KES" | "ZAR" | "XOF" | "XAF" | "EGP" | "TZS" | "UGX" | "RWF" | "ETB" | "ZMW" | "BWP" | "MUR" | "NAD" | "MWK" | "AOA" | "CDF" | "GMD" | "GNF" | "LRD" | "SLL" | "MZN" | "BIF" | "INR" | "BRL" | "MXN" | "KRW" | "TRY" | "THB" | "MYR" | "PHP" | "IDR" | "VND" | "SGD" | "HKD" | "TWD" | "AED" | "SAR" | "ILS";
|
|
9
|
-
declare function isSupportedCurrency(code: string): code is CurrencyCode;
|
|
10
|
-
declare function currencyCode(value: string): CurrencyCode;
|
|
11
|
-
interface PaginationParams {
|
|
12
|
-
page?: number;
|
|
13
|
-
limit?: number;
|
|
14
|
-
offset?: number;
|
|
15
|
-
}
|
|
16
|
-
interface Pagination {
|
|
17
|
-
total_count: number;
|
|
18
|
-
current_page: number;
|
|
19
|
-
page_size: number;
|
|
20
|
-
total_pages: number;
|
|
21
|
-
has_more: boolean;
|
|
22
|
-
next_cursor?: string;
|
|
23
|
-
}
|
|
24
|
-
declare const ErrorCode: {
|
|
25
|
-
readonly UNKNOWN_ERROR: "UNKNOWN_ERROR";
|
|
26
|
-
readonly NETWORK_ERROR: "NETWORK_ERROR";
|
|
27
|
-
readonly TIMEOUT: "TIMEOUT";
|
|
28
|
-
readonly UNAUTHORIZED: "UNAUTHORIZED";
|
|
29
|
-
readonly FORBIDDEN: "FORBIDDEN";
|
|
30
|
-
readonly NOT_FOUND: "NOT_FOUND";
|
|
31
|
-
readonly VALIDATION_ERROR: "VALIDATION_ERROR";
|
|
32
|
-
readonly CART_EMPTY: "CART_EMPTY";
|
|
33
|
-
readonly CART_EXPIRED: "CART_EXPIRED";
|
|
34
|
-
readonly CART_NOT_FOUND: "CART_NOT_FOUND";
|
|
35
|
-
readonly ITEM_UNAVAILABLE: "ITEM_UNAVAILABLE";
|
|
36
|
-
readonly VARIANT_NOT_FOUND: "VARIANT_NOT_FOUND";
|
|
37
|
-
readonly VARIANT_OUT_OF_STOCK: "VARIANT_OUT_OF_STOCK";
|
|
38
|
-
readonly ADDON_REQUIRED: "ADDON_REQUIRED";
|
|
39
|
-
readonly ADDON_MAX_EXCEEDED: "ADDON_MAX_EXCEEDED";
|
|
40
|
-
readonly CHECKOUT_VALIDATION_FAILED: "CHECKOUT_VALIDATION_FAILED";
|
|
41
|
-
readonly DELIVERY_ADDRESS_REQUIRED: "DELIVERY_ADDRESS_REQUIRED";
|
|
42
|
-
readonly CUSTOMER_INFO_REQUIRED: "CUSTOMER_INFO_REQUIRED";
|
|
43
|
-
readonly QUOTE_NOT_FOUND: "QUOTE_NOT_FOUND";
|
|
44
|
-
readonly QUOTE_EXPIRED: "QUOTE_EXPIRED";
|
|
45
|
-
readonly QUOTE_CONSUMED: "QUOTE_CONSUMED";
|
|
46
|
-
readonly QUOTE_STORAGE_UNAVAILABLE: "QUOTE_STORAGE_UNAVAILABLE";
|
|
47
|
-
readonly QUOTE_VALIDATION_FAILED: "QUOTE_VALIDATION_FAILED";
|
|
48
|
-
readonly PRICE_CHANGED: "PRICE_CHANGED";
|
|
49
|
-
readonly PAYMENT_FAILED: "PAYMENT_FAILED";
|
|
50
|
-
readonly PAYMENT_CANCELLED: "PAYMENT_CANCELLED";
|
|
51
|
-
readonly INSUFFICIENT_FUNDS: "INSUFFICIENT_FUNDS";
|
|
52
|
-
readonly CARD_DECLINED: "CARD_DECLINED";
|
|
53
|
-
readonly INVALID_OTP: "INVALID_OTP";
|
|
54
|
-
readonly OTP_EXPIRED: "OTP_EXPIRED";
|
|
55
|
-
readonly AUTHORIZATION_FAILED: "AUTHORIZATION_FAILED";
|
|
56
|
-
readonly PAYMENT_ACTION_NOT_COMPLETED: "PAYMENT_ACTION_NOT_COMPLETED";
|
|
57
|
-
readonly SLOT_UNAVAILABLE: "SLOT_UNAVAILABLE";
|
|
58
|
-
readonly BOOKING_CONFLICT: "BOOKING_CONFLICT";
|
|
59
|
-
readonly SERVICE_NOT_FOUND: "SERVICE_NOT_FOUND";
|
|
60
|
-
readonly OUT_OF_STOCK: "OUT_OF_STOCK";
|
|
61
|
-
readonly INSUFFICIENT_QUANTITY: "INSUFFICIENT_QUANTITY";
|
|
62
|
-
};
|
|
63
|
-
type ErrorCodeType = (typeof ErrorCode)[keyof typeof ErrorCode];
|
|
64
|
-
interface ApiError {
|
|
65
|
-
code: string;
|
|
66
|
-
message: string;
|
|
67
|
-
retryable: boolean;
|
|
68
|
-
}
|
|
69
|
-
interface ErrorHint {
|
|
70
|
-
docs_url: string;
|
|
71
|
-
suggestion: string;
|
|
72
|
-
}
|
|
73
|
-
declare const ERROR_HINTS: Record<string, ErrorHint>;
|
|
74
|
-
declare class CimplifyError extends Error {
|
|
75
|
-
code: string;
|
|
76
|
-
retryable: boolean;
|
|
77
|
-
docs_url?: string | undefined;
|
|
78
|
-
suggestion?: string | undefined;
|
|
79
|
-
constructor(code: string, message: string, retryable?: boolean, docs_url?: string | undefined, suggestion?: string | undefined);
|
|
80
|
-
get userMessage(): string;
|
|
81
|
-
}
|
|
82
|
-
declare class IdempotencyMismatchError extends CimplifyError {
|
|
83
|
-
originalCreatedAt: string;
|
|
84
|
-
constructor(message: string, originalCreatedAt: string);
|
|
85
|
-
}
|
|
86
|
-
declare function isCimplifyError(error: unknown): error is CimplifyError;
|
|
87
|
-
/**
|
|
88
|
-
* True for any quote-class error: cache miss, expiry, consumption, validation
|
|
89
|
-
* mismatch, or a price change since the quote was locked. Use this to route
|
|
90
|
-
* checkout failures into a quote-refresh + user-consent UX path.
|
|
91
|
-
*/
|
|
92
|
-
declare function isQuoteError(error: unknown): boolean;
|
|
93
|
-
/**
|
|
94
|
-
* True for the quote errors where re-quoting + asking the shopper to confirm
|
|
95
|
-
* is the correct next step — there is real disagreement between the cart and
|
|
96
|
-
* the locked quote (different cart contents or a price change). Cache-miss
|
|
97
|
-
* errors are now self-healed at the backend and never surface here.
|
|
98
|
-
*/
|
|
99
|
-
declare function isQuoteConflictRequiringConsent(error: unknown): boolean;
|
|
100
|
-
declare function isIdempotencyMismatchError(error: unknown): error is IdempotencyMismatchError;
|
|
101
|
-
declare function getErrorHint(code: string): ErrorHint | undefined;
|
|
102
|
-
declare function enrichError(error: CimplifyError, options?: {
|
|
103
|
-
isTestMode?: boolean;
|
|
104
|
-
}): CimplifyError;
|
|
105
|
-
declare function isRetryableError(error: unknown): boolean;
|
|
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
|
-
variant: string;
|
|
113
|
-
} | {
|
|
114
|
-
composite: string;
|
|
115
|
-
} | {
|
|
116
|
-
bundle: string;
|
|
117
|
-
};
|
|
118
|
-
type AdjustmentType = "time_based" | {
|
|
119
|
-
location_based: string;
|
|
120
|
-
} | {
|
|
121
|
-
variant_based: string;
|
|
122
|
-
} | {
|
|
123
|
-
customer_segment: string;
|
|
124
|
-
} | {
|
|
125
|
-
customer_loyalty: string;
|
|
126
|
-
} | {
|
|
127
|
-
channel_markup: string;
|
|
128
|
-
} | {
|
|
129
|
-
discount: string;
|
|
130
|
-
} | {
|
|
131
|
-
bundle: string;
|
|
132
|
-
} | {
|
|
133
|
-
manual: string;
|
|
134
|
-
} | {
|
|
135
|
-
time_limited_promotion: {
|
|
136
|
-
promotion_id: string;
|
|
137
|
-
valid_until: string;
|
|
138
|
-
};
|
|
139
|
-
};
|
|
140
|
-
interface PriceAdjustment {
|
|
141
|
-
adjustment_type: AdjustmentType;
|
|
142
|
-
amount: Money;
|
|
143
|
-
percentage?: Money;
|
|
144
|
-
reason: string;
|
|
145
|
-
applied_at: string;
|
|
146
|
-
}
|
|
147
|
-
interface TaxPathComponent {
|
|
148
|
-
name: string;
|
|
149
|
-
rate: Money;
|
|
150
|
-
}
|
|
151
|
-
interface PricePathTaxInfo {
|
|
152
|
-
tax_rate: Money;
|
|
153
|
-
tax_amount: Money;
|
|
154
|
-
is_inclusive: boolean;
|
|
155
|
-
components: TaxPathComponent[];
|
|
156
|
-
}
|
|
157
|
-
interface PriceDecisionPath {
|
|
158
|
-
base_price_source: PriceSource;
|
|
159
|
-
adjustments: PriceAdjustment[];
|
|
160
|
-
context?: Record<string, unknown>;
|
|
161
|
-
}
|
|
162
|
-
interface ChosenPrice {
|
|
163
|
-
base_price: Money;
|
|
164
|
-
final_price: Money;
|
|
165
|
-
markup_percentage: Money;
|
|
166
|
-
markup_amount: Money;
|
|
167
|
-
markup_discount_percentage: Money;
|
|
168
|
-
markup_discount_amount: Money;
|
|
169
|
-
currency?: CurrencyCode;
|
|
170
|
-
custom_fields?: Record<string, unknown>;
|
|
171
|
-
decision_path?: PriceDecisionPath;
|
|
172
|
-
tax_info?: PricePathTaxInfo;
|
|
173
|
-
pre_tax_price?: Money;
|
|
174
|
-
}
|
|
175
|
-
type BenefitType = "percentage" | "fixed" | "points" | "free_item" | "buy_x_get_y_free";
|
|
176
|
-
interface AppliedDiscount {
|
|
177
|
-
discount_id: string;
|
|
178
|
-
discount_code?: string;
|
|
179
|
-
discount_type: BenefitType;
|
|
180
|
-
discount_value: Money;
|
|
181
|
-
discount_amount: Money;
|
|
182
|
-
applied_at: string;
|
|
183
|
-
targeted_item_ids?: string[];
|
|
184
|
-
}
|
|
185
|
-
interface DiscountBreakdown {
|
|
186
|
-
item_discounts: Record<string, AppliedDiscount[]>;
|
|
187
|
-
order_discounts: AppliedDiscount[];
|
|
188
|
-
}
|
|
189
|
-
interface DiscountDetails {
|
|
190
|
-
discounts: AppliedDiscount[];
|
|
191
|
-
total_discount_amount: Money;
|
|
192
|
-
breakdown: DiscountBreakdown;
|
|
193
|
-
}
|
|
194
|
-
interface SelectedAddOnOption {
|
|
195
|
-
option_id: string;
|
|
196
|
-
add_on_id: string;
|
|
197
|
-
name: string;
|
|
198
|
-
price: Money;
|
|
199
|
-
quantity: number;
|
|
200
|
-
is_required: boolean;
|
|
201
|
-
selected_at: string;
|
|
202
|
-
price_info?: ChosenPrice;
|
|
203
|
-
}
|
|
204
|
-
interface AddOnDetails {
|
|
205
|
-
selected_options: SelectedAddOnOption[];
|
|
206
|
-
total_add_on_price: Money;
|
|
207
|
-
add_ons: CartAddOn[];
|
|
208
|
-
}
|
|
209
|
-
interface CartAddOn {
|
|
210
|
-
add_on_id: string;
|
|
211
|
-
name: string;
|
|
212
|
-
min_selections: number;
|
|
213
|
-
max_selections: number;
|
|
214
|
-
selected_options: string[];
|
|
215
|
-
is_required: boolean;
|
|
216
|
-
}
|
|
217
|
-
interface VariantDetails {
|
|
218
|
-
variant_id: string;
|
|
219
|
-
sku?: string;
|
|
220
|
-
properties: Record<string, string>;
|
|
221
|
-
}
|
|
222
|
-
interface BundleSelectionInput {
|
|
223
|
-
component_id: string;
|
|
224
|
-
variant_id?: string;
|
|
225
|
-
quantity: number;
|
|
226
|
-
scheduled_start?: string;
|
|
227
|
-
scheduled_end?: string;
|
|
228
|
-
}
|
|
229
|
-
interface ComponentSchedulingData {
|
|
230
|
-
scheduled_start?: string;
|
|
231
|
-
scheduled_end?: string;
|
|
232
|
-
service_status: string;
|
|
233
|
-
confirmation_code?: string;
|
|
234
|
-
booking_id?: string;
|
|
235
|
-
primary_resource_id?: string;
|
|
236
|
-
}
|
|
237
|
-
interface BundleStoredSelection {
|
|
238
|
-
component_id: string;
|
|
239
|
-
product_id: string;
|
|
240
|
-
product_name: string;
|
|
241
|
-
variant_id?: string;
|
|
242
|
-
variant_name?: string;
|
|
243
|
-
quantity: number;
|
|
244
|
-
unit_price: Money;
|
|
245
|
-
product_type?: ProductType;
|
|
246
|
-
scheduling?: ComponentSchedulingData;
|
|
247
|
-
}
|
|
248
|
-
interface BundleSelectionData {
|
|
249
|
-
bundle_id: string;
|
|
250
|
-
selections: BundleStoredSelection[];
|
|
251
|
-
}
|
|
252
|
-
interface CompositeStoredSelection {
|
|
253
|
-
component_id: string;
|
|
254
|
-
component_name: string;
|
|
255
|
-
quantity: number;
|
|
256
|
-
group_id: string;
|
|
257
|
-
source_type: "product" | "stock" | "add_on" | "standalone";
|
|
258
|
-
source_product_id?: string;
|
|
259
|
-
source_stock_id?: string;
|
|
260
|
-
unit_price: Money;
|
|
261
|
-
product_type?: ProductType;
|
|
262
|
-
scheduling?: ComponentSchedulingData;
|
|
263
|
-
}
|
|
264
|
-
interface CompositePriceBreakdown {
|
|
265
|
-
base_price: Money;
|
|
266
|
-
components_total: Money;
|
|
267
|
-
tier_applied?: string;
|
|
268
|
-
final_price: Money;
|
|
269
|
-
}
|
|
270
|
-
interface CompositeSelectionData {
|
|
271
|
-
composite_id: string;
|
|
272
|
-
selections: CompositeStoredSelection[];
|
|
273
|
-
breakdown: CompositePriceBreakdown;
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
type LineConfiguration = {
|
|
277
|
-
type: "simple";
|
|
278
|
-
variant?: VariantDetails;
|
|
279
|
-
add_ons?: AddOnDetails;
|
|
280
|
-
customer_inputs?: CustomerInputValue[];
|
|
281
|
-
} | {
|
|
282
|
-
type: "service";
|
|
283
|
-
variant?: VariantDetails;
|
|
284
|
-
add_ons?: AddOnDetails;
|
|
285
|
-
customer_inputs?: CustomerInputValue[];
|
|
286
|
-
scheduled_start?: string;
|
|
287
|
-
scheduled_end?: string;
|
|
288
|
-
confirmation_code?: string;
|
|
289
|
-
service_status?: string;
|
|
290
|
-
primary_staff_id?: string;
|
|
291
|
-
primary_resource_id?: string;
|
|
292
|
-
scheduling_metadata?: Record<string, unknown>;
|
|
293
|
-
} | {
|
|
294
|
-
type: "bundle";
|
|
295
|
-
variant?: VariantDetails;
|
|
296
|
-
input: BundleSelectionInput[];
|
|
297
|
-
resolved?: BundleSelectionData;
|
|
298
|
-
add_ons?: AddOnDetails;
|
|
299
|
-
customer_inputs?: CustomerInputValue[];
|
|
300
|
-
} | {
|
|
301
|
-
type: "composite";
|
|
302
|
-
variant?: VariantDetails;
|
|
303
|
-
input: ComponentSelectionInput[];
|
|
304
|
-
resolved?: CompositeSelectionData;
|
|
305
|
-
add_ons?: AddOnDetails;
|
|
306
|
-
customer_inputs?: CustomerInputValue[];
|
|
307
|
-
} | {
|
|
308
|
-
type: "digital";
|
|
309
|
-
variant?: VariantDetails;
|
|
310
|
-
add_ons?: AddOnDetails;
|
|
311
|
-
customer_inputs?: CustomerInputValue[];
|
|
312
|
-
digital_type?: string;
|
|
313
|
-
fulfillment_id?: string;
|
|
314
|
-
};
|
|
315
|
-
interface Cart {
|
|
316
|
-
id: string;
|
|
317
|
-
business_id: string;
|
|
318
|
-
customer_id?: string;
|
|
319
|
-
session_id?: string;
|
|
320
|
-
location_id?: string;
|
|
321
|
-
created_at: string;
|
|
322
|
-
updated_at: string;
|
|
323
|
-
expires_at: string;
|
|
324
|
-
subtotal: Money;
|
|
325
|
-
tax_amount: Money;
|
|
326
|
-
service_charge: Money;
|
|
327
|
-
total_discounts: Money;
|
|
328
|
-
total_price: Money;
|
|
329
|
-
delivery_fee: Money;
|
|
330
|
-
total_items: number;
|
|
331
|
-
tax_rate?: Money;
|
|
332
|
-
service_charge_rate?: Money;
|
|
333
|
-
price_info: ChosenPrice;
|
|
334
|
-
applied_discount_ids: string[];
|
|
335
|
-
applied_discount_codes: string[];
|
|
336
|
-
discount_details?: DiscountDetails;
|
|
337
|
-
currency: CurrencyCode;
|
|
338
|
-
customer_name?: string;
|
|
339
|
-
customer_email?: string;
|
|
340
|
-
customer_phone?: string;
|
|
341
|
-
customer_address?: string;
|
|
342
|
-
source: string;
|
|
343
|
-
status: CartStatus;
|
|
344
|
-
channel: string;
|
|
345
|
-
order_id?: string;
|
|
346
|
-
metadata?: Record<string, unknown>;
|
|
347
|
-
items: CartItem[];
|
|
348
|
-
}
|
|
349
|
-
interface CartItem {
|
|
350
|
-
id: string;
|
|
351
|
-
cart_id: string;
|
|
352
|
-
item_id: string;
|
|
353
|
-
quantity: number;
|
|
354
|
-
line_key: string;
|
|
355
|
-
configuration: LineConfiguration;
|
|
356
|
-
price: Money;
|
|
357
|
-
add_ons_price: Money;
|
|
358
|
-
price_info: ChosenPrice;
|
|
359
|
-
applied_discount_ids: string[];
|
|
360
|
-
item_discount_amount: Money;
|
|
361
|
-
discount_details?: DiscountDetails;
|
|
362
|
-
created_at: string;
|
|
363
|
-
updated_at: string;
|
|
364
|
-
metadata?: Record<string, unknown>;
|
|
365
|
-
}
|
|
366
|
-
interface CartTotals {
|
|
367
|
-
subtotal: Money;
|
|
368
|
-
tax_amount: Money;
|
|
369
|
-
service_charge: Money;
|
|
370
|
-
total_discounts: Money;
|
|
371
|
-
total_price: Money;
|
|
372
|
-
tax_rate?: Money;
|
|
373
|
-
service_charge_rate?: Money;
|
|
374
|
-
applied_discount_ids: string[];
|
|
375
|
-
applied_discount_codes: string[];
|
|
376
|
-
discount_details?: DiscountDetails;
|
|
377
|
-
}
|
|
378
|
-
interface DisplayCart {
|
|
379
|
-
id: string;
|
|
380
|
-
business_id: string;
|
|
381
|
-
customer_id?: string;
|
|
382
|
-
session_id?: string;
|
|
383
|
-
location_id?: string;
|
|
384
|
-
subtotal: Money;
|
|
385
|
-
tax_amount: Money;
|
|
386
|
-
service_charge: Money;
|
|
387
|
-
total_discounts: Money;
|
|
388
|
-
total_price: Money;
|
|
389
|
-
delivery_fee: Money;
|
|
390
|
-
total_items: number;
|
|
391
|
-
tax_rate?: Money;
|
|
392
|
-
service_charge_rate?: Money;
|
|
393
|
-
currency: CurrencyCode;
|
|
394
|
-
channel: string;
|
|
395
|
-
status: string;
|
|
396
|
-
business_name: string;
|
|
397
|
-
business_logo?: string;
|
|
398
|
-
location_name?: string;
|
|
399
|
-
customer_name?: string;
|
|
400
|
-
customer_email?: string;
|
|
401
|
-
customer_phone?: string;
|
|
402
|
-
customer_address?: string;
|
|
403
|
-
items: DisplayCartItem[];
|
|
404
|
-
applied_discount_codes: string[];
|
|
405
|
-
discount_details?: DiscountDetails;
|
|
406
|
-
}
|
|
407
|
-
interface DisplayCartItem {
|
|
408
|
-
id: string;
|
|
409
|
-
cart_id: string;
|
|
410
|
-
item_id: string;
|
|
411
|
-
quantity: number;
|
|
412
|
-
name: string;
|
|
413
|
-
description?: string;
|
|
414
|
-
image_url?: string;
|
|
415
|
-
category_name?: string;
|
|
416
|
-
is_available: boolean;
|
|
417
|
-
preparation_time?: number;
|
|
418
|
-
unit_price: Money;
|
|
419
|
-
total_price: Money;
|
|
420
|
-
add_ons_price: Money;
|
|
421
|
-
price_info: ChosenPrice;
|
|
422
|
-
item_discount_amount: Money;
|
|
423
|
-
discount_details?: DiscountDetails;
|
|
424
|
-
add_ons: DisplayAddOn[];
|
|
425
|
-
special_instructions?: string;
|
|
426
|
-
}
|
|
427
|
-
interface DisplayAddOn {
|
|
428
|
-
id: string;
|
|
429
|
-
name: string;
|
|
430
|
-
min_selections: number;
|
|
431
|
-
max_selections: number;
|
|
432
|
-
is_required: boolean;
|
|
433
|
-
selected_options: DisplayAddOnOption[];
|
|
434
|
-
}
|
|
435
|
-
interface DisplayAddOnOption {
|
|
436
|
-
id: string;
|
|
437
|
-
name: string;
|
|
438
|
-
price: Money;
|
|
439
|
-
quantity: number;
|
|
440
|
-
image_url?: string;
|
|
441
|
-
description?: string;
|
|
442
|
-
}
|
|
443
|
-
interface UICartBusiness {
|
|
444
|
-
name: string;
|
|
445
|
-
logo_url?: string;
|
|
446
|
-
contact_email?: string;
|
|
447
|
-
contact_phone?: string;
|
|
448
|
-
}
|
|
449
|
-
interface UICartLocation {
|
|
450
|
-
id?: string;
|
|
451
|
-
name?: string;
|
|
452
|
-
}
|
|
453
|
-
interface UICartCustomer {
|
|
454
|
-
id?: string;
|
|
455
|
-
name?: string;
|
|
456
|
-
email?: string;
|
|
457
|
-
phone?: string;
|
|
458
|
-
address?: string;
|
|
459
|
-
}
|
|
460
|
-
interface UICartPricing {
|
|
461
|
-
subtotal: Money;
|
|
462
|
-
tax_amount: Money;
|
|
463
|
-
service_charge: Money;
|
|
464
|
-
total_discounts: Money;
|
|
465
|
-
total_price: Money;
|
|
466
|
-
tax_rate?: Money;
|
|
467
|
-
service_charge_rate?: Money;
|
|
468
|
-
currency: CurrencyCode;
|
|
469
|
-
/** Tax is baked into the prices (e.g. Ghana VAT), so `tax_amount` is the
|
|
470
|
-
* portion already inside `subtotal`/`total_price`, not an addition. */
|
|
471
|
-
tax_inclusive: boolean;
|
|
472
|
-
/** Deposit computed from the catalogue when the cart has deposit-eligible
|
|
473
|
-
* service items; lets checkout offer "pay deposit now, balance later". */
|
|
474
|
-
deposit_required?: boolean;
|
|
475
|
-
deposit_amount?: Money;
|
|
476
|
-
}
|
|
477
|
-
interface AddOnOptionDetails {
|
|
478
|
-
id: string;
|
|
479
|
-
name: string;
|
|
480
|
-
price?: Money;
|
|
481
|
-
is_required: boolean;
|
|
482
|
-
description?: string;
|
|
483
|
-
image_url?: string;
|
|
484
|
-
}
|
|
485
|
-
interface AddOnGroupDetails {
|
|
486
|
-
id: string;
|
|
487
|
-
name: string;
|
|
488
|
-
is_multiple_allowed: boolean;
|
|
489
|
-
min_selections: number;
|
|
490
|
-
max_selections: number;
|
|
491
|
-
required: boolean;
|
|
492
|
-
options: AddOnOptionDetails[];
|
|
493
|
-
}
|
|
494
|
-
interface VariantDetailsDTO {
|
|
495
|
-
id: string;
|
|
496
|
-
name: string;
|
|
497
|
-
price: Money;
|
|
498
|
-
price_adjustment: Money;
|
|
499
|
-
is_default: boolean;
|
|
500
|
-
}
|
|
501
|
-
interface CartItemDetails {
|
|
502
|
-
id: string;
|
|
503
|
-
cart_id: string;
|
|
504
|
-
item_id: string;
|
|
505
|
-
quantity: number;
|
|
506
|
-
line_key: string;
|
|
507
|
-
line_type: "simple" | "service" | "bundle" | "composite" | "digital";
|
|
508
|
-
name: string;
|
|
509
|
-
description?: string;
|
|
510
|
-
image_url?: string;
|
|
511
|
-
category_id?: string;
|
|
512
|
-
category_name?: string;
|
|
513
|
-
is_available: boolean;
|
|
514
|
-
variant_id?: string;
|
|
515
|
-
variant_details?: VariantDetails;
|
|
516
|
-
variant_name?: string;
|
|
517
|
-
variant_info?: VariantDetailsDTO;
|
|
518
|
-
base_price: Money;
|
|
519
|
-
add_ons_price: Money;
|
|
520
|
-
total_price: Money;
|
|
521
|
-
item_discount_amount: Money;
|
|
522
|
-
price_info: ChosenPrice;
|
|
523
|
-
add_on_option_ids: string[];
|
|
524
|
-
add_on_ids: string[];
|
|
525
|
-
add_on_details: AddOnDetails;
|
|
526
|
-
add_on_options: AddOnOptionDetails[];
|
|
527
|
-
add_ons: AddOnGroupDetails[];
|
|
528
|
-
special_instructions?: string;
|
|
529
|
-
scheduled_start?: string;
|
|
530
|
-
scheduled_end?: string;
|
|
531
|
-
confirmation_code?: string;
|
|
532
|
-
service_status?: string;
|
|
533
|
-
staff_id?: string;
|
|
534
|
-
scheduling_metadata?: Record<string, unknown>;
|
|
535
|
-
bundle_selections?: BundleSelectionInput[];
|
|
536
|
-
bundle_resolved?: BundleSelectionData;
|
|
537
|
-
composite_selections?: ComponentSelectionInput[];
|
|
538
|
-
composite_resolved?: CompositeSelectionData;
|
|
539
|
-
customer_inputs?: Array<{
|
|
540
|
-
field_id: string;
|
|
541
|
-
field_name: string;
|
|
542
|
-
field_type: string;
|
|
543
|
-
value: unknown;
|
|
544
|
-
}>;
|
|
545
|
-
applied_discount_ids: string[];
|
|
546
|
-
discount_details?: DiscountDetails;
|
|
547
|
-
created_at: string;
|
|
548
|
-
updated_at: string;
|
|
549
|
-
metadata?: Record<string, unknown>;
|
|
550
|
-
}
|
|
551
|
-
interface UICart {
|
|
552
|
-
id: string;
|
|
553
|
-
business_id: string;
|
|
554
|
-
session_id?: string;
|
|
555
|
-
customer_id?: string;
|
|
556
|
-
location_id?: string;
|
|
557
|
-
created_at: string;
|
|
558
|
-
updated_at: string;
|
|
559
|
-
expires_at: string;
|
|
560
|
-
status: string;
|
|
561
|
-
source: string;
|
|
562
|
-
channel: string;
|
|
563
|
-
business_details?: UICartBusiness;
|
|
564
|
-
location_details?: UICartLocation;
|
|
565
|
-
customer_info: UICartCustomer;
|
|
566
|
-
items: CartItemDetails[];
|
|
567
|
-
pricing: UICartPricing;
|
|
568
|
-
requires_delivery?: boolean;
|
|
569
|
-
metadata?: Record<string, unknown>;
|
|
570
|
-
}
|
|
571
|
-
interface CartNotice {
|
|
572
|
-
kind: "info" | "warning";
|
|
573
|
-
text: string;
|
|
574
|
-
}
|
|
575
|
-
interface CartMutationResult {
|
|
576
|
-
cart: UICart;
|
|
577
|
-
notice?: CartNotice;
|
|
578
|
-
}
|
|
579
|
-
interface AddToCartInput {
|
|
580
|
-
item_id: string;
|
|
581
|
-
quantity?: number;
|
|
582
|
-
variant_id?: string;
|
|
583
|
-
quote_id?: string;
|
|
584
|
-
add_on_options?: string[];
|
|
585
|
-
special_instructions?: string;
|
|
586
|
-
bundle_selections?: BundleSelectionInput[];
|
|
587
|
-
composite_selections?: ComponentSelectionInput[];
|
|
588
|
-
scheduled_start?: string;
|
|
589
|
-
scheduled_end?: string;
|
|
590
|
-
staff_id?: string;
|
|
591
|
-
resource_id?: string;
|
|
592
|
-
billing_plan_id?: string;
|
|
593
|
-
customer_inputs?: Array<{
|
|
594
|
-
field_id: string;
|
|
595
|
-
value: unknown;
|
|
596
|
-
}>;
|
|
597
|
-
}
|
|
598
|
-
interface UpdateCartItemInput {
|
|
599
|
-
quantity?: number;
|
|
600
|
-
special_instructions?: string;
|
|
601
|
-
}
|
|
602
|
-
interface CartSummary {
|
|
603
|
-
item_count: number;
|
|
604
|
-
total_items: number;
|
|
605
|
-
subtotal: Money;
|
|
606
|
-
discount_amount: Money;
|
|
607
|
-
tax_amount: Money;
|
|
608
|
-
total: Money;
|
|
609
|
-
currency: CurrencyCode;
|
|
610
|
-
}
|
|
611
|
-
|
|
612
|
-
type BillingFrequency = "weekly" | "biweekly" | "monthly" | "quarterly" | "annually";
|
|
613
|
-
type BillingPlanType = "subscription" | "installment";
|
|
614
|
-
type BillingMarkupType = "fixed" | "percentage";
|
|
615
|
-
interface ProductBillingPlan {
|
|
616
|
-
id: string;
|
|
617
|
-
product_id: string;
|
|
618
|
-
business_id: string;
|
|
619
|
-
frequency: BillingFrequency;
|
|
620
|
-
fulfillment_frequency?: BillingFrequency | null;
|
|
621
|
-
plan_type: BillingPlanType;
|
|
622
|
-
installment_periods?: number | null;
|
|
623
|
-
trial_days: number;
|
|
624
|
-
setup_fee: number;
|
|
625
|
-
markup_type?: BillingMarkupType | null;
|
|
626
|
-
markup_amount?: number | null;
|
|
627
|
-
customer_group_id?: string | null;
|
|
628
|
-
min_quantity?: number | null;
|
|
629
|
-
min_order_value?: number | null;
|
|
630
|
-
max_cycles?: number | null;
|
|
631
|
-
is_active: boolean;
|
|
632
|
-
created_at: string;
|
|
633
|
-
updated_at: string;
|
|
634
|
-
metadata?: Record<string, unknown>;
|
|
635
|
-
}
|
|
636
|
-
interface EligiblePlansQuery {
|
|
637
|
-
customer_id?: string;
|
|
638
|
-
quantity?: number;
|
|
639
|
-
order_value?: number;
|
|
640
|
-
}
|
|
641
|
-
interface FormattedPlanOption {
|
|
642
|
-
plan: ProductBillingPlan;
|
|
643
|
-
label: string;
|
|
644
|
-
pricePerPeriod: number;
|
|
645
|
-
totalPrice?: number;
|
|
646
|
-
}
|
|
647
|
-
type SubscriptionStatus = "incomplete" | "incomplete_expired" | "trialing" | "active" | "past_due" | "canceled" | "unpaid" | "paused";
|
|
648
|
-
interface Subscription {
|
|
649
|
-
id: string;
|
|
650
|
-
customer_id: string;
|
|
651
|
-
billing_plan_id?: string;
|
|
652
|
-
business_id?: string;
|
|
653
|
-
price_id?: string;
|
|
654
|
-
status: SubscriptionStatus;
|
|
655
|
-
current_period_start: string;
|
|
656
|
-
current_period_end: string;
|
|
657
|
-
next_billing_date?: string;
|
|
658
|
-
trial_start?: string;
|
|
659
|
-
trial_end?: string;
|
|
660
|
-
canceled_at?: string;
|
|
661
|
-
cancel_at_period_end: boolean;
|
|
662
|
-
location_id?: string;
|
|
663
|
-
installment_total?: number;
|
|
664
|
-
installment_per_period?: number;
|
|
665
|
-
installment_periods_remaining?: number;
|
|
666
|
-
origin_order_id?: string;
|
|
667
|
-
skip_next_renewal: boolean;
|
|
668
|
-
cycles_completed: number;
|
|
669
|
-
source?: string;
|
|
670
|
-
created_at: string;
|
|
671
|
-
updated_at: string;
|
|
672
|
-
metadata?: Record<string, unknown>;
|
|
673
|
-
}
|
|
674
|
-
interface SubscriptionItem {
|
|
675
|
-
id: string;
|
|
676
|
-
subscription_id: string;
|
|
677
|
-
product_id: string;
|
|
678
|
-
quantity: number;
|
|
679
|
-
added_at: string;
|
|
680
|
-
removed_at?: string;
|
|
681
|
-
metadata?: Record<string, unknown>;
|
|
682
|
-
}
|
|
683
|
-
interface SubscriptionInvoice {
|
|
684
|
-
id: string;
|
|
685
|
-
subscription_id: string;
|
|
686
|
-
amount_due: number;
|
|
687
|
-
amount_paid: number;
|
|
688
|
-
currency: string;
|
|
689
|
-
status: string;
|
|
690
|
-
period_start: string;
|
|
691
|
-
period_end: string;
|
|
692
|
-
created_at: string;
|
|
693
|
-
}
|
|
694
|
-
interface SubscriptionWithDetails {
|
|
695
|
-
subscription: Subscription;
|
|
696
|
-
plan?: ProductBillingPlan;
|
|
697
|
-
product?: Product;
|
|
698
|
-
items: SubscriptionItem[];
|
|
699
|
-
latest_invoice?: SubscriptionInvoice;
|
|
700
|
-
}
|
|
701
|
-
|
|
702
|
-
/** Live claim progress for a capped sale ("73 of 100 claimed"). */
|
|
703
|
-
interface SaleCapInfo {
|
|
704
|
-
claimed: number;
|
|
705
|
-
of: number;
|
|
706
|
-
}
|
|
707
|
-
/**
|
|
708
|
-
* The sales-engine overlay applied to a price, as surfaced by the pricing API
|
|
709
|
-
* (`PriceResponse.sale`). Drives the storefront strikethrough, "% OFF" badge,
|
|
710
|
-
* countdown, and claim counter. Money fields arrive as strings.
|
|
711
|
-
*/
|
|
712
|
-
interface SaleInfo {
|
|
713
|
-
sale_id: string;
|
|
714
|
-
/** The pre-sale price (struck through). */
|
|
715
|
-
original: string | number;
|
|
716
|
-
/** The price the shopper pays under the sale. */
|
|
717
|
-
price: string | number;
|
|
718
|
-
percent_off: string | number;
|
|
719
|
-
/** ISO timestamp the sale window closes — drives the countdown. */
|
|
720
|
-
ends_at: string;
|
|
721
|
-
badge_text?: string | null;
|
|
722
|
-
cap?: SaleCapInfo | null;
|
|
723
|
-
}
|
|
724
|
-
/**
|
|
725
|
-
* A recurring sale that isn't live right now but returns at `starts_at` — the
|
|
726
|
-
* "back this Saturday" teaser. Surfaced on a product only when it has no live
|
|
727
|
-
* `sale`. Drives {@link SaleTeaser}.
|
|
728
|
-
*/
|
|
729
|
-
interface UpcomingSale {
|
|
730
|
-
/** ISO timestamp the sale next opens. */
|
|
731
|
-
starts_at: string;
|
|
732
|
-
badge_text?: string | null;
|
|
733
|
-
}
|
|
734
|
-
|
|
735
|
-
type ProductType = "product" | "service" | "digital" | "bundle" | "composite";
|
|
736
|
-
declare const PRODUCT_TYPE: {
|
|
737
|
-
Product: "product";
|
|
738
|
-
Service: "service";
|
|
739
|
-
Digital: "digital";
|
|
740
|
-
Bundle: "bundle";
|
|
741
|
-
Composite: "composite";
|
|
742
|
-
};
|
|
743
|
-
type ProductRenderHint = "food" | "physical" | "general";
|
|
744
|
-
declare const RENDER_HINT: {
|
|
745
|
-
Food: "food";
|
|
746
|
-
Physical: "physical";
|
|
747
|
-
General: "general";
|
|
748
|
-
};
|
|
749
|
-
type DisplayMode = "card" | "page";
|
|
750
|
-
type InventoryType = "one_to_one" | "composition" | "none";
|
|
751
|
-
type VariantStrategy = "fetch_all" | "use_axes";
|
|
752
|
-
type DigitalProductType = "download" | "license" | "event_ticket" | "access_pass" | "gift_code";
|
|
753
|
-
type DepositType = "none" | "fixed" | "percentage";
|
|
754
|
-
type SchedulingMode = "intraday" | "multi_day";
|
|
755
|
-
type DurationUnit = "minutes" | "hours" | "days" | "nights" | "weeks" | "months" | "years";
|
|
756
|
-
declare const DURATION_UNIT: {
|
|
757
|
-
Minutes: "minutes";
|
|
758
|
-
Hours: "hours";
|
|
759
|
-
Days: "days";
|
|
760
|
-
Nights: "nights";
|
|
761
|
-
Weeks: "weeks";
|
|
762
|
-
Months: "months";
|
|
763
|
-
Years: "years";
|
|
764
|
-
};
|
|
765
|
-
type SalesChannel = "pos" | "online" | "marketplace" | "partners";
|
|
766
|
-
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";
|
|
767
|
-
type AttributeAppliesTo = "product" | "variant" | "both" | "category" | "collection" | "all";
|
|
768
|
-
type AttributeVisibility = "admin_only" | "storefront_read" | "public";
|
|
769
|
-
type MeasurementValue = {
|
|
770
|
-
value: number;
|
|
771
|
-
unit: string;
|
|
772
|
-
};
|
|
773
|
-
interface AttributeValidationRules {
|
|
774
|
-
min_length?: number;
|
|
775
|
-
max_length?: number;
|
|
776
|
-
regex?: string;
|
|
777
|
-
min?: number | string;
|
|
778
|
-
max?: number | string;
|
|
779
|
-
max_precision?: number;
|
|
780
|
-
min_selections?: number;
|
|
781
|
-
max_selections?: number;
|
|
782
|
-
}
|
|
783
|
-
interface CustomAttributeDefinition {
|
|
784
|
-
id: string;
|
|
785
|
-
business_id: string;
|
|
786
|
-
namespace: string;
|
|
787
|
-
name: string;
|
|
788
|
-
slug: string;
|
|
789
|
-
description?: string;
|
|
790
|
-
attribute_type: AttributeType;
|
|
791
|
-
options?: string[];
|
|
792
|
-
unit?: string;
|
|
793
|
-
validation?: AttributeValidationRules | null;
|
|
794
|
-
is_required: boolean;
|
|
795
|
-
is_filterable: boolean;
|
|
796
|
-
visibility: AttributeVisibility;
|
|
797
|
-
display_order: number;
|
|
798
|
-
group_name?: string;
|
|
799
|
-
applies_to: AttributeAppliesTo;
|
|
800
|
-
created_at: string;
|
|
801
|
-
updated_at: string;
|
|
802
|
-
}
|
|
803
|
-
interface CustomAttributeValue {
|
|
804
|
-
definition_id: string;
|
|
805
|
-
namespace: string;
|
|
806
|
-
name: string;
|
|
807
|
-
slug: string;
|
|
808
|
-
attribute_type: AttributeType;
|
|
809
|
-
group_name?: string;
|
|
810
|
-
unit?: string;
|
|
811
|
-
value: string | number | boolean | string[] | MeasurementValue | null;
|
|
812
|
-
is_filterable: boolean;
|
|
813
|
-
visibility: AttributeVisibility;
|
|
814
|
-
}
|
|
815
|
-
type PropertySource = "attribute" | "variant";
|
|
816
|
-
interface ProductProperty {
|
|
817
|
-
name: string;
|
|
818
|
-
slug: string;
|
|
819
|
-
source: PropertySource;
|
|
820
|
-
value_type: string;
|
|
821
|
-
values: (string | number | boolean | null)[];
|
|
822
|
-
group_name?: string;
|
|
823
|
-
unit?: string;
|
|
824
|
-
is_filterable: boolean;
|
|
825
|
-
}
|
|
826
|
-
interface PropertyFacet {
|
|
827
|
-
name: string;
|
|
828
|
-
slug: string;
|
|
829
|
-
source: string;
|
|
830
|
-
values: FacetValue[];
|
|
831
|
-
}
|
|
832
|
-
interface FacetValue {
|
|
833
|
-
value: string;
|
|
834
|
-
count: number;
|
|
835
|
-
}
|
|
836
|
-
interface TaxonomyAttributeTemplate {
|
|
837
|
-
id: string;
|
|
838
|
-
taxonomy_id: string;
|
|
839
|
-
name: string;
|
|
840
|
-
slug: string;
|
|
841
|
-
attribute_type: "boolean" | "single_select";
|
|
842
|
-
options?: string[];
|
|
843
|
-
is_required: boolean;
|
|
844
|
-
display_order: number;
|
|
845
|
-
gpc_attribute_code?: number;
|
|
846
|
-
created_at: string;
|
|
847
|
-
}
|
|
848
|
-
interface KnowledgeArticle {
|
|
849
|
-
id: string;
|
|
850
|
-
title: string;
|
|
851
|
-
slug: string;
|
|
852
|
-
content: string;
|
|
853
|
-
category?: string;
|
|
854
|
-
tags: string[];
|
|
855
|
-
created_at: string;
|
|
856
|
-
updated_at: string;
|
|
857
|
-
}
|
|
858
|
-
interface Product {
|
|
859
|
-
id: string;
|
|
860
|
-
business_id: string;
|
|
861
|
-
category_id?: string;
|
|
862
|
-
name: string;
|
|
863
|
-
slug: string;
|
|
864
|
-
description?: string;
|
|
865
|
-
image_url?: string;
|
|
866
|
-
default_price: Money;
|
|
867
|
-
/** Sales-engine overlay from the pricing API, when the product is on sale. */
|
|
868
|
-
sale?: SaleInfo | null;
|
|
869
|
-
/** A recurring sale that returns soon — present only when there's no live `sale`. */
|
|
870
|
-
upcoming_sale?: UpcomingSale | null;
|
|
871
|
-
type: ProductType;
|
|
872
|
-
render_hint?: ProductRenderHint;
|
|
873
|
-
display_mode?: DisplayMode;
|
|
874
|
-
inventory_type: InventoryType;
|
|
875
|
-
variant_strategy: VariantStrategy;
|
|
876
|
-
inventory_status?: {
|
|
877
|
-
in_stock: boolean;
|
|
878
|
-
stock_level?: number;
|
|
879
|
-
low_stock: boolean;
|
|
880
|
-
};
|
|
881
|
-
is_active: boolean;
|
|
882
|
-
created_at: string;
|
|
883
|
-
updated_at: string;
|
|
884
|
-
metadata?: Record<string, unknown>;
|
|
885
|
-
tags?: string[];
|
|
886
|
-
images?: string[];
|
|
887
|
-
calories?: number;
|
|
888
|
-
allergies?: string[];
|
|
889
|
-
recipe?: Record<string, unknown>;
|
|
890
|
-
sku?: string;
|
|
891
|
-
barcode?: string;
|
|
892
|
-
ean?: string;
|
|
893
|
-
upc?: string;
|
|
894
|
-
is_trackable?: boolean;
|
|
895
|
-
is_tracked?: boolean;
|
|
896
|
-
is_tracked_in_store?: boolean;
|
|
897
|
-
is_tracked_in_warehouse?: boolean;
|
|
898
|
-
inventory_threshold?: number;
|
|
899
|
-
external_id?: string;
|
|
900
|
-
external_source?: string;
|
|
901
|
-
download_url?: string;
|
|
902
|
-
digital_type?: DigitalProductType;
|
|
903
|
-
max_downloads?: number;
|
|
904
|
-
license_key_required?: boolean;
|
|
905
|
-
file_size_mb?: number;
|
|
906
|
-
file_hash?: string;
|
|
907
|
-
file_type?: string;
|
|
908
|
-
version?: string;
|
|
909
|
-
download_expires_days?: number;
|
|
910
|
-
license_key_format?: string;
|
|
911
|
-
max_activations?: number;
|
|
912
|
-
validity_days?: number;
|
|
913
|
-
event_id?: string;
|
|
914
|
-
event_date?: string;
|
|
915
|
-
venue?: string;
|
|
916
|
-
ticket_type?: string;
|
|
917
|
-
seat_info?: Record<string, unknown>;
|
|
918
|
-
access_type?: string;
|
|
919
|
-
access_level?: string;
|
|
920
|
-
access_duration_days?: number;
|
|
921
|
-
code_type?: string;
|
|
922
|
-
code_value?: Money;
|
|
923
|
-
code_currency?: CurrencyCode;
|
|
924
|
-
scheduling_mode?: SchedulingMode;
|
|
925
|
-
duration_value?: number;
|
|
926
|
-
duration_minutes?: number;
|
|
927
|
-
duration_unit?: DurationUnit;
|
|
928
|
-
preparation_time_minutes?: number;
|
|
929
|
-
staff_required_count?: number;
|
|
930
|
-
buffer_before_minutes?: number;
|
|
931
|
-
buffer_after_minutes?: number;
|
|
932
|
-
general_service_capacity?: number;
|
|
933
|
-
deposit_type?: DepositType;
|
|
934
|
-
deposit_amount?: Money;
|
|
935
|
-
cancellation_window_minutes?: number;
|
|
936
|
-
no_show_fee?: Money;
|
|
937
|
-
partial_refund_percentage?: number;
|
|
938
|
-
max_free_reschedules?: number;
|
|
939
|
-
reschedule_fee?: Money;
|
|
940
|
-
no_show_deadline_minutes?: number;
|
|
941
|
-
cancellation_notice_days?: number;
|
|
942
|
-
early_termination_fee?: Money;
|
|
943
|
-
pro_rata_refund?: boolean;
|
|
944
|
-
requires_specific_staff?: boolean;
|
|
945
|
-
requires_specific_resource?: boolean;
|
|
946
|
-
hs_code?: string;
|
|
947
|
-
mid_code?: string;
|
|
948
|
-
material?: string;
|
|
949
|
-
allow_backorder?: boolean;
|
|
950
|
-
item_condition?: string;
|
|
951
|
-
vendor?: string;
|
|
952
|
-
length_mm?: number;
|
|
953
|
-
width_mm?: number;
|
|
954
|
-
height_mm?: number;
|
|
955
|
-
channels?: SalesChannel[];
|
|
956
|
-
meta_title?: string;
|
|
957
|
-
meta_description?: string;
|
|
958
|
-
is_discountable?: boolean;
|
|
959
|
-
taxonomy_id?: string;
|
|
960
|
-
bundle_price?: Money;
|
|
961
|
-
discount_value?: Money;
|
|
962
|
-
pricing_type?: BundlePriceType;
|
|
963
|
-
components?: BundleComponentView[];
|
|
964
|
-
composite_id?: string;
|
|
965
|
-
groups?: CompositeGroupView[];
|
|
966
|
-
custom_attributes?: CustomAttributeValue[];
|
|
967
|
-
properties?: ProductProperty[];
|
|
968
|
-
billing_plans?: ProductBillingPlan[];
|
|
969
|
-
quantity_pricing?: QuantityPricingTier[];
|
|
970
|
-
min_order_quantity?: number;
|
|
971
|
-
input_fields?: ProductInputField[];
|
|
972
|
-
upsells?: RelatedProductView[];
|
|
973
|
-
cross_sells?: RelatedProductView[];
|
|
974
|
-
}
|
|
975
|
-
type InputFieldType = "text" | "textarea" | "number" | "select" | "radio" | "checkbox" | "color" | "date" | "file" | "image" | "url" | "address" | "phone" | "email" | "date_time" | "time" | "signature" | "multi_select" | "date_range" | "location";
|
|
976
|
-
declare const INPUT_FIELD_TYPE: {
|
|
977
|
-
Text: "text";
|
|
978
|
-
Textarea: "textarea";
|
|
979
|
-
Number: "number";
|
|
980
|
-
Select: "select";
|
|
981
|
-
Radio: "radio";
|
|
982
|
-
Checkbox: "checkbox";
|
|
983
|
-
Color: "color";
|
|
984
|
-
Date: "date";
|
|
985
|
-
File: "file";
|
|
986
|
-
Image: "image";
|
|
987
|
-
Url: "url";
|
|
988
|
-
Address: "address";
|
|
989
|
-
Phone: "phone";
|
|
990
|
-
Email: "email";
|
|
991
|
-
DateTime: "date_time";
|
|
992
|
-
Time: "time";
|
|
993
|
-
Signature: "signature";
|
|
994
|
-
MultiSelect: "multi_select";
|
|
995
|
-
DateRange: "date_range";
|
|
996
|
-
Location: "location";
|
|
997
|
-
};
|
|
998
|
-
interface AddressValue {
|
|
999
|
-
formatted_address: string;
|
|
1000
|
-
street_address?: string;
|
|
1001
|
-
apartment?: string;
|
|
1002
|
-
city?: string;
|
|
1003
|
-
region?: string;
|
|
1004
|
-
postal_code?: string;
|
|
1005
|
-
country?: string;
|
|
1006
|
-
latitude: number;
|
|
1007
|
-
longitude: number;
|
|
1008
|
-
place_id?: string;
|
|
1009
|
-
}
|
|
1010
|
-
interface PhoneValue {
|
|
1011
|
-
country_code: string;
|
|
1012
|
-
number: string;
|
|
1013
|
-
formatted: string;
|
|
1014
|
-
}
|
|
1015
|
-
interface DateRangeValue {
|
|
1016
|
-
start: string;
|
|
1017
|
-
end: string;
|
|
1018
|
-
}
|
|
1019
|
-
interface LocationValue {
|
|
1020
|
-
latitude: number;
|
|
1021
|
-
longitude: number;
|
|
1022
|
-
label?: string;
|
|
1023
|
-
}
|
|
1024
|
-
interface SignatureValue {
|
|
1025
|
-
data_url: string;
|
|
1026
|
-
signer_name?: string;
|
|
1027
|
-
}
|
|
1028
|
-
interface InputFieldValidation {
|
|
1029
|
-
max_length?: number;
|
|
1030
|
-
min_length?: number;
|
|
1031
|
-
min_value?: number;
|
|
1032
|
-
max_value?: number;
|
|
1033
|
-
accepted_formats?: string[];
|
|
1034
|
-
max_size_mb?: number;
|
|
1035
|
-
pattern?: string;
|
|
1036
|
-
allowed_countries?: string[];
|
|
1037
|
-
max_selections?: number;
|
|
1038
|
-
}
|
|
1039
|
-
type SemanticKind = "allergen" | "dietary_preference" | "sensitivity" | "consent";
|
|
1040
|
-
interface ProductInputField {
|
|
1041
|
-
id: string;
|
|
1042
|
-
product_id: string;
|
|
1043
|
-
name: string;
|
|
1044
|
-
slug: string;
|
|
1045
|
-
field_type: InputFieldType;
|
|
1046
|
-
is_required: boolean;
|
|
1047
|
-
display_order: number;
|
|
1048
|
-
placeholder?: string;
|
|
1049
|
-
help_text?: string;
|
|
1050
|
-
validation?: InputFieldValidation;
|
|
1051
|
-
options?: string[];
|
|
1052
|
-
price_adjustment?: Money;
|
|
1053
|
-
semantic_kind?: SemanticKind;
|
|
1054
|
-
}
|
|
1055
|
-
interface CustomerInputValue {
|
|
1056
|
-
field_id: string;
|
|
1057
|
-
field_name: string;
|
|
1058
|
-
field_type: string;
|
|
1059
|
-
value: unknown;
|
|
1060
|
-
semantic_kind?: SemanticKind;
|
|
1061
|
-
}
|
|
1062
|
-
interface QuantityPricingTier {
|
|
1063
|
-
min_quantity: number;
|
|
1064
|
-
max_quantity?: number;
|
|
1065
|
-
unit_price: Money;
|
|
1066
|
-
}
|
|
1067
|
-
interface RelatedProductView {
|
|
1068
|
-
product_id: string;
|
|
1069
|
-
name: string;
|
|
1070
|
-
slug: string;
|
|
1071
|
-
image_url?: string;
|
|
1072
|
-
price: Money;
|
|
1073
|
-
source: string;
|
|
1074
|
-
}
|
|
1075
|
-
interface ProductWithDetails extends Product {
|
|
1076
|
-
category?: Category;
|
|
1077
|
-
variants?: VariantView[];
|
|
1078
|
-
add_ons?: AddOnWithOptions[];
|
|
1079
|
-
variant_axes?: VariantAxisWithValues[];
|
|
1080
|
-
location_prices?: LocationProductPrice[];
|
|
1081
|
-
location_availability?: ProductAvailability[];
|
|
1082
|
-
time_profiles?: ProductTimeProfile[];
|
|
1083
|
-
}
|
|
1084
|
-
interface VariantView {
|
|
1085
|
-
id: string;
|
|
1086
|
-
name: string;
|
|
1087
|
-
is_default: boolean;
|
|
1088
|
-
sku?: string;
|
|
1089
|
-
barcode?: string;
|
|
1090
|
-
price_adjustment: Money;
|
|
1091
|
-
location_prices?: Record<string, ChosenPrice>;
|
|
1092
|
-
axis_selections?: Record<string, string>;
|
|
1093
|
-
display_attributes?: VariantDisplayAttribute[];
|
|
1094
|
-
images?: string[];
|
|
1095
|
-
scheduling_mode?: SchedulingMode;
|
|
1096
|
-
duration_value?: number;
|
|
1097
|
-
duration_minutes?: number;
|
|
1098
|
-
duration_unit?: DurationUnit;
|
|
1099
|
-
skill_level_required?: string;
|
|
1100
|
-
staff_count_override?: number;
|
|
1101
|
-
capacity_override?: number;
|
|
1102
|
-
}
|
|
1103
|
-
interface ProductVariant {
|
|
1104
|
-
id: string;
|
|
1105
|
-
name?: string;
|
|
1106
|
-
business_id: string;
|
|
1107
|
-
product_id: string;
|
|
1108
|
-
component_multiplier: Money;
|
|
1109
|
-
price_adjustment: Money;
|
|
1110
|
-
is_default: boolean;
|
|
1111
|
-
created_at: string;
|
|
1112
|
-
updated_at: string;
|
|
1113
|
-
is_active?: boolean;
|
|
1114
|
-
is_archived?: boolean;
|
|
1115
|
-
is_deleted?: boolean;
|
|
1116
|
-
inventory_threshold?: number;
|
|
1117
|
-
images?: string[];
|
|
1118
|
-
external_id?: string;
|
|
1119
|
-
external_source?: string;
|
|
1120
|
-
ean?: string;
|
|
1121
|
-
upc?: string;
|
|
1122
|
-
is_trackable?: boolean;
|
|
1123
|
-
is_tracked?: boolean;
|
|
1124
|
-
is_tracked_in_store?: boolean;
|
|
1125
|
-
is_tracked_in_warehouse?: boolean;
|
|
1126
|
-
sku?: string;
|
|
1127
|
-
barcode?: string;
|
|
1128
|
-
download_url?: string;
|
|
1129
|
-
metadata?: Record<string, unknown>;
|
|
1130
|
-
scheduling_mode?: SchedulingMode;
|
|
1131
|
-
duration_value?: number;
|
|
1132
|
-
duration_minutes?: number;
|
|
1133
|
-
duration_unit?: DurationUnit;
|
|
1134
|
-
max_downloads?: number;
|
|
1135
|
-
license_key?: string;
|
|
1136
|
-
display_attributes?: VariantDisplayAttribute[];
|
|
1137
|
-
}
|
|
1138
|
-
interface VariantDisplayAttribute {
|
|
1139
|
-
axis_id: string;
|
|
1140
|
-
axis_name: string;
|
|
1141
|
-
value_id: string;
|
|
1142
|
-
value_name: string;
|
|
1143
|
-
}
|
|
1144
|
-
interface VariantAxis {
|
|
1145
|
-
id: string;
|
|
1146
|
-
business_id: string;
|
|
1147
|
-
product_id: string;
|
|
1148
|
-
name: string;
|
|
1149
|
-
display_order: number;
|
|
1150
|
-
affects_recipe: boolean;
|
|
1151
|
-
created_at: string;
|
|
1152
|
-
updated_at: string;
|
|
1153
|
-
metadata?: Record<string, unknown>;
|
|
1154
|
-
}
|
|
1155
|
-
interface VariantAxisWithValues extends VariantAxis {
|
|
1156
|
-
values: VariantAxisValue[];
|
|
1157
|
-
}
|
|
1158
|
-
interface VariantAxisValue {
|
|
1159
|
-
id: string;
|
|
1160
|
-
business_id: string;
|
|
1161
|
-
axis_id: string;
|
|
1162
|
-
name: string;
|
|
1163
|
-
display_order: number;
|
|
1164
|
-
color_hex?: string;
|
|
1165
|
-
image_url?: string;
|
|
1166
|
-
created_at: string;
|
|
1167
|
-
updated_at: string;
|
|
1168
|
-
metadata?: Record<string, unknown>;
|
|
1169
|
-
}
|
|
1170
|
-
interface ProductVariantValue {
|
|
1171
|
-
variant_id: string;
|
|
1172
|
-
axis_value_id: string;
|
|
1173
|
-
business_id: string;
|
|
1174
|
-
created_at: string;
|
|
1175
|
-
updated_at: string;
|
|
1176
|
-
metadata?: Record<string, unknown>;
|
|
1177
|
-
}
|
|
1178
|
-
interface VariantLocationAvailability {
|
|
1179
|
-
id: string;
|
|
1180
|
-
variant_id: string;
|
|
1181
|
-
location_id: string;
|
|
1182
|
-
business_id: string;
|
|
1183
|
-
is_available: boolean;
|
|
1184
|
-
is_in_stock: boolean;
|
|
1185
|
-
created_at: string;
|
|
1186
|
-
updated_at: string;
|
|
1187
|
-
metadata?: Record<string, unknown>;
|
|
1188
|
-
}
|
|
1189
|
-
interface VariantAxisSelection {
|
|
1190
|
-
[axisName: string]: string;
|
|
1191
|
-
}
|
|
1192
|
-
interface AddOn {
|
|
1193
|
-
id: string;
|
|
1194
|
-
business_id: string;
|
|
1195
|
-
name: string;
|
|
1196
|
-
is_multiple_allowed: boolean;
|
|
1197
|
-
is_required: boolean;
|
|
1198
|
-
is_mutually_exclusive: boolean;
|
|
1199
|
-
min_selections?: number;
|
|
1200
|
-
max_selections?: number;
|
|
1201
|
-
created_at: string;
|
|
1202
|
-
updated_at: string;
|
|
1203
|
-
metadata?: Record<string, unknown>;
|
|
1204
|
-
}
|
|
1205
|
-
interface AddOnWithOptions extends AddOn {
|
|
1206
|
-
options: AddOnOption[];
|
|
1207
|
-
}
|
|
1208
|
-
interface AddOnOption {
|
|
1209
|
-
id: string;
|
|
1210
|
-
add_on_id: string;
|
|
1211
|
-
business_id: string;
|
|
1212
|
-
name: string;
|
|
1213
|
-
option_sku?: string;
|
|
1214
|
-
default_price?: Money;
|
|
1215
|
-
description?: string;
|
|
1216
|
-
is_required: boolean;
|
|
1217
|
-
is_mutually_exclusive: boolean;
|
|
1218
|
-
created_at: string;
|
|
1219
|
-
updated_at: string;
|
|
1220
|
-
metadata?: Record<string, unknown>;
|
|
1221
|
-
}
|
|
1222
|
-
interface AddOnOptionPrice {
|
|
1223
|
-
id: string;
|
|
1224
|
-
add_on_option_id: string;
|
|
1225
|
-
location_id: string;
|
|
1226
|
-
business_id: string;
|
|
1227
|
-
price: Money;
|
|
1228
|
-
created_at: string;
|
|
1229
|
-
updated_at: string;
|
|
1230
|
-
metadata?: Record<string, unknown>;
|
|
1231
|
-
}
|
|
1232
|
-
interface ProductAddOn {
|
|
1233
|
-
id: string;
|
|
1234
|
-
business_id: string;
|
|
1235
|
-
product_id: string;
|
|
1236
|
-
add_on_id: string;
|
|
1237
|
-
created_at: string;
|
|
1238
|
-
updated_at: string;
|
|
1239
|
-
metadata?: Record<string, unknown>;
|
|
1240
|
-
}
|
|
1241
|
-
interface Category {
|
|
1242
|
-
id: string;
|
|
1243
|
-
business_id: string;
|
|
1244
|
-
name: string;
|
|
1245
|
-
slug: string;
|
|
1246
|
-
description?: string;
|
|
1247
|
-
product_count?: number;
|
|
1248
|
-
created_at: string;
|
|
1249
|
-
updated_at: string;
|
|
1250
|
-
metadata?: Record<string, unknown>;
|
|
1251
|
-
}
|
|
1252
|
-
interface CategorySummary extends Category {
|
|
1253
|
-
product_count: number;
|
|
1254
|
-
}
|
|
1255
|
-
interface Collection {
|
|
1256
|
-
id: string;
|
|
1257
|
-
business_id: string;
|
|
1258
|
-
name: string;
|
|
1259
|
-
slug: string;
|
|
1260
|
-
description?: string;
|
|
1261
|
-
tags?: string[];
|
|
1262
|
-
image_url?: string;
|
|
1263
|
-
channels?: SalesChannel[];
|
|
1264
|
-
product_count?: number;
|
|
1265
|
-
created_at: string;
|
|
1266
|
-
updated_at: string;
|
|
1267
|
-
metadata?: Record<string, unknown>;
|
|
1268
|
-
}
|
|
1269
|
-
interface CollectionSummary extends Collection {
|
|
1270
|
-
product_count: number;
|
|
1271
|
-
}
|
|
1272
|
-
interface CollectionProduct {
|
|
1273
|
-
id: string;
|
|
1274
|
-
collection_id: string;
|
|
1275
|
-
product_id: string;
|
|
1276
|
-
display_order?: number;
|
|
1277
|
-
created_at: string;
|
|
1278
|
-
updated_at: string;
|
|
1279
|
-
metadata?: Record<string, unknown>;
|
|
1280
|
-
}
|
|
1281
|
-
type BundlePriceType = "fixed" | "percentage_discount" | "fixed_discount";
|
|
1282
|
-
interface Bundle {
|
|
1283
|
-
id: string;
|
|
1284
|
-
business_id: string;
|
|
1285
|
-
product_id: string;
|
|
1286
|
-
name: string;
|
|
1287
|
-
slug: string;
|
|
1288
|
-
description?: string;
|
|
1289
|
-
image_url?: string;
|
|
1290
|
-
pricing_type: BundlePriceType;
|
|
1291
|
-
bundle_price?: Money;
|
|
1292
|
-
discount_value?: Money;
|
|
1293
|
-
product_count?: number;
|
|
1294
|
-
created_at: string;
|
|
1295
|
-
updated_at: string;
|
|
1296
|
-
metadata?: Record<string, unknown>;
|
|
1297
|
-
}
|
|
1298
|
-
interface BundleSummary extends Bundle {
|
|
1299
|
-
product_count: number;
|
|
1300
|
-
}
|
|
1301
|
-
interface BundleProduct {
|
|
1302
|
-
id: string;
|
|
1303
|
-
bundle_id: string;
|
|
1304
|
-
product_id: string;
|
|
1305
|
-
variant_id?: string;
|
|
1306
|
-
allow_variant_choice: boolean;
|
|
1307
|
-
quantity: number;
|
|
1308
|
-
created_at: string;
|
|
1309
|
-
updated_at: string;
|
|
1310
|
-
metadata?: Record<string, unknown>;
|
|
1311
|
-
}
|
|
1312
|
-
interface BundleWithDetails extends Bundle {
|
|
1313
|
-
product: Product;
|
|
1314
|
-
components: BundleComponentData[];
|
|
1315
|
-
schedules?: ProductTimeProfile[];
|
|
1316
|
-
availability?: Record<string, ProductAvailability>;
|
|
1317
|
-
}
|
|
1318
|
-
interface BundleComponentData {
|
|
1319
|
-
component: BundleProduct;
|
|
1320
|
-
product: Product;
|
|
1321
|
-
variants: ProductVariant[];
|
|
1322
|
-
variant_axes: VariantAxis[];
|
|
1323
|
-
variant_axis_values: VariantAxisValue[];
|
|
1324
|
-
product_variant_values: ProductVariantValue[];
|
|
1325
|
-
}
|
|
1326
|
-
interface BundleComponentInfo {
|
|
1327
|
-
id: string;
|
|
1328
|
-
product_id: string;
|
|
1329
|
-
variant_id?: string;
|
|
1330
|
-
quantity: number;
|
|
1331
|
-
}
|
|
1332
|
-
interface BundleComponentView {
|
|
1333
|
-
id: string;
|
|
1334
|
-
product_id: string;
|
|
1335
|
-
product_name: string;
|
|
1336
|
-
product_description?: string;
|
|
1337
|
-
product_image_url?: string;
|
|
1338
|
-
product_type?: ProductType;
|
|
1339
|
-
effective_price: Money;
|
|
1340
|
-
quantity: number;
|
|
1341
|
-
variant_id?: string;
|
|
1342
|
-
allow_variant_choice: boolean;
|
|
1343
|
-
available_variants: BundleComponentVariantView[];
|
|
1344
|
-
variant_axes?: VariantAxisView[];
|
|
1345
|
-
duration_minutes?: number;
|
|
1346
|
-
duration_unit?: DurationUnit;
|
|
1347
|
-
}
|
|
1348
|
-
interface BundleComponentVariantView {
|
|
1349
|
-
id: string;
|
|
1350
|
-
is_default: boolean;
|
|
1351
|
-
display_name: string;
|
|
1352
|
-
price_adjustment: Money;
|
|
1353
|
-
}
|
|
1354
|
-
interface VariantAxisView {
|
|
1355
|
-
id: string;
|
|
1356
|
-
name: string;
|
|
1357
|
-
values: VariantAxisValueView[];
|
|
1358
|
-
}
|
|
1359
|
-
interface VariantAxisValueView {
|
|
1360
|
-
id: string;
|
|
1361
|
-
value: string;
|
|
1362
|
-
}
|
|
1363
|
-
type CompositePricingMode = "additive" | "highest_per_group" | "highest_overall" | "tiered";
|
|
1364
|
-
type GroupPricingBehavior = "additive" | "first_n_free" | "flat_fee" | "highest_only";
|
|
1365
|
-
type ComponentSourceType = "product" | "stock" | "add_on" | "standalone";
|
|
1366
|
-
interface Composite {
|
|
1367
|
-
id: string;
|
|
1368
|
-
business_id: string;
|
|
1369
|
-
product_id: string;
|
|
1370
|
-
base_price: Money;
|
|
1371
|
-
pricing_mode: CompositePricingMode;
|
|
1372
|
-
min_order_quantity?: number;
|
|
1373
|
-
max_order_quantity?: number;
|
|
1374
|
-
created_at: string;
|
|
1375
|
-
updated_at: string;
|
|
1376
|
-
metadata?: Record<string, unknown>;
|
|
1377
|
-
}
|
|
1378
|
-
interface CompositeWithDetails extends Composite {
|
|
1379
|
-
product: Product;
|
|
1380
|
-
groups: ComponentGroupWithComponents[];
|
|
1381
|
-
}
|
|
1382
|
-
interface ComponentGroup {
|
|
1383
|
-
id: string;
|
|
1384
|
-
composite_id: string;
|
|
1385
|
-
name: string;
|
|
1386
|
-
description?: string;
|
|
1387
|
-
display_order: number;
|
|
1388
|
-
min_selections: number;
|
|
1389
|
-
max_selections?: number;
|
|
1390
|
-
allow_quantity: boolean;
|
|
1391
|
-
max_quantity_per_component?: number;
|
|
1392
|
-
pricing_behavior: GroupPricingBehavior;
|
|
1393
|
-
pricing_behavior_config?: Record<string, unknown>;
|
|
1394
|
-
icon?: string;
|
|
1395
|
-
color?: string;
|
|
1396
|
-
created_at: string;
|
|
1397
|
-
updated_at: string;
|
|
1398
|
-
}
|
|
1399
|
-
interface ComponentGroupWithComponents extends ComponentGroup {
|
|
1400
|
-
components: CompositeComponent[];
|
|
1401
|
-
}
|
|
1402
|
-
interface CompositeGroupView {
|
|
1403
|
-
id: string;
|
|
1404
|
-
name: string;
|
|
1405
|
-
description?: string;
|
|
1406
|
-
min_selections: number;
|
|
1407
|
-
max_selections: number;
|
|
1408
|
-
allow_quantity: boolean;
|
|
1409
|
-
max_quantity_per_component?: number;
|
|
1410
|
-
display_order: number;
|
|
1411
|
-
components: CompositeComponentView[];
|
|
1412
|
-
}
|
|
1413
|
-
interface CompositeComponentView {
|
|
1414
|
-
id: string;
|
|
1415
|
-
display_name?: string;
|
|
1416
|
-
display_description?: string;
|
|
1417
|
-
display_image_url?: string;
|
|
1418
|
-
price: Money;
|
|
1419
|
-
calories?: number;
|
|
1420
|
-
display_order: number;
|
|
1421
|
-
is_popular: boolean;
|
|
1422
|
-
is_premium: boolean;
|
|
1423
|
-
is_available: boolean;
|
|
1424
|
-
is_archived: boolean;
|
|
1425
|
-
product_type?: ProductType;
|
|
1426
|
-
source_type?: ComponentSourceType;
|
|
1427
|
-
}
|
|
1428
|
-
interface CompositeComponent {
|
|
1429
|
-
id: string;
|
|
1430
|
-
group_id: string;
|
|
1431
|
-
product_id?: string;
|
|
1432
|
-
variant_id?: string;
|
|
1433
|
-
stock_id?: string;
|
|
1434
|
-
add_on_id?: string;
|
|
1435
|
-
add_on_option_id?: string;
|
|
1436
|
-
display_name?: string;
|
|
1437
|
-
display_description?: string;
|
|
1438
|
-
display_image_url?: string;
|
|
1439
|
-
price: Money;
|
|
1440
|
-
price_per_additional?: Money;
|
|
1441
|
-
quantity_per_selection?: Money;
|
|
1442
|
-
waste_percentage?: Money;
|
|
1443
|
-
calories?: number;
|
|
1444
|
-
allergens?: string[];
|
|
1445
|
-
display_order: number;
|
|
1446
|
-
is_popular: boolean;
|
|
1447
|
-
is_premium: boolean;
|
|
1448
|
-
is_available: boolean;
|
|
1449
|
-
is_archived: boolean;
|
|
1450
|
-
created_at: string;
|
|
1451
|
-
updated_at: string;
|
|
1452
|
-
}
|
|
1453
|
-
interface ComponentSelectionInput {
|
|
1454
|
-
component_id: string;
|
|
1455
|
-
quantity: number;
|
|
1456
|
-
variant_id?: string;
|
|
1457
|
-
add_on_option_id?: string;
|
|
1458
|
-
scheduled_start?: string;
|
|
1459
|
-
scheduled_end?: string;
|
|
1460
|
-
}
|
|
1461
|
-
interface CompositePriceResult {
|
|
1462
|
-
base_price: Money;
|
|
1463
|
-
components_total: Money;
|
|
1464
|
-
tier_applied?: string;
|
|
1465
|
-
final_price: Money;
|
|
1466
|
-
breakdown: ComponentPriceBreakdown[];
|
|
1467
|
-
}
|
|
1468
|
-
interface ComponentPriceBreakdown {
|
|
1469
|
-
component_id: string;
|
|
1470
|
-
component_name: string;
|
|
1471
|
-
quantity: number;
|
|
1472
|
-
unit_price: Money;
|
|
1473
|
-
total_price: Money;
|
|
1474
|
-
group_id: string;
|
|
1475
|
-
source_type: ComponentSourceType;
|
|
1476
|
-
source_product_id?: string;
|
|
1477
|
-
source_stock_id?: string;
|
|
1478
|
-
}
|
|
1479
|
-
type PriceEntryType = "base" | "location" | "time" | "channel";
|
|
1480
|
-
interface Price {
|
|
1481
|
-
id: string;
|
|
1482
|
-
product_id: string;
|
|
1483
|
-
location_id: string;
|
|
1484
|
-
business_id: string;
|
|
1485
|
-
price: Money;
|
|
1486
|
-
entry_type: PriceEntryType;
|
|
1487
|
-
created_at: string;
|
|
1488
|
-
updated_at: string;
|
|
1489
|
-
metadata?: Record<string, unknown>;
|
|
1490
|
-
}
|
|
1491
|
-
type LocationProductPrice = Price;
|
|
1492
|
-
interface ProductAvailability {
|
|
1493
|
-
id: string;
|
|
1494
|
-
business_id: string;
|
|
1495
|
-
location_id: string;
|
|
1496
|
-
product_id: string;
|
|
1497
|
-
is_available: boolean;
|
|
1498
|
-
is_in_stock: boolean;
|
|
1499
|
-
created_at: string;
|
|
1500
|
-
updated_at: string;
|
|
1501
|
-
metadata?: Record<string, unknown>;
|
|
1502
|
-
}
|
|
1503
|
-
interface ProductTimeProfile {
|
|
1504
|
-
id: string;
|
|
1505
|
-
business_id: string;
|
|
1506
|
-
product_id: string;
|
|
1507
|
-
day_of_week: number;
|
|
1508
|
-
start_time: string;
|
|
1509
|
-
end_time: string;
|
|
1510
|
-
created_at: string;
|
|
1511
|
-
updated_at: string;
|
|
1512
|
-
metadata?: Record<string, unknown>;
|
|
1513
|
-
}
|
|
1514
|
-
interface ProductTaxonomy {
|
|
1515
|
-
id: string;
|
|
1516
|
-
code: string;
|
|
1517
|
-
name: string;
|
|
1518
|
-
description?: string;
|
|
1519
|
-
parent_id?: string;
|
|
1520
|
-
level: number;
|
|
1521
|
-
is_active: boolean;
|
|
1522
|
-
created_at: string;
|
|
1523
|
-
updated_at: string;
|
|
1524
|
-
}
|
|
1525
|
-
interface TaxonomyWithChildren extends ProductTaxonomy {
|
|
1526
|
-
children: ProductTaxonomy[];
|
|
1527
|
-
}
|
|
1528
|
-
interface ProductAvailabilityNow {
|
|
1529
|
-
is_available: boolean;
|
|
1530
|
-
schedules_today: ProductTimeProfile[];
|
|
1531
|
-
}
|
|
1532
|
-
type DealBenefitType = "percentage" | "fixed" | "free_item" | "buy_x_get_y_free" | "points";
|
|
1533
|
-
interface Deal {
|
|
1534
|
-
id: string;
|
|
1535
|
-
description: string;
|
|
1536
|
-
benefit_type: DealBenefitType;
|
|
1537
|
-
value: Money;
|
|
1538
|
-
min_order_value?: Money;
|
|
1539
|
-
buy_quantity?: number;
|
|
1540
|
-
get_quantity?: number;
|
|
1541
|
-
stackable: boolean;
|
|
1542
|
-
starts_at: string;
|
|
1543
|
-
ends_at: string;
|
|
1544
|
-
product_ids: string[];
|
|
1545
|
-
category_ids: string[];
|
|
1546
|
-
collection_ids: string[];
|
|
1547
|
-
}
|
|
1548
|
-
interface ProductDealInfo {
|
|
1549
|
-
product_id: string;
|
|
1550
|
-
deal_id: string;
|
|
1551
|
-
deal_name: string;
|
|
1552
|
-
benefit_type: DealBenefitType;
|
|
1553
|
-
value: Money;
|
|
1554
|
-
label: string;
|
|
1555
|
-
}
|
|
1556
|
-
interface DiscountValidation {
|
|
1557
|
-
is_eligible: boolean;
|
|
1558
|
-
discount_amount?: Money;
|
|
1559
|
-
deal?: Deal;
|
|
1560
|
-
ineligibility_reason?: string;
|
|
1561
|
-
}
|
|
1562
|
-
interface Tag {
|
|
1563
|
-
id: string;
|
|
1564
|
-
name: string;
|
|
1565
|
-
slug: string;
|
|
1566
|
-
color?: string;
|
|
1567
|
-
icon?: string;
|
|
1568
|
-
description?: string;
|
|
1569
|
-
tag_group?: string;
|
|
1570
|
-
sort_order: number;
|
|
1571
|
-
usage_count: number;
|
|
1572
|
-
created_at: string;
|
|
1573
|
-
updated_at: string;
|
|
1574
|
-
}
|
|
1575
|
-
interface TagsResponse {
|
|
1576
|
-
items: Tag[];
|
|
1577
|
-
total: number;
|
|
1578
|
-
limit: number;
|
|
1579
|
-
offset: number;
|
|
1580
|
-
}
|
|
1581
|
-
|
|
1582
|
-
export { type ComponentSelectionInput as $, type AddOn as A, type BenefitType as B, type BundleSelectionInput as C, type BundleStoredSelection as D, type BundleSummary as E, type BundleWithDetails as F, type Cart as G, type CartAddOn as H, type CartChannel as I, type CartItem as J, type CartItemDetails as K, type CartMutationResult as L, type CartNotice as M, type CartStatus as N, type CartSummary as O, type CartTotals as P, type Category as Q, type CategorySummary as R, type ChosenPrice as S, CimplifyError as T, type Collection as U, type CollectionProduct as V, type CollectionSummary as W, type ComponentGroup as X, type ComponentGroupWithComponents as Y, type ComponentPriceBreakdown as Z, type ComponentSchedulingData as _, type AddOnDetails as a, type ProductBillingPlan as a$, type ComponentSourceType as a0, type Composite as a1, type CompositeComponent as a2, type CompositeComponentView as a3, type CompositeGroupView as a4, type CompositePriceBreakdown as a5, type CompositePriceResult as a6, type CompositePricingMode as a7, type CompositeSelectionData as a8, type CompositeStoredSelection as a9, type FormattedPlanOption as aA, type GroupPricingBehavior as aB, INPUT_FIELD_TYPE as aC, IdempotencyMismatchError as aD, type InputFieldType as aE, type InputFieldValidation as aF, type InventoryType as aG, type KnowledgeArticle as aH, type LineConfiguration as aI, type LocationProductPrice as aJ, type LocationValue as aK, type MeasurementValue as aL, type Money as aM, PRODUCT_TYPE as aN, type Pagination as aO, type PaginationParams as aP, type PhoneValue as aQ, type Price as aR, type PriceAdjustment as aS, type PriceDecisionPath as aT, type PriceEntryType as aU, type PricePathTaxInfo as aV, type PriceSource as aW, type Product as aX, type ProductAddOn as aY, type ProductAvailability as aZ, type ProductAvailabilityNow as a_, type CompositeWithDetails as aa, type CurrencyCode as ab, type CustomAttributeDefinition as ac, type CustomAttributeValue as ad, type CustomerInputValue as ae, DURATION_UNIT as af, type DateRangeValue as ag, type Deal as ah, type DealBenefitType as ai, type DepositType as aj, type DigitalProductType as ak, type DiscountBreakdown as al, type DiscountDetails as am, type DiscountValidation as an, type DisplayAddOn as ao, type DisplayAddOnOption as ap, type DisplayCart as aq, type DisplayCartItem as ar, type DisplayMode as as, type DurationUnit as at, ERROR_HINTS as au, type EligiblePlansQuery as av, ErrorCode as aw, type ErrorCodeType as ax, type ErrorHint as ay, type FacetValue as az, type AddOnGroupDetails as b, type ProductDealInfo as b0, type ProductInputField as b1, type ProductProperty as b2, type ProductRenderHint as b3, type ProductTaxonomy as b4, type ProductTimeProfile as b5, type ProductType as b6, type ProductVariant as b7, type ProductVariantValue as b8, type ProductWithDetails as b9, type UICartPricing as bA, type UpcomingSale as bB, type UpdateCartItemInput as bC, type VariantAxis as bD, type VariantAxisSelection as bE, type VariantAxisValue as bF, type VariantAxisValueView as bG, type VariantAxisView as bH, type VariantAxisWithValues as bI, type VariantDetails as bJ, type VariantDetailsDTO as bK, type VariantDisplayAttribute as bL, type VariantLocationAvailability as bM, type VariantStrategy as bN, type VariantView as bO, ZERO as bP, currencyCode as bQ, enrichError as bR, getErrorHint as bS, isCimplifyError as bT, isIdempotencyMismatchError as bU, isQuoteConflictRequiringConsent as bV, isQuoteError as bW, isRetryableError as bX, isSupportedCurrency as bY, money as bZ, moneyFromNumber as b_, type PropertyFacet as ba, type PropertySource as bb, type QuantityPricingTier as bc, RENDER_HINT as bd, type RelatedProductView as be, type SaleCapInfo as bf, type SaleInfo as bg, type SalesChannel as bh, type SchedulingMode as bi, type SelectedAddOnOption as bj, type SemanticKind as bk, type SignatureValue as bl, type Subscription as bm, type SubscriptionInvoice as bn, type SubscriptionItem as bo, type SubscriptionStatus as bp, type SubscriptionWithDetails as bq, type Tag as br, type TagsResponse as bs, type TaxPathComponent as bt, type TaxonomyAttributeTemplate as bu, type TaxonomyWithChildren as bv, type UICart as bw, type UICartBusiness as bx, type UICartCustomer as by, type UICartLocation as bz, type AddOnOption as c, 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 BillingFrequency as p, type BillingMarkupType as q, type BillingPlanType as r, type Bundle as s, type BundleComponentData as t, type BundleComponentInfo as u, type BundleComponentVariantView as v, type BundleComponentView as w, type BundlePriceType as x, type BundleProduct as y, type BundleSelectionData as z };
|