@compassdigital/sdk.typescript 3.0.0-beta.16 → 3.0.0-beta.18

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.
@@ -0,0 +1,622 @@
1
+ // THIS FILE IS AUTOMATICALLY GENERATED, DO NOT MODIFY
2
+
3
+ export interface Menu {
4
+ // menu
5
+ id?: string;
6
+ date?: {
7
+ created?: string;
8
+ modified?: string;
9
+ published?: string;
10
+ };
11
+ label?: {
12
+ en?: string;
13
+ };
14
+ groups?: Group[];
15
+ // menu
16
+ parent_id?: string;
17
+ // brand
18
+ location_brand?: string;
19
+ // company
20
+ company?: string;
21
+ // sector
22
+ sector?: string;
23
+ is?: {
24
+ disabled?: boolean;
25
+ hidden?: boolean;
26
+ linked?: boolean;
27
+ promo_exemptions_enabled?: boolean;
28
+ plu_enabled?: boolean;
29
+ item_images_enabled?: boolean;
30
+ item_showcase_enabled?: boolean;
31
+ item_desc_edit_enabled?: boolean;
32
+ calories_edit_enabled?: boolean;
33
+ item_label_edit_enabled?: boolean;
34
+ };
35
+ meta?: {
36
+ // User ID
37
+ locked_by_user?: string;
38
+ // User ID
39
+ last_modified_user?: string;
40
+ [index: string]: any;
41
+ };
42
+ }
43
+
44
+ export interface Nutrition {
45
+ amount?: number;
46
+ unit?: string;
47
+ }
48
+
49
+ export interface Item {
50
+ // item
51
+ id?: string;
52
+ label?: {
53
+ en?: string;
54
+ };
55
+ description?: {
56
+ en?: string;
57
+ };
58
+ price?: {
59
+ amount?: number;
60
+ currency?: string;
61
+ };
62
+ // Meal exchange value of the item
63
+ meal_value?: number;
64
+ sale_price?: {
65
+ amount?: number;
66
+ currency?: string;
67
+ };
68
+ // The number of units that belong to this item. For example, a dozen doughnuts should have a unit value of 12
69
+ unit?: number;
70
+ ingredients?: any[];
71
+ amount_off_exclusions?: AmountOffExclusionTypes[];
72
+ nutrition?: {
73
+ kcal?: number;
74
+ calories?: Nutrition;
75
+ serving_size?: Nutrition;
76
+ total_fat?: Nutrition;
77
+ saturated_fat?: Nutrition;
78
+ trans_fat?: Nutrition;
79
+ cholesterol?: Nutrition;
80
+ sodium?: Nutrition;
81
+ total_carbohydrate?: Nutrition;
82
+ dietary_fiber?: Nutrition;
83
+ sugars?: Nutrition;
84
+ protein?: Nutrition;
85
+ well_being?: Nutrition;
86
+ [index: string]: any;
87
+ };
88
+ certified?: {
89
+ vegan?: boolean;
90
+ vegetarian?: boolean;
91
+ seafood_watch?: boolean;
92
+ wellbeing?: boolean;
93
+ farm_to_fork?: boolean;
94
+ in_balance?: boolean;
95
+ organic?: boolean;
96
+ no_gluten_ingredients?: boolean;
97
+ halal?: boolean;
98
+ kosher?: boolean;
99
+ humane?: boolean;
100
+ locally_crafted?: boolean;
101
+ nuts?: boolean;
102
+ oracle_garden_grown?: boolean;
103
+ oracle_oyes?: boolean;
104
+ peanut_free?: boolean;
105
+ tree_nut_free?: boolean;
106
+ wheat_free?: boolean;
107
+ non_gmo?: boolean;
108
+ milk_free?: boolean;
109
+ egg_free?: boolean;
110
+ soy_free?: boolean;
111
+ fair_trade?: boolean;
112
+ rainforest_alliance?: boolean;
113
+ salt_free?: boolean;
114
+ };
115
+ options?: OptionsGroup[];
116
+ required?: boolean;
117
+ special?: boolean;
118
+ meta?: {
119
+ superplate?: {
120
+ type_id?: number;
121
+ type?: string;
122
+ };
123
+ featured?: {
124
+ sort_number?: number;
125
+ dates?: {
126
+ start?: string;
127
+ end?: string;
128
+ };
129
+ };
130
+ };
131
+ category?: {
132
+ en?: string;
133
+ };
134
+ location?: string;
135
+ sku?: number;
136
+ item_number?: number;
137
+ image?: {
138
+ src?: string;
139
+ };
140
+ is_deleted?: boolean;
141
+ is?: {
142
+ disabled?: boolean;
143
+ hidden?: boolean;
144
+ meq_eligible?: boolean;
145
+ out_of_stock?: boolean;
146
+ deleted?: boolean;
147
+ featured?: boolean;
148
+ };
149
+ }
150
+
151
+ export interface Group {
152
+ // group
153
+ id?: string;
154
+ label?: {
155
+ en?: string;
156
+ fr?: string;
157
+ };
158
+ items?: Item[];
159
+ is_disabled?: boolean;
160
+ name?: string;
161
+ is?: {
162
+ disabled?: boolean;
163
+ hidden?: boolean;
164
+ };
165
+ meta?: any;
166
+ }
167
+
168
+ export interface Option {
169
+ // option
170
+ id?: string;
171
+ label?: {
172
+ en?: string;
173
+ };
174
+ price?: {
175
+ amount?: number;
176
+ currency?: string;
177
+ };
178
+ sku?: number;
179
+ nutrition?: {
180
+ kcal?: number;
181
+ calories?: Nutrition;
182
+ };
183
+ certified?: {
184
+ vegan?: boolean;
185
+ };
186
+ modifier_sets?: {
187
+ category?: string;
188
+ list?: string[];
189
+ }[];
190
+ meta?: any;
191
+ is?: {
192
+ disabled?: boolean;
193
+ hidden?: boolean;
194
+ out_of_stock?: boolean;
195
+ };
196
+ amount_off_exclusions?: AmountOffExclusionTypes[];
197
+ }
198
+
199
+ export interface OptionsGroup {
200
+ // modifier_group
201
+ id?: string;
202
+ label?: {
203
+ en?: string;
204
+ };
205
+ unique_name?: string;
206
+ items?: Option[];
207
+ min?: number;
208
+ max?: number;
209
+ is?: {
210
+ disabled?: boolean;
211
+ hidden?: boolean;
212
+ out_of_stock?: boolean;
213
+ };
214
+ meta?: any;
215
+ [index: string]: any;
216
+ }
217
+
218
+ export interface OptionsGroupList {
219
+ modifier_groups?: OptionsGroup[];
220
+ }
221
+
222
+ export interface CreateOptionsGroup {
223
+ label: {
224
+ en?: string;
225
+ };
226
+ unique_name: string;
227
+ items?: Option[];
228
+ min?: number;
229
+ max?: number;
230
+ is?: {
231
+ disabled?: boolean;
232
+ hidden?: boolean;
233
+ out_of_stock?: boolean;
234
+ };
235
+ meta?: any;
236
+ // company
237
+ company: string;
238
+ }
239
+
240
+ export interface Success {
241
+ success?: boolean;
242
+ }
243
+
244
+ export interface Error {
245
+ error?: string;
246
+ code?: number;
247
+ }
248
+
249
+ export type AmountOffExclusionTypes = string;
250
+
251
+ export interface Menus {
252
+ menus?: Menu[];
253
+ }
254
+
255
+ export interface Items {
256
+ items?: Item[];
257
+ }
258
+
259
+ export interface PatchMenu {
260
+ // menu
261
+ id?: string;
262
+ meta?: {
263
+ // User ID
264
+ locked_by_user?: string;
265
+ };
266
+ }
267
+
268
+ export interface ZippedExcelExport {
269
+ file?: string;
270
+ // Base64 encoded file format
271
+ format?: string;
272
+ }
273
+
274
+ // GET /menu/client/{client_id} - Get menu client
275
+
276
+ export interface GetMenuClientPath {
277
+ client_id: string;
278
+ }
279
+
280
+ export type GetMenuClientResponse = Menus;
281
+
282
+ export interface GetMenuClientRequest extends GetMenuClientPath {}
283
+
284
+ // GET /menu - Get Menus or search for Menus
285
+
286
+ export interface GetMenusQuery {
287
+ query: string;
288
+ }
289
+
290
+ export type GetMenusResponse = Menus;
291
+
292
+ export interface GetMenusRequest extends GetMenusQuery {}
293
+
294
+ // POST /menu - Create a new Menu
295
+
296
+ export type PostMenuBody = Menu;
297
+
298
+ export type PostMenuResponse = Menu;
299
+
300
+ export interface PostMenuRequest {
301
+ body: PostMenuBody;
302
+ }
303
+
304
+ // HEAD /menu/{id} - Get an individual Menu
305
+
306
+ export interface HeadMenuPath {
307
+ // menu
308
+ id: string;
309
+ }
310
+
311
+ export interface HeadMenuQuery {
312
+ // fields to return
313
+ _query?: string;
314
+ }
315
+
316
+ export type HeadMenuResponse = any;
317
+
318
+ export interface HeadMenuRequest extends HeadMenuQuery, HeadMenuPath {}
319
+
320
+ // GET /menu/{id} - Get an individual Menu
321
+
322
+ export interface GetMenuPath {
323
+ // menu
324
+ id: string;
325
+ }
326
+
327
+ export interface GetMenuQuery {
328
+ // Show additional fields like hidden menu items, parent_id,company,sector,location_brand,overrides. Defaults to false
329
+ extended?: boolean;
330
+ // Show unlinked groups
331
+ show_unlinked?: boolean;
332
+ // fields to return
333
+ _query?: string;
334
+ }
335
+
336
+ export type GetMenuResponse = Menu;
337
+
338
+ export interface GetMenuRequest extends GetMenuQuery, GetMenuPath {}
339
+
340
+ // PUT /menu/{id} - Override a complete Menu
341
+
342
+ export interface PutMenuPath {
343
+ // menu
344
+ id: string;
345
+ }
346
+
347
+ export interface PutMenuQuery {
348
+ // fields to return
349
+ _query?: string;
350
+ }
351
+
352
+ export type PutMenuBody = Menu;
353
+
354
+ export type PutMenuResponse = Menu;
355
+
356
+ export interface PutMenuRequest extends PutMenuQuery, PutMenuPath {
357
+ body: PutMenuBody;
358
+ }
359
+
360
+ // DELETE /menu/{id} - Delete a Menu
361
+
362
+ export interface DeleteMenuPath {
363
+ // menu
364
+ id: string;
365
+ }
366
+
367
+ export interface DeleteMenuQuery {
368
+ // fields to return
369
+ _query?: string;
370
+ }
371
+
372
+ export type DeleteMenuResponse = Success;
373
+
374
+ export interface DeleteMenuRequest extends DeleteMenuQuery, DeleteMenuPath {}
375
+
376
+ // PATCH /menu/{id} - Update a menu
377
+
378
+ export interface PatchMenuPath {
379
+ // menu
380
+ id: string;
381
+ }
382
+
383
+ export interface PatchMenuQuery {
384
+ // fields to return
385
+ _query?: string;
386
+ }
387
+
388
+ export type PatchMenuBody = PatchMenu;
389
+
390
+ export type PatchMenuResponse = Menu;
391
+
392
+ export interface PatchMenuRequest extends PatchMenuQuery, PatchMenuPath {
393
+ body: PatchMenuBody;
394
+ }
395
+
396
+ // POST /menu/import - Import an existing Menu
397
+
398
+ export interface PostMenuImportMenuBody {
399
+ menu: {
400
+ // menu
401
+ menu?: string;
402
+ };
403
+ }
404
+
405
+ export type PostMenuImportMenuResponse = Menu;
406
+
407
+ export interface PostMenuImportMenuRequest {
408
+ body: PostMenuImportMenuBody;
409
+ }
410
+
411
+ // GET /menu/item/{id} - Get menu item
412
+
413
+ export interface GetMenuItemPath {
414
+ // Item ID
415
+ id: string;
416
+ }
417
+
418
+ export type GetMenuItemResponse = Item;
419
+
420
+ export interface GetMenuItemRequest extends GetMenuItemPath {}
421
+
422
+ // DELETE /menu/item/{id} - Delete a menu item
423
+
424
+ export interface DeleteMenuItemPath {
425
+ // Item ID
426
+ id: string;
427
+ }
428
+
429
+ export type DeleteMenuItemResponse = Success;
430
+
431
+ export interface DeleteMenuItemRequest extends DeleteMenuItemPath {}
432
+
433
+ // POST /menu/item - Create a menu item
434
+
435
+ export type PostMenuItemBody = Item;
436
+
437
+ export type PostMenuItemResponse = Item;
438
+
439
+ export interface PostMenuItemRequest {
440
+ body: PostMenuItemBody;
441
+ }
442
+
443
+ // GET /menu/items - Search for menu items
444
+
445
+ export interface GetMenuItemsQuery {
446
+ query: string;
447
+ }
448
+
449
+ export type GetMenuItemsResponse = Items;
450
+
451
+ export interface GetMenuItemsRequest extends GetMenuItemsQuery {}
452
+
453
+ // POST /menu/items/import/{location} - trigger import items
454
+
455
+ export interface PostMenuImportItemsCanteenPath {
456
+ // Location ID
457
+ location: string;
458
+ }
459
+
460
+ export type PostMenuImportItemsCanteenResponse = Success;
461
+
462
+ export interface PostMenuImportItemsCanteenRequest extends PostMenuImportItemsCanteenPath {}
463
+
464
+ // GET /menu/items/location/{location} - Get all menu items for a location
465
+
466
+ export interface GetMenuLocationItemsPath {
467
+ // Location ID
468
+ location: string;
469
+ }
470
+
471
+ export type GetMenuLocationItemsResponse = Items;
472
+
473
+ export interface GetMenuLocationItemsRequest extends GetMenuLocationItemsPath {}
474
+
475
+ // GET /menu/item/random/location/{location} - Get a random item
476
+
477
+ export interface GetMenuLocationItemRandomPath {
478
+ // Location ID
479
+ location: string;
480
+ }
481
+
482
+ export interface GetMenuLocationItemRandomQuery {
483
+ // The idfa of the requesting device
484
+ idfa?: string;
485
+ // Is this device being used in a public area
486
+ is_public?: boolean;
487
+ // The start of the session, prevents duplicates for any items voted on from the start time.
488
+ start_time?: number;
489
+ }
490
+
491
+ export type GetMenuLocationItemRandomResponse = Item;
492
+
493
+ export interface GetMenuLocationItemRandomRequest
494
+ extends GetMenuLocationItemRandomQuery,
495
+ GetMenuLocationItemRandomPath {}
496
+
497
+ // GET /menu/items/random/location/{location} - Get a set of random items
498
+
499
+ export interface GetMenuLocationItemsRandomPath {
500
+ // Location ID
501
+ location: string;
502
+ }
503
+
504
+ export interface GetMenuLocationItemsRandomQuery {
505
+ // The idfa of the requesting device
506
+ idfa?: string;
507
+ // Is this device being used in a public area
508
+ is_public?: boolean;
509
+ // The number of items to return. Max is 5
510
+ count?: number;
511
+ // The start of the session, prevents duplicates for any items voted on from the start time.
512
+ start_time?: number;
513
+ }
514
+
515
+ export type GetMenuLocationItemsRandomResponse = Items;
516
+
517
+ export interface GetMenuLocationItemsRandomRequest
518
+ extends GetMenuLocationItemsRandomQuery,
519
+ GetMenuLocationItemsRandomPath {}
520
+
521
+ // GET /menu/sector/{sector} - Get menus that belong to sector
522
+
523
+ export interface GetMenuSectorMenusPath {
524
+ // Sector ID
525
+ sector: string;
526
+ }
527
+
528
+ export type GetMenuSectorMenusResponse = Menus;
529
+
530
+ export interface GetMenuSectorMenusRequest extends GetMenuSectorMenusPath {}
531
+
532
+ // GET /menu/company/{company} - Get menus that belong to company
533
+
534
+ export interface GetMenuCompanyMenusPath {
535
+ // Company ID
536
+ company: string;
537
+ }
538
+
539
+ export type GetMenuCompanyMenusResponse = Menus;
540
+
541
+ export interface GetMenuCompanyMenusRequest extends GetMenuCompanyMenusPath {}
542
+
543
+ // POST /menu/modifier/group - Create a new Menu Modifier Group
544
+
545
+ export type PostMenuModifierGroupBody = CreateOptionsGroup;
546
+
547
+ export type PostMenuModifierGroupResponse = OptionsGroup;
548
+
549
+ export interface PostMenuModifierGroupRequest {
550
+ body: PostMenuModifierGroupBody;
551
+ }
552
+
553
+ // GET /menu/modifier/group/{id} - Get a Menu Modifier Group
554
+
555
+ export interface GetMenuModifierGroupPath {
556
+ // modifier_group
557
+ id: string;
558
+ }
559
+
560
+ export type GetMenuModifierGroupResponse = OptionsGroup;
561
+
562
+ export interface GetMenuModifierGroupRequest extends GetMenuModifierGroupPath {}
563
+
564
+ // PUT /menu/modifier/group/{id} - Update a Menu Modifier Group
565
+
566
+ export interface PutMenuModifierGroupPath {
567
+ // modifier_group
568
+ id: string;
569
+ }
570
+
571
+ export type PutMenuModifierGroupBody = OptionsGroup;
572
+
573
+ export type PutMenuModifierGroupResponse = OptionsGroup;
574
+
575
+ export interface PutMenuModifierGroupRequest extends PutMenuModifierGroupPath {
576
+ body: PutMenuModifierGroupBody;
577
+ }
578
+
579
+ // DELETE /menu/modifier/group/{id} - Delete a Menu Modifier Group
580
+
581
+ export interface DeleteMenuModifierGroupPath {
582
+ // modifier_group
583
+ id: string;
584
+ }
585
+
586
+ export type DeleteMenuModifierGroupResponse = Success;
587
+
588
+ export interface DeleteMenuModifierGroupRequest extends DeleteMenuModifierGroupPath {}
589
+
590
+ // GET /menu/modifier/group/company/{company} - Get the modifier groups that belong to company
591
+
592
+ export interface GetMenuCompanyModifierGroupsPath {
593
+ // Company ID
594
+ company: string;
595
+ }
596
+
597
+ export type GetMenuCompanyModifierGroupsResponse = OptionsGroupList;
598
+
599
+ export interface GetMenuCompanyModifierGroupsRequest extends GetMenuCompanyModifierGroupsPath {}
600
+
601
+ // GET /menu/modifier/group/company/{company}/export - Export company modifier groups to zipped excel file.
602
+
603
+ export interface GetMenuCompanyModifierGroupsExportPath {
604
+ // Company ID
605
+ company: string;
606
+ }
607
+
608
+ export type GetMenuCompanyModifierGroupsExportResponse = ZippedExcelExport;
609
+
610
+ export interface GetMenuCompanyModifierGroupsExportRequest
611
+ extends GetMenuCompanyModifierGroupsExportPath {}
612
+
613
+ // GET /menu/{id}/export - Export menu set to zipped excel file.
614
+
615
+ export interface GetMenuExportPath {
616
+ // menu; TODO: cannot use compassdigital.id as path parameter
617
+ id: string;
618
+ }
619
+
620
+ export type GetMenuExportResponse = ZippedExcelExport;
621
+
622
+ export interface GetMenuExportRequest extends GetMenuExportPath {}