@compassdigital/sdk.typescript 4.159.0 → 4.162.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/lib/base.d.ts.map +1 -1
- package/lib/base.js +9 -2
- package/lib/base.js.map +1 -1
- package/lib/index.d.ts +3 -7
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js.map +1 -1
- package/lib/interface/ai.d.ts.map +1 -1
- package/lib/interface/auth.d.ts.map +1 -1
- package/lib/interface/catalog.d.ts.map +1 -1
- package/lib/interface/centricos.d.ts +3 -9
- package/lib/interface/centricos.d.ts.map +1 -1
- package/lib/interface/consumer.d.ts +11 -32
- package/lib/interface/consumer.d.ts.map +1 -1
- package/lib/interface/discount.d.ts.map +1 -1
- package/lib/interface/frictionless.d.ts.map +1 -1
- package/lib/interface/menu.d.ts +2 -0
- package/lib/interface/menu.d.ts.map +1 -1
- package/lib/interface/order.d.ts +2 -2
- package/lib/interface/order.d.ts.map +1 -1
- package/lib/interface/review.d.ts.map +1 -1
- package/lib/interface/tax.d.ts.map +1 -1
- package/lib/interface/timeslots.d.ts.map +1 -1
- package/lib/interface/user.d.ts +2 -32
- package/lib/interface/user.d.ts.map +1 -1
- package/lib/messages/legacy/CheckinProcessingFailedEvent.d.ts +1 -1
- package/lib/messages/legacy/CheckinProcessingFailedEvent.d.ts.map +1 -1
- package/lib/messages/legacy/FrictionlessCheckinExecutedEvent.d.ts +1 -1
- package/lib/messages/legacy/FrictionlessCheckinExecutedEvent.d.ts.map +1 -1
- package/lib/messages/legacy/FrictionlessThirdPartyWebhookReceivedEvent.d.ts +1 -1
- package/lib/messages/legacy/FrictionlessThirdPartyWebhookReceivedEvent.d.ts.map +1 -1
- package/lib/messages/legacy/ReprocessCheckinCommandArrivedEvent.d.ts +1 -1
- package/lib/messages/legacy/ReprocessCheckinCommandArrivedEvent.d.ts.map +1 -1
- package/lib/messages/legacy/UpdateCheckInPaymentRequiredEvent.d.ts +1 -1
- package/lib/messages/legacy/UpdateCheckInPaymentRequiredEvent.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/base.ts +9 -2
- package/src/index.ts +2 -11
- package/src/interface/ai.ts +2 -0
- package/src/interface/auth.ts +2 -0
- package/src/interface/catalog.ts +2 -0
- package/src/interface/centricos.ts +14 -9
- package/src/interface/consumer.ts +55 -32
- package/src/interface/discount.ts +4 -0
- package/src/interface/frictionless.ts +4 -0
- package/src/interface/menu.ts +2 -0
- package/src/interface/order.ts +2 -2
- package/src/interface/review.ts +2 -0
- package/src/interface/tax.ts +5 -0
- package/src/interface/timeslots.ts +2 -0
- package/src/interface/user.ts +2 -52
- package/src/messages/legacy/CheckinProcessingFailedEvent.ts +1 -1
- package/src/messages/legacy/FrictionlessCheckinExecutedEvent.ts +1 -1
- package/src/messages/legacy/FrictionlessThirdPartyWebhookReceivedEvent.ts +1 -1
- package/src/messages/legacy/ReprocessCheckinCommandArrivedEvent.ts +1 -1
- package/src/messages/legacy/UpdateCheckInPaymentRequiredEvent.ts +1 -1
|
@@ -77,6 +77,7 @@ export interface ErrorData {
|
|
|
77
77
|
// http status text
|
|
78
78
|
statusText: string;
|
|
79
79
|
timestamp: string;
|
|
80
|
+
// user friendly error message
|
|
80
81
|
displayMessage: ErrorDisplayMessage;
|
|
81
82
|
}
|
|
82
83
|
|
|
@@ -85,6 +86,7 @@ export interface Error {
|
|
|
85
86
|
code: number;
|
|
86
87
|
// business error description
|
|
87
88
|
message: string;
|
|
89
|
+
// additional error data
|
|
88
90
|
data: ErrorData;
|
|
89
91
|
}
|
|
90
92
|
|
|
@@ -94,12 +96,14 @@ export interface OrderTotals {
|
|
|
94
96
|
}
|
|
95
97
|
|
|
96
98
|
export interface OrderTransaction {
|
|
99
|
+
// used in mx orders - cart totals in dollars and meal exchange value (meals)
|
|
97
100
|
mx_totals?: OrderTotals;
|
|
98
101
|
// the amount remaining on the transaction after refund - remaining amount available for refund
|
|
99
102
|
transaction_remainder_amount?: number;
|
|
100
103
|
}
|
|
101
104
|
|
|
102
105
|
export interface OrderMetaShoppingcart {
|
|
106
|
+
// Total of first cart on order. Carts can change after refunds, so this is original value
|
|
103
107
|
original_total?: OrderTotals;
|
|
104
108
|
total?: OrderTotals;
|
|
105
109
|
}
|
|
@@ -150,13 +154,17 @@ export interface OrderMeta {
|
|
|
150
154
|
checkin_uuid?: string;
|
|
151
155
|
// which ui the order was placed on
|
|
152
156
|
source?: 'web' | 'mobile';
|
|
157
|
+
// details pertaining to the amount charged on the order
|
|
153
158
|
transaction?: OrderTransaction;
|
|
159
|
+
// Shoppingcart details
|
|
154
160
|
shoppingcart?: OrderMetaShoppingcart;
|
|
155
161
|
// Indicate whether the order is active or inactive
|
|
156
162
|
active?: boolean;
|
|
157
163
|
// Override for meta.active for testing purposes
|
|
158
164
|
active_override?: boolean;
|
|
165
|
+
// Delivery details
|
|
159
166
|
delivery?: OrderDelivery;
|
|
167
|
+
// Discount details
|
|
160
168
|
discount?: OrderDiscount;
|
|
161
169
|
// The type of kds that the brand uses
|
|
162
170
|
type_of_kds?: string;
|
|
@@ -229,6 +237,7 @@ export interface OrderRefundItem {
|
|
|
229
237
|
_index?: string;
|
|
230
238
|
// Quantity of the item
|
|
231
239
|
quantity?: number;
|
|
240
|
+
// Price of the item
|
|
232
241
|
price?: OrderMonetaryValue;
|
|
233
242
|
// Reason for refund
|
|
234
243
|
reason?: string;
|
|
@@ -316,7 +325,9 @@ export interface OrderItemWithIssue {
|
|
|
316
325
|
id: string;
|
|
317
326
|
// index
|
|
318
327
|
_index: string;
|
|
328
|
+
// Subtotal of the item including all options
|
|
319
329
|
_subtotal?: OrderMonetaryValue;
|
|
330
|
+
// Promo applied to this item
|
|
320
331
|
_promo?: OrderMonetaryValue;
|
|
321
332
|
reason?: string;
|
|
322
333
|
quantity?: number;
|
|
@@ -337,9 +348,8 @@ export interface OrderIssue {
|
|
|
337
348
|
items?: OrderItemWithIssue[];
|
|
338
349
|
// Optional additional explanation for issue: 5,10,15 for late issues, SOLD_OUT, MODIFICATION, DIETARY_RESTRICTION for see kitchen issues
|
|
339
350
|
reason?: string;
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
} & OrderIssueMeta;
|
|
351
|
+
// Issue Meta
|
|
352
|
+
meta?: OrderIssueMeta;
|
|
343
353
|
type?: string;
|
|
344
354
|
}
|
|
345
355
|
|
|
@@ -412,9 +422,7 @@ export interface ShoppingcartItemModifierIs {
|
|
|
412
422
|
export interface ShoppingcartItemModifier {
|
|
413
423
|
// index
|
|
414
424
|
_index?: string;
|
|
415
|
-
meta?:
|
|
416
|
-
[index: string]: any;
|
|
417
|
-
} & ShoppingcartItemModifierMeta;
|
|
425
|
+
meta?: ShoppingcartItemModifierMeta;
|
|
418
426
|
amount_off_exclusions?: string[];
|
|
419
427
|
id?: string;
|
|
420
428
|
price?: ShoppingcartMonetaryValue;
|
|
@@ -424,9 +432,7 @@ export interface ShoppingcartItemModifier {
|
|
|
424
432
|
}
|
|
425
433
|
|
|
426
434
|
export interface ShoppingcartItemModifierGroup {
|
|
427
|
-
meta?:
|
|
428
|
-
[index: string]: any;
|
|
429
|
-
} & ShoppingcartItemModifierGroupMeta;
|
|
435
|
+
meta?: ShoppingcartItemModifierGroupMeta;
|
|
430
436
|
id?: string;
|
|
431
437
|
label?: ShoppingcartLabel;
|
|
432
438
|
items?: ShoppingcartItemModifier[];
|
|
@@ -467,13 +473,15 @@ export interface ShoppingcartItem {
|
|
|
467
473
|
id: string;
|
|
468
474
|
// index based on cdl id or stringified timestamp
|
|
469
475
|
_index?: string;
|
|
476
|
+
// Final item price after LTO/Bundle/BOGO etc is applied on the item.
|
|
470
477
|
sale_price?: ShoppingcartSalePrice;
|
|
478
|
+
// Subtotal of the item including all options
|
|
471
479
|
_subtotal?: ShoppingcartMonetaryValue;
|
|
480
|
+
// Promo applied to this item
|
|
472
481
|
_promo?: ShoppingcartMonetaryValue;
|
|
482
|
+
// Discount applied to this item
|
|
473
483
|
_discount?: ShoppingcartMonetaryValue;
|
|
474
|
-
meta?:
|
|
475
|
-
[index: string]: any;
|
|
476
|
-
} & ShoppingcartItemMeta;
|
|
484
|
+
meta?: ShoppingcartItemMeta;
|
|
477
485
|
// Details about discount like BOGO, LTO, Bundle etc.
|
|
478
486
|
item_discount?: Record<string, any>;
|
|
479
487
|
// user specified instructions for the item
|
|
@@ -761,9 +769,7 @@ export interface CustomerOrderShoppingcartDTO {
|
|
|
761
769
|
}
|
|
762
770
|
|
|
763
771
|
export interface CustomerOrder {
|
|
764
|
-
meta?:
|
|
765
|
-
[index: string]: any;
|
|
766
|
-
} & OrderMeta;
|
|
772
|
+
meta?: OrderMeta;
|
|
767
773
|
id?: string;
|
|
768
774
|
reorder_eligibility?:
|
|
769
775
|
| 'eligible'
|
|
@@ -802,7 +808,8 @@ export interface GetCustomerOrdersResponseDTO {
|
|
|
802
808
|
}
|
|
803
809
|
|
|
804
810
|
export interface CreateOrderPayment {
|
|
805
|
-
token
|
|
811
|
+
// Payment token
|
|
812
|
+
token?: Record<string, any>;
|
|
806
813
|
credit_card?: OrderCreditCard;
|
|
807
814
|
badge_pay?: OrderCashlessPayment;
|
|
808
815
|
stipend?: OrderCashlessPayment;
|
|
@@ -825,7 +832,6 @@ export interface CreateOrderMeta {
|
|
|
825
832
|
export interface CreateOrderDetails {
|
|
826
833
|
name?: string;
|
|
827
834
|
contact_number?: string;
|
|
828
|
-
country_code?: string;
|
|
829
835
|
order_type?: string;
|
|
830
836
|
duration?: string;
|
|
831
837
|
destination?: string;
|
|
@@ -840,20 +846,23 @@ export interface PostOrderBodyDto {
|
|
|
840
846
|
location?: string;
|
|
841
847
|
// The shoppingcart
|
|
842
848
|
shoppingcart?: string;
|
|
849
|
+
// Payment details
|
|
843
850
|
payment?: CreateOrderPayment;
|
|
851
|
+
// Meal plan
|
|
844
852
|
mealplan?: OrderMealplan;
|
|
845
853
|
// User ID
|
|
846
854
|
customer?: string;
|
|
855
|
+
// Order status flags
|
|
847
856
|
is?: CreateOrderIs;
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
} & CreateOrderMeta;
|
|
857
|
+
// Meta information
|
|
858
|
+
meta?: CreateOrderMeta;
|
|
851
859
|
// Pickup (deprecated)
|
|
852
860
|
pickup?: string;
|
|
853
861
|
// Pickup name (deprecated)
|
|
854
862
|
pickup_name?: string;
|
|
855
863
|
// Requested date
|
|
856
864
|
requested_date?: string;
|
|
865
|
+
// Order details
|
|
857
866
|
details?: CreateOrderDetails;
|
|
858
867
|
}
|
|
859
868
|
|
|
@@ -862,13 +871,17 @@ export interface PlacedOrderMeta {
|
|
|
862
871
|
checkin_uuid?: string;
|
|
863
872
|
// which ui the order was placed on
|
|
864
873
|
source?: 'web' | 'mobile';
|
|
874
|
+
// details pertaining to the amount charged on the order
|
|
865
875
|
transaction?: OrderTransaction;
|
|
876
|
+
// Shoppingcart details
|
|
866
877
|
shoppingcart?: OrderMetaShoppingcart;
|
|
867
878
|
// Indicate whether the order is active or inactive
|
|
868
879
|
active?: boolean;
|
|
869
880
|
// Override for meta.active for testing purposes
|
|
870
881
|
active_override?: boolean;
|
|
882
|
+
// Delivery details
|
|
871
883
|
delivery?: OrderDelivery;
|
|
884
|
+
// Discount details
|
|
872
885
|
discount?: OrderDiscount;
|
|
873
886
|
// The type of kds that the brand uses
|
|
874
887
|
type_of_kds?: string;
|
|
@@ -886,13 +899,19 @@ export interface PostOrderResponseDto {
|
|
|
886
899
|
location?: string;
|
|
887
900
|
// Shopping cart ID
|
|
888
901
|
shoppingcart?: string;
|
|
902
|
+
// Payment details
|
|
889
903
|
payment?: OrderPayment;
|
|
904
|
+
// Meal plan
|
|
890
905
|
mealplan?: OrderMealplan;
|
|
906
|
+
// Meal swipes
|
|
891
907
|
meal_swipes?: OrderMealSwipes;
|
|
908
|
+
// Meal exchange
|
|
892
909
|
meal_exchange?: OrderMealplan;
|
|
893
910
|
// User ID
|
|
894
911
|
customer?: string;
|
|
912
|
+
// Order status flags
|
|
895
913
|
is?: OrderIs;
|
|
914
|
+
// Order date info
|
|
896
915
|
date?: OrderDate;
|
|
897
916
|
// Pickup (deprecated)
|
|
898
917
|
pickup?: string;
|
|
@@ -902,10 +921,11 @@ export interface PostOrderResponseDto {
|
|
|
902
921
|
pickup_id?: string;
|
|
903
922
|
// Requested date
|
|
904
923
|
requested_date?: string;
|
|
924
|
+
// Order details
|
|
905
925
|
details?: OrderDetails;
|
|
906
|
-
meta
|
|
907
|
-
|
|
908
|
-
|
|
926
|
+
// Order meta info
|
|
927
|
+
meta?: PlacedOrderMeta;
|
|
928
|
+
// Issue
|
|
909
929
|
issue?: OrderIssue;
|
|
910
930
|
// Past issues
|
|
911
931
|
past_issues?: OrderIssue[];
|
|
@@ -990,9 +1010,7 @@ export interface ConsumerAnnouncement {
|
|
|
990
1010
|
}
|
|
991
1011
|
|
|
992
1012
|
export interface HomePageOrder {
|
|
993
|
-
meta?:
|
|
994
|
-
[index: string]: any;
|
|
995
|
-
} & OrderMeta;
|
|
1013
|
+
meta?: OrderMeta;
|
|
996
1014
|
id?: string;
|
|
997
1015
|
reorder_eligibility?:
|
|
998
1016
|
| 'eligible'
|
|
@@ -1283,12 +1301,15 @@ export interface ConsumerGroup {
|
|
|
1283
1301
|
}
|
|
1284
1302
|
|
|
1285
1303
|
export interface HomePageResponse {
|
|
1304
|
+
// valid diverse greeting messages
|
|
1286
1305
|
greetingMessage: DiverseGreetingMessages;
|
|
1306
|
+
// valid hero images
|
|
1287
1307
|
heroImages: HeroImage;
|
|
1288
1308
|
// active announcements
|
|
1289
1309
|
announcements?: ConsumerAnnouncement[];
|
|
1290
1310
|
// array of orders
|
|
1291
1311
|
orders?: HomePageOrder[];
|
|
1312
|
+
// location object for the site
|
|
1292
1313
|
location?: ConsumerGroup;
|
|
1293
1314
|
}
|
|
1294
1315
|
|
|
@@ -1739,9 +1760,8 @@ export interface PutConsumerUserResponse {
|
|
|
1739
1760
|
realm?: string;
|
|
1740
1761
|
// The gender of the user
|
|
1741
1762
|
gender?: Record<string, any>;
|
|
1742
|
-
meta
|
|
1743
|
-
|
|
1744
|
-
} & ConsumerUserMeta;
|
|
1763
|
+
// The meta of the user
|
|
1764
|
+
meta?: ConsumerUserMeta;
|
|
1745
1765
|
is?: {
|
|
1746
1766
|
disabled?: boolean;
|
|
1747
1767
|
locked_out?: boolean;
|
|
@@ -1750,6 +1770,7 @@ export interface PutConsumerUserResponse {
|
|
|
1750
1770
|
deleted?: boolean;
|
|
1751
1771
|
placeholder?: boolean;
|
|
1752
1772
|
};
|
|
1773
|
+
// The permissions of the user
|
|
1753
1774
|
permissions?: ConsumerScopes;
|
|
1754
1775
|
// The location group of the user
|
|
1755
1776
|
location_group?: string;
|
|
@@ -1782,9 +1803,8 @@ export interface GetConsumerUserResponse {
|
|
|
1782
1803
|
realm?: string;
|
|
1783
1804
|
// The gender of the user
|
|
1784
1805
|
gender?: Record<string, any>;
|
|
1785
|
-
meta
|
|
1786
|
-
|
|
1787
|
-
} & ConsumerUserMeta;
|
|
1806
|
+
// The meta of the user
|
|
1807
|
+
meta?: ConsumerUserMeta;
|
|
1788
1808
|
is?: {
|
|
1789
1809
|
disabled?: boolean;
|
|
1790
1810
|
locked_out?: boolean;
|
|
@@ -1793,6 +1813,7 @@ export interface GetConsumerUserResponse {
|
|
|
1793
1813
|
deleted?: boolean;
|
|
1794
1814
|
placeholder?: boolean;
|
|
1795
1815
|
};
|
|
1816
|
+
// The permissions of the user
|
|
1796
1817
|
permissions?: ConsumerScopes;
|
|
1797
1818
|
// The location group of the user
|
|
1798
1819
|
location_group?: string;
|
|
@@ -1930,6 +1951,7 @@ export interface PostConsumerRecommendedRequest {
|
|
|
1930
1951
|
}
|
|
1931
1952
|
|
|
1932
1953
|
export interface ConsumerRecommendedItem {
|
|
1954
|
+
// item
|
|
1933
1955
|
item: ConsumerItem;
|
|
1934
1956
|
station_name?: string;
|
|
1935
1957
|
menu_id?: string;
|
|
@@ -2073,6 +2095,7 @@ export interface ConsumerRedemption {
|
|
|
2073
2095
|
result?: boolean;
|
|
2074
2096
|
// The promo code that was redeemed
|
|
2075
2097
|
code?: string;
|
|
2098
|
+
// The discount applied
|
|
2076
2099
|
discount?: ConsumerAppliedDiscount;
|
|
2077
2100
|
// The type of redemption
|
|
2078
2101
|
type?: string;
|
|
@@ -29,10 +29,12 @@ export interface VoucherifyMetaData {
|
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
export interface MetaProvider {
|
|
32
|
+
// Voucherify metadata
|
|
32
33
|
voucherify?: VoucherifyMetaData;
|
|
33
34
|
}
|
|
34
35
|
|
|
35
36
|
export interface DiscountMeta {
|
|
37
|
+
// discount 3rd party provider metadata
|
|
36
38
|
provider: MetaProvider;
|
|
37
39
|
}
|
|
38
40
|
|
|
@@ -66,6 +68,7 @@ export interface ErrorData {
|
|
|
66
68
|
// http status text
|
|
67
69
|
statusText: string;
|
|
68
70
|
timestamp: string;
|
|
71
|
+
// user friendly error message
|
|
69
72
|
displayMessage: ErrorDisplayMessage;
|
|
70
73
|
}
|
|
71
74
|
|
|
@@ -74,6 +77,7 @@ export interface Error {
|
|
|
74
77
|
code: number;
|
|
75
78
|
// business error description
|
|
76
79
|
message: string;
|
|
80
|
+
// additional error data
|
|
77
81
|
data: ErrorData;
|
|
78
82
|
}
|
|
79
83
|
|
|
@@ -23,6 +23,7 @@ export interface ErrorData {
|
|
|
23
23
|
// http status text
|
|
24
24
|
statusText: string;
|
|
25
25
|
timestamp: string;
|
|
26
|
+
// user friendly error message
|
|
26
27
|
displayMessage: ErrorDisplayMessage;
|
|
27
28
|
}
|
|
28
29
|
|
|
@@ -31,6 +32,7 @@ export interface Error {
|
|
|
31
32
|
code: number;
|
|
32
33
|
// business error description
|
|
33
34
|
message: string;
|
|
35
|
+
// additional error data
|
|
34
36
|
data: ErrorData;
|
|
35
37
|
}
|
|
36
38
|
|
|
@@ -49,7 +51,9 @@ export interface CreditCardDTO {
|
|
|
49
51
|
}
|
|
50
52
|
|
|
51
53
|
export interface PaymentMethodDTO {
|
|
54
|
+
// The mealplan information
|
|
52
55
|
mealplan?: MealplanDTO;
|
|
56
|
+
// The credit card information
|
|
53
57
|
creditCard?: CreditCardDTO;
|
|
54
58
|
// Token used for identify the payment method
|
|
55
59
|
token: string;
|
package/src/interface/menu.ts
CHANGED
|
@@ -4451,6 +4451,7 @@ export interface PostMenuV3DraftMenuDuplicatePath {
|
|
|
4451
4451
|
|
|
4452
4452
|
export interface PostMenuV3DraftMenuDuplicateBody {
|
|
4453
4453
|
name?: string;
|
|
4454
|
+
translation?: NameTranslation;
|
|
4454
4455
|
[index: string]: any;
|
|
4455
4456
|
}
|
|
4456
4457
|
|
|
@@ -4841,6 +4842,7 @@ export interface PostMenuV3DraftCategoryDuplicateBody {
|
|
|
4841
4842
|
sequence?: number;
|
|
4842
4843
|
is_active?: boolean;
|
|
4843
4844
|
menu_id?: string;
|
|
4845
|
+
translation?: NameTranslation;
|
|
4844
4846
|
[index: string]: any;
|
|
4845
4847
|
}
|
|
4846
4848
|
|
package/src/interface/order.ts
CHANGED
|
@@ -378,9 +378,9 @@ export interface Orders {
|
|
|
378
378
|
};
|
|
379
379
|
}
|
|
380
380
|
|
|
381
|
-
export
|
|
381
|
+
export type ItemsWithIssue = OrderedItem & {
|
|
382
382
|
reason?: string;
|
|
383
|
-
}
|
|
383
|
+
};
|
|
384
384
|
|
|
385
385
|
export interface ActionResponse {
|
|
386
386
|
success?: boolean;
|
package/src/interface/review.ts
CHANGED
|
@@ -30,6 +30,7 @@ export interface ErrorData {
|
|
|
30
30
|
// http status text
|
|
31
31
|
statusText: string;
|
|
32
32
|
timestamp: string;
|
|
33
|
+
// user friendly error message
|
|
33
34
|
displayMessage: ErrorDisplayMessage;
|
|
34
35
|
}
|
|
35
36
|
|
|
@@ -38,6 +39,7 @@ export interface Error {
|
|
|
38
39
|
code: number;
|
|
39
40
|
// business error description
|
|
40
41
|
message: string;
|
|
42
|
+
// additional error data
|
|
41
43
|
data: ErrorData;
|
|
42
44
|
}
|
|
43
45
|
|
package/src/interface/tax.ts
CHANGED
|
@@ -45,11 +45,13 @@ export interface TaxRequestDTO {
|
|
|
45
45
|
id: string;
|
|
46
46
|
// the app to associate the transaction with
|
|
47
47
|
appName: string;
|
|
48
|
+
// the order fulfillment type
|
|
48
49
|
transactionType: TransactionType;
|
|
49
50
|
// numeric value of service fee
|
|
50
51
|
serviceFee?: number;
|
|
51
52
|
// numeric value of delivery fee
|
|
52
53
|
deliveryFee?: number;
|
|
54
|
+
// location data of the transaction
|
|
53
55
|
locationData: TaxLocationData;
|
|
54
56
|
// items to calculate tax on
|
|
55
57
|
items: TaxItemDTO[];
|
|
@@ -75,6 +77,7 @@ export interface TaxResponseDTO {
|
|
|
75
77
|
amount: number;
|
|
76
78
|
// the total tax rate applied to the items to determine the total tax of the transaction
|
|
77
79
|
rate: number;
|
|
80
|
+
// tax breakdown containing amount for state/province and total taxable amount
|
|
78
81
|
breakdown: TaxBreakdownDTO;
|
|
79
82
|
// the name of the tax provider
|
|
80
83
|
provider: string;
|
|
@@ -93,6 +96,7 @@ export interface ErrorData {
|
|
|
93
96
|
// http status text
|
|
94
97
|
statusText: string;
|
|
95
98
|
timestamp: string;
|
|
99
|
+
// user friendly error message
|
|
96
100
|
displayMessage: ErrorDisplayMessage;
|
|
97
101
|
}
|
|
98
102
|
|
|
@@ -101,6 +105,7 @@ export interface Error {
|
|
|
101
105
|
code: number;
|
|
102
106
|
// business error description
|
|
103
107
|
message: string;
|
|
108
|
+
// additional error data
|
|
104
109
|
data: ErrorData;
|
|
105
110
|
}
|
|
106
111
|
|
|
@@ -28,6 +28,7 @@ export interface ErrorData {
|
|
|
28
28
|
// http status text
|
|
29
29
|
statusText: string;
|
|
30
30
|
timestamp: string;
|
|
31
|
+
// user friendly error message
|
|
31
32
|
displayMessage: ErrorDisplayMessage;
|
|
32
33
|
}
|
|
33
34
|
|
|
@@ -36,6 +37,7 @@ export interface Error {
|
|
|
36
37
|
code: number;
|
|
37
38
|
// business error description
|
|
38
39
|
message: string;
|
|
40
|
+
// additional error data
|
|
39
41
|
data: ErrorData;
|
|
40
42
|
}
|
|
41
43
|
|
package/src/interface/user.ts
CHANGED
|
@@ -241,7 +241,6 @@ export interface CheckInUserInfo {
|
|
|
241
241
|
|
|
242
242
|
export interface Scopes {
|
|
243
243
|
scopes?: Permission[];
|
|
244
|
-
acl?: Acl;
|
|
245
244
|
}
|
|
246
245
|
|
|
247
246
|
export interface Users {
|
|
@@ -263,27 +262,6 @@ export interface UserDeviceAuthBody {
|
|
|
263
262
|
long?: string;
|
|
264
263
|
}
|
|
265
264
|
|
|
266
|
-
export type AclAction = string[];
|
|
267
|
-
|
|
268
|
-
export interface Acl {
|
|
269
|
-
// Any role name
|
|
270
|
-
ROLE?: {
|
|
271
|
-
// Any resource name
|
|
272
|
-
RESOURCE?: {
|
|
273
|
-
'create:own'?: AclAction;
|
|
274
|
-
'read:own'?: AclAction;
|
|
275
|
-
'update:own'?: AclAction;
|
|
276
|
-
'delete:own'?: AclAction;
|
|
277
|
-
'create:any'?: AclAction;
|
|
278
|
-
'read:any'?: AclAction;
|
|
279
|
-
'update:any'?: AclAction;
|
|
280
|
-
'delete:any'?: AclAction;
|
|
281
|
-
};
|
|
282
|
-
[index: string]: any;
|
|
283
|
-
};
|
|
284
|
-
[index: string]: any;
|
|
285
|
-
}
|
|
286
|
-
|
|
287
265
|
export interface UserMeta {
|
|
288
266
|
marketing_opt_in?: boolean;
|
|
289
267
|
marketing_opt_in_date?: string;
|
|
@@ -389,8 +367,6 @@ export interface PostUserZendeskRequest extends BaseRequest {
|
|
|
389
367
|
// POST /user - Create an User
|
|
390
368
|
|
|
391
369
|
export interface PostUserQuery {
|
|
392
|
-
// Use ACL permission system
|
|
393
|
-
acl?: boolean;
|
|
394
370
|
// hCaptcha response key
|
|
395
371
|
captchaResponseKey: string;
|
|
396
372
|
}
|
|
@@ -411,8 +387,6 @@ export interface GetUserPath {
|
|
|
411
387
|
}
|
|
412
388
|
|
|
413
389
|
export interface GetUserQuery {
|
|
414
|
-
// Use ACL permission system
|
|
415
|
-
acl?: boolean;
|
|
416
390
|
// Graphql query string
|
|
417
391
|
_query?: string;
|
|
418
392
|
}
|
|
@@ -431,8 +405,6 @@ export interface PutUserPath {
|
|
|
431
405
|
export interface PutUserQuery {
|
|
432
406
|
// The language of the user ex en, fr
|
|
433
407
|
lang?: string;
|
|
434
|
-
// Use ACL permission system
|
|
435
|
-
acl?: boolean;
|
|
436
408
|
}
|
|
437
409
|
|
|
438
410
|
export type PutUserBody = User;
|
|
@@ -453,8 +425,6 @@ export interface PatchUserPath {
|
|
|
453
425
|
export interface PatchUserQuery {
|
|
454
426
|
// The language of the user ex en, fr
|
|
455
427
|
lang?: string;
|
|
456
|
-
// Use ACL permission system
|
|
457
|
-
acl?: boolean;
|
|
458
428
|
}
|
|
459
429
|
|
|
460
430
|
export type PatchUserBody = User;
|
|
@@ -472,17 +442,9 @@ export interface DeleteUserPath {
|
|
|
472
442
|
id: string;
|
|
473
443
|
}
|
|
474
444
|
|
|
475
|
-
export interface DeleteUserQuery {
|
|
476
|
-
// Use ACL permission system
|
|
477
|
-
acl?: boolean;
|
|
478
|
-
}
|
|
479
|
-
|
|
480
445
|
export type DeleteUserResponse = success;
|
|
481
446
|
|
|
482
|
-
export interface DeleteUserRequest
|
|
483
|
-
extends BaseRequest,
|
|
484
|
-
RequestQuery<DeleteUserQuery>,
|
|
485
|
-
DeleteUserPath {}
|
|
447
|
+
export interface DeleteUserRequest extends BaseRequest, DeleteUserPath {}
|
|
486
448
|
|
|
487
449
|
// POST /user/device/auth - Endpoint for generating/retrieving KDS device token
|
|
488
450
|
|
|
@@ -654,8 +616,6 @@ export interface GetUserRealmUsersQuery {
|
|
|
654
616
|
max?: number;
|
|
655
617
|
// Last modified date greater than this parameter
|
|
656
618
|
lastmodified_start?: string;
|
|
657
|
-
// Use ACL permission system
|
|
658
|
-
acl?: boolean;
|
|
659
619
|
// If true, the response will include pagination metadata
|
|
660
620
|
paginate?: boolean;
|
|
661
621
|
// The last key from the previous response for pagination
|
|
@@ -682,8 +642,6 @@ export interface GetUserPermissionsPath {
|
|
|
682
642
|
}
|
|
683
643
|
|
|
684
644
|
export interface GetUserPermissionsQuery {
|
|
685
|
-
// Use ACL permission system
|
|
686
|
-
acl?: boolean;
|
|
687
645
|
// Graphql query string
|
|
688
646
|
_query?: string;
|
|
689
647
|
}
|
|
@@ -702,11 +660,6 @@ export interface PutUserPermissionsPath {
|
|
|
702
660
|
id: string;
|
|
703
661
|
}
|
|
704
662
|
|
|
705
|
-
export interface PutUserPermissionsQuery {
|
|
706
|
-
// Use ACL permission system
|
|
707
|
-
acl?: boolean;
|
|
708
|
-
}
|
|
709
|
-
|
|
710
663
|
export interface PutUserPermissionsBody {
|
|
711
664
|
permissions?: {
|
|
712
665
|
scopes?: Permission[];
|
|
@@ -715,10 +668,7 @@ export interface PutUserPermissionsBody {
|
|
|
715
668
|
|
|
716
669
|
export type PutUserPermissionsResponse = User;
|
|
717
670
|
|
|
718
|
-
export interface PutUserPermissionsRequest
|
|
719
|
-
extends BaseRequest,
|
|
720
|
-
RequestQuery<PutUserPermissionsQuery>,
|
|
721
|
-
PutUserPermissionsPath {
|
|
671
|
+
export interface PutUserPermissionsRequest extends BaseRequest, PutUserPermissionsPath {
|
|
722
672
|
body: PutUserPermissionsBody;
|
|
723
673
|
}
|
|
724
674
|
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Create a new message type respecting the new standards
|
|
6
6
|
*/
|
|
7
7
|
export interface ReprocessCheckinCommandArrivedEvent {
|
|
8
|
-
name:
|
|
8
|
+
name: 'reprocess-checkin-command-arrived-event';
|
|
9
9
|
checkinID: string;
|
|
10
10
|
correlationID: string;
|
|
11
11
|
type: 'ReprocessCheckinCommandArrivedEvent';
|