@compassdigital/sdk.typescript 4.102.0 → 4.104.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.
@@ -1,4 +1,5 @@
1
1
  import { RequestQuery, BaseRequest } from './util';
2
+ export type TransactionType = 'pickup' | 'delivery';
2
3
  export interface TaxLocationData {
3
4
  id: string;
4
5
  country: string;
@@ -21,7 +22,7 @@ export interface TaxRefund {
21
22
  export interface TaxRequestDTO {
22
23
  id: string;
23
24
  appName: string;
24
- transactionType: 'pickup' | 'delivery';
25
+ transactionType: TransactionType;
25
26
  serviceFee?: number;
26
27
  deliveryFee?: number;
27
28
  locationData: TaxLocationData;
@@ -1 +1 @@
1
- {"version":3,"file":"tax.d.ts","sourceRoot":"","sources":["../../src/interface/tax.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAEnD,MAAM,WAAW,eAAe;IAE/B,EAAE,EAAE,MAAM,CAAC;IAEX,OAAO,EAAE,MAAM,CAAC;IAEhB,eAAe,EAAE,MAAM,CAAC;IAExB,IAAI,EAAE,MAAM,CAAC;IAEb,UAAU,EAAE,MAAM,CAAC;IAEnB,aAAa,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,UAAU;IAE1B,EAAE,EAAE,MAAM,CAAC;IAEX,UAAU,EAAE,MAAM,CAAC;IAEnB,QAAQ,EAAE,MAAM,CAAC;IAEjB,KAAK,EAAE,MAAM,CAAC;IAEd,WAAW,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,SAAS;IAEzB,YAAY,EAAE,MAAM,CAAC;IAErB,kBAAkB,EAAE,MAAM,CAAC;CAC3B;AAED,MAAM,WAAW,aAAa;IAE7B,EAAE,EAAE,MAAM,CAAC;IAEX,OAAO,EAAE,MAAM,CAAC;IAEhB,eAAe,EAAE,QAAQ,GAAG,UAAU,CAAC;IAEvC,UAAU,CAAC,EAAE,MA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AEb,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb,GAAG,CAAC,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,cAAc;IAE9B,MAAM,EAAE,MAAM,CAAC;IAEf,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,eAAe,CAAC;IAE3B,QAAQ,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,kBAAkB;IAClC,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAC1B;AAED,MAAM,WAAW,oBAAoB;IACpC,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAC1B;AAED,MAAM,WAAW,0BAA0B;IAC1C,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAC1B;AAID,MAAM,WAAW,mBAAmB;IAEnC,MAAM,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,MAAM,sBAAsB,GAAG,EAAE,CAAC;AAExC,MAAM,WAAW,qBAAsB,SAAQ,WAAW,EAAE,YAAY,CAAC,mBAAmB,CAAC;CAAG;AAIhG,MAAM,MAAM,gBAAgB,GAAG,aAAa,CAAC;AAE7C,MAAM,MAAM,oBAAoB,GAAG,cAAc,CAAC;AAElD,MAAM,WAAW,mBAAoB,SAAQ,WAAW;IACvD,IAAI,EAAE,gBAAgB,CAAC;CACvB"}
package/manifest.json CHANGED
@@ -34,7 +34,7 @@
34
34
  },
35
35
  {
36
36
  "name": "mealplan",
37
- "swagger": "../../platform2/mealplan/service/swagger.json"
37
+ "swagger": "../../platform2/mealplan/swagger.json"
38
38
  },
39
39
  {
40
40
  "name": "datalake",
@@ -115,6 +115,10 @@
115
115
  {
116
116
  "name": "review",
117
117
  "swagger": "../../platform2/review/swagger.json"
118
+ },
119
+ {
120
+ "name": "discount",
121
+ "swagger": "../../platform2/discount/swagger.json"
118
122
  }
119
123
  ]
120
124
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@compassdigital/sdk.typescript",
3
- "version": "4.102.0",
3
+ "version": "4.104.0",
4
4
  "description": "Compass Digital Labs TypeScript SDK",
5
5
  "type": "commonjs",
6
6
  "main": "./lib/index.js",
package/src/index.ts CHANGED
@@ -613,6 +613,7 @@ import {
613
613
  GetMenuV3DraftBrandExportResponse,
614
614
  GetMenuV3DraftBrandImportLinkQuery,
615
615
  GetMenuV3DraftBrandImportLinkResponse,
616
+ PostMenuV3DraftBrandImportResponse,
616
617
  PostMenuV3BrandQuery,
617
618
  PostMenuV3BrandBody,
618
619
  PostMenuV3BrandResponse,
@@ -920,6 +921,8 @@ import {
920
921
  PostMenuV4ItemAttachmentResponse,
921
922
  PostMenuV4ItemBody,
922
923
  PostMenuV4ItemResponse,
924
+ PostMenuV4ItemsBulkCreateBody,
925
+ PostMenuV4ItemsBulkCreateResponse,
923
926
  GetMenuV4ItemQuery,
924
927
  GetMenuV4ItemResponse,
925
928
  PatchMenuV4ItemBody,
@@ -954,6 +957,22 @@ import {
954
957
  PostMenuV4ModifierGroupDuplicateQuery,
955
958
  PostMenuV4ModifierGroupDuplicateBody,
956
959
  PostMenuV4ModifierGroupDuplicateResponse,
960
+ PatchMenuV4StockBusinessUnitBody,
961
+ PatchMenuV4StockBusinessUnitResponse,
962
+ PatchMenuV4StockBody,
963
+ PatchMenuV4StockResponse,
964
+ PostMenuV4StockMenuBusinessUnitBody,
965
+ PostMenuV4StockMenuBusinessUnitResponse,
966
+ DeleteMenuV4StockMenuBusinessUnitBody,
967
+ DeleteMenuV4StockMenuBusinessUnitResponse,
968
+ GetMenuV4StockBusinessUnitQuery,
969
+ GetMenuV4StockBusinessUnitResponse,
970
+ PostMenuV4StockPublishBody,
971
+ PostMenuV4StockPublishResponse,
972
+ PostMenuV4ScheduleMenuBody,
973
+ PostMenuV4ScheduleMenuResponse,
974
+ PostMenuV4UnscheduleMenuBody,
975
+ PostMenuV4UnscheduleMenuResponse,
957
976
  } from './interface/menu';
958
977
 
959
978
  import {
@@ -1077,6 +1096,10 @@ import {
1077
1096
  GetReviewOrderItemsResponse,
1078
1097
  GetCentricosStationQuery,
1079
1098
  GetCentricosStationResponse,
1099
+ PutDiscountVoucherifyBody,
1100
+ PutDiscountVoucherifyResponse,
1101
+ PutDiscountVoucherifyPublishBody,
1102
+ PutDiscountVoucherifyPublishResponse,
1080
1103
  } from './interface/centricos';
1081
1104
 
1082
1105
  import {
@@ -1120,6 +1143,21 @@ import {
1120
1143
  GetReviewResponse,
1121
1144
  } from './interface/review';
1122
1145
 
1146
+ import {
1147
+ GetDiscountQuery,
1148
+ GetDiscountResponse,
1149
+ PutDiscountBody,
1150
+ PutDiscountResponse,
1151
+ DeleteDiscountBody,
1152
+ DeleteDiscountResponse,
1153
+ GetDiscountsQuery,
1154
+ GetDiscountsResponse,
1155
+ PostDiscountBody,
1156
+ PostDiscountResponse,
1157
+ PutDiscountPublishBody,
1158
+ PutDiscountPublishResponse,
1159
+ } from './interface/discount';
1160
+
1123
1161
  import { BaseServiceClient, RequestOptions, ResponsePromise } from './base';
1124
1162
  export * from './base';
1125
1163
 
@@ -6576,6 +6614,26 @@ export class ServiceClient extends BaseServiceClient {
6576
6614
  );
6577
6615
  }
6578
6616
 
6617
+ /**
6618
+ * POST /menu/v3/draft/brand/{id}/import
6619
+ *
6620
+ * @param id
6621
+ * @param options - additional request options
6622
+ */
6623
+ post_menu_v3_draft_brand_import(
6624
+ id: string,
6625
+ options?: RequestOptions,
6626
+ ): ResponsePromise<PostMenuV3DraftBrandImportResponse> {
6627
+ return this.request(
6628
+ 'menu',
6629
+ '/menu/v3/draft/brand/{id}/import',
6630
+ 'post',
6631
+ `/menu/v3/draft/brand/${id}/import`,
6632
+ null,
6633
+ options,
6634
+ );
6635
+ }
6636
+
6579
6637
  /**
6580
6638
  * POST /menu/v3/brand
6581
6639
  *
@@ -9881,6 +9939,26 @@ export class ServiceClient extends BaseServiceClient {
9881
9939
  return this.request('menu', '/menu/v4/item', 'post', `/menu/v4/item`, body, options);
9882
9940
  }
9883
9941
 
9942
+ /**
9943
+ * POST /menu/v4/items/bulk-create
9944
+ *
9945
+ * @param body
9946
+ * @param options - additional request options
9947
+ */
9948
+ post_menu_v4_items_bulk_create(
9949
+ body: PostMenuV4ItemsBulkCreateBody,
9950
+ options?: RequestOptions,
9951
+ ): ResponsePromise<PostMenuV4ItemsBulkCreateResponse> {
9952
+ return this.request(
9953
+ 'menu',
9954
+ '/menu/v4/items/bulk-create',
9955
+ 'post',
9956
+ `/menu/v4/items/bulk-create`,
9957
+ body,
9958
+ options,
9959
+ );
9960
+ }
9961
+
9884
9962
  /**
9885
9963
  * GET /menu/v4/item/{id}
9886
9964
  *
@@ -10253,6 +10331,170 @@ export class ServiceClient extends BaseServiceClient {
10253
10331
  );
10254
10332
  }
10255
10333
 
10334
+ /**
10335
+ * PATCH /menu/v4/stock/business-unit
10336
+ *
10337
+ * @param body
10338
+ * @param options - additional request options
10339
+ */
10340
+ patch_menu_v4_stock_business_unit(
10341
+ body: PatchMenuV4StockBusinessUnitBody,
10342
+ options?: RequestOptions,
10343
+ ): ResponsePromise<PatchMenuV4StockBusinessUnitResponse> {
10344
+ return this.request(
10345
+ 'menu',
10346
+ '/menu/v4/stock/business-unit',
10347
+ 'patch',
10348
+ `/menu/v4/stock/business-unit`,
10349
+ body,
10350
+ options,
10351
+ );
10352
+ }
10353
+
10354
+ /**
10355
+ * PATCH /menu/v4/stock/{id}
10356
+ *
10357
+ * @param id
10358
+ * @param body
10359
+ * @param options - additional request options
10360
+ */
10361
+ patch_menu_v4_stock(
10362
+ id: string,
10363
+ body: PatchMenuV4StockBody,
10364
+ options?: RequestOptions,
10365
+ ): ResponsePromise<PatchMenuV4StockResponse> {
10366
+ return this.request(
10367
+ 'menu',
10368
+ '/menu/v4/stock/{id}',
10369
+ 'patch',
10370
+ `/menu/v4/stock/${id}`,
10371
+ body,
10372
+ options,
10373
+ );
10374
+ }
10375
+
10376
+ /**
10377
+ * POST /menu/v4/stock/menu-business-unit
10378
+ *
10379
+ * @param body
10380
+ * @param options - additional request options
10381
+ */
10382
+ post_menu_v4_stock_menu_business_unit(
10383
+ body: PostMenuV4StockMenuBusinessUnitBody,
10384
+ options?: RequestOptions,
10385
+ ): ResponsePromise<PostMenuV4StockMenuBusinessUnitResponse> {
10386
+ return this.request(
10387
+ 'menu',
10388
+ '/menu/v4/stock/menu-business-unit',
10389
+ 'post',
10390
+ `/menu/v4/stock/menu-business-unit`,
10391
+ body,
10392
+ options,
10393
+ );
10394
+ }
10395
+
10396
+ /**
10397
+ * DELETE /menu/v4/stock/menu-business-unit
10398
+ *
10399
+ * @param body
10400
+ * @param options - additional request options
10401
+ */
10402
+ delete_menu_v4_stock_menu_business_unit(
10403
+ body: DeleteMenuV4StockMenuBusinessUnitBody,
10404
+ options?: RequestOptions,
10405
+ ): ResponsePromise<DeleteMenuV4StockMenuBusinessUnitResponse> {
10406
+ return this.request(
10407
+ 'menu',
10408
+ '/menu/v4/stock/menu-business-unit',
10409
+ 'delete',
10410
+ `/menu/v4/stock/menu-business-unit`,
10411
+ body,
10412
+ options,
10413
+ );
10414
+ }
10415
+
10416
+ /**
10417
+ * GET /menu/v4/stock/business-unit/{business_unit_id}
10418
+ *
10419
+ * @param business_unit_id
10420
+ * @param options - additional request options
10421
+ */
10422
+ get_menu_v4_stock_business_unit(
10423
+ business_unit_id: string,
10424
+ options?: {
10425
+ query?: GetMenuV4StockBusinessUnitQuery;
10426
+ } & RequestOptions,
10427
+ ): ResponsePromise<GetMenuV4StockBusinessUnitResponse> {
10428
+ return this.request(
10429
+ 'menu',
10430
+ '/menu/v4/stock/business-unit/{business_unit_id}',
10431
+ 'get',
10432
+ `/menu/v4/stock/business-unit/${business_unit_id}`,
10433
+ null,
10434
+ options,
10435
+ );
10436
+ }
10437
+
10438
+ /**
10439
+ * POST /menu/v4/stock/publish
10440
+ *
10441
+ * @param body
10442
+ * @param options - additional request options
10443
+ */
10444
+ post_menu_v4_stock_publish(
10445
+ body: PostMenuV4StockPublishBody,
10446
+ options?: RequestOptions,
10447
+ ): ResponsePromise<PostMenuV4StockPublishResponse> {
10448
+ return this.request(
10449
+ 'menu',
10450
+ '/menu/v4/stock/publish',
10451
+ 'post',
10452
+ `/menu/v4/stock/publish`,
10453
+ body,
10454
+ options,
10455
+ );
10456
+ }
10457
+
10458
+ /**
10459
+ * POST /menu/v4/schedule-menu
10460
+ *
10461
+ * @param body
10462
+ * @param options - additional request options
10463
+ */
10464
+ post_menu_v4_schedule_menu(
10465
+ body: PostMenuV4ScheduleMenuBody,
10466
+ options?: RequestOptions,
10467
+ ): ResponsePromise<PostMenuV4ScheduleMenuResponse> {
10468
+ return this.request(
10469
+ 'menu',
10470
+ '/menu/v4/schedule-menu',
10471
+ 'post',
10472
+ `/menu/v4/schedule-menu`,
10473
+ body,
10474
+ options,
10475
+ );
10476
+ }
10477
+
10478
+ /**
10479
+ * POST /menu/v4/unschedule-menu
10480
+ *
10481
+ * @param body
10482
+ * @param options - additional request options
10483
+ */
10484
+ post_menu_v4_unschedule_menu(
10485
+ body: PostMenuV4UnscheduleMenuBody,
10486
+ options?: RequestOptions,
10487
+ ): ResponsePromise<PostMenuV4UnscheduleMenuResponse> {
10488
+ return this.request(
10489
+ 'menu',
10490
+ '/menu/v4/unschedule-menu',
10491
+ 'post',
10492
+ `/menu/v4/unschedule-menu`,
10493
+ body,
10494
+ options,
10495
+ );
10496
+ }
10497
+
10256
10498
  /**
10257
10499
  * GET /notification - Get all notifications
10258
10500
  *
@@ -11273,6 +11515,48 @@ export class ServiceClient extends BaseServiceClient {
11273
11515
  );
11274
11516
  }
11275
11517
 
11518
+ /**
11519
+ * PUT /centricos/discount/voucherify - Add or Update a voucherify discount and assign it to multiple sites
11520
+ *
11521
+ * @param body
11522
+ * @param options - additional request options
11523
+ */
11524
+ put_discount_voucherify(
11525
+ body: PutDiscountVoucherifyBody,
11526
+ options?: RequestOptions,
11527
+ ): ResponsePromise<PutDiscountVoucherifyResponse> {
11528
+ return this.request(
11529
+ 'centricos',
11530
+ '/centricos/discount/voucherify',
11531
+ 'put',
11532
+ `/centricos/discount/voucherify`,
11533
+ body,
11534
+ options,
11535
+ );
11536
+ }
11537
+
11538
+ /**
11539
+ * PUT /centricos/discount/{id}/voucherify/publish - Update and publish a voucherify discount and assign it to multiple sites
11540
+ *
11541
+ * @param id - Discount ID
11542
+ * @param body
11543
+ * @param options - additional request options
11544
+ */
11545
+ put_discount_voucherify_publish(
11546
+ id: string,
11547
+ body: PutDiscountVoucherifyPublishBody,
11548
+ options?: RequestOptions,
11549
+ ): ResponsePromise<PutDiscountVoucherifyPublishResponse> {
11550
+ return this.request(
11551
+ 'centricos',
11552
+ '/centricos/discount/{id}/voucherify/publish',
11553
+ 'put',
11554
+ `/centricos/discount/${id}/voucherify/publish`,
11555
+ body,
11556
+ options,
11557
+ );
11558
+ }
11559
+
11276
11560
  /**
11277
11561
  * GET /tax/v1/health-check - Health Check
11278
11562
  *
@@ -11483,4 +11767,97 @@ export class ServiceClient extends BaseServiceClient {
11483
11767
  ): ResponsePromise<GetReviewResponse> {
11484
11768
  return this.request('review', '/review/{id}', 'get', `/review/${id}`, null, options);
11485
11769
  }
11770
+
11771
+ /**
11772
+ * GET /discount/{id} - Get a discount
11773
+ *
11774
+ * @param id
11775
+ * @param options - additional request options
11776
+ */
11777
+ get_discount(
11778
+ id: string,
11779
+ options?: {
11780
+ query?: GetDiscountQuery;
11781
+ } & RequestOptions,
11782
+ ): ResponsePromise<GetDiscountResponse> {
11783
+ return this.request('discount', '/discount/{id}', 'get', `/discount/${id}`, null, options);
11784
+ }
11785
+
11786
+ /**
11787
+ * PUT /discount/{id} - update a discount
11788
+ *
11789
+ * @param id - Discount id
11790
+ * @param body
11791
+ * @param options - additional request options
11792
+ */
11793
+ put_discount(
11794
+ id: string,
11795
+ body: PutDiscountBody,
11796
+ options?: RequestOptions,
11797
+ ): ResponsePromise<PutDiscountResponse> {
11798
+ return this.request('discount', '/discount/{id}', 'put', `/discount/${id}`, body, options);
11799
+ }
11800
+
11801
+ /**
11802
+ * DELETE /discount/{id} - delete a discount
11803
+ *
11804
+ * @param id - Discount id
11805
+ * @param body
11806
+ * @param options - additional request options
11807
+ */
11808
+ delete_discount(
11809
+ id: string,
11810
+ body: DeleteDiscountBody,
11811
+ options?: RequestOptions,
11812
+ ): ResponsePromise<DeleteDiscountResponse> {
11813
+ return this.request('discount', '/discount/{id}', 'delete', `/discount/${id}`, body, options);
11814
+ }
11815
+
11816
+ /**
11817
+ * GET /discount - Get discounts by taxonomy
11818
+ *
11819
+ * @param options - additional request options
11820
+ */
11821
+ get_discounts(
11822
+ options: {
11823
+ query: GetDiscountsQuery;
11824
+ } & RequestOptions,
11825
+ ): ResponsePromise<GetDiscountsResponse> {
11826
+ return this.request('discount', '/discount', 'get', `/discount`, null, options);
11827
+ }
11828
+
11829
+ /**
11830
+ * POST /discount - Post a discount
11831
+ *
11832
+ * @param body
11833
+ * @param options - additional request options
11834
+ */
11835
+ post_discount(
11836
+ body: PostDiscountBody,
11837
+ options?: RequestOptions,
11838
+ ): ResponsePromise<PostDiscountResponse> {
11839
+ return this.request('discount', '/discount', 'post', `/discount`, body, options);
11840
+ }
11841
+
11842
+ /**
11843
+ * PUT /discount/{id}/publish - update and publish a discount
11844
+ *
11845
+ * @param id - Discount id
11846
+ * @param body
11847
+ * @param options - additional request options
11848
+ */
11849
+ put_discount_publish(
11850
+ id: string,
11851
+ body: PutDiscountPublishBody,
11852
+ options?: RequestOptions,
11853
+ ): ResponsePromise<PutDiscountPublishResponse> {
11854
+ return this.request(
11855
+ 'discount',
11856
+ '/discount/{id}/publish',
11857
+ 'put',
11858
+ `/discount/${id}/publish`,
11859
+ body,
11860
+ options,
11861
+ );
11862
+ }
11486
11863
  }
@@ -159,12 +159,107 @@ export interface Integrations {
159
159
  agilysys: Integration;
160
160
  }
161
161
 
162
+ export interface MenuSchedule {
163
+ schedule_id: string;
164
+ menu_id: string;
165
+ title: string;
166
+ duration: string;
167
+ schedule_date_range: string;
168
+ availability: string;
169
+ rotation: string;
170
+ is_pickup: boolean;
171
+ is_dropoff: boolean;
172
+ is_visible: boolean;
173
+ calendar_event: Record<string, any>;
174
+ }
175
+
176
+ export interface ClosureSchedule {
177
+ schedule_id: string;
178
+ title: string;
179
+ duration: string;
180
+ calendar_event: Record<string, any>;
181
+ }
182
+
162
183
  export interface GetStationResponse {
163
184
  id: string;
164
185
  name: string;
165
186
  station_location: string;
166
187
  business_unit: string;
167
188
  integrations: Integrations;
189
+ menu_schedules: MenuSchedule[];
190
+ closure_schedules: ClosureSchedule[];
191
+ }
192
+
193
+ export interface VoucherifyDiscountDTO {
194
+ id?: string;
195
+ type?: string;
196
+ amountOff?: number;
197
+ percentOff?: number;
198
+ }
199
+
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
+ export interface DiscountRequestDTO {
219
+ meta?: {
220
+ [index: string]: any;
221
+ } & VoucherifyMetaDataDTO;
222
+ id?: string;
223
+ createdBy?: string;
224
+ name?: string;
225
+ status?: DiscountStatus;
226
+ is?: DiscountIs;
227
+ app?: string;
228
+ }
229
+
230
+ export interface PutDiscountVoucherifyRequestDTO {
231
+ discount: DiscountRequestDTO;
232
+ sites?: string[];
233
+ }
234
+
235
+ export interface DiscountResponseDTO {
236
+ // user is of discount creator
237
+ createdBy: string;
238
+ meta?: {
239
+ [index: string]: any;
240
+ } & VoucherifyMetaDataDTO;
241
+ id: string;
242
+ createdAt: string;
243
+ updatedAt: string;
244
+ name?: string;
245
+ status?: DiscountStatus;
246
+ is?: DiscountIs;
247
+ app?: string;
248
+ }
249
+
250
+ export interface PutDiscountVoucherifyResponseDTO {
251
+ discount: DiscountResponseDTO;
252
+ sites?: string[];
253
+ }
254
+
255
+ export interface PutDiscountVoucherifyPublishRequestDTO {
256
+ discount: DiscountRequestDTO;
257
+ sites?: string[];
258
+ }
259
+
260
+ export interface PutDiscountVoucherifyPublishResponseDTO {
261
+ discount: DiscountResponseDTO;
262
+ sites?: string[];
168
263
  }
169
264
 
170
265
  // POST /centricos/ai/item/description - Generate item description
@@ -396,3 +491,30 @@ export interface GetCentricosStationRequest
396
491
  extends BaseRequest,
397
492
  RequestQuery<GetCentricosStationQuery>,
398
493
  GetCentricosStationPath {}
494
+
495
+ // PUT /centricos/discount/voucherify - Add or Update a voucherify discount and assign it to multiple sites
496
+
497
+ export type PutDiscountVoucherifyBody = PutDiscountVoucherifyRequestDTO;
498
+
499
+ export type PutDiscountVoucherifyResponse = PutDiscountVoucherifyResponseDTO;
500
+
501
+ export interface PutDiscountVoucherifyRequest extends BaseRequest {
502
+ body: PutDiscountVoucherifyBody;
503
+ }
504
+
505
+ // PUT /centricos/discount/{id}/voucherify/publish - Update and publish a voucherify discount and assign it to multiple sites
506
+
507
+ export interface PutDiscountVoucherifyPublishPath {
508
+ // Discount ID
509
+ id: string;
510
+ }
511
+
512
+ export type PutDiscountVoucherifyPublishBody = PutDiscountVoucherifyPublishRequestDTO;
513
+
514
+ export type PutDiscountVoucherifyPublishResponse = PutDiscountVoucherifyPublishResponseDTO;
515
+
516
+ export interface PutDiscountVoucherifyPublishRequest
517
+ extends BaseRequest,
518
+ PutDiscountVoucherifyPublishPath {
519
+ body: PutDiscountVoucherifyPublishBody;
520
+ }
@@ -487,8 +487,8 @@ export interface ShoppingcartItem {
487
487
 
488
488
  export interface ShoppingcartDiscountIncentives {
489
489
  id?: string;
490
- program: {
491
- code?: string;
490
+ program?: {
491
+ code: string;
492
492
  };
493
493
  }
494
494