@compassdigital/sdk.typescript 4.108.0 → 4.110.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.
Files changed (44) hide show
  1. package/lib/index.d.ts +115 -12
  2. package/lib/index.d.ts.map +1 -1
  3. package/lib/index.js +125 -10
  4. package/lib/index.js.map +1 -1
  5. package/lib/interface/ai.d.ts +0 -10
  6. package/lib/interface/ai.d.ts.map +1 -1
  7. package/lib/interface/auth.d.ts +5 -22
  8. package/lib/interface/auth.d.ts.map +1 -1
  9. package/lib/interface/centricos.d.ts +88 -69
  10. package/lib/interface/centricos.d.ts.map +1 -1
  11. package/lib/interface/consumer.d.ts +174 -14
  12. package/lib/interface/consumer.d.ts.map +1 -1
  13. package/lib/interface/discount.d.ts +25 -29
  14. package/lib/interface/discount.d.ts.map +1 -1
  15. package/lib/interface/frictionless.d.ts +0 -25
  16. package/lib/interface/frictionless.d.ts.map +1 -1
  17. package/lib/interface/menu.d.ts +14 -2
  18. package/lib/interface/menu.d.ts.map +1 -1
  19. package/lib/interface/promo.d.ts +59 -0
  20. package/lib/interface/promo.d.ts.map +1 -1
  21. package/lib/interface/review.d.ts +0 -8
  22. package/lib/interface/review.d.ts.map +1 -1
  23. package/lib/interface/search.d.ts +7 -7
  24. package/lib/interface/search.d.ts.map +1 -1
  25. package/lib/interface/tax.d.ts +0 -6
  26. package/lib/interface/tax.d.ts.map +1 -1
  27. package/lib/interface/user.d.ts +10 -1
  28. package/lib/interface/user.d.ts.map +1 -1
  29. package/manifest.json +36 -9
  30. package/package.json +2 -2
  31. package/pipeline.yml +1 -0
  32. package/src/index.ts +304 -18
  33. package/src/interface/ai.ts +0 -12
  34. package/src/interface/auth.ts +6 -30
  35. package/src/interface/centricos.ts +146 -108
  36. package/src/interface/consumer.ts +277 -23
  37. package/src/interface/discount.ts +32 -35
  38. package/src/interface/frictionless.ts +0 -47
  39. package/src/interface/menu.ts +14 -2
  40. package/src/interface/promo.ts +73 -0
  41. package/src/interface/review.ts +0 -11
  42. package/src/interface/search.ts +8 -8
  43. package/src/interface/tax.ts +0 -6
  44. package/src/interface/user.ts +14 -2
@@ -723,6 +723,7 @@ export interface DraftItemToModifierGroupRelationshipDTO {
723
723
  brand?: DraftBrandDTO;
724
724
  changes?: ItemToModifierGroupRelationshipChangeDTO[];
725
725
  vendor_metadata?: VendorMetadataDTO[];
726
+ is_global?: boolean;
726
727
  permissions?: Record<string, any>;
727
728
  [index: string]: any;
728
729
  }
@@ -768,6 +769,7 @@ export interface DraftModifierGroupToModifierRelationshipDTO {
768
769
  brand?: DraftBrandDTO;
769
770
  changes?: ModifierGroupToModifierRelationshipChangeDTO[];
770
771
  vendor_metadata?: VendorMetadataDTO[];
772
+ is_global?: boolean;
771
773
  permissions?: Record<string, any>;
772
774
  [index: string]: any;
773
775
  }
@@ -829,7 +831,7 @@ export interface ReportingMetadataDTO {
829
831
  }
830
832
 
831
833
  export interface ReportingCategoryMetadataDTO {
832
- primary?: 'Food' | 'Beverage' | 'Sundry' | 'Alcohol' | 'Snack';
834
+ primary?: 'Alcohol' | 'Beverage' | 'Food' | 'Gift Cards' | 'Snack' | 'Sundry';
833
835
  secondary?: string;
834
836
  [index: string]: any;
835
837
  }
@@ -1162,6 +1164,7 @@ export interface PublishedItemToModifierGroupRelationshipDTO {
1162
1164
  item_id?: string;
1163
1165
  brand_id?: string;
1164
1166
  sequence?: number;
1167
+ is_global?: boolean;
1165
1168
  permissions?: Record<string, any>;
1166
1169
  [index: string]: any;
1167
1170
  }
@@ -1191,6 +1194,7 @@ export interface PublishedModifierGroupToModifierRelationshipDTO {
1191
1194
  modifier_group_id?: string;
1192
1195
  brand_id?: string;
1193
1196
  sequence?: number;
1197
+ is_global?: boolean;
1194
1198
  permissions?: Record<string, any>;
1195
1199
  [index: string]: any;
1196
1200
  }
@@ -5573,6 +5577,7 @@ export interface PostMenuV3DraftItemRelationshipsModifierGroupBody {
5573
5577
  brand?: DraftBrandDTO;
5574
5578
  changes?: ItemToModifierGroupRelationshipChangeDTO[];
5575
5579
  vendor_metadata?: VendorMetadataDTO[];
5580
+ is_global?: boolean;
5576
5581
  permissions?: Record<string, any>;
5577
5582
  [index: string]: any;
5578
5583
  }
@@ -5629,6 +5634,7 @@ export interface PatchMenuV3DraftItemRelationshipsModifierGroupBody {
5629
5634
  brand?: DraftBrandDTO;
5630
5635
  changes?: ItemToModifierGroupRelationshipChangeDTO[];
5631
5636
  vendor_metadata?: VendorMetadataDTO[];
5637
+ is_global?: boolean;
5632
5638
  permissions?: Record<string, any>;
5633
5639
  [index: string]: any;
5634
5640
  }
@@ -5707,6 +5713,7 @@ export type PostMenuV3DraftItemRelationshipsModifierGroupsBody = {
5707
5713
  brand?: DraftBrandDTO;
5708
5714
  changes?: ItemToModifierGroupRelationshipChangeDTO[];
5709
5715
  vendor_metadata?: VendorMetadataDTO[];
5716
+ is_global?: boolean;
5710
5717
  permissions?: Record<string, any>;
5711
5718
  [index: string]: any;
5712
5719
  }[];
@@ -6208,6 +6215,7 @@ export interface PostMenuV3DraftModifierGroupRelationshipsModifierBody {
6208
6215
  brand?: DraftBrandDTO;
6209
6216
  changes?: ModifierGroupToModifierRelationshipChangeDTO[];
6210
6217
  vendor_metadata?: VendorMetadataDTO[];
6218
+ is_global?: boolean;
6211
6219
  permissions?: Record<string, any>;
6212
6220
  [index: string]: any;
6213
6221
  }
@@ -6264,6 +6272,7 @@ export interface PatchMenuV3DraftModifierGroupRelationshipsModifierBody {
6264
6272
  brand?: DraftBrandDTO;
6265
6273
  changes?: ModifierGroupToModifierRelationshipChangeDTO[];
6266
6274
  vendor_metadata?: VendorMetadataDTO[];
6275
+ is_global?: boolean;
6267
6276
  permissions?: Record<string, any>;
6268
6277
  [index: string]: any;
6269
6278
  }
@@ -6342,6 +6351,7 @@ export type PostMenuV3DraftModifierGroupRelationshipsModifiersBody = {
6342
6351
  brand?: DraftBrandDTO;
6343
6352
  changes?: ModifierGroupToModifierRelationshipChangeDTO[];
6344
6353
  vendor_metadata?: VendorMetadataDTO[];
6354
+ is_global?: boolean;
6345
6355
  permissions?: Record<string, any>;
6346
6356
  [index: string]: any;
6347
6357
  }[];
@@ -7037,7 +7047,7 @@ export interface PostMenuV3GlobalDiffRecoverRequest
7037
7047
 
7038
7048
  export interface GetMenuV3MenuworksQuery {
7039
7049
  unit_id?: string;
7040
- MRN?: number;
7050
+ MRN?: string;
7041
7051
  // Graphql query string
7042
7052
  _query?: string;
7043
7053
  }
@@ -7048,6 +7058,7 @@ export interface GetMenuV3MenuworksResponse {
7048
7058
  name?: string;
7049
7059
  short_name?: string;
7050
7060
  description?: string;
7061
+ portion_size: string;
7051
7062
  MRN?: string;
7052
7063
  portion_quantity?: number;
7053
7064
  portion_unit_name?: string;
@@ -9280,6 +9291,7 @@ export type PostMenuV4ModifierGroupAttachModifiersBody = {
9280
9291
  brand?: DraftBrandDTO;
9281
9292
  changes?: ModifierGroupToModifierRelationshipChangeDTO[];
9282
9293
  vendor_metadata?: VendorMetadataDTO[];
9294
+ is_global?: boolean;
9283
9295
  permissions?: Record<string, any>;
9284
9296
  [index: string]: any;
9285
9297
  }[];
@@ -149,6 +149,24 @@ export interface PromoValidateRequest {
149
149
  };
150
150
  }
151
151
 
152
+ export interface PromoVouchersValidateRequest {
153
+ codes?: string[];
154
+ email?: string;
155
+ app?: string;
156
+ realm?: string;
157
+ location_brand?: string;
158
+ shoppingcart?: {
159
+ id?: string;
160
+ date_created?: string;
161
+ items?: ItemResponse[];
162
+ };
163
+ totals?: {
164
+ amount?: number;
165
+ discount?: number;
166
+ currency?: string;
167
+ };
168
+ }
169
+
152
170
  export interface PromoRedeemRequest {
153
171
  code?: string;
154
172
  email?: string;
@@ -169,6 +187,26 @@ export interface PromoRedeemRequest {
169
187
  payment_request_id?: string;
170
188
  }
171
189
 
190
+ export interface PromoRedeemVouchersRequest {
191
+ codes?: string[];
192
+ email?: string;
193
+ app?: string;
194
+ realm?: string;
195
+ location_brand?: string;
196
+ shoppingcart?: {
197
+ id?: string;
198
+ date_created?: string;
199
+ items?: ItemResponse[];
200
+ };
201
+ totals?: {
202
+ amount?: number;
203
+ discount?: number;
204
+ currency?: string;
205
+ };
206
+ provider_data?: FPValidationData;
207
+ payment_request_id?: string;
208
+ }
209
+
172
210
  export interface CreateVoucher {
173
211
  code?: string;
174
212
  discount?: {
@@ -190,6 +228,19 @@ export interface Voucher {
190
228
  discount?: AppliedDiscount;
191
229
  app?: string;
192
230
  provider_data?: FPValidationData;
231
+ redeemables?: Redeemable[];
232
+ [index: string]: any;
233
+ }
234
+
235
+ export interface Redeemable {
236
+ status?: string;
237
+ // redeemable
238
+ id?: string;
239
+ object?: string;
240
+ result?: {
241
+ discount?: AppliedDiscount;
242
+ [index: string]: any;
243
+ };
193
244
  [index: string]: any;
194
245
  }
195
246
 
@@ -510,6 +561,16 @@ export interface PostPromoValidateVoucherRequest extends BaseRequest {
510
561
  body: PostPromoValidateVoucherBody;
511
562
  }
512
563
 
564
+ // POST /promo/validate/vouchers - Validate multiple promo vouchers
565
+
566
+ export type PostPromoValidateVouchersBody = PromoVouchersValidateRequest;
567
+
568
+ export type PostPromoValidateVouchersResponse = Voucher;
569
+
570
+ export interface PostPromoValidateVouchersRequest extends BaseRequest {
571
+ body: PostPromoValidateVouchersBody;
572
+ }
573
+
513
574
  // POST /promo/redeem/voucher - Redeem a promo voucher
514
575
 
515
576
  export type PostPromoRedeemVoucherBody = PromoRedeemRequest;
@@ -520,6 +581,18 @@ export interface PostPromoRedeemVoucherRequest extends BaseRequest {
520
581
  body: PostPromoRedeemVoucherBody;
521
582
  }
522
583
 
584
+ // POST /promo/redeem/vouchers - Redeem multiple promo vouchers
585
+
586
+ export type PostPromoRedeemVouchersBody = PromoRedeemVouchersRequest;
587
+
588
+ export interface PostPromoRedeemVouchersResponse {
589
+ redemptions?: Redemption[];
590
+ }
591
+
592
+ export interface PostPromoRedeemVouchersRequest extends BaseRequest {
593
+ body: PostPromoRedeemVouchersBody;
594
+ }
595
+
523
596
  // POST /promo/voucher - Create new voucher
524
597
 
525
598
  export type PostPromoVoucherBody = CreateVoucher;
@@ -72,18 +72,12 @@ export interface GetReviewsQuery {
72
72
 
73
73
  export type GetReviewsResponse = GetReviewsResponseDTO;
74
74
 
75
- export interface GetReviewsRequest extends BaseRequest, RequestQuery<GetReviewsQuery> {}
76
-
77
75
  // POST /review - Post a review
78
76
 
79
77
  export type PostReviewBody = PostReviewRequestDTO;
80
78
 
81
79
  export type PostReviewResponse = PostReviewResponseDTO;
82
80
 
83
- export interface PostReviewRequest extends BaseRequest {
84
- body: PostReviewBody;
85
- }
86
-
87
81
  // GET /review/{id} - Get a review
88
82
 
89
83
  export interface GetReviewPath {
@@ -96,8 +90,3 @@ export interface GetReviewQuery {
96
90
  }
97
91
 
98
92
  export type GetReviewResponse = GetReviewResponseDTO;
99
-
100
- export interface GetReviewRequest
101
- extends BaseRequest,
102
- RequestQuery<GetReviewQuery>,
103
- GetReviewPath {}
@@ -6,8 +6,8 @@ import { RequestQuery, BaseRequest } from './util';
6
6
  export interface MetaResultsDto {
7
7
  limit: number;
8
8
  page: number;
9
- sortBy?: Record<string, any>;
10
- sortOrder?: Record<string, any>;
9
+ sortBy?: string;
10
+ sortOrder?: string;
11
11
  totalResults: number;
12
12
  totalPages: number;
13
13
  resultsCount: number;
@@ -84,6 +84,12 @@ export interface GetOrderPaginatedResult {
84
84
  results: GetOrderDto[];
85
85
  }
86
86
 
87
+ export interface UnauthorizedErrorDTO {
88
+ message: string;
89
+ code: number;
90
+ data: Record<string, any>;
91
+ }
92
+
87
93
  export interface GetLocationDto {
88
94
  source_id: string;
89
95
  source_type: string;
@@ -150,8 +156,6 @@ export interface GetSearchOrderQuery {
150
156
 
151
157
  export type GetSearchOrderResponse = GetOrderPaginatedResult;
152
158
 
153
- export interface GetSearchOrderRequest extends BaseRequest, RequestQuery<GetSearchOrderQuery> {}
154
-
155
159
  // GET /search/location
156
160
 
157
161
  export interface GetSearchLocationQuery {
@@ -172,7 +176,3 @@ export interface GetSearchLocationQuery {
172
176
  }
173
177
 
174
178
  export type GetSearchLocationResponse = GetLocationPaginatedResult;
175
-
176
- export interface GetSearchLocationRequest
177
- extends BaseRequest,
178
- RequestQuery<GetSearchLocationQuery> {}
@@ -107,14 +107,8 @@ export interface TaxHealthCheckQuery {
107
107
 
108
108
  export type TaxHealthCheckResponse = {};
109
109
 
110
- export interface TaxHealthCheckRequest extends BaseRequest, RequestQuery<TaxHealthCheckQuery> {}
111
-
112
110
  // POST /tax/quote - get tax quote from 3rd party tax library
113
111
 
114
112
  export type PostQuoteTaxBody = TaxRequestDTO;
115
113
 
116
114
  export type PostQuoteTaxResponse = TaxResponseDTO;
117
-
118
- export interface PostQuoteTaxRequest extends BaseRequest {
119
- body: PostQuoteTaxBody;
120
- }
@@ -322,6 +322,11 @@ export interface UserMeta {
322
322
  [index: string]: any;
323
323
  }
324
324
 
325
+ export interface Pagination {
326
+ last_key?: string;
327
+ count?: number;
328
+ }
329
+
325
330
  // GET /user/auth - Gets the JWT token for a user
326
331
 
327
332
  export interface GetUserAuthQuery {
@@ -645,17 +650,24 @@ export interface GetUserRealmUsersPath {
645
650
  }
646
651
 
647
652
  export interface GetUserRealmUsersQuery {
648
- // Max number of records to return. Defaults to 100
653
+ // Max number of records to return. Defaults to 100. Max 10,000.
649
654
  max?: number;
650
655
  // Last modified date greater than this parameter
651
656
  lastmodified_start?: string;
652
657
  // Use ACL permission system
653
658
  acl?: boolean;
659
+ // If true, the response will include pagination metadata
660
+ paginate?: boolean;
661
+ // The last key from the previous response for pagination
662
+ last_key?: string;
654
663
  // Graphql query string
655
664
  _query?: string;
656
665
  }
657
666
 
658
- export type GetUserRealmUsersResponse = Users;
667
+ export interface GetUserRealmUsersResponse {
668
+ users?: User[];
669
+ meta?: Pagination;
670
+ }
659
671
 
660
672
  export interface GetUserRealmUsersRequest
661
673
  extends BaseRequest,