@fire-spark/types 0.7.2 → 0.8.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 +507 -2
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -578,6 +578,7 @@ type Store = {
|
|
|
578
578
|
merchant_id: string;
|
|
579
579
|
brand_id?: string | null | undefined;
|
|
580
580
|
name: string;
|
|
581
|
+
description?: string | null | undefined;
|
|
581
582
|
contact: {
|
|
582
583
|
email: string;
|
|
583
584
|
phone: string;
|
|
@@ -1107,6 +1108,8 @@ interface PricingModifier {
|
|
|
1107
1108
|
anchor_price_percentage?: number;
|
|
1108
1109
|
charge_above_quantity?: number | null;
|
|
1109
1110
|
display_type?: ModifierControlType | null;
|
|
1111
|
+
image_url?: string | null;
|
|
1112
|
+
image_origin_url?: string | null;
|
|
1110
1113
|
}
|
|
1111
1114
|
interface PricingVariant {
|
|
1112
1115
|
product_id: string;
|
|
@@ -1366,6 +1369,8 @@ type StorefrontMenu = {
|
|
|
1366
1369
|
default_quantity: number;
|
|
1367
1370
|
charge_above_quantity?: number | null | undefined;
|
|
1368
1371
|
display_type?: "CHECKBOX" | "QUANTITY" | "RADIO" | null | undefined;
|
|
1372
|
+
image_url?: string | null | undefined;
|
|
1373
|
+
image_origin_url?: string | null | undefined;
|
|
1369
1374
|
recommendations: {
|
|
1370
1375
|
recommendation_id: string;
|
|
1371
1376
|
default_quantity: number;
|
|
@@ -1690,9 +1695,13 @@ interface KioskOrderPager {
|
|
|
1690
1695
|
number: string;
|
|
1691
1696
|
side: KioskPagerSide;
|
|
1692
1697
|
}
|
|
1698
|
+
/** This device's data for each payment, keyed by payment id. */
|
|
1699
|
+
type KioskDevicePaymentSettings = Record<string, Record<string, unknown>>;
|
|
1693
1700
|
interface KioskDeviceOverrides {
|
|
1694
1701
|
disabled_payment_ids: string[];
|
|
1695
1702
|
pagers?: KioskPagersOverrides;
|
|
1703
|
+
/** Pass as `deviceSettings` to the payments session. */
|
|
1704
|
+
payment_settings?: KioskDevicePaymentSettings;
|
|
1696
1705
|
}
|
|
1697
1706
|
interface KioskDeviceConfigDevice {
|
|
1698
1707
|
uid: string;
|
|
@@ -2192,6 +2201,7 @@ type Order = {
|
|
|
2192
2201
|
status: "CANCELLED" | "CLOSED" | "COMPLETED" | "OPEN" | "REFUNDED" | "REVERSED" | "VOIDED";
|
|
2193
2202
|
issued_at?: string | null | undefined;
|
|
2194
2203
|
resolved_at?: string | null | undefined;
|
|
2204
|
+
device_id?: string | null | undefined;
|
|
2195
2205
|
};
|
|
2196
2206
|
/** Customer delivery address without alias/preferred. */
|
|
2197
2207
|
type AddressInfo = {
|
|
@@ -3153,6 +3163,310 @@ type OrderListInput = {
|
|
|
3153
3163
|
status?: "CANCELLED" | "CLOSED" | "COMPLETED" | "OPEN" | "REFUNDED" | "REVERSED" | "VOIDED" | undefined;
|
|
3154
3164
|
cursor?: string | undefined;
|
|
3155
3165
|
};
|
|
3166
|
+
/** `POST .../devices/me/orders` body (kiosk or POS). */
|
|
3167
|
+
type OrderDeviceListInput = {
|
|
3168
|
+
device_uid: string;
|
|
3169
|
+
device_secret: string;
|
|
3170
|
+
status?: "CANCELLED" | "CLOSED" | "COMPLETED" | "OPEN" | "REFUNDED" | "REVERSED" | "VOIDED" | undefined;
|
|
3171
|
+
payment_status?: "CANCELLED" | "FAILED" | "IDLE" | "PAID" | "PENDING" | "REFUNDED" | undefined;
|
|
3172
|
+
from?: string | undefined;
|
|
3173
|
+
to?: string | undefined;
|
|
3174
|
+
limit?: unknown;
|
|
3175
|
+
cursor?: string | undefined;
|
|
3176
|
+
};
|
|
3177
|
+
/** `POST .../devices/me/orders` response. */
|
|
3178
|
+
type OrderDeviceListResult = {
|
|
3179
|
+
data: {
|
|
3180
|
+
uid: string;
|
|
3181
|
+
id: string;
|
|
3182
|
+
brand_id?: string | null | undefined;
|
|
3183
|
+
store_id: string;
|
|
3184
|
+
channel_id: string;
|
|
3185
|
+
customer_id: string;
|
|
3186
|
+
fulfillment_id: string;
|
|
3187
|
+
is_anonymous: boolean;
|
|
3188
|
+
lines: {
|
|
3189
|
+
type: "FEE" | "PRODUCT";
|
|
3190
|
+
uid: string;
|
|
3191
|
+
id: string;
|
|
3192
|
+
parent_uid: string | null;
|
|
3193
|
+
parent_id: string | null;
|
|
3194
|
+
name: string;
|
|
3195
|
+
image_url?: string | undefined;
|
|
3196
|
+
menu_id?: string | undefined;
|
|
3197
|
+
internal_attribution_source?: string | undefined;
|
|
3198
|
+
internal_attribution_id?: string | undefined;
|
|
3199
|
+
metadata: Record<string, unknown>;
|
|
3200
|
+
bundled_items: {
|
|
3201
|
+
id: string;
|
|
3202
|
+
refund_price: number;
|
|
3203
|
+
included_quantity: number;
|
|
3204
|
+
}[];
|
|
3205
|
+
redeem: {
|
|
3206
|
+
reward_id: string;
|
|
3207
|
+
quantity: number;
|
|
3208
|
+
before_taxes?: boolean | undefined;
|
|
3209
|
+
expires_at?: string | undefined;
|
|
3210
|
+
payment_id: string;
|
|
3211
|
+
amount: number;
|
|
3212
|
+
}[];
|
|
3213
|
+
quantity: number;
|
|
3214
|
+
tax_rate: number | null;
|
|
3215
|
+
discount_rate: number;
|
|
3216
|
+
unit_subtotal: number;
|
|
3217
|
+
unit_discount: number;
|
|
3218
|
+
unit_tax_total: number;
|
|
3219
|
+
unit_total: number;
|
|
3220
|
+
subtotal: number;
|
|
3221
|
+
discount_total: number;
|
|
3222
|
+
tax_total: number;
|
|
3223
|
+
total: number;
|
|
3224
|
+
unit_group_subtotal: number;
|
|
3225
|
+
unit_group_discount: number;
|
|
3226
|
+
unit_group_tax_total: number;
|
|
3227
|
+
unit_group_total: number;
|
|
3228
|
+
group_subtotal: number;
|
|
3229
|
+
group_discount: number;
|
|
3230
|
+
group_tax_total: number;
|
|
3231
|
+
group_total: number;
|
|
3232
|
+
}[];
|
|
3233
|
+
redeem: {
|
|
3234
|
+
reward_id: string;
|
|
3235
|
+
quantity: number;
|
|
3236
|
+
before_taxes?: boolean | undefined;
|
|
3237
|
+
expires_at?: string | undefined;
|
|
3238
|
+
payment_id: string;
|
|
3239
|
+
amount: number;
|
|
3240
|
+
}[];
|
|
3241
|
+
redemption_steps: {
|
|
3242
|
+
reward_id: string;
|
|
3243
|
+
reward_quantity: number;
|
|
3244
|
+
payment_id: string;
|
|
3245
|
+
before_taxes: boolean;
|
|
3246
|
+
target: "LINE" | "ORDER";
|
|
3247
|
+
target_id?: string | undefined;
|
|
3248
|
+
action: "CREATE" | "DELETE" | "READ" | "UPDATE";
|
|
3249
|
+
discount_amount: number;
|
|
3250
|
+
before: {
|
|
3251
|
+
value: number;
|
|
3252
|
+
quantity: number;
|
|
3253
|
+
discount_amount: number;
|
|
3254
|
+
discount_rate: number;
|
|
3255
|
+
};
|
|
3256
|
+
after: {
|
|
3257
|
+
value: number;
|
|
3258
|
+
quantity: number;
|
|
3259
|
+
discount_amount: number;
|
|
3260
|
+
discount_rate: number;
|
|
3261
|
+
};
|
|
3262
|
+
target_before?: {
|
|
3263
|
+
value: number;
|
|
3264
|
+
quantity: number;
|
|
3265
|
+
discount_amount: number;
|
|
3266
|
+
discount_rate: number;
|
|
3267
|
+
} | undefined;
|
|
3268
|
+
target_after?: {
|
|
3269
|
+
value: number;
|
|
3270
|
+
quantity: number;
|
|
3271
|
+
discount_amount: number;
|
|
3272
|
+
discount_rate: number;
|
|
3273
|
+
} | undefined;
|
|
3274
|
+
error?: string | undefined;
|
|
3275
|
+
}[];
|
|
3276
|
+
customer: {
|
|
3277
|
+
customer_info: {
|
|
3278
|
+
display_name: string;
|
|
3279
|
+
first_name: string;
|
|
3280
|
+
middle_name?: string | undefined;
|
|
3281
|
+
last_name: string;
|
|
3282
|
+
second_last_name?: string | undefined;
|
|
3283
|
+
email: string;
|
|
3284
|
+
phone: string;
|
|
3285
|
+
gender?: "FEMALE" | "MALE" | undefined;
|
|
3286
|
+
dob?: string | undefined;
|
|
3287
|
+
document_type?: "CI" | "DNI" | "OTHER" | "PASSPORT" | "RUC" | undefined;
|
|
3288
|
+
document_number?: string | undefined;
|
|
3289
|
+
city?: string | undefined;
|
|
3290
|
+
country?: string | undefined;
|
|
3291
|
+
};
|
|
3292
|
+
address_info?: {
|
|
3293
|
+
address_line1: string;
|
|
3294
|
+
address_line2?: string | undefined;
|
|
3295
|
+
city?: string | undefined;
|
|
3296
|
+
state?: string | undefined;
|
|
3297
|
+
zip?: string | undefined;
|
|
3298
|
+
country?: string | undefined;
|
|
3299
|
+
reference?: string | undefined;
|
|
3300
|
+
latitude?: number | undefined;
|
|
3301
|
+
longitude?: number | undefined;
|
|
3302
|
+
instructions?: string | undefined;
|
|
3303
|
+
metadata: Record<string, unknown> | null;
|
|
3304
|
+
} | null | undefined;
|
|
3305
|
+
billing_info?: {
|
|
3306
|
+
type: "BUSINESS" | "INDIVIDUAL";
|
|
3307
|
+
legal_name: string;
|
|
3308
|
+
address_line1: string;
|
|
3309
|
+
address_line2?: string | undefined;
|
|
3310
|
+
city?: string | undefined;
|
|
3311
|
+
state?: string | undefined;
|
|
3312
|
+
zip?: string | undefined;
|
|
3313
|
+
country?: string | undefined;
|
|
3314
|
+
tax_id: string;
|
|
3315
|
+
tax_id_type: "CI" | "CUIT" | "DNI" | "EIN" | "NIF" | "NIT" | "OTHER" | "PASSPORT" | "RCN" | "RUC" | "RUT" | "SSN" | "TIN" | "VAT";
|
|
3316
|
+
metadata: Record<string, unknown> | null;
|
|
3317
|
+
} | null | undefined;
|
|
3318
|
+
};
|
|
3319
|
+
payment_intents: {
|
|
3320
|
+
id: string;
|
|
3321
|
+
status: "ABANDONED" | "COMPLETED" | "DRAFT" | "LOCKED";
|
|
3322
|
+
is_mixed: boolean;
|
|
3323
|
+
rules_snapshot: {
|
|
3324
|
+
enabled: boolean;
|
|
3325
|
+
max_methods: number;
|
|
3326
|
+
max_items_per_method: number | null;
|
|
3327
|
+
max_amount_per_method: number | null;
|
|
3328
|
+
per_method: Partial<Record<"BANK_TRANSFER" | "CARD" | "CASH" | "FINANCING" | "PIN_PAD" | "WALLET", {
|
|
3329
|
+
max_amount: number | null;
|
|
3330
|
+
max_items: number | null;
|
|
3331
|
+
}>>;
|
|
3332
|
+
} | null;
|
|
3333
|
+
primary_tender_id: string | null;
|
|
3334
|
+
totals: {
|
|
3335
|
+
currency: string;
|
|
3336
|
+
subtotal: number;
|
|
3337
|
+
discount_rate: number;
|
|
3338
|
+
discount_total: number;
|
|
3339
|
+
tax_rate: number;
|
|
3340
|
+
tax_total: number;
|
|
3341
|
+
total: number;
|
|
3342
|
+
};
|
|
3343
|
+
placed_at: string | null;
|
|
3344
|
+
resolved_at?: string | undefined;
|
|
3345
|
+
metadata: Record<string, unknown>;
|
|
3346
|
+
tenders: {
|
|
3347
|
+
id: string;
|
|
3348
|
+
sequence: number;
|
|
3349
|
+
attempt_reference: string;
|
|
3350
|
+
previous_attempt_references: string[];
|
|
3351
|
+
method: "BANK_TRANSFER" | "CARD" | "CASH" | "FINANCING" | "PIN_PAD" | "REDEMPTION" | "WALLET";
|
|
3352
|
+
provider: "amipass" | "cashea" | "clisitef" | "credibanco" | "datafast" | "deuna" | "edenred" | "firespark" | "kushki" | "mach" | "medianet" | "mercadopago" | "niubiz" | "paymentz" | "paypal" | "payphone" | "place_to_pay" | "pluxee" | "posnet" | "redeban" | "rutpay" | "sitef_venezuela" | "stripe" | "transbank" | "yape";
|
|
3353
|
+
payment_id?: string | undefined;
|
|
3354
|
+
collect_at: "COUNTER" | "DEVICE" | "DOOR" | "KIOSK" | "OTHER";
|
|
3355
|
+
status: "CANCELLED" | "FAILED" | "IDLE" | "PAID" | "PENDING" | "REFUNDED";
|
|
3356
|
+
amount: {
|
|
3357
|
+
currency: string;
|
|
3358
|
+
total: number;
|
|
3359
|
+
};
|
|
3360
|
+
refunded_total: number;
|
|
3361
|
+
allocation: {
|
|
3362
|
+
lines: {
|
|
3363
|
+
line_uid: string;
|
|
3364
|
+
units?: number | undefined;
|
|
3365
|
+
}[];
|
|
3366
|
+
fees: string[];
|
|
3367
|
+
amounts: {
|
|
3368
|
+
line_uid: string;
|
|
3369
|
+
units?: number | undefined;
|
|
3370
|
+
total: number;
|
|
3371
|
+
children: {
|
|
3372
|
+
line_uid: string;
|
|
3373
|
+
quantity: number;
|
|
3374
|
+
total: number;
|
|
3375
|
+
}[];
|
|
3376
|
+
}[];
|
|
3377
|
+
} | null;
|
|
3378
|
+
details: {
|
|
3379
|
+
method: "REDEMPTION";
|
|
3380
|
+
rewards: {
|
|
3381
|
+
reward_id: string;
|
|
3382
|
+
quantity: number;
|
|
3383
|
+
amount: number;
|
|
3384
|
+
}[];
|
|
3385
|
+
amount: number;
|
|
3386
|
+
loyalty_transaction_id?: string | undefined;
|
|
3387
|
+
} | {
|
|
3388
|
+
brand: string;
|
|
3389
|
+
last4: string;
|
|
3390
|
+
auth_code?: string | undefined;
|
|
3391
|
+
installments?: number | undefined;
|
|
3392
|
+
method: "CARD";
|
|
3393
|
+
} | {
|
|
3394
|
+
brand: string;
|
|
3395
|
+
last4: string;
|
|
3396
|
+
auth_code?: string | undefined;
|
|
3397
|
+
installments?: number | undefined;
|
|
3398
|
+
method: "PIN_PAD";
|
|
3399
|
+
terminal_id: string;
|
|
3400
|
+
} | {
|
|
3401
|
+
method: "CASH";
|
|
3402
|
+
tendered: number;
|
|
3403
|
+
change: number;
|
|
3404
|
+
} | {
|
|
3405
|
+
method: "BANK_TRANSFER";
|
|
3406
|
+
reference: string;
|
|
3407
|
+
bank?: string | undefined;
|
|
3408
|
+
} | {
|
|
3409
|
+
method: "WALLET";
|
|
3410
|
+
wallet: string;
|
|
3411
|
+
reference: string;
|
|
3412
|
+
} | {
|
|
3413
|
+
method: "FINANCING";
|
|
3414
|
+
provider_reference: string;
|
|
3415
|
+
installments: number;
|
|
3416
|
+
} | {
|
|
3417
|
+
method: "REDEMPTION";
|
|
3418
|
+
rewards: {
|
|
3419
|
+
reward_id: string;
|
|
3420
|
+
quantity: number;
|
|
3421
|
+
amount: number;
|
|
3422
|
+
}[];
|
|
3423
|
+
loyalty_transaction_id?: string | undefined;
|
|
3424
|
+
amount: number;
|
|
3425
|
+
} | {
|
|
3426
|
+
method: "REDEMPTION";
|
|
3427
|
+
loyalty_transaction_id?: string | undefined;
|
|
3428
|
+
rewards: {
|
|
3429
|
+
reward_id: string;
|
|
3430
|
+
quantity: number;
|
|
3431
|
+
amount: number;
|
|
3432
|
+
}[];
|
|
3433
|
+
amount: number;
|
|
3434
|
+
} | null;
|
|
3435
|
+
replaces_tender_id?: string | undefined;
|
|
3436
|
+
error_message?: string | undefined;
|
|
3437
|
+
placed_at: string | null;
|
|
3438
|
+
resolved_at?: string | undefined;
|
|
3439
|
+
metadata: Record<string, unknown>;
|
|
3440
|
+
}[];
|
|
3441
|
+
}[];
|
|
3442
|
+
totals: {
|
|
3443
|
+
currency: string;
|
|
3444
|
+
subtotal: number;
|
|
3445
|
+
discount_rate: number;
|
|
3446
|
+
discount_total: number;
|
|
3447
|
+
tax_rate: number;
|
|
3448
|
+
tax_total: number;
|
|
3449
|
+
total: number;
|
|
3450
|
+
};
|
|
3451
|
+
metadata: Record<string, unknown>;
|
|
3452
|
+
payment_status: "CANCELLED" | "FAILED" | "IDLE" | "PAID" | "PENDING" | "REFUNDED";
|
|
3453
|
+
fulfillment_status: string;
|
|
3454
|
+
status: "CANCELLED" | "CLOSED" | "COMPLETED" | "OPEN" | "REFUNDED" | "REVERSED" | "VOIDED";
|
|
3455
|
+
issued_at?: string | null | undefined;
|
|
3456
|
+
resolved_at?: string | null | undefined;
|
|
3457
|
+
device_id?: string | null | undefined;
|
|
3458
|
+
}[];
|
|
3459
|
+
pagination: {
|
|
3460
|
+
next_cursor: string | null;
|
|
3461
|
+
prev_cursor: string | null;
|
|
3462
|
+
};
|
|
3463
|
+
};
|
|
3464
|
+
type OrderDeviceKind = "KIOSK" | "POS";
|
|
3465
|
+
type OrderDeviceCredential = {
|
|
3466
|
+
kind: "KIOSK" | "POS";
|
|
3467
|
+
uid: string;
|
|
3468
|
+
secret: string;
|
|
3469
|
+
};
|
|
3156
3470
|
/** `POST /storefront/v1/orders/validate` body. */
|
|
3157
3471
|
type OrderValidateInput = {
|
|
3158
3472
|
store_id: string;
|
|
@@ -3395,7 +3709,7 @@ interface PosStaff {
|
|
|
3395
3709
|
name: string;
|
|
3396
3710
|
status: string;
|
|
3397
3711
|
}
|
|
3398
|
-
type PosErrorCode = "DEVICE_NOT_LINKED" | "DEVICE_NOT_ACTIVE" | "PAIRING_CODE_INVALID" | "RELINK_CODE_INVALID" | "RELINK_CODE_EXPIRED" | "PIN_INVALID" | "PIN_LOCKED" | "OPERATOR_NOT_ASSIGNED" | "AUTHORIZER_NOT_ALLOWED" | "SESSION_ALREADY_OPEN" | "SESSION_NOT_OPEN" | "BREAKDOWN_MISMATCH" | "DIFFERENCE_NEEDS_AUTH" | "KIOSK_ORDER_NOT_SETTLEABLE" | "PAYMENT_NOT_AVAILABLE";
|
|
3712
|
+
type PosErrorCode = "DEVICE_NOT_LINKED" | "DEVICE_NOT_ACTIVE" | "PAIRING_CODE_INVALID" | "RELINK_CODE_INVALID" | "RELINK_CODE_EXPIRED" | "PIN_INVALID" | "PIN_LOCKED" | "OPERATOR_NOT_ASSIGNED" | "AUTHORIZER_NOT_ALLOWED" | "SESSION_ALREADY_OPEN" | "SESSION_NOT_OPEN" | "BREAKDOWN_MISMATCH" | "DIFFERENCE_NEEDS_AUTH" | "KIOSK_ORDER_NOT_SETTLEABLE" | "PAYMENT_NOT_AVAILABLE" | "STORE_NOT_FOUND" | "TABLE_NOT_FOUND" | "TABLE_OCCUPIED" | "TABLE_NOT_IN_SESSION" | "TABLE_SESSION_NOT_FOUND" | "TABLE_SESSION_NOT_OPEN" | "TABLE_SESSION_CONFLICT" | "TABLE_SESSION_LAST_TABLE" | "ORDER_NOT_FOUND" | "ORDER_IN_OTHER_TABLE_SESSION" | "RESERVATION_NOT_FOUND" | "RESERVATION_NOT_BOOKED" | "RESERVATION_EXPIRED";
|
|
3399
3713
|
/** Body for `POST /storefront/v1/pos/orders` (idempotent by `client_id`). */
|
|
3400
3714
|
type PosOrderInput = {
|
|
3401
3715
|
device_uid: string;
|
|
@@ -3522,6 +3836,7 @@ type PosOrderInput = {
|
|
|
3522
3836
|
}[] | undefined;
|
|
3523
3837
|
occurred_at?: string | undefined;
|
|
3524
3838
|
notes?: string | undefined;
|
|
3839
|
+
table_session_uid?: string | undefined;
|
|
3525
3840
|
};
|
|
3526
3841
|
/** `POST /storefront/v1/pos/catalog` `data`, cached offline by the register. */
|
|
3527
3842
|
interface PosCatalog {
|
|
@@ -3561,6 +3876,196 @@ interface PosKioskSettleResult {
|
|
|
3561
3876
|
event: Record<string, unknown> | null;
|
|
3562
3877
|
order_id: string;
|
|
3563
3878
|
}
|
|
3879
|
+
type PosFloorElement = {
|
|
3880
|
+
id: string;
|
|
3881
|
+
x: number;
|
|
3882
|
+
y: number;
|
|
3883
|
+
width: number;
|
|
3884
|
+
depth: number;
|
|
3885
|
+
rotation: number;
|
|
3886
|
+
kind: "column" | "counter" | "door" | "kiosk" | "wall" | "zone";
|
|
3887
|
+
label?: string | undefined;
|
|
3888
|
+
points?: {
|
|
3889
|
+
x: number;
|
|
3890
|
+
y: number;
|
|
3891
|
+
}[] | undefined;
|
|
3892
|
+
thickness?: number | undefined;
|
|
3893
|
+
};
|
|
3894
|
+
/** Plan table with its row uid, which the register sends to seat a party. */
|
|
3895
|
+
type PosFloorTable = {
|
|
3896
|
+
id: string;
|
|
3897
|
+
x: number;
|
|
3898
|
+
y: number;
|
|
3899
|
+
width: number;
|
|
3900
|
+
depth: number;
|
|
3901
|
+
rotation: number;
|
|
3902
|
+
label: string;
|
|
3903
|
+
seats: number;
|
|
3904
|
+
shape: "rect" | "round" | "square";
|
|
3905
|
+
} & {
|
|
3906
|
+
uid: string;
|
|
3907
|
+
};
|
|
3908
|
+
/** Floor structure (size and elements), without the stored plan version. */
|
|
3909
|
+
type PosFloorLayout = Omit<{
|
|
3910
|
+
version: 1;
|
|
3911
|
+
width: number;
|
|
3912
|
+
depth: number;
|
|
3913
|
+
elements: {
|
|
3914
|
+
id: string;
|
|
3915
|
+
x: number;
|
|
3916
|
+
y: number;
|
|
3917
|
+
width: number;
|
|
3918
|
+
depth: number;
|
|
3919
|
+
rotation: number;
|
|
3920
|
+
kind: "column" | "counter" | "door" | "kiosk" | "wall" | "zone";
|
|
3921
|
+
label?: string | undefined;
|
|
3922
|
+
points?: {
|
|
3923
|
+
x: number;
|
|
3924
|
+
y: number;
|
|
3925
|
+
}[] | undefined;
|
|
3926
|
+
thickness?: number | undefined;
|
|
3927
|
+
}[];
|
|
3928
|
+
}, "version">;
|
|
3929
|
+
interface PosFloor extends PosFloorLayout {
|
|
3930
|
+
uid: string;
|
|
3931
|
+
id: string;
|
|
3932
|
+
name: string;
|
|
3933
|
+
level: number;
|
|
3934
|
+
tables: PosFloorTable[];
|
|
3935
|
+
}
|
|
3936
|
+
type PosTableSessionStatus = "OPEN" | "CLOSED" | "MERGED";
|
|
3937
|
+
/** One order of a seated party; a party can pay across many orders. */
|
|
3938
|
+
interface PosTableSessionOrder {
|
|
3939
|
+
uid: string;
|
|
3940
|
+
id: string;
|
|
3941
|
+
status: string;
|
|
3942
|
+
payment_status: string;
|
|
3943
|
+
total: number;
|
|
3944
|
+
currency: string;
|
|
3945
|
+
}
|
|
3946
|
+
/** An open party, the tables it holds and its orders. */
|
|
3947
|
+
interface PosTableSession {
|
|
3948
|
+
uid: string;
|
|
3949
|
+
id: string;
|
|
3950
|
+
status: PosTableSessionStatus;
|
|
3951
|
+
party_size: number;
|
|
3952
|
+
/** Send it back as `expected_version`; a stale one fails with a conflict. */
|
|
3953
|
+
version: number;
|
|
3954
|
+
opened_at: string;
|
|
3955
|
+
table_uids: string[];
|
|
3956
|
+
table_ids: string[];
|
|
3957
|
+
orders: PosTableSessionOrder[];
|
|
3958
|
+
/** Exact sum of the orders' totals. */
|
|
3959
|
+
total: number;
|
|
3960
|
+
currency: string | null;
|
|
3961
|
+
}
|
|
3962
|
+
type PosReservationHoldStatus = "BOOKED" | "NO_SHOW";
|
|
3963
|
+
/**
|
|
3964
|
+
* A booking shown on its tables: a party booked to start soon (or waiting to
|
|
3965
|
+
* be seated) or a recent no-show, whose tables are free again.
|
|
3966
|
+
*/
|
|
3967
|
+
interface PosReservationHold {
|
|
3968
|
+
uid: string;
|
|
3969
|
+
id: string;
|
|
3970
|
+
status: PosReservationHoldStatus;
|
|
3971
|
+
party_size: number;
|
|
3972
|
+
starts_at: string;
|
|
3973
|
+
ends_at: string;
|
|
3974
|
+
/** Unseated past this time, the party becomes a no-show. */
|
|
3975
|
+
seat_by: string;
|
|
3976
|
+
no_show_at: string | null;
|
|
3977
|
+
customer_name: string | null;
|
|
3978
|
+
table_uids: string[];
|
|
3979
|
+
table_ids: string[];
|
|
3980
|
+
}
|
|
3981
|
+
/** Every open party of a store. Seat/join/split/close/attach return it. */
|
|
3982
|
+
interface PosFloorOccupancy {
|
|
3983
|
+
store_uid: string;
|
|
3984
|
+
store_id: string;
|
|
3985
|
+
sessions: PosTableSession[];
|
|
3986
|
+
reservations: PosReservationHold[];
|
|
3987
|
+
}
|
|
3988
|
+
/** `POST /storefront/v1/pos/floor` `data`. */
|
|
3989
|
+
interface PosFloorPlan {
|
|
3990
|
+
store_uid: string;
|
|
3991
|
+
store_id: string;
|
|
3992
|
+
floor_plan_enabled: boolean;
|
|
3993
|
+
floors: PosFloor[];
|
|
3994
|
+
occupancy: PosFloorOccupancy;
|
|
3995
|
+
}
|
|
3996
|
+
type PosFloorInput = {
|
|
3997
|
+
device_uid: string;
|
|
3998
|
+
device_secret: string;
|
|
3999
|
+
};
|
|
4000
|
+
/** Safe to retry with the same `client_id`; the server dedupes the seat. */
|
|
4001
|
+
type PosTableSeatInput = {
|
|
4002
|
+
device_uid: string;
|
|
4003
|
+
device_secret: string;
|
|
4004
|
+
operator_id: string;
|
|
4005
|
+
table_uids: string[];
|
|
4006
|
+
party_size: number;
|
|
4007
|
+
client_id: string;
|
|
4008
|
+
};
|
|
4009
|
+
/** Seats a booked party on its reserved tables; retry with the same id. */
|
|
4010
|
+
type PosTableSeatReservationInput = {
|
|
4011
|
+
device_uid: string;
|
|
4012
|
+
device_secret: string;
|
|
4013
|
+
operator_id: string;
|
|
4014
|
+
reservation_uid: string;
|
|
4015
|
+
client_id: string;
|
|
4016
|
+
};
|
|
4017
|
+
/** Joining a table held by another party merges that party into this one. */
|
|
4018
|
+
type PosTableJoinInput = {
|
|
4019
|
+
device_uid: string;
|
|
4020
|
+
device_secret: string;
|
|
4021
|
+
operator_id: string;
|
|
4022
|
+
session_uid: string;
|
|
4023
|
+
expected_version: number;
|
|
4024
|
+
table_uids: string[];
|
|
4025
|
+
party_size?: number | undefined;
|
|
4026
|
+
};
|
|
4027
|
+
type PosTableSplitInput = {
|
|
4028
|
+
device_uid: string;
|
|
4029
|
+
device_secret: string;
|
|
4030
|
+
operator_id: string;
|
|
4031
|
+
session_uid: string;
|
|
4032
|
+
expected_version: number;
|
|
4033
|
+
table_uids: string[];
|
|
4034
|
+
party_size?: number | undefined;
|
|
4035
|
+
new_party_size?: number | undefined;
|
|
4036
|
+
};
|
|
4037
|
+
type PosTableCloseInput = {
|
|
4038
|
+
device_uid: string;
|
|
4039
|
+
device_secret: string;
|
|
4040
|
+
operator_id: string;
|
|
4041
|
+
session_uid: string;
|
|
4042
|
+
expected_version: number;
|
|
4043
|
+
};
|
|
4044
|
+
type PosTableAttachOrderInput = {
|
|
4045
|
+
device_uid: string;
|
|
4046
|
+
device_secret: string;
|
|
4047
|
+
operator_id: string;
|
|
4048
|
+
session_uid: string;
|
|
4049
|
+
order_id: string;
|
|
4050
|
+
};
|
|
4051
|
+
/** `POST /storefront/v1/pos/realtime/token` `data`. */
|
|
4052
|
+
interface PosFloorRealtimeToken {
|
|
4053
|
+
access_token: string;
|
|
4054
|
+
expires_in: number;
|
|
4055
|
+
url: string;
|
|
4056
|
+
key: string;
|
|
4057
|
+
topic: string;
|
|
4058
|
+
}
|
|
4059
|
+
/** `floor.changed` broadcast: a party or booking of the store changed. */
|
|
4060
|
+
interface PosFloorChangedPayload {
|
|
4061
|
+
kind: string;
|
|
4062
|
+
store_uid: string;
|
|
4063
|
+
session_uid?: string;
|
|
4064
|
+
/** Set when `kind` is `reservation` (booked, seated, no-show). */
|
|
4065
|
+
reservation_uid?: string;
|
|
4066
|
+
status?: string;
|
|
4067
|
+
version?: number;
|
|
4068
|
+
}
|
|
3564
4069
|
//#endregion
|
|
3565
4070
|
//#region .flat/src/rules.d.ts
|
|
3566
4071
|
type Condition = {
|
|
@@ -3943,4 +4448,4 @@ interface CheckoutResolved {
|
|
|
3943
4448
|
billingFields: Record<string, CheckoutMode>;
|
|
3944
4449
|
}
|
|
3945
4450
|
//#endregion
|
|
3946
|
-
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, KioskDeviceConfigPayment, KioskDeviceConfigScope, KioskDeviceConfigSettings, KioskDeviceOverrides, KioskHealthBatchInput, KioskHealthBatchResult, KioskHealthSample, KioskHeartbeatHealth, KioskHeartbeatInput, KioskHeartbeatResult, KioskOrderPager, KioskPagerSide, KioskPagersOverrides, KioskPagersSettings, KioskRealtimeToken, MatchResult, MatchableRule, Menu, MenuLookup, MerchantPayment, Metadata, MixedPaymentsEffect, MixedPaymentsLimits, ModifierControlType, ModifierGroup, MultiLanguageText, OrConditions, Order, OrderChangedCallback, OrderChangedCallbackError, OrderChangedCheckoutState, OrderChangedError, OrderChangedPayload, OrderChangedRunStatus, OrderFulfillment, OrderInsertInput, OrderLine, OrderListInput, OrderRecordPaymentInput, OrderRedeem, OrderRedeemInput, OrderRedemptionState, OrderRedemptionStep, OrderReorderInput, 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, PosHealthBatchInput, PosHealthBatchResult, PosHealthSample, PosHeartbeatHealth, PosHeartbeatInput, PosHeartbeatResult, PosKioskOrder, PosKioskSettleInput, PosKioskSettleResult, PosOrderInput, PosOrderResult, PosStaff, PricingModifier, PricingVariant, Product, ProductAvailability, ProductPricing, ProductRecommendationLink, Recommendation, RecurringDateCronExpression, RecurringDateCronRepeat, RecurringDateCronResult, RecurringDateCronValues, RuleInterpretation, RulesEngineMonitoring, RulesEngineOrder, RulesEngineOrderLine, RulesEngineParams, RulesEngineRuntime, 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, TenderAllocation, TenderAllocationInput, TenderAmount, TenderDetails, TenderRefundInput, TenderReplaceInput, TenderVoidInput, Variant, VariantGroup };
|
|
4451
|
+
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, KioskDeviceConfigPayment, KioskDeviceConfigScope, KioskDeviceConfigSettings, KioskDeviceOverrides, KioskDevicePaymentSettings, KioskHealthBatchInput, KioskHealthBatchResult, KioskHealthSample, KioskHeartbeatHealth, KioskHeartbeatInput, KioskHeartbeatResult, KioskOrderPager, KioskPagerSide, KioskPagersOverrides, KioskPagersSettings, KioskRealtimeToken, MatchResult, MatchableRule, Menu, MenuLookup, MerchantPayment, Metadata, MixedPaymentsEffect, MixedPaymentsLimits, ModifierControlType, ModifierGroup, MultiLanguageText, OrConditions, Order, OrderChangedCallback, OrderChangedCallbackError, OrderChangedCheckoutState, OrderChangedError, OrderChangedPayload, OrderChangedRunStatus, OrderDeviceCredential, OrderDeviceKind, OrderDeviceListInput, OrderDeviceListResult, OrderFulfillment, OrderInsertInput, OrderLine, OrderListInput, OrderRecordPaymentInput, OrderRedeem, OrderRedeemInput, OrderRedemptionState, OrderRedemptionStep, OrderReorderInput, 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, RecurringDateCronExpression, RecurringDateCronRepeat, RecurringDateCronResult, RecurringDateCronValues, RuleInterpretation, RulesEngineMonitoring, RulesEngineOrder, RulesEngineOrderLine, RulesEngineParams, RulesEngineRuntime, 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, TenderAllocation, TenderAllocationInput, TenderAmount, TenderDetails, TenderRefundInput, TenderReplaceInput, TenderVoidInput, Variant, VariantGroup };
|