@compassdigital/sdk.typescript 4.5.0 → 4.6.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.js.map +1 -1
- package/lib/index.d.ts +8 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +9 -0
- package/lib/index.js.map +1 -1
- package/lib/interface/ai.d.ts +3 -3
- package/lib/interface/ai.d.ts.map +1 -1
- package/lib/interface/announcement.d.ts +2 -2
- package/lib/interface/announcement.d.ts.map +1 -1
- package/lib/interface/calendar.d.ts +1 -1
- package/lib/interface/calendar.d.ts.map +1 -1
- package/lib/interface/centricos.d.ts +3 -3
- package/lib/interface/centricos.d.ts.map +1 -1
- package/lib/interface/compassconnect.d.ts +1 -1
- package/lib/interface/compassconnect.d.ts.map +1 -1
- package/lib/interface/config.d.ts +75 -15
- package/lib/interface/config.d.ts.map +1 -1
- package/lib/interface/datalake.d.ts +2 -2
- package/lib/interface/datalake.d.ts.map +1 -1
- package/lib/interface/delivery.d.ts +3 -3
- package/lib/interface/delivery.d.ts.map +1 -1
- package/lib/interface/email.d.ts +2 -2
- package/lib/interface/email.d.ts.map +1 -1
- package/lib/interface/file.d.ts +1 -1
- package/lib/interface/file.d.ts.map +1 -1
- package/lib/interface/frictionless.d.ts +1 -1
- package/lib/interface/frictionless.d.ts.map +1 -1
- package/lib/interface/kds.d.ts +1 -1
- package/lib/interface/kds.d.ts.map +1 -1
- package/lib/interface/location.d.ts +10 -10
- package/lib/interface/location.d.ts.map +1 -1
- package/lib/interface/mealplan.d.ts +1 -1
- package/lib/interface/mealplan.d.ts.map +1 -1
- package/lib/interface/menu.d.ts +240 -240
- package/lib/interface/menu.d.ts.map +1 -1
- package/lib/interface/notification.d.ts +2 -2
- package/lib/interface/notification.d.ts.map +1 -1
- package/lib/interface/order.d.ts +3 -3
- package/lib/interface/order.d.ts.map +1 -1
- package/lib/interface/partner.d.ts +16 -16
- package/lib/interface/partner.d.ts.map +1 -1
- package/lib/interface/payment.d.ts +12 -4
- package/lib/interface/payment.d.ts.map +1 -1
- package/lib/interface/promo.d.ts +4 -4
- package/lib/interface/promo.d.ts.map +1 -1
- package/lib/interface/report.d.ts +1 -1
- package/lib/interface/report.d.ts.map +1 -1
- package/lib/interface/shoppingcart.d.ts +7 -7
- package/lib/interface/shoppingcart.d.ts.map +1 -1
- package/lib/interface/task.d.ts +5 -5
- package/lib/interface/task.d.ts.map +1 -1
- package/lib/interface/user.d.ts +4 -4
- package/lib/interface/user.d.ts.map +1 -1
- package/lib/interface/vendor.d.ts +1 -1
- package/lib/interface/vendor.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/index.ts +22 -0
- package/src/interface/ai.ts +3 -3
- package/src/interface/announcement.ts +2 -2
- package/src/interface/calendar.ts +1 -1
- package/src/interface/centricos.ts +3 -3
- package/src/interface/compassconnect.ts +1 -1
- package/src/interface/config.ts +81 -15
- package/src/interface/datalake.ts +2 -2
- package/src/interface/delivery.ts +3 -3
- package/src/interface/email.ts +2 -2
- package/src/interface/file.ts +1 -1
- package/src/interface/frictionless.ts +1 -1
- package/src/interface/kds.ts +1 -1
- package/src/interface/location.ts +10 -10
- package/src/interface/mealplan.ts +1 -1
- package/src/interface/menu.ts +240 -240
- package/src/interface/notification.ts +2 -2
- package/src/interface/order.ts +3 -3
- package/src/interface/partner.ts +16 -16
- package/src/interface/payment.ts +17 -4
- package/src/interface/promo.ts +4 -4
- package/src/interface/report.ts +1 -1
- package/src/interface/shoppingcart.ts +7 -7
- package/src/interface/task.ts +5 -5
- package/src/interface/user.ts +4 -4
- package/src/interface/vendor.ts +1 -1
|
@@ -6,7 +6,7 @@ import { RequestQuery, BaseRequest } from "./util";
|
|
|
6
6
|
export interface Error {
|
|
7
7
|
error?: string;
|
|
8
8
|
code?: number;
|
|
9
|
-
data?: any
|
|
9
|
+
data?: Record<string, any>;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
export interface Notification {
|
|
@@ -33,7 +33,7 @@ export interface PushNotificationBody {
|
|
|
33
33
|
text: string;
|
|
34
34
|
// Recipient of the notifications. Example: specific realm, role or user id
|
|
35
35
|
target: string;
|
|
36
|
-
data?: any
|
|
36
|
+
data?: Record<string, any>;
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
export interface NotificationStatus {
|
package/src/interface/order.ts
CHANGED
|
@@ -49,7 +49,7 @@ export interface CreateOrder {
|
|
|
49
49
|
export interface Error {
|
|
50
50
|
error?: string;
|
|
51
51
|
code?: number;
|
|
52
|
-
data?: any
|
|
52
|
+
data?: Record<string, any>;
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
export interface Issue {
|
|
@@ -326,7 +326,7 @@ export interface OrderedItem {
|
|
|
326
326
|
id?: string;
|
|
327
327
|
// index
|
|
328
328
|
_index?: string;
|
|
329
|
-
meta?: any
|
|
329
|
+
meta?: Record<string, any>;
|
|
330
330
|
}[];
|
|
331
331
|
}[];
|
|
332
332
|
[index: string]: any;
|
|
@@ -337,7 +337,7 @@ export interface Orders {
|
|
|
337
337
|
lastKey?: string;
|
|
338
338
|
count?: number;
|
|
339
339
|
// url to query next set of data
|
|
340
|
-
links?: any
|
|
340
|
+
links?: Record<string, any>;
|
|
341
341
|
}
|
|
342
342
|
|
|
343
343
|
export interface ItemsWithIssue extends OrderedItem {
|
package/src/interface/partner.ts
CHANGED
|
@@ -6,7 +6,7 @@ import { RequestQuery, BaseRequest } from "./util";
|
|
|
6
6
|
export interface Error {
|
|
7
7
|
message?: string;
|
|
8
8
|
code?: number;
|
|
9
|
-
data?: any
|
|
9
|
+
data?: Record<string, any>;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
export interface ShoppingCartResponse {
|
|
@@ -18,7 +18,7 @@ export interface ShoppingCartResponse {
|
|
|
18
18
|
menu?: string;
|
|
19
19
|
// brand
|
|
20
20
|
brand?: string;
|
|
21
|
-
date?: any
|
|
21
|
+
date?: Record<string, any>;
|
|
22
22
|
items?: ItemResponse[];
|
|
23
23
|
sub_total?: {
|
|
24
24
|
amount?: MonetaryValue;
|
|
@@ -29,7 +29,7 @@ export interface ShoppingCartResponse {
|
|
|
29
29
|
percent_off?: MonetaryValue;
|
|
30
30
|
amount?: MonetaryValue;
|
|
31
31
|
app?: string;
|
|
32
|
-
discount?: any
|
|
32
|
+
discount?: Record<string, any>;
|
|
33
33
|
};
|
|
34
34
|
//@deprecated
|
|
35
35
|
loyalty?: {
|
|
@@ -47,7 +47,7 @@ export interface ShoppingCartResponse {
|
|
|
47
47
|
amount_off?: MonetaryValue;
|
|
48
48
|
percent_off?: MonetaryValue;
|
|
49
49
|
amount?: MonetaryValue;
|
|
50
|
-
discount?: any
|
|
50
|
+
discount?: Record<string, any>;
|
|
51
51
|
};
|
|
52
52
|
payment_method?: {
|
|
53
53
|
// Mealplan payment details
|
|
@@ -117,7 +117,7 @@ export interface ShoppingCartResponse {
|
|
|
117
117
|
};
|
|
118
118
|
meta?: {
|
|
119
119
|
// Raw request from any vendor integrated with CDL
|
|
120
|
-
vendor?: any
|
|
120
|
+
vendor?: Record<string, any>;
|
|
121
121
|
[index: string]: any;
|
|
122
122
|
};
|
|
123
123
|
}
|
|
@@ -190,7 +190,7 @@ export interface ItemResponse {
|
|
|
190
190
|
};
|
|
191
191
|
}[];
|
|
192
192
|
// Details about discount like BOGO, LTO, Bundle etc.
|
|
193
|
-
item_discount?: any
|
|
193
|
+
item_discount?: Record<string, any>;
|
|
194
194
|
// user specified instructions for the item
|
|
195
195
|
special_instructions?: string;
|
|
196
196
|
amount_off_exclusions?: ("discount" | "promo")[];
|
|
@@ -251,7 +251,7 @@ export interface LocationGroup {
|
|
|
251
251
|
meta?: {
|
|
252
252
|
[index: string]: any;
|
|
253
253
|
};
|
|
254
|
-
style?: any
|
|
254
|
+
style?: Record<string, any>;
|
|
255
255
|
[index: string]: any;
|
|
256
256
|
}
|
|
257
257
|
|
|
@@ -309,8 +309,8 @@ export interface Location {
|
|
|
309
309
|
en?: string;
|
|
310
310
|
fr?: string;
|
|
311
311
|
};
|
|
312
|
-
hours?: any
|
|
313
|
-
deliveryHours?: any
|
|
312
|
+
hours?: Record<string, any>;
|
|
313
|
+
deliveryHours?: Record<string, any>;
|
|
314
314
|
service_fee?: {
|
|
315
315
|
type?: string;
|
|
316
316
|
value?: number;
|
|
@@ -342,10 +342,10 @@ export interface Brand {
|
|
|
342
342
|
};
|
|
343
343
|
hours?: Hours[];
|
|
344
344
|
deliveryHours?: DeliveryHours[];
|
|
345
|
-
style?: any
|
|
345
|
+
style?: Record<string, any>;
|
|
346
346
|
// pos
|
|
347
347
|
pos?: string;
|
|
348
|
-
terminals?: any[];
|
|
348
|
+
terminals?: Record<string, any>[];
|
|
349
349
|
timeslots?: {
|
|
350
350
|
time?: string;
|
|
351
351
|
averagePrepTime?: string;
|
|
@@ -390,8 +390,8 @@ export interface Brand {
|
|
|
390
390
|
// company
|
|
391
391
|
company?: string;
|
|
392
392
|
config?: {
|
|
393
|
-
private?: any
|
|
394
|
-
public?: any
|
|
393
|
+
private?: Record<string, any>;
|
|
394
|
+
public?: Record<string, any>;
|
|
395
395
|
};
|
|
396
396
|
tax_rate?: number;
|
|
397
397
|
meta?: {
|
|
@@ -581,7 +581,7 @@ export interface Group {
|
|
|
581
581
|
};
|
|
582
582
|
// The number of units that belong to this item. For example, a dozen doughnuts should have a unit value of 12
|
|
583
583
|
unit?: number;
|
|
584
|
-
ingredients?: any[];
|
|
584
|
+
ingredients?: Record<string, any>[];
|
|
585
585
|
amount_off_exclusions?: AmountOffExclusionTypes[];
|
|
586
586
|
nutrition?: {
|
|
587
587
|
kcal?: number;
|
|
@@ -786,7 +786,7 @@ export interface PostPartnerStandardcognitionShoppingcartBody {
|
|
|
786
786
|
// shoppingcart
|
|
787
787
|
shoppingcart?: string;
|
|
788
788
|
// Meta data from Standard Cognition shoppingcart
|
|
789
|
-
meta?: any
|
|
789
|
+
meta?: Record<string, any>;
|
|
790
790
|
}
|
|
791
791
|
|
|
792
792
|
export type PostPartnerStandardcognitionShoppingcartResponse = ShoppingCartResponse;
|
|
@@ -849,7 +849,7 @@ export interface PostPartnerEventPath {
|
|
|
849
849
|
id: string;
|
|
850
850
|
}
|
|
851
851
|
|
|
852
|
-
export type PostPartnerEventBody = any
|
|
852
|
+
export type PostPartnerEventBody = Record<string, any>;
|
|
853
853
|
|
|
854
854
|
export type PostPartnerEventResponse = Success;
|
|
855
855
|
|
package/src/interface/payment.ts
CHANGED
|
@@ -149,7 +149,7 @@ export interface Success {
|
|
|
149
149
|
export interface Error {
|
|
150
150
|
error?: string;
|
|
151
151
|
code?: number;
|
|
152
|
-
data?: any
|
|
152
|
+
data?: Record<string, any>;
|
|
153
153
|
}
|
|
154
154
|
|
|
155
155
|
export interface CashlessTender {
|
|
@@ -374,7 +374,7 @@ export interface PostPaymentTokenBody {
|
|
|
374
374
|
// Name on credit card
|
|
375
375
|
nameOnCard: string;
|
|
376
376
|
// CDL Site Id
|
|
377
|
-
siteId: any[];
|
|
377
|
+
siteId: Record<string, any>[];
|
|
378
378
|
}
|
|
379
379
|
|
|
380
380
|
export type PostPaymentTokenResponse = PaymentCard;
|
|
@@ -388,7 +388,7 @@ export interface PostPaymentTokenRequest extends BaseRequest {
|
|
|
388
388
|
export interface PutPaymentTokenBody {
|
|
389
389
|
updatedTokenInfo: UpdateTokenInformation;
|
|
390
390
|
// CDL Site Id
|
|
391
|
-
siteId: any[];
|
|
391
|
+
siteId: Record<string, any>[];
|
|
392
392
|
}
|
|
393
393
|
|
|
394
394
|
export type PutPaymentTokenResponse = PaymentCard;
|
|
@@ -403,7 +403,7 @@ export interface DeletePaymentTokenBody {
|
|
|
403
403
|
// Token string to be deleted
|
|
404
404
|
token: string;
|
|
405
405
|
// CDL Site Id
|
|
406
|
-
siteId: any[];
|
|
406
|
+
siteId: Record<string, any>[];
|
|
407
407
|
}
|
|
408
408
|
|
|
409
409
|
export type DeletePaymentTokenResponse = Success;
|
|
@@ -502,3 +502,16 @@ export interface DeletePaymentCashlessResponse {
|
|
|
502
502
|
export interface DeletePaymentCashlessRequest extends BaseRequest, DeletePaymentCashlessPath {
|
|
503
503
|
body: DeletePaymentCashlessBody;
|
|
504
504
|
}
|
|
505
|
+
|
|
506
|
+
// POST /payment/configvalidate
|
|
507
|
+
|
|
508
|
+
export interface PostPaymentConfigvalidateBody {
|
|
509
|
+
store_id: string;
|
|
510
|
+
terminal_id: string;
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
export type PostPaymentConfigvalidateResponse = Success;
|
|
514
|
+
|
|
515
|
+
export interface PostPaymentConfigvalidateRequest extends BaseRequest {
|
|
516
|
+
body: PostPaymentConfigvalidateBody;
|
|
517
|
+
}
|
package/src/interface/promo.ts
CHANGED
|
@@ -6,7 +6,7 @@ import { RequestQuery, BaseRequest } from "./util";
|
|
|
6
6
|
export interface Error {
|
|
7
7
|
message?: string;
|
|
8
8
|
code?: number;
|
|
9
|
-
data?: any
|
|
9
|
+
data?: Record<string, any>;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
export interface PromotionBody {
|
|
@@ -254,10 +254,10 @@ export interface Customer {
|
|
|
254
254
|
name?: string;
|
|
255
255
|
email?: string;
|
|
256
256
|
description?: string;
|
|
257
|
-
address?: any
|
|
257
|
+
address?: Record<string, any>;
|
|
258
258
|
phone?: string;
|
|
259
|
-
summary?: any
|
|
260
|
-
loyalty?: any
|
|
259
|
+
summary?: Record<string, any>;
|
|
260
|
+
loyalty?: Record<string, any>;
|
|
261
261
|
metadata?: {
|
|
262
262
|
origin?: string;
|
|
263
263
|
};
|
package/src/interface/report.ts
CHANGED
|
@@ -6,7 +6,7 @@ import { RequestQuery, BaseRequest } from "./util";
|
|
|
6
6
|
export interface Error {
|
|
7
7
|
message?: string;
|
|
8
8
|
code?: number;
|
|
9
|
-
data?: any
|
|
9
|
+
data?: Record<string, any>;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
export interface ItemsRequest {
|
|
@@ -69,7 +69,7 @@ export interface ItemResponse {
|
|
|
69
69
|
};
|
|
70
70
|
options?: ModifierGroupResponse[];
|
|
71
71
|
// Details about discount like BOGO, LTO, Bundle etc.
|
|
72
|
-
item_discount?: any
|
|
72
|
+
item_discount?: Record<string, any>;
|
|
73
73
|
// user specified instructions for the item
|
|
74
74
|
special_instructions?: string;
|
|
75
75
|
amount_off_exclusions?: AmountOffExclusion[];
|
|
@@ -239,7 +239,7 @@ export interface ShoppingCartRequest {
|
|
|
239
239
|
};
|
|
240
240
|
meta?: {
|
|
241
241
|
// Raw request from any vendor integrated with CDL
|
|
242
|
-
vendor?: any
|
|
242
|
+
vendor?: Record<string, any>;
|
|
243
243
|
[index: string]: any;
|
|
244
244
|
};
|
|
245
245
|
}
|
|
@@ -253,7 +253,7 @@ export interface ShoppingCartResponse {
|
|
|
253
253
|
menu?: string;
|
|
254
254
|
// brand
|
|
255
255
|
brand?: string;
|
|
256
|
-
date?: any
|
|
256
|
+
date?: Record<string, any>;
|
|
257
257
|
items?: ItemResponse[];
|
|
258
258
|
sub_total?: {
|
|
259
259
|
amount?: MonetaryValue;
|
|
@@ -265,7 +265,7 @@ export interface ShoppingCartResponse {
|
|
|
265
265
|
percent_off?: MonetaryValue;
|
|
266
266
|
amount?: MonetaryValue;
|
|
267
267
|
app?: string;
|
|
268
|
-
discount?: any
|
|
268
|
+
discount?: Record<string, any>;
|
|
269
269
|
provider_data?: FPValidationData;
|
|
270
270
|
};
|
|
271
271
|
//@deprecated
|
|
@@ -285,7 +285,7 @@ export interface ShoppingCartResponse {
|
|
|
285
285
|
amount_off?: MonetaryValue;
|
|
286
286
|
percent_off?: MonetaryValue;
|
|
287
287
|
amount?: MonetaryValue;
|
|
288
|
-
discount?: any
|
|
288
|
+
discount?: Record<string, any>;
|
|
289
289
|
provider_data?: FPValidationData;
|
|
290
290
|
};
|
|
291
291
|
payment_method?: {
|
|
@@ -329,7 +329,7 @@ export interface ShoppingCartResponse {
|
|
|
329
329
|
};
|
|
330
330
|
meta?: {
|
|
331
331
|
// Raw request from any vendor integrated with CDL
|
|
332
|
-
vendor?: any
|
|
332
|
+
vendor?: Record<string, any>;
|
|
333
333
|
[index: string]: any;
|
|
334
334
|
};
|
|
335
335
|
}
|
package/src/interface/task.ts
CHANGED
|
@@ -15,13 +15,13 @@ export interface TaskLocation {
|
|
|
15
15
|
// Pickup or Dropoff time
|
|
16
16
|
action_time: string;
|
|
17
17
|
// optional details
|
|
18
|
-
details?: any
|
|
18
|
+
details?: Record<string, any>;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
export interface Error {
|
|
22
22
|
code?: number;
|
|
23
23
|
message?: string;
|
|
24
|
-
data?: any
|
|
24
|
+
data?: Record<string, any>;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
export interface Task {
|
|
@@ -138,8 +138,8 @@ export interface ActionResponse {
|
|
|
138
138
|
export interface TaskOrder {
|
|
139
139
|
order_id?: string;
|
|
140
140
|
customer_id?: string;
|
|
141
|
-
customer?: any
|
|
142
|
-
order_details?: any
|
|
141
|
+
customer?: Record<string, any>;
|
|
142
|
+
order_details?: Record<string, any>;
|
|
143
143
|
delivery_instructions?: string;
|
|
144
144
|
issue?: OrderIssue;
|
|
145
145
|
past_issues?: OrderIssue[];
|
|
@@ -153,7 +153,7 @@ export interface OrderIssue {
|
|
|
153
153
|
[index: string]: any;
|
|
154
154
|
};
|
|
155
155
|
// Array of Items with issues
|
|
156
|
-
items?: any[];
|
|
156
|
+
items?: Record<string, any>[];
|
|
157
157
|
// Optional additional explanation for issue: 5,10,15 for late issues, SOLD_OUT, MODIFICATION, DIETARY_RESTRICTION for see kitchen issues
|
|
158
158
|
reason?: string;
|
|
159
159
|
meta?: {
|
package/src/interface/user.ts
CHANGED
|
@@ -6,7 +6,7 @@ import { RequestQuery, BaseRequest } from "./util";
|
|
|
6
6
|
export interface Error {
|
|
7
7
|
message?: string;
|
|
8
8
|
code?: number;
|
|
9
|
-
data?: any
|
|
9
|
+
data?: Record<string, any>;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
export interface User {
|
|
@@ -184,7 +184,7 @@ export interface guestAuthToken {
|
|
|
184
184
|
export type Permission = string;
|
|
185
185
|
|
|
186
186
|
export interface KDSToken {
|
|
187
|
-
device?: any
|
|
187
|
+
device?: Record<string, any>;
|
|
188
188
|
access?: {
|
|
189
189
|
token?: string;
|
|
190
190
|
expires?: number;
|
|
@@ -512,7 +512,7 @@ export interface PatchUserAuthKdsPath {
|
|
|
512
512
|
device_id: string;
|
|
513
513
|
}
|
|
514
514
|
|
|
515
|
-
export type PatchUserAuthKdsBody = any
|
|
515
|
+
export type PatchUserAuthKdsBody = Record<string, any>;
|
|
516
516
|
|
|
517
517
|
export type PatchUserAuthKdsResponse = KDSDevice;
|
|
518
518
|
|
|
@@ -549,7 +549,7 @@ export interface PostUserAddSecretPath {
|
|
|
549
549
|
key: string;
|
|
550
550
|
}
|
|
551
551
|
|
|
552
|
-
export type PostUserAddSecretBody = any
|
|
552
|
+
export type PostUserAddSecretBody = Record<string, any>;
|
|
553
553
|
|
|
554
554
|
export type PostUserAddSecretResponse = Key;
|
|
555
555
|
|