@compassdigital/sdk.typescript 3.77.1 → 4.1.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 +13 -6
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +11 -2
- package/lib/index.js.map +1 -1
- package/lib/interface/calendar.d.ts +1 -1
- package/lib/interface/delivery.d.ts +2 -2
- package/lib/interface/delivery.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 +3 -3
- package/lib/interface/frictionless.d.ts.map +1 -1
- package/lib/interface/location.d.ts +15 -6
- package/lib/interface/location.d.ts.map +1 -1
- package/lib/interface/location.js +12 -0
- package/lib/interface/location.js.map +1 -1
- package/lib/interface/mealplan.d.ts +6 -5
- package/lib/interface/mealplan.d.ts.map +1 -1
- package/lib/interface/menu.d.ts +498 -406
- package/lib/interface/menu.d.ts.map +1 -1
- package/lib/interface/menu.js +6 -0
- package/lib/interface/menu.js.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 +8 -6
- package/lib/interface/order.d.ts.map +1 -1
- package/lib/interface/partner.d.ts +11 -6
- package/lib/interface/partner.d.ts.map +1 -1
- package/lib/interface/partner.js +6 -0
- package/lib/interface/partner.js.map +1 -1
- package/lib/interface/payment.d.ts +23 -18
- package/lib/interface/payment.d.ts.map +1 -1
- package/lib/interface/promo.d.ts +13 -6
- package/lib/interface/promo.d.ts.map +1 -1
- package/lib/interface/promo.js +8 -0
- package/lib/interface/promo.js.map +1 -1
- package/lib/interface/report.d.ts +8 -8
- package/lib/interface/report.d.ts.map +1 -1
- package/lib/interface/shoppingcart.d.ts +14 -9
- package/lib/interface/shoppingcart.d.ts.map +1 -1
- package/lib/interface/shoppingcart.js +5 -0
- package/lib/interface/shoppingcart.js.map +1 -1
- package/lib/interface/task.d.ts +14 -14
- package/lib/interface/task.d.ts.map +1 -1
- package/lib/interface/user.d.ts +16 -21
- package/lib/interface/user.d.ts.map +1 -1
- package/lib/interface/vendor.d.ts +5 -5
- package/lib/interface/vendor.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/index.ts +26 -5
- package/src/interface/announcement.ts +1 -1
- package/src/interface/calendar.ts +1 -1
- package/src/interface/delivery.ts +15 -2
- package/src/interface/file.ts +1 -1
- package/src/interface/frictionless.ts +3 -3
- package/src/interface/location.ts +16 -8
- package/src/interface/mealplan.ts +8 -6
- package/src/interface/menu.ts +511 -415
- package/src/interface/notification.ts +2 -2
- package/src/interface/order.ts +27 -12
- package/src/interface/partner.ts +10 -6
- package/src/interface/payment.ts +26 -18
- package/src/interface/promo.ts +12 -6
- package/src/interface/report.ts +8 -8
- package/src/interface/shoppingcart.ts +14 -9
- package/src/interface/task.ts +26 -14
- package/src/interface/user.ts +21 -27
- package/src/interface/vendor.ts +5 -5
|
@@ -22,7 +22,7 @@ export interface Notification {
|
|
|
22
22
|
export interface NotificationBody {
|
|
23
23
|
title?: string;
|
|
24
24
|
text: string;
|
|
25
|
-
realm:
|
|
25
|
+
realm: "cdl" | "boost" | "thrive" | "nourish" | "rogers" | "jjkitchen";
|
|
26
26
|
// Recipient of the notifications. Example: specific realm, role or user id
|
|
27
27
|
target: string;
|
|
28
28
|
release_date?: string;
|
|
@@ -49,7 +49,7 @@ export interface Success {
|
|
|
49
49
|
|
|
50
50
|
export interface GetNotificationsQuery {
|
|
51
51
|
// Realm of notifications
|
|
52
|
-
realm:
|
|
52
|
+
realm: "cdl" | "boost" | "thrive" | "nourish" | "rogers" | "jjkitchen";
|
|
53
53
|
// Recipient of the notifications. Can be the whole realm, role or user id
|
|
54
54
|
target: string;
|
|
55
55
|
// Start date of the notifications. If not provided will default to 90 days ago.
|
package/src/interface/order.ts
CHANGED
|
@@ -24,7 +24,7 @@ export interface CreateOrder {
|
|
|
24
24
|
};
|
|
25
25
|
meta?: {
|
|
26
26
|
// which ui the order was placed on
|
|
27
|
-
source?:
|
|
27
|
+
source?: "web" | "mobile";
|
|
28
28
|
[index: string]: any;
|
|
29
29
|
};
|
|
30
30
|
pickup?: string;
|
|
@@ -158,7 +158,7 @@ export interface Order {
|
|
|
158
158
|
checkin_uuid?: string;
|
|
159
159
|
refunds?: RefundTransaction[];
|
|
160
160
|
// which ui the order was placed on
|
|
161
|
-
source?:
|
|
161
|
+
source?: "web" | "mobile";
|
|
162
162
|
// details pertaining to the amount charged on the order
|
|
163
163
|
transaction?: {
|
|
164
164
|
// used in mx orders - cart totals in dollars and meal exchange value (meals)
|
|
@@ -203,7 +203,18 @@ export interface Order {
|
|
|
203
203
|
past_issues?: Issue[];
|
|
204
204
|
// Delivery user
|
|
205
205
|
runner?: string;
|
|
206
|
-
reorder_eligibility?:
|
|
206
|
+
reorder_eligibility?:
|
|
207
|
+
| "eligible"
|
|
208
|
+
| "order_type_ineligible"
|
|
209
|
+
| "location_ineligible"
|
|
210
|
+
| "active_order"
|
|
211
|
+
| "old_order"
|
|
212
|
+
| "marketplace_order"
|
|
213
|
+
| "duplicate_order"
|
|
214
|
+
| "brand_unavailable"
|
|
215
|
+
| "menu_unavailable"
|
|
216
|
+
| "items_unavailable"
|
|
217
|
+
| "modifiers_unavailable";
|
|
207
218
|
[index: string]: any;
|
|
208
219
|
}
|
|
209
220
|
|
|
@@ -445,9 +456,9 @@ export interface GetOrderCustomerOrdersPath {
|
|
|
445
456
|
export interface GetOrderCustomerOrdersQuery {
|
|
446
457
|
// Sort the customers order by order created date, pickup date or requested date. Possible values: created, pickup. Default is created.
|
|
447
458
|
sort?: string;
|
|
448
|
-
|
|
459
|
+
//@deprecated
|
|
449
460
|
pickup_start?: number;
|
|
450
|
-
|
|
461
|
+
//@deprecated
|
|
451
462
|
pickup_end?: number;
|
|
452
463
|
// Filter orders by their requested date. Only return orders that have a date less than or equal to the date. Default is 24 hours from the current time in milliseconds.
|
|
453
464
|
end?: number;
|
|
@@ -455,6 +466,10 @@ export interface GetOrderCustomerOrdersQuery {
|
|
|
455
466
|
start?: number;
|
|
456
467
|
// This is the key for which the query will be made. E.g if order_type equals 'delivery', the response will include the results based on delivery
|
|
457
468
|
order_type?: string;
|
|
469
|
+
// Filter orders by active status.
|
|
470
|
+
active?: boolean;
|
|
471
|
+
// Filter orders by eligible for reorder.
|
|
472
|
+
reorder_eligible?: boolean;
|
|
458
473
|
// Graphql query string
|
|
459
474
|
_query?: string;
|
|
460
475
|
}
|
|
@@ -497,9 +512,9 @@ export interface GetOrderLocationBrandPath {
|
|
|
497
512
|
}
|
|
498
513
|
|
|
499
514
|
export interface GetOrderLocationBrandQuery {
|
|
500
|
-
|
|
515
|
+
//@deprecated
|
|
501
516
|
pickup_start?: number;
|
|
502
|
-
|
|
517
|
+
//@deprecated
|
|
503
518
|
pickup_end?: number;
|
|
504
519
|
// Filter orders to just those with this ready state
|
|
505
520
|
ready?: boolean;
|
|
@@ -532,9 +547,9 @@ export interface GetOrderLocationOrdersPath {
|
|
|
532
547
|
}
|
|
533
548
|
|
|
534
549
|
export interface GetOrderLocationOrdersQuery {
|
|
535
|
-
|
|
550
|
+
//@deprecated
|
|
536
551
|
pickup_start?: number;
|
|
537
|
-
|
|
552
|
+
//@deprecated
|
|
538
553
|
pickup_end?: number;
|
|
539
554
|
// Filter orders to just those with this ready state
|
|
540
555
|
ready?: boolean;
|
|
@@ -566,13 +581,13 @@ export interface GetOrderGroupOrdersPath {
|
|
|
566
581
|
|
|
567
582
|
export interface GetOrderGroupOrdersQuery {
|
|
568
583
|
// Filter orders by their status.
|
|
569
|
-
status?:
|
|
584
|
+
status?: "accepted" | "in_progress" | "ready" | "out_for_delivery" | "delivered";
|
|
570
585
|
// Filter orders by their requested date. Only return orders that have a date greater than or equal to the date. Default is all orders
|
|
571
586
|
start?: number;
|
|
572
587
|
// Filter orders by their requested date. Only return orders that have a date less than or equal to the date. Default is the current time in milliseconds.
|
|
573
588
|
end?: number;
|
|
574
589
|
// Filter orders by their order type
|
|
575
|
-
order_type?:
|
|
590
|
+
order_type?: "delivery" | "pickup";
|
|
576
591
|
// Filter orders by brand ID. Only return orders that involve brand ID, either as the only brand, or as part of a market place order.
|
|
577
592
|
brand?: string;
|
|
578
593
|
// show additional hidden properties/entities
|
|
@@ -599,7 +614,7 @@ export interface GetOrderUserOrdersPath {
|
|
|
599
614
|
|
|
600
615
|
export interface GetOrderUserOrdersQuery {
|
|
601
616
|
// Filter orders by their status.
|
|
602
|
-
status?:
|
|
617
|
+
status?: "accepted" | "in_progress" | "ready" | "out_for_delivery" | "delivered";
|
|
603
618
|
// Filter orders by their requested date. Only return orders that have a date greater than or equal to the date. Default is all orders
|
|
604
619
|
start?: number;
|
|
605
620
|
// Filter orders by their requested date. Only return orders that have a date less than or equal to the date. Default is the current time in milliseconds.
|
package/src/interface/partner.ts
CHANGED
|
@@ -107,7 +107,7 @@ export interface ShoppingCartResponse {
|
|
|
107
107
|
};
|
|
108
108
|
is?: {
|
|
109
109
|
// Shoppingcart Type: delivery, pickup
|
|
110
|
-
type?:
|
|
110
|
+
type?: "delivery" | "pickup" | "scan_and_go" | "frictionless";
|
|
111
111
|
// If an order should be paid with meal exchange. If true, this will calculate meals total.
|
|
112
112
|
mx_cart?: boolean;
|
|
113
113
|
// If a user's email or email domain is a match in a sites list of tax exempt emails or domains
|
|
@@ -180,7 +180,7 @@ export interface ItemResponse {
|
|
|
180
180
|
original_label?: Label;
|
|
181
181
|
taxes?: string[];
|
|
182
182
|
};
|
|
183
|
-
amount_off_exclusions?:
|
|
183
|
+
amount_off_exclusions?: "promo"[];
|
|
184
184
|
is?: {
|
|
185
185
|
disabled?: boolean;
|
|
186
186
|
};
|
|
@@ -193,7 +193,7 @@ export interface ItemResponse {
|
|
|
193
193
|
item_discount?: any;
|
|
194
194
|
// user specified instructions for the item
|
|
195
195
|
special_instructions?: string;
|
|
196
|
-
amount_off_exclusions?:
|
|
196
|
+
amount_off_exclusions?: ("discount" | "promo")[];
|
|
197
197
|
added_on?: string;
|
|
198
198
|
meal_value?: IntegerValue;
|
|
199
199
|
category?: Label;
|
|
@@ -420,7 +420,7 @@ export interface Brand {
|
|
|
420
420
|
business_number?: number;
|
|
421
421
|
website?: string;
|
|
422
422
|
cuisine_types?: string[];
|
|
423
|
-
status?:
|
|
423
|
+
status?: "await_partner" | "await_scout" | "completed";
|
|
424
424
|
active?: boolean;
|
|
425
425
|
max_showcase_items?: number;
|
|
426
426
|
jde_category?: string;
|
|
@@ -475,7 +475,7 @@ export interface MenuHours {
|
|
|
475
475
|
is_delivery?: boolean;
|
|
476
476
|
is_frictionless?: boolean;
|
|
477
477
|
// Identifies a brand or menu state, i.e open, closed or accepting preorders
|
|
478
|
-
state?:
|
|
478
|
+
state?: "open" | "closed" | "preorder";
|
|
479
479
|
}
|
|
480
480
|
|
|
481
481
|
export interface Hours {
|
|
@@ -751,7 +751,11 @@ export interface Nutrition {
|
|
|
751
751
|
unit?: string;
|
|
752
752
|
}
|
|
753
753
|
|
|
754
|
-
|
|
754
|
+
enum AmountOffExclusionTypes {
|
|
755
|
+
LOYALTY = "loyalty",
|
|
756
|
+
DISCOUNT = "discount",
|
|
757
|
+
PROMO = "promo",
|
|
758
|
+
}
|
|
755
759
|
|
|
756
760
|
export interface CognitionStore {
|
|
757
761
|
// UUID for external store
|
package/src/interface/payment.ts
CHANGED
|
@@ -13,10 +13,7 @@ export interface Transaction {
|
|
|
13
13
|
reasonCode?: number;
|
|
14
14
|
decision?: string;
|
|
15
15
|
status?: string;
|
|
16
|
-
creditCard?:
|
|
17
|
-
cardType?: string;
|
|
18
|
-
last4?: string;
|
|
19
|
-
};
|
|
16
|
+
creditCard?: CreditCard;
|
|
20
17
|
digital_wallet_pay?: DigitalWalletPay;
|
|
21
18
|
requestID?: string;
|
|
22
19
|
[index: string]: any;
|
|
@@ -30,6 +27,7 @@ export interface Refund {
|
|
|
30
27
|
refund_amount?: number;
|
|
31
28
|
// remaining amount available for refund
|
|
32
29
|
transaction_remainder_amount?: number;
|
|
30
|
+
decision?: string;
|
|
33
31
|
[index: string]: any;
|
|
34
32
|
}
|
|
35
33
|
|
|
@@ -87,6 +85,7 @@ export interface TokenInformation {
|
|
|
87
85
|
tokenExpiration?: string;
|
|
88
86
|
posData?: string;
|
|
89
87
|
newToken?: string;
|
|
88
|
+
sessionKey?: string;
|
|
90
89
|
[index: string]: any;
|
|
91
90
|
}
|
|
92
91
|
|
|
@@ -137,7 +136,7 @@ export interface Options {
|
|
|
137
136
|
pickup_id?: string;
|
|
138
137
|
// user_id
|
|
139
138
|
user_id?: string;
|
|
140
|
-
payment_type?:
|
|
139
|
+
payment_type?: "credit_card" | "badge_pay" | "stipend" | "voucher" | "coupon_voucher";
|
|
141
140
|
// ID('payment', '<provider>', 'tender', <timestamp via Data.now()>
|
|
142
141
|
tender?: string;
|
|
143
142
|
digital_wallet_pay?: DigitalWalletPay;
|
|
@@ -160,7 +159,7 @@ export interface CashlessTender {
|
|
|
160
159
|
// name associated with badgepay tender, stored in site public config
|
|
161
160
|
name?: string;
|
|
162
161
|
// account type associated with badgepay tender, stored in site public config
|
|
163
|
-
type?:
|
|
162
|
+
type?: "badge_pay" | "stipend" | "voucher" | "coupon_voucher";
|
|
164
163
|
}
|
|
165
164
|
|
|
166
165
|
export type BadgePayTender = CashlessTender;
|
|
@@ -170,6 +169,21 @@ export interface DigitalWalletPay {
|
|
|
170
169
|
total?: number;
|
|
171
170
|
}
|
|
172
171
|
|
|
172
|
+
export interface CreditCard {
|
|
173
|
+
cardType?: string;
|
|
174
|
+
last4?: string;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
export interface PaymentCards {
|
|
178
|
+
data?: PaymentCard[];
|
|
179
|
+
recordsTotal?: number;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
export interface HpcIframe {
|
|
183
|
+
iframe?: string;
|
|
184
|
+
sessionKey?: string;
|
|
185
|
+
}
|
|
186
|
+
|
|
173
187
|
// POST /payment/{id}/transaction
|
|
174
188
|
|
|
175
189
|
export interface PostPaymentTransactionPath {
|
|
@@ -188,8 +202,8 @@ export interface PostPaymentTransactionBody {
|
|
|
188
202
|
digital_wallet_token?: string;
|
|
189
203
|
account_number?: string;
|
|
190
204
|
cv_number?: string;
|
|
191
|
-
expiration_month?:
|
|
192
|
-
expiration_year?:
|
|
205
|
+
expiration_month?: number;
|
|
206
|
+
expiration_year?: number;
|
|
193
207
|
cart_items?: {
|
|
194
208
|
id?: string;
|
|
195
209
|
label?: {
|
|
@@ -342,7 +356,7 @@ export interface GetPaymentTokenQuery {
|
|
|
342
356
|
// Session key
|
|
343
357
|
sessionKey: string;
|
|
344
358
|
// CDL Site Id
|
|
345
|
-
siteId:
|
|
359
|
+
siteId: string;
|
|
346
360
|
// name on card
|
|
347
361
|
nameOnCard: string;
|
|
348
362
|
// Graphql query string
|
|
@@ -402,15 +416,12 @@ export interface DeletePaymentTokenRequest extends BaseRequest {
|
|
|
402
416
|
|
|
403
417
|
export interface GetPaymentMethodsQuery {
|
|
404
418
|
// CDL Site Id
|
|
405
|
-
siteId:
|
|
419
|
+
siteId: string;
|
|
406
420
|
// Graphql query string
|
|
407
421
|
_query?: string;
|
|
408
422
|
}
|
|
409
423
|
|
|
410
|
-
export
|
|
411
|
-
data?: PaymentCard[];
|
|
412
|
-
recordsTotal?: number;
|
|
413
|
-
}
|
|
424
|
+
export type GetPaymentMethodsResponse = PaymentCards;
|
|
414
425
|
|
|
415
426
|
export interface GetPaymentMethodsRequest
|
|
416
427
|
extends BaseRequest,
|
|
@@ -427,10 +438,7 @@ export interface GetPaymentHpcQuery {
|
|
|
427
438
|
_query?: string;
|
|
428
439
|
}
|
|
429
440
|
|
|
430
|
-
export
|
|
431
|
-
iframe?: string;
|
|
432
|
-
sessionKey?: string;
|
|
433
|
-
}
|
|
441
|
+
export type GetPaymentHpcResponse = HpcIframe;
|
|
434
442
|
|
|
435
443
|
export interface GetPaymentHpcRequest extends BaseRequest, RequestQuery<GetPaymentHpcQuery> {}
|
|
436
444
|
|
package/src/interface/promo.ts
CHANGED
|
@@ -22,7 +22,7 @@ export interface PromotionBody {
|
|
|
22
22
|
fr?: string;
|
|
23
23
|
};
|
|
24
24
|
multigroup: string;
|
|
25
|
-
type:
|
|
25
|
+
type: "bogo" | "bundle" | "lto";
|
|
26
26
|
items: PromotionItems;
|
|
27
27
|
status: Status;
|
|
28
28
|
location_group_ids: string[];
|
|
@@ -49,7 +49,7 @@ export interface Promotion {
|
|
|
49
49
|
fr?: string;
|
|
50
50
|
};
|
|
51
51
|
multigroup?: string;
|
|
52
|
-
type:
|
|
52
|
+
type: "bogo" | "bundle" | "lto";
|
|
53
53
|
items: PromotionItems;
|
|
54
54
|
status: Status;
|
|
55
55
|
location_group_ids?: string[];
|
|
@@ -58,7 +58,13 @@ export interface Promotion {
|
|
|
58
58
|
meta?: PromoMeta;
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
-
|
|
61
|
+
enum Status {
|
|
62
|
+
ACTIVE = "active",
|
|
63
|
+
SCHEDULED = "scheduled",
|
|
64
|
+
PAUSED = "paused",
|
|
65
|
+
EXPIRED = "expired",
|
|
66
|
+
ARCHIVED = "archived",
|
|
67
|
+
}
|
|
62
68
|
|
|
63
69
|
export interface DatetimeObject {
|
|
64
70
|
year: number;
|
|
@@ -74,7 +80,7 @@ export interface DatetimeObject {
|
|
|
74
80
|
|
|
75
81
|
export interface Event {
|
|
76
82
|
data?: {
|
|
77
|
-
calendar?:
|
|
83
|
+
calendar?: "hours" | "holidays";
|
|
78
84
|
[index: string]: any;
|
|
79
85
|
};
|
|
80
86
|
schedule?: {
|
|
@@ -84,7 +90,7 @@ export interface Event {
|
|
|
84
90
|
// Is used to calculate the time event will end (times[0]+duration)
|
|
85
91
|
duration?: number;
|
|
86
92
|
// Defines the type of duration property
|
|
87
|
-
durationUnit?:
|
|
93
|
+
durationUnit?: "minutes" | "hours" | "days";
|
|
88
94
|
dayOfWeek?: number[];
|
|
89
95
|
dayOfMonth?: number[];
|
|
90
96
|
dayOfYear?: number[];
|
|
@@ -186,7 +192,7 @@ export interface UpdateVoucher {
|
|
|
186
192
|
}
|
|
187
193
|
|
|
188
194
|
export interface Voucher {
|
|
189
|
-
provider?:
|
|
195
|
+
provider?: "fp" | "voucherify";
|
|
190
196
|
code?: string;
|
|
191
197
|
valid?: boolean;
|
|
192
198
|
discount?: AppliedDiscount;
|
package/src/interface/report.ts
CHANGED
|
@@ -318,7 +318,7 @@ export interface EODItemReport {
|
|
|
318
318
|
|
|
319
319
|
export interface GetReportAnalyticsGroupPath {
|
|
320
320
|
location_group: string;
|
|
321
|
-
report_type:
|
|
321
|
+
report_type: "bills" | "sales" | "transactions" | "top-items";
|
|
322
322
|
}
|
|
323
323
|
|
|
324
324
|
export interface GetReportAnalyticsGroupQuery {
|
|
@@ -326,8 +326,8 @@ export interface GetReportAnalyticsGroupQuery {
|
|
|
326
326
|
brand_ids?: string;
|
|
327
327
|
start_date: string;
|
|
328
328
|
end_date: string;
|
|
329
|
-
time_frame:
|
|
330
|
-
order_type?:
|
|
329
|
+
time_frame: "week" | "month" | "day";
|
|
330
|
+
order_type?: "delivery" | "pickup" | "frictionless";
|
|
331
331
|
// Graphql query string
|
|
332
332
|
_query?: string;
|
|
333
333
|
}
|
|
@@ -350,8 +350,8 @@ export interface GetReportAnalyticsCombinedGroupQuery {
|
|
|
350
350
|
brand_ids?: string;
|
|
351
351
|
start_date: string;
|
|
352
352
|
end_date: string;
|
|
353
|
-
time_frame:
|
|
354
|
-
order_type?:
|
|
353
|
+
time_frame: "week" | "month" | "day";
|
|
354
|
+
order_type?: "delivery" | "pickup" | "frictionless";
|
|
355
355
|
// Graphql query string
|
|
356
356
|
_query?: string;
|
|
357
357
|
}
|
|
@@ -375,7 +375,7 @@ export interface GetReportEodGroupQuery {
|
|
|
375
375
|
// Report end date in ISO 8601 format
|
|
376
376
|
end?: string;
|
|
377
377
|
// Output format
|
|
378
|
-
format?:
|
|
378
|
+
format?: "json" | "xslx";
|
|
379
379
|
// Location IDs, comma-separated
|
|
380
380
|
locations?: string;
|
|
381
381
|
// Graphql query string
|
|
@@ -464,9 +464,9 @@ export interface GetReportEodGroupItemsQuery {
|
|
|
464
464
|
// Report end date in ISO 8601 format
|
|
465
465
|
end: string;
|
|
466
466
|
// Output format
|
|
467
|
-
format:
|
|
467
|
+
format: "xslx";
|
|
468
468
|
// Partner name for specific formatting
|
|
469
|
-
partner:
|
|
469
|
+
partner: "onemarket";
|
|
470
470
|
// Location IDs, comma-separated
|
|
471
471
|
locations: string;
|
|
472
472
|
// Graphql query string
|
|
@@ -26,7 +26,7 @@ export interface ItemRequest {
|
|
|
26
26
|
[index: string]: any;
|
|
27
27
|
};
|
|
28
28
|
special_instructions?: string;
|
|
29
|
-
amount_off_exclusions?:
|
|
29
|
+
amount_off_exclusions?: AmountOffExclusion[];
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
export interface ItemResponse {
|
|
@@ -72,7 +72,7 @@ export interface ItemResponse {
|
|
|
72
72
|
item_discount?: any;
|
|
73
73
|
// user specified instructions for the item
|
|
74
74
|
special_instructions?: string;
|
|
75
|
-
amount_off_exclusions?:
|
|
75
|
+
amount_off_exclusions?: AmountOffExclusion[];
|
|
76
76
|
added_on?: string;
|
|
77
77
|
meal_value?: IntegerValue;
|
|
78
78
|
category?: Label;
|
|
@@ -106,7 +106,7 @@ export interface ModifierRequest {
|
|
|
106
106
|
label?: Label;
|
|
107
107
|
_index?: string;
|
|
108
108
|
quantity?: Quantity;
|
|
109
|
-
amount_off_exclusions?:
|
|
109
|
+
amount_off_exclusions?: AmountOffExclusion[];
|
|
110
110
|
}
|
|
111
111
|
|
|
112
112
|
export interface ModifierResponse {
|
|
@@ -123,7 +123,7 @@ export interface ModifierResponse {
|
|
|
123
123
|
taxes?: string[];
|
|
124
124
|
[index: string]: any;
|
|
125
125
|
};
|
|
126
|
-
amount_off_exclusions?:
|
|
126
|
+
amount_off_exclusions?: AmountOffExclusion[];
|
|
127
127
|
is?: {
|
|
128
128
|
disabled?: boolean;
|
|
129
129
|
};
|
|
@@ -229,7 +229,7 @@ export interface ShoppingCartRequest {
|
|
|
229
229
|
brand?: string;
|
|
230
230
|
is?: {
|
|
231
231
|
// Shoppingcart Type: delivery, pickup
|
|
232
|
-
type?:
|
|
232
|
+
type?: "delivery" | "pickup" | "scan_and_go";
|
|
233
233
|
// If an order should be paid with meal exchange. If true, this will calculate meals total.
|
|
234
234
|
mx_cart?: boolean;
|
|
235
235
|
// If a user's email domain is a match in a sites list of tax exempt domains
|
|
@@ -260,7 +260,7 @@ export interface ShoppingCartResponse {
|
|
|
260
260
|
};
|
|
261
261
|
promo?: {
|
|
262
262
|
code?: string;
|
|
263
|
-
provider?:
|
|
263
|
+
provider?: "fp" | "voucherify";
|
|
264
264
|
amount_off?: MonetaryValue;
|
|
265
265
|
percent_off?: MonetaryValue;
|
|
266
266
|
amount?: MonetaryValue;
|
|
@@ -281,7 +281,7 @@ export interface ShoppingCartResponse {
|
|
|
281
281
|
};
|
|
282
282
|
discount?: {
|
|
283
283
|
code?: string;
|
|
284
|
-
provider?:
|
|
284
|
+
provider?: "fp" | "voucherify";
|
|
285
285
|
amount_off?: MonetaryValue;
|
|
286
286
|
percent_off?: MonetaryValue;
|
|
287
287
|
amount?: MonetaryValue;
|
|
@@ -319,7 +319,7 @@ export interface ShoppingCartResponse {
|
|
|
319
319
|
};
|
|
320
320
|
is?: {
|
|
321
321
|
// Shoppingcart Type: delivery, pickup
|
|
322
|
-
type?:
|
|
322
|
+
type?: "delivery" | "pickup" | "scan_and_go" | "frictionless";
|
|
323
323
|
// If an order should be paid with meal exchange. If true, this will calculate meals total.
|
|
324
324
|
mx_cart?: boolean;
|
|
325
325
|
// If a user's email or email domain is a match in a sites list of tax exempt emails or domains
|
|
@@ -390,7 +390,7 @@ export interface Tender {
|
|
|
390
390
|
id: string;
|
|
391
391
|
name?: string;
|
|
392
392
|
balance?: MonetaryValue;
|
|
393
|
-
type:
|
|
393
|
+
type: "declining_balance" | "meal_equivalent" | "meal_exchange";
|
|
394
394
|
is: {
|
|
395
395
|
eligible: boolean;
|
|
396
396
|
validated?: boolean;
|
|
@@ -428,6 +428,11 @@ export interface FPValidationData {
|
|
|
428
428
|
[index: string]: any;
|
|
429
429
|
}
|
|
430
430
|
|
|
431
|
+
enum AmountOffExclusion {
|
|
432
|
+
DISCOUNT = "discount",
|
|
433
|
+
PROMO = "promo",
|
|
434
|
+
}
|
|
435
|
+
|
|
431
436
|
// POST /shoppingcart/ - Create a new ShoppingCart
|
|
432
437
|
|
|
433
438
|
export type PostShoppingcartCartBody = ShoppingCartRequest;
|
package/src/interface/task.ts
CHANGED
|
@@ -36,12 +36,12 @@ export interface Task {
|
|
|
36
36
|
// location id for this task
|
|
37
37
|
location_id?: string;
|
|
38
38
|
// type of location id
|
|
39
|
-
location_type?:
|
|
39
|
+
location_type?: "brand" | "group";
|
|
40
40
|
order?: TaskOrder;
|
|
41
41
|
pickup_details?: TaskLocation;
|
|
42
42
|
dropoff_details?: TaskLocation;
|
|
43
43
|
// Task Status
|
|
44
|
-
status?:
|
|
44
|
+
status?: "new" | "in_progress" | "ready" | "out_for_delivery" | "delivered" | "order_is_ready";
|
|
45
45
|
// Any related metadata information about this Task
|
|
46
46
|
meta?: {
|
|
47
47
|
[index: string]: any;
|
|
@@ -61,7 +61,7 @@ export interface Task {
|
|
|
61
61
|
// runnerid
|
|
62
62
|
assignee?: string;
|
|
63
63
|
// Task Type
|
|
64
|
-
type?:
|
|
64
|
+
type?: "bolter" | "kds";
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
export interface Tasks {
|
|
@@ -78,18 +78,24 @@ export interface TaskCreate {
|
|
|
78
78
|
// location id for this task
|
|
79
79
|
location_id: string;
|
|
80
80
|
// type of location id
|
|
81
|
-
location_type:
|
|
81
|
+
location_type: "brand" | "group";
|
|
82
82
|
order: TaskOrder;
|
|
83
83
|
pickup_details: TaskLocation;
|
|
84
84
|
dropoff_details: TaskLocation;
|
|
85
85
|
// Task Status
|
|
86
|
-
status:
|
|
86
|
+
status:
|
|
87
|
+
| "accepted"
|
|
88
|
+
| "in_progress"
|
|
89
|
+
| "ready"
|
|
90
|
+
| "out_for_delivery"
|
|
91
|
+
| "delivered"
|
|
92
|
+
| "order_is_ready";
|
|
87
93
|
// Any related metadata information about this Task
|
|
88
94
|
meta?: {
|
|
89
95
|
[index: string]: any;
|
|
90
96
|
};
|
|
91
97
|
// Task Type
|
|
92
|
-
type:
|
|
98
|
+
type: "bolter" | "kds";
|
|
93
99
|
}
|
|
94
100
|
|
|
95
101
|
export interface TaskUpdate {
|
|
@@ -101,12 +107,18 @@ export interface TaskUpdate {
|
|
|
101
107
|
location_id?: string;
|
|
102
108
|
unit_id?: string;
|
|
103
109
|
// type of location id
|
|
104
|
-
location_type?:
|
|
110
|
+
location_type?: "brand" | "group";
|
|
105
111
|
order?: TaskOrder;
|
|
106
112
|
pickup_details?: TaskLocation;
|
|
107
113
|
dropoff_details?: TaskLocation;
|
|
108
114
|
// Task Status
|
|
109
|
-
status?:
|
|
115
|
+
status?:
|
|
116
|
+
| "accepted"
|
|
117
|
+
| "in_progress"
|
|
118
|
+
| "ready"
|
|
119
|
+
| "out_for_delivery"
|
|
120
|
+
| "delivered"
|
|
121
|
+
| "order_is_ready";
|
|
110
122
|
// Any related metadata information about this Task
|
|
111
123
|
meta?: {
|
|
112
124
|
[index: string]: any;
|
|
@@ -115,7 +127,7 @@ export interface TaskUpdate {
|
|
|
115
127
|
|
|
116
128
|
export interface OrderUpdate {
|
|
117
129
|
// This is the new status of the order that you are trying to update
|
|
118
|
-
order_status:
|
|
130
|
+
order_status: "ready";
|
|
119
131
|
}
|
|
120
132
|
|
|
121
133
|
export interface ActionResponse {
|
|
@@ -263,7 +275,7 @@ export interface GetTaskAssigneePath {
|
|
|
263
275
|
|
|
264
276
|
export interface GetTaskAssigneeQuery {
|
|
265
277
|
// Task Status
|
|
266
|
-
status?:
|
|
278
|
+
status?: "new" | "in_progress" | "ready" | "out_for_delivery" | "delivered" | "order_is_ready";
|
|
267
279
|
// Task Location ID
|
|
268
280
|
location_id?: string;
|
|
269
281
|
// Filter tasks by their created date. Only return tasks that have a date greater than or equal to the date.
|
|
@@ -292,7 +304,7 @@ export interface GetTaskLocationBrandPath {
|
|
|
292
304
|
|
|
293
305
|
export interface GetTaskLocationBrandQuery {
|
|
294
306
|
// Task Status
|
|
295
|
-
status?:
|
|
307
|
+
status?: "new" | "in_progress" | "ready" | "out_for_delivery" | "delivered" | "order_is_ready";
|
|
296
308
|
// Task Location ID
|
|
297
309
|
location_id?: string;
|
|
298
310
|
// Filter tasks by their created date. Only return tasks that have a date greater than or equal to the date.
|
|
@@ -304,7 +316,7 @@ export interface GetTaskLocationBrandQuery {
|
|
|
304
316
|
// Filter tasks by the action_time in pickup_details. Only return tasks that have a pickup_time date greater than or equal to the date.
|
|
305
317
|
pickup_time?: number;
|
|
306
318
|
// The type of task that will be searched on. The default is: 'bolter'
|
|
307
|
-
query_type?:
|
|
319
|
+
query_type?: "kds" | "bolter";
|
|
308
320
|
// Graphql query string
|
|
309
321
|
_query?: string;
|
|
310
322
|
}
|
|
@@ -325,7 +337,7 @@ export interface GetTaskLocationGroupPath {
|
|
|
325
337
|
|
|
326
338
|
export interface GetTaskLocationGroupQuery {
|
|
327
339
|
// Task Status
|
|
328
|
-
status?:
|
|
340
|
+
status?: "new" | "in_progress" | "ready" | "out_for_delivery" | "delivered" | "order_is_ready";
|
|
329
341
|
// Task Location ID
|
|
330
342
|
location_id?: string;
|
|
331
343
|
// Filter tasks by their created date. Only return tasks that have a date greater than or equal to the date.
|
|
@@ -337,7 +349,7 @@ export interface GetTaskLocationGroupQuery {
|
|
|
337
349
|
// Filter tasks by the action_time in pickup_details. Only return tasks that have a pickup_time date greater than or equal to the date.
|
|
338
350
|
pickup_time?: number;
|
|
339
351
|
// The type of task that will be searched on. The default is: 'bolter'
|
|
340
|
-
query_type?:
|
|
352
|
+
query_type?: "kds" | "bolter";
|
|
341
353
|
// Graphql query string
|
|
342
354
|
_query?: string;
|
|
343
355
|
}
|