arky-sdk 0.7.111 → 0.7.113
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/admin.cjs +112 -127
- package/dist/admin.cjs.map +1 -1
- package/dist/admin.d.cts +1 -1
- package/dist/admin.d.ts +1 -1
- package/dist/admin.js +112 -127
- package/dist/admin.js.map +1 -1
- package/dist/{index-DTg5d847.d.ts → index-C5gikdBg.d.cts} +2 -2
- package/dist/{index-BCAQZOwm.d.cts → index-MFMjlIfS.d.ts} +2 -2
- package/dist/index.cjs +137 -215
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +22 -36
- package/dist/index.d.ts +22 -36
- package/dist/index.js +137 -215
- package/dist/index.js.map +1 -1
- package/dist/storefront.cjs +48 -87
- package/dist/storefront.cjs.map +1 -1
- package/dist/storefront.d.cts +1 -1
- package/dist/storefront.d.ts +1 -1
- package/dist/storefront.js +48 -87
- package/dist/storefront.js.map +1 -1
- package/dist/types.cjs.map +1 -1
- package/dist/types.d.cts +152 -324
- package/dist/types.d.ts +152 -324
- package/dist/types.js.map +1 -1
- package/dist/utils.cjs.map +1 -1
- package/dist/utils.d.cts +1 -1
- package/dist/utils.d.ts +1 -1
- package/dist/utils.js.map +1 -1
- package/package.json +1 -1
package/dist/types.d.cts
CHANGED
|
@@ -66,11 +66,52 @@ interface EshopQuoteItem {
|
|
|
66
66
|
quantity: number;
|
|
67
67
|
price?: Price;
|
|
68
68
|
}
|
|
69
|
+
interface SlotRange {
|
|
70
|
+
from: number;
|
|
71
|
+
to: number;
|
|
72
|
+
}
|
|
73
|
+
interface ServiceQuoteItem {
|
|
74
|
+
service_id: string;
|
|
75
|
+
provider_id: string;
|
|
76
|
+
slots: SlotRange[];
|
|
77
|
+
forms?: FormEntry[];
|
|
78
|
+
price?: Price;
|
|
79
|
+
}
|
|
80
|
+
interface ServiceCheckoutPart {
|
|
81
|
+
service_id: string;
|
|
82
|
+
provider_id: string;
|
|
83
|
+
slots: SlotRange[];
|
|
84
|
+
forms: FormEntry[];
|
|
85
|
+
}
|
|
86
|
+
interface ProductQuoteItemInput extends EshopQuoteItem {
|
|
87
|
+
type: "product";
|
|
88
|
+
}
|
|
89
|
+
interface ServiceQuoteItemInput extends ServiceQuoteItem {
|
|
90
|
+
type: "booking";
|
|
91
|
+
}
|
|
92
|
+
type OrderQuoteItemInput = ProductQuoteItemInput | ServiceQuoteItemInput;
|
|
93
|
+
type QuoteItemInput = OrderQuoteItemInput;
|
|
94
|
+
type OrderQuoteCompatibleItemInput = OrderQuoteItemInput | EshopQuoteItem | ServiceQuoteItem;
|
|
95
|
+
interface ProductCheckoutItemInput extends EshopItem {
|
|
96
|
+
type: "product";
|
|
97
|
+
}
|
|
98
|
+
interface ServiceCheckoutItemInput {
|
|
99
|
+
type: "booking";
|
|
100
|
+
service_id: string;
|
|
101
|
+
provider_id: string;
|
|
102
|
+
slots: SlotRange[];
|
|
103
|
+
forms?: FormEntry[];
|
|
104
|
+
price?: Price;
|
|
105
|
+
}
|
|
106
|
+
type OrderCheckoutItemInput = ProductCheckoutItemInput | ServiceCheckoutItemInput;
|
|
107
|
+
type CheckoutItemInput = OrderCheckoutItemInput;
|
|
108
|
+
type OrderCheckoutCompatibleItemInput = OrderCheckoutItemInput | EshopItem | ServiceCheckoutPart;
|
|
69
109
|
interface GetQuoteParams {
|
|
70
110
|
store_id?: string;
|
|
71
111
|
market?: string;
|
|
72
|
-
items:
|
|
112
|
+
items: OrderQuoteCompatibleItemInput[];
|
|
73
113
|
shipping_address?: Address;
|
|
114
|
+
billing_address?: Address;
|
|
74
115
|
forms?: FormEntry[];
|
|
75
116
|
payment_method_id?: string;
|
|
76
117
|
promo_code?: string;
|
|
@@ -80,7 +121,7 @@ interface GetQuoteParams {
|
|
|
80
121
|
interface OrderCheckoutParams {
|
|
81
122
|
store_id?: string;
|
|
82
123
|
market?: string;
|
|
83
|
-
items:
|
|
124
|
+
items: OrderCheckoutCompatibleItemInput[];
|
|
84
125
|
payment_method_id?: string;
|
|
85
126
|
shipping_address?: Address;
|
|
86
127
|
billing_address?: Address;
|
|
@@ -198,7 +239,7 @@ interface GetServicesParams {
|
|
|
198
239
|
limit?: number;
|
|
199
240
|
cursor?: string;
|
|
200
241
|
query?: string | number;
|
|
201
|
-
status?:
|
|
242
|
+
status?: ServiceStatus;
|
|
202
243
|
sort_field?: string;
|
|
203
244
|
sort_direction?: 'asc' | 'desc';
|
|
204
245
|
created_at_from?: number;
|
|
@@ -208,37 +249,6 @@ interface GetServicesParams {
|
|
|
208
249
|
from?: number;
|
|
209
250
|
to?: number;
|
|
210
251
|
}
|
|
211
|
-
interface BookingCreatePart {
|
|
212
|
-
service_id: string;
|
|
213
|
-
provider_id: string;
|
|
214
|
-
slots: SlotRange[];
|
|
215
|
-
forms: FormEntry[];
|
|
216
|
-
}
|
|
217
|
-
interface BookingCheckoutParams {
|
|
218
|
-
store_id?: string;
|
|
219
|
-
market?: string;
|
|
220
|
-
items: BookingCreatePart[];
|
|
221
|
-
payment_method_id?: string;
|
|
222
|
-
forms?: FormEntry[];
|
|
223
|
-
promo_code_id?: string;
|
|
224
|
-
}
|
|
225
|
-
interface SlotRange {
|
|
226
|
-
from: number;
|
|
227
|
-
to: number;
|
|
228
|
-
}
|
|
229
|
-
interface BookingQuoteItem {
|
|
230
|
-
service_id: string;
|
|
231
|
-
provider_id: string;
|
|
232
|
-
slots: SlotRange[];
|
|
233
|
-
price?: Price;
|
|
234
|
-
}
|
|
235
|
-
interface GetBookingQuoteParams {
|
|
236
|
-
store_id?: string;
|
|
237
|
-
market?: string;
|
|
238
|
-
items: BookingQuoteItem[];
|
|
239
|
-
payment_method_id?: string;
|
|
240
|
-
promo_code?: string;
|
|
241
|
-
}
|
|
242
252
|
interface TimelinePoint {
|
|
243
253
|
timestamp: number;
|
|
244
254
|
booked: number;
|
|
@@ -248,7 +258,7 @@ interface ProviderWithTimeline {
|
|
|
248
258
|
key: string;
|
|
249
259
|
store_id: string;
|
|
250
260
|
slug: Record<string, string>;
|
|
251
|
-
status:
|
|
261
|
+
status: ProviderStatus;
|
|
252
262
|
blocks: Block[];
|
|
253
263
|
taxonomies: TaxonomyEntry[];
|
|
254
264
|
created_at: number;
|
|
@@ -387,6 +397,7 @@ interface CreateProductParams {
|
|
|
387
397
|
slug?: Record<string, string>;
|
|
388
398
|
blocks?: Block[];
|
|
389
399
|
taxonomies?: TaxonomyEntry[];
|
|
400
|
+
filters?: TaxonomyEntry[];
|
|
390
401
|
variants?: CreateProductVariantInput[];
|
|
391
402
|
}
|
|
392
403
|
interface UpdateProductParams {
|
|
@@ -396,6 +407,7 @@ interface UpdateProductParams {
|
|
|
396
407
|
slug?: Record<string, string>;
|
|
397
408
|
blocks?: Block[];
|
|
398
409
|
taxonomies?: TaxonomyEntry[];
|
|
410
|
+
filters?: TaxonomyEntry[];
|
|
399
411
|
variants?: UpdateProductVariantInput[];
|
|
400
412
|
status?: ProductStatus;
|
|
401
413
|
}
|
|
@@ -427,10 +439,7 @@ interface GetOrdersParams {
|
|
|
427
439
|
created_at_to?: number | null;
|
|
428
440
|
audience_id?: string;
|
|
429
441
|
}
|
|
430
|
-
interface OrderUpdateItem {
|
|
431
|
-
product_id: string;
|
|
432
|
-
variant_id: string;
|
|
433
|
-
quantity: number;
|
|
442
|
+
interface OrderUpdateItem extends EshopItem {
|
|
434
443
|
}
|
|
435
444
|
interface UpdateOrderParams {
|
|
436
445
|
id: string;
|
|
@@ -440,7 +449,7 @@ interface UpdateOrderParams {
|
|
|
440
449
|
shipping_address?: Address | null;
|
|
441
450
|
billing_address?: Address | null;
|
|
442
451
|
forms?: FormEntry[];
|
|
443
|
-
items?:
|
|
452
|
+
items?: OrderCheckoutCompatibleItemInput[];
|
|
444
453
|
payment?: OrderPayment;
|
|
445
454
|
}
|
|
446
455
|
interface CreateOrderParams {
|
|
@@ -448,50 +457,28 @@ interface CreateOrderParams {
|
|
|
448
457
|
market?: string;
|
|
449
458
|
customer_id: string;
|
|
450
459
|
forms?: FormEntry[];
|
|
451
|
-
items:
|
|
460
|
+
items: OrderCheckoutCompatibleItemInput[];
|
|
452
461
|
shipping_address?: Address;
|
|
453
462
|
billing_address?: Address;
|
|
454
463
|
}
|
|
455
|
-
interface CreateBookingParams {
|
|
456
|
-
store_id?: string;
|
|
457
|
-
market?: string;
|
|
458
|
-
customer_id: string;
|
|
459
|
-
forms?: FormEntry[];
|
|
460
|
-
items: BookingCreatePart[];
|
|
461
|
-
payment_method_id?: string;
|
|
462
|
-
promo_code?: string;
|
|
463
|
-
}
|
|
464
|
-
interface BookingUpdateItem {
|
|
465
|
-
id: string;
|
|
466
|
-
service_id: string;
|
|
467
|
-
provider_id: string;
|
|
468
|
-
from: number;
|
|
469
|
-
to: number;
|
|
470
|
-
forms: FormEntry[];
|
|
471
|
-
}
|
|
472
|
-
interface UpdateBookingParams {
|
|
473
|
-
id: string;
|
|
474
|
-
store_id?: string;
|
|
475
|
-
forms?: FormEntry[];
|
|
476
|
-
items?: BookingUpdateItem[];
|
|
477
|
-
payment?: BookingPayment;
|
|
478
|
-
}
|
|
479
464
|
interface CreateProviderParams {
|
|
480
465
|
store_id?: string;
|
|
481
466
|
key: string;
|
|
482
467
|
slug?: Record<string, string>;
|
|
483
|
-
status?:
|
|
468
|
+
status?: ProviderStatus;
|
|
484
469
|
blocks?: Block[];
|
|
485
470
|
taxonomies?: TaxonomyEntry[];
|
|
471
|
+
filters?: TaxonomyEntry[];
|
|
486
472
|
}
|
|
487
473
|
interface UpdateProviderParams {
|
|
488
474
|
id: string;
|
|
489
475
|
store_id?: string;
|
|
490
476
|
key?: string;
|
|
491
477
|
slug?: Record<string, string>;
|
|
492
|
-
status?:
|
|
478
|
+
status?: ProviderStatus;
|
|
493
479
|
blocks?: Block[];
|
|
494
480
|
taxonomies?: TaxonomyEntry[];
|
|
481
|
+
filters?: TaxonomyEntry[];
|
|
495
482
|
}
|
|
496
483
|
interface DeleteProviderParams {
|
|
497
484
|
id: string;
|
|
@@ -511,8 +498,9 @@ interface CreateServiceParams {
|
|
|
511
498
|
slug?: Record<string, string>;
|
|
512
499
|
blocks?: Block[];
|
|
513
500
|
taxonomies?: TaxonomyEntry[];
|
|
501
|
+
filters?: TaxonomyEntry[];
|
|
514
502
|
location?: ZoneLocation;
|
|
515
|
-
status?:
|
|
503
|
+
status?: ServiceStatus;
|
|
516
504
|
}
|
|
517
505
|
interface UpdateServiceParams {
|
|
518
506
|
id: string;
|
|
@@ -521,8 +509,9 @@ interface UpdateServiceParams {
|
|
|
521
509
|
slug?: Record<string, string>;
|
|
522
510
|
blocks?: Block[];
|
|
523
511
|
taxonomies?: TaxonomyEntry[];
|
|
512
|
+
filters?: TaxonomyEntry[];
|
|
524
513
|
location?: ZoneLocation | null;
|
|
525
|
-
status?:
|
|
514
|
+
status?: ServiceStatus;
|
|
526
515
|
}
|
|
527
516
|
interface CreateServiceProviderParams {
|
|
528
517
|
store_id?: string;
|
|
@@ -576,7 +565,7 @@ interface GetProvidersParams {
|
|
|
576
565
|
taxonomy_query?: TaxonomyQuery[];
|
|
577
566
|
match_all?: boolean;
|
|
578
567
|
query?: string | number | null;
|
|
579
|
-
status?:
|
|
568
|
+
status?: ProviderStatus;
|
|
580
569
|
limit?: number;
|
|
581
570
|
cursor?: string;
|
|
582
571
|
sort_field?: string | null;
|
|
@@ -591,17 +580,7 @@ interface GetProviderParams {
|
|
|
591
580
|
slug?: string;
|
|
592
581
|
store_id?: string;
|
|
593
582
|
}
|
|
594
|
-
interface
|
|
595
|
-
id: string;
|
|
596
|
-
store_id?: string;
|
|
597
|
-
}
|
|
598
|
-
interface CancelBookingItemParams {
|
|
599
|
-
store_id?: string;
|
|
600
|
-
booking_id: string;
|
|
601
|
-
item_id: string;
|
|
602
|
-
reason?: string;
|
|
603
|
-
}
|
|
604
|
-
interface SearchBookingsParams {
|
|
583
|
+
interface SearchOrderServiceItemsParams {
|
|
605
584
|
store_id?: string;
|
|
606
585
|
customer_id?: string;
|
|
607
586
|
service_ids?: string[];
|
|
@@ -830,15 +809,11 @@ interface GetStoreMediaParams2 {
|
|
|
830
809
|
sort_field?: string;
|
|
831
810
|
sort_direction?: 'asc' | 'desc';
|
|
832
811
|
}
|
|
833
|
-
interface ProcessBookingRefundParams {
|
|
834
|
-
id: string;
|
|
835
|
-
amount: number;
|
|
836
|
-
}
|
|
837
812
|
interface ProcessOrderRefundParams {
|
|
838
813
|
id: string;
|
|
839
814
|
amount: number;
|
|
840
815
|
}
|
|
841
|
-
type SystemTemplateKey = "system:
|
|
816
|
+
type SystemTemplateKey = "system:user-invitation" | "system:order-status-update" | "system:user-confirmation" | "system:forgot-password";
|
|
842
817
|
interface GetAvailabilityParams {
|
|
843
818
|
store_id?: string;
|
|
844
819
|
service_id: string;
|
|
@@ -1175,7 +1150,6 @@ interface Customer {
|
|
|
1175
1150
|
interface CustomerDetail {
|
|
1176
1151
|
customer: Customer;
|
|
1177
1152
|
orders: Order[];
|
|
1178
|
-
bookings: Booking[];
|
|
1179
1153
|
audience_subscriptions: AudienceSubscription[];
|
|
1180
1154
|
form_submissions: FormSubmission[];
|
|
1181
1155
|
}
|
|
@@ -1223,50 +1197,6 @@ interface PaymentTaxLine {
|
|
|
1223
1197
|
label?: string;
|
|
1224
1198
|
scope?: string;
|
|
1225
1199
|
}
|
|
1226
|
-
interface BookingPaymentTax {
|
|
1227
|
-
amount: number;
|
|
1228
|
-
mode_snapshot?: string;
|
|
1229
|
-
rate_bps: number;
|
|
1230
|
-
lines: BookingPaymentTaxLine[];
|
|
1231
|
-
}
|
|
1232
|
-
interface BookingPaymentTaxLine {
|
|
1233
|
-
rate_bps: number;
|
|
1234
|
-
amount: number;
|
|
1235
|
-
label?: string;
|
|
1236
|
-
scope?: string;
|
|
1237
|
-
}
|
|
1238
|
-
interface BookingPaymentPromoCode {
|
|
1239
|
-
id: string;
|
|
1240
|
-
code: string;
|
|
1241
|
-
type: string;
|
|
1242
|
-
value: number;
|
|
1243
|
-
}
|
|
1244
|
-
type BookingPaymentProvider = {
|
|
1245
|
-
type: 'stripe';
|
|
1246
|
-
customer_id: string;
|
|
1247
|
-
payment_intent_id?: string;
|
|
1248
|
-
};
|
|
1249
|
-
interface BookingPaymentRefund {
|
|
1250
|
-
id: string;
|
|
1251
|
-
total: number;
|
|
1252
|
-
provider_refund_id?: string;
|
|
1253
|
-
status: string;
|
|
1254
|
-
created_at: number;
|
|
1255
|
-
}
|
|
1256
|
-
interface BookingPayment {
|
|
1257
|
-
currency: string;
|
|
1258
|
-
market: string;
|
|
1259
|
-
subtotal: number;
|
|
1260
|
-
discount: number;
|
|
1261
|
-
total: number;
|
|
1262
|
-
paid: number;
|
|
1263
|
-
tax?: BookingPaymentTax;
|
|
1264
|
-
promo_code?: BookingPaymentPromoCode;
|
|
1265
|
-
provider?: BookingPaymentProvider;
|
|
1266
|
-
refunds: BookingPaymentRefund[];
|
|
1267
|
-
payment_method_id?: string;
|
|
1268
|
-
method_type: PaymentMethodType;
|
|
1269
|
-
}
|
|
1270
1200
|
interface OrderPaymentTax {
|
|
1271
1201
|
amount: number;
|
|
1272
1202
|
mode_snapshot?: string;
|
|
@@ -1320,24 +1250,12 @@ interface PromoCodeValidation {
|
|
|
1320
1250
|
discounts: Discount[];
|
|
1321
1251
|
conditions: Condition[];
|
|
1322
1252
|
}
|
|
1323
|
-
interface
|
|
1324
|
-
market: string;
|
|
1325
|
-
zone: Zone | null;
|
|
1326
|
-
subtotal: number;
|
|
1327
|
-
discount: number;
|
|
1328
|
-
tax: number;
|
|
1329
|
-
total: number;
|
|
1330
|
-
payment_method: PaymentMethod | null;
|
|
1331
|
-
payment_methods: PaymentMethod[];
|
|
1332
|
-
promo_code: PromoCodeValidation | null;
|
|
1333
|
-
payment: BookingPayment;
|
|
1334
|
-
charge_amount: number;
|
|
1253
|
+
interface OrderQuote {
|
|
1335
1254
|
id?: string;
|
|
1336
1255
|
expires_at?: number;
|
|
1337
|
-
}
|
|
1338
|
-
interface OrderQuote {
|
|
1339
1256
|
market: string;
|
|
1340
1257
|
zone: Zone | null;
|
|
1258
|
+
items: QuoteLine[];
|
|
1341
1259
|
subtotal: number;
|
|
1342
1260
|
shipping: number;
|
|
1343
1261
|
discount: number;
|
|
@@ -1349,8 +1267,6 @@ interface OrderQuote {
|
|
|
1349
1267
|
promo_code: PromoCodeValidation | null;
|
|
1350
1268
|
payment: OrderPayment;
|
|
1351
1269
|
charge_amount: number;
|
|
1352
|
-
id?: string;
|
|
1353
|
-
expires_at?: number;
|
|
1354
1270
|
}
|
|
1355
1271
|
interface Price {
|
|
1356
1272
|
currency: string;
|
|
@@ -1412,17 +1328,6 @@ interface EshopCartItem {
|
|
|
1412
1328
|
added_at: number;
|
|
1413
1329
|
max_stock?: number;
|
|
1414
1330
|
}
|
|
1415
|
-
interface BookingCartItem {
|
|
1416
|
-
id: string;
|
|
1417
|
-
service_id: string;
|
|
1418
|
-
service_name: string;
|
|
1419
|
-
date: string;
|
|
1420
|
-
from: number;
|
|
1421
|
-
to: number;
|
|
1422
|
-
time_text: string;
|
|
1423
|
-
provider_id?: string;
|
|
1424
|
-
forms: FormEntry[];
|
|
1425
|
-
}
|
|
1426
1331
|
type IntegrationProvider = {
|
|
1427
1332
|
type: 'stripe';
|
|
1428
1333
|
secret_key?: string;
|
|
@@ -1657,6 +1562,7 @@ interface Product {
|
|
|
1657
1562
|
slug: Record<string, string>;
|
|
1658
1563
|
blocks: Block[];
|
|
1659
1564
|
taxonomies: TaxonomyEntry[];
|
|
1565
|
+
filters?: TaxonomyEntry[];
|
|
1660
1566
|
variants: ProductVariant[];
|
|
1661
1567
|
status: ProductStatus;
|
|
1662
1568
|
created_at: number;
|
|
@@ -1668,21 +1574,85 @@ interface GalleryItem {
|
|
|
1668
1574
|
alt?: string;
|
|
1669
1575
|
caption?: string;
|
|
1670
1576
|
}
|
|
1671
|
-
interface
|
|
1577
|
+
interface ProductOrderItemSnapshot {
|
|
1672
1578
|
product_key: string;
|
|
1673
1579
|
variant_sku?: string;
|
|
1674
1580
|
variant_attributes: Block[];
|
|
1675
1581
|
price: Price;
|
|
1676
1582
|
}
|
|
1677
|
-
interface
|
|
1583
|
+
interface ServiceOrderItemSnapshot {
|
|
1584
|
+
service_key: string;
|
|
1585
|
+
provider_key: string;
|
|
1586
|
+
price: Price;
|
|
1587
|
+
}
|
|
1588
|
+
type OrderItemSnapshot = ProductOrderItemSnapshot | ServiceOrderItemSnapshot;
|
|
1589
|
+
type ProductQuoteLineAvailability = {
|
|
1590
|
+
ok: true;
|
|
1591
|
+
available?: number;
|
|
1592
|
+
} | {
|
|
1593
|
+
ok: false;
|
|
1594
|
+
reason: string;
|
|
1595
|
+
};
|
|
1596
|
+
type ServiceQuoteLineAvailability = {
|
|
1597
|
+
ok: true;
|
|
1598
|
+
spots: number;
|
|
1599
|
+
} | {
|
|
1600
|
+
ok: false;
|
|
1601
|
+
reason: string;
|
|
1602
|
+
};
|
|
1603
|
+
interface ProductQuoteLine {
|
|
1604
|
+
type: 'product';
|
|
1605
|
+
line_id: string;
|
|
1606
|
+
product_id: string;
|
|
1607
|
+
variant_id: string;
|
|
1608
|
+
quantity: number;
|
|
1609
|
+
unit_price: number;
|
|
1610
|
+
subtotal: number;
|
|
1611
|
+
discount: number;
|
|
1612
|
+
tax: number;
|
|
1613
|
+
total: number;
|
|
1614
|
+
snapshot: ProductOrderItemSnapshot;
|
|
1615
|
+
availability: ProductQuoteLineAvailability;
|
|
1616
|
+
}
|
|
1617
|
+
interface ServiceQuoteLine {
|
|
1618
|
+
type: 'booking';
|
|
1619
|
+
line_id: string;
|
|
1620
|
+
service_id: string;
|
|
1621
|
+
provider_id: string;
|
|
1622
|
+
from: number;
|
|
1623
|
+
to: number;
|
|
1624
|
+
quantity: 1;
|
|
1625
|
+
unit_price: number;
|
|
1626
|
+
subtotal: number;
|
|
1627
|
+
discount: number;
|
|
1628
|
+
tax: number;
|
|
1629
|
+
total: number;
|
|
1630
|
+
snapshot: ServiceOrderItemSnapshot;
|
|
1631
|
+
availability: ServiceQuoteLineAvailability;
|
|
1632
|
+
}
|
|
1633
|
+
type QuoteLine = ProductQuoteLine | ServiceQuoteLine;
|
|
1634
|
+
interface ProductOrderItem {
|
|
1635
|
+
type: 'product';
|
|
1678
1636
|
id: string;
|
|
1679
1637
|
product_id: string;
|
|
1680
1638
|
variant_id: string;
|
|
1681
1639
|
quantity: number;
|
|
1682
1640
|
location_id?: string;
|
|
1683
|
-
snapshot:
|
|
1641
|
+
snapshot: ProductOrderItemSnapshot;
|
|
1684
1642
|
status: OrderItemStatus;
|
|
1685
1643
|
}
|
|
1644
|
+
interface ServiceOrderItem {
|
|
1645
|
+
type: 'booking';
|
|
1646
|
+
id: string;
|
|
1647
|
+
service_id: string;
|
|
1648
|
+
provider_id: string;
|
|
1649
|
+
from: number;
|
|
1650
|
+
to: number;
|
|
1651
|
+
forms: FormEntry[];
|
|
1652
|
+
snapshot: ServiceOrderItemSnapshot;
|
|
1653
|
+
status: OrderItemStatus;
|
|
1654
|
+
}
|
|
1655
|
+
type OrderItem = ProductOrderItem | ServiceOrderItem;
|
|
1686
1656
|
interface HistoryEntry {
|
|
1687
1657
|
action: string;
|
|
1688
1658
|
reason?: string;
|
|
@@ -1702,9 +1672,16 @@ interface Order {
|
|
|
1702
1672
|
shipments: Shipment[];
|
|
1703
1673
|
history: HistoryEntry[];
|
|
1704
1674
|
audience_id?: string;
|
|
1675
|
+
fired_reminders: number[];
|
|
1705
1676
|
created_at: number;
|
|
1706
1677
|
updated_at: number;
|
|
1707
1678
|
}
|
|
1679
|
+
interface OrderCheckoutResult {
|
|
1680
|
+
order_id: string;
|
|
1681
|
+
number: string;
|
|
1682
|
+
client_secret: string | null;
|
|
1683
|
+
payment: OrderPayment;
|
|
1684
|
+
}
|
|
1708
1685
|
interface Zone {
|
|
1709
1686
|
id: string;
|
|
1710
1687
|
store_id: string;
|
|
@@ -1756,6 +1733,8 @@ type WebhookEventSubscription = {
|
|
|
1756
1733
|
event: 'order.refunded';
|
|
1757
1734
|
} | {
|
|
1758
1735
|
event: 'order.cancelled';
|
|
1736
|
+
} | {
|
|
1737
|
+
event: 'order.reminder';
|
|
1759
1738
|
} | {
|
|
1760
1739
|
event: 'order.shipment_created';
|
|
1761
1740
|
} | {
|
|
@@ -1770,22 +1749,6 @@ type WebhookEventSubscription = {
|
|
|
1770
1749
|
event: 'order.shipment_returned';
|
|
1771
1750
|
} | {
|
|
1772
1751
|
event: 'order.shipment_status_changed';
|
|
1773
|
-
} | {
|
|
1774
|
-
event: 'booking.created';
|
|
1775
|
-
} | {
|
|
1776
|
-
event: 'booking.updated';
|
|
1777
|
-
} | {
|
|
1778
|
-
event: 'booking.payment_received';
|
|
1779
|
-
} | {
|
|
1780
|
-
event: 'booking.payment_failed';
|
|
1781
|
-
} | {
|
|
1782
|
-
event: 'booking.refunded';
|
|
1783
|
-
} | {
|
|
1784
|
-
event: 'booking.cancelled';
|
|
1785
|
-
} | {
|
|
1786
|
-
event: 'booking.item_cancelled';
|
|
1787
|
-
} | {
|
|
1788
|
-
event: 'booking.reminder';
|
|
1789
1752
|
} | {
|
|
1790
1753
|
event: 'product.created';
|
|
1791
1754
|
} | {
|
|
@@ -2003,53 +1966,17 @@ interface ApiResponse<T> {
|
|
|
2003
1966
|
total?: number;
|
|
2004
1967
|
}
|
|
2005
1968
|
interface PaginatedResponse<T> {
|
|
2006
|
-
|
|
1969
|
+
items: T[];
|
|
1970
|
+
cursor: string | null;
|
|
1971
|
+
data?: T[];
|
|
2007
1972
|
meta?: {
|
|
2008
1973
|
total: number;
|
|
2009
1974
|
page: number;
|
|
2010
1975
|
per_page: number;
|
|
2011
1976
|
};
|
|
2012
1977
|
}
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
total_steps: number;
|
|
2016
|
-
steps: Record<number, {
|
|
2017
|
-
name: string;
|
|
2018
|
-
label_key: string;
|
|
2019
|
-
}>;
|
|
2020
|
-
weekdays: string[];
|
|
2021
|
-
month_year: string;
|
|
2022
|
-
days: any[];
|
|
2023
|
-
current: Date;
|
|
2024
|
-
selected_date: string | null;
|
|
2025
|
-
slots: any[];
|
|
2026
|
-
selected_slot: any | null;
|
|
2027
|
-
selected_provider: any | null;
|
|
2028
|
-
providers: any[];
|
|
2029
|
-
loading: boolean;
|
|
2030
|
-
start_date: string | null;
|
|
2031
|
-
end_date: string | null;
|
|
2032
|
-
guest_token: string | null;
|
|
2033
|
-
service: any | null;
|
|
2034
|
-
store: Store | null;
|
|
2035
|
-
currency: string;
|
|
2036
|
-
booking_forms: FormEntry[];
|
|
2037
|
-
api_url: string;
|
|
2038
|
-
store_id: string;
|
|
2039
|
-
timezone: string;
|
|
2040
|
-
tz_groups: any;
|
|
2041
|
-
items: BookingCartItem[];
|
|
2042
|
-
allowed_payment_methods: string[];
|
|
2043
|
-
payment_config: {
|
|
2044
|
-
provider: {
|
|
2045
|
-
publishable_key: string;
|
|
2046
|
-
currency: string;
|
|
2047
|
-
} | null;
|
|
2048
|
-
enabled: boolean;
|
|
2049
|
-
};
|
|
2050
|
-
}
|
|
2051
|
-
type BookingServiceStatus = 'active' | 'draft' | 'archived';
|
|
2052
|
-
type BookingProviderStatus = 'active' | 'draft' | 'archived';
|
|
1978
|
+
type ServiceStatus = 'active' | 'draft' | 'archived';
|
|
1979
|
+
type ProviderStatus = 'active' | 'draft' | 'archived';
|
|
2053
1980
|
type ProductStatus = 'active' | 'draft' | 'archived';
|
|
2054
1981
|
type CustomerStatus = 'active' | 'archived';
|
|
2055
1982
|
type AudienceStatus = 'active' | 'draft' | 'archived';
|
|
@@ -2060,17 +1987,7 @@ type NodeStatus = 'active' | 'draft' | 'archived';
|
|
|
2060
1987
|
type EmailTemplateStatus = 'active' | 'draft' | 'archived';
|
|
2061
1988
|
type FormStatus = 'active' | 'draft' | 'archived';
|
|
2062
1989
|
type TaxonomyStatus = 'active' | 'draft' | 'archived';
|
|
2063
|
-
type BookingCancellationReason = 'admin_rejected' | 'customer_cancelled' | 'payment_failed' | 'expired' | 'other';
|
|
2064
1990
|
type OrderCancellationReason = 'admin_rejected' | 'customer_cancelled' | 'payment_failed' | 'expired' | 'other';
|
|
2065
|
-
type BookingItemStatus = {
|
|
2066
|
-
status: 'pending';
|
|
2067
|
-
expires_at: number;
|
|
2068
|
-
} | {
|
|
2069
|
-
status: 'confirmed';
|
|
2070
|
-
} | {
|
|
2071
|
-
status: 'cancelled';
|
|
2072
|
-
reason: BookingCancellationReason;
|
|
2073
|
-
};
|
|
2074
1991
|
type OrderItemStatus = {
|
|
2075
1992
|
status: 'pending';
|
|
2076
1993
|
expires_at: number;
|
|
@@ -2080,22 +1997,6 @@ type OrderItemStatus = {
|
|
|
2080
1997
|
status: 'cancelled';
|
|
2081
1998
|
reason: OrderCancellationReason;
|
|
2082
1999
|
};
|
|
2083
|
-
type BookingPaymentStatus = {
|
|
2084
|
-
status: 'pending';
|
|
2085
|
-
at: number;
|
|
2086
|
-
} | {
|
|
2087
|
-
status: 'authorized';
|
|
2088
|
-
at: number;
|
|
2089
|
-
amount: number;
|
|
2090
|
-
} | {
|
|
2091
|
-
status: 'captured';
|
|
2092
|
-
at: number;
|
|
2093
|
-
amount: number;
|
|
2094
|
-
} | {
|
|
2095
|
-
status: 'failed';
|
|
2096
|
-
at: number;
|
|
2097
|
-
reason?: string;
|
|
2098
|
-
};
|
|
2099
2000
|
type OrderPaymentStatus = {
|
|
2100
2001
|
status: 'pending';
|
|
2101
2002
|
at: number;
|
|
@@ -2112,50 +2013,10 @@ type OrderPaymentStatus = {
|
|
|
2112
2013
|
at: number;
|
|
2113
2014
|
reason?: string;
|
|
2114
2015
|
};
|
|
2115
|
-
interface BookingItemSnapshot {
|
|
2116
|
-
service_key: string;
|
|
2117
|
-
provider_key: string;
|
|
2118
|
-
price: Price;
|
|
2119
|
-
}
|
|
2120
2016
|
interface TimeRange {
|
|
2121
2017
|
from: number;
|
|
2122
2018
|
to: number;
|
|
2123
2019
|
}
|
|
2124
|
-
interface BookingItem {
|
|
2125
|
-
id: string;
|
|
2126
|
-
service_id: string;
|
|
2127
|
-
provider_id: string;
|
|
2128
|
-
store_id: string;
|
|
2129
|
-
booking_id: string;
|
|
2130
|
-
from: number;
|
|
2131
|
-
to: number;
|
|
2132
|
-
forms: FormEntry[];
|
|
2133
|
-
snapshot: BookingItemSnapshot;
|
|
2134
|
-
status: BookingItemStatus;
|
|
2135
|
-
}
|
|
2136
|
-
interface Booking {
|
|
2137
|
-
id: string;
|
|
2138
|
-
number: string;
|
|
2139
|
-
customer_id: string;
|
|
2140
|
-
verified: boolean;
|
|
2141
|
-
forms: FormEntry[];
|
|
2142
|
-
store_id: string;
|
|
2143
|
-
service_ids: string[];
|
|
2144
|
-
provider_ids: string[];
|
|
2145
|
-
payment: BookingPayment;
|
|
2146
|
-
store?: Store;
|
|
2147
|
-
account?: any;
|
|
2148
|
-
items: BookingItem[];
|
|
2149
|
-
audience_id?: string;
|
|
2150
|
-
history?: {
|
|
2151
|
-
action: string;
|
|
2152
|
-
reason?: string;
|
|
2153
|
-
timestamp: number;
|
|
2154
|
-
}[];
|
|
2155
|
-
fired_reminders: number[];
|
|
2156
|
-
created_at: number;
|
|
2157
|
-
last_modified: number;
|
|
2158
|
-
}
|
|
2159
2020
|
interface Node {
|
|
2160
2021
|
id: string;
|
|
2161
2022
|
key: string;
|
|
@@ -2243,35 +2104,35 @@ interface ServiceProvider {
|
|
|
2243
2104
|
created_at: number;
|
|
2244
2105
|
updated_at: number;
|
|
2245
2106
|
}
|
|
2246
|
-
interface
|
|
2107
|
+
interface Service {
|
|
2247
2108
|
id: string;
|
|
2248
2109
|
key: string;
|
|
2249
2110
|
slug: Record<string, string>;
|
|
2250
2111
|
store_id: string;
|
|
2251
2112
|
blocks: Block[];
|
|
2252
2113
|
taxonomies: TaxonomyEntry[];
|
|
2114
|
+
filters?: TaxonomyEntry[];
|
|
2253
2115
|
created_at: number;
|
|
2254
2116
|
updated_at: number;
|
|
2255
|
-
status:
|
|
2117
|
+
status: ServiceStatus;
|
|
2256
2118
|
}
|
|
2257
|
-
type Service = BookingService;
|
|
2258
2119
|
interface ProviderTimelinePoint {
|
|
2259
2120
|
timestamp: number;
|
|
2260
2121
|
booked: number;
|
|
2261
2122
|
}
|
|
2262
|
-
interface
|
|
2123
|
+
interface Provider {
|
|
2263
2124
|
id: string;
|
|
2264
2125
|
key: string;
|
|
2265
2126
|
slug: Record<string, string>;
|
|
2266
2127
|
store_id: string;
|
|
2267
|
-
status:
|
|
2128
|
+
status: ProviderStatus;
|
|
2268
2129
|
blocks: Block[];
|
|
2269
2130
|
taxonomies: TaxonomyEntry[];
|
|
2131
|
+
filters?: TaxonomyEntry[];
|
|
2270
2132
|
timeline: ProviderTimelinePoint[];
|
|
2271
2133
|
created_at: number;
|
|
2272
2134
|
updated_at: number;
|
|
2273
2135
|
}
|
|
2274
|
-
type Provider = BookingProvider;
|
|
2275
2136
|
interface WorkflowEdge {
|
|
2276
2137
|
source: string;
|
|
2277
2138
|
target: string;
|
|
@@ -2444,39 +2305,6 @@ type EventAction = {
|
|
|
2444
2305
|
from: string;
|
|
2445
2306
|
to: string;
|
|
2446
2307
|
};
|
|
2447
|
-
} | {
|
|
2448
|
-
action: 'booking_created';
|
|
2449
|
-
} | {
|
|
2450
|
-
action: 'booking_updated';
|
|
2451
|
-
} | {
|
|
2452
|
-
action: 'booking_payment_received';
|
|
2453
|
-
data: {
|
|
2454
|
-
amount: number;
|
|
2455
|
-
currency: string;
|
|
2456
|
-
};
|
|
2457
|
-
} | {
|
|
2458
|
-
action: 'booking_payment_failed';
|
|
2459
|
-
data: {
|
|
2460
|
-
reason?: string;
|
|
2461
|
-
};
|
|
2462
|
-
} | {
|
|
2463
|
-
action: 'booking_refunded';
|
|
2464
|
-
data: {
|
|
2465
|
-
amount: number;
|
|
2466
|
-
currency: string;
|
|
2467
|
-
reason?: string;
|
|
2468
|
-
};
|
|
2469
|
-
} | {
|
|
2470
|
-
action: 'booking_cancelled';
|
|
2471
|
-
data: {
|
|
2472
|
-
reason?: string;
|
|
2473
|
-
};
|
|
2474
|
-
} | {
|
|
2475
|
-
action: 'booking_item_cancelled';
|
|
2476
|
-
data: {
|
|
2477
|
-
item_id: string;
|
|
2478
|
-
refund_amount: number;
|
|
2479
|
-
};
|
|
2480
2308
|
} | {
|
|
2481
2309
|
action: 'product_created';
|
|
2482
2310
|
} | {
|
|
@@ -2649,4 +2477,4 @@ interface PromoCode {
|
|
|
2649
2477
|
updated_at: number;
|
|
2650
2478
|
}
|
|
2651
2479
|
|
|
2652
|
-
export { type Access, type AccountAddress, type AccountApiToken, type AddAudienceSubscriberParams, type AddAudienceSubscriberResponse, type Address, type Agent, type AgentChat, type AgentChatMessage, type AgentChatStatus, type AgentStatus, type ApiResponse, type Audience, type AudienceAccessResponse, type AudienceStatus, type AudienceSubscribeResponse, type AudienceSubscriber, type AudienceSubscription, type AudienceSubscriptionPayment, type AudienceSubscriptionProvider, type AudienceSubscriptionSource, type AudienceSubscriptionStatus, type AudienceType, type AuthToken, type AvailabilityResponse, type AvailabilitySlot, type Block, type BlockType, type
|
|
2480
|
+
export { type Access, type AccountAddress, type AccountApiToken, type AddAudienceSubscriberParams, type AddAudienceSubscriberResponse, type Address, type Agent, type AgentChat, type AgentChatMessage, type AgentChatStatus, type AgentStatus, type ApiResponse, type Audience, type AudienceAccessResponse, type AudienceStatus, type AudienceSubscribeResponse, type AudienceSubscriber, type AudienceSubscription, type AudienceSubscriptionPayment, type AudienceSubscriptionProvider, type AudienceSubscriptionSource, type AudienceSubscriptionStatus, type AudienceType, type AuthToken, type AvailabilityResponse, type AvailabilitySlot, type Block, type BlockType, type CheckoutItemInput, type Condition, type CreateAgentParams, type CreateAudienceParams, type CreateCustomerParams, type CreateEmailTemplateParams, type CreateFormParams, type CreateIntegrationParams, type CreateLocationParams, type CreateMarketParams, type CreateNodeParams, type CreateOrderParams, type CreatePortalSessionParams, type CreateProductParams, type CreateProductVariantInput, type CreatePromoCodeParams, type CreateProviderParams, type CreateServiceParams, type CreateServiceProviderParams, type CreateStoreParams, type CreateTaxonomyParams, type CreateWebhookParams, type CreateWorkflowParams, type Customer, type CustomerAuthToken, type CustomerDetail, type CustomerInfo, type CustomerStatus, type CustomerVerificationCode, type CustomsDeclaration, type CustomsItem, type DaySlots, type DeleteAccountParams, type DeleteAgentParams, type DeleteAudienceParams, type DeleteEmailTemplateParams, type DeleteFormParams, type DeleteIntegrationParams, type DeleteLocationParams, type DeleteMarketParams, type DeleteNodeParams, type DeleteProductParams, type DeletePromoCodeParams, type DeleteProviderParams, type DeleteServiceParams, type DeleteServiceProviderParams, type DeleteStoreMediaParams, type DeleteStoreParams, type DeleteTaxonomyParams, type DeleteWebhookParams, type DeleteWorkflowParams, type Discount, type EmailTemplate, type EmailTemplateStatus, type EshopCartItem, type EshopItem, type EshopQuoteItem, type EshopStoreState, type Event, type EventAction, type ExecutionStatus, type FindActivitiesParams, type FindCustomersParams, type FindServiceProvidersParams, type Form, type FormEntry, type FormField, type FormFieldType, type FormSchema, type FormSchemaType, type FormStatus, type FormSubmission, type GalleryItem, type GeoLocation, type GeoLocationBlock, type GeoLocationBlockProperties, type GeoLocationValue, type GetAgentChatParams, type GetAgentChatsParams, type GetAgentParams, type GetAgentsParams, type GetAnalyticsHealthParams, type GetAnalyticsParams, type GetAudienceParams, type GetAudienceSubscribersParams, type GetAudiencesParams, type GetAvailabilityParams, type GetCustomerParams, type GetDeliveryStatsParams, type GetEmailTemplateParams, type GetEmailTemplatesParams, type GetFormParams, type GetFormSubmissionParams, type GetFormSubmissionsParams, type GetFormsParams, type GetIntegrationParams, type GetMeParams, type GetMediaParams, type GetNodeChildrenParams, type GetNodeParams, type GetNodesParams, type GetOrderParams, type GetOrdersParams, type GetProductParams, type GetProductsParams, type GetPromoCodeParams, type GetPromoCodesParams, type GetProviderParams, type GetProvidersParams, type GetQuoteParams, type GetServiceParams, type GetServicesParams, type GetShippingRatesParams, type GetStoreChatsParams, type GetStoreMediaParams, type GetStoreMediaParams2, type GetStoreParams, type GetStoresParams, type GetSubscriptionPlansParams, type GetTaxonomiesParams, type GetTaxonomyChildrenParams, type GetTaxonomyParams, type GetWorkflowExecutionParams, type GetWorkflowExecutionsParams, type GetWorkflowParams, type GetWorkflowsParams, type HandleInvitationParams, type HistoryEntry, type Integration, type IntegrationProvider, type IntervalPeriod, type InventoryLevel, type InviteUserParams, type Language, type ListIntegrationsParams, type ListWebhooksParams, type Location, type LoginAccountParams, type LogoutParams, type MagicLinkRequestParams, type MagicLinkVerifyParams, type Market, type Media, type MediaResolution, type MergeCustomersParams, type Node, type NodeResult, type NodeStatus, type OAuthConnectParams, type OAuthDisconnectParams, type Order, type OrderCancellationReason, type OrderCheckoutCompatibleItemInput, type OrderCheckoutItemInput, type OrderCheckoutParams, type OrderCheckoutResult, type OrderItem, type OrderItemSnapshot, type OrderItemStatus, type OrderPayment, type OrderPaymentPromoCode, type OrderPaymentProvider, type OrderPaymentRefund, type OrderPaymentStatus, type OrderPaymentTax, type OrderPaymentTaxLine, type OrderQuote, type OrderQuoteCompatibleItemInput, type OrderQuoteItemInput, type OrderShipping, type OrderUpdateItem, type PaginatedResponse, type Parcel, type PaymentMethod, PaymentMethodType, type PaymentTaxLine, type Price, type PriceProvider, type ProcessOrderRefundParams, type Product, type ProductCheckoutItemInput, type ProductInventory, type ProductOrderItem, type ProductOrderItemSnapshot, type ProductQuoteItemInput, type ProductQuoteLine, type ProductQuoteLineAvailability, type ProductStatus, type ProductVariant, type PromoCode, type PromoCodeStatus, type PromoCodeValidation, type PromoUsage, type Provider, type ProviderAvailability, type ProviderStatus, type ProviderTimelinePoint, type ProviderWithTimeline, type PurchaseLabelResult, type QuoteItemInput, type QuoteLine, type RateAgentChatParams, type RemoveAudienceSubscriberParams, type RemoveMemberParams, type RequestOptions, type RunAgentParams, type SearchAccountsParams, type SearchOrderServiceItemsParams, type Service, type ServiceCheckoutItemInput, type ServiceCheckoutPart, type ServiceDuration, type ServiceOrderItem, type ServiceOrderItemSnapshot, type ServiceProvider, type ServiceProviderInput, type ServiceQuoteItem, type ServiceQuoteItemInput, type ServiceQuoteLine, type ServiceQuoteLineAvailability, type ServiceStatus, type SetCustomerEmailParams, type SetupAnalyticsParams, type ShipParams, type ShipResult, type Shipment, type ShipmentLine, type ShippingAddress, type ShippingMethod, type ShippingRate, type ShippingStatus, type ShippingWeightTier, type Slot, type SlotRange, type SpecificDate, type Store, type StoreEmails, type StoreRole, type StoreSubscription, type StoreSubscriptionPayment, type StoreSubscriptionProvider, type StoreSubscriptionSource, type StoreSubscriptionStatus, type SubmitFormParams, type SubscribeAudienceParams, type SubscribeParams, type SubscriptionInterval, type SubscriptionPrice, type SystemTemplateKey, type Taxonomy, type TaxonomyEntry, type TaxonomyField, type TaxonomyFieldQuery, type TaxonomyQuery, type TaxonomySchema, type TaxonomySchemaType, type TaxonomyStatus, type TestWebhookParams, type TimeRange, type TimelinePoint, type TrackEmailOpenParams, type TriggerNotificationParams, type TriggerWorkflowParams, type UpdateAccountProfileParams, type UpdateAgentChatParams, type UpdateAgentParams, type UpdateAudienceParams, type UpdateCustomerParams, type UpdateEmailTemplateParams, type UpdateFormParams, type UpdateFormSubmissionParams, type UpdateIntegrationParams, type UpdateLocationParams, type UpdateMarketParams, type UpdateMediaParams, type UpdateNodeParams, type UpdateOrderParams, type UpdateProductParams, type UpdateProductVariantInput, type UpdatePromoCodeParams, type UpdateProviderParams, type UpdateServiceParams, type UpdateServiceProviderParams, type UpdateStoreParams, type UpdateTaxonomyParams, type UpdateWebhookParams, type UpdateWorkflowParams, type UploadStoreMediaParams, type Webhook, type WebhookEventSubscription, type Workflow, type WorkflowEdge, type WorkflowExecution, type WorkflowHttpMethod, type WorkflowHttpNode, type WorkflowLoopNode, type WorkflowNode, type WorkflowStatus, type WorkflowSwitchNode, type WorkflowSwitchRule, type WorkflowTransformNode, type WorkflowTriggerNode, type WorkingDay, type WorkingHour, type Zone, type ZoneLocation };
|