@compassdigital/sdk.typescript 3.29.0 → 3.30.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 +48 -3
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +49 -0
- package/lib/index.js.map +1 -1
- package/lib/interface/location.d.ts +6 -0
- package/lib/interface/location.d.ts.map +1 -1
- package/lib/interface/menu.d.ts +31 -0
- package/lib/interface/menu.d.ts.map +1 -1
- package/lib/interface/payment.d.ts +16 -0
- package/lib/interface/payment.d.ts.map +1 -1
- package/lib/interface/shoppingcart.d.ts +32 -16
- package/lib/interface/shoppingcart.d.ts.map +1 -1
- package/lib/interface/user.d.ts +17 -0
- package/lib/interface/user.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/index.ts +124 -0
- package/src/interface/location.ts +6 -0
- package/src/interface/menu.ts +65 -0
- package/src/interface/payment.ts +25 -0
- package/src/interface/shoppingcart.ts +43 -17
- package/src/interface/user.ts +25 -0
|
@@ -120,7 +120,7 @@ export interface MenuID {
|
|
|
120
120
|
}
|
|
121
121
|
|
|
122
122
|
export interface ShoppingCarts {
|
|
123
|
-
shoppingcarts?:
|
|
123
|
+
shoppingcarts?: ShoppingCartResponse[];
|
|
124
124
|
}
|
|
125
125
|
|
|
126
126
|
export interface OrderId {
|
|
@@ -128,7 +128,31 @@ export interface OrderId {
|
|
|
128
128
|
id?: string;
|
|
129
129
|
}
|
|
130
130
|
|
|
131
|
-
export interface
|
|
131
|
+
export interface ShoppingCartRequest {
|
|
132
|
+
// location
|
|
133
|
+
location?: string;
|
|
134
|
+
// menu
|
|
135
|
+
menu?: string;
|
|
136
|
+
// brand
|
|
137
|
+
brand?: string;
|
|
138
|
+
is?: {
|
|
139
|
+
// Shoppingcart Type: delivery, pickup
|
|
140
|
+
type?: string;
|
|
141
|
+
// If an order should be paid with meal exchange. If true, this will calculate meals total.
|
|
142
|
+
mx_cart?: boolean;
|
|
143
|
+
// If a user's email domain is a match in a sites list of tax exempt domains
|
|
144
|
+
email_tax_exempt?: boolean;
|
|
145
|
+
// Indicates to clients that a tax recalculation is required
|
|
146
|
+
tax_calculation_required?: boolean;
|
|
147
|
+
};
|
|
148
|
+
meta?: {
|
|
149
|
+
// Raw request from any vendor integrated with CDL
|
|
150
|
+
vendor?: any;
|
|
151
|
+
[index: string]: any;
|
|
152
|
+
};
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
export interface ShoppingCartResponse {
|
|
132
156
|
// shoppingcart
|
|
133
157
|
id?: string;
|
|
134
158
|
// location
|
|
@@ -219,8 +243,8 @@ export interface ShoppingCart {
|
|
|
219
243
|
type?: string;
|
|
220
244
|
// If an order should be paid with meal exchange. If true, this will calculate meals total.
|
|
221
245
|
mx_cart?: boolean;
|
|
222
|
-
// If a user's email domain is a match in a sites list of tax exempt domains
|
|
223
|
-
|
|
246
|
+
// If a user's email or email domain is a match in a sites list of tax exempt emails or domains
|
|
247
|
+
email_tax_exempt?: boolean;
|
|
224
248
|
// Indicates to clients that a tax recalculation is required
|
|
225
249
|
tax_calculation_required?: boolean;
|
|
226
250
|
};
|
|
@@ -231,11 +255,13 @@ export interface ShoppingCart {
|
|
|
231
255
|
};
|
|
232
256
|
}
|
|
233
257
|
|
|
258
|
+
export type ShoppingCart = ShoppingCartResponse;
|
|
259
|
+
|
|
234
260
|
// POST /shoppingcart/ - Create a new ShoppingCart
|
|
235
261
|
|
|
236
|
-
export type PostShoppingcartCartBody =
|
|
262
|
+
export type PostShoppingcartCartBody = ShoppingCartRequest;
|
|
237
263
|
|
|
238
|
-
export type PostShoppingcartCartResponse =
|
|
264
|
+
export type PostShoppingcartCartResponse = ShoppingCartResponse;
|
|
239
265
|
|
|
240
266
|
export interface PostShoppingcartCartRequest extends BaseRequest {
|
|
241
267
|
body: PostShoppingcartCartBody;
|
|
@@ -250,7 +276,7 @@ export interface PutShoppingcartCartItemsPath {
|
|
|
250
276
|
|
|
251
277
|
export type PutShoppingcartCartItemsBody = Items;
|
|
252
278
|
|
|
253
|
-
export type PutShoppingcartCartItemsResponse =
|
|
279
|
+
export type PutShoppingcartCartItemsResponse = ShoppingCartResponse;
|
|
254
280
|
|
|
255
281
|
export interface PutShoppingcartCartItemsRequest extends BaseRequest, PutShoppingcartCartItemsPath {
|
|
256
282
|
body: PutShoppingcartCartItemsBody;
|
|
@@ -265,7 +291,7 @@ export interface DeleteShoppingcartCartItemsPath {
|
|
|
265
291
|
|
|
266
292
|
export type DeleteShoppingcartCartItemsBody = Items;
|
|
267
293
|
|
|
268
|
-
export type DeleteShoppingcartCartItemsResponse =
|
|
294
|
+
export type DeleteShoppingcartCartItemsResponse = ShoppingCartResponse;
|
|
269
295
|
|
|
270
296
|
export interface DeleteShoppingcartCartItemsRequest
|
|
271
297
|
extends BaseRequest,
|
|
@@ -280,7 +306,7 @@ export interface GetShoppingcartCartPath {
|
|
|
280
306
|
id: string;
|
|
281
307
|
}
|
|
282
308
|
|
|
283
|
-
export type GetShoppingcartCartResponse =
|
|
309
|
+
export type GetShoppingcartCartResponse = ShoppingCartResponse;
|
|
284
310
|
|
|
285
311
|
export interface GetShoppingcartCartRequest extends BaseRequest, GetShoppingcartCartPath {}
|
|
286
312
|
|
|
@@ -291,9 +317,9 @@ export interface PatchShoppingcartCartPath {
|
|
|
291
317
|
id: string;
|
|
292
318
|
}
|
|
293
319
|
|
|
294
|
-
export type PatchShoppingcartCartBody =
|
|
320
|
+
export type PatchShoppingcartCartBody = ShoppingCartResponse;
|
|
295
321
|
|
|
296
|
-
export type PatchShoppingcartCartResponse =
|
|
322
|
+
export type PatchShoppingcartCartResponse = ShoppingCartResponse;
|
|
297
323
|
|
|
298
324
|
export interface PatchShoppingcartCartRequest extends BaseRequest, PatchShoppingcartCartPath {
|
|
299
325
|
body: PatchShoppingcartCartBody;
|
|
@@ -308,7 +334,7 @@ export interface PutShoppingcartCartPromoPath {
|
|
|
308
334
|
|
|
309
335
|
export type PutShoppingcartCartPromoBody = Promo;
|
|
310
336
|
|
|
311
|
-
export type PutShoppingcartCartPromoResponse =
|
|
337
|
+
export type PutShoppingcartCartPromoResponse = ShoppingCartResponse;
|
|
312
338
|
|
|
313
339
|
export interface PutShoppingcartCartPromoRequest extends BaseRequest, PutShoppingcartCartPromoPath {
|
|
314
340
|
body: PutShoppingcartCartPromoBody;
|
|
@@ -321,7 +347,7 @@ export interface DeleteShoppingcartCartPromoPath {
|
|
|
321
347
|
id: string;
|
|
322
348
|
}
|
|
323
349
|
|
|
324
|
-
export type DeleteShoppingcartCartPromoResponse =
|
|
350
|
+
export type DeleteShoppingcartCartPromoResponse = ShoppingCartResponse;
|
|
325
351
|
|
|
326
352
|
export interface DeleteShoppingcartCartPromoRequest
|
|
327
353
|
extends BaseRequest,
|
|
@@ -336,7 +362,7 @@ export interface PutShoppingcartCartPaymentPath {
|
|
|
336
362
|
|
|
337
363
|
export type PutShoppingcartCartPaymentBody = Payment;
|
|
338
364
|
|
|
339
|
-
export type PutShoppingcartCartPaymentResponse =
|
|
365
|
+
export type PutShoppingcartCartPaymentResponse = ShoppingCartResponse;
|
|
340
366
|
|
|
341
367
|
export interface PutShoppingcartCartPaymentRequest
|
|
342
368
|
extends BaseRequest,
|
|
@@ -353,7 +379,7 @@ export interface PutShoppingcartCartOrderPath {
|
|
|
353
379
|
|
|
354
380
|
export type PutShoppingcartCartOrderBody = OrderId;
|
|
355
381
|
|
|
356
|
-
export type PutShoppingcartCartOrderResponse =
|
|
382
|
+
export type PutShoppingcartCartOrderResponse = ShoppingCartResponse;
|
|
357
383
|
|
|
358
384
|
export interface PutShoppingcartCartOrderRequest extends BaseRequest, PutShoppingcartCartOrderPath {
|
|
359
385
|
body: PutShoppingcartCartOrderBody;
|
|
@@ -371,7 +397,7 @@ export interface PostShoppingcartCloneCartBody {
|
|
|
371
397
|
order_type?: string;
|
|
372
398
|
}
|
|
373
399
|
|
|
374
|
-
export type PostShoppingcartCloneCartResponse =
|
|
400
|
+
export type PostShoppingcartCloneCartResponse = ShoppingCartResponse;
|
|
375
401
|
|
|
376
402
|
export interface PostShoppingcartCloneCartRequest
|
|
377
403
|
extends BaseRequest,
|
|
@@ -386,7 +412,7 @@ export interface PutShoppingcartCheckoutPath {
|
|
|
386
412
|
id: string;
|
|
387
413
|
}
|
|
388
414
|
|
|
389
|
-
export type PutShoppingcartCheckoutResponse =
|
|
415
|
+
export type PutShoppingcartCheckoutResponse = ShoppingCartResponse;
|
|
390
416
|
|
|
391
417
|
export interface PutShoppingcartCheckoutRequest extends BaseRequest, PutShoppingcartCheckoutPath {}
|
|
392
418
|
|
package/src/interface/user.ts
CHANGED
|
@@ -74,6 +74,11 @@ export interface GuestUserCreate {
|
|
|
74
74
|
realm?: string;
|
|
75
75
|
}
|
|
76
76
|
|
|
77
|
+
export interface GuestUserToken {
|
|
78
|
+
// realm
|
|
79
|
+
realm?: string;
|
|
80
|
+
}
|
|
81
|
+
|
|
77
82
|
export interface Changepassword {
|
|
78
83
|
password?: string;
|
|
79
84
|
new_password?: string;
|
|
@@ -90,6 +95,7 @@ export interface Resetpassword {
|
|
|
90
95
|
|
|
91
96
|
export interface ResetpasswordSuccess {
|
|
92
97
|
code?: number;
|
|
98
|
+
success?: boolean;
|
|
93
99
|
}
|
|
94
100
|
|
|
95
101
|
export interface VerifyEmail {
|
|
@@ -124,6 +130,15 @@ export interface guestAuth {
|
|
|
124
130
|
};
|
|
125
131
|
// user
|
|
126
132
|
user?: string;
|
|
133
|
+
profile?: User;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
export interface guestAuthToken {
|
|
137
|
+
token?: string;
|
|
138
|
+
access?: {
|
|
139
|
+
token?: string;
|
|
140
|
+
expires?: string;
|
|
141
|
+
};
|
|
127
142
|
}
|
|
128
143
|
|
|
129
144
|
export type Permission = string;
|
|
@@ -695,3 +710,13 @@ export type PostUserGuestUserResponse = guestAuth;
|
|
|
695
710
|
export interface PostUserGuestUserRequest extends BaseRequest {
|
|
696
711
|
body: PostUserGuestUserBody;
|
|
697
712
|
}
|
|
713
|
+
|
|
714
|
+
// POST /user/guest/token - Creates a temporary guest token
|
|
715
|
+
|
|
716
|
+
export type PostUserGuestTokenBody = GuestUserToken;
|
|
717
|
+
|
|
718
|
+
export type PostUserGuestTokenResponse = guestAuthToken;
|
|
719
|
+
|
|
720
|
+
export interface PostUserGuestTokenRequest extends BaseRequest {
|
|
721
|
+
body: PostUserGuestTokenBody;
|
|
722
|
+
}
|