@compassdigital/sdk.typescript 4.138.0 → 4.140.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 +149 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +167 -0
- package/lib/index.js.map +1 -1
- package/lib/interface/catalog.d.ts +202 -0
- package/lib/interface/catalog.d.ts.map +1 -0
- package/lib/interface/catalog.js +5 -0
- package/lib/interface/catalog.js.map +1 -0
- package/lib/interface/consumer.d.ts +47 -1
- package/lib/interface/consumer.d.ts.map +1 -1
- package/lib/interface/menu.d.ts +71 -0
- package/lib/interface/menu.d.ts.map +1 -1
- package/lib/interface/order.d.ts +31 -0
- package/lib/interface/order.d.ts.map +1 -1
- package/lib/interface/promo.d.ts +1 -1
- package/lib/interface/promo.d.ts.map +1 -1
- package/lib/interface/shoppingcart.d.ts +5 -0
- package/lib/interface/shoppingcart.d.ts.map +1 -1
- package/lib/messages/commands/SendPushNotificationCommand.d.ts +2 -1
- package/lib/messages/commands/SendPushNotificationCommand.d.ts.map +1 -1
- package/manifest.json +4 -0
- package/package.json +1 -1
- package/src/index.ts +406 -0
- package/src/interface/catalog.ts +325 -0
- package/src/interface/consumer.ts +55 -1
- package/src/interface/menu.ts +89 -0
- package/src/interface/order.ts +52 -0
- package/src/interface/promo.ts +1 -1
- package/src/interface/shoppingcart.ts +5 -0
- package/src/messages/commands/SendPushNotificationCommand.ts +2 -1
|
@@ -0,0 +1,325 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
// THIS FILE IS AUTOMATICALLY GENERATED, DO NOT MODIFY
|
|
3
|
+
|
|
4
|
+
import { RequestQuery, BaseRequest } from './util';
|
|
5
|
+
|
|
6
|
+
export interface CatalogResponseDTO {
|
|
7
|
+
id: number;
|
|
8
|
+
parent_id: number | null;
|
|
9
|
+
name: string;
|
|
10
|
+
display: Record<string, any>;
|
|
11
|
+
meta: Record<string, any> | null;
|
|
12
|
+
items: Record<string, any> | null;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export type CatalogItemResponseDTO = Record<string, any>;
|
|
16
|
+
|
|
17
|
+
export interface PaginationQueryDTO {
|
|
18
|
+
// Page number
|
|
19
|
+
page?: number;
|
|
20
|
+
// Number of items per page
|
|
21
|
+
limit?: number;
|
|
22
|
+
// Field to sort by
|
|
23
|
+
sort_by?: string;
|
|
24
|
+
// Sort order
|
|
25
|
+
order?: 'ASC' | 'DESC';
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export type FilterQueryDTO = Record<string, any>;
|
|
29
|
+
|
|
30
|
+
export interface ListParamsDTO {
|
|
31
|
+
pagination?: PaginationQueryDTO;
|
|
32
|
+
filter?: FilterQueryDTO;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export type CatalogItemsListResponseDTO = Record<string, any>;
|
|
36
|
+
|
|
37
|
+
export interface SearchConditionDTO {
|
|
38
|
+
// Contains search term
|
|
39
|
+
contains?: string;
|
|
40
|
+
// Exact match
|
|
41
|
+
equals?: Record<string, any>;
|
|
42
|
+
// Value greater than this
|
|
43
|
+
moreThan?: Record<string, any>;
|
|
44
|
+
// Value less than this
|
|
45
|
+
lessThan?: Record<string, any>;
|
|
46
|
+
// Negate condition (e.g., not equal). Accepts: `true` (boolean), `{ equals: 5 }` (object), `"sample string"` (string), or `123` (number).
|
|
47
|
+
not?: Record<string, any>;
|
|
48
|
+
// In the list of values
|
|
49
|
+
in?: string[];
|
|
50
|
+
// Array contains these values
|
|
51
|
+
arrayContains?: string[];
|
|
52
|
+
// Value greater than or equal to this
|
|
53
|
+
moreThanOrEqual?: Record<string, any>;
|
|
54
|
+
// Value less than or equal to this
|
|
55
|
+
lessThanOrEqual?: Record<string, any>;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export type BaseItemDTO = Record<string, any>;
|
|
59
|
+
|
|
60
|
+
// GET /catalog/status - Get the status of the Catalog service
|
|
61
|
+
|
|
62
|
+
export interface GetCatalogStatusQuery {
|
|
63
|
+
// Graphql query string
|
|
64
|
+
_query?: string;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export type GetCatalogStatusResponse = {};
|
|
68
|
+
|
|
69
|
+
export interface GetCatalogStatusRequest extends BaseRequest, RequestQuery<GetCatalogStatusQuery> {}
|
|
70
|
+
|
|
71
|
+
// GET /catalog/status/connections - Get the status of Catalog database connections
|
|
72
|
+
|
|
73
|
+
export interface GetCatalogConnectionsStatusQuery {
|
|
74
|
+
// Graphql query string
|
|
75
|
+
_query?: string;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export type GetCatalogConnectionsStatusResponse = {};
|
|
79
|
+
|
|
80
|
+
export interface GetCatalogConnectionsStatusRequest
|
|
81
|
+
extends BaseRequest,
|
|
82
|
+
RequestQuery<GetCatalogConnectionsStatusQuery> {}
|
|
83
|
+
|
|
84
|
+
// POST /catalog/v1/catalog - Create a new catalog
|
|
85
|
+
|
|
86
|
+
export interface PostCatalogBody {
|
|
87
|
+
name?: string;
|
|
88
|
+
display?: Record<string, any>;
|
|
89
|
+
parent_id?: number | null;
|
|
90
|
+
meta?: Record<string, any>;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export type PostCatalogResponse = CatalogResponseDTO;
|
|
94
|
+
|
|
95
|
+
export interface PostCatalogRequest extends BaseRequest {
|
|
96
|
+
body: PostCatalogBody;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
// PATCH /catalog/v1/catalog/{id} - Update a catalog
|
|
100
|
+
|
|
101
|
+
export interface PatchCatalogPath {
|
|
102
|
+
id: number;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export interface PatchCatalogBody {
|
|
106
|
+
name?: string | null;
|
|
107
|
+
display?: Record<string, any> | null;
|
|
108
|
+
parent_id?: number | null;
|
|
109
|
+
meta?: Record<string, any> | null;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
export type PatchCatalogResponse = CatalogResponseDTO;
|
|
113
|
+
|
|
114
|
+
export interface PatchCatalogRequest extends BaseRequest, PatchCatalogPath {
|
|
115
|
+
body: PatchCatalogBody;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
// GET /catalog/v1/catalog/{id} - Get a catalog
|
|
119
|
+
|
|
120
|
+
export interface GetCatalogPath {
|
|
121
|
+
id: number;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
export interface GetCatalogQuery {
|
|
125
|
+
// Graphql query string
|
|
126
|
+
_query?: string;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
export type GetCatalogResponse = CatalogResponseDTO;
|
|
130
|
+
|
|
131
|
+
export interface GetCatalogRequest
|
|
132
|
+
extends BaseRequest,
|
|
133
|
+
RequestQuery<GetCatalogQuery>,
|
|
134
|
+
GetCatalogPath {}
|
|
135
|
+
|
|
136
|
+
// DELETE /catalog/v1/catalog/{id} - Delete a catalog
|
|
137
|
+
|
|
138
|
+
export interface DeleteCatalogPath {
|
|
139
|
+
id: number;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
export type DeleteCatalogResponse = CatalogResponseDTO;
|
|
143
|
+
|
|
144
|
+
export interface DeleteCatalogRequest extends BaseRequest, DeleteCatalogPath {}
|
|
145
|
+
|
|
146
|
+
// POST /catalog/v1/catalog/{id}/item - Create a new catalog item
|
|
147
|
+
|
|
148
|
+
export interface PostCatalogItemPath {
|
|
149
|
+
id: number;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
export interface PostCatalogItemBody {
|
|
153
|
+
base_item_id?: string;
|
|
154
|
+
name?: string;
|
|
155
|
+
catalog_item_id?: number | null;
|
|
156
|
+
label?: string | null;
|
|
157
|
+
description?: string | null;
|
|
158
|
+
price?: number | null;
|
|
159
|
+
overrides?: Record<string, any> | null;
|
|
160
|
+
options?: Record<string, any> | null;
|
|
161
|
+
meta?: Record<string, any> | null;
|
|
162
|
+
is_visible?: boolean | null;
|
|
163
|
+
is_out_of_stock?: boolean | null;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
export type PostCatalogItemResponse = CatalogItemResponseDTO;
|
|
167
|
+
|
|
168
|
+
export interface PostCatalogItemRequest extends BaseRequest, PostCatalogItemPath {
|
|
169
|
+
body: PostCatalogItemBody;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
// POST /catalog/v1/catalog/{id}/items/bulk - Bulk create catalog items
|
|
173
|
+
|
|
174
|
+
export interface PostCatalogItemsBulkPath {
|
|
175
|
+
id: number;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
export type PostCatalogItemsBulkBody = string[];
|
|
179
|
+
|
|
180
|
+
export type PostCatalogItemsBulkResponse = CatalogItemResponseDTO[];
|
|
181
|
+
|
|
182
|
+
export interface PostCatalogItemsBulkRequest extends BaseRequest, PostCatalogItemsBulkPath {
|
|
183
|
+
body: PostCatalogItemsBulkBody;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
// PATCH /catalog/v1/catalog/{catalog_id}/item/{id} - Update a catalog item
|
|
187
|
+
|
|
188
|
+
export interface PatchCatalogItemPath {
|
|
189
|
+
catalog_id: number;
|
|
190
|
+
id: number;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
export interface PatchCatalogItemBody {
|
|
194
|
+
base_item_id?: string;
|
|
195
|
+
name?: string | null;
|
|
196
|
+
label?: string | null;
|
|
197
|
+
description?: string | null;
|
|
198
|
+
price?: number | null;
|
|
199
|
+
overrides?: Record<string, any> | null;
|
|
200
|
+
options?: Record<string, any> | null;
|
|
201
|
+
meta?: Record<string, any> | null;
|
|
202
|
+
is_visible?: boolean | null;
|
|
203
|
+
is_out_of_stock?: boolean | null;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
export type PatchCatalogItemResponse = CatalogItemResponseDTO;
|
|
207
|
+
|
|
208
|
+
export interface PatchCatalogItemRequest extends BaseRequest, PatchCatalogItemPath {
|
|
209
|
+
body: PatchCatalogItemBody;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
// DELETE /catalog/v1/catalog/{catalog_id}/item/{id} - Delete a catalog item
|
|
213
|
+
|
|
214
|
+
export interface DeleteCatalogItemPath {
|
|
215
|
+
catalog_id: number;
|
|
216
|
+
id: number;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
export type DeleteCatalogItemResponse = CatalogItemResponseDTO;
|
|
220
|
+
|
|
221
|
+
export interface DeleteCatalogItemRequest extends BaseRequest, DeleteCatalogItemPath {}
|
|
222
|
+
|
|
223
|
+
// POST /catalog/v1/catalog/{id}/items - List catalog items
|
|
224
|
+
|
|
225
|
+
export interface PostListCatalogItemsPath {
|
|
226
|
+
id: number;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
export type PostListCatalogItemsBody = ListParamsDTO;
|
|
230
|
+
|
|
231
|
+
export type PostListCatalogItemsResponse = CatalogItemsListResponseDTO;
|
|
232
|
+
|
|
233
|
+
export interface PostListCatalogItemsRequest extends BaseRequest, PostListCatalogItemsPath {
|
|
234
|
+
body: PostListCatalogItemsBody;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
// GET /catalog/v1/catalog/{id}/items - List catalog items
|
|
238
|
+
|
|
239
|
+
export interface GetListCatalogItemsPath {
|
|
240
|
+
id: number;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
export interface GetListCatalogItemsQuery {
|
|
244
|
+
page: number;
|
|
245
|
+
limit: number;
|
|
246
|
+
sort_by: string;
|
|
247
|
+
order: string;
|
|
248
|
+
filter: FilterQueryDTO;
|
|
249
|
+
// Graphql query string
|
|
250
|
+
_query?: string;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
export type GetListCatalogItemsResponse = CatalogItemsListResponseDTO;
|
|
254
|
+
|
|
255
|
+
export interface GetListCatalogItemsRequest
|
|
256
|
+
extends BaseRequest,
|
|
257
|
+
RequestQuery<GetListCatalogItemsQuery>,
|
|
258
|
+
GetListCatalogItemsPath {}
|
|
259
|
+
|
|
260
|
+
// POST /catalog/v1/catalog/{id}/clone - Clone a catalog
|
|
261
|
+
|
|
262
|
+
export interface PostCloneCatalogPath {
|
|
263
|
+
id: number;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
export type PostCloneCatalogResponse = CatalogResponseDTO;
|
|
267
|
+
|
|
268
|
+
export interface PostCloneCatalogRequest extends BaseRequest, PostCloneCatalogPath {}
|
|
269
|
+
|
|
270
|
+
// POST /catalog/v1/base-item - Create a new base item
|
|
271
|
+
|
|
272
|
+
export interface PostCatalogBaseItemBody {
|
|
273
|
+
name?: string;
|
|
274
|
+
description?: string | null;
|
|
275
|
+
price?: number | null;
|
|
276
|
+
barcode?: string | null;
|
|
277
|
+
reporting?: Record<string, any> | null;
|
|
278
|
+
tax?: Record<string, any> | null;
|
|
279
|
+
meta?: Record<string, any> | null;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
export type PostCatalogBaseItemResponse = BaseItemDTO;
|
|
283
|
+
|
|
284
|
+
export interface PostCatalogBaseItemRequest extends BaseRequest {
|
|
285
|
+
body: PostCatalogBaseItemBody;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
// GET /catalog/v1/base-item - List base items
|
|
289
|
+
|
|
290
|
+
export interface GetCatalogBaseItemsQuery {
|
|
291
|
+
// Graphql query string
|
|
292
|
+
_query?: string;
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
export interface GetCatalogBaseItemsBody {
|
|
296
|
+
search?: string | null;
|
|
297
|
+
limit?: number;
|
|
298
|
+
offset?: number;
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
export type GetCatalogBaseItemsResponse = BaseItemDTO[];
|
|
302
|
+
|
|
303
|
+
export interface GetCatalogBaseItemsRequest
|
|
304
|
+
extends BaseRequest,
|
|
305
|
+
RequestQuery<GetCatalogBaseItemsQuery> {
|
|
306
|
+
body: GetCatalogBaseItemsBody;
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
// GET /catalog/v1/base-item/{id} - Get a base item by id
|
|
310
|
+
|
|
311
|
+
export interface GetCatalogBaseItemPath {
|
|
312
|
+
id: string;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
export interface GetCatalogBaseItemQuery {
|
|
316
|
+
// Graphql query string
|
|
317
|
+
_query?: string;
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
export type GetCatalogBaseItemResponse = BaseItemDTO;
|
|
321
|
+
|
|
322
|
+
export interface GetCatalogBaseItemRequest
|
|
323
|
+
extends BaseRequest,
|
|
324
|
+
RequestQuery<GetCatalogBaseItemQuery>,
|
|
325
|
+
GetCatalogBaseItemPath {}
|
|
@@ -540,6 +540,59 @@ export interface ShoppingcartPromoDetails {
|
|
|
540
540
|
order?: ShoppingcartPromoOrder;
|
|
541
541
|
}
|
|
542
542
|
|
|
543
|
+
export interface ConsumerDiscountStatus {
|
|
544
|
+
live?: boolean;
|
|
545
|
+
publishedTo3rdParty?: boolean;
|
|
546
|
+
readyToPublish?: boolean;
|
|
547
|
+
active?: boolean;
|
|
548
|
+
}
|
|
549
|
+
|
|
550
|
+
export interface ConsumerDiscountIs {
|
|
551
|
+
badgepayPromo?: boolean;
|
|
552
|
+
mealplanPromo?: boolean;
|
|
553
|
+
decliningBalancePromo?: boolean;
|
|
554
|
+
voucherPromo?: boolean;
|
|
555
|
+
}
|
|
556
|
+
|
|
557
|
+
export interface ConsumerVoucherifyMetaDataDiscount {
|
|
558
|
+
type: Record<string, any>;
|
|
559
|
+
amountOff?: number;
|
|
560
|
+
percentOff?: number;
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
export interface ConsumerVoucherifyMetaData {
|
|
564
|
+
id?: string;
|
|
565
|
+
code?: string;
|
|
566
|
+
discount?: ConsumerVoucherifyMetaDataDiscount;
|
|
567
|
+
}
|
|
568
|
+
|
|
569
|
+
export interface ClassMetaProvider {
|
|
570
|
+
voucherify?: ConsumerVoucherifyMetaData;
|
|
571
|
+
}
|
|
572
|
+
|
|
573
|
+
export interface ConsumerDiscountMeta {
|
|
574
|
+
provider: ClassMetaProvider;
|
|
575
|
+
}
|
|
576
|
+
|
|
577
|
+
export interface ConsumerStackedDiscount {
|
|
578
|
+
id: string;
|
|
579
|
+
createdBy: string;
|
|
580
|
+
updatedBy: string;
|
|
581
|
+
createdAt: string;
|
|
582
|
+
updatedAt: string;
|
|
583
|
+
name: string;
|
|
584
|
+
status?: ConsumerDiscountStatus;
|
|
585
|
+
is?: ConsumerDiscountIs;
|
|
586
|
+
meta?: ConsumerDiscountMeta;
|
|
587
|
+
applied_amount?: number;
|
|
588
|
+
}
|
|
589
|
+
|
|
590
|
+
export interface Discounts {
|
|
591
|
+
applied_amount?: number;
|
|
592
|
+
app?: string;
|
|
593
|
+
stacked_discounts?: ConsumerStackedDiscount[];
|
|
594
|
+
}
|
|
595
|
+
|
|
543
596
|
export interface ShoppingcartPaymentMethodMealplan {
|
|
544
597
|
id?: string;
|
|
545
598
|
tender?: string;
|
|
@@ -699,6 +752,7 @@ export interface CustomerOrderShoppingcartDTO {
|
|
|
699
752
|
sub_total?: ShoppingcartMonetaryValue;
|
|
700
753
|
promo?: ShoppingcartPromoDetails;
|
|
701
754
|
discount?: ShoppingcartPromoDetails;
|
|
755
|
+
discounts?: Discounts;
|
|
702
756
|
payment_method?: ShoppingcartPaymentMethod;
|
|
703
757
|
taxes?: ShoppingcartTaxes;
|
|
704
758
|
total?: ShoppingcartTotal;
|
|
@@ -1720,7 +1774,7 @@ export interface PostConsumerRecommendedRequest {
|
|
|
1720
1774
|
|
|
1721
1775
|
export interface PostConsumerRecommendedResponse {
|
|
1722
1776
|
// items
|
|
1723
|
-
items:
|
|
1777
|
+
items: ConsumerItem[];
|
|
1724
1778
|
}
|
|
1725
1779
|
|
|
1726
1780
|
export interface PostConsumerShoppingCartBodyRequest {
|
package/src/interface/menu.ts
CHANGED
|
@@ -8368,6 +8368,7 @@ export interface GetMenuV4ItemPath {
|
|
|
8368
8368
|
}
|
|
8369
8369
|
|
|
8370
8370
|
export interface GetMenuV4ItemQuery {
|
|
8371
|
+
with_parent?: boolean;
|
|
8371
8372
|
// Graphql query string
|
|
8372
8373
|
_query?: string;
|
|
8373
8374
|
}
|
|
@@ -8397,6 +8398,7 @@ export interface GetMenuV4ItemResponse {
|
|
|
8397
8398
|
is_active?: boolean;
|
|
8398
8399
|
posid?: string;
|
|
8399
8400
|
tax_tags?: string[];
|
|
8401
|
+
brand_id: string;
|
|
8400
8402
|
line_route?: string;
|
|
8401
8403
|
posid_segment?: number;
|
|
8402
8404
|
menu_works?: MenuWorksDTO;
|
|
@@ -8918,6 +8920,7 @@ export interface GetMenuV4ModifierPath {
|
|
|
8918
8920
|
}
|
|
8919
8921
|
|
|
8920
8922
|
export interface GetMenuV4ModifierQuery {
|
|
8923
|
+
with_parent?: boolean;
|
|
8921
8924
|
// Graphql query string
|
|
8922
8925
|
_query?: string;
|
|
8923
8926
|
}
|
|
@@ -8943,6 +8946,7 @@ export interface GetMenuV4ModifierResponse {
|
|
|
8943
8946
|
posid?: string;
|
|
8944
8947
|
reporting: ReportingMetadataDTO;
|
|
8945
8948
|
posid_segment?: number;
|
|
8949
|
+
brand_id: string;
|
|
8946
8950
|
line_route?: string;
|
|
8947
8951
|
menu_works?: MenuWorksDTO;
|
|
8948
8952
|
is_out_of_stock?: boolean;
|
|
@@ -9356,6 +9360,7 @@ export interface GetMenuV4ModifierGroupPath {
|
|
|
9356
9360
|
}
|
|
9357
9361
|
|
|
9358
9362
|
export interface GetMenuV4ModifierGroupQuery {
|
|
9363
|
+
with_parent?: boolean;
|
|
9359
9364
|
// Graphql query string
|
|
9360
9365
|
_query?: string;
|
|
9361
9366
|
}
|
|
@@ -9376,6 +9381,7 @@ export interface GetMenuV4ModifierGroupResponse {
|
|
|
9376
9381
|
max?: number;
|
|
9377
9382
|
is_active?: boolean;
|
|
9378
9383
|
limit?: number;
|
|
9384
|
+
brand_id: string;
|
|
9379
9385
|
order_type?: 'selection' | 'option' | 'quantity';
|
|
9380
9386
|
sizing?: string;
|
|
9381
9387
|
is_out_of_stock?: boolean;
|
|
@@ -9880,6 +9886,89 @@ export interface PostMenuV4UnscheduleMenuRequest extends BaseRequest {
|
|
|
9880
9886
|
body: PostMenuV4UnscheduleMenuBody;
|
|
9881
9887
|
}
|
|
9882
9888
|
|
|
9889
|
+
// GET /menu/v4/menu/{id}
|
|
9890
|
+
|
|
9891
|
+
export interface GetMenuV4MenuPath {
|
|
9892
|
+
id: string;
|
|
9893
|
+
}
|
|
9894
|
+
|
|
9895
|
+
export interface GetMenuV4MenuQuery {
|
|
9896
|
+
with_parent?: boolean;
|
|
9897
|
+
// Graphql query string
|
|
9898
|
+
_query?: string;
|
|
9899
|
+
}
|
|
9900
|
+
|
|
9901
|
+
export interface GetMenuV4MenuResponse {
|
|
9902
|
+
parent?: DraftMenuDTO;
|
|
9903
|
+
children?: DraftMenuDTO[];
|
|
9904
|
+
categories?: DraftCategoryDTO[];
|
|
9905
|
+
stocks?: StockDTO[];
|
|
9906
|
+
station_id?: string;
|
|
9907
|
+
price_level_id?: string;
|
|
9908
|
+
id: string;
|
|
9909
|
+
created_at?: string;
|
|
9910
|
+
updated_at?: string;
|
|
9911
|
+
deleted_at?: string;
|
|
9912
|
+
parent_id?: string;
|
|
9913
|
+
name: string;
|
|
9914
|
+
brand_id?: string;
|
|
9915
|
+
applied_diff_snapshot?: Record<string, any>;
|
|
9916
|
+
version?: number;
|
|
9917
|
+
brand?: DraftBrandDTO;
|
|
9918
|
+
changes?: MenuChangeDTO[];
|
|
9919
|
+
vendor_metadata?: VendorMetadataDTO[];
|
|
9920
|
+
permissions?: Record<string, any>;
|
|
9921
|
+
[index: string]: any;
|
|
9922
|
+
}
|
|
9923
|
+
|
|
9924
|
+
export interface GetMenuV4MenuRequest
|
|
9925
|
+
extends BaseRequest,
|
|
9926
|
+
RequestQuery<GetMenuV4MenuQuery>,
|
|
9927
|
+
GetMenuV4MenuPath {}
|
|
9928
|
+
|
|
9929
|
+
// GET /menu/v4/category/{id}
|
|
9930
|
+
|
|
9931
|
+
export interface GetMenuV4CategoryPath {
|
|
9932
|
+
id: string;
|
|
9933
|
+
}
|
|
9934
|
+
|
|
9935
|
+
export interface GetMenuV4CategoryQuery {
|
|
9936
|
+
with_parent?: boolean;
|
|
9937
|
+
// Graphql query string
|
|
9938
|
+
_query?: string;
|
|
9939
|
+
}
|
|
9940
|
+
|
|
9941
|
+
export interface GetMenuV4CategoryResponse {
|
|
9942
|
+
parent?: DraftCategoryDTO;
|
|
9943
|
+
children?: DraftCategoryDTO[];
|
|
9944
|
+
id: string;
|
|
9945
|
+
created_at?: string;
|
|
9946
|
+
updated_at?: string;
|
|
9947
|
+
deleted_at?: string;
|
|
9948
|
+
parent_id?: string;
|
|
9949
|
+
name: string;
|
|
9950
|
+
label?: string;
|
|
9951
|
+
sequence?: number;
|
|
9952
|
+
is_active?: boolean;
|
|
9953
|
+
brand_id?: string;
|
|
9954
|
+
menu_id: string;
|
|
9955
|
+
applied_diff_snapshot?: Record<string, any>;
|
|
9956
|
+
version?: number;
|
|
9957
|
+
menu?: DraftMenuDTO;
|
|
9958
|
+
items?: DraftCategoryToItemRelationshipDTO[];
|
|
9959
|
+
brand?: DraftBrandDTO;
|
|
9960
|
+
changes?: CategoryChangeDTO[];
|
|
9961
|
+
vendor_metadata?: VendorMetadataDTO[];
|
|
9962
|
+
attachments?: FileAttachmentsDTO;
|
|
9963
|
+
permissions?: Record<string, any>;
|
|
9964
|
+
[index: string]: any;
|
|
9965
|
+
}
|
|
9966
|
+
|
|
9967
|
+
export interface GetMenuV4CategoryRequest
|
|
9968
|
+
extends BaseRequest,
|
|
9969
|
+
RequestQuery<GetMenuV4CategoryQuery>,
|
|
9970
|
+
GetMenuV4CategoryPath {}
|
|
9971
|
+
|
|
9883
9972
|
// POST /menu/v4/category/{id}/attachment/{name}
|
|
9884
9973
|
|
|
9885
9974
|
export interface PostMenuV4CategoryAttachmentPath {
|
package/src/interface/order.ts
CHANGED
|
@@ -199,6 +199,36 @@ export interface Order {
|
|
|
199
199
|
code?: string;
|
|
200
200
|
[index: string]: any;
|
|
201
201
|
};
|
|
202
|
+
discounts?: OrderDiscount[];
|
|
203
|
+
// Discounts for refunds
|
|
204
|
+
discounts_refund?: {
|
|
205
|
+
// Client app that applied the discount
|
|
206
|
+
app?: string;
|
|
207
|
+
// Date the discount was refunded
|
|
208
|
+
date?: string;
|
|
209
|
+
// Date the order was created
|
|
210
|
+
order_created_at?: string;
|
|
211
|
+
// Vocuherify Order ID
|
|
212
|
+
order_id?: string;
|
|
213
|
+
// Order items
|
|
214
|
+
order_items?: {
|
|
215
|
+
// Compassdigital item id
|
|
216
|
+
source_id?: string;
|
|
217
|
+
// Quantity of the item
|
|
218
|
+
quantity?: number;
|
|
219
|
+
// Price of the item in cents
|
|
220
|
+
price?: number;
|
|
221
|
+
}[];
|
|
222
|
+
// Order total
|
|
223
|
+
order_total?: number;
|
|
224
|
+
// Reason for refund
|
|
225
|
+
reason?: string;
|
|
226
|
+
// Voucherify parent redemption id for the stacked discounts
|
|
227
|
+
redemption_id?: string;
|
|
228
|
+
// true if refund succeeded
|
|
229
|
+
result?: boolean;
|
|
230
|
+
[index: string]: any;
|
|
231
|
+
};
|
|
202
232
|
// The type of kds that the brand uses
|
|
203
233
|
type_of_kds?: string;
|
|
204
234
|
// Indicate whether the order is eligible for cancellation
|
|
@@ -390,6 +420,28 @@ export interface ApexCodes {
|
|
|
390
420
|
reclaim_code: ApexCodeProperties;
|
|
391
421
|
}
|
|
392
422
|
|
|
423
|
+
export interface OrderDiscount {
|
|
424
|
+
// Voucherify redemption id
|
|
425
|
+
id?: string;
|
|
426
|
+
date?: string;
|
|
427
|
+
// true if redemption succeeded
|
|
428
|
+
result?: boolean;
|
|
429
|
+
discount?: {
|
|
430
|
+
// amount_off | percent_off
|
|
431
|
+
type?: string;
|
|
432
|
+
amount_off?: number;
|
|
433
|
+
// Percentage off
|
|
434
|
+
percent_off?: number;
|
|
435
|
+
};
|
|
436
|
+
// redemption
|
|
437
|
+
type?: string;
|
|
438
|
+
// Parent redemption id for refunds
|
|
439
|
+
original_redemption?: string;
|
|
440
|
+
// Client app that applied the discount
|
|
441
|
+
app?: string;
|
|
442
|
+
[index: string]: any;
|
|
443
|
+
}
|
|
444
|
+
|
|
393
445
|
// POST /order - Create an Order
|
|
394
446
|
|
|
395
447
|
export interface PostOrderQuery {
|
package/src/interface/promo.ts
CHANGED
|
@@ -269,6 +269,11 @@ export interface ShoppingCartRequest {
|
|
|
269
269
|
brand?: string;
|
|
270
270
|
promo?: PromoDetails;
|
|
271
271
|
discount?: PromoDetails;
|
|
272
|
+
discounts?: {
|
|
273
|
+
stacked_total?: MonetaryValue;
|
|
274
|
+
stacked_discounts?: Discount[];
|
|
275
|
+
app?: string;
|
|
276
|
+
};
|
|
272
277
|
payment_method?: PaymentMethod;
|
|
273
278
|
taxes?: Taxes;
|
|
274
279
|
exemptions?: {
|
|
@@ -4,7 +4,7 @@ export interface SendPushNotificationCommand {
|
|
|
4
4
|
id: string;
|
|
5
5
|
type: 'SendPushNotificationCommand';
|
|
6
6
|
version: '0.0.1';
|
|
7
|
-
|
|
7
|
+
timestamp: string;
|
|
8
8
|
traceContext: {
|
|
9
9
|
traceId?: string;
|
|
10
10
|
};
|
|
@@ -18,4 +18,5 @@ export interface SendPushNotificationCommand {
|
|
|
18
18
|
data?: Record<string, any>;
|
|
19
19
|
};
|
|
20
20
|
};
|
|
21
|
+
source: string;
|
|
21
22
|
}
|