@shushed/helpers 0.0.200-runtime-url-fix-20251125155626 → 0.0.200-runtime-url-fix2-20251125155916
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/cjs/dist-dereferenced/messages/order/delivered.js +1 -1
- package/dist/cjs/dist-dereferenced/messages/order/new.js +1 -1
- package/dist/cjs/dist-dereferenced/messages/order/processed.js +1 -1
- package/dist/cjs/dist-dereferenced/messages/order/return-initiated.js +1 -1
- package/dist/cjs/dist-dereferenced/messages/order/returned.js +1 -1
- package/dist/cjs/dist-dereferenced/messages/order/shipped.js +1 -1
- package/dist/cjs/dist-dereferenced/messages/price-change.js +1 -1
- package/dist/cjs/dist-dereferenced/order/orderMain.js +1 -1
- package/dist/cjs/dist-dereferenced/order/payment.js +1 -1
- package/dist/cjs/dist-dereferenced/order/shipment/pos/outbound.js +1 -1
- package/dist/cjs/dist-dereferenced/order/shipment/pos/return.js +1 -1
- package/dist/cjs/dist-dereferenced/price.js +1 -1
- package/dist/cjs/src-public/airtable.js +54 -26
- package/dist/cjs/src-public/dato.js +8 -385
- package/dist/cjs/src-public/runtime.js +2 -2
- package/dist/cjs/src-public/utils.js +119 -1
- package/dist/types/dist-dereferenced/messages/order/delivered.d.ts +5 -23
- package/dist/types/dist-dereferenced/messages/order/new.d.ts +5 -23
- package/dist/types/dist-dereferenced/messages/order/processed.d.ts +5 -23
- package/dist/types/dist-dereferenced/messages/order/return-initiated.d.ts +5 -23
- package/dist/types/dist-dereferenced/messages/order/returned.d.ts +5 -23
- package/dist/types/dist-dereferenced/messages/order/shipped.d.ts +5 -23
- package/dist/types/dist-dereferenced/messages/price-change.d.ts +29 -20
- package/dist/types/dist-dereferenced/order/index.d.ts +5 -23
- package/dist/types/dist-dereferenced/order/orderMain.d.ts +5 -23
- package/dist/types/dist-dereferenced/order/payment.d.ts +0 -16
- package/dist/types/dist-dereferenced/order/shipment/pos/outbound.d.ts +1 -0
- package/dist/types/dist-dereferenced/order/shipment/pos/return.d.ts +1 -0
- package/dist/types/dist-dereferenced/price.d.ts +29 -20
- package/dist/types/dist-types/messages/order/delivered.d.ts +1 -7
- package/dist/types/dist-types/messages/order/new.d.ts +1 -7
- package/dist/types/dist-types/messages/order/processed.d.ts +1 -7
- package/dist/types/dist-types/messages/order/return-initiated.d.ts +1 -7
- package/dist/types/dist-types/messages/order/returned.d.ts +1 -7
- package/dist/types/dist-types/messages/order/shipped.d.ts +1 -7
- package/dist/types/dist-types/messages/price-change.d.ts +6 -5
- package/dist/types/dist-types/order/orderMain.d.ts +1 -7
- package/dist/types/dist-types/order/payment.d.ts +0 -4
- package/dist/types/dist-types/price.d.ts +6 -5
- package/dist/types/src-public/airtable.d.ts +1 -1
- package/dist/types/src-public/dato.d.ts +0 -33
- package/dist/types/src-public/utils.d.ts +34 -0
- package/package.json +1 -1
|
@@ -11,7 +11,8 @@ declare const schema: {
|
|
|
11
11
|
readonly type: "string";
|
|
12
12
|
};
|
|
13
13
|
readonly centra_order_id: {
|
|
14
|
-
readonly type: readonly ["
|
|
14
|
+
readonly type: readonly ["string", "null"];
|
|
15
|
+
readonly format: "uuid";
|
|
15
16
|
};
|
|
16
17
|
readonly sfcc_order_id: {
|
|
17
18
|
readonly type: readonly ["string", "null"];
|
|
@@ -60,22 +61,6 @@ declare const schema: {
|
|
|
60
61
|
readonly card_number: {
|
|
61
62
|
readonly type: readonly ["string", "null"];
|
|
62
63
|
};
|
|
63
|
-
readonly card_holder: {
|
|
64
|
-
readonly type: readonly ["string", "null"];
|
|
65
|
-
};
|
|
66
|
-
readonly card_token: {
|
|
67
|
-
readonly type: readonly ["string", "null"];
|
|
68
|
-
};
|
|
69
|
-
readonly expiration_month: {
|
|
70
|
-
readonly type: readonly ["integer", "null"];
|
|
71
|
-
readonly minimum: 1;
|
|
72
|
-
readonly maximum: 12;
|
|
73
|
-
};
|
|
74
|
-
readonly expiration_year: {
|
|
75
|
-
readonly type: readonly ["integer", "null"];
|
|
76
|
-
readonly minimum: 2023;
|
|
77
|
-
readonly maximum: 2085;
|
|
78
|
-
};
|
|
79
64
|
readonly journey_label: {
|
|
80
65
|
readonly type: readonly ["string"];
|
|
81
66
|
readonly enum: readonly ["CHECKOUT", "POS", "EXPRESS", "MOTO", "SYSTEM"];
|
|
@@ -693,9 +678,6 @@ declare const schema: {
|
|
|
693
678
|
readonly phone: "+1-202-555-0143";
|
|
694
679
|
};
|
|
695
680
|
};
|
|
696
|
-
readonly collection_point_id: {
|
|
697
|
-
readonly type: readonly ["string", "null"];
|
|
698
|
-
};
|
|
699
681
|
readonly is_pos: {
|
|
700
682
|
readonly type: readonly ["boolean"];
|
|
701
683
|
};
|
|
@@ -1282,6 +1264,7 @@ declare const schema: {
|
|
|
1282
1264
|
};
|
|
1283
1265
|
readonly items: {
|
|
1284
1266
|
readonly type: "array";
|
|
1267
|
+
readonly additionalProperties: false;
|
|
1285
1268
|
readonly items: {
|
|
1286
1269
|
readonly $schema: "http://json-schema.org/draft-07/schema#";
|
|
1287
1270
|
readonly title: "Order Shipment Item";
|
|
@@ -2168,6 +2151,7 @@ declare const schema: {
|
|
|
2168
2151
|
};
|
|
2169
2152
|
readonly items: {
|
|
2170
2153
|
readonly type: "array";
|
|
2154
|
+
readonly additionalProperties: false;
|
|
2171
2155
|
readonly items: {
|
|
2172
2156
|
readonly $schema: "http://json-schema.org/draft-07/schema#";
|
|
2173
2157
|
readonly title: "Order Shipment Item";
|
|
@@ -2480,6 +2464,7 @@ declare const schema: {
|
|
|
2480
2464
|
};
|
|
2481
2465
|
readonly items: {
|
|
2482
2466
|
readonly type: "array";
|
|
2467
|
+
readonly additionalProperties: false;
|
|
2483
2468
|
readonly items: {
|
|
2484
2469
|
readonly $schema: "http://json-schema.org/draft-07/schema#";
|
|
2485
2470
|
readonly title: "Order Shipment Item Returned";
|
|
@@ -3407,9 +3392,6 @@ declare const schema: {
|
|
|
3407
3392
|
};
|
|
3408
3393
|
readonly required: readonly ["amount_net", "amount_gross", "discount_amount_net", "discount_amount_gross", "discount_amount_percent"];
|
|
3409
3394
|
};
|
|
3410
|
-
readonly shipping_method: {
|
|
3411
|
-
readonly type: readonly ["string", "null"];
|
|
3412
|
-
};
|
|
3413
3395
|
};
|
|
3414
3396
|
readonly required: readonly ["erp_order_id", "status", "ordered_at", "items", "total"];
|
|
3415
3397
|
readonly $id: "https://shushed.example.com/order.schema.json";
|
|
@@ -25,22 +25,6 @@ declare const schema: {
|
|
|
25
25
|
readonly card_number: {
|
|
26
26
|
readonly type: readonly ["string", "null"];
|
|
27
27
|
};
|
|
28
|
-
readonly card_holder: {
|
|
29
|
-
readonly type: readonly ["string", "null"];
|
|
30
|
-
};
|
|
31
|
-
readonly card_token: {
|
|
32
|
-
readonly type: readonly ["string", "null"];
|
|
33
|
-
};
|
|
34
|
-
readonly expiration_month: {
|
|
35
|
-
readonly type: readonly ["integer", "null"];
|
|
36
|
-
readonly minimum: 1;
|
|
37
|
-
readonly maximum: 12;
|
|
38
|
-
};
|
|
39
|
-
readonly expiration_year: {
|
|
40
|
-
readonly type: readonly ["integer", "null"];
|
|
41
|
-
readonly minimum: 2023;
|
|
42
|
-
readonly maximum: 2085;
|
|
43
|
-
};
|
|
44
28
|
readonly journey_label: {
|
|
45
29
|
readonly type: readonly ["string"];
|
|
46
30
|
readonly enum: readonly ["CHECKOUT", "POS", "EXPRESS", "MOTO", "SYSTEM"];
|
|
@@ -290,6 +290,7 @@ declare const schema: {
|
|
|
290
290
|
};
|
|
291
291
|
readonly items: {
|
|
292
292
|
readonly type: "array";
|
|
293
|
+
readonly additionalProperties: false;
|
|
293
294
|
readonly items: {
|
|
294
295
|
readonly $schema: "http://json-schema.org/draft-07/schema#";
|
|
295
296
|
readonly title: "Order Shipment Item Returned";
|
|
@@ -13,17 +13,34 @@ declare const schema: {
|
|
|
13
13
|
readonly pricelist_code: {
|
|
14
14
|
readonly type: "string";
|
|
15
15
|
};
|
|
16
|
-
readonly
|
|
17
|
-
readonly type: "
|
|
18
|
-
readonly
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
16
|
+
readonly price_changes: {
|
|
17
|
+
readonly type: "array";
|
|
18
|
+
readonly items: {
|
|
19
|
+
readonly type: "object";
|
|
20
|
+
readonly additionalProperties: false;
|
|
21
|
+
readonly properties: {
|
|
22
|
+
readonly price: {
|
|
23
|
+
readonly type: "integer";
|
|
24
|
+
readonly minimum: 0;
|
|
25
|
+
};
|
|
26
|
+
readonly price_type: {
|
|
27
|
+
readonly type: "string";
|
|
28
|
+
readonly enum: readonly ["rrp", "perm", "pos"];
|
|
29
|
+
};
|
|
30
|
+
readonly effective_from: {
|
|
31
|
+
readonly type: "string";
|
|
32
|
+
readonly format: "date-time";
|
|
33
|
+
};
|
|
34
|
+
readonly effective_until: {
|
|
35
|
+
readonly type: "string";
|
|
36
|
+
readonly format: "date-time";
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
readonly includes_vat: {
|
|
40
|
+
readonly type: "boolean";
|
|
41
|
+
};
|
|
42
|
+
readonly required: readonly ["price", "includes_vat", "price_type", "effective_from", "effective_until"];
|
|
43
|
+
};
|
|
27
44
|
};
|
|
28
45
|
readonly currency: {
|
|
29
46
|
readonly title: "Currency";
|
|
@@ -31,19 +48,11 @@ declare const schema: {
|
|
|
31
48
|
readonly type: "string";
|
|
32
49
|
readonly enum: readonly ["AFN", "ALL", "DZD", "USD", "EUR", "AOA", "XCD", "ARS", "AMD", "AWG", "AUD", "AZN", "BSD", "BHD", "BDT", "BBD", "BYN", "BZD", "XOF", "BMD", "BTN", "INR", "BOB", "BOV", "BAM", "BWP", "NOK", "BRL", "BND", "BGN", "BIF", "CVE", "KHR", "XAF", "CAD", "KYD", "CLF", "CLP", "CNY", "COP", "COU", "KMF", "CDF", "NZD", "CRC", "CUC", "CUP", "ANG", "CZK", "DKK", "DJF", "DOP", "EGP", "SVC", "ERN", "ETB", "FKP", "FJD", "XPF", "GMD", "GEL", "GHS", "GIP", "GTQ", "GBP", "GNF", "GYD", "HTG", "HNL", "HKD", "HUF", "ISK", "IDR", "XDR", "IRR", "IQD", "ILS", "JMD", "JPY", "JOD", "KZT", "KES", "KPW", "KRW", "KWD", "KGS", "LAK", "LBP", "LSL", "ZAR", "LRD", "LYD", "CHF", "MOP", "MGA", "MWK", "MYR", "MVR", "MRU", "MUR", "XUA", "MXN", "MXV", "MDL", "MNT", "MAD", "MZN", "MMK", "NAD", "NPR", "NIO", "NGN", "OMR", "PKR", "PAB", "PGK", "PYG", "PEN", "PHP", "PLN", "QAR", "MKD", "RON", "RUB", "RWF", "SHP", "WST", "STN", "SAR", "RSD", "SCR", "SLE", "SGD", "XSU", "SBD", "SOS", "SSP", "LKR", "SDG", "SRD", "SZL", "SEK", "CHE", "CHW", "SYP", "TWD", "TJS", "TZS", "THB", "TOP", "TTD", "TND", "TRY", "TMT", "UGX", "UAH", "AED", "USN", "UYI", "UYU", "UZS", "VUV", "VEF", "VED", "VND", "YER", "ZMW", "ZWL"];
|
|
33
50
|
};
|
|
34
|
-
readonly effective_from: {
|
|
35
|
-
readonly type: "string";
|
|
36
|
-
readonly format: "date-time";
|
|
37
|
-
};
|
|
38
|
-
readonly effective_until: {
|
|
39
|
-
readonly type: "string";
|
|
40
|
-
readonly format: "date-time";
|
|
41
|
-
};
|
|
42
51
|
readonly channel: {
|
|
43
52
|
readonly type: "string";
|
|
44
53
|
};
|
|
45
54
|
};
|
|
46
|
-
readonly required: readonly ["style_id", "colour_id", "pricelist_code", "
|
|
55
|
+
readonly required: readonly ["style_id", "colour_id", "pricelist_code", "markdown", "currency", "channel"];
|
|
47
56
|
readonly $id: "https://shushed.example.com/price.schema.json";
|
|
48
57
|
};
|
|
49
58
|
export default schema;
|
|
@@ -68,7 +68,7 @@ export type Item = (Total & {
|
|
|
68
68
|
export interface Order {
|
|
69
69
|
status: ("NEW" | "PENDING" | "CONFIRMED" | "PROCESSING" | "PROCESSED" | "PACKED" | "SHIPPED" | "DELIVERED" | "PARTIALLY-SHIPPED" | "RETURNED" | "PARTIALLY-RETURNED" | "CANCELLED" | "ARCHIVED" | "FAILED");
|
|
70
70
|
erp_order_id: string;
|
|
71
|
-
centra_order_id?: (
|
|
71
|
+
centra_order_id?: (string | null);
|
|
72
72
|
sfcc_order_id?: (string | null);
|
|
73
73
|
globalee_order_id?: (string | null);
|
|
74
74
|
sitoo_order_id?: (string | null);
|
|
@@ -80,7 +80,6 @@ export interface Order {
|
|
|
80
80
|
customer?: Customer;
|
|
81
81
|
billing_address?: (Address | null);
|
|
82
82
|
shipping_address?: (Address | null);
|
|
83
|
-
collection_point_id?: (string | null);
|
|
84
83
|
is_pos?: boolean;
|
|
85
84
|
shipments?: [
|
|
86
85
|
(OrderShipmentShippedOutbound | OrderShipmentShippedReturn | OrderShipmentPOSOutbound | OrderShipmentPOSReturn),
|
|
@@ -93,7 +92,6 @@ export interface Order {
|
|
|
93
92
|
total: Total1;
|
|
94
93
|
return_total?: Total2;
|
|
95
94
|
net_total?: Total3;
|
|
96
|
-
shipping_method?: (string | null);
|
|
97
95
|
[k: string]: unknown;
|
|
98
96
|
}
|
|
99
97
|
export interface Payment {
|
|
@@ -103,10 +101,6 @@ export interface Payment {
|
|
|
103
101
|
payment_method: ("MOTO" | "CREDIT-CARD" | "GIFT-CARD" | "PAYPAL" | "APPLE-PAY" | "OTHER");
|
|
104
102
|
transaction_id: string;
|
|
105
103
|
card_number?: (string | null);
|
|
106
|
-
card_holder?: (string | null);
|
|
107
|
-
card_token?: (string | null);
|
|
108
|
-
expiration_month?: (number | null);
|
|
109
|
-
expiration_year?: (number | null);
|
|
110
104
|
journey_label: ("CHECKOUT" | "POS" | "EXPRESS" | "MOTO" | "SYSTEM");
|
|
111
105
|
psp_reference: string;
|
|
112
106
|
card_brand?: (string | null);
|
|
@@ -68,7 +68,7 @@ export type Item = (Total & {
|
|
|
68
68
|
export interface Order {
|
|
69
69
|
status: ("NEW" | "PENDING" | "CONFIRMED" | "PROCESSING" | "PROCESSED" | "PACKED" | "SHIPPED" | "DELIVERED" | "PARTIALLY-SHIPPED" | "RETURNED" | "PARTIALLY-RETURNED" | "CANCELLED" | "ARCHIVED" | "FAILED");
|
|
70
70
|
erp_order_id: string;
|
|
71
|
-
centra_order_id?: (
|
|
71
|
+
centra_order_id?: (string | null);
|
|
72
72
|
sfcc_order_id?: (string | null);
|
|
73
73
|
globalee_order_id?: (string | null);
|
|
74
74
|
sitoo_order_id?: (string | null);
|
|
@@ -80,7 +80,6 @@ export interface Order {
|
|
|
80
80
|
customer?: Customer;
|
|
81
81
|
billing_address?: (Address | null);
|
|
82
82
|
shipping_address?: (Address | null);
|
|
83
|
-
collection_point_id?: (string | null);
|
|
84
83
|
is_pos?: boolean;
|
|
85
84
|
shipments?: [
|
|
86
85
|
(OrderShipmentShippedOutbound | OrderShipmentShippedReturn | OrderShipmentPOSOutbound | OrderShipmentPOSReturn),
|
|
@@ -93,7 +92,6 @@ export interface Order {
|
|
|
93
92
|
total: Total1;
|
|
94
93
|
return_total?: Total2;
|
|
95
94
|
net_total?: Total3;
|
|
96
|
-
shipping_method?: (string | null);
|
|
97
95
|
[k: string]: unknown;
|
|
98
96
|
}
|
|
99
97
|
export interface Payment {
|
|
@@ -103,10 +101,6 @@ export interface Payment {
|
|
|
103
101
|
payment_method: ("MOTO" | "CREDIT-CARD" | "GIFT-CARD" | "PAYPAL" | "APPLE-PAY" | "OTHER");
|
|
104
102
|
transaction_id: string;
|
|
105
103
|
card_number?: (string | null);
|
|
106
|
-
card_holder?: (string | null);
|
|
107
|
-
card_token?: (string | null);
|
|
108
|
-
expiration_month?: (number | null);
|
|
109
|
-
expiration_year?: (number | null);
|
|
110
104
|
journey_label: ("CHECKOUT" | "POS" | "EXPRESS" | "MOTO" | "SYSTEM");
|
|
111
105
|
psp_reference: string;
|
|
112
106
|
card_brand?: (string | null);
|
|
@@ -68,7 +68,7 @@ export type Item = (Total & {
|
|
|
68
68
|
export interface Order {
|
|
69
69
|
status: ("NEW" | "PENDING" | "CONFIRMED" | "PROCESSING" | "PROCESSED" | "PACKED" | "SHIPPED" | "DELIVERED" | "PARTIALLY-SHIPPED" | "RETURNED" | "PARTIALLY-RETURNED" | "CANCELLED" | "ARCHIVED" | "FAILED");
|
|
70
70
|
erp_order_id: string;
|
|
71
|
-
centra_order_id?: (
|
|
71
|
+
centra_order_id?: (string | null);
|
|
72
72
|
sfcc_order_id?: (string | null);
|
|
73
73
|
globalee_order_id?: (string | null);
|
|
74
74
|
sitoo_order_id?: (string | null);
|
|
@@ -80,7 +80,6 @@ export interface Order {
|
|
|
80
80
|
customer?: Customer;
|
|
81
81
|
billing_address?: (Address | null);
|
|
82
82
|
shipping_address?: (Address | null);
|
|
83
|
-
collection_point_id?: (string | null);
|
|
84
83
|
is_pos?: boolean;
|
|
85
84
|
shipments?: [
|
|
86
85
|
(OrderShipmentShippedOutbound | OrderShipmentShippedReturn | OrderShipmentPOSOutbound | OrderShipmentPOSReturn),
|
|
@@ -93,7 +92,6 @@ export interface Order {
|
|
|
93
92
|
total: Total1;
|
|
94
93
|
return_total?: Total2;
|
|
95
94
|
net_total?: Total3;
|
|
96
|
-
shipping_method?: (string | null);
|
|
97
95
|
[k: string]: unknown;
|
|
98
96
|
}
|
|
99
97
|
export interface Payment {
|
|
@@ -103,10 +101,6 @@ export interface Payment {
|
|
|
103
101
|
payment_method: ("MOTO" | "CREDIT-CARD" | "GIFT-CARD" | "PAYPAL" | "APPLE-PAY" | "OTHER");
|
|
104
102
|
transaction_id: string;
|
|
105
103
|
card_number?: (string | null);
|
|
106
|
-
card_holder?: (string | null);
|
|
107
|
-
card_token?: (string | null);
|
|
108
|
-
expiration_month?: (number | null);
|
|
109
|
-
expiration_year?: (number | null);
|
|
110
104
|
journey_label: ("CHECKOUT" | "POS" | "EXPRESS" | "MOTO" | "SYSTEM");
|
|
111
105
|
psp_reference: string;
|
|
112
106
|
card_brand?: (string | null);
|
|
@@ -68,7 +68,7 @@ export type Item = (Total & {
|
|
|
68
68
|
export interface Order {
|
|
69
69
|
status: ("NEW" | "PENDING" | "CONFIRMED" | "PROCESSING" | "PROCESSED" | "PACKED" | "SHIPPED" | "DELIVERED" | "PARTIALLY-SHIPPED" | "RETURNED" | "PARTIALLY-RETURNED" | "CANCELLED" | "ARCHIVED" | "FAILED");
|
|
70
70
|
erp_order_id: string;
|
|
71
|
-
centra_order_id?: (
|
|
71
|
+
centra_order_id?: (string | null);
|
|
72
72
|
sfcc_order_id?: (string | null);
|
|
73
73
|
globalee_order_id?: (string | null);
|
|
74
74
|
sitoo_order_id?: (string | null);
|
|
@@ -80,7 +80,6 @@ export interface Order {
|
|
|
80
80
|
customer?: Customer;
|
|
81
81
|
billing_address?: (Address | null);
|
|
82
82
|
shipping_address?: (Address | null);
|
|
83
|
-
collection_point_id?: (string | null);
|
|
84
83
|
is_pos?: boolean;
|
|
85
84
|
shipments?: [
|
|
86
85
|
(OrderShipmentShippedOutbound | OrderShipmentShippedReturn | OrderShipmentPOSOutbound | OrderShipmentPOSReturn),
|
|
@@ -93,7 +92,6 @@ export interface Order {
|
|
|
93
92
|
total: Total1;
|
|
94
93
|
return_total?: Total2;
|
|
95
94
|
net_total?: Total3;
|
|
96
|
-
shipping_method?: (string | null);
|
|
97
95
|
[k: string]: unknown;
|
|
98
96
|
}
|
|
99
97
|
export interface Payment {
|
|
@@ -103,10 +101,6 @@ export interface Payment {
|
|
|
103
101
|
payment_method: ("MOTO" | "CREDIT-CARD" | "GIFT-CARD" | "PAYPAL" | "APPLE-PAY" | "OTHER");
|
|
104
102
|
transaction_id: string;
|
|
105
103
|
card_number?: (string | null);
|
|
106
|
-
card_holder?: (string | null);
|
|
107
|
-
card_token?: (string | null);
|
|
108
|
-
expiration_month?: (number | null);
|
|
109
|
-
expiration_year?: (number | null);
|
|
110
104
|
journey_label: ("CHECKOUT" | "POS" | "EXPRESS" | "MOTO" | "SYSTEM");
|
|
111
105
|
psp_reference: string;
|
|
112
106
|
card_brand?: (string | null);
|
|
@@ -69,7 +69,7 @@ export type Item = (Total & {
|
|
|
69
69
|
export interface Order {
|
|
70
70
|
status: ("NEW" | "PENDING" | "CONFIRMED" | "PROCESSING" | "PROCESSED" | "PACKED" | "SHIPPED" | "DELIVERED" | "PARTIALLY-SHIPPED" | "RETURNED" | "PARTIALLY-RETURNED" | "CANCELLED" | "ARCHIVED" | "FAILED");
|
|
71
71
|
erp_order_id: string;
|
|
72
|
-
centra_order_id?: (
|
|
72
|
+
centra_order_id?: (string | null);
|
|
73
73
|
sfcc_order_id?: (string | null);
|
|
74
74
|
globalee_order_id?: (string | null);
|
|
75
75
|
sitoo_order_id?: (string | null);
|
|
@@ -81,7 +81,6 @@ export interface Order {
|
|
|
81
81
|
customer?: Customer;
|
|
82
82
|
billing_address?: (Address | null);
|
|
83
83
|
shipping_address?: (Address | null);
|
|
84
|
-
collection_point_id?: (string | null);
|
|
85
84
|
is_pos?: boolean;
|
|
86
85
|
shipments?: [
|
|
87
86
|
(OrderShipmentShippedOutbound | OrderShipmentShippedReturn | OrderShipmentPOSOutbound | OrderShipmentPOSReturn),
|
|
@@ -94,7 +93,6 @@ export interface Order {
|
|
|
94
93
|
total: Total1;
|
|
95
94
|
return_total?: Total2;
|
|
96
95
|
net_total?: Total3;
|
|
97
|
-
shipping_method?: (string | null);
|
|
98
96
|
[k: string]: unknown;
|
|
99
97
|
}
|
|
100
98
|
export interface Payment {
|
|
@@ -104,10 +102,6 @@ export interface Payment {
|
|
|
104
102
|
payment_method: ("MOTO" | "CREDIT-CARD" | "GIFT-CARD" | "PAYPAL" | "APPLE-PAY" | "OTHER");
|
|
105
103
|
transaction_id: string;
|
|
106
104
|
card_number?: (string | null);
|
|
107
|
-
card_holder?: (string | null);
|
|
108
|
-
card_token?: (string | null);
|
|
109
|
-
expiration_month?: (number | null);
|
|
110
|
-
expiration_year?: (number | null);
|
|
111
105
|
journey_label: ("CHECKOUT" | "POS" | "EXPRESS" | "MOTO" | "SYSTEM");
|
|
112
106
|
psp_reference: string;
|
|
113
107
|
card_brand?: (string | null);
|
|
@@ -69,7 +69,7 @@ export type Item = (Total & {
|
|
|
69
69
|
export interface Order {
|
|
70
70
|
status: ("NEW" | "PENDING" | "CONFIRMED" | "PROCESSING" | "PROCESSED" | "PACKED" | "SHIPPED" | "DELIVERED" | "PARTIALLY-SHIPPED" | "RETURNED" | "PARTIALLY-RETURNED" | "CANCELLED" | "ARCHIVED" | "FAILED");
|
|
71
71
|
erp_order_id: string;
|
|
72
|
-
centra_order_id?: (
|
|
72
|
+
centra_order_id?: (string | null);
|
|
73
73
|
sfcc_order_id?: (string | null);
|
|
74
74
|
globalee_order_id?: (string | null);
|
|
75
75
|
sitoo_order_id?: (string | null);
|
|
@@ -81,7 +81,6 @@ export interface Order {
|
|
|
81
81
|
customer?: Customer;
|
|
82
82
|
billing_address?: (Address | null);
|
|
83
83
|
shipping_address?: (Address | null);
|
|
84
|
-
collection_point_id?: (string | null);
|
|
85
84
|
is_pos?: boolean;
|
|
86
85
|
shipments?: [
|
|
87
86
|
(OrderShipmentShippedOutbound | OrderShipmentShippedReturn | OrderShipmentPOSOutbound | OrderShipmentPOSReturn),
|
|
@@ -94,7 +93,6 @@ export interface Order {
|
|
|
94
93
|
total: Total1;
|
|
95
94
|
return_total?: Total2;
|
|
96
95
|
net_total?: Total3;
|
|
97
|
-
shipping_method?: (string | null);
|
|
98
96
|
[k: string]: unknown;
|
|
99
97
|
}
|
|
100
98
|
export interface Payment {
|
|
@@ -104,10 +102,6 @@ export interface Payment {
|
|
|
104
102
|
payment_method: ("MOTO" | "CREDIT-CARD" | "GIFT-CARD" | "PAYPAL" | "APPLE-PAY" | "OTHER");
|
|
105
103
|
transaction_id: string;
|
|
106
104
|
card_number?: (string | null);
|
|
107
|
-
card_holder?: (string | null);
|
|
108
|
-
card_token?: (string | null);
|
|
109
|
-
expiration_month?: (number | null);
|
|
110
|
-
expiration_year?: (number | null);
|
|
111
105
|
journey_label: ("CHECKOUT" | "POS" | "EXPRESS" | "MOTO" | "SYSTEM");
|
|
112
106
|
psp_reference: string;
|
|
113
107
|
card_brand?: (string | null);
|
|
@@ -4,12 +4,13 @@ export interface Price {
|
|
|
4
4
|
style_id: (string | null);
|
|
5
5
|
colour_id: (string | null);
|
|
6
6
|
pricelist_code: string;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
price_changes?: {
|
|
8
|
+
price: number;
|
|
9
|
+
price_type: ("rrp" | "perm" | "pos");
|
|
10
|
+
effective_from: string;
|
|
11
|
+
effective_until: string;
|
|
12
|
+
}[];
|
|
10
13
|
currency: Currency;
|
|
11
|
-
effective_from: string;
|
|
12
|
-
effective_until?: string;
|
|
13
14
|
channel: string;
|
|
14
15
|
}
|
|
15
16
|
export default __MainSchema;
|
|
@@ -65,7 +65,7 @@ export type Item = (Total & {
|
|
|
65
65
|
export interface __MainSchema {
|
|
66
66
|
status: ("NEW" | "PENDING" | "CONFIRMED" | "PROCESSING" | "PROCESSED" | "PACKED" | "SHIPPED" | "DELIVERED" | "PARTIALLY-SHIPPED" | "RETURNED" | "PARTIALLY-RETURNED" | "CANCELLED" | "ARCHIVED" | "FAILED");
|
|
67
67
|
erp_order_id: string;
|
|
68
|
-
centra_order_id?: (
|
|
68
|
+
centra_order_id?: (string | null);
|
|
69
69
|
sfcc_order_id?: (string | null);
|
|
70
70
|
globalee_order_id?: (string | null);
|
|
71
71
|
sitoo_order_id?: (string | null);
|
|
@@ -77,7 +77,6 @@ export interface __MainSchema {
|
|
|
77
77
|
customer?: Customer;
|
|
78
78
|
billing_address?: (Address | null);
|
|
79
79
|
shipping_address?: (Address | null);
|
|
80
|
-
collection_point_id?: (string | null);
|
|
81
80
|
is_pos?: boolean;
|
|
82
81
|
shipments?: [
|
|
83
82
|
(OrderShipmentShippedOutbound | OrderShipmentShippedReturn | OrderShipmentPOSOutbound | OrderShipmentPOSReturn),
|
|
@@ -90,7 +89,6 @@ export interface __MainSchema {
|
|
|
90
89
|
total: Total1;
|
|
91
90
|
return_total?: Total2;
|
|
92
91
|
net_total?: Total3;
|
|
93
|
-
shipping_method?: (string | null);
|
|
94
92
|
[k: string]: unknown;
|
|
95
93
|
}
|
|
96
94
|
export interface Payment {
|
|
@@ -100,10 +98,6 @@ export interface Payment {
|
|
|
100
98
|
payment_method: ("MOTO" | "CREDIT-CARD" | "GIFT-CARD" | "PAYPAL" | "APPLE-PAY" | "OTHER");
|
|
101
99
|
transaction_id: string;
|
|
102
100
|
card_number?: (string | null);
|
|
103
|
-
card_holder?: (string | null);
|
|
104
|
-
card_token?: (string | null);
|
|
105
|
-
expiration_month?: (number | null);
|
|
106
|
-
expiration_year?: (number | null);
|
|
107
101
|
journey_label: ("CHECKOUT" | "POS" | "EXPRESS" | "MOTO" | "SYSTEM");
|
|
108
102
|
psp_reference: string;
|
|
109
103
|
card_brand?: (string | null);
|
|
@@ -7,10 +7,6 @@ export interface __MainSchema {
|
|
|
7
7
|
payment_method: ("MOTO" | "CREDIT-CARD" | "GIFT-CARD" | "PAYPAL" | "APPLE-PAY" | "OTHER");
|
|
8
8
|
transaction_id: string;
|
|
9
9
|
card_number?: (string | null);
|
|
10
|
-
card_holder?: (string | null);
|
|
11
|
-
card_token?: (string | null);
|
|
12
|
-
expiration_month?: (number | null);
|
|
13
|
-
expiration_year?: (number | null);
|
|
14
10
|
journey_label: ("CHECKOUT" | "POS" | "EXPRESS" | "MOTO" | "SYSTEM");
|
|
15
11
|
psp_reference: string;
|
|
16
12
|
card_brand?: (string | null);
|
|
@@ -3,12 +3,13 @@ export interface __MainSchema {
|
|
|
3
3
|
style_id: (string | null);
|
|
4
4
|
colour_id: (string | null);
|
|
5
5
|
pricelist_code: string;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
price_changes?: {
|
|
7
|
+
price: number;
|
|
8
|
+
price_type: ("rrp" | "perm" | "pos");
|
|
9
|
+
effective_from: string;
|
|
10
|
+
effective_until: string;
|
|
11
|
+
}[];
|
|
9
12
|
currency: Currency;
|
|
10
|
-
effective_from: string;
|
|
11
|
-
effective_until?: string;
|
|
12
13
|
channel: string;
|
|
13
14
|
}
|
|
14
15
|
export default __MainSchema;
|
|
@@ -103,7 +103,7 @@ declare class AirtableHelper<T extends Record<string, string>, K extends keyof T
|
|
|
103
103
|
[key in keyof T]: any;
|
|
104
104
|
};
|
|
105
105
|
}>;
|
|
106
|
-
getExistingRecords(formula
|
|
106
|
+
getExistingRecords(formula?: string): Promise<Array<{
|
|
107
107
|
id: string;
|
|
108
108
|
fields: {
|
|
109
109
|
[key in keyof T]: any;
|
|
@@ -2,48 +2,21 @@ import Runtime, { Opts as RuntimeOpts } from './runtime';
|
|
|
2
2
|
interface DatoHelperOptions {
|
|
3
3
|
apiToken: string;
|
|
4
4
|
baseUrl?: string;
|
|
5
|
-
environment?: string;
|
|
6
5
|
}
|
|
7
6
|
interface UploadResult {
|
|
8
7
|
success: boolean;
|
|
9
8
|
upload: string;
|
|
10
9
|
assetId?: string;
|
|
11
|
-
skipped?: boolean;
|
|
12
|
-
}
|
|
13
|
-
interface UploadReturn {
|
|
14
|
-
id: string;
|
|
15
|
-
type: string;
|
|
16
|
-
attributes: {
|
|
17
|
-
url: string;
|
|
18
|
-
filename: string;
|
|
19
|
-
[key: string]: any;
|
|
20
|
-
};
|
|
21
10
|
}
|
|
22
11
|
export default class DatoHelper extends Runtime {
|
|
23
12
|
private apiToken;
|
|
24
13
|
private baseUrl;
|
|
25
|
-
private environment;
|
|
26
14
|
constructor(opts: RuntimeOpts, datoOpts: DatoHelperOptions);
|
|
27
15
|
private requestUploadParameters;
|
|
28
16
|
private uploadToStorageBucket;
|
|
29
17
|
private createAssetFromUpload;
|
|
30
18
|
private checkJobResult;
|
|
31
19
|
private waitForJobCompletion;
|
|
32
|
-
updateUpload: (options: {
|
|
33
|
-
id: string;
|
|
34
|
-
filename?: string;
|
|
35
|
-
tags: string[];
|
|
36
|
-
notes?: string;
|
|
37
|
-
title: string;
|
|
38
|
-
alt: string;
|
|
39
|
-
author: string;
|
|
40
|
-
copyright: string;
|
|
41
|
-
uploadCollectionId?: string;
|
|
42
|
-
}) => Promise<{
|
|
43
|
-
success: boolean;
|
|
44
|
-
assetId: string;
|
|
45
|
-
upload: string;
|
|
46
|
-
}>;
|
|
47
20
|
uploadFromUrl(options: {
|
|
48
21
|
url: string;
|
|
49
22
|
copyright: string;
|
|
@@ -78,11 +51,5 @@ export default class DatoHelper extends Runtime {
|
|
|
78
51
|
quality?: number;
|
|
79
52
|
format?: 'jpg' | 'pjpg' | 'png' | 'webp' | 'avif' | 'gif' | 'jxl' | 'jp2' | 'jxr' | 'json' | 'blurhash' | (string & {});
|
|
80
53
|
}): string;
|
|
81
|
-
findUploadByFilename(filename: string): Promise<UploadReturn | null>;
|
|
82
|
-
getItemTypeId(apiKey: string): Promise<string>;
|
|
83
|
-
getProductBySku(sku: string): Promise<any>;
|
|
84
|
-
createProduct(sku: string, productTypeId: string): Promise<any>;
|
|
85
|
-
updateProductGallery(productId: string, gallery: any[]): Promise<any>;
|
|
86
|
-
updateProductSwatch(productId: string, uploadId: string): Promise<any>;
|
|
87
54
|
}
|
|
88
55
|
export {};
|
|
@@ -65,3 +65,37 @@ export declare function onResponse(config: any & {
|
|
|
65
65
|
value: any;
|
|
66
66
|
cacheMaxAge: number;
|
|
67
67
|
} | undefined;
|
|
68
|
+
interface Price {
|
|
69
|
+
price_changes: undefined | Array<{
|
|
70
|
+
price: number;
|
|
71
|
+
effective_from?: string;
|
|
72
|
+
effective_until?: string;
|
|
73
|
+
price_type: string;
|
|
74
|
+
}>;
|
|
75
|
+
}
|
|
76
|
+
type NormPrice = {
|
|
77
|
+
effective_from: Date | null;
|
|
78
|
+
effective_until: Date | null;
|
|
79
|
+
price: number;
|
|
80
|
+
price_type: 'rrp' | 'perm' | 'pos';
|
|
81
|
+
};
|
|
82
|
+
export declare function parsePrices<T extends Price>(priceData: T[], timeZone?: string): (T & {
|
|
83
|
+
rrp: {
|
|
84
|
+
current: NormPrice | undefined;
|
|
85
|
+
future: NormPrice[];
|
|
86
|
+
historical: NormPrice[];
|
|
87
|
+
};
|
|
88
|
+
perm: {
|
|
89
|
+
current: NormPrice | undefined;
|
|
90
|
+
future: NormPrice[];
|
|
91
|
+
historical: NormPrice[];
|
|
92
|
+
};
|
|
93
|
+
pos: {
|
|
94
|
+
current: NormPrice | undefined;
|
|
95
|
+
future: NormPrice[];
|
|
96
|
+
historical: NormPrice[];
|
|
97
|
+
};
|
|
98
|
+
current_price: NormPrice | undefined;
|
|
99
|
+
current_price_type: "rrp" | "perm" | "pos" | undefined;
|
|
100
|
+
})[];
|
|
101
|
+
export {};
|