@compassdigital/sdk.typescript 4.963.0 → 4.965.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.
Files changed (36) hide show
  1. package/lib/index.d.ts +58 -58
  2. package/lib/index.d.ts.map +1 -1
  3. package/lib/index.js +69 -69
  4. package/lib/index.js.map +1 -1
  5. package/lib/interface/loyalty.d.ts +120 -120
  6. package/lib/interface/loyalty.d.ts.map +1 -1
  7. package/lib/messages/events/CampaignPublishedEvent.d.ts +77 -0
  8. package/lib/messages/events/CampaignPublishedEvent.d.ts.map +1 -0
  9. package/lib/messages/events/CampaignPublishedEvent.js +4 -0
  10. package/lib/messages/events/CampaignPublishedEvent.js.map +1 -0
  11. package/lib/messages/events/RewardCampaignPublishedEvent.d.ts +103 -1
  12. package/lib/messages/events/RewardCampaignPublishedEvent.d.ts.map +1 -1
  13. package/lib/messages/events/RewardCreatedEvent.d.ts +20 -1
  14. package/lib/messages/events/RewardCreatedEvent.d.ts.map +1 -1
  15. package/lib/messages/events/RewardPublishedEvent.d.ts +49 -0
  16. package/lib/messages/events/RewardPublishedEvent.d.ts.map +1 -0
  17. package/lib/messages/events/RewardPublishedEvent.js +4 -0
  18. package/lib/messages/events/RewardPublishedEvent.js.map +1 -0
  19. package/lib/messages/events/RewardRedeemedEvent.d.ts +16 -1
  20. package/lib/messages/events/RewardRedeemedEvent.d.ts.map +1 -1
  21. package/lib/messages/events/VoucherCreatedEvent.d.ts +30 -0
  22. package/lib/messages/events/VoucherCreatedEvent.d.ts.map +1 -0
  23. package/lib/messages/events/VoucherCreatedEvent.js +4 -0
  24. package/lib/messages/events/VoucherCreatedEvent.js.map +1 -0
  25. package/lib/messages/events/index.d.ts +3 -0
  26. package/lib/messages/events/index.d.ts.map +1 -1
  27. package/package.json +1 -1
  28. package/src/index.ts +168 -168
  29. package/src/interface/loyalty.ts +188 -188
  30. package/src/messages/events/CampaignPublishedEvent.ts +95 -0
  31. package/src/messages/events/RewardCampaignPublishedEvent.ts +136 -1
  32. package/src/messages/events/RewardCreatedEvent.ts +31 -1
  33. package/src/messages/events/RewardPublishedEvent.ts +70 -0
  34. package/src/messages/events/RewardRedeemedEvent.ts +30 -1
  35. package/src/messages/events/VoucherCreatedEvent.ts +43 -0
  36. package/src/messages/events/index.ts +6 -0
package/src/index.ts CHANGED
@@ -1655,6 +1655,22 @@ import {
1655
1655
  PostLoyaltyVouchersValidateResponse,
1656
1656
  PostLoyaltyVouchersRedeemBody,
1657
1657
  PostLoyaltyVouchersRedeemResponse,
1658
+ GetLoyaltyRewardsQuery,
1659
+ GetLoyaltyRewardsResponse,
1660
+ PostLoyaltyRewardBody,
1661
+ PostLoyaltyRewardResponse,
1662
+ GetLoyaltyRewardResponse,
1663
+ PutLoyaltyRewardBody,
1664
+ PutLoyaltyRewardResponse,
1665
+ PatchLoyaltyRewardStatusBody,
1666
+ PatchLoyaltyRewardStatusResponse,
1667
+ GetLoyaltyRewardCardsQuery,
1668
+ GetLoyaltyRewardCardsResponse,
1669
+ GetLoyaltyRewardCardResponse,
1670
+ PostLoyaltyRewardCardAdjustBody,
1671
+ PostLoyaltyRewardCardAdjustResponse,
1672
+ PostLoyaltyRewardOrderEarnBody,
1673
+ PostLoyaltyRewardOrderEarnResponse,
1658
1674
  GetLoyaltySegmentsQuery,
1659
1675
  GetLoyaltySegmentsResponse,
1660
1676
  PostLoyaltySegmentBody,
@@ -1674,22 +1690,6 @@ import {
1674
1690
  DeleteLoyaltySegmentMembersResponse,
1675
1691
  PostLoyaltyRedemptionRollbackBody,
1676
1692
  PostLoyaltyRedemptionRollbackResponse,
1677
- GetLoyaltyRewardsQuery,
1678
- GetLoyaltyRewardsResponse,
1679
- PostLoyaltyRewardBody,
1680
- PostLoyaltyRewardResponse,
1681
- GetLoyaltyRewardResponse,
1682
- PutLoyaltyRewardBody,
1683
- PutLoyaltyRewardResponse,
1684
- PatchLoyaltyRewardStatusBody,
1685
- PatchLoyaltyRewardStatusResponse,
1686
- GetLoyaltyRewardCardsQuery,
1687
- GetLoyaltyRewardCardsResponse,
1688
- GetLoyaltyRewardCardResponse,
1689
- PostLoyaltyRewardCardAdjustBody,
1690
- PostLoyaltyRewardCardAdjustResponse,
1691
- PostLoyaltyRewardOrderEarnBody,
1692
- PostLoyaltyRewardOrderEarnResponse,
1693
1693
  } from './interface/loyalty';
1694
1694
 
1695
1695
  import {
@@ -19285,418 +19285,418 @@ export class ServiceClient extends BaseServiceClient {
19285
19285
  }
19286
19286
 
19287
19287
  /**
19288
- * GET /loyalty/segments - List segments with optional filters
19288
+ * GET /loyalty/rewards - List rewards with filters and pagination
19289
19289
  *
19290
19290
  * @param options - additional request options
19291
19291
  */
19292
- get_loyalty_segments(
19292
+ get_loyalty_rewards(
19293
19293
  options?: {
19294
- query?: GetLoyaltySegmentsQuery;
19294
+ query?: GetLoyaltyRewardsQuery;
19295
19295
  } & RequestOptions,
19296
- ): ResponsePromise<GetLoyaltySegmentsResponse> {
19296
+ ): ResponsePromise<GetLoyaltyRewardsResponse> {
19297
19297
  return this.request(
19298
19298
  'loyalty',
19299
- '/loyalty/segments',
19299
+ '/loyalty/rewards',
19300
19300
  'GET',
19301
- `/loyalty/segments`,
19301
+ `/loyalty/rewards`,
19302
19302
  null,
19303
19303
  options,
19304
19304
  );
19305
19305
  }
19306
19306
 
19307
19307
  /**
19308
- * POST /loyalty/segments - Create a new segment
19308
+ * POST /loyalty/rewards - Create a reward with earning rules and milestones
19309
19309
  *
19310
19310
  * @param body
19311
19311
  * @param options - additional request options
19312
19312
  */
19313
- post_loyalty_segment(
19314
- body: PostLoyaltySegmentBody,
19313
+ post_loyalty_reward(
19314
+ body: PostLoyaltyRewardBody,
19315
19315
  options?: RequestOptions,
19316
- ): ResponsePromise<PostLoyaltySegmentResponse> {
19316
+ ): ResponsePromise<PostLoyaltyRewardResponse> {
19317
19317
  return this.request(
19318
19318
  'loyalty',
19319
- '/loyalty/segments',
19319
+ '/loyalty/rewards',
19320
19320
  'POST',
19321
- `/loyalty/segments`,
19321
+ `/loyalty/rewards`,
19322
19322
  body,
19323
19323
  options,
19324
19324
  );
19325
19325
  }
19326
19326
 
19327
19327
  /**
19328
- * GET /loyalty/segments/attributes - List available attributes for rule-based segments
19328
+ * GET /loyalty/rewards/{id} - Get reward detail with earning rules and milestones
19329
19329
  *
19330
+ * @param id
19330
19331
  * @param options - additional request options
19331
19332
  */
19332
- get_loyalty_segment_attributes(
19333
+ get_loyalty_reward(
19334
+ id: string,
19333
19335
  options?: RequestOptions,
19334
- ): ResponsePromise<GetLoyaltySegmentAttributesResponse> {
19336
+ ): ResponsePromise<GetLoyaltyRewardResponse> {
19335
19337
  return this.request(
19336
19338
  'loyalty',
19337
- '/loyalty/segments/attributes',
19339
+ '/loyalty/rewards/{id}',
19338
19340
  'GET',
19339
- `/loyalty/segments/attributes`,
19341
+ `/loyalty/rewards/${id}`,
19340
19342
  null,
19341
19343
  options,
19342
19344
  );
19343
19345
  }
19344
19346
 
19345
19347
  /**
19346
- * POST /loyalty/segments/preview-count - Preview how many customers match a segment rule
19348
+ * PUT /loyalty/rewards/{id} - Update a reward and replace its earning rules and milestones
19347
19349
  *
19350
+ * @param id
19348
19351
  * @param body
19349
19352
  * @param options - additional request options
19350
19353
  */
19351
- post_loyalty_segment_preview_count(
19352
- body: PostLoyaltySegmentPreviewCountBody,
19354
+ put_loyalty_reward(
19355
+ id: string,
19356
+ body: PutLoyaltyRewardBody,
19353
19357
  options?: RequestOptions,
19354
- ): ResponsePromise<PostLoyaltySegmentPreviewCountResponse> {
19358
+ ): ResponsePromise<PutLoyaltyRewardResponse> {
19355
19359
  return this.request(
19356
19360
  'loyalty',
19357
- '/loyalty/segments/preview-count',
19358
- 'POST',
19359
- `/loyalty/segments/preview-count`,
19361
+ '/loyalty/rewards/{id}',
19362
+ 'PUT',
19363
+ `/loyalty/rewards/${id}`,
19360
19364
  body,
19361
19365
  options,
19362
19366
  );
19363
19367
  }
19364
19368
 
19365
19369
  /**
19366
- * GET /loyalty/segments/{id} - Get segment by ID
19370
+ * PATCH /loyalty/rewards/{id}/status - Transition reward status
19367
19371
  *
19368
19372
  * @param id
19373
+ * @param body
19369
19374
  * @param options - additional request options
19370
19375
  */
19371
- get_loyalty_segment(
19376
+ patch_loyalty_reward_status(
19372
19377
  id: string,
19378
+ body: PatchLoyaltyRewardStatusBody,
19373
19379
  options?: RequestOptions,
19374
- ): ResponsePromise<GetLoyaltySegmentResponse> {
19380
+ ): ResponsePromise<PatchLoyaltyRewardStatusResponse> {
19375
19381
  return this.request(
19376
19382
  'loyalty',
19377
- '/loyalty/segments/{id}',
19378
- 'GET',
19379
- `/loyalty/segments/${id}`,
19380
- null,
19383
+ '/loyalty/rewards/{id}/status',
19384
+ 'PATCH',
19385
+ `/loyalty/rewards/${id}/status`,
19386
+ body,
19381
19387
  options,
19382
19388
  );
19383
19389
  }
19384
19390
 
19385
19391
  /**
19386
- * PATCH /loyalty/segments/{id} - Update a segment
19392
+ * GET /loyalty/rewards/{id}/cards - List enrolled customer cards for a reward
19387
19393
  *
19388
19394
  * @param id
19389
- * @param body
19390
19395
  * @param options - additional request options
19391
19396
  */
19392
- patch_loyalty_segment(
19397
+ get_loyalty_reward_cards(
19393
19398
  id: string,
19394
- body: PatchLoyaltySegmentBody,
19395
- options?: RequestOptions,
19396
- ): ResponsePromise<PatchLoyaltySegmentResponse> {
19399
+ options?: {
19400
+ query?: GetLoyaltyRewardCardsQuery;
19401
+ } & RequestOptions,
19402
+ ): ResponsePromise<GetLoyaltyRewardCardsResponse> {
19397
19403
  return this.request(
19398
19404
  'loyalty',
19399
- '/loyalty/segments/{id}',
19400
- 'PATCH',
19401
- `/loyalty/segments/${id}`,
19402
- body,
19405
+ '/loyalty/rewards/{id}/cards',
19406
+ 'GET',
19407
+ `/loyalty/rewards/${id}/cards`,
19408
+ null,
19403
19409
  options,
19404
19410
  );
19405
19411
  }
19406
19412
 
19407
19413
  /**
19408
- * DELETE /loyalty/segments/{id} - Soft-delete a segment
19414
+ * GET /loyalty/rewards/{id}/cards/{customerId} - Get card detail with transaction event history
19409
19415
  *
19410
19416
  * @param id
19417
+ * @param customerId
19411
19418
  * @param options - additional request options
19412
19419
  */
19413
- delete_loyalty_segment(
19420
+ get_loyalty_reward_card(
19414
19421
  id: string,
19422
+ customerId: string,
19415
19423
  options?: RequestOptions,
19416
- ): ResponsePromise<DeleteLoyaltySegmentResponse> {
19424
+ ): ResponsePromise<GetLoyaltyRewardCardResponse> {
19417
19425
  return this.request(
19418
19426
  'loyalty',
19419
- '/loyalty/segments/{id}',
19420
- 'DELETE',
19421
- `/loyalty/segments/${id}`,
19427
+ '/loyalty/rewards/{id}/cards/{customerId}',
19428
+ 'GET',
19429
+ `/loyalty/rewards/${id}/cards/${customerId}`,
19422
19430
  null,
19423
19431
  options,
19424
19432
  );
19425
19433
  }
19426
19434
 
19427
19435
  /**
19428
- * GET /loyalty/segments/{id}/members - List members of a static_list segment
19436
+ * POST /loyalty/rewards/cards/{cardId}/adjust - Manual point adjustment on a reward card
19429
19437
  *
19430
- * @param id
19438
+ * @param cardId
19439
+ * @param body
19431
19440
  * @param options - additional request options
19432
19441
  */
19433
- get_loyalty_segment_members(
19434
- id: string,
19435
- options?: {
19436
- query?: GetLoyaltySegmentMembersQuery;
19437
- } & RequestOptions,
19438
- ): ResponsePromise<GetLoyaltySegmentMembersResponse> {
19442
+ post_loyalty_reward_card_adjust(
19443
+ cardId: string,
19444
+ body: PostLoyaltyRewardCardAdjustBody,
19445
+ options?: RequestOptions,
19446
+ ): ResponsePromise<PostLoyaltyRewardCardAdjustResponse> {
19439
19447
  return this.request(
19440
19448
  'loyalty',
19441
- '/loyalty/segments/{id}/members',
19442
- 'GET',
19443
- `/loyalty/segments/${id}/members`,
19444
- null,
19449
+ '/loyalty/rewards/cards/{cardId}/adjust',
19450
+ 'POST',
19451
+ `/loyalty/rewards/cards/${cardId}/adjust`,
19452
+ body,
19445
19453
  options,
19446
19454
  );
19447
19455
  }
19448
19456
 
19449
19457
  /**
19450
- * POST /loyalty/segments/{id}/members - Add members to a segment
19458
+ * POST /loyalty/rewards/orders/earn - Evaluate an order against active reward rules and award points idempotently
19451
19459
  *
19452
- * @param id
19453
19460
  * @param body
19454
19461
  * @param options - additional request options
19455
19462
  */
19456
- post_loyalty_segment_members(
19457
- id: string,
19458
- body: PostLoyaltySegmentMembersBody,
19463
+ post_loyalty_reward_order_earn(
19464
+ body: PostLoyaltyRewardOrderEarnBody,
19459
19465
  options?: RequestOptions,
19460
- ): ResponsePromise<PostLoyaltySegmentMembersResponse> {
19466
+ ): ResponsePromise<PostLoyaltyRewardOrderEarnResponse> {
19461
19467
  return this.request(
19462
19468
  'loyalty',
19463
- '/loyalty/segments/{id}/members',
19469
+ '/loyalty/rewards/orders/earn',
19464
19470
  'POST',
19465
- `/loyalty/segments/${id}/members`,
19471
+ `/loyalty/rewards/orders/earn`,
19466
19472
  body,
19467
19473
  options,
19468
19474
  );
19469
19475
  }
19470
19476
 
19471
19477
  /**
19472
- * DELETE /loyalty/segments/{id}/members - Remove members from a segment
19478
+ * GET /loyalty/segments - List segments with optional filters
19473
19479
  *
19474
- * @param id
19475
- * @param body
19476
19480
  * @param options - additional request options
19477
19481
  */
19478
- delete_loyalty_segment_members(
19479
- id: string,
19480
- body: DeleteLoyaltySegmentMembersBody,
19481
- options?: RequestOptions,
19482
- ): ResponsePromise<DeleteLoyaltySegmentMembersResponse> {
19482
+ get_loyalty_segments(
19483
+ options?: {
19484
+ query?: GetLoyaltySegmentsQuery;
19485
+ } & RequestOptions,
19486
+ ): ResponsePromise<GetLoyaltySegmentsResponse> {
19483
19487
  return this.request(
19484
19488
  'loyalty',
19485
- '/loyalty/segments/{id}/members',
19486
- 'DELETE',
19487
- `/loyalty/segments/${id}/members`,
19488
- body,
19489
+ '/loyalty/segments',
19490
+ 'GET',
19491
+ `/loyalty/segments`,
19492
+ null,
19489
19493
  options,
19490
19494
  );
19491
19495
  }
19492
19496
 
19493
19497
  /**
19494
- * POST /loyalty/redemptions/{id}/rollback - Roll back a redemption and restore the voucher
19498
+ * POST /loyalty/segments - Create a new segment
19495
19499
  *
19496
- * @param id
19497
19500
  * @param body
19498
19501
  * @param options - additional request options
19499
19502
  */
19500
- post_loyalty_redemption_rollback(
19501
- id: string,
19502
- body: PostLoyaltyRedemptionRollbackBody,
19503
+ post_loyalty_segment(
19504
+ body: PostLoyaltySegmentBody,
19503
19505
  options?: RequestOptions,
19504
- ): ResponsePromise<PostLoyaltyRedemptionRollbackResponse> {
19506
+ ): ResponsePromise<PostLoyaltySegmentResponse> {
19505
19507
  return this.request(
19506
19508
  'loyalty',
19507
- '/loyalty/redemptions/{id}/rollback',
19509
+ '/loyalty/segments',
19508
19510
  'POST',
19509
- `/loyalty/redemptions/${id}/rollback`,
19511
+ `/loyalty/segments`,
19510
19512
  body,
19511
19513
  options,
19512
19514
  );
19513
19515
  }
19514
19516
 
19515
19517
  /**
19516
- * GET /loyalty/rewards - List rewards with filters and pagination
19518
+ * GET /loyalty/segments/attributes - List available attributes for rule-based segments
19517
19519
  *
19518
19520
  * @param options - additional request options
19519
19521
  */
19520
- get_loyalty_rewards(
19521
- options?: {
19522
- query?: GetLoyaltyRewardsQuery;
19523
- } & RequestOptions,
19524
- ): ResponsePromise<GetLoyaltyRewardsResponse> {
19522
+ get_loyalty_segment_attributes(
19523
+ options?: RequestOptions,
19524
+ ): ResponsePromise<GetLoyaltySegmentAttributesResponse> {
19525
19525
  return this.request(
19526
19526
  'loyalty',
19527
- '/loyalty/rewards',
19527
+ '/loyalty/segments/attributes',
19528
19528
  'GET',
19529
- `/loyalty/rewards`,
19529
+ `/loyalty/segments/attributes`,
19530
19530
  null,
19531
19531
  options,
19532
19532
  );
19533
19533
  }
19534
19534
 
19535
19535
  /**
19536
- * POST /loyalty/rewards - Create a reward with earning rules and milestones
19536
+ * POST /loyalty/segments/preview-count - Preview how many customers match a segment rule
19537
19537
  *
19538
19538
  * @param body
19539
19539
  * @param options - additional request options
19540
19540
  */
19541
- post_loyalty_reward(
19542
- body: PostLoyaltyRewardBody,
19541
+ post_loyalty_segment_preview_count(
19542
+ body: PostLoyaltySegmentPreviewCountBody,
19543
19543
  options?: RequestOptions,
19544
- ): ResponsePromise<PostLoyaltyRewardResponse> {
19544
+ ): ResponsePromise<PostLoyaltySegmentPreviewCountResponse> {
19545
19545
  return this.request(
19546
19546
  'loyalty',
19547
- '/loyalty/rewards',
19547
+ '/loyalty/segments/preview-count',
19548
19548
  'POST',
19549
- `/loyalty/rewards`,
19549
+ `/loyalty/segments/preview-count`,
19550
19550
  body,
19551
19551
  options,
19552
19552
  );
19553
19553
  }
19554
19554
 
19555
19555
  /**
19556
- * GET /loyalty/rewards/{id} - Get reward detail with earning rules and milestones
19556
+ * GET /loyalty/segments/{id} - Get segment by ID
19557
19557
  *
19558
19558
  * @param id
19559
19559
  * @param options - additional request options
19560
19560
  */
19561
- get_loyalty_reward(
19561
+ get_loyalty_segment(
19562
19562
  id: string,
19563
19563
  options?: RequestOptions,
19564
- ): ResponsePromise<GetLoyaltyRewardResponse> {
19564
+ ): ResponsePromise<GetLoyaltySegmentResponse> {
19565
19565
  return this.request(
19566
19566
  'loyalty',
19567
- '/loyalty/rewards/{id}',
19567
+ '/loyalty/segments/{id}',
19568
19568
  'GET',
19569
- `/loyalty/rewards/${id}`,
19569
+ `/loyalty/segments/${id}`,
19570
19570
  null,
19571
19571
  options,
19572
19572
  );
19573
19573
  }
19574
19574
 
19575
19575
  /**
19576
- * PUT /loyalty/rewards/{id} - Update a reward and replace its earning rules and milestones
19576
+ * PATCH /loyalty/segments/{id} - Update a segment
19577
19577
  *
19578
19578
  * @param id
19579
19579
  * @param body
19580
19580
  * @param options - additional request options
19581
19581
  */
19582
- put_loyalty_reward(
19582
+ patch_loyalty_segment(
19583
19583
  id: string,
19584
- body: PutLoyaltyRewardBody,
19584
+ body: PatchLoyaltySegmentBody,
19585
19585
  options?: RequestOptions,
19586
- ): ResponsePromise<PutLoyaltyRewardResponse> {
19586
+ ): ResponsePromise<PatchLoyaltySegmentResponse> {
19587
19587
  return this.request(
19588
19588
  'loyalty',
19589
- '/loyalty/rewards/{id}',
19590
- 'PUT',
19591
- `/loyalty/rewards/${id}`,
19589
+ '/loyalty/segments/{id}',
19590
+ 'PATCH',
19591
+ `/loyalty/segments/${id}`,
19592
19592
  body,
19593
19593
  options,
19594
19594
  );
19595
19595
  }
19596
19596
 
19597
19597
  /**
19598
- * PATCH /loyalty/rewards/{id}/status - Transition reward status
19598
+ * DELETE /loyalty/segments/{id} - Soft-delete a segment
19599
19599
  *
19600
19600
  * @param id
19601
- * @param body
19602
19601
  * @param options - additional request options
19603
19602
  */
19604
- patch_loyalty_reward_status(
19603
+ delete_loyalty_segment(
19605
19604
  id: string,
19606
- body: PatchLoyaltyRewardStatusBody,
19607
19605
  options?: RequestOptions,
19608
- ): ResponsePromise<PatchLoyaltyRewardStatusResponse> {
19606
+ ): ResponsePromise<DeleteLoyaltySegmentResponse> {
19609
19607
  return this.request(
19610
19608
  'loyalty',
19611
- '/loyalty/rewards/{id}/status',
19612
- 'PATCH',
19613
- `/loyalty/rewards/${id}/status`,
19614
- body,
19609
+ '/loyalty/segments/{id}',
19610
+ 'DELETE',
19611
+ `/loyalty/segments/${id}`,
19612
+ null,
19615
19613
  options,
19616
19614
  );
19617
19615
  }
19618
19616
 
19619
19617
  /**
19620
- * GET /loyalty/rewards/{id}/cards - List enrolled customer cards for a reward
19618
+ * GET /loyalty/segments/{id}/members - List members of a static_list segment
19621
19619
  *
19622
19620
  * @param id
19623
19621
  * @param options - additional request options
19624
19622
  */
19625
- get_loyalty_reward_cards(
19623
+ get_loyalty_segment_members(
19626
19624
  id: string,
19627
19625
  options?: {
19628
- query?: GetLoyaltyRewardCardsQuery;
19626
+ query?: GetLoyaltySegmentMembersQuery;
19629
19627
  } & RequestOptions,
19630
- ): ResponsePromise<GetLoyaltyRewardCardsResponse> {
19628
+ ): ResponsePromise<GetLoyaltySegmentMembersResponse> {
19631
19629
  return this.request(
19632
19630
  'loyalty',
19633
- '/loyalty/rewards/{id}/cards',
19631
+ '/loyalty/segments/{id}/members',
19634
19632
  'GET',
19635
- `/loyalty/rewards/${id}/cards`,
19633
+ `/loyalty/segments/${id}/members`,
19636
19634
  null,
19637
19635
  options,
19638
19636
  );
19639
19637
  }
19640
19638
 
19641
19639
  /**
19642
- * GET /loyalty/rewards/{id}/cards/{customerId} - Get card detail with transaction event history
19640
+ * POST /loyalty/segments/{id}/members - Add members to a segment
19643
19641
  *
19644
19642
  * @param id
19645
- * @param customerId
19643
+ * @param body
19646
19644
  * @param options - additional request options
19647
19645
  */
19648
- get_loyalty_reward_card(
19646
+ post_loyalty_segment_members(
19649
19647
  id: string,
19650
- customerId: string,
19648
+ body: PostLoyaltySegmentMembersBody,
19651
19649
  options?: RequestOptions,
19652
- ): ResponsePromise<GetLoyaltyRewardCardResponse> {
19650
+ ): ResponsePromise<PostLoyaltySegmentMembersResponse> {
19653
19651
  return this.request(
19654
19652
  'loyalty',
19655
- '/loyalty/rewards/{id}/cards/{customerId}',
19656
- 'GET',
19657
- `/loyalty/rewards/${id}/cards/${customerId}`,
19658
- null,
19653
+ '/loyalty/segments/{id}/members',
19654
+ 'POST',
19655
+ `/loyalty/segments/${id}/members`,
19656
+ body,
19659
19657
  options,
19660
19658
  );
19661
19659
  }
19662
19660
 
19663
19661
  /**
19664
- * POST /loyalty/rewards/cards/{cardId}/adjust - Manual point adjustment on a reward card
19662
+ * DELETE /loyalty/segments/{id}/members - Remove members from a segment
19665
19663
  *
19666
- * @param cardId
19664
+ * @param id
19667
19665
  * @param body
19668
19666
  * @param options - additional request options
19669
19667
  */
19670
- post_loyalty_reward_card_adjust(
19671
- cardId: string,
19672
- body: PostLoyaltyRewardCardAdjustBody,
19668
+ delete_loyalty_segment_members(
19669
+ id: string,
19670
+ body: DeleteLoyaltySegmentMembersBody,
19673
19671
  options?: RequestOptions,
19674
- ): ResponsePromise<PostLoyaltyRewardCardAdjustResponse> {
19672
+ ): ResponsePromise<DeleteLoyaltySegmentMembersResponse> {
19675
19673
  return this.request(
19676
19674
  'loyalty',
19677
- '/loyalty/rewards/cards/{cardId}/adjust',
19678
- 'POST',
19679
- `/loyalty/rewards/cards/${cardId}/adjust`,
19675
+ '/loyalty/segments/{id}/members',
19676
+ 'DELETE',
19677
+ `/loyalty/segments/${id}/members`,
19680
19678
  body,
19681
19679
  options,
19682
19680
  );
19683
19681
  }
19684
19682
 
19685
19683
  /**
19686
- * POST /loyalty/rewards/orders/earn - Evaluate an order against active reward rules and award points idempotently
19684
+ * POST /loyalty/redemptions/{id}/rollback - Roll back a redemption and restore the voucher
19687
19685
  *
19686
+ * @param id
19688
19687
  * @param body
19689
19688
  * @param options - additional request options
19690
19689
  */
19691
- post_loyalty_reward_order_earn(
19692
- body: PostLoyaltyRewardOrderEarnBody,
19690
+ post_loyalty_redemption_rollback(
19691
+ id: string,
19692
+ body: PostLoyaltyRedemptionRollbackBody,
19693
19693
  options?: RequestOptions,
19694
- ): ResponsePromise<PostLoyaltyRewardOrderEarnResponse> {
19694
+ ): ResponsePromise<PostLoyaltyRedemptionRollbackResponse> {
19695
19695
  return this.request(
19696
19696
  'loyalty',
19697
- '/loyalty/rewards/orders/earn',
19697
+ '/loyalty/redemptions/{id}/rollback',
19698
19698
  'POST',
19699
- `/loyalty/rewards/orders/earn`,
19699
+ `/loyalty/redemptions/${id}/rollback`,
19700
19700
  body,
19701
19701
  options,
19702
19702
  );