@compassdigital/sdk.typescript 4.528.0 → 4.528.1-alpha.3

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 (50) hide show
  1. package/lib/index.d.ts +361 -7
  2. package/lib/index.d.ts.map +1 -1
  3. package/lib/index.js +434 -3
  4. package/lib/index.js.map +1 -1
  5. package/lib/interface/centricos.d.ts +9 -3
  6. package/lib/interface/centricos.d.ts.map +1 -1
  7. package/lib/interface/consumer.d.ts +36 -1
  8. package/lib/interface/consumer.d.ts.map +1 -1
  9. package/lib/interface/location.d.ts +0 -1
  10. package/lib/interface/location.d.ts.map +1 -1
  11. package/lib/interface/loyalty.d.ts +833 -0
  12. package/lib/interface/loyalty.d.ts.map +1 -0
  13. package/lib/interface/loyalty.js +5 -0
  14. package/lib/interface/loyalty.js.map +1 -0
  15. package/lib/interface/menu.d.ts +8 -0
  16. package/lib/interface/menu.d.ts.map +1 -1
  17. package/lib/interface/user.d.ts +20 -0
  18. package/lib/interface/user.d.ts.map +1 -1
  19. package/lib/messages/events/AuditEvent.d.ts +39 -0
  20. package/lib/messages/events/AuditEvent.d.ts.map +1 -0
  21. package/lib/messages/events/AuditEvent.js +4 -0
  22. package/lib/messages/events/AuditEvent.js.map +1 -0
  23. package/lib/messages/events/DiscountCreatedEvent.d.ts +1 -0
  24. package/lib/messages/events/DiscountCreatedEvent.d.ts.map +1 -1
  25. package/lib/messages/events/DiscountPublishedEvent.d.ts +1 -0
  26. package/lib/messages/events/DiscountPublishedEvent.d.ts.map +1 -1
  27. package/lib/messages/events/DiscountUpdatedEvent.d.ts +1 -0
  28. package/lib/messages/events/DiscountUpdatedEvent.d.ts.map +1 -1
  29. package/lib/messages/events/FrictionlessOrderFailureEvent.d.ts +23 -0
  30. package/lib/messages/events/FrictionlessOrderFailureEvent.d.ts.map +1 -0
  31. package/lib/messages/events/FrictionlessOrderFailureEvent.js +4 -0
  32. package/lib/messages/events/FrictionlessOrderFailureEvent.js.map +1 -0
  33. package/lib/messages/events/index.d.ts +2 -0
  34. package/lib/messages/events/index.d.ts.map +1 -1
  35. package/manifest.json +7 -0
  36. package/package.json +1 -1
  37. package/src/index.ts +1051 -7
  38. package/src/interface/centricos.ts +16 -6
  39. package/src/interface/consumer.ts +59 -1
  40. package/src/interface/location.ts +0 -1
  41. package/src/interface/loyalty.ts +1158 -0
  42. package/src/interface/menu.ts +8 -0
  43. package/src/interface/user.ts +27 -0
  44. package/src/messages/events/AuditEvent.ts +52 -0
  45. package/src/messages/events/DiscountCreatedEvent.ts +1 -0
  46. package/src/messages/events/DiscountPublishedEvent.ts +1 -0
  47. package/src/messages/events/DiscountUpdatedEvent.ts +1 -0
  48. package/src/messages/events/FrictionlessOrderFailureEvent.ts +34 -0
  49. package/src/messages/events/index.ts +4 -0
  50. package/test/client.test.ts +23 -0
package/src/index.ts CHANGED
@@ -453,6 +453,7 @@ import {
453
453
  GetUserProfileQuery,
454
454
  GetUserProfileResponse,
455
455
  GetUserPingResponse,
456
+ GetUserHealthResponse,
456
457
  } from './interface/user';
457
458
 
458
459
  import {
@@ -1230,6 +1231,8 @@ import {
1230
1231
  PostMealplanConsumerResponse,
1231
1232
  PutConsumerMealplanBody,
1232
1233
  PutConsumerMealplanResponse,
1234
+ DeleteMealplanConsumerBody,
1235
+ DeleteMealplanConsumerResponse,
1233
1236
  PostMealplanVerifyConsumerBody,
1234
1237
  PostMealplanVerifyConsumerResponse,
1235
1238
  GetConsumerConfigAppconfigResponse,
@@ -1266,6 +1269,10 @@ import {
1266
1269
  PostConsumerOpenaiChatResponse,
1267
1270
  PostPaymentValidateMerchantBody$0,
1268
1271
  PostPaymentValidateMerchantResponse$0,
1272
+ GetConsumerReviewOrderItemsQuery,
1273
+ GetConsumerReviewOrderItemsResponse,
1274
+ PostConsumerShoppingcartBulkBody,
1275
+ PostConsumerShoppingcartBulkResponse,
1269
1276
  } from './interface/consumer';
1270
1277
 
1271
1278
  import {
@@ -1308,6 +1315,7 @@ import {
1308
1315
  GetCentricosStationResponse,
1309
1316
  DeleteCentricosStationResponse,
1310
1317
  PutCentricosStationIntegrationResponse,
1318
+ DeleteCentricosStationIntegrationResponse,
1311
1319
  PutCentricosDiscountVoucherifyBody,
1312
1320
  PutCentricosDiscountVoucherifyResponse,
1313
1321
  PutCentricosDiscountVoucherifyPublishResponse,
@@ -1331,7 +1339,6 @@ import {
1331
1339
  PostCentricosStationsMenusFetchResponse,
1332
1340
  ListSwapsBody,
1333
1341
  ListSwapsResponse,
1334
- GetSwapDetailsQuery,
1335
1342
  GetSwapDetailsResponse,
1336
1343
  } from './interface/centricos';
1337
1344
 
@@ -1398,6 +1405,80 @@ import {
1398
1405
  PutDiscountPublishResponse,
1399
1406
  } from './interface/discount';
1400
1407
 
1408
+ import {
1409
+ GetLoyaltyBundlesQuery,
1410
+ GetLoyaltyBundlesResponse,
1411
+ PostLoyaltyBundleBody,
1412
+ PostLoyaltyBundleResponse,
1413
+ GetLoyaltyBundleResponse,
1414
+ PatchLoyaltyBundleBody,
1415
+ PatchLoyaltyBundleResponse,
1416
+ DeleteLoyaltyBundleResponse,
1417
+ GetLoyaltyCampaignsQuery,
1418
+ GetLoyaltyCampaignsResponse,
1419
+ PostLoyaltyCampaignBody,
1420
+ PostLoyaltyCampaignResponse,
1421
+ GetLoyaltyCampaignResponse,
1422
+ PutLoyaltyCampaignBody,
1423
+ PutLoyaltyCampaignResponse,
1424
+ DeleteLoyaltyCampaignResponse,
1425
+ PatchLoyaltyCampaignStatusBody,
1426
+ PatchLoyaltyCampaignStatusResponse,
1427
+ PostLoyaltyCampaignCloneResponse,
1428
+ GetLoyaltyVouchersQuery,
1429
+ GetLoyaltyVouchersResponse,
1430
+ PostLoyaltyVoucherBody,
1431
+ PostLoyaltyVoucherResponse,
1432
+ GetLoyaltyVoucherResponse,
1433
+ PutLoyaltyVoucherBody,
1434
+ PutLoyaltyVoucherResponse,
1435
+ DeleteLoyaltyVoucherResponse,
1436
+ PostLoyaltyVoucherRevokeBody,
1437
+ PostLoyaltyVoucherRevokeResponse,
1438
+ PostLoyaltyVouchersBatchBody,
1439
+ PostLoyaltyVouchersBatchResponse,
1440
+ GetLoyaltyVoucherRedemptionsQuery,
1441
+ GetLoyaltyVoucherRedemptionsResponse,
1442
+ PostLoyaltyVouchersValidateBody,
1443
+ PostLoyaltyVouchersValidateResponse,
1444
+ PostLoyaltyVouchersRedeemBody,
1445
+ PostLoyaltyVouchersRedeemResponse,
1446
+ GetLoyaltySegmentsQuery,
1447
+ GetLoyaltySegmentsResponse,
1448
+ PostLoyaltySegmentBody,
1449
+ PostLoyaltySegmentResponse,
1450
+ GetLoyaltySegmentAttributesResponse,
1451
+ PostLoyaltySegmentPreviewCountResponse,
1452
+ GetLoyaltySegmentResponse,
1453
+ PatchLoyaltySegmentBody,
1454
+ PatchLoyaltySegmentResponse,
1455
+ DeleteLoyaltySegmentResponse,
1456
+ GetLoyaltySegmentMembersQuery,
1457
+ GetLoyaltySegmentMembersResponse,
1458
+ PostLoyaltySegmentMembersBody,
1459
+ PostLoyaltySegmentMembersResponse,
1460
+ DeleteLoyaltySegmentMembersBody,
1461
+ DeleteLoyaltySegmentMembersResponse,
1462
+ PostLoyaltyRedemptionRollbackBody,
1463
+ PostLoyaltyRedemptionRollbackResponse,
1464
+ GetLoyaltyRewardsQuery,
1465
+ GetLoyaltyRewardsResponse,
1466
+ PostLoyaltyRewardBody,
1467
+ PostLoyaltyRewardResponse,
1468
+ GetLoyaltyRewardResponse,
1469
+ PutLoyaltyRewardBody,
1470
+ PutLoyaltyRewardResponse,
1471
+ PatchLoyaltyRewardStatusBody,
1472
+ PatchLoyaltyRewardStatusResponse,
1473
+ GetLoyaltyRewardCardsQuery,
1474
+ GetLoyaltyRewardCardsResponse,
1475
+ GetLoyaltyRewardCardResponse,
1476
+ PostLoyaltyRewardCardAdjustBody,
1477
+ PostLoyaltyRewardCardAdjustResponse,
1478
+ PostLoyaltyRewardOrderEarnBody,
1479
+ PostLoyaltyRewardOrderEarnResponse,
1480
+ } from './interface/loyalty';
1481
+
1401
1482
  import {
1402
1483
  GetTimeslotsBrandQuery,
1403
1484
  GetTimeslotsBrandResponse,
@@ -5652,6 +5733,15 @@ export class ServiceClient extends BaseServiceClient {
5652
5733
  return this.request('user', '/user/ping', 'GET', `/user/ping`, null, options);
5653
5734
  }
5654
5735
 
5736
+ /**
5737
+ * GET /user/health - User Service health check with dependency validation
5738
+ *
5739
+ * @param options - additional request options
5740
+ */
5741
+ get_user_health(options?: RequestOptions): ResponsePromise<GetUserHealthResponse> {
5742
+ return this.request('user', '/user/health', 'GET', `/user/health`, null, options);
5743
+ }
5744
+
5655
5745
  /**
5656
5746
  * GET /calendar/{id}
5657
5747
  *
@@ -14024,6 +14114,28 @@ export class ServiceClient extends BaseServiceClient {
14024
14114
  );
14025
14115
  }
14026
14116
 
14117
+ /**
14118
+ * DELETE /consumer/mealplan/{mealplanId} - delete mealplan
14119
+ *
14120
+ * @param mealplanId - Mealplan ID
14121
+ * @param body - Delete Mealplan Request Body
14122
+ * @param options - additional request options
14123
+ */
14124
+ delete_mealplan_consumer(
14125
+ mealplanId: string,
14126
+ body: DeleteMealplanConsumerBody,
14127
+ options?: RequestOptions,
14128
+ ): ResponsePromise<DeleteMealplanConsumerResponse> {
14129
+ return this.request(
14130
+ 'consumer',
14131
+ '/consumer/mealplan/{mealplanId}',
14132
+ 'DELETE',
14133
+ `/consumer/mealplan/${mealplanId}`,
14134
+ body,
14135
+ options,
14136
+ );
14137
+ }
14138
+
14027
14139
  /**
14028
14140
  * POST /consumer/mealplan/{mealplanId}/verify - Send mealplan verification email
14029
14141
  *
@@ -14470,6 +14582,48 @@ export class ServiceClient extends BaseServiceClient {
14470
14582
  );
14471
14583
  }
14472
14584
 
14585
+ /**
14586
+ * GET /consumer/review/order/{orderId} - Get reviews for order items
14587
+ *
14588
+ * @param orderId
14589
+ * @param options - additional request options
14590
+ */
14591
+ get_consumer_review_order_items(
14592
+ orderId: string,
14593
+ options: {
14594
+ query: GetConsumerReviewOrderItemsQuery;
14595
+ } & RequestOptions,
14596
+ ): ResponsePromise<GetConsumerReviewOrderItemsResponse> {
14597
+ return this.request(
14598
+ 'consumer',
14599
+ '/consumer/review/order/{orderId}',
14600
+ 'GET',
14601
+ `/consumer/review/order/${orderId}`,
14602
+ null,
14603
+ options,
14604
+ );
14605
+ }
14606
+
14607
+ /**
14608
+ * POST /consumer/shoppingcart/bulk - get multiple shopping carts
14609
+ *
14610
+ * @param body - Post Shopping Cart Bulk Request Body
14611
+ * @param options - additional request options
14612
+ */
14613
+ post_consumer_shoppingcart_bulk(
14614
+ body: PostConsumerShoppingcartBulkBody,
14615
+ options?: RequestOptions,
14616
+ ): ResponsePromise<PostConsumerShoppingcartBulkResponse> {
14617
+ return this.request(
14618
+ 'consumer',
14619
+ '/consumer/shoppingcart/bulk',
14620
+ 'POST',
14621
+ `/consumer/shoppingcart/bulk`,
14622
+ body,
14623
+ options,
14624
+ );
14625
+ }
14626
+
14473
14627
  /**
14474
14628
  * POST /ai/language/generate - Generate text from a given prompt
14475
14629
  *
@@ -14929,6 +15083,28 @@ export class ServiceClient extends BaseServiceClient {
14929
15083
  );
14930
15084
  }
14931
15085
 
15086
+ /**
15087
+ * DELETE /centricos/station/{station_id}/{integration_type} - Delete station integration
15088
+ *
15089
+ * @param station_id - TODO: cannot use CompassLongID as path parameter
15090
+ * @param integration_type
15091
+ * @param options - additional request options
15092
+ */
15093
+ delete_centricos_station_integration(
15094
+ station_id: string,
15095
+ integration_type: string,
15096
+ options?: RequestOptions,
15097
+ ): ResponsePromise<DeleteCentricosStationIntegrationResponse> {
15098
+ return this.request(
15099
+ 'centricos',
15100
+ '/centricos/station/{station_id}/{integration_type}',
15101
+ 'DELETE',
15102
+ `/centricos/station/${station_id}/${integration_type}`,
15103
+ null,
15104
+ options,
15105
+ );
15106
+ }
15107
+
14932
15108
  /**
14933
15109
  * PUT /centricos/discount/voucherify - Add or Update a voucherify discount and assign it to multiple sites
14934
15110
  *
@@ -15227,20 +15403,20 @@ export class ServiceClient extends BaseServiceClient {
15227
15403
  }
15228
15404
 
15229
15405
  /**
15230
- * GET /centricos/swaps/details - Get detailed information about a swap recommendation
15406
+ * GET /centricos/swaps/details/{recommendation_id} - Get detailed information about a swap recommendation
15231
15407
  *
15408
+ * @param recommendation_id - Unique swap recommendation ID
15232
15409
  * @param options - additional request options
15233
15410
  */
15234
15411
  get_swap_details(
15235
- options: {
15236
- query: GetSwapDetailsQuery;
15237
- } & RequestOptions,
15412
+ recommendation_id: string,
15413
+ options?: RequestOptions,
15238
15414
  ): ResponsePromise<GetSwapDetailsResponse> {
15239
15415
  return this.request(
15240
15416
  'centricos',
15241
- '/centricos/swaps/details',
15417
+ '/centricos/swaps/details/{recommendation_id}',
15242
15418
  'GET',
15243
- `/centricos/swaps/details`,
15419
+ `/centricos/swaps/details/${recommendation_id}`,
15244
15420
  null,
15245
15421
  options,
15246
15422
  );
@@ -15718,6 +15894,874 @@ export class ServiceClient extends BaseServiceClient {
15718
15894
  );
15719
15895
  }
15720
15896
 
15897
+ /**
15898
+ * GET /loyalty/bundles - List bundles with optional filters
15899
+ *
15900
+ * @param options - additional request options
15901
+ */
15902
+ get_loyalty_bundles(
15903
+ options?: {
15904
+ query?: GetLoyaltyBundlesQuery;
15905
+ } & RequestOptions,
15906
+ ): ResponsePromise<GetLoyaltyBundlesResponse> {
15907
+ return this.request(
15908
+ 'loyalty',
15909
+ '/loyalty/bundles',
15910
+ 'GET',
15911
+ `/loyalty/bundles`,
15912
+ null,
15913
+ options,
15914
+ );
15915
+ }
15916
+
15917
+ /**
15918
+ * POST /loyalty/bundles - Create a new bundle
15919
+ *
15920
+ * @param body
15921
+ * @param options - additional request options
15922
+ */
15923
+ post_loyalty_bundle(
15924
+ body: PostLoyaltyBundleBody,
15925
+ options?: RequestOptions,
15926
+ ): ResponsePromise<PostLoyaltyBundleResponse> {
15927
+ return this.request(
15928
+ 'loyalty',
15929
+ '/loyalty/bundles',
15930
+ 'POST',
15931
+ `/loyalty/bundles`,
15932
+ body,
15933
+ options,
15934
+ );
15935
+ }
15936
+
15937
+ /**
15938
+ * GET /loyalty/bundles/{id} - Get bundle by ID with groups
15939
+ *
15940
+ * @param id
15941
+ * @param options - additional request options
15942
+ */
15943
+ get_loyalty_bundle(
15944
+ id: string,
15945
+ options?: RequestOptions,
15946
+ ): ResponsePromise<GetLoyaltyBundleResponse> {
15947
+ return this.request(
15948
+ 'loyalty',
15949
+ '/loyalty/bundles/{id}',
15950
+ 'GET',
15951
+ `/loyalty/bundles/${id}`,
15952
+ null,
15953
+ options,
15954
+ );
15955
+ }
15956
+
15957
+ /**
15958
+ * PATCH /loyalty/bundles/{id} - Update a bundle
15959
+ *
15960
+ * @param id
15961
+ * @param body
15962
+ * @param options - additional request options
15963
+ */
15964
+ patch_loyalty_bundle(
15965
+ id: string,
15966
+ body: PatchLoyaltyBundleBody,
15967
+ options?: RequestOptions,
15968
+ ): ResponsePromise<PatchLoyaltyBundleResponse> {
15969
+ return this.request(
15970
+ 'loyalty',
15971
+ '/loyalty/bundles/{id}',
15972
+ 'PATCH',
15973
+ `/loyalty/bundles/${id}`,
15974
+ body,
15975
+ options,
15976
+ );
15977
+ }
15978
+
15979
+ /**
15980
+ * DELETE /loyalty/bundles/{id} - Soft-delete a bundle
15981
+ *
15982
+ * @param id
15983
+ * @param options - additional request options
15984
+ */
15985
+ delete_loyalty_bundle(
15986
+ id: string,
15987
+ options?: RequestOptions,
15988
+ ): ResponsePromise<DeleteLoyaltyBundleResponse> {
15989
+ return this.request(
15990
+ 'loyalty',
15991
+ '/loyalty/bundles/{id}',
15992
+ 'DELETE',
15993
+ `/loyalty/bundles/${id}`,
15994
+ null,
15995
+ options,
15996
+ );
15997
+ }
15998
+
15999
+ /**
16000
+ * GET /loyalty/campaigns - List campaigns with filters and pagination
16001
+ *
16002
+ * @param options - additional request options
16003
+ */
16004
+ get_loyalty_campaigns(
16005
+ options?: {
16006
+ query?: GetLoyaltyCampaignsQuery;
16007
+ } & RequestOptions,
16008
+ ): ResponsePromise<GetLoyaltyCampaignsResponse> {
16009
+ return this.request(
16010
+ 'loyalty',
16011
+ '/loyalty/campaigns',
16012
+ 'GET',
16013
+ `/loyalty/campaigns`,
16014
+ null,
16015
+ options,
16016
+ );
16017
+ }
16018
+
16019
+ /**
16020
+ * POST /loyalty/campaigns - Create a campaign with nested child entities
16021
+ *
16022
+ * @param body
16023
+ * @param options - additional request options
16024
+ */
16025
+ post_loyalty_campaign(
16026
+ body: PostLoyaltyCampaignBody,
16027
+ options?: RequestOptions,
16028
+ ): ResponsePromise<PostLoyaltyCampaignResponse> {
16029
+ return this.request(
16030
+ 'loyalty',
16031
+ '/loyalty/campaigns',
16032
+ 'POST',
16033
+ `/loyalty/campaigns`,
16034
+ body,
16035
+ options,
16036
+ );
16037
+ }
16038
+
16039
+ /**
16040
+ * GET /loyalty/campaigns/{id} - Get campaign detail with all child entities
16041
+ *
16042
+ * @param id
16043
+ * @param options - additional request options
16044
+ */
16045
+ get_loyalty_campaign(
16046
+ id: string,
16047
+ options?: RequestOptions,
16048
+ ): ResponsePromise<GetLoyaltyCampaignResponse> {
16049
+ return this.request(
16050
+ 'loyalty',
16051
+ '/loyalty/campaigns/{id}',
16052
+ 'GET',
16053
+ `/loyalty/campaigns/${id}`,
16054
+ null,
16055
+ options,
16056
+ );
16057
+ }
16058
+
16059
+ /**
16060
+ * PUT /loyalty/campaigns/{id} - Update a campaign and its child entities
16061
+ *
16062
+ * @param id
16063
+ * @param body
16064
+ * @param options - additional request options
16065
+ */
16066
+ put_loyalty_campaign(
16067
+ id: string,
16068
+ body: PutLoyaltyCampaignBody,
16069
+ options?: RequestOptions,
16070
+ ): ResponsePromise<PutLoyaltyCampaignResponse> {
16071
+ return this.request(
16072
+ 'loyalty',
16073
+ '/loyalty/campaigns/{id}',
16074
+ 'PUT',
16075
+ `/loyalty/campaigns/${id}`,
16076
+ body,
16077
+ options,
16078
+ );
16079
+ }
16080
+
16081
+ /**
16082
+ * DELETE /loyalty/campaigns/{id} - Soft-delete a campaign
16083
+ *
16084
+ * @param id
16085
+ * @param options - additional request options
16086
+ */
16087
+ delete_loyalty_campaign(
16088
+ id: string,
16089
+ options?: RequestOptions,
16090
+ ): ResponsePromise<DeleteLoyaltyCampaignResponse> {
16091
+ return this.request(
16092
+ 'loyalty',
16093
+ '/loyalty/campaigns/{id}',
16094
+ 'DELETE',
16095
+ `/loyalty/campaigns/${id}`,
16096
+ null,
16097
+ options,
16098
+ );
16099
+ }
16100
+
16101
+ /**
16102
+ * PATCH /loyalty/campaigns/{id}/status - Transition campaign status
16103
+ *
16104
+ * @param id
16105
+ * @param body
16106
+ * @param options - additional request options
16107
+ */
16108
+ patch_loyalty_campaign_status(
16109
+ id: string,
16110
+ body: PatchLoyaltyCampaignStatusBody,
16111
+ options?: RequestOptions,
16112
+ ): ResponsePromise<PatchLoyaltyCampaignStatusResponse> {
16113
+ return this.request(
16114
+ 'loyalty',
16115
+ '/loyalty/campaigns/{id}/status',
16116
+ 'PATCH',
16117
+ `/loyalty/campaigns/${id}/status`,
16118
+ body,
16119
+ options,
16120
+ );
16121
+ }
16122
+
16123
+ /**
16124
+ * POST /loyalty/campaigns/{id}/clone - Deep clone a campaign and all child entities
16125
+ *
16126
+ * @param id
16127
+ * @param options - additional request options
16128
+ */
16129
+ post_loyalty_campaign_clone(
16130
+ id: string,
16131
+ options?: RequestOptions,
16132
+ ): ResponsePromise<PostLoyaltyCampaignCloneResponse> {
16133
+ return this.request(
16134
+ 'loyalty',
16135
+ '/loyalty/campaigns/{id}/clone',
16136
+ 'POST',
16137
+ `/loyalty/campaigns/${id}/clone`,
16138
+ null,
16139
+ options,
16140
+ );
16141
+ }
16142
+
16143
+ /**
16144
+ * GET /loyalty/vouchers - List vouchers with optional filters
16145
+ *
16146
+ * @param options - additional request options
16147
+ */
16148
+ get_loyalty_vouchers(
16149
+ options?: {
16150
+ query?: GetLoyaltyVouchersQuery;
16151
+ } & RequestOptions,
16152
+ ): ResponsePromise<GetLoyaltyVouchersResponse> {
16153
+ return this.request(
16154
+ 'loyalty',
16155
+ '/loyalty/vouchers',
16156
+ 'GET',
16157
+ `/loyalty/vouchers`,
16158
+ null,
16159
+ options,
16160
+ );
16161
+ }
16162
+
16163
+ /**
16164
+ * POST /loyalty/vouchers - Create a single voucher
16165
+ *
16166
+ * @param body
16167
+ * @param options - additional request options
16168
+ */
16169
+ post_loyalty_voucher(
16170
+ body: PostLoyaltyVoucherBody,
16171
+ options?: RequestOptions,
16172
+ ): ResponsePromise<PostLoyaltyVoucherResponse> {
16173
+ return this.request(
16174
+ 'loyalty',
16175
+ '/loyalty/vouchers',
16176
+ 'POST',
16177
+ `/loyalty/vouchers`,
16178
+ body,
16179
+ options,
16180
+ );
16181
+ }
16182
+
16183
+ /**
16184
+ * GET /loyalty/vouchers/{id} - Get voucher by ID with campaign info and redemption count
16185
+ *
16186
+ * @param id
16187
+ * @param options - additional request options
16188
+ */
16189
+ get_loyalty_voucher(
16190
+ id: string,
16191
+ options?: RequestOptions,
16192
+ ): ResponsePromise<GetLoyaltyVoucherResponse> {
16193
+ return this.request(
16194
+ 'loyalty',
16195
+ '/loyalty/vouchers/{id}',
16196
+ 'GET',
16197
+ `/loyalty/vouchers/${id}`,
16198
+ null,
16199
+ options,
16200
+ );
16201
+ }
16202
+
16203
+ /**
16204
+ * PUT /loyalty/vouchers/{id} - Update a voucher
16205
+ *
16206
+ * @param id
16207
+ * @param body
16208
+ * @param options - additional request options
16209
+ */
16210
+ put_loyalty_voucher(
16211
+ id: string,
16212
+ body: PutLoyaltyVoucherBody,
16213
+ options?: RequestOptions,
16214
+ ): ResponsePromise<PutLoyaltyVoucherResponse> {
16215
+ return this.request(
16216
+ 'loyalty',
16217
+ '/loyalty/vouchers/{id}',
16218
+ 'PUT',
16219
+ `/loyalty/vouchers/${id}`,
16220
+ body,
16221
+ options,
16222
+ );
16223
+ }
16224
+
16225
+ /**
16226
+ * DELETE /loyalty/vouchers/{id} - Soft-delete a voucher
16227
+ *
16228
+ * @param id
16229
+ * @param options - additional request options
16230
+ */
16231
+ delete_loyalty_voucher(
16232
+ id: string,
16233
+ options?: RequestOptions,
16234
+ ): ResponsePromise<DeleteLoyaltyVoucherResponse> {
16235
+ return this.request(
16236
+ 'loyalty',
16237
+ '/loyalty/vouchers/{id}',
16238
+ 'DELETE',
16239
+ `/loyalty/vouchers/${id}`,
16240
+ null,
16241
+ options,
16242
+ );
16243
+ }
16244
+
16245
+ /**
16246
+ * POST /loyalty/vouchers/{id}/revoke - Revoke a voucher with a required reason
16247
+ *
16248
+ * @param id
16249
+ * @param body
16250
+ * @param options - additional request options
16251
+ */
16252
+ post_loyalty_voucher_revoke(
16253
+ id: string,
16254
+ body: PostLoyaltyVoucherRevokeBody,
16255
+ options?: RequestOptions,
16256
+ ): ResponsePromise<PostLoyaltyVoucherRevokeResponse> {
16257
+ return this.request(
16258
+ 'loyalty',
16259
+ '/loyalty/vouchers/{id}/revoke',
16260
+ 'POST',
16261
+ `/loyalty/vouchers/${id}/revoke`,
16262
+ body,
16263
+ options,
16264
+ );
16265
+ }
16266
+
16267
+ /**
16268
+ * POST /loyalty/vouchers/batch - Batch generate voucher codes for a campaign
16269
+ *
16270
+ * @param body
16271
+ * @param options - additional request options
16272
+ */
16273
+ post_loyalty_vouchers_batch(
16274
+ body: PostLoyaltyVouchersBatchBody,
16275
+ options?: RequestOptions,
16276
+ ): ResponsePromise<PostLoyaltyVouchersBatchResponse> {
16277
+ return this.request(
16278
+ 'loyalty',
16279
+ '/loyalty/vouchers/batch',
16280
+ 'POST',
16281
+ `/loyalty/vouchers/batch`,
16282
+ body,
16283
+ options,
16284
+ );
16285
+ }
16286
+
16287
+ /**
16288
+ * GET /loyalty/vouchers/{id}/redemptions - Get redemption history for a voucher
16289
+ *
16290
+ * @param id
16291
+ * @param options - additional request options
16292
+ */
16293
+ get_loyalty_voucher_redemptions(
16294
+ id: string,
16295
+ options?: {
16296
+ query?: GetLoyaltyVoucherRedemptionsQuery;
16297
+ } & RequestOptions,
16298
+ ): ResponsePromise<GetLoyaltyVoucherRedemptionsResponse> {
16299
+ return this.request(
16300
+ 'loyalty',
16301
+ '/loyalty/vouchers/{id}/redemptions',
16302
+ 'GET',
16303
+ `/loyalty/vouchers/${id}/redemptions`,
16304
+ null,
16305
+ options,
16306
+ );
16307
+ }
16308
+
16309
+ /**
16310
+ * POST /loyalty/vouchers/validate - Validate one or more voucher codes
16311
+ *
16312
+ * @param body
16313
+ * @param options - additional request options
16314
+ */
16315
+ post_loyalty_vouchers_validate(
16316
+ body: PostLoyaltyVouchersValidateBody,
16317
+ options?: RequestOptions,
16318
+ ): ResponsePromise<PostLoyaltyVouchersValidateResponse> {
16319
+ return this.request(
16320
+ 'loyalty',
16321
+ '/loyalty/vouchers/validate',
16322
+ 'POST',
16323
+ `/loyalty/vouchers/validate`,
16324
+ body,
16325
+ options,
16326
+ );
16327
+ }
16328
+
16329
+ /**
16330
+ * POST /loyalty/vouchers/redeem - Redeem one or more voucher codes
16331
+ *
16332
+ * @param body
16333
+ * @param options - additional request options
16334
+ */
16335
+ post_loyalty_vouchers_redeem(
16336
+ body: PostLoyaltyVouchersRedeemBody,
16337
+ options?: RequestOptions,
16338
+ ): ResponsePromise<PostLoyaltyVouchersRedeemResponse> {
16339
+ return this.request(
16340
+ 'loyalty',
16341
+ '/loyalty/vouchers/redeem',
16342
+ 'POST',
16343
+ `/loyalty/vouchers/redeem`,
16344
+ body,
16345
+ options,
16346
+ );
16347
+ }
16348
+
16349
+ /**
16350
+ * GET /loyalty/segments - List segments with optional filters
16351
+ *
16352
+ * @param options - additional request options
16353
+ */
16354
+ get_loyalty_segments(
16355
+ options?: {
16356
+ query?: GetLoyaltySegmentsQuery;
16357
+ } & RequestOptions,
16358
+ ): ResponsePromise<GetLoyaltySegmentsResponse> {
16359
+ return this.request(
16360
+ 'loyalty',
16361
+ '/loyalty/segments',
16362
+ 'GET',
16363
+ `/loyalty/segments`,
16364
+ null,
16365
+ options,
16366
+ );
16367
+ }
16368
+
16369
+ /**
16370
+ * POST /loyalty/segments - Create a new segment
16371
+ *
16372
+ * @param body
16373
+ * @param options - additional request options
16374
+ */
16375
+ post_loyalty_segment(
16376
+ body: PostLoyaltySegmentBody,
16377
+ options?: RequestOptions,
16378
+ ): ResponsePromise<PostLoyaltySegmentResponse> {
16379
+ return this.request(
16380
+ 'loyalty',
16381
+ '/loyalty/segments',
16382
+ 'POST',
16383
+ `/loyalty/segments`,
16384
+ body,
16385
+ options,
16386
+ );
16387
+ }
16388
+
16389
+ /**
16390
+ * GET /loyalty/segments/attributes - List available attributes for rule-based segments
16391
+ *
16392
+ * @param options - additional request options
16393
+ */
16394
+ get_loyalty_segment_attributes(
16395
+ options?: RequestOptions,
16396
+ ): ResponsePromise<GetLoyaltySegmentAttributesResponse> {
16397
+ return this.request(
16398
+ 'loyalty',
16399
+ '/loyalty/segments/attributes',
16400
+ 'GET',
16401
+ `/loyalty/segments/attributes`,
16402
+ null,
16403
+ options,
16404
+ );
16405
+ }
16406
+
16407
+ /**
16408
+ * POST /loyalty/segments/preview-count - Preview how many customers match a segment rule
16409
+ *
16410
+ * @param options - additional request options
16411
+ */
16412
+ post_loyalty_segment_preview_count(
16413
+ options?: RequestOptions,
16414
+ ): ResponsePromise<PostLoyaltySegmentPreviewCountResponse> {
16415
+ return this.request(
16416
+ 'loyalty',
16417
+ '/loyalty/segments/preview-count',
16418
+ 'POST',
16419
+ `/loyalty/segments/preview-count`,
16420
+ null,
16421
+ options,
16422
+ );
16423
+ }
16424
+
16425
+ /**
16426
+ * GET /loyalty/segments/{id} - Get segment by ID
16427
+ *
16428
+ * @param id
16429
+ * @param options - additional request options
16430
+ */
16431
+ get_loyalty_segment(
16432
+ id: string,
16433
+ options?: RequestOptions,
16434
+ ): ResponsePromise<GetLoyaltySegmentResponse> {
16435
+ return this.request(
16436
+ 'loyalty',
16437
+ '/loyalty/segments/{id}',
16438
+ 'GET',
16439
+ `/loyalty/segments/${id}`,
16440
+ null,
16441
+ options,
16442
+ );
16443
+ }
16444
+
16445
+ /**
16446
+ * PATCH /loyalty/segments/{id} - Update a segment
16447
+ *
16448
+ * @param id
16449
+ * @param body
16450
+ * @param options - additional request options
16451
+ */
16452
+ patch_loyalty_segment(
16453
+ id: string,
16454
+ body: PatchLoyaltySegmentBody,
16455
+ options?: RequestOptions,
16456
+ ): ResponsePromise<PatchLoyaltySegmentResponse> {
16457
+ return this.request(
16458
+ 'loyalty',
16459
+ '/loyalty/segments/{id}',
16460
+ 'PATCH',
16461
+ `/loyalty/segments/${id}`,
16462
+ body,
16463
+ options,
16464
+ );
16465
+ }
16466
+
16467
+ /**
16468
+ * DELETE /loyalty/segments/{id} - Soft-delete a segment
16469
+ *
16470
+ * @param id
16471
+ * @param options - additional request options
16472
+ */
16473
+ delete_loyalty_segment(
16474
+ id: string,
16475
+ options?: RequestOptions,
16476
+ ): ResponsePromise<DeleteLoyaltySegmentResponse> {
16477
+ return this.request(
16478
+ 'loyalty',
16479
+ '/loyalty/segments/{id}',
16480
+ 'DELETE',
16481
+ `/loyalty/segments/${id}`,
16482
+ null,
16483
+ options,
16484
+ );
16485
+ }
16486
+
16487
+ /**
16488
+ * GET /loyalty/segments/{id}/members - List members of a static_list segment
16489
+ *
16490
+ * @param id
16491
+ * @param options - additional request options
16492
+ */
16493
+ get_loyalty_segment_members(
16494
+ id: string,
16495
+ options?: {
16496
+ query?: GetLoyaltySegmentMembersQuery;
16497
+ } & RequestOptions,
16498
+ ): ResponsePromise<GetLoyaltySegmentMembersResponse> {
16499
+ return this.request(
16500
+ 'loyalty',
16501
+ '/loyalty/segments/{id}/members',
16502
+ 'GET',
16503
+ `/loyalty/segments/${id}/members`,
16504
+ null,
16505
+ options,
16506
+ );
16507
+ }
16508
+
16509
+ /**
16510
+ * POST /loyalty/segments/{id}/members - Add members to a segment
16511
+ *
16512
+ * @param id
16513
+ * @param body
16514
+ * @param options - additional request options
16515
+ */
16516
+ post_loyalty_segment_members(
16517
+ id: string,
16518
+ body: PostLoyaltySegmentMembersBody,
16519
+ options?: RequestOptions,
16520
+ ): ResponsePromise<PostLoyaltySegmentMembersResponse> {
16521
+ return this.request(
16522
+ 'loyalty',
16523
+ '/loyalty/segments/{id}/members',
16524
+ 'POST',
16525
+ `/loyalty/segments/${id}/members`,
16526
+ body,
16527
+ options,
16528
+ );
16529
+ }
16530
+
16531
+ /**
16532
+ * DELETE /loyalty/segments/{id}/members - Remove members from a segment
16533
+ *
16534
+ * @param id
16535
+ * @param body
16536
+ * @param options - additional request options
16537
+ */
16538
+ delete_loyalty_segment_members(
16539
+ id: string,
16540
+ body: DeleteLoyaltySegmentMembersBody,
16541
+ options?: RequestOptions,
16542
+ ): ResponsePromise<DeleteLoyaltySegmentMembersResponse> {
16543
+ return this.request(
16544
+ 'loyalty',
16545
+ '/loyalty/segments/{id}/members',
16546
+ 'DELETE',
16547
+ `/loyalty/segments/${id}/members`,
16548
+ body,
16549
+ options,
16550
+ );
16551
+ }
16552
+
16553
+ /**
16554
+ * POST /loyalty/redemptions/{id}/rollback - Roll back a redemption and restore the voucher
16555
+ *
16556
+ * @param id
16557
+ * @param body
16558
+ * @param options - additional request options
16559
+ */
16560
+ post_loyalty_redemption_rollback(
16561
+ id: string,
16562
+ body: PostLoyaltyRedemptionRollbackBody,
16563
+ options?: RequestOptions,
16564
+ ): ResponsePromise<PostLoyaltyRedemptionRollbackResponse> {
16565
+ return this.request(
16566
+ 'loyalty',
16567
+ '/loyalty/redemptions/{id}/rollback',
16568
+ 'POST',
16569
+ `/loyalty/redemptions/${id}/rollback`,
16570
+ body,
16571
+ options,
16572
+ );
16573
+ }
16574
+
16575
+ /**
16576
+ * GET /loyalty/rewards - List rewards with filters and pagination
16577
+ *
16578
+ * @param options - additional request options
16579
+ */
16580
+ get_loyalty_rewards(
16581
+ options?: {
16582
+ query?: GetLoyaltyRewardsQuery;
16583
+ } & RequestOptions,
16584
+ ): ResponsePromise<GetLoyaltyRewardsResponse> {
16585
+ return this.request(
16586
+ 'loyalty',
16587
+ '/loyalty/rewards',
16588
+ 'GET',
16589
+ `/loyalty/rewards`,
16590
+ null,
16591
+ options,
16592
+ );
16593
+ }
16594
+
16595
+ /**
16596
+ * POST /loyalty/rewards - Create a reward with earning rules and milestones
16597
+ *
16598
+ * @param body
16599
+ * @param options - additional request options
16600
+ */
16601
+ post_loyalty_reward(
16602
+ body: PostLoyaltyRewardBody,
16603
+ options?: RequestOptions,
16604
+ ): ResponsePromise<PostLoyaltyRewardResponse> {
16605
+ return this.request(
16606
+ 'loyalty',
16607
+ '/loyalty/rewards',
16608
+ 'POST',
16609
+ `/loyalty/rewards`,
16610
+ body,
16611
+ options,
16612
+ );
16613
+ }
16614
+
16615
+ /**
16616
+ * GET /loyalty/rewards/{id} - Get reward detail with earning rules and milestones
16617
+ *
16618
+ * @param id
16619
+ * @param options - additional request options
16620
+ */
16621
+ get_loyalty_reward(
16622
+ id: string,
16623
+ options?: RequestOptions,
16624
+ ): ResponsePromise<GetLoyaltyRewardResponse> {
16625
+ return this.request(
16626
+ 'loyalty',
16627
+ '/loyalty/rewards/{id}',
16628
+ 'GET',
16629
+ `/loyalty/rewards/${id}`,
16630
+ null,
16631
+ options,
16632
+ );
16633
+ }
16634
+
16635
+ /**
16636
+ * PUT /loyalty/rewards/{id} - Update a reward and replace its earning rules and milestones
16637
+ *
16638
+ * @param id
16639
+ * @param body
16640
+ * @param options - additional request options
16641
+ */
16642
+ put_loyalty_reward(
16643
+ id: string,
16644
+ body: PutLoyaltyRewardBody,
16645
+ options?: RequestOptions,
16646
+ ): ResponsePromise<PutLoyaltyRewardResponse> {
16647
+ return this.request(
16648
+ 'loyalty',
16649
+ '/loyalty/rewards/{id}',
16650
+ 'PUT',
16651
+ `/loyalty/rewards/${id}`,
16652
+ body,
16653
+ options,
16654
+ );
16655
+ }
16656
+
16657
+ /**
16658
+ * PATCH /loyalty/rewards/{id}/status - Transition reward status
16659
+ *
16660
+ * @param id
16661
+ * @param body
16662
+ * @param options - additional request options
16663
+ */
16664
+ patch_loyalty_reward_status(
16665
+ id: string,
16666
+ body: PatchLoyaltyRewardStatusBody,
16667
+ options?: RequestOptions,
16668
+ ): ResponsePromise<PatchLoyaltyRewardStatusResponse> {
16669
+ return this.request(
16670
+ 'loyalty',
16671
+ '/loyalty/rewards/{id}/status',
16672
+ 'PATCH',
16673
+ `/loyalty/rewards/${id}/status`,
16674
+ body,
16675
+ options,
16676
+ );
16677
+ }
16678
+
16679
+ /**
16680
+ * GET /loyalty/rewards/{id}/cards - List enrolled customer cards for a reward
16681
+ *
16682
+ * @param id
16683
+ * @param options - additional request options
16684
+ */
16685
+ get_loyalty_reward_cards(
16686
+ id: string,
16687
+ options?: {
16688
+ query?: GetLoyaltyRewardCardsQuery;
16689
+ } & RequestOptions,
16690
+ ): ResponsePromise<GetLoyaltyRewardCardsResponse> {
16691
+ return this.request(
16692
+ 'loyalty',
16693
+ '/loyalty/rewards/{id}/cards',
16694
+ 'GET',
16695
+ `/loyalty/rewards/${id}/cards`,
16696
+ null,
16697
+ options,
16698
+ );
16699
+ }
16700
+
16701
+ /**
16702
+ * GET /loyalty/rewards/{id}/cards/{customerId} - Get card detail with transaction event history
16703
+ *
16704
+ * @param id
16705
+ * @param customerId
16706
+ * @param options - additional request options
16707
+ */
16708
+ get_loyalty_reward_card(
16709
+ id: string,
16710
+ customerId: string,
16711
+ options?: RequestOptions,
16712
+ ): ResponsePromise<GetLoyaltyRewardCardResponse> {
16713
+ return this.request(
16714
+ 'loyalty',
16715
+ '/loyalty/rewards/{id}/cards/{customerId}',
16716
+ 'GET',
16717
+ `/loyalty/rewards/${id}/cards/${customerId}`,
16718
+ null,
16719
+ options,
16720
+ );
16721
+ }
16722
+
16723
+ /**
16724
+ * POST /loyalty/rewards/cards/{cardId}/adjust - Manual point adjustment on a reward card
16725
+ *
16726
+ * @param cardId
16727
+ * @param body
16728
+ * @param options - additional request options
16729
+ */
16730
+ post_loyalty_reward_card_adjust(
16731
+ cardId: string,
16732
+ body: PostLoyaltyRewardCardAdjustBody,
16733
+ options?: RequestOptions,
16734
+ ): ResponsePromise<PostLoyaltyRewardCardAdjustResponse> {
16735
+ return this.request(
16736
+ 'loyalty',
16737
+ '/loyalty/rewards/cards/{cardId}/adjust',
16738
+ 'POST',
16739
+ `/loyalty/rewards/cards/${cardId}/adjust`,
16740
+ body,
16741
+ options,
16742
+ );
16743
+ }
16744
+
16745
+ /**
16746
+ * POST /loyalty/rewards/orders/earn - Evaluate an order against active reward rules and award points idempotently
16747
+ *
16748
+ * @param body
16749
+ * @param options - additional request options
16750
+ */
16751
+ post_loyalty_reward_order_earn(
16752
+ body: PostLoyaltyRewardOrderEarnBody,
16753
+ options?: RequestOptions,
16754
+ ): ResponsePromise<PostLoyaltyRewardOrderEarnResponse> {
16755
+ return this.request(
16756
+ 'loyalty',
16757
+ '/loyalty/rewards/orders/earn',
16758
+ 'POST',
16759
+ `/loyalty/rewards/orders/earn`,
16760
+ body,
16761
+ options,
16762
+ );
16763
+ }
16764
+
15721
16765
  /**
15722
16766
  * GET /timeslots/brand/{brandId} - Get timeslots for brand
15723
16767
  *