@compassdigital/sdk.typescript 4.26.0 → 4.28.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/.vscode/settings.json +5 -0
- package/lib/index.d.ts +63 -37
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +61 -36
- package/lib/index.js.map +1 -1
- package/lib/interface/consumer.d.ts +76 -0
- package/lib/interface/consumer.d.ts.map +1 -0
- package/lib/interface/consumer.js +5 -0
- package/lib/interface/consumer.js.map +1 -0
- package/lib/interface/frictionless.d.ts +107 -107
- package/lib/interface/frictionless.d.ts.map +1 -1
- package/lib/interface/location.d.ts +12 -13
- package/lib/interface/location.d.ts.map +1 -1
- package/lib/interface/mealplan.d.ts +0 -4
- package/lib/interface/mealplan.d.ts.map +1 -1
- package/lib/interface/menu.d.ts +16 -15
- package/lib/interface/menu.d.ts.map +1 -1
- package/lib/interface/order.d.ts +3 -1
- package/lib/interface/order.d.ts.map +1 -1
- package/lib/interface/partner.d.ts +5 -3
- package/lib/interface/partner.d.ts.map +1 -1
- package/lib/interface/promo.d.ts +10 -3
- package/lib/interface/promo.d.ts.map +1 -1
- package/lib/interface/task.d.ts +3 -0
- package/lib/interface/task.d.ts.map +1 -1
- package/lib/interface/user.d.ts +14 -12
- package/lib/interface/user.d.ts.map +1 -1
- package/lib/interface/vendor.d.ts.map +1 -1
- package/manifest.json +5 -1
- package/package.json +3 -3
- package/pipeline.yml +1 -1
- package/src/index.ts +168 -97
- package/src/interface/consumer.ts +105 -0
- package/src/interface/frictionless.ts +200 -158
- package/src/interface/location.ts +18 -16
- package/src/interface/mealplan.ts +1 -9
- package/src/interface/menu.ts +21 -15
- package/src/interface/order.ts +12 -1
- package/src/interface/partner.ts +14 -3
- package/src/interface/promo.ts +10 -3
- package/src/interface/task.ts +4 -0
- package/src/interface/user.ts +20 -14
- package/src/interface/vendor.ts +0 -1
package/src/interface/menu.ts
CHANGED
|
@@ -34,6 +34,7 @@ export interface Menu {
|
|
|
34
34
|
item_desc_edit_enabled?: boolean;
|
|
35
35
|
calories_edit_enabled?: boolean;
|
|
36
36
|
item_label_edit_enabled?: boolean;
|
|
37
|
+
frictionless?: boolean;
|
|
37
38
|
};
|
|
38
39
|
meta?: {
|
|
39
40
|
// User ID
|
|
@@ -73,6 +74,7 @@ export interface Item {
|
|
|
73
74
|
ingredients?: Record<string, any>[];
|
|
74
75
|
amount_off_exclusions?: AmountOffExclusionTypes[];
|
|
75
76
|
nutrition?: {
|
|
77
|
+
//@deprecated
|
|
76
78
|
kcal?: number;
|
|
77
79
|
calories?: Nutrition;
|
|
78
80
|
serving_size?: Nutrition;
|
|
@@ -151,6 +153,7 @@ export interface Item {
|
|
|
151
153
|
unit?: string;
|
|
152
154
|
amount?: number;
|
|
153
155
|
};
|
|
156
|
+
//@deprecated
|
|
154
157
|
is_deleted?: boolean;
|
|
155
158
|
is?: {
|
|
156
159
|
disabled?: boolean;
|
|
@@ -170,7 +173,9 @@ export interface Group {
|
|
|
170
173
|
fr?: string;
|
|
171
174
|
};
|
|
172
175
|
items?: Item[];
|
|
176
|
+
//@deprecated
|
|
173
177
|
is_disabled?: boolean;
|
|
178
|
+
//@deprecated
|
|
174
179
|
name?: string;
|
|
175
180
|
is?: {
|
|
176
181
|
disabled?: boolean;
|
|
@@ -201,6 +206,7 @@ export interface Option {
|
|
|
201
206
|
};
|
|
202
207
|
sku?: number;
|
|
203
208
|
nutrition?: {
|
|
209
|
+
//@deprecated
|
|
204
210
|
kcal?: number;
|
|
205
211
|
calories?: Nutrition;
|
|
206
212
|
};
|
|
@@ -1744,11 +1750,11 @@ export interface DraftModifierEntityDTO {
|
|
|
1744
1750
|
brand_id: string;
|
|
1745
1751
|
menu_works?: MenuWorksDTO;
|
|
1746
1752
|
is_out_of_stock?: boolean;
|
|
1747
|
-
price_for_none
|
|
1748
|
-
price_for_less
|
|
1749
|
-
price_for_more
|
|
1750
|
-
pre_surcharge
|
|
1751
|
-
post_surcharge
|
|
1753
|
+
price_for_none?: number;
|
|
1754
|
+
price_for_less?: number;
|
|
1755
|
+
price_for_more?: number;
|
|
1756
|
+
pre_surcharge?: number;
|
|
1757
|
+
post_surcharge?: number;
|
|
1752
1758
|
applied_diff_snapshot?: Record<string, any>;
|
|
1753
1759
|
version?: number;
|
|
1754
1760
|
brand?: DraftBrandDTO;
|
|
@@ -5968,11 +5974,11 @@ export interface PostMenuV3DraftModifierBody {
|
|
|
5968
5974
|
brand_id: string;
|
|
5969
5975
|
menu_works?: MenuWorksDTO;
|
|
5970
5976
|
is_out_of_stock?: boolean;
|
|
5971
|
-
price_for_none
|
|
5972
|
-
price_for_less
|
|
5973
|
-
price_for_more
|
|
5974
|
-
pre_surcharge
|
|
5975
|
-
post_surcharge
|
|
5977
|
+
price_for_none?: number;
|
|
5978
|
+
price_for_less?: number;
|
|
5979
|
+
price_for_more?: number;
|
|
5980
|
+
pre_surcharge?: number;
|
|
5981
|
+
post_surcharge?: number;
|
|
5976
5982
|
id?: Record<string, any>;
|
|
5977
5983
|
applied_diff_snapshot?: Record<string, any>;
|
|
5978
5984
|
brand?: DraftBrandDTO;
|
|
@@ -6124,11 +6130,11 @@ export type PostMenuV3DraftModifiersBody = {
|
|
|
6124
6130
|
brand_id: string;
|
|
6125
6131
|
menu_works?: MenuWorksDTO;
|
|
6126
6132
|
is_out_of_stock?: boolean;
|
|
6127
|
-
price_for_none
|
|
6128
|
-
price_for_less
|
|
6129
|
-
price_for_more
|
|
6130
|
-
pre_surcharge
|
|
6131
|
-
post_surcharge
|
|
6133
|
+
price_for_none?: number;
|
|
6134
|
+
price_for_less?: number;
|
|
6135
|
+
price_for_more?: number;
|
|
6136
|
+
pre_surcharge?: number;
|
|
6137
|
+
post_surcharge?: number;
|
|
6132
6138
|
id?: Record<string, any>;
|
|
6133
6139
|
applied_diff_snapshot?: Record<string, any>;
|
|
6134
6140
|
brand?: DraftBrandDTO;
|
package/src/interface/order.ts
CHANGED
|
@@ -22,6 +22,7 @@ export interface CreateOrder {
|
|
|
22
22
|
// user
|
|
23
23
|
customer?: string;
|
|
24
24
|
is?: {
|
|
25
|
+
//@deprecated
|
|
25
26
|
accepted?: boolean;
|
|
26
27
|
in_progress?: boolean;
|
|
27
28
|
ready?: boolean;
|
|
@@ -31,7 +32,9 @@ export interface CreateOrder {
|
|
|
31
32
|
source?: "web" | "mobile";
|
|
32
33
|
[index: string]: any;
|
|
33
34
|
};
|
|
35
|
+
//@deprecated
|
|
34
36
|
pickup?: string;
|
|
37
|
+
//@deprecated
|
|
35
38
|
pickup_name?: string;
|
|
36
39
|
requested_date?: string;
|
|
37
40
|
details?: {
|
|
@@ -56,6 +59,7 @@ export interface Issue {
|
|
|
56
59
|
// issue
|
|
57
60
|
id?: string;
|
|
58
61
|
type?: string;
|
|
62
|
+
//@deprecated
|
|
59
63
|
item?: {
|
|
60
64
|
[index: string]: any;
|
|
61
65
|
};
|
|
@@ -108,6 +112,7 @@ export interface Order {
|
|
|
108
112
|
// user
|
|
109
113
|
customer?: string;
|
|
110
114
|
is?: {
|
|
115
|
+
//@deprecated
|
|
111
116
|
accepted?: boolean;
|
|
112
117
|
in_progress?: boolean;
|
|
113
118
|
ready?: boolean;
|
|
@@ -142,8 +147,11 @@ export interface Order {
|
|
|
142
147
|
// For delivery orders - date order was picked up from station for delivery(out_for_delivery)
|
|
143
148
|
pickup?: string;
|
|
144
149
|
};
|
|
150
|
+
//@deprecated
|
|
145
151
|
pickup?: string;
|
|
152
|
+
//@deprecated
|
|
146
153
|
pickup_name?: string;
|
|
154
|
+
//@deprecated
|
|
147
155
|
pickup_id?: string;
|
|
148
156
|
requested_date?: string;
|
|
149
157
|
details?: {
|
|
@@ -287,6 +295,7 @@ export interface MealPlan {
|
|
|
287
295
|
export interface OrderIssue {
|
|
288
296
|
// Type of issue
|
|
289
297
|
type?: string;
|
|
298
|
+
//@deprecated
|
|
290
299
|
item?: {
|
|
291
300
|
[index: string]: any;
|
|
292
301
|
};
|
|
@@ -339,7 +348,9 @@ export interface Orders {
|
|
|
339
348
|
lastKey?: string;
|
|
340
349
|
count?: number;
|
|
341
350
|
// url to query next set of data
|
|
342
|
-
links?:
|
|
351
|
+
links?: {
|
|
352
|
+
next?: string;
|
|
353
|
+
};
|
|
343
354
|
}
|
|
344
355
|
|
|
345
356
|
export interface ItemsWithIssue extends OrderedItem {
|
package/src/interface/partner.ts
CHANGED
|
@@ -277,6 +277,7 @@ export interface LocationGroup {
|
|
|
277
277
|
[index: string]: any;
|
|
278
278
|
};
|
|
279
279
|
style?: Record<string, any>;
|
|
280
|
+
timezone?: string;
|
|
280
281
|
[index: string]: any;
|
|
281
282
|
}
|
|
282
283
|
|
|
@@ -357,7 +358,9 @@ export interface Brand {
|
|
|
357
358
|
};
|
|
358
359
|
timezone?: string;
|
|
359
360
|
description?: string;
|
|
361
|
+
//@deprecated
|
|
360
362
|
latitude?: number;
|
|
363
|
+
//@deprecated
|
|
361
364
|
longitude?: number;
|
|
362
365
|
address?: Address;
|
|
363
366
|
menus?: MenuHours[];
|
|
@@ -413,6 +416,7 @@ export interface Brand {
|
|
|
413
416
|
group?: string;
|
|
414
417
|
// payment
|
|
415
418
|
payment_provider?: string;
|
|
419
|
+
//@deprecated
|
|
416
420
|
location_description?: string;
|
|
417
421
|
// company
|
|
418
422
|
company?: string;
|
|
@@ -611,6 +615,7 @@ export interface Group {
|
|
|
611
615
|
ingredients?: Record<string, any>[];
|
|
612
616
|
amount_off_exclusions?: AmountOffExclusionTypes[];
|
|
613
617
|
nutrition?: {
|
|
618
|
+
//@deprecated
|
|
614
619
|
kcal?: number;
|
|
615
620
|
calories?: Nutrition;
|
|
616
621
|
serving_size?: Nutrition;
|
|
@@ -676,6 +681,7 @@ export interface Group {
|
|
|
676
681
|
};
|
|
677
682
|
sku?: number;
|
|
678
683
|
nutrition?: {
|
|
684
|
+
//@deprecated
|
|
679
685
|
kcal?: number;
|
|
680
686
|
calories?: Nutrition;
|
|
681
687
|
};
|
|
@@ -734,6 +740,8 @@ export interface Group {
|
|
|
734
740
|
sort_number?: number;
|
|
735
741
|
// menu sort order
|
|
736
742
|
menu_sort_number?: number;
|
|
743
|
+
// barcodes of the item
|
|
744
|
+
barcodes?: string[];
|
|
737
745
|
};
|
|
738
746
|
category?: {
|
|
739
747
|
en?: string;
|
|
@@ -748,6 +756,7 @@ export interface Group {
|
|
|
748
756
|
unit?: string;
|
|
749
757
|
amount?: number;
|
|
750
758
|
};
|
|
759
|
+
//@deprecated
|
|
751
760
|
is_deleted?: boolean;
|
|
752
761
|
is?: {
|
|
753
762
|
disabled?: boolean;
|
|
@@ -758,7 +767,9 @@ export interface Group {
|
|
|
758
767
|
featured?: boolean;
|
|
759
768
|
};
|
|
760
769
|
}[];
|
|
770
|
+
//@deprecated
|
|
761
771
|
is_disabled?: boolean;
|
|
772
|
+
//@deprecated
|
|
762
773
|
name?: string;
|
|
763
774
|
is?: {
|
|
764
775
|
disabled?: boolean;
|
|
@@ -804,12 +815,12 @@ export interface Success {
|
|
|
804
815
|
// POST /partner/standardcognition/shoppingcart - Calculates a shoppingcart
|
|
805
816
|
|
|
806
817
|
export interface PostPartnerStandardcognitionShoppingcartBody {
|
|
807
|
-
items
|
|
818
|
+
items: {
|
|
808
819
|
sku?: string;
|
|
809
820
|
quantity?: number;
|
|
810
821
|
}[];
|
|
811
822
|
// brand
|
|
812
|
-
location_brand
|
|
823
|
+
location_brand: string;
|
|
813
824
|
// shoppingcart
|
|
814
825
|
shoppingcart?: string;
|
|
815
826
|
// Meta data from Standard Cognition shoppingcart
|
|
@@ -844,7 +855,7 @@ export interface GetPartnerStandardcognitionStoresQuery {
|
|
|
844
855
|
_query?: string;
|
|
845
856
|
}
|
|
846
857
|
|
|
847
|
-
export type GetPartnerStandardcognitionStoresResponse = CognitionStore;
|
|
858
|
+
export type GetPartnerStandardcognitionStoresResponse = CognitionStore[];
|
|
848
859
|
|
|
849
860
|
export interface GetPartnerStandardcognitionStoresRequest
|
|
850
861
|
extends BaseRequest,
|
package/src/interface/promo.ts
CHANGED
|
@@ -254,12 +254,19 @@ export interface Customer {
|
|
|
254
254
|
name?: string;
|
|
255
255
|
email?: string;
|
|
256
256
|
description?: string;
|
|
257
|
-
address?:
|
|
257
|
+
address?: {
|
|
258
|
+
[index: string]: any;
|
|
259
|
+
};
|
|
258
260
|
phone?: string;
|
|
259
|
-
summary?:
|
|
260
|
-
|
|
261
|
+
summary?: {
|
|
262
|
+
[index: string]: any;
|
|
263
|
+
};
|
|
264
|
+
loyalty?: {
|
|
265
|
+
[index: string]: any;
|
|
266
|
+
};
|
|
261
267
|
metadata?: {
|
|
262
268
|
origin?: string;
|
|
269
|
+
[index: string]: any;
|
|
263
270
|
};
|
|
264
271
|
created_at?: string;
|
|
265
272
|
updated_at?: string;
|
package/src/interface/task.ts
CHANGED
|
@@ -16,6 +16,7 @@ export interface TaskLocation {
|
|
|
16
16
|
action_time: string;
|
|
17
17
|
// optional details
|
|
18
18
|
details?: Record<string, any>;
|
|
19
|
+
[index: string]: any;
|
|
19
20
|
}
|
|
20
21
|
|
|
21
22
|
export interface Error {
|
|
@@ -136,12 +137,14 @@ export interface TaskOrder {
|
|
|
136
137
|
delivery_instructions?: string;
|
|
137
138
|
issue?: OrderIssue;
|
|
138
139
|
past_issues?: OrderIssue[];
|
|
140
|
+
[index: string]: any;
|
|
139
141
|
}
|
|
140
142
|
|
|
141
143
|
export interface OrderIssue {
|
|
142
144
|
// issue
|
|
143
145
|
id?: string;
|
|
144
146
|
type?: string;
|
|
147
|
+
//@deprecated
|
|
145
148
|
item?: {
|
|
146
149
|
[index: string]: any;
|
|
147
150
|
};
|
|
@@ -153,6 +156,7 @@ export interface OrderIssue {
|
|
|
153
156
|
created_at?: string;
|
|
154
157
|
[index: string]: any;
|
|
155
158
|
};
|
|
159
|
+
[index: string]: any;
|
|
156
160
|
}
|
|
157
161
|
|
|
158
162
|
export type TaskStatus =
|
package/src/interface/user.ts
CHANGED
|
@@ -50,7 +50,7 @@ export interface User {
|
|
|
50
50
|
attempts?: number;
|
|
51
51
|
first_attempted?: string;
|
|
52
52
|
};
|
|
53
|
-
|
|
53
|
+
//@deprecated
|
|
54
54
|
phone_verification?: {
|
|
55
55
|
verification_code?: string;
|
|
56
56
|
date_generated?: number;
|
|
@@ -71,7 +71,7 @@ export interface User {
|
|
|
71
71
|
locked_out?: boolean;
|
|
72
72
|
// If the users email is verified
|
|
73
73
|
verified?: boolean;
|
|
74
|
-
|
|
74
|
+
//@deprecated
|
|
75
75
|
phone_verified?: boolean;
|
|
76
76
|
// User deleted status
|
|
77
77
|
deleted?: boolean;
|
|
@@ -130,6 +130,7 @@ export interface success {
|
|
|
130
130
|
}
|
|
131
131
|
|
|
132
132
|
export interface auth {
|
|
133
|
+
//@deprecated
|
|
133
134
|
token?: string;
|
|
134
135
|
access?: {
|
|
135
136
|
token?: string;
|
|
@@ -145,6 +146,7 @@ export interface auth {
|
|
|
145
146
|
}
|
|
146
147
|
|
|
147
148
|
export interface guestAuth {
|
|
149
|
+
//@deprecated
|
|
148
150
|
token?: string;
|
|
149
151
|
access?: {
|
|
150
152
|
token?: string;
|
|
@@ -174,6 +176,7 @@ export interface omsauth {
|
|
|
174
176
|
}
|
|
175
177
|
|
|
176
178
|
export interface guestAuthToken {
|
|
179
|
+
//@deprecated
|
|
177
180
|
token?: string;
|
|
178
181
|
access?: {
|
|
179
182
|
token?: string;
|
|
@@ -184,7 +187,7 @@ export interface guestAuthToken {
|
|
|
184
187
|
export type Permission = string;
|
|
185
188
|
|
|
186
189
|
export interface KDSToken {
|
|
187
|
-
device?:
|
|
190
|
+
device?: KDSDevice;
|
|
188
191
|
access?: {
|
|
189
192
|
token?: string;
|
|
190
193
|
expires?: number;
|
|
@@ -196,15 +199,13 @@ export interface KDSDevices {
|
|
|
196
199
|
}
|
|
197
200
|
|
|
198
201
|
export interface KDSDevice {
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
deleted?: boolean;
|
|
207
|
-
};
|
|
202
|
+
id?: string;
|
|
203
|
+
lat?: string;
|
|
204
|
+
long?: string;
|
|
205
|
+
location_group?: string;
|
|
206
|
+
is?: {
|
|
207
|
+
authorized?: boolean;
|
|
208
|
+
deleted?: boolean;
|
|
208
209
|
};
|
|
209
210
|
}
|
|
210
211
|
|
|
@@ -512,9 +513,14 @@ export interface PatchUserAuthKdsPath {
|
|
|
512
513
|
device_id: string;
|
|
513
514
|
}
|
|
514
515
|
|
|
515
|
-
export
|
|
516
|
+
export interface PatchUserAuthKdsBody {
|
|
517
|
+
// Location group of the device
|
|
518
|
+
location_group?: string;
|
|
519
|
+
}
|
|
516
520
|
|
|
517
|
-
export
|
|
521
|
+
export interface PatchUserAuthKdsResponse {
|
|
522
|
+
device?: KDSDevice;
|
|
523
|
+
}
|
|
518
524
|
|
|
519
525
|
export interface PatchUserAuthKdsRequest extends BaseRequest, PatchUserAuthKdsPath {
|
|
520
526
|
body: PatchUserAuthKdsBody;
|
package/src/interface/vendor.ts
CHANGED