@compassdigital/sdk.typescript 4.418.0 → 4.420.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@compassdigital/sdk.typescript",
3
- "version": "4.418.0",
3
+ "version": "4.420.0",
4
4
  "description": "Compass Digital Labs TypeScript SDK",
5
5
  "type": "commonjs",
6
6
  "main": "./lib/index.js",
@@ -58,7 +58,7 @@
58
58
  },
59
59
  "devDependencies": {
60
60
  "@compassdigital/review": "^7.6.3",
61
- "@compassdigital/sdk.typescript.cli": "^4.55.0",
61
+ "@compassdigital/sdk.typescript.cli": "^4.56.0",
62
62
  "@swc/core": "^1.4.1",
63
63
  "@swc/jest": "^0.2.36",
64
64
  "@types/jest": "^30.0.0",
package/pipeline.yml CHANGED
@@ -2,6 +2,7 @@ name: npm-typescript-sdk
2
2
 
3
3
  flags:
4
4
  - DEPENDABOT
5
+ - P4_V2_TOOLS
5
6
 
6
7
  test:
7
8
  commands:
package/src/base.ts CHANGED
@@ -15,6 +15,8 @@ export interface RequestOptions {
15
15
  retry?: number;
16
16
  // timeout in milliseconds
17
17
  timeout?: number;
18
+ // abort signal to cancel the request
19
+ signal?: AbortSignal;
18
20
  // make requests against this base url.
19
21
  // per-service base urls are configured as an object
20
22
  // eg. { order: 'http://localhost:3000', shoppingcart: 'http://localhost:4000' }
@@ -446,11 +448,10 @@ export abstract class BaseServiceClient {
446
448
  return options.intercept(req, this.fetch.bind(this));
447
449
  }
448
450
  try {
449
- let signal: AbortSignal | undefined;
451
+ let signal = options?.signal;
450
452
  if (options?.timeout) {
451
- const controller = new AbortController();
452
- setTimeout(() => controller.abort('timeout'), options.timeout);
453
- signal = controller.signal;
453
+ const timeoutSignal = AbortSignal.timeout(options.timeout);
454
+ signal = signal ? AbortSignal.any([signal, timeoutSignal]) : timeoutSignal;
454
455
  }
455
456
  const res = await fetch(req.url, {
456
457
  method: req.method,
package/src/index.ts CHANGED
@@ -623,6 +623,8 @@ import {
623
623
  GetMenuV3DraftBrandVerifyPublishResponse,
624
624
  PostMenuV3DraftBrandArchiveResponse,
625
625
  PostMenuV3DraftBrandUnarchiveResponse,
626
+ PostMenuV3DraftBrandSyncMenuworksQuery,
627
+ PostMenuV3DraftBrandSyncMenuworksResponse,
626
628
  PostMenuV3BrandQuery,
627
629
  PostMenuV3BrandBody,
628
630
  PostMenuV3BrandResponse,
@@ -4624,12 +4626,12 @@ export class ServiceClient extends BaseServiceClient {
4624
4626
  }
4625
4627
 
4626
4628
  /**
4627
- * GET /ping - Config Service liveness check
4629
+ * GET /config/ping - Config Service liveness check
4628
4630
  *
4629
4631
  * @param options - additional request options
4630
4632
  */
4631
4633
  get_config_ping(options?: RequestOptions): ResponsePromise<GetConfigPingResponse> {
4632
- return this.request('config', '/ping', 'GET', `/ping`, null, options);
4634
+ return this.request('config', '/config/ping', 'GET', `/config/ping`, null, options);
4633
4635
  }
4634
4636
 
4635
4637
  /**
@@ -7404,6 +7406,28 @@ export class ServiceClient extends BaseServiceClient {
7404
7406
  );
7405
7407
  }
7406
7408
 
7409
+ /**
7410
+ * POST /menu/v3/draft/brand/{id}/sync-menuworks
7411
+ *
7412
+ * @param id - TODO: add parameter to swagger.json
7413
+ * @param options - additional request options
7414
+ */
7415
+ post_menu_v3_draft_brand_sync_menuworks(
7416
+ id: string,
7417
+ options?: {
7418
+ query?: PostMenuV3DraftBrandSyncMenuworksQuery;
7419
+ } & RequestOptions,
7420
+ ): ResponsePromise<PostMenuV3DraftBrandSyncMenuworksResponse> {
7421
+ return this.request(
7422
+ 'menu',
7423
+ '/menu/v3/draft/brand/{id}/sync-menuworks',
7424
+ 'POST',
7425
+ `/menu/v3/draft/brand/${id}/sync-menuworks`,
7426
+ null,
7427
+ options,
7428
+ );
7429
+ }
7430
+
7407
7431
  /**
7408
7432
  * POST /menu/v3/brand
7409
7433
  *
@@ -300,7 +300,7 @@ export type DeleteConfigPublicResponse = Success;
300
300
 
301
301
  export interface DeleteConfigPublicRequest extends BaseRequest, DeleteConfigPublicPath {}
302
302
 
303
- // GET /ping - Config Service liveness check
303
+ // GET /config/ping - Config Service liveness check
304
304
 
305
305
  export type GetConfigPingResponse = PingResponse;
306
306
 
@@ -221,6 +221,9 @@ export interface Brand {
221
221
  agilysys_dod?: {
222
222
  enabled?: boolean;
223
223
  };
224
+ transact?: {
225
+ enabled?: boolean;
226
+ };
224
227
  };
225
228
  type_of_kds?: {
226
229
  cdl?: boolean;
@@ -54,6 +54,13 @@ export interface Menu {
54
54
  };
55
55
  [index: string]: any;
56
56
  };
57
+ image?: {
58
+ src?: string;
59
+ sizes?: {
60
+ original?: string;
61
+ thumbnail_80_80?: string;
62
+ };
63
+ };
57
64
  }
58
65
 
59
66
  export interface Nutrition {
@@ -169,6 +176,13 @@ export interface Item {
169
176
  smart_tags?: string[];
170
177
  // menuworks allergen tags
171
178
  allergen_tags?: string[];
179
+ // menuworks allergens with contains field
180
+ allergens?: {
181
+ // allergen name
182
+ name?: string;
183
+ // allergen contains status: 'Yes' or 'AtRisk'
184
+ contains?: 'Yes' | 'AtRisk';
185
+ }[];
172
186
  };
173
187
  // unique id of the entity
174
188
  unique_id?: number;
@@ -325,6 +339,13 @@ export interface Option {
325
339
  smart_tags?: string[];
326
340
  // menuworks allergen tags
327
341
  allergen_tags?: string[];
342
+ // menuworks allergens with contains field
343
+ allergens?: {
344
+ // allergen name
345
+ name?: string;
346
+ // allergen contains status: 'Yes' or 'AtRisk'
347
+ contains?: 'Yes' | 'AtRisk';
348
+ }[];
328
349
  };
329
350
  // unique id of the entity
330
351
  unique_id?: number;
@@ -4065,6 +4086,28 @@ export interface PostMenuV3DraftBrandUnarchiveRequest
4065
4086
  extends BaseRequest,
4066
4087
  PostMenuV3DraftBrandUnarchivePath {}
4067
4088
 
4089
+ // POST /menu/v3/draft/brand/{id}/sync-menuworks
4090
+
4091
+ export interface PostMenuV3DraftBrandSyncMenuworksPath {
4092
+ // TODO: add parameter to swagger.json
4093
+ id: string;
4094
+ }
4095
+
4096
+ export interface PostMenuV3DraftBrandSyncMenuworksQuery {
4097
+ brand_id?: string;
4098
+ }
4099
+
4100
+ export interface PostMenuV3DraftBrandSyncMenuworksResponse {
4101
+ process_id: string;
4102
+ status: string;
4103
+ [index: string]: any;
4104
+ }
4105
+
4106
+ export interface PostMenuV3DraftBrandSyncMenuworksRequest
4107
+ extends BaseRequest,
4108
+ RequestQuery<PostMenuV3DraftBrandSyncMenuworksQuery>,
4109
+ PostMenuV3DraftBrandSyncMenuworksPath {}
4110
+
4068
4111
  // POST /menu/v3/brand
4069
4112
 
4070
4113
  export interface PostMenuV3BrandQuery {