@compassdigital/sdk.typescript 4.3.0 → 4.4.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.
@@ -29,32 +29,7 @@ export interface TenderIs {
29
29
 
30
30
  export interface TendersAndAuth {
31
31
  tenders?: Tender[];
32
- auth?: {
33
- webview?: {
34
- url?: string;
35
- method?: string;
36
- encoding?: string;
37
- body?: {
38
- [index: string]: any;
39
- };
40
- };
41
- direct?: {
42
- name?: {
43
- en?: string;
44
- };
45
- description?: {
46
- en?: string;
47
- };
48
- username_field?: {
49
- en?: string;
50
- };
51
- password_field?: {
52
- en?: string;
53
- };
54
- username_value?: string;
55
- email_value?: string;
56
- };
57
- };
32
+ auth?: AuthPayload;
58
33
  }
59
34
 
60
35
  export interface VerifyEmail {
@@ -65,11 +40,40 @@ export interface success {
65
40
  success?: boolean;
66
41
  }
67
42
 
43
+ export interface AuthPayload {
44
+ webview?: {
45
+ url?: string;
46
+ method?: string;
47
+ encoding?: string;
48
+ body?: {
49
+ [index: string]: any;
50
+ };
51
+ };
52
+ direct?: {
53
+ name?: {
54
+ en?: string;
55
+ };
56
+ description?: {
57
+ en?: string;
58
+ };
59
+ username_field?: {
60
+ en?: string;
61
+ };
62
+ password_field?: {
63
+ en?: string;
64
+ };
65
+ username_value?: string;
66
+ email_value?: string;
67
+ };
68
+ }
69
+
68
70
  // POST /mealplan/{id} - Authenticate against the meal plan provider
69
71
 
70
72
  export interface PostMealplanPath {
71
73
  // Meal plan ID
72
74
  id: string;
75
+ // Tender ID
76
+ tender: string;
73
77
  }
74
78
 
75
79
  export interface PostMealplanBody {
@@ -92,6 +96,8 @@ export interface PostMealplanRequest extends BaseRequest, PostMealplanPath {
92
96
  export interface PutMealplanPath {
93
97
  // Meal plan ID
94
98
  id: string;
99
+ // Tender ID
100
+ tender: string;
95
101
  }
96
102
 
97
103
  export interface PutMealplanBody {
@@ -111,6 +117,8 @@ export interface PutMealplanRequest extends BaseRequest, PutMealplanPath {
111
117
  export interface GetMealplanPath {
112
118
  // Meal plan ID
113
119
  id: string;
120
+ // Tender ID
121
+ tender: string;
114
122
  }
115
123
 
116
124
  export interface GetMealplanQuery {
@@ -130,6 +138,8 @@ export interface GetMealplanRequest
130
138
  export interface DeleteMealplanPath {
131
139
  // Meal plan ID
132
140
  id: string;
141
+ // Tender ID
142
+ tender: string;
133
143
  }
134
144
 
135
145
  export interface DeleteMealplanBody {
@@ -154,6 +164,13 @@ export interface PostMealplanCallbackQuery {
154
164
  web?: boolean;
155
165
  }
156
166
 
167
+ export interface PostMealplanCallbackBody {
168
+ // Used for ITC SSO
169
+ Credential?: string;
170
+ // Used for ITC SSO
171
+ token?: string;
172
+ }
173
+
157
174
  export interface PostMealplanCallbackResponse {
158
175
  token?: string;
159
176
  // DH 1.0 format for returning the token
@@ -163,7 +180,9 @@ export interface PostMealplanCallbackResponse {
163
180
  export interface PostMealplanCallbackRequest
164
181
  extends BaseRequest,
165
182
  RequestQuery<PostMealplanCallbackQuery>,
166
- PostMealplanCallbackPath {}
183
+ PostMealplanCallbackPath {
184
+ body: PostMealplanCallbackBody;
185
+ }
167
186
 
168
187
  // GET /mealplan/{id}/tender/{tender} - Check the user's tender balance
169
188
 
@@ -195,6 +214,14 @@ export interface DeleteMealplanTenderPath {
195
214
  tender: string;
196
215
  }
197
216
 
217
+ export interface DeleteMealplanTenderBody {
218
+ amount: number;
219
+ type?: string;
220
+ conversion_amount?: number;
221
+ terminal_id?: string;
222
+ is_split_tender?: boolean;
223
+ }
224
+
198
225
  export interface DeleteMealplanTenderResponse {
199
226
  // tender
200
227
  id?: string;
@@ -202,12 +229,15 @@ export interface DeleteMealplanTenderResponse {
202
229
  balance?: number;
203
230
  is?: TenderIs;
204
231
  transaction_id?: string;
232
+ type?: number;
205
233
  tender_id?: number;
206
234
  currency?: string;
207
235
  transaction_amount?: number;
208
236
  }
209
237
 
210
- export interface DeleteMealplanTenderRequest extends BaseRequest, DeleteMealplanTenderPath {}
238
+ export interface DeleteMealplanTenderRequest extends BaseRequest, DeleteMealplanTenderPath {
239
+ body: DeleteMealplanTenderBody;
240
+ }
211
241
 
212
242
  // PATCH /mealplan/{id}/tender/{tender} - Refund an amount to the tender balance
213
243
 
@@ -219,7 +249,7 @@ export interface PatchMealplanTenderPath {
219
249
  }
220
250
 
221
251
  export interface PatchMealplanTenderBody {
222
- amount?: number;
252
+ amount: number;
223
253
  transaction_id?: string;
224
254
  // Amount for order paid by user
225
255
  transaction_amount?: number;
@@ -263,7 +293,9 @@ export interface PutMealplanVerifyPath {
263
293
  id: string;
264
294
  }
265
295
 
266
- export type PutMealplanVerifyBody = string;
296
+ export interface PutMealplanVerifyBody {
297
+ token?: string;
298
+ }
267
299
 
268
300
  export type PutMealplanVerifyResponse = success;
269
301
 
@@ -794,6 +794,7 @@ export interface BrandStatusDTO {
794
794
  brand_id?: FilterFieldDTO;
795
795
  type?: string;
796
796
  status?: string;
797
+ metadata?: FilterFieldDTO;
797
798
  id?: string;
798
799
  brand?: any;
799
800
  permissions?: FilterFieldDTO;
@@ -2356,7 +2357,7 @@ export interface PostMenuV3GlobalMenuGroupBody {
2356
2357
  allowed_local_menu_groups?: LocalMenuGroupDTO[];
2357
2358
  draft_brands?: DraftBrandDTO[];
2358
2359
  published_brands?: PublishedBrandDTO[];
2359
- posid_segment?: string;
2360
+ posid_segment: string;
2360
2361
  vendor_metadata?: VendorMetadataDTO[];
2361
2362
  permissions?: any;
2362
2363
  [index: string]: any;
@@ -2434,7 +2435,7 @@ export interface DeleteMenuV3GlobalMenuGroupResponse {
2434
2435
  allowed_local_menu_groups?: LocalMenuGroupDTO[];
2435
2436
  draft_brands?: DraftBrandDTO[];
2436
2437
  published_brands?: PublishedBrandDTO[];
2437
- posid_segment?: string;
2438
+ posid_segment: string;
2438
2439
  id?: string;
2439
2440
  created_at?: string;
2440
2441
  updated_at?: string;
@@ -2491,7 +2492,7 @@ export type PostMenuV3GlobalMenuGroupsBody = {
2491
2492
  allowed_local_menu_groups?: LocalMenuGroupDTO[];
2492
2493
  draft_brands?: DraftBrandDTO[];
2493
2494
  published_brands?: PublishedBrandDTO[];
2494
- posid_segment?: string;
2495
+ posid_segment: string;
2495
2496
  id?: any;
2496
2497
  vendor_metadata?: VendorMetadataDTO[];
2497
2498
  permissions?: any;
@@ -3059,7 +3060,6 @@ export interface GetMenuV3DraftBrandDiffsQuery {
3059
3060
  soft_deleted?: "include" | "exclude" | "only";
3060
3061
  // Graphql query string
3061
3062
  _query?: string;
3062
- nocache?: boolean;
3063
3063
  }
3064
3064
 
3065
3065
  export interface GetMenuV3DraftBrandDiffsResponse {
@@ -4590,21 +4590,55 @@ export interface PostMenuV3ItemAttachmentRequest
4590
4590
  RequestQuery<PostMenuV3ItemAttachmentQuery>,
4591
4591
  PostMenuV3ItemAttachmentPath {}
4592
4592
 
4593
+ // POST /menu/v3/items/validate
4594
+
4595
+ export interface PostMenuV3ItemsValidateBody {
4596
+ brand_id: string;
4597
+ category_id?: string;
4598
+ data: string;
4599
+ [index: string]: any;
4600
+ }
4601
+
4602
+ export interface PostMenuV3ItemsValidateResponse {
4603
+ s3_link?: string;
4604
+ }
4605
+
4606
+ export interface PostMenuV3ItemsValidateRequest extends BaseRequest {
4607
+ body: PostMenuV3ItemsValidateBody;
4608
+ }
4609
+
4593
4610
  // POST /menu/v3/items/import
4594
4611
 
4595
- export interface PostMenuV3ItemsImportQuery {
4596
- "body.brand_id"?: string;
4597
- "body.category_id"?: string;
4598
- "body.data"?: string;
4612
+ export interface PostMenuV3ItemsImportBody {
4613
+ brand_id: string;
4614
+ category_id?: string;
4615
+ data: string;
4616
+ [index: string]: any;
4599
4617
  }
4600
4618
 
4601
4619
  export interface PostMenuV3ItemsImportResponse {
4602
- results?: DraftItemEntityDTO[];
4620
+ status?: string;
4603
4621
  }
4604
4622
 
4605
- export interface PostMenuV3ItemsImportRequest
4606
- extends BaseRequest,
4607
- RequestQuery<PostMenuV3ItemsImportQuery> {}
4623
+ export interface PostMenuV3ItemsImportRequest extends BaseRequest {
4624
+ body: PostMenuV3ItemsImportBody;
4625
+ }
4626
+
4627
+ // POST /menu/v3/items/export
4628
+
4629
+ export interface PostMenuV3ItemsExportBody {
4630
+ brand_id: string;
4631
+ category_id?: string;
4632
+ [index: string]: any;
4633
+ }
4634
+
4635
+ export interface PostMenuV3ItemsExportResponse {
4636
+ s3_link?: string;
4637
+ }
4638
+
4639
+ export interface PostMenuV3ItemsExportRequest extends BaseRequest {
4640
+ body: PostMenuV3ItemsExportBody;
4641
+ }
4608
4642
 
4609
4643
  // GET /menu/v3/item/{id}
4610
4644
 
@@ -13,6 +13,10 @@ export interface CreateOrder {
13
13
  payment?: {
14
14
  token?: string;
15
15
  credit_card?: CreditCard;
16
+ badge_pay?: CashlessPayment;
17
+ stipend?: CashlessPayment;
18
+ voucher?: CashlessPayment;
19
+ coupon_voucher?: CashlessPayment;
16
20
  };
17
21
  mealplan?: MealPlan;
18
22
  // user
@@ -73,6 +73,8 @@ export interface User {
73
73
  verified?: boolean;
74
74
  // User phone number verification
75
75
  phone_verified?: boolean;
76
+ // User deleted status
77
+ deleted?: boolean;
76
78
  };
77
79
  permissions?: Scopes;
78
80
  // User location group
@@ -268,6 +270,8 @@ export interface CheckInUserInfo {
268
270
  longitude?: number;
269
271
  // NFC URI required for NFC check-in
270
272
  nfc_uri?: string;
273
+ // Balance of the user's mealplan tender
274
+ tender_balance?: number;
271
275
  }
272
276
 
273
277
  export interface Scopes {
@@ -413,6 +417,8 @@ export interface PutUserPath {
413
417
  }
414
418
 
415
419
  export interface PutUserQuery {
420
+ // The language of the user ex en, fr
421
+ lang?: string;
416
422
  // Use ACL permission system
417
423
  acl?: boolean;
418
424
  }
@@ -433,6 +439,8 @@ export interface PatchUserPath {
433
439
  }
434
440
 
435
441
  export interface PatchUserQuery {
442
+ // The language of the user ex en, fr
443
+ lang?: string;
436
444
  // Use ACL permission system
437
445
  acl?: boolean;
438
446
  }
@@ -504,9 +512,13 @@ export interface PatchUserAuthKdsPath {
504
512
  device_id: string;
505
513
  }
506
514
 
515
+ export type PatchUserAuthKdsBody = any;
516
+
507
517
  export type PatchUserAuthKdsResponse = KDSDevice;
508
518
 
509
- export interface PatchUserAuthKdsRequest extends BaseRequest, PatchUserAuthKdsPath {}
519
+ export interface PatchUserAuthKdsRequest extends BaseRequest, PatchUserAuthKdsPath {
520
+ body: PatchUserAuthKdsBody;
521
+ }
510
522
 
511
523
  // POST /user/{id}/changepassword - Change the users password
512
524
 
@@ -598,6 +610,8 @@ export interface PostUserResetPasswordTokenPath {
598
610
  export interface PostUserResetPasswordTokenQuery {
599
611
  // password reset token
600
612
  reset_token: string;
613
+ // The language of the user ex en, fr
614
+ lang?: string;
601
615
  }
602
616
 
603
617
  export type PostUserResetPasswordTokenBody = Resetpassword;
@@ -670,7 +684,9 @@ export interface PutUserPermissionsQuery {
670
684
  }
671
685
 
672
686
  export interface PutUserPermissionsBody {
673
- scopes?: Permission[];
687
+ permissions?: {
688
+ scopes?: Permission[];
689
+ };
674
690
  }
675
691
 
676
692
  export type PutUserPermissionsResponse = User;