@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.
- package/lib/index.d.ts +115 -12
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +125 -10
- package/lib/index.js.map +1 -1
- package/lib/interface/ai.d.ts +0 -10
- package/lib/interface/ai.d.ts.map +1 -1
- package/lib/interface/auth.d.ts +5 -22
- package/lib/interface/auth.d.ts.map +1 -1
- package/lib/interface/centricos.d.ts +88 -69
- package/lib/interface/centricos.d.ts.map +1 -1
- package/lib/interface/consumer.d.ts +174 -14
- package/lib/interface/consumer.d.ts.map +1 -1
- package/lib/interface/discount.d.ts +25 -29
- package/lib/interface/discount.d.ts.map +1 -1
- package/lib/interface/frictionless.d.ts +0 -25
- package/lib/interface/frictionless.d.ts.map +1 -1
- package/lib/interface/menu.d.ts +14 -2
- package/lib/interface/menu.d.ts.map +1 -1
- package/lib/interface/promo.d.ts +59 -0
- package/lib/interface/promo.d.ts.map +1 -1
- package/lib/interface/review.d.ts +0 -8
- package/lib/interface/review.d.ts.map +1 -1
- package/lib/interface/search.d.ts +7 -7
- package/lib/interface/search.d.ts.map +1 -1
- package/lib/interface/tax.d.ts +0 -6
- package/lib/interface/tax.d.ts.map +1 -1
- package/lib/interface/user.d.ts +10 -1
- package/lib/interface/user.d.ts.map +1 -1
- package/manifest.json +36 -9
- package/package.json +2 -2
- package/pipeline.yml +1 -0
- package/src/index.ts +304 -18
- package/src/interface/ai.ts +0 -12
- package/src/interface/auth.ts +6 -30
- package/src/interface/centricos.ts +146 -108
- package/src/interface/consumer.ts +277 -23
- package/src/interface/discount.ts +32 -35
- package/src/interface/frictionless.ts +0 -47
- package/src/interface/menu.ts +14 -2
- package/src/interface/promo.ts +73 -0
- package/src/interface/review.ts +0 -11
- package/src/interface/search.ts +8 -8
- package/src/interface/tax.ts +0 -6
- package/src/interface/user.ts +14 -2
|
@@ -50,6 +50,8 @@ export interface OrdersExportResponse {
|
|
|
50
50
|
fileName: string;
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
+
export type CompassLongID = Record<string, any>;
|
|
54
|
+
|
|
53
55
|
export interface DayPart {
|
|
54
56
|
label: string;
|
|
55
57
|
start: string;
|
|
@@ -107,6 +109,28 @@ export interface GetSitesResponse {
|
|
|
107
109
|
results: Site[];
|
|
108
110
|
}
|
|
109
111
|
|
|
112
|
+
export interface PriceLevelStation {
|
|
113
|
+
id: string;
|
|
114
|
+
name: string;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
export interface PriceLevelBusinessUnit {
|
|
118
|
+
id: string;
|
|
119
|
+
name: string;
|
|
120
|
+
unit_number: number;
|
|
121
|
+
stations: PriceLevelStation[];
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
export interface PriceLevelSite {
|
|
125
|
+
id: string;
|
|
126
|
+
name: string;
|
|
127
|
+
business_units: PriceLevelBusinessUnit[];
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
export interface GetPriceLevelSitesResponse {
|
|
131
|
+
sites: PriceLevelSite[];
|
|
132
|
+
}
|
|
133
|
+
|
|
110
134
|
export interface ReviewOrderItem {
|
|
111
135
|
// Order id
|
|
112
136
|
id: string;
|
|
@@ -190,41 +214,33 @@ export interface GetStationResponse {
|
|
|
190
214
|
closure_schedules: ClosureSchedule[];
|
|
191
215
|
}
|
|
192
216
|
|
|
193
|
-
export interface
|
|
194
|
-
|
|
195
|
-
type
|
|
217
|
+
export interface CentricVoucherifyMetaData {
|
|
218
|
+
// The type of the voucherify discount
|
|
219
|
+
type: string;
|
|
220
|
+
// The numeric value of discount for amount off
|
|
196
221
|
amountOff?: number;
|
|
222
|
+
// The percentage value of discount for percent off
|
|
197
223
|
percentOff?: number;
|
|
198
224
|
}
|
|
199
225
|
|
|
200
|
-
export interface VoucherifyMetaDataDTO {
|
|
201
|
-
code?: string;
|
|
202
|
-
discount?: VoucherifyDiscountDTO;
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
export interface DiscountStatus {
|
|
206
|
-
live?: boolean;
|
|
207
|
-
scheduled?: boolean;
|
|
208
|
-
archived?: boolean;
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
export interface DiscountIs {
|
|
212
|
-
badgepayPromo?: boolean;
|
|
213
|
-
mealplanPromo?: boolean;
|
|
214
|
-
decliningBalancePromo?: boolean;
|
|
215
|
-
voucherPromo?: boolean;
|
|
216
|
-
}
|
|
217
|
-
|
|
218
226
|
export interface DiscountRequestDTO {
|
|
227
|
+
// name of the discount
|
|
228
|
+
name: string;
|
|
229
|
+
// status of the discount
|
|
230
|
+
status?: Record<string, any>;
|
|
231
|
+
// user is of discount creator
|
|
232
|
+
createdBy?: string;
|
|
233
|
+
// last user who updated the discount
|
|
234
|
+
updatedBy?: string;
|
|
235
|
+
// creation timestamp
|
|
236
|
+
createdAt?: string;
|
|
237
|
+
// last update timestamp
|
|
238
|
+
updatedAt?: string;
|
|
219
239
|
meta?: {
|
|
220
240
|
[index: string]: any;
|
|
221
|
-
} &
|
|
241
|
+
} & CentricVoucherifyMetaData;
|
|
222
242
|
id?: string;
|
|
223
|
-
|
|
224
|
-
name?: string;
|
|
225
|
-
status?: DiscountStatus;
|
|
226
|
-
is?: DiscountIs;
|
|
227
|
-
app?: string;
|
|
243
|
+
is?: Record<string, any>;
|
|
228
244
|
}
|
|
229
245
|
|
|
230
246
|
export interface PutDiscountVoucherifyRequestDTO {
|
|
@@ -235,16 +251,19 @@ export interface PutDiscountVoucherifyRequestDTO {
|
|
|
235
251
|
export interface DiscountResponseDTO {
|
|
236
252
|
// user is of discount creator
|
|
237
253
|
createdBy: string;
|
|
254
|
+
// last user who updated the discount
|
|
255
|
+
updatedBy: string;
|
|
256
|
+
// name of the discount
|
|
257
|
+
name: string;
|
|
258
|
+
// status of the discount
|
|
259
|
+
status?: Record<string, any>;
|
|
238
260
|
meta?: {
|
|
239
261
|
[index: string]: any;
|
|
240
|
-
} &
|
|
262
|
+
} & CentricVoucherifyMetaData;
|
|
241
263
|
id: string;
|
|
242
264
|
createdAt: string;
|
|
243
265
|
updatedAt: string;
|
|
244
|
-
|
|
245
|
-
status?: DiscountStatus;
|
|
246
|
-
is?: DiscountIs;
|
|
247
|
-
app?: string;
|
|
266
|
+
is?: Record<string, any>;
|
|
248
267
|
}
|
|
249
268
|
|
|
250
269
|
export interface PutDiscountVoucherifyResponseDTO {
|
|
@@ -252,14 +271,62 @@ export interface PutDiscountVoucherifyResponseDTO {
|
|
|
252
271
|
sites?: string[];
|
|
253
272
|
}
|
|
254
273
|
|
|
255
|
-
export
|
|
256
|
-
|
|
257
|
-
|
|
274
|
+
export type DiscountValidationError = Record<string, any>;
|
|
275
|
+
|
|
276
|
+
export type DiscountCreateError = Record<string, any>;
|
|
277
|
+
|
|
278
|
+
export interface SiteDTO {
|
|
279
|
+
// The ID of the site
|
|
280
|
+
id: string;
|
|
281
|
+
// The name of the site
|
|
282
|
+
name: string;
|
|
258
283
|
}
|
|
259
284
|
|
|
260
285
|
export interface PutDiscountVoucherifyPublishResponseDTO {
|
|
261
|
-
discount
|
|
262
|
-
|
|
286
|
+
// user is of discount creator
|
|
287
|
+
createdBy: string;
|
|
288
|
+
// last user who updated the discount
|
|
289
|
+
updatedBy: string;
|
|
290
|
+
// name of the discount
|
|
291
|
+
name: string;
|
|
292
|
+
// status of the discount
|
|
293
|
+
status?: Record<string, any>;
|
|
294
|
+
meta?: {
|
|
295
|
+
[index: string]: any;
|
|
296
|
+
} & CentricVoucherifyMetaData;
|
|
297
|
+
// List of sites where discount is published
|
|
298
|
+
sites?: SiteDTO[];
|
|
299
|
+
id: string;
|
|
300
|
+
createdAt: string;
|
|
301
|
+
updatedAt: string;
|
|
302
|
+
is?: Record<string, any>;
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
export type DiscountPublishError = Record<string, any>;
|
|
306
|
+
|
|
307
|
+
export interface DeleteDiscountsVoucherifyResponseDTO {
|
|
308
|
+
success: boolean;
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
export type DiscountDeleteError = Record<string, any>;
|
|
312
|
+
|
|
313
|
+
export interface DiscountDTO {
|
|
314
|
+
// user is of discount creator
|
|
315
|
+
createdBy: string;
|
|
316
|
+
// last user who updated the discount
|
|
317
|
+
updatedBy: string;
|
|
318
|
+
// name of the discount
|
|
319
|
+
name: string;
|
|
320
|
+
// status of the discount
|
|
321
|
+
status?: Record<string, any>;
|
|
322
|
+
id: string;
|
|
323
|
+
createdAt: string;
|
|
324
|
+
updatedAt: string;
|
|
325
|
+
is?: Record<string, any>;
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
export interface GetDiscountResponseDTO {
|
|
329
|
+
discount: DiscountDTO;
|
|
263
330
|
}
|
|
264
331
|
|
|
265
332
|
// POST /centricos/ai/item/description - Generate item description
|
|
@@ -268,20 +335,12 @@ export type PostCentricosAiItemDescriptionBody = AIItemDescriptionRequest;
|
|
|
268
335
|
|
|
269
336
|
export type PostCentricosAiItemDescriptionResponse = AIItemDescriptionResponse;
|
|
270
337
|
|
|
271
|
-
export interface PostCentricosAiItemDescriptionRequest extends BaseRequest {
|
|
272
|
-
body: PostCentricosAiItemDescriptionBody;
|
|
273
|
-
}
|
|
274
|
-
|
|
275
338
|
// POST /centricos/ai/item/image - Generate item image
|
|
276
339
|
|
|
277
340
|
export type PostCentricosAiItemImageBody = AIItemImageRequest;
|
|
278
341
|
|
|
279
342
|
export type PostCentricosAiItemImageResponse = AIItemImageResponse;
|
|
280
343
|
|
|
281
|
-
export interface PostCentricosAiItemImageRequest extends BaseRequest {
|
|
282
|
-
body: PostCentricosAiItemImageBody;
|
|
283
|
-
}
|
|
284
|
-
|
|
285
344
|
// GET /centricos/orders/export - Get orders in csv format
|
|
286
345
|
|
|
287
346
|
export interface PostCentricosOrdersExportQuery {
|
|
@@ -331,14 +390,10 @@ export interface PostCentricosOrdersExportQuery {
|
|
|
331
390
|
|
|
332
391
|
export type PostCentricosOrdersExportResponse = OrdersExportResponse;
|
|
333
392
|
|
|
334
|
-
export interface PostCentricosOrdersExportRequest
|
|
335
|
-
extends BaseRequest,
|
|
336
|
-
RequestQuery<PostCentricosOrdersExportQuery> {}
|
|
337
|
-
|
|
338
393
|
// GET /centricos/report/group/{location_group}/config - Get report configuration for a location group. Times are in site's local timezone.
|
|
339
394
|
|
|
340
395
|
export interface GetCentricosReportGroupConfigPath {
|
|
341
|
-
// TODO:
|
|
396
|
+
// TODO: cannot use CompassLongID as path parameter
|
|
342
397
|
location_group: string;
|
|
343
398
|
}
|
|
344
399
|
|
|
@@ -349,15 +404,10 @@ export interface GetCentricosReportGroupConfigQuery {
|
|
|
349
404
|
|
|
350
405
|
export type GetCentricosReportGroupConfigResponse = ReportGroupConfigResponse;
|
|
351
406
|
|
|
352
|
-
export interface GetCentricosReportGroupConfigRequest
|
|
353
|
-
extends BaseRequest,
|
|
354
|
-
RequestQuery<GetCentricosReportGroupConfigQuery>,
|
|
355
|
-
GetCentricosReportGroupConfigPath {}
|
|
356
|
-
|
|
357
407
|
// PUT /centricos/report/group/{location_group}/config - Update report configuration for a location group. Times are in site's local timezone.
|
|
358
408
|
|
|
359
409
|
export interface PutCentricosReportGroupConfigPath {
|
|
360
|
-
// TODO:
|
|
410
|
+
// TODO: cannot use CompassLongID as path parameter
|
|
361
411
|
location_group: string;
|
|
362
412
|
}
|
|
363
413
|
|
|
@@ -365,29 +415,19 @@ export type PutCentricosReportGroupConfigBody = ReportGroupConfigRequest;
|
|
|
365
415
|
|
|
366
416
|
export type PutCentricosReportGroupConfigResponse = ReportGroupConfigResponse;
|
|
367
417
|
|
|
368
|
-
export interface PutCentricosReportGroupConfigRequest
|
|
369
|
-
extends BaseRequest,
|
|
370
|
-
PutCentricosReportGroupConfigPath {
|
|
371
|
-
body: PutCentricosReportGroupConfigBody;
|
|
372
|
-
}
|
|
373
|
-
|
|
374
418
|
// DELETE /centricos/report/group/{location_group}/config - Delete report configuration for a location group. Times are in site's local timezone.
|
|
375
419
|
|
|
376
420
|
export interface DeleteCentricosReportGroupConfigPath {
|
|
377
|
-
// TODO:
|
|
421
|
+
// TODO: cannot use CompassLongID as path parameter
|
|
378
422
|
location_group: string;
|
|
379
423
|
}
|
|
380
424
|
|
|
381
425
|
export type DeleteCentricosReportGroupConfigResponse = ReportGroupConfigResponse;
|
|
382
426
|
|
|
383
|
-
export interface DeleteCentricosReportGroupConfigRequest
|
|
384
|
-
extends BaseRequest,
|
|
385
|
-
DeleteCentricosReportGroupConfigPath {}
|
|
386
|
-
|
|
387
427
|
// GET /centricos/report/group/{location_group}/config/default - Get default report configuration. Times are in site's local timezone.
|
|
388
428
|
|
|
389
429
|
export interface GetCentricosReportConfigDefaultPath {
|
|
390
|
-
// TODO:
|
|
430
|
+
// TODO: cannot use CompassLongID as path parameter
|
|
391
431
|
location_group: string;
|
|
392
432
|
}
|
|
393
433
|
|
|
@@ -398,11 +438,6 @@ export interface GetCentricosReportConfigDefaultQuery {
|
|
|
398
438
|
|
|
399
439
|
export type GetCentricosReportConfigDefaultResponse = ReportGroupConfigResponse;
|
|
400
440
|
|
|
401
|
-
export interface GetCentricosReportConfigDefaultRequest
|
|
402
|
-
extends BaseRequest,
|
|
403
|
-
RequestQuery<GetCentricosReportConfigDefaultQuery>,
|
|
404
|
-
GetCentricosReportConfigDefaultPath {}
|
|
405
|
-
|
|
406
441
|
// GET /centricos/looker/embedurl - Get a signed URL for looker embeding
|
|
407
442
|
|
|
408
443
|
export interface GetCentricosLookerEmbedurlQuery {
|
|
@@ -413,10 +448,6 @@ export interface GetCentricosLookerEmbedurlQuery {
|
|
|
413
448
|
|
|
414
449
|
export type GetCentricosLookerEmbedurlResponse = LookerEmbedURLResponse;
|
|
415
450
|
|
|
416
|
-
export interface GetCentricosLookerEmbedurlRequest
|
|
417
|
-
extends BaseRequest,
|
|
418
|
-
RequestQuery<GetCentricosLookerEmbedurlQuery> {}
|
|
419
|
-
|
|
420
451
|
// GET /centricos/devices/{site_id} - Get site devices
|
|
421
452
|
|
|
422
453
|
export interface GetSiteDevicesPath {
|
|
@@ -431,11 +462,6 @@ export interface GetSiteDevicesQuery {
|
|
|
431
462
|
|
|
432
463
|
export type GetSiteDevicesResponse = SiteDevicesResponse;
|
|
433
464
|
|
|
434
|
-
export interface GetSiteDevicesRequest
|
|
435
|
-
extends BaseRequest,
|
|
436
|
-
RequestQuery<GetSiteDevicesQuery>,
|
|
437
|
-
GetSiteDevicesPath {}
|
|
438
|
-
|
|
439
465
|
// GET /centricos/sites - Get a list of sites. This endpoint is paginated and supports filtering, sorting, and searching.
|
|
440
466
|
|
|
441
467
|
export interface GetCentricosSitesQuery {
|
|
@@ -451,9 +477,20 @@ export interface GetCentricosSitesQuery {
|
|
|
451
477
|
|
|
452
478
|
export type GetCentricosSitesResponse = GetSitesResponse;
|
|
453
479
|
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
480
|
+
// GET /centricos/sites/price-level/{price_level} - This returns specific properties from sites, locations, and stations connected to a menu price level. This does not support pagination, filtering, sorting, or searching.
|
|
481
|
+
|
|
482
|
+
export interface GetSitesFromPriceLevelPath {
|
|
483
|
+
// TODO: cannot use CompassLongID as path parameter
|
|
484
|
+
price_level: string;
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
export interface GetSitesFromPriceLevelQuery {
|
|
488
|
+
local_menu_group?: string;
|
|
489
|
+
// Graphql query string
|
|
490
|
+
_query?: string;
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
export type GetSitesFromPriceLevelResponse = GetPriceLevelSitesResponse;
|
|
457
494
|
|
|
458
495
|
// GET /centricos/review/{orderId}/order-items - Get reviews for items in a given order in an array format
|
|
459
496
|
|
|
@@ -468,15 +505,10 @@ export interface GetReviewOrderItemsQuery {
|
|
|
468
505
|
|
|
469
506
|
export type GetReviewOrderItemsResponse = ReviewOrderItemsResponseDTO;
|
|
470
507
|
|
|
471
|
-
export interface GetReviewOrderItemsRequest
|
|
472
|
-
extends BaseRequest,
|
|
473
|
-
RequestQuery<GetReviewOrderItemsQuery>,
|
|
474
|
-
GetReviewOrderItemsPath {}
|
|
475
|
-
|
|
476
508
|
// GET /centricos/station/{station_id} - Get station details
|
|
477
509
|
|
|
478
510
|
export interface GetCentricosStationPath {
|
|
479
|
-
// TODO:
|
|
511
|
+
// TODO: cannot use CompassLongID as path parameter
|
|
480
512
|
station_id: string;
|
|
481
513
|
}
|
|
482
514
|
|
|
@@ -487,34 +519,40 @@ export interface GetCentricosStationQuery {
|
|
|
487
519
|
|
|
488
520
|
export type GetCentricosStationResponse = GetStationResponse;
|
|
489
521
|
|
|
490
|
-
export interface GetCentricosStationRequest
|
|
491
|
-
extends BaseRequest,
|
|
492
|
-
RequestQuery<GetCentricosStationQuery>,
|
|
493
|
-
GetCentricosStationPath {}
|
|
494
|
-
|
|
495
522
|
// PUT /centricos/discount/voucherify - Add or Update a voucherify discount and assign it to multiple sites
|
|
496
523
|
|
|
497
|
-
export type
|
|
524
|
+
export type PutCentricosDiscountVoucherifyBody = PutDiscountVoucherifyRequestDTO;
|
|
498
525
|
|
|
499
|
-
export type
|
|
526
|
+
export type PutCentricosDiscountVoucherifyResponse = PutDiscountVoucherifyResponseDTO;
|
|
500
527
|
|
|
501
|
-
|
|
502
|
-
|
|
528
|
+
// PUT /centricos/discount/{id}/voucherify/publish - Update and publish a voucherify discount and assign it to multiple sites
|
|
529
|
+
|
|
530
|
+
export interface PutCentricosDiscountVoucherifyPublishPath {
|
|
531
|
+
// Discount ID
|
|
532
|
+
id: string;
|
|
503
533
|
}
|
|
504
534
|
|
|
505
|
-
|
|
535
|
+
export type PutCentricosDiscountVoucherifyPublishResponse = PutDiscountVoucherifyPublishResponseDTO;
|
|
536
|
+
|
|
537
|
+
// DELETE /centricos/discount/{id}/voucherify - Delete a discount from voucherify and all of its entity associations
|
|
506
538
|
|
|
507
|
-
export interface
|
|
539
|
+
export interface DeleteCentricosDiscountsVoucherifyPath {
|
|
508
540
|
// Discount ID
|
|
509
541
|
id: string;
|
|
510
542
|
}
|
|
511
543
|
|
|
512
|
-
export type
|
|
544
|
+
export type DeleteCentricosDiscountsVoucherifyResponse = DeleteDiscountsVoucherifyResponseDTO;
|
|
513
545
|
|
|
514
|
-
|
|
546
|
+
// GET /centricos/discount/{id} - Get discount information by ID
|
|
515
547
|
|
|
516
|
-
export interface
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
body: PutDiscountVoucherifyPublishBody;
|
|
548
|
+
export interface GetCentricosDiscountPath {
|
|
549
|
+
// ID of the discount to retrieve
|
|
550
|
+
id: string;
|
|
520
551
|
}
|
|
552
|
+
|
|
553
|
+
export interface GetCentricosDiscountQuery {
|
|
554
|
+
// Graphql query string
|
|
555
|
+
_query?: string;
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
export type GetCentricosDiscountResponse = GetDiscountResponseDTO;
|