@compassdigital/sdk.typescript 4.142.0 → 4.144.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.
@@ -0,0 +1,34 @@
1
+ export interface Timeslot {
2
+ start_time: string;
3
+ number_orders: number;
4
+ }
5
+ export interface GetTimeslotResponse {
6
+ timeslots: Timeslot[];
7
+ }
8
+ export interface ErrorDisplayMessage {
9
+ title: string;
10
+ description: string;
11
+ }
12
+ export interface ErrorData {
13
+ statusCode: number;
14
+ statusText: string;
15
+ timestamp: string;
16
+ displayMessage: ErrorDisplayMessage;
17
+ }
18
+ export interface Error {
19
+ code: number;
20
+ message: string;
21
+ data: ErrorData;
22
+ }
23
+ export interface GetTimeslotsBrandPath {
24
+ brandId: string;
25
+ }
26
+ export interface GetTimeslotsBrandQuery {
27
+ duration: number;
28
+ type: 'pickup' | 'delivery';
29
+ startTime: string;
30
+ endTime: string;
31
+ _query?: string;
32
+ }
33
+ export type GetTimeslotsBrandResponse = GetTimeslotResponse;
34
+ //# sourceMappingURL=timeslots.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"timeslots.d.ts","sourceRoot":"","sources":["../../src/interface/timeslots.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,QAAQ;IAExB,UAAU,EAAE,MAAM,CAAC;IAEnB,aAAa,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,mBAAmB;IAEnC,SAAS,EAAE,QAAQ,EAAE,CAAC;CACtB;AAED,MAAM,WAAW,mBAAmB;IAEnC,KAAK,EAAE,MAAM,CAAC;IAEd,WAAW,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,SAAS;IAEzB,UAAU,EAAE,MAAM,CAAC;IAEnB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,EAAE,mBAAmB,CAAC;CACpC;AAED,MAAM,WAAW,KAAK;IAErB,IAAI,EAAE,MAAM,CAAC;IAEb,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,SAAS,CAAC;CAChB;AAID,MAAM,WAAW,qBAAqB;IAErC,OAAO,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,sBAAsB;IAEtC,QAAQ,EAAE,MAAM,CAAC;IAEjB,IAAI,EAAE,QAAQ,GAAG,UAAU,CAAC;IAE5B,SAAS,EAAE,MAAM,CAAC;IAElB,OAAO,EAAE,MAAM,CAAC;IAEhB,MAAM,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,MAAM,yBAAyB,GAAG,mBAAmB,CAAC"}
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /* eslint-disable */
3
+ // THIS FILE IS AUTOMATICALLY GENERATED, DO NOT MODIFY
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ //# sourceMappingURL=timeslots.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"timeslots.js","sourceRoot":"","sources":["../../src/interface/timeslots.ts"],"names":[],"mappings":";AAAA,oBAAoB;AACpB,sDAAsD"}
package/manifest.json CHANGED
@@ -150,6 +150,13 @@
150
150
  "options": {
151
151
  "request": false
152
152
  }
153
+ },
154
+ {
155
+ "name": "timeslots",
156
+ "swagger": "../../api/platform2/timeslots/swagger.json",
157
+ "options": {
158
+ "request": false
159
+ }
153
160
  }
154
161
  ]
155
162
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@compassdigital/sdk.typescript",
3
- "version": "4.142.0",
3
+ "version": "4.144.0",
4
4
  "description": "Compass Digital Labs TypeScript SDK",
5
5
  "type": "commonjs",
6
6
  "main": "./lib/index.js",
package/src/index.ts CHANGED
@@ -1285,6 +1285,8 @@ import {
1285
1285
  PutDiscountPublishResponse,
1286
1286
  } from './interface/discount';
1287
1287
 
1288
+ import { GetTimeslotsBrandQuery, GetTimeslotsBrandResponse } from './interface/timeslots';
1289
+
1288
1290
  import { BaseServiceClient, RequestOptions, ResponsePromise } from './base';
1289
1291
  export * from './base';
1290
1292
 
@@ -13344,4 +13346,26 @@ export class ServiceClient extends BaseServiceClient {
13344
13346
  options,
13345
13347
  );
13346
13348
  }
13349
+
13350
+ /**
13351
+ * GET /timeslots/brand/{brandId} - Get timeslots for brand
13352
+ *
13353
+ * @param brandId - brandId
13354
+ * @param options - additional request options
13355
+ */
13356
+ get_timeslots_brand(
13357
+ brandId: string,
13358
+ options: {
13359
+ query: GetTimeslotsBrandQuery;
13360
+ } & RequestOptions,
13361
+ ): ResponsePromise<GetTimeslotsBrandResponse> {
13362
+ return this.request(
13363
+ 'timeslots',
13364
+ '/timeslots/brand/{brandId}',
13365
+ 'GET',
13366
+ `/timeslots/brand/${brandId}`,
13367
+ null,
13368
+ options,
13369
+ );
13370
+ }
13347
13371
  }
@@ -10,9 +10,29 @@ export interface CatalogResponseDTO {
10
10
  display: Record<string, any>;
11
11
  meta: Record<string, any> | null;
12
12
  items: Record<string, any> | null;
13
+ created_at: string;
14
+ updated_at: string;
13
15
  }
14
16
 
15
- export type CatalogItemResponseDTO = Record<string, any>;
17
+ export interface CatalogItemResponseDTO {
18
+ id: number;
19
+ catalog_id: number;
20
+ item_id: string;
21
+ name: string;
22
+ label?: string;
23
+ description?: string;
24
+ price: number;
25
+ overrides?: Record<string, any>;
26
+ options: Record<string, any>;
27
+ barcode?: string;
28
+ reporting?: Record<string, any>;
29
+ tax?: Record<string, any>;
30
+ is_visible: boolean;
31
+ is_out_of_stock: boolean;
32
+ meta: Record<string, any>;
33
+ created_at: string;
34
+ updated_at: string;
35
+ }
16
36
 
17
37
  export interface PaginationQueryDTO {
18
38
  // Page number
@@ -32,7 +52,47 @@ export interface ListParamsDTO {
32
52
  filter?: FilterQueryDTO;
33
53
  }
34
54
 
35
- export type CatalogItemsListResponseDTO = Record<string, any>;
55
+ export interface CatalogItemRecord {
56
+ id: number;
57
+ catalog_id: number;
58
+ item_id: string;
59
+ name: string;
60
+ label?: string;
61
+ description?: string;
62
+ price: number;
63
+ overrides?: Record<string, any>;
64
+ options: Record<string, any>;
65
+ barcode?: string;
66
+ reporting?: Record<string, any>;
67
+ tax?: Record<string, any>;
68
+ is_visible: boolean;
69
+ is_out_of_stock: boolean;
70
+ meta: Record<string, any>;
71
+ created_at: string;
72
+ updated_at: string;
73
+ }
74
+
75
+ export interface MetaData {
76
+ // Total number of results
77
+ total_results: number;
78
+ // Total number of pages
79
+ total_pages: number;
80
+ // Number of results on this page
81
+ result_count: number;
82
+ // Number of results per page
83
+ limit?: number;
84
+ // Current page number
85
+ page?: number;
86
+ // Field to sort by
87
+ sort_by?: string;
88
+ // Sort order
89
+ order?: 'ASC' | 'DESC';
90
+ }
91
+
92
+ export interface CatalogItemsListResponseDTO {
93
+ results: CatalogItemRecord[];
94
+ meta: MetaData;
95
+ }
36
96
 
37
97
  export interface SearchConditionDTO {
38
98
  // Contains search term
@@ -55,7 +115,36 @@ export interface SearchConditionDTO {
55
115
  lessThanOrEqual?: Record<string, any>;
56
116
  }
57
117
 
58
- export type BaseItemDTO = Record<string, any>;
118
+ export interface DeleteCatalogItemResponseDTO {
119
+ id: number;
120
+ catalog_id: number;
121
+ item_id: string;
122
+ name: string;
123
+ label?: string;
124
+ description?: string;
125
+ price: number;
126
+ overrides?: Record<string, any>;
127
+ options: Record<string, any>;
128
+ barcode?: string;
129
+ reporting?: Record<string, any>;
130
+ tax?: Record<string, any>;
131
+ is_visible: boolean;
132
+ is_out_of_stock: boolean;
133
+ meta: Record<string, any>;
134
+ }
135
+
136
+ export interface BaseItemResponseDTO {
137
+ id: string;
138
+ name: string;
139
+ description: string;
140
+ price: number;
141
+ barcode: string;
142
+ reporting: Record<string, any>;
143
+ tax: Record<string, any>;
144
+ meta: Record<string, any>;
145
+ created_at: string;
146
+ updated_at: string;
147
+ }
59
148
 
60
149
  // GET /catalog/status - Get the status of the Catalog service
61
150
 
@@ -175,7 +264,19 @@ export interface PostCatalogItemsBulkPath {
175
264
  id: number;
176
265
  }
177
266
 
178
- export type PostCatalogItemsBulkBody = string[];
267
+ export type PostCatalogItemsBulkBody = {
268
+ base_item_id?: string;
269
+ name?: string;
270
+ catalog_item_id?: number | null;
271
+ label?: string | null;
272
+ description?: string | null;
273
+ price?: number | null;
274
+ overrides?: Record<string, any> | null;
275
+ options?: Record<string, any> | null;
276
+ meta?: Record<string, any> | null;
277
+ is_visible?: boolean | null;
278
+ is_out_of_stock?: boolean | null;
279
+ }[];
179
280
 
180
281
  export type PostCatalogItemsBulkResponse = CatalogItemResponseDTO[];
181
282
 
@@ -216,7 +317,7 @@ export interface DeleteCatalogItemPath {
216
317
  id: number;
217
318
  }
218
319
 
219
- export type DeleteCatalogItemResponse = CatalogItemResponseDTO;
320
+ export type DeleteCatalogItemResponse = DeleteCatalogItemResponseDTO;
220
321
 
221
322
  export interface DeleteCatalogItemRequest extends BaseRequest, DeleteCatalogItemPath {}
222
323
 
@@ -279,7 +380,7 @@ export interface PostCatalogBaseItemBody {
279
380
  meta?: Record<string, any> | null;
280
381
  }
281
382
 
282
- export type PostCatalogBaseItemResponse = BaseItemDTO;
383
+ export type PostCatalogBaseItemResponse = BaseItemResponseDTO;
283
384
 
284
385
  export interface PostCatalogBaseItemRequest extends BaseRequest {
285
386
  body: PostCatalogBaseItemBody;
@@ -298,7 +399,7 @@ export interface GetCatalogBaseItemsBody {
298
399
  offset?: number;
299
400
  }
300
401
 
301
- export type GetCatalogBaseItemsResponse = BaseItemDTO[];
402
+ export type GetCatalogBaseItemsResponse = BaseItemResponseDTO[];
302
403
 
303
404
  export interface GetCatalogBaseItemsRequest
304
405
  extends BaseRequest,
@@ -317,7 +418,7 @@ export interface GetCatalogBaseItemQuery {
317
418
  _query?: string;
318
419
  }
319
420
 
320
- export type GetCatalogBaseItemResponse = BaseItemDTO;
421
+ export type GetCatalogBaseItemResponse = BaseItemResponseDTO;
321
422
 
322
423
  export interface GetCatalogBaseItemRequest
323
424
  extends BaseRequest,
@@ -550,8 +550,6 @@ export interface ConsumerDiscountStatus {
550
550
  export interface ConsumerDiscountIs {
551
551
  badgepayPromo?: boolean;
552
552
  mealplanPromo?: boolean;
553
- decliningBalancePromo?: boolean;
554
- voucherPromo?: boolean;
555
553
  }
556
554
 
557
555
  export interface ConsumerVoucherifyMetaDataDiscount {
@@ -566,12 +564,12 @@ export interface ConsumerVoucherifyMetaData {
566
564
  discount?: ConsumerVoucherifyMetaDataDiscount;
567
565
  }
568
566
 
569
- export interface ClassMetaProvider {
567
+ export interface ConsumerMetaProvider {
570
568
  voucherify?: ConsumerVoucherifyMetaData;
571
569
  }
572
570
 
573
571
  export interface ConsumerDiscountMeta {
574
- provider: ClassMetaProvider;
572
+ provider: ConsumerMetaProvider;
575
573
  }
576
574
 
577
575
  export interface ConsumerStackedDiscount {
@@ -588,7 +586,7 @@ export interface ConsumerStackedDiscount {
588
586
  }
589
587
 
590
588
  export interface Discounts {
591
- applied_amount?: number;
589
+ stacked_total?: number;
592
590
  app?: string;
593
591
  stacked_discounts?: ConsumerStackedDiscount[];
594
592
  }
@@ -1896,8 +1894,6 @@ export interface PostConsumerPromoRedeemRequest {
1896
1894
  email?: string;
1897
1895
  // The app of the customer
1898
1896
  app?: string;
1899
- // The realm of the customer
1900
- realm?: string;
1901
1897
  // The location brand of the customer
1902
1898
  location_brand?: string;
1903
1899
  shoppingcart?: {