@compassdigital/sdk.typescript 3.24.0 → 3.26.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.d.ts +18 -20
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +17 -21
- package/lib/index.js.map +1 -1
- package/lib/interface/order.d.ts +2 -0
- package/lib/interface/order.d.ts.map +1 -1
- package/lib/interface/partner.d.ts +4 -12
- package/lib/interface/partner.d.ts.map +1 -1
- package/lib/interface/payment.d.ts +8 -0
- package/lib/interface/payment.d.ts.map +1 -1
- package/lib/interface/shoppingcart.d.ts +1 -31
- package/lib/interface/shoppingcart.d.ts.map +1 -1
- package/lib/interface/user.d.ts +20 -0
- package/lib/interface/user.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/index.ts +37 -49
- package/src/interface/order.ts +4 -0
- package/src/interface/partner.ts +4 -14
- package/src/interface/payment.ts +15 -0
- package/src/interface/shoppingcart.ts +2 -52
- package/src/interface/user.ts +29 -0
|
@@ -30,10 +30,6 @@ export interface Item {
|
|
|
30
30
|
_promo?: {
|
|
31
31
|
amount?: number;
|
|
32
32
|
};
|
|
33
|
-
// loyalty coupon applied to this item
|
|
34
|
-
_loyalty?: {
|
|
35
|
-
amount?: number;
|
|
36
|
-
};
|
|
37
33
|
meta?: {
|
|
38
34
|
// menu id
|
|
39
35
|
menu?: string;
|
|
@@ -132,10 +128,6 @@ export interface OrderId {
|
|
|
132
128
|
id?: string;
|
|
133
129
|
}
|
|
134
130
|
|
|
135
|
-
export interface CouponCode {
|
|
136
|
-
code?: string;
|
|
137
|
-
}
|
|
138
|
-
|
|
139
131
|
export interface ShoppingCart {
|
|
140
132
|
// shoppingcart
|
|
141
133
|
id?: string;
|
|
@@ -157,16 +149,6 @@ export interface ShoppingCart {
|
|
|
157
149
|
amount?: number;
|
|
158
150
|
app?: string;
|
|
159
151
|
};
|
|
160
|
-
loyalty?: {
|
|
161
|
-
coupon?: {
|
|
162
|
-
code?: string;
|
|
163
|
-
amount_off?: number;
|
|
164
|
-
amount?: number;
|
|
165
|
-
name?: string;
|
|
166
|
-
};
|
|
167
|
-
// Points to be earned for this shopping cart total
|
|
168
|
-
order_loyalty_points?: boolean;
|
|
169
|
-
};
|
|
170
152
|
discount?: {
|
|
171
153
|
code?: string;
|
|
172
154
|
amount_off?: number;
|
|
@@ -228,6 +210,8 @@ export interface ShoppingCart {
|
|
|
228
210
|
mx_cart?: boolean;
|
|
229
211
|
// If a user's email domain is a match in a sites list of tax exempt domains
|
|
230
212
|
domain_tax_exempt?: boolean;
|
|
213
|
+
// Indicates to clients that a tax recalculation is required
|
|
214
|
+
tax_calculation_required?: boolean;
|
|
231
215
|
};
|
|
232
216
|
meta?: {
|
|
233
217
|
// Raw request from any vendor integrated with CDL
|
|
@@ -364,40 +348,6 @@ export interface PutShoppingcartCartOrderRequest extends BaseRequest, PutShoppin
|
|
|
364
348
|
body: PutShoppingcartCartOrderBody;
|
|
365
349
|
}
|
|
366
350
|
|
|
367
|
-
// PUT /shoppingcart/{id}/loyalty/{user_id} - Apply a loyalty coupon in a ShoppingCart
|
|
368
|
-
|
|
369
|
-
export interface PutShoppingcartCartLoyaltyPath {
|
|
370
|
-
// Shopping cart ID
|
|
371
|
-
id: string;
|
|
372
|
-
// User ID
|
|
373
|
-
user_id: string;
|
|
374
|
-
}
|
|
375
|
-
|
|
376
|
-
export type PutShoppingcartCartLoyaltyBody = CouponCode;
|
|
377
|
-
|
|
378
|
-
export type PutShoppingcartCartLoyaltyResponse = ShoppingCart;
|
|
379
|
-
|
|
380
|
-
export interface PutShoppingcartCartLoyaltyRequest
|
|
381
|
-
extends BaseRequest,
|
|
382
|
-
PutShoppingcartCartLoyaltyPath {
|
|
383
|
-
body: PutShoppingcartCartLoyaltyBody;
|
|
384
|
-
}
|
|
385
|
-
|
|
386
|
-
// DELETE /shoppingcart/{id}/loyalty/{user_id} - Delete loyalty coupon in shoppingCart
|
|
387
|
-
|
|
388
|
-
export interface DeleteShoppingcartCartLoyaltyPath {
|
|
389
|
-
// Shopping cart ID
|
|
390
|
-
id: string;
|
|
391
|
-
// User ID
|
|
392
|
-
user_id: string;
|
|
393
|
-
}
|
|
394
|
-
|
|
395
|
-
export type DeleteShoppingcartCartLoyaltyResponse = ShoppingCart;
|
|
396
|
-
|
|
397
|
-
export interface DeleteShoppingcartCartLoyaltyRequest
|
|
398
|
-
extends BaseRequest,
|
|
399
|
-
DeleteShoppingcartCartLoyaltyPath {}
|
|
400
|
-
|
|
401
351
|
// POST /shoppingcart/{id}/clone - Create a shopping cart from existing shopping cart
|
|
402
352
|
|
|
403
353
|
export interface PostShoppingcartCloneCartPath {
|
package/src/interface/user.ts
CHANGED
|
@@ -38,6 +38,11 @@ export interface User {
|
|
|
38
38
|
send_emails_date_updated?: string;
|
|
39
39
|
};
|
|
40
40
|
mealplan_added_date?: string;
|
|
41
|
+
// forgot password verification details
|
|
42
|
+
password_verification?: {
|
|
43
|
+
attempts?: number;
|
|
44
|
+
last_accessed?: string;
|
|
45
|
+
};
|
|
41
46
|
// phone verification details
|
|
42
47
|
phone_verification?: {
|
|
43
48
|
verification_code?: string;
|
|
@@ -59,6 +64,16 @@ export interface User {
|
|
|
59
64
|
location_group?: string;
|
|
60
65
|
}
|
|
61
66
|
|
|
67
|
+
export interface GuestUserCreate {
|
|
68
|
+
email?: string;
|
|
69
|
+
name?: {
|
|
70
|
+
first?: string;
|
|
71
|
+
last?: string;
|
|
72
|
+
};
|
|
73
|
+
// realm
|
|
74
|
+
realm?: string;
|
|
75
|
+
}
|
|
76
|
+
|
|
62
77
|
export interface Changepassword {
|
|
63
78
|
password?: string;
|
|
64
79
|
new_password?: string;
|
|
@@ -101,6 +116,10 @@ export interface auth {
|
|
|
101
116
|
profile?: User;
|
|
102
117
|
}
|
|
103
118
|
|
|
119
|
+
export interface guestAuth {
|
|
120
|
+
token?: string;
|
|
121
|
+
}
|
|
122
|
+
|
|
104
123
|
export type Permission = string;
|
|
105
124
|
|
|
106
125
|
export interface KDSToken {
|
|
@@ -660,3 +679,13 @@ export type PutUserVerificationPhoneResponse = success;
|
|
|
660
679
|
export interface PutUserVerificationPhoneRequest extends BaseRequest, PutUserVerificationPhonePath {
|
|
661
680
|
body: PutUserVerificationPhoneBody;
|
|
662
681
|
}
|
|
682
|
+
|
|
683
|
+
// POST /user/guest - Creates a guest user
|
|
684
|
+
|
|
685
|
+
export type PostUserCreatGuestUserBody = GuestUserCreate;
|
|
686
|
+
|
|
687
|
+
export type PostUserCreatGuestUserResponse = guestAuth;
|
|
688
|
+
|
|
689
|
+
export interface PostUserCreatGuestUserRequest extends BaseRequest {
|
|
690
|
+
body: PostUserCreatGuestUserBody;
|
|
691
|
+
}
|