@fire-spark/types 0.24.0 → 0.26.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/index.d.ts +904 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -165,6 +165,298 @@ type OrderTotals = {
|
|
|
165
165
|
tax_total: number;
|
|
166
166
|
total: number;
|
|
167
167
|
};
|
|
168
|
+
/** Order row as stored by the API (fulfillment walker and fee input). */
|
|
169
|
+
type OrderRecord = {
|
|
170
|
+
created_at: string;
|
|
171
|
+
updated_at: string;
|
|
172
|
+
deleted_at: string | null;
|
|
173
|
+
uid: string;
|
|
174
|
+
id: string;
|
|
175
|
+
merchant_id: string;
|
|
176
|
+
env: string;
|
|
177
|
+
brand_id?: string | null | undefined;
|
|
178
|
+
store_id: string;
|
|
179
|
+
channel_id: string;
|
|
180
|
+
customer_id: string;
|
|
181
|
+
fulfillment_id: string;
|
|
182
|
+
is_anonymous: boolean;
|
|
183
|
+
lines: {
|
|
184
|
+
type: "FEE" | "PRODUCT";
|
|
185
|
+
uid: string;
|
|
186
|
+
id: string;
|
|
187
|
+
parent_uid: string | null;
|
|
188
|
+
parent_id: string | null;
|
|
189
|
+
group_id?: string | undefined;
|
|
190
|
+
name: string;
|
|
191
|
+
image_url?: string | undefined;
|
|
192
|
+
menu_id?: string | undefined;
|
|
193
|
+
internal_attribution_source?: string | undefined;
|
|
194
|
+
internal_attribution_id?: string | undefined;
|
|
195
|
+
metadata: Record<string, unknown>;
|
|
196
|
+
bundled_items: {
|
|
197
|
+
id: string;
|
|
198
|
+
refund_price: number;
|
|
199
|
+
included_quantity: number;
|
|
200
|
+
}[];
|
|
201
|
+
redeem: {
|
|
202
|
+
reward_id: string;
|
|
203
|
+
quantity: number;
|
|
204
|
+
type?: "DISCOUNT" | "POINTS" | "PRODUCT" | undefined;
|
|
205
|
+
before_taxes?: boolean | undefined;
|
|
206
|
+
expires_at?: string | undefined;
|
|
207
|
+
payment_id: string;
|
|
208
|
+
amount: number;
|
|
209
|
+
}[];
|
|
210
|
+
quantity: number;
|
|
211
|
+
tax_rate: number | null;
|
|
212
|
+
discount_rate: number;
|
|
213
|
+
unit_subtotal: number;
|
|
214
|
+
unit_discount: number;
|
|
215
|
+
unit_tax_total: number;
|
|
216
|
+
unit_total: number;
|
|
217
|
+
subtotal: number;
|
|
218
|
+
discount_total: number;
|
|
219
|
+
tax_total: number;
|
|
220
|
+
total: number;
|
|
221
|
+
unit_group_subtotal: number;
|
|
222
|
+
unit_group_discount: number;
|
|
223
|
+
unit_group_tax_total: number;
|
|
224
|
+
unit_group_total: number;
|
|
225
|
+
group_subtotal: number;
|
|
226
|
+
group_discount: number;
|
|
227
|
+
group_tax_total: number;
|
|
228
|
+
group_total: number;
|
|
229
|
+
}[];
|
|
230
|
+
redeem: {
|
|
231
|
+
reward_id: string;
|
|
232
|
+
quantity: number;
|
|
233
|
+
type?: "DISCOUNT" | "POINTS" | "PRODUCT" | undefined;
|
|
234
|
+
before_taxes?: boolean | undefined;
|
|
235
|
+
expires_at?: string | undefined;
|
|
236
|
+
payment_id: string;
|
|
237
|
+
amount: number;
|
|
238
|
+
}[];
|
|
239
|
+
redemption_steps: {
|
|
240
|
+
reward_id: string;
|
|
241
|
+
reward_quantity: number;
|
|
242
|
+
payment_id: string;
|
|
243
|
+
type?: "DISCOUNT" | "POINTS" | "PRODUCT" | undefined;
|
|
244
|
+
before_taxes: boolean;
|
|
245
|
+
target: "LINE" | "ORDER";
|
|
246
|
+
target_id?: string | undefined;
|
|
247
|
+
action: "CREATE" | "DELETE" | "READ" | "UPDATE";
|
|
248
|
+
discount_amount: number;
|
|
249
|
+
before: {
|
|
250
|
+
value: number;
|
|
251
|
+
quantity: number;
|
|
252
|
+
discount_amount: number;
|
|
253
|
+
discount_rate: number;
|
|
254
|
+
};
|
|
255
|
+
after: {
|
|
256
|
+
value: number;
|
|
257
|
+
quantity: number;
|
|
258
|
+
discount_amount: number;
|
|
259
|
+
discount_rate: number;
|
|
260
|
+
};
|
|
261
|
+
target_before?: {
|
|
262
|
+
value: number;
|
|
263
|
+
quantity: number;
|
|
264
|
+
discount_amount: number;
|
|
265
|
+
discount_rate: number;
|
|
266
|
+
} | undefined;
|
|
267
|
+
target_after?: {
|
|
268
|
+
value: number;
|
|
269
|
+
quantity: number;
|
|
270
|
+
discount_amount: number;
|
|
271
|
+
discount_rate: number;
|
|
272
|
+
} | undefined;
|
|
273
|
+
error?: string | undefined;
|
|
274
|
+
}[];
|
|
275
|
+
customer: {
|
|
276
|
+
customer_info: {
|
|
277
|
+
display_name: string;
|
|
278
|
+
first_name: string;
|
|
279
|
+
middle_name?: string | undefined;
|
|
280
|
+
last_name: string;
|
|
281
|
+
second_last_name?: string | undefined;
|
|
282
|
+
email: string;
|
|
283
|
+
phone: string;
|
|
284
|
+
gender?: "FEMALE" | "MALE" | undefined;
|
|
285
|
+
dob?: string | undefined;
|
|
286
|
+
document_type?: "CI" | "DNI" | "OTHER" | "PASSPORT" | "RUC" | undefined;
|
|
287
|
+
document_number?: string | undefined;
|
|
288
|
+
city?: string | undefined;
|
|
289
|
+
country?: string | undefined;
|
|
290
|
+
metadata?: Record<string, unknown> | undefined;
|
|
291
|
+
};
|
|
292
|
+
address_info?: {
|
|
293
|
+
address_line1: string;
|
|
294
|
+
address_line2?: string | undefined;
|
|
295
|
+
city?: string | undefined;
|
|
296
|
+
state?: string | undefined;
|
|
297
|
+
zip?: string | undefined;
|
|
298
|
+
country?: string | undefined;
|
|
299
|
+
reference?: string | undefined;
|
|
300
|
+
latitude?: number | undefined;
|
|
301
|
+
longitude?: number | undefined;
|
|
302
|
+
instructions?: string | undefined;
|
|
303
|
+
metadata: Record<string, unknown> | null;
|
|
304
|
+
} | null | undefined;
|
|
305
|
+
billing_info?: {
|
|
306
|
+
type: "BUSINESS" | "INDIVIDUAL";
|
|
307
|
+
legal_name: string;
|
|
308
|
+
address_line1: string;
|
|
309
|
+
address_line2?: string | undefined;
|
|
310
|
+
city?: string | undefined;
|
|
311
|
+
state?: string | undefined;
|
|
312
|
+
zip?: string | undefined;
|
|
313
|
+
country?: string | undefined;
|
|
314
|
+
tax_id: string;
|
|
315
|
+
tax_id_type: "CI" | "CNPJ" | "CPF" | "CUIT" | "DNI" | "EIN" | "NIF" | "NIT" | "OTHER" | "PASSPORT" | "RCN" | "RUC" | "RUT" | "SSN" | "TIN" | "VAT";
|
|
316
|
+
metadata: Record<string, unknown> | null;
|
|
317
|
+
} | null | undefined;
|
|
318
|
+
};
|
|
319
|
+
payment_intents: {
|
|
320
|
+
id: string;
|
|
321
|
+
status: "ABANDONED" | "COMPLETED" | "DRAFT" | "LOCKED";
|
|
322
|
+
is_mixed: boolean;
|
|
323
|
+
rules_snapshot: {
|
|
324
|
+
enabled: boolean;
|
|
325
|
+
max_methods: number;
|
|
326
|
+
max_items_per_method: number | null;
|
|
327
|
+
max_amount_per_method: number | null;
|
|
328
|
+
per_method: Partial<Record<"BANK_TRANSFER" | "CARD" | "CASH" | "FINANCING" | "PIN_PAD" | "WALLET", {
|
|
329
|
+
max_amount: number | null;
|
|
330
|
+
max_items: number | null;
|
|
331
|
+
}>>;
|
|
332
|
+
} | null;
|
|
333
|
+
primary_tender_id: string | null;
|
|
334
|
+
totals: {
|
|
335
|
+
currency: string;
|
|
336
|
+
subtotal: number;
|
|
337
|
+
discount_rate: number;
|
|
338
|
+
discount_total: number;
|
|
339
|
+
tax_rate: number;
|
|
340
|
+
tax_total: number;
|
|
341
|
+
total: number;
|
|
342
|
+
};
|
|
343
|
+
placed_at: string | null;
|
|
344
|
+
resolved_at?: string | undefined;
|
|
345
|
+
metadata: Record<string, unknown>;
|
|
346
|
+
tenders: {
|
|
347
|
+
id: string;
|
|
348
|
+
sequence: number;
|
|
349
|
+
attempt_reference: string;
|
|
350
|
+
previous_attempt_references: string[];
|
|
351
|
+
method: "BANK_TRANSFER" | "CARD" | "CASH" | "FINANCING" | "PIN_PAD" | "REDEMPTION" | "WALLET";
|
|
352
|
+
provider: "amipass" | "cashea" | "clisitef" | "credibanco" | "datafast" | "deuna" | "edenred" | "firespark" | "kushki" | "mach" | "medianet" | "mercadopago" | "mxp_paybridge" | "niubiz" | "nuvei" | "pagoplux" | "paymentez" | "paymentz" | "paypal" | "payphone" | "place_to_pay" | "pluxee" | "posnet" | "redeban" | "rutpay" | "sitef_venezuela" | "stripe" | "transbank" | "yape";
|
|
353
|
+
payment_id?: string | undefined;
|
|
354
|
+
collect_at: "COUNTER" | "DEVICE" | "DOOR" | "KIOSK" | "OTHER";
|
|
355
|
+
status: "CANCELLED" | "FAILED" | "IDLE" | "PAID" | "PENDING" | "REFUNDED";
|
|
356
|
+
amount: {
|
|
357
|
+
currency: string;
|
|
358
|
+
total: number;
|
|
359
|
+
};
|
|
360
|
+
refunded_total: number;
|
|
361
|
+
allocation: {
|
|
362
|
+
lines: {
|
|
363
|
+
line_uid: string;
|
|
364
|
+
units?: number | undefined;
|
|
365
|
+
}[];
|
|
366
|
+
fees: string[];
|
|
367
|
+
amounts: {
|
|
368
|
+
line_uid: string;
|
|
369
|
+
units?: number | undefined;
|
|
370
|
+
total: number;
|
|
371
|
+
children: {
|
|
372
|
+
line_uid: string;
|
|
373
|
+
quantity: number;
|
|
374
|
+
total: number;
|
|
375
|
+
}[];
|
|
376
|
+
}[];
|
|
377
|
+
} | null;
|
|
378
|
+
details: {
|
|
379
|
+
method: "REDEMPTION";
|
|
380
|
+
rewards: {
|
|
381
|
+
reward_id: string;
|
|
382
|
+
quantity: number;
|
|
383
|
+
amount: number;
|
|
384
|
+
}[];
|
|
385
|
+
amount: number;
|
|
386
|
+
loyalty_transaction_id?: string | undefined;
|
|
387
|
+
} | {
|
|
388
|
+
brand: string;
|
|
389
|
+
last4: string;
|
|
390
|
+
auth_code?: string | undefined;
|
|
391
|
+
installments?: number | undefined;
|
|
392
|
+
method: "CARD";
|
|
393
|
+
} | {
|
|
394
|
+
brand: string;
|
|
395
|
+
last4: string;
|
|
396
|
+
auth_code?: string | undefined;
|
|
397
|
+
installments?: number | undefined;
|
|
398
|
+
method: "PIN_PAD";
|
|
399
|
+
terminal_id: string;
|
|
400
|
+
} | {
|
|
401
|
+
method: "CASH";
|
|
402
|
+
tendered: number;
|
|
403
|
+
change: number;
|
|
404
|
+
} | {
|
|
405
|
+
method: "BANK_TRANSFER";
|
|
406
|
+
reference: string;
|
|
407
|
+
bank?: string | undefined;
|
|
408
|
+
} | {
|
|
409
|
+
method: "WALLET";
|
|
410
|
+
wallet: string;
|
|
411
|
+
reference: string;
|
|
412
|
+
} | {
|
|
413
|
+
method: "FINANCING";
|
|
414
|
+
provider_reference: string;
|
|
415
|
+
installments: number;
|
|
416
|
+
} | {
|
|
417
|
+
method: "REDEMPTION";
|
|
418
|
+
rewards: {
|
|
419
|
+
reward_id: string;
|
|
420
|
+
quantity: number;
|
|
421
|
+
amount: number;
|
|
422
|
+
}[];
|
|
423
|
+
loyalty_transaction_id?: string | undefined;
|
|
424
|
+
amount: number;
|
|
425
|
+
} | {
|
|
426
|
+
method: "REDEMPTION";
|
|
427
|
+
loyalty_transaction_id?: string | undefined;
|
|
428
|
+
rewards: {
|
|
429
|
+
reward_id: string;
|
|
430
|
+
quantity: number;
|
|
431
|
+
amount: number;
|
|
432
|
+
}[];
|
|
433
|
+
amount: number;
|
|
434
|
+
} | null;
|
|
435
|
+
replaces_tender_id?: string | undefined;
|
|
436
|
+
error_message?: string | undefined;
|
|
437
|
+
placed_at: string | null;
|
|
438
|
+
resolved_at?: string | undefined;
|
|
439
|
+
metadata: Record<string, unknown>;
|
|
440
|
+
}[];
|
|
441
|
+
}[];
|
|
442
|
+
totals: {
|
|
443
|
+
currency: string;
|
|
444
|
+
subtotal: number;
|
|
445
|
+
discount_rate: number;
|
|
446
|
+
discount_total: number;
|
|
447
|
+
tax_rate: number;
|
|
448
|
+
tax_total: number;
|
|
449
|
+
total: number;
|
|
450
|
+
};
|
|
451
|
+
metadata: Record<string, unknown>;
|
|
452
|
+
payment_status: "CANCELLED" | "FAILED" | "IDLE" | "PAID" | "PENDING" | "REFUNDED";
|
|
453
|
+
fulfillment_status: string;
|
|
454
|
+
status: "CANCELLED" | "CLOSED" | "COMPLETED" | "OPEN" | "REFUNDED" | "REVERSED" | "VOIDED";
|
|
455
|
+
issued_at?: string | null | undefined;
|
|
456
|
+
resolved_at?: string | null | undefined;
|
|
457
|
+
device_id?: string | null | undefined;
|
|
458
|
+
scheduled_at?: string | null | undefined;
|
|
459
|
+
};
|
|
168
460
|
/** Storefront order (`GET` / `POST` / `PATCH` response `data`). */
|
|
169
461
|
type Order = {
|
|
170
462
|
uid: string;
|
|
@@ -2941,6 +3233,616 @@ type PlaceOrderResult = {
|
|
|
2941
3233
|
order_fulfillment_id: string;
|
|
2942
3234
|
status: "ACCEPTED" | "EXISTS" | "IN_PROGRESS";
|
|
2943
3235
|
};
|
|
3236
|
+
/** Fulfillment graph copied onto an order, with visit and log state. */
|
|
3237
|
+
type OrderFulfillmentWorkflow = {
|
|
3238
|
+
nodes: {
|
|
3239
|
+
id: string;
|
|
3240
|
+
type: "fulfillmentStep";
|
|
3241
|
+
position: {
|
|
3242
|
+
x: number;
|
|
3243
|
+
y: number;
|
|
3244
|
+
};
|
|
3245
|
+
data: {
|
|
3246
|
+
kind: "join" | "start" | "state" | "terminal";
|
|
3247
|
+
label: Record<string, string>;
|
|
3248
|
+
description?: Record<string, string> | undefined;
|
|
3249
|
+
mappedStatus: string;
|
|
3250
|
+
milestone?: string | undefined;
|
|
3251
|
+
checkout_release?: boolean | undefined;
|
|
3252
|
+
payment_scope?: "digital" | "in_person" | undefined;
|
|
3253
|
+
joinPolicy?: "all" | "any" | undefined;
|
|
3254
|
+
actions?: {
|
|
3255
|
+
id: string;
|
|
3256
|
+
type: "invoke_callback" | "notify_webhook";
|
|
3257
|
+
webhook_ids?: string[] | undefined;
|
|
3258
|
+
callback_ids?: string[] | undefined;
|
|
3259
|
+
}[] | undefined;
|
|
3260
|
+
entered_at?: string | undefined;
|
|
3261
|
+
ready_at?: string | undefined;
|
|
3262
|
+
advance_requested_at?: string | undefined;
|
|
3263
|
+
resumed_at?: string | undefined;
|
|
3264
|
+
exited_at?: string | undefined;
|
|
3265
|
+
skipped_at?: string | undefined;
|
|
3266
|
+
logs?: {
|
|
3267
|
+
type: "error" | "info" | "success" | "warning";
|
|
3268
|
+
message: string;
|
|
3269
|
+
at: string;
|
|
3270
|
+
actor_name?: string | undefined;
|
|
3271
|
+
actor_avatar_url?: string | undefined;
|
|
3272
|
+
}[] | undefined;
|
|
3273
|
+
callback_run?: {
|
|
3274
|
+
attempt: number;
|
|
3275
|
+
errors: {
|
|
3276
|
+
attempt: number;
|
|
3277
|
+
at: string;
|
|
3278
|
+
message: string;
|
|
3279
|
+
status?: number | undefined;
|
|
3280
|
+
body?: unknown;
|
|
3281
|
+
started_at?: string | undefined;
|
|
3282
|
+
duration_ms?: number | undefined;
|
|
3283
|
+
}[];
|
|
3284
|
+
response?: unknown;
|
|
3285
|
+
started_at?: string | undefined;
|
|
3286
|
+
finished_at?: string | undefined;
|
|
3287
|
+
duration_ms?: number | undefined;
|
|
3288
|
+
} | undefined;
|
|
3289
|
+
webhook_runs?: {
|
|
3290
|
+
id: string;
|
|
3291
|
+
webhook_id: string;
|
|
3292
|
+
alias?: string | null | undefined;
|
|
3293
|
+
url: string;
|
|
3294
|
+
type: string;
|
|
3295
|
+
status: string;
|
|
3296
|
+
started_at: string;
|
|
3297
|
+
finished_at: string;
|
|
3298
|
+
duration_ms: number;
|
|
3299
|
+
ok: boolean;
|
|
3300
|
+
http_status?: number | undefined;
|
|
3301
|
+
error?: string | undefined;
|
|
3302
|
+
payload?: {
|
|
3303
|
+
id: string;
|
|
3304
|
+
type: string;
|
|
3305
|
+
created_at: string;
|
|
3306
|
+
data: Record<string, unknown>;
|
|
3307
|
+
} | undefined;
|
|
3308
|
+
idempotency_key?: string | undefined;
|
|
3309
|
+
resent_by?: string | undefined;
|
|
3310
|
+
}[] | undefined;
|
|
3311
|
+
manual_advance?: {
|
|
3312
|
+
reason: string;
|
|
3313
|
+
to_status: string;
|
|
3314
|
+
at: string;
|
|
3315
|
+
actor_name?: string | undefined;
|
|
3316
|
+
actor_avatar_url?: string | undefined;
|
|
3317
|
+
} | undefined;
|
|
3318
|
+
};
|
|
3319
|
+
}[];
|
|
3320
|
+
edges: {
|
|
3321
|
+
id: string;
|
|
3322
|
+
source: string;
|
|
3323
|
+
target: string;
|
|
3324
|
+
type?: "fulfillmentEdge" | undefined;
|
|
3325
|
+
sourceHandle?: string | null | undefined;
|
|
3326
|
+
targetHandle?: string | null | undefined;
|
|
3327
|
+
data?: {
|
|
3328
|
+
label?: string | undefined;
|
|
3329
|
+
pathKind?: "cancel" | "default" | "refund" | "success" | undefined;
|
|
3330
|
+
conditions?: ({
|
|
3331
|
+
interpretation?: "both" | "client" | "server" | undefined;
|
|
3332
|
+
product_id?: string | undefined;
|
|
3333
|
+
tag?: string | undefined;
|
|
3334
|
+
fulfillment_id: string;
|
|
3335
|
+
store_id: string;
|
|
3336
|
+
channel_id: string;
|
|
3337
|
+
brand_id: string;
|
|
3338
|
+
primitive: "string";
|
|
3339
|
+
type: "Failure message" | "Order includes product with tag" | "Request path";
|
|
3340
|
+
operator: "contains" | "ends with" | "equal to" | "is all of" | "is any of" | "is none of" | "not equal to" | "starts with";
|
|
3341
|
+
caseInsensitive?: boolean | undefined;
|
|
3342
|
+
value: string | string[];
|
|
3343
|
+
invalidMessage?: string | undefined;
|
|
3344
|
+
} | {
|
|
3345
|
+
interpretation?: "both" | "client" | "server" | undefined;
|
|
3346
|
+
product_id?: string | undefined;
|
|
3347
|
+
tag?: string | undefined;
|
|
3348
|
+
fulfillment_id: string;
|
|
3349
|
+
store_id: string;
|
|
3350
|
+
channel_id: string;
|
|
3351
|
+
brand_id: string;
|
|
3352
|
+
primitive: "number";
|
|
3353
|
+
type: "API error rate" | "Accumulated events" | "Cart product count" | "Customer age" | "HTTP status" | "Order includes product" | "Order includes product with tag";
|
|
3354
|
+
operator: "equal to" | "greater than" | "greater than or equal to" | "is all of" | "is any of" | "is none of" | "less than" | "less than or equal to" | "not equal to";
|
|
3355
|
+
value: number | number[];
|
|
3356
|
+
include_modifiers?: boolean | undefined;
|
|
3357
|
+
window_minutes?: number | undefined;
|
|
3358
|
+
invalidMessage?: string | undefined;
|
|
3359
|
+
} | {
|
|
3360
|
+
interpretation?: "both" | "client" | "server" | undefined;
|
|
3361
|
+
product_id?: string | undefined;
|
|
3362
|
+
tag?: string | undefined;
|
|
3363
|
+
fulfillment_id: string;
|
|
3364
|
+
store_id: string;
|
|
3365
|
+
channel_id: string;
|
|
3366
|
+
brand_id: string;
|
|
3367
|
+
primitive: "currency";
|
|
3368
|
+
type: "Order includes product with tag" | "Order total";
|
|
3369
|
+
operator: "equal to" | "greater than" | "greater than or equal to" | "less than" | "less than or equal to" | "not equal to";
|
|
3370
|
+
value: number;
|
|
3371
|
+
invalidMessage?: string | undefined;
|
|
3372
|
+
} | {
|
|
3373
|
+
interpretation?: "both" | "client" | "server" | undefined;
|
|
3374
|
+
product_id?: string | undefined;
|
|
3375
|
+
tag?: string | undefined;
|
|
3376
|
+
fulfillment_id: string;
|
|
3377
|
+
store_id: string;
|
|
3378
|
+
channel_id: string;
|
|
3379
|
+
brand_id: string;
|
|
3380
|
+
primitive: "boolean";
|
|
3381
|
+
type: "Customer is anonymous" | "Is anonymous order" | "Order includes product with tag" | "Order is scheduled" | "Payment captured" | "Payment is mixed";
|
|
3382
|
+
operator: "is" | "is not";
|
|
3383
|
+
value: boolean;
|
|
3384
|
+
invalidMessage?: string | undefined;
|
|
3385
|
+
} | {
|
|
3386
|
+
interpretation?: "both" | "client" | "server" | undefined;
|
|
3387
|
+
primitive: "enum";
|
|
3388
|
+
type: "Payment collect at" | "Payment method" | "Payment status";
|
|
3389
|
+
operator: "is" | "is any of" | "is none of" | "is not";
|
|
3390
|
+
value: string | string[];
|
|
3391
|
+
invalidMessage?: string | undefined;
|
|
3392
|
+
} | {
|
|
3393
|
+
interpretation?: "both" | "client" | "server" | undefined;
|
|
3394
|
+
primitive: "absolute date";
|
|
3395
|
+
type: "Today";
|
|
3396
|
+
operator: "is" | "is after" | "is before" | "is not";
|
|
3397
|
+
value: Date;
|
|
3398
|
+
invalidMessage?: string | undefined;
|
|
3399
|
+
} | {
|
|
3400
|
+
interpretation?: "both" | "client" | "server" | undefined;
|
|
3401
|
+
primitive: "relative date";
|
|
3402
|
+
type: "Birthday" | "Customer last session" | "Customer last visit" | "Registration";
|
|
3403
|
+
operator: "occurred" | "occurred in the last" | "occurred more than";
|
|
3404
|
+
value: string;
|
|
3405
|
+
invalidMessage?: string | undefined;
|
|
3406
|
+
} | {
|
|
3407
|
+
interpretation?: "both" | "client" | "server" | undefined;
|
|
3408
|
+
primitive: "recurring date";
|
|
3409
|
+
type: "Current date";
|
|
3410
|
+
operator: "falls within period";
|
|
3411
|
+
startDate: Date;
|
|
3412
|
+
endDate: Date;
|
|
3413
|
+
allDay: boolean;
|
|
3414
|
+
repeat: "CUSTOM" | "DAILY" | "FORTNIGHTLY" | "LAST_DAY_OF_MONTH" | "MONTHLY" | "NONE" | "WEEKDAYS" | "WEEKENDS" | "WEEKLY" | "WEEK_OF_MONTH";
|
|
3415
|
+
value: string;
|
|
3416
|
+
invalidMessage?: string | undefined;
|
|
3417
|
+
} | {
|
|
3418
|
+
interpretation?: "both" | "client" | "server" | undefined;
|
|
3419
|
+
primitive: "custom";
|
|
3420
|
+
type: "Brand" | "Brands" | "Channel" | "Channels" | "Fulfillment" | "Fulfillments" | "Payment" | "Store" | "Stores";
|
|
3421
|
+
operator: "is" | "is all of" | "is any of" | "is none of" | "is not";
|
|
3422
|
+
value: string;
|
|
3423
|
+
label_ids?: string[] | undefined;
|
|
3424
|
+
invalidMessage?: string | undefined;
|
|
3425
|
+
})[][] | undefined;
|
|
3426
|
+
taken_at?: string | undefined;
|
|
3427
|
+
} | undefined;
|
|
3428
|
+
}[];
|
|
3429
|
+
viewport?: {
|
|
3430
|
+
x: number;
|
|
3431
|
+
y: number;
|
|
3432
|
+
zoom: number;
|
|
3433
|
+
} | undefined;
|
|
3434
|
+
};
|
|
3435
|
+
type OrderFulfillmentWorkflowNode = {
|
|
3436
|
+
id: string;
|
|
3437
|
+
type: "fulfillmentStep";
|
|
3438
|
+
position: {
|
|
3439
|
+
x: number;
|
|
3440
|
+
y: number;
|
|
3441
|
+
};
|
|
3442
|
+
data: {
|
|
3443
|
+
kind: "join" | "start" | "state" | "terminal";
|
|
3444
|
+
label: Record<string, string>;
|
|
3445
|
+
description?: Record<string, string> | undefined;
|
|
3446
|
+
mappedStatus: string;
|
|
3447
|
+
milestone?: string | undefined;
|
|
3448
|
+
checkout_release?: boolean | undefined;
|
|
3449
|
+
payment_scope?: "digital" | "in_person" | undefined;
|
|
3450
|
+
joinPolicy?: "all" | "any" | undefined;
|
|
3451
|
+
actions?: {
|
|
3452
|
+
id: string;
|
|
3453
|
+
type: "invoke_callback" | "notify_webhook";
|
|
3454
|
+
webhook_ids?: string[] | undefined;
|
|
3455
|
+
callback_ids?: string[] | undefined;
|
|
3456
|
+
}[] | undefined;
|
|
3457
|
+
entered_at?: string | undefined;
|
|
3458
|
+
ready_at?: string | undefined;
|
|
3459
|
+
advance_requested_at?: string | undefined;
|
|
3460
|
+
resumed_at?: string | undefined;
|
|
3461
|
+
exited_at?: string | undefined;
|
|
3462
|
+
skipped_at?: string | undefined;
|
|
3463
|
+
logs?: {
|
|
3464
|
+
type: "error" | "info" | "success" | "warning";
|
|
3465
|
+
message: string;
|
|
3466
|
+
at: string;
|
|
3467
|
+
actor_name?: string | undefined;
|
|
3468
|
+
actor_avatar_url?: string | undefined;
|
|
3469
|
+
}[] | undefined;
|
|
3470
|
+
callback_run?: {
|
|
3471
|
+
attempt: number;
|
|
3472
|
+
errors: {
|
|
3473
|
+
attempt: number;
|
|
3474
|
+
at: string;
|
|
3475
|
+
message: string;
|
|
3476
|
+
status?: number | undefined;
|
|
3477
|
+
body?: unknown;
|
|
3478
|
+
started_at?: string | undefined;
|
|
3479
|
+
duration_ms?: number | undefined;
|
|
3480
|
+
}[];
|
|
3481
|
+
response?: unknown;
|
|
3482
|
+
started_at?: string | undefined;
|
|
3483
|
+
finished_at?: string | undefined;
|
|
3484
|
+
duration_ms?: number | undefined;
|
|
3485
|
+
} | undefined;
|
|
3486
|
+
webhook_runs?: {
|
|
3487
|
+
id: string;
|
|
3488
|
+
webhook_id: string;
|
|
3489
|
+
alias?: string | null | undefined;
|
|
3490
|
+
url: string;
|
|
3491
|
+
type: string;
|
|
3492
|
+
status: string;
|
|
3493
|
+
started_at: string;
|
|
3494
|
+
finished_at: string;
|
|
3495
|
+
duration_ms: number;
|
|
3496
|
+
ok: boolean;
|
|
3497
|
+
http_status?: number | undefined;
|
|
3498
|
+
error?: string | undefined;
|
|
3499
|
+
payload?: {
|
|
3500
|
+
id: string;
|
|
3501
|
+
type: string;
|
|
3502
|
+
created_at: string;
|
|
3503
|
+
data: Record<string, unknown>;
|
|
3504
|
+
} | undefined;
|
|
3505
|
+
idempotency_key?: string | undefined;
|
|
3506
|
+
resent_by?: string | undefined;
|
|
3507
|
+
}[] | undefined;
|
|
3508
|
+
manual_advance?: {
|
|
3509
|
+
reason: string;
|
|
3510
|
+
to_status: string;
|
|
3511
|
+
at: string;
|
|
3512
|
+
actor_name?: string | undefined;
|
|
3513
|
+
actor_avatar_url?: string | undefined;
|
|
3514
|
+
} | undefined;
|
|
3515
|
+
};
|
|
3516
|
+
};
|
|
3517
|
+
type OrderFulfillmentWorkflowEdge = {
|
|
3518
|
+
id: string;
|
|
3519
|
+
source: string;
|
|
3520
|
+
target: string;
|
|
3521
|
+
type?: "fulfillmentEdge" | undefined;
|
|
3522
|
+
sourceHandle?: string | null | undefined;
|
|
3523
|
+
targetHandle?: string | null | undefined;
|
|
3524
|
+
data?: {
|
|
3525
|
+
label?: string | undefined;
|
|
3526
|
+
pathKind?: "cancel" | "default" | "refund" | "success" | undefined;
|
|
3527
|
+
conditions?: ({
|
|
3528
|
+
interpretation?: "both" | "client" | "server" | undefined;
|
|
3529
|
+
product_id?: string | undefined;
|
|
3530
|
+
tag?: string | undefined;
|
|
3531
|
+
fulfillment_id: string;
|
|
3532
|
+
store_id: string;
|
|
3533
|
+
channel_id: string;
|
|
3534
|
+
brand_id: string;
|
|
3535
|
+
primitive: "string";
|
|
3536
|
+
type: "Failure message" | "Order includes product with tag" | "Request path";
|
|
3537
|
+
operator: "contains" | "ends with" | "equal to" | "is all of" | "is any of" | "is none of" | "not equal to" | "starts with";
|
|
3538
|
+
caseInsensitive?: boolean | undefined;
|
|
3539
|
+
value: string | string[];
|
|
3540
|
+
invalidMessage?: string | undefined;
|
|
3541
|
+
} | {
|
|
3542
|
+
interpretation?: "both" | "client" | "server" | undefined;
|
|
3543
|
+
product_id?: string | undefined;
|
|
3544
|
+
tag?: string | undefined;
|
|
3545
|
+
fulfillment_id: string;
|
|
3546
|
+
store_id: string;
|
|
3547
|
+
channel_id: string;
|
|
3548
|
+
brand_id: string;
|
|
3549
|
+
primitive: "number";
|
|
3550
|
+
type: "API error rate" | "Accumulated events" | "Cart product count" | "Customer age" | "HTTP status" | "Order includes product" | "Order includes product with tag";
|
|
3551
|
+
operator: "equal to" | "greater than" | "greater than or equal to" | "is all of" | "is any of" | "is none of" | "less than" | "less than or equal to" | "not equal to";
|
|
3552
|
+
value: number | number[];
|
|
3553
|
+
include_modifiers?: boolean | undefined;
|
|
3554
|
+
window_minutes?: number | undefined;
|
|
3555
|
+
invalidMessage?: string | undefined;
|
|
3556
|
+
} | {
|
|
3557
|
+
interpretation?: "both" | "client" | "server" | undefined;
|
|
3558
|
+
product_id?: string | undefined;
|
|
3559
|
+
tag?: string | undefined;
|
|
3560
|
+
fulfillment_id: string;
|
|
3561
|
+
store_id: string;
|
|
3562
|
+
channel_id: string;
|
|
3563
|
+
brand_id: string;
|
|
3564
|
+
primitive: "currency";
|
|
3565
|
+
type: "Order includes product with tag" | "Order total";
|
|
3566
|
+
operator: "equal to" | "greater than" | "greater than or equal to" | "less than" | "less than or equal to" | "not equal to";
|
|
3567
|
+
value: number;
|
|
3568
|
+
invalidMessage?: string | undefined;
|
|
3569
|
+
} | {
|
|
3570
|
+
interpretation?: "both" | "client" | "server" | undefined;
|
|
3571
|
+
product_id?: string | undefined;
|
|
3572
|
+
tag?: string | undefined;
|
|
3573
|
+
fulfillment_id: string;
|
|
3574
|
+
store_id: string;
|
|
3575
|
+
channel_id: string;
|
|
3576
|
+
brand_id: string;
|
|
3577
|
+
primitive: "boolean";
|
|
3578
|
+
type: "Customer is anonymous" | "Is anonymous order" | "Order includes product with tag" | "Order is scheduled" | "Payment captured" | "Payment is mixed";
|
|
3579
|
+
operator: "is" | "is not";
|
|
3580
|
+
value: boolean;
|
|
3581
|
+
invalidMessage?: string | undefined;
|
|
3582
|
+
} | {
|
|
3583
|
+
interpretation?: "both" | "client" | "server" | undefined;
|
|
3584
|
+
primitive: "enum";
|
|
3585
|
+
type: "Payment collect at" | "Payment method" | "Payment status";
|
|
3586
|
+
operator: "is" | "is any of" | "is none of" | "is not";
|
|
3587
|
+
value: string | string[];
|
|
3588
|
+
invalidMessage?: string | undefined;
|
|
3589
|
+
} | {
|
|
3590
|
+
interpretation?: "both" | "client" | "server" | undefined;
|
|
3591
|
+
primitive: "absolute date";
|
|
3592
|
+
type: "Today";
|
|
3593
|
+
operator: "is" | "is after" | "is before" | "is not";
|
|
3594
|
+
value: Date;
|
|
3595
|
+
invalidMessage?: string | undefined;
|
|
3596
|
+
} | {
|
|
3597
|
+
interpretation?: "both" | "client" | "server" | undefined;
|
|
3598
|
+
primitive: "relative date";
|
|
3599
|
+
type: "Birthday" | "Customer last session" | "Customer last visit" | "Registration";
|
|
3600
|
+
operator: "occurred" | "occurred in the last" | "occurred more than";
|
|
3601
|
+
value: string;
|
|
3602
|
+
invalidMessage?: string | undefined;
|
|
3603
|
+
} | {
|
|
3604
|
+
interpretation?: "both" | "client" | "server" | undefined;
|
|
3605
|
+
primitive: "recurring date";
|
|
3606
|
+
type: "Current date";
|
|
3607
|
+
operator: "falls within period";
|
|
3608
|
+
startDate: Date;
|
|
3609
|
+
endDate: Date;
|
|
3610
|
+
allDay: boolean;
|
|
3611
|
+
repeat: "CUSTOM" | "DAILY" | "FORTNIGHTLY" | "LAST_DAY_OF_MONTH" | "MONTHLY" | "NONE" | "WEEKDAYS" | "WEEKENDS" | "WEEKLY" | "WEEK_OF_MONTH";
|
|
3612
|
+
value: string;
|
|
3613
|
+
invalidMessage?: string | undefined;
|
|
3614
|
+
} | {
|
|
3615
|
+
interpretation?: "both" | "client" | "server" | undefined;
|
|
3616
|
+
primitive: "custom";
|
|
3617
|
+
type: "Brand" | "Brands" | "Channel" | "Channels" | "Fulfillment" | "Fulfillments" | "Payment" | "Store" | "Stores";
|
|
3618
|
+
operator: "is" | "is all of" | "is any of" | "is none of" | "is not";
|
|
3619
|
+
value: string;
|
|
3620
|
+
label_ids?: string[] | undefined;
|
|
3621
|
+
invalidMessage?: string | undefined;
|
|
3622
|
+
})[][] | undefined;
|
|
3623
|
+
taken_at?: string | undefined;
|
|
3624
|
+
} | undefined;
|
|
3625
|
+
};
|
|
3626
|
+
//#endregion
|
|
3627
|
+
//#region .flat/src/fees.d.ts
|
|
3628
|
+
/** Merchant fee (conditions and effects) as returned by the API. */
|
|
3629
|
+
type Fee = {
|
|
3630
|
+
id: string;
|
|
3631
|
+
merchant_id: string;
|
|
3632
|
+
env: string;
|
|
3633
|
+
name: Record<string, string>;
|
|
3634
|
+
description?: Record<string, string> | null | undefined;
|
|
3635
|
+
effects: ({
|
|
3636
|
+
requirement: "OPTIONAL" | "REQUIRED";
|
|
3637
|
+
rounding: "DOWN" | "HALF_DOWN" | "HALF_NEAREST" | "HALF_UP" | "NEAREST" | "NONE" | "QUARTER_DOWN" | "QUARTER_NEAREST" | "QUARTER_UP" | "UP" | "WHOLE_DOWN" | "WHOLE_NEAREST" | "WHOLE_UP";
|
|
3638
|
+
taxable: boolean;
|
|
3639
|
+
tax_inclusive: boolean;
|
|
3640
|
+
tax_rate: number;
|
|
3641
|
+
based_on: "FIXED";
|
|
3642
|
+
amount: number;
|
|
3643
|
+
} | {
|
|
3644
|
+
requirement: "OPTIONAL" | "REQUIRED";
|
|
3645
|
+
rounding: "DOWN" | "HALF_DOWN" | "HALF_NEAREST" | "HALF_UP" | "NEAREST" | "NONE" | "QUARTER_DOWN" | "QUARTER_NEAREST" | "QUARTER_UP" | "UP" | "WHOLE_DOWN" | "WHOLE_NEAREST" | "WHOLE_UP";
|
|
3646
|
+
taxable: boolean;
|
|
3647
|
+
tax_inclusive: boolean;
|
|
3648
|
+
tax_rate: number;
|
|
3649
|
+
based_on: "TIPS";
|
|
3650
|
+
min: number;
|
|
3651
|
+
max: number;
|
|
3652
|
+
} | {
|
|
3653
|
+
requirement: "OPTIONAL" | "REQUIRED";
|
|
3654
|
+
rounding: "DOWN" | "HALF_DOWN" | "HALF_NEAREST" | "HALF_UP" | "NEAREST" | "NONE" | "QUARTER_DOWN" | "QUARTER_NEAREST" | "QUARTER_UP" | "UP" | "WHOLE_DOWN" | "WHOLE_NEAREST" | "WHOLE_UP";
|
|
3655
|
+
taxable: boolean;
|
|
3656
|
+
tax_inclusive: boolean;
|
|
3657
|
+
tax_rate: number;
|
|
3658
|
+
based_on: "ORDER_TOTAL";
|
|
3659
|
+
percentage: number;
|
|
3660
|
+
} | {
|
|
3661
|
+
requirement: "OPTIONAL" | "REQUIRED";
|
|
3662
|
+
rounding: "DOWN" | "HALF_DOWN" | "HALF_NEAREST" | "HALF_UP" | "NEAREST" | "NONE" | "QUARTER_DOWN" | "QUARTER_NEAREST" | "QUARTER_UP" | "UP" | "WHOLE_DOWN" | "WHOLE_NEAREST" | "WHOLE_UP";
|
|
3663
|
+
taxable: boolean;
|
|
3664
|
+
tax_inclusive: boolean;
|
|
3665
|
+
tax_rate: number;
|
|
3666
|
+
based_on: "ORDER_SUBTOTAL";
|
|
3667
|
+
percentage: number;
|
|
3668
|
+
} | {
|
|
3669
|
+
requirement: "OPTIONAL" | "REQUIRED";
|
|
3670
|
+
rounding: "DOWN" | "HALF_DOWN" | "HALF_NEAREST" | "HALF_UP" | "NEAREST" | "NONE" | "QUARTER_DOWN" | "QUARTER_NEAREST" | "QUARTER_UP" | "UP" | "WHOLE_DOWN" | "WHOLE_NEAREST" | "WHOLE_UP";
|
|
3671
|
+
taxable: boolean;
|
|
3672
|
+
tax_inclusive: boolean;
|
|
3673
|
+
tax_rate: number;
|
|
3674
|
+
based_on: "COVERAGE_ZONE_TAG";
|
|
3675
|
+
tag_key: string;
|
|
3676
|
+
value: number;
|
|
3677
|
+
} | {
|
|
3678
|
+
requirement: "OPTIONAL" | "REQUIRED";
|
|
3679
|
+
rounding: "DOWN" | "HALF_DOWN" | "HALF_NEAREST" | "HALF_UP" | "NEAREST" | "NONE" | "QUARTER_DOWN" | "QUARTER_NEAREST" | "QUARTER_UP" | "UP" | "WHOLE_DOWN" | "WHOLE_NEAREST" | "WHOLE_UP";
|
|
3680
|
+
taxable: boolean;
|
|
3681
|
+
tax_inclusive: boolean;
|
|
3682
|
+
tax_rate: number;
|
|
3683
|
+
based_on: "STORE_TAG";
|
|
3684
|
+
tag_key: string;
|
|
3685
|
+
value: number;
|
|
3686
|
+
} | {
|
|
3687
|
+
requirement: "OPTIONAL" | "REQUIRED";
|
|
3688
|
+
rounding: "DOWN" | "HALF_DOWN" | "HALF_NEAREST" | "HALF_UP" | "NEAREST" | "NONE" | "QUARTER_DOWN" | "QUARTER_NEAREST" | "QUARTER_UP" | "UP" | "WHOLE_DOWN" | "WHOLE_NEAREST" | "WHOLE_UP";
|
|
3689
|
+
taxable: boolean;
|
|
3690
|
+
tax_inclusive: boolean;
|
|
3691
|
+
tax_rate: number;
|
|
3692
|
+
based_on: "CHANNEL_TAG";
|
|
3693
|
+
tag_key: string;
|
|
3694
|
+
value: number;
|
|
3695
|
+
} | {
|
|
3696
|
+
requirement: "OPTIONAL" | "REQUIRED";
|
|
3697
|
+
rounding: "DOWN" | "HALF_DOWN" | "HALF_NEAREST" | "HALF_UP" | "NEAREST" | "NONE" | "QUARTER_DOWN" | "QUARTER_NEAREST" | "QUARTER_UP" | "UP" | "WHOLE_DOWN" | "WHOLE_NEAREST" | "WHOLE_UP";
|
|
3698
|
+
taxable: boolean;
|
|
3699
|
+
tax_inclusive: boolean;
|
|
3700
|
+
tax_rate: number;
|
|
3701
|
+
based_on: "FULFILLMENT_TAG";
|
|
3702
|
+
tag_key: string;
|
|
3703
|
+
value: number;
|
|
3704
|
+
} | {
|
|
3705
|
+
requirement: "OPTIONAL" | "REQUIRED";
|
|
3706
|
+
rounding: "DOWN" | "HALF_DOWN" | "HALF_NEAREST" | "HALF_UP" | "NEAREST" | "NONE" | "QUARTER_DOWN" | "QUARTER_NEAREST" | "QUARTER_UP" | "UP" | "WHOLE_DOWN" | "WHOLE_NEAREST" | "WHOLE_UP";
|
|
3707
|
+
taxable: boolean;
|
|
3708
|
+
tax_inclusive: boolean;
|
|
3709
|
+
tax_rate: number;
|
|
3710
|
+
based_on: "BRAND_TAG";
|
|
3711
|
+
tag_key: string;
|
|
3712
|
+
value: number;
|
|
3713
|
+
} | {
|
|
3714
|
+
requirement: "OPTIONAL" | "REQUIRED";
|
|
3715
|
+
rounding: "DOWN" | "HALF_DOWN" | "HALF_NEAREST" | "HALF_UP" | "NEAREST" | "NONE" | "QUARTER_DOWN" | "QUARTER_NEAREST" | "QUARTER_UP" | "UP" | "WHOLE_DOWN" | "WHOLE_NEAREST" | "WHOLE_UP";
|
|
3716
|
+
taxable: boolean;
|
|
3717
|
+
tax_inclusive: boolean;
|
|
3718
|
+
tax_rate: number;
|
|
3719
|
+
based_on: "DISTANCE_STRAIGHT";
|
|
3720
|
+
amount: number;
|
|
3721
|
+
unit: "KM" | "MI";
|
|
3722
|
+
} | {
|
|
3723
|
+
requirement: "OPTIONAL" | "REQUIRED";
|
|
3724
|
+
rounding: "DOWN" | "HALF_DOWN" | "HALF_NEAREST" | "HALF_UP" | "NEAREST" | "NONE" | "QUARTER_DOWN" | "QUARTER_NEAREST" | "QUARTER_UP" | "UP" | "WHOLE_DOWN" | "WHOLE_NEAREST" | "WHOLE_UP";
|
|
3725
|
+
taxable: boolean;
|
|
3726
|
+
tax_inclusive: boolean;
|
|
3727
|
+
tax_rate: number;
|
|
3728
|
+
based_on: "DISTANCE_STREET";
|
|
3729
|
+
amount: number;
|
|
3730
|
+
unit: "KM" | "MI";
|
|
3731
|
+
})[];
|
|
3732
|
+
conditions: ({
|
|
3733
|
+
interpretation?: "both" | "client" | "server" | undefined;
|
|
3734
|
+
product_id?: string | undefined;
|
|
3735
|
+
tag?: string | undefined;
|
|
3736
|
+
fulfillment_id: string;
|
|
3737
|
+
store_id: string;
|
|
3738
|
+
channel_id: string;
|
|
3739
|
+
brand_id: string;
|
|
3740
|
+
primitive: "string";
|
|
3741
|
+
type: "Failure message" | "Order includes product with tag" | "Request path";
|
|
3742
|
+
operator: "contains" | "ends with" | "equal to" | "is all of" | "is any of" | "is none of" | "not equal to" | "starts with";
|
|
3743
|
+
caseInsensitive?: boolean | undefined;
|
|
3744
|
+
value: string | string[];
|
|
3745
|
+
invalidMessage?: string | undefined;
|
|
3746
|
+
} | {
|
|
3747
|
+
interpretation?: "both" | "client" | "server" | undefined;
|
|
3748
|
+
product_id?: string | undefined;
|
|
3749
|
+
tag?: string | undefined;
|
|
3750
|
+
fulfillment_id: string;
|
|
3751
|
+
store_id: string;
|
|
3752
|
+
channel_id: string;
|
|
3753
|
+
brand_id: string;
|
|
3754
|
+
primitive: "number";
|
|
3755
|
+
type: "API error rate" | "Accumulated events" | "Cart product count" | "Customer age" | "HTTP status" | "Order includes product" | "Order includes product with tag";
|
|
3756
|
+
operator: "equal to" | "greater than" | "greater than or equal to" | "is all of" | "is any of" | "is none of" | "less than" | "less than or equal to" | "not equal to";
|
|
3757
|
+
value: number | number[];
|
|
3758
|
+
include_modifiers?: boolean | undefined;
|
|
3759
|
+
window_minutes?: number | undefined;
|
|
3760
|
+
invalidMessage?: string | undefined;
|
|
3761
|
+
} | {
|
|
3762
|
+
interpretation?: "both" | "client" | "server" | undefined;
|
|
3763
|
+
product_id?: string | undefined;
|
|
3764
|
+
tag?: string | undefined;
|
|
3765
|
+
fulfillment_id: string;
|
|
3766
|
+
store_id: string;
|
|
3767
|
+
channel_id: string;
|
|
3768
|
+
brand_id: string;
|
|
3769
|
+
primitive: "currency";
|
|
3770
|
+
type: "Order includes product with tag" | "Order total";
|
|
3771
|
+
operator: "equal to" | "greater than" | "greater than or equal to" | "less than" | "less than or equal to" | "not equal to";
|
|
3772
|
+
value: number;
|
|
3773
|
+
invalidMessage?: string | undefined;
|
|
3774
|
+
} | {
|
|
3775
|
+
interpretation?: "both" | "client" | "server" | undefined;
|
|
3776
|
+
product_id?: string | undefined;
|
|
3777
|
+
tag?: string | undefined;
|
|
3778
|
+
fulfillment_id: string;
|
|
3779
|
+
store_id: string;
|
|
3780
|
+
channel_id: string;
|
|
3781
|
+
brand_id: string;
|
|
3782
|
+
primitive: "boolean";
|
|
3783
|
+
type: "Customer is anonymous" | "Is anonymous order" | "Order includes product with tag" | "Order is scheduled" | "Payment captured" | "Payment is mixed";
|
|
3784
|
+
operator: "is" | "is not";
|
|
3785
|
+
value: boolean;
|
|
3786
|
+
invalidMessage?: string | undefined;
|
|
3787
|
+
} | {
|
|
3788
|
+
interpretation?: "both" | "client" | "server" | undefined;
|
|
3789
|
+
primitive: "enum";
|
|
3790
|
+
type: "Payment collect at" | "Payment method" | "Payment status";
|
|
3791
|
+
operator: "is" | "is any of" | "is none of" | "is not";
|
|
3792
|
+
value: string | string[];
|
|
3793
|
+
invalidMessage?: string | undefined;
|
|
3794
|
+
} | {
|
|
3795
|
+
interpretation?: "both" | "client" | "server" | undefined;
|
|
3796
|
+
primitive: "absolute date";
|
|
3797
|
+
type: "Today";
|
|
3798
|
+
operator: "is" | "is after" | "is before" | "is not";
|
|
3799
|
+
value: Date;
|
|
3800
|
+
invalidMessage?: string | undefined;
|
|
3801
|
+
} | {
|
|
3802
|
+
interpretation?: "both" | "client" | "server" | undefined;
|
|
3803
|
+
primitive: "relative date";
|
|
3804
|
+
type: "Birthday" | "Customer last session" | "Customer last visit" | "Registration";
|
|
3805
|
+
operator: "occurred" | "occurred in the last" | "occurred more than";
|
|
3806
|
+
value: string;
|
|
3807
|
+
invalidMessage?: string | undefined;
|
|
3808
|
+
} | {
|
|
3809
|
+
interpretation?: "both" | "client" | "server" | undefined;
|
|
3810
|
+
primitive: "recurring date";
|
|
3811
|
+
type: "Current date";
|
|
3812
|
+
operator: "falls within period";
|
|
3813
|
+
startDate: Date;
|
|
3814
|
+
endDate: Date;
|
|
3815
|
+
allDay: boolean;
|
|
3816
|
+
repeat: "CUSTOM" | "DAILY" | "FORTNIGHTLY" | "LAST_DAY_OF_MONTH" | "MONTHLY" | "NONE" | "WEEKDAYS" | "WEEKENDS" | "WEEKLY" | "WEEK_OF_MONTH";
|
|
3817
|
+
value: string;
|
|
3818
|
+
invalidMessage?: string | undefined;
|
|
3819
|
+
} | {
|
|
3820
|
+
interpretation?: "both" | "client" | "server" | undefined;
|
|
3821
|
+
primitive: "custom";
|
|
3822
|
+
type: "Brand" | "Brands" | "Channel" | "Channels" | "Fulfillment" | "Fulfillments" | "Payment" | "Store" | "Stores";
|
|
3823
|
+
operator: "is" | "is all of" | "is any of" | "is none of" | "is not";
|
|
3824
|
+
value: string;
|
|
3825
|
+
label_ids?: string[] | undefined;
|
|
3826
|
+
invalidMessage?: string | undefined;
|
|
3827
|
+
})[][];
|
|
3828
|
+
status: string;
|
|
3829
|
+
};
|
|
3830
|
+
/** Order fields the fee conditions read. */
|
|
3831
|
+
interface ApplyFeesOrderScope {
|
|
3832
|
+
is_anonymous: boolean;
|
|
3833
|
+
store_id?: string | null;
|
|
3834
|
+
channel_id?: string | null;
|
|
3835
|
+
fulfillment_id?: string | null;
|
|
3836
|
+
brand_id?: string | null;
|
|
3837
|
+
}
|
|
3838
|
+
interface ApplyFeesInput {
|
|
3839
|
+
fees: Fee[];
|
|
3840
|
+
lines: OrderLine[];
|
|
3841
|
+
order: ApplyFeesOrderScope;
|
|
3842
|
+
storeTags?: Record<string, unknown> | null;
|
|
3843
|
+
locale?: string;
|
|
3844
|
+
currencyDigits?: number;
|
|
3845
|
+
}
|
|
2944
3846
|
//#endregion
|
|
2945
3847
|
//#region .flat/src/payments.d.ts
|
|
2946
3848
|
/** Merchant payment method (`GET /storefront/v1/payments` `data[]`). */
|
|
@@ -4058,6 +4960,7 @@ type PosOrderInput = {
|
|
|
4058
4960
|
attempt_reference?: string | undefined;
|
|
4059
4961
|
}[] | undefined;
|
|
4060
4962
|
occurred_at?: string | undefined;
|
|
4963
|
+
offline_replay?: boolean | undefined;
|
|
4061
4964
|
notes?: string | undefined;
|
|
4062
4965
|
table_session_uid?: string | undefined;
|
|
4063
4966
|
};
|
|
@@ -4725,4 +5628,4 @@ type WordFilterCheckResult = {
|
|
|
4725
5628
|
matches: WordFilterMatch[];
|
|
4726
5629
|
};
|
|
4727
5630
|
//#endregion
|
|
4728
|
-
export type { AddressInfo, AndConditions, BillingInfo, BillingProfile, BundledItem, Category, CategoryAvailability, CategoryItem, ChannelManifest, ChannelManifestNative, ChannelManifestWeb, ChannelPlatform, ChannelTemplate, CheckoutMode, CheckoutResolved, CmsBlock, CmsBlockItem, Condition, Customer, CustomerGender, CustomerIdentifyInput, CustomerRegisterInput, CustomerUpdateInput, DayOfWeek, DeliveryAddress, Fulfillment, FulfillmentListInput, GroupDisplayType, KioskAdminGesture, KioskAppState, KioskCommandPayload, KioskCommandType, KioskConfigChangedPayload, KioskDeviceConfig, KioskDeviceConfigDevice, KioskDeviceConfigInput, KioskDeviceConfigPayment, KioskDeviceConfigScope, KioskDeviceConfigSettings, KioskDeviceOverrides, KioskDevicePaymentSettings, KioskHealthBatchInput, KioskHealthBatchResult, KioskHealthSample, KioskHeartbeatHealth, KioskHeartbeatInput, KioskHeartbeatResult, KioskOrderPager, KioskPagerMode, KioskPagerSide, KioskPagersOverrides, KioskPagersSettings, KioskPickupNameRules, KioskRealtimeToken, MasivoTotpCode, MasivoTotpCreateInput, MasivoTotpCustomer, MasivoTotpVerification, MasivoTotpVerifyInput, MatchResult, MatchableRule, Menu, MenuLookup, MerchantPayment, Metadata, MixedPaymentsEffect, MixedPaymentsLimits, ModifierControlType, ModifierGroup, MultiLanguageText, OrConditions, Order, OrderCancelInput, OrderCancelType, OrderChangedCallback, OrderChangedCallbackError, OrderChangedCheckoutState, OrderChangedDeviceReversal, OrderChangedDeviceReversalTender, OrderChangedError, OrderChangedPayload, OrderChangedRunStatus, OrderDeviceCredential, OrderDeviceKind, OrderDeviceListInput, OrderDeviceListResult, OrderFulfillment, OrderInsertInput, OrderLine, OrderListInput, OrderRecordPaymentInput, OrderRedeem, OrderRedeemInput, OrderRedemptionState, OrderRedemptionStep, OrderReorderInput, OrderReportedTender, OrderSetCustomerInput, OrderTotals, OrderUpdateInput, OrderValidateInput, OrderValidateOutput, Payment, PaymentCollectAt, PaymentErrorCode, PaymentIntent, PaymentIntentInput, PaymentIntentPutInput, PaymentIntentStatus, PaymentMethod, PaymentProvider, PaymentScope, PaymentStatus, PaymentTender, PaymentTenderInput, PlaceOrderResult, PosActorKind, PosCashBreakdownItem, PosCatalog, PosDenominationKind, PosDeviceConfigDevice, PosDeviceConfigScope, PosDeviceOverrides, PosErrorCode, PosFloor, PosFloorChangedPayload, PosFloorElement, PosFloorInput, PosFloorLayout, PosFloorOccupancy, PosFloorPlan, PosFloorRealtimeToken, PosFloorTable, PosHealthBatchInput, PosHealthBatchResult, PosHealthSample, PosHeartbeatHealth, PosHeartbeatInput, PosHeartbeatResult, PosKioskOrder, PosKioskSettleInput, PosKioskSettleResult, PosOrderInput, PosOrderResult, PosReservationHold, PosReservationHoldStatus, PosStaff, PosTableAttachOrderInput, PosTableCloseInput, PosTableJoinInput, PosTableSeatInput, PosTableSeatReservationInput, PosTableSession, PosTableSessionOrder, PosTableSessionStatus, PosTableSplitInput, PricingModifier, PricingVariant, Product, ProductAvailability, ProductPricing, ProductRecommendationLink, Recommendation, RecurringDateCronDateParts, RecurringDateCronExpression, RecurringDateCronFormatter, RecurringDateCronRepeat, RecurringDateCronResult, RecurringDateCronSummary, RecurringDateCronValues, RuleInterpretation, RulesEngineMonitoring, RulesEngineOrder, RulesEngineOrderLine, RulesEngineParams, RulesEngineRuntime, RulesEngineTagValue, Schedule, ScheduleDay, SchedulePeriod, SdkLogContext, SdkLogEntry, SdkLogErrorInfo, SdkLogIngestResult, SdkLogLevel, SdkLogOptions, Store, StoreAvailabilityFilters, StoreGetInput, StoreListInput, StoreNearbyInput, StorefrontAvailability, StorefrontAvailabilityChangedPayload, StorefrontAvailabilityInput, StorefrontAvailabilityRule, StorefrontCmsChangedPayload, StorefrontMenu, StorefrontMenuChangedPayload, StorefrontMenuScope, StorefrontMenuStreamOptions, StorefrontPaymentsListInput, StorefrontPreferences, StorefrontPreferencesInput, StorefrontRealtimeToken, StorefrontRealtimeTokenInput, StorefrontWorkspaceChangedPayload, StringMatchCaseOptions, SwitchCustomerArg, SwitchCustomerIdToken, SwitchCustomerResult, TenderAllocation, TenderAllocationInput, TenderAmount, TenderDetails, TenderRefundInput, TenderReplaceInput, TenderVoidInput, Variant, VariantGroup, WordFilterCategory, WordFilterCheckInput, WordFilterCheckResult, WordFilterMatch };
|
|
5631
|
+
export type { AddressInfo, AndConditions, ApplyFeesInput, ApplyFeesOrderScope, BillingInfo, BillingProfile, BundledItem, Category, CategoryAvailability, CategoryItem, ChannelManifest, ChannelManifestNative, ChannelManifestWeb, ChannelPlatform, ChannelTemplate, CheckoutMode, CheckoutResolved, CmsBlock, CmsBlockItem, Condition, Customer, CustomerGender, CustomerIdentifyInput, CustomerRegisterInput, CustomerUpdateInput, DayOfWeek, DeliveryAddress, Fee, Fulfillment, FulfillmentListInput, GroupDisplayType, KioskAdminGesture, KioskAppState, KioskCommandPayload, KioskCommandType, KioskConfigChangedPayload, KioskDeviceConfig, KioskDeviceConfigDevice, KioskDeviceConfigInput, KioskDeviceConfigPayment, KioskDeviceConfigScope, KioskDeviceConfigSettings, KioskDeviceOverrides, KioskDevicePaymentSettings, KioskHealthBatchInput, KioskHealthBatchResult, KioskHealthSample, KioskHeartbeatHealth, KioskHeartbeatInput, KioskHeartbeatResult, KioskOrderPager, KioskPagerMode, KioskPagerSide, KioskPagersOverrides, KioskPagersSettings, KioskPickupNameRules, KioskRealtimeToken, MasivoTotpCode, MasivoTotpCreateInput, MasivoTotpCustomer, MasivoTotpVerification, MasivoTotpVerifyInput, MatchResult, MatchableRule, Menu, MenuLookup, MerchantPayment, Metadata, MixedPaymentsEffect, MixedPaymentsLimits, ModifierControlType, ModifierGroup, MultiLanguageText, OrConditions, Order, OrderCancelInput, OrderCancelType, OrderChangedCallback, OrderChangedCallbackError, OrderChangedCheckoutState, OrderChangedDeviceReversal, OrderChangedDeviceReversalTender, OrderChangedError, OrderChangedPayload, OrderChangedRunStatus, OrderDeviceCredential, OrderDeviceKind, OrderDeviceListInput, OrderDeviceListResult, OrderFulfillment, OrderFulfillmentWorkflow, OrderFulfillmentWorkflowEdge, OrderFulfillmentWorkflowNode, OrderInsertInput, OrderLine, OrderListInput, OrderRecord, OrderRecordPaymentInput, OrderRedeem, OrderRedeemInput, OrderRedemptionState, OrderRedemptionStep, OrderReorderInput, OrderReportedTender, OrderSetCustomerInput, OrderTotals, OrderUpdateInput, OrderValidateInput, OrderValidateOutput, Payment, PaymentCollectAt, PaymentErrorCode, PaymentIntent, PaymentIntentInput, PaymentIntentPutInput, PaymentIntentStatus, PaymentMethod, PaymentProvider, PaymentScope, PaymentStatus, PaymentTender, PaymentTenderInput, PlaceOrderResult, PosActorKind, PosCashBreakdownItem, PosCatalog, PosDenominationKind, PosDeviceConfigDevice, PosDeviceConfigScope, PosDeviceOverrides, PosErrorCode, PosFloor, PosFloorChangedPayload, PosFloorElement, PosFloorInput, PosFloorLayout, PosFloorOccupancy, PosFloorPlan, PosFloorRealtimeToken, PosFloorTable, PosHealthBatchInput, PosHealthBatchResult, PosHealthSample, PosHeartbeatHealth, PosHeartbeatInput, PosHeartbeatResult, PosKioskOrder, PosKioskSettleInput, PosKioskSettleResult, PosOrderInput, PosOrderResult, PosReservationHold, PosReservationHoldStatus, PosStaff, PosTableAttachOrderInput, PosTableCloseInput, PosTableJoinInput, PosTableSeatInput, PosTableSeatReservationInput, PosTableSession, PosTableSessionOrder, PosTableSessionStatus, PosTableSplitInput, PricingModifier, PricingVariant, Product, ProductAvailability, ProductPricing, ProductRecommendationLink, Recommendation, RecurringDateCronDateParts, RecurringDateCronExpression, RecurringDateCronFormatter, RecurringDateCronRepeat, RecurringDateCronResult, RecurringDateCronSummary, RecurringDateCronValues, RuleInterpretation, RulesEngineMonitoring, RulesEngineOrder, RulesEngineOrderLine, RulesEngineParams, RulesEngineRuntime, RulesEngineTagValue, Schedule, ScheduleDay, SchedulePeriod, SdkLogContext, SdkLogEntry, SdkLogErrorInfo, SdkLogIngestResult, SdkLogLevel, SdkLogOptions, Store, StoreAvailabilityFilters, StoreGetInput, StoreListInput, StoreNearbyInput, StorefrontAvailability, StorefrontAvailabilityChangedPayload, StorefrontAvailabilityInput, StorefrontAvailabilityRule, StorefrontCmsChangedPayload, StorefrontMenu, StorefrontMenuChangedPayload, StorefrontMenuScope, StorefrontMenuStreamOptions, StorefrontPaymentsListInput, StorefrontPreferences, StorefrontPreferencesInput, StorefrontRealtimeToken, StorefrontRealtimeTokenInput, StorefrontWorkspaceChangedPayload, StringMatchCaseOptions, SwitchCustomerArg, SwitchCustomerIdToken, SwitchCustomerResult, TenderAllocation, TenderAllocationInput, TenderAmount, TenderDetails, TenderRefundInput, TenderReplaceInput, TenderVoidInput, Variant, VariantGroup, WordFilterCategory, WordFilterCheckInput, WordFilterCheckResult, WordFilterMatch };
|