@wix/auto_sdk_loyalty_rewards 1.0.15 → 1.0.17

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.
@@ -56,13 +56,11 @@ declare enum RewardType {
56
56
  UNDEFINED = "UNDEFINED",
57
57
  /** Discount reward. Special flexible reward type used in checkout. */
58
58
  DISCOUNT_AMOUNT = "DISCOUNT_AMOUNT",
59
- /** Coupon reward. [Learn more about coupons.](https://support.wix.com/en/article/using-coupons-as-loyalty-rewards) */
60
- COUPON_REWARD = "COUPON_REWARD",
61
- /** For internal use. */
62
- SPI_DISCOUNT_AMOUNT = "SPI_DISCOUNT_AMOUNT"
59
+ /** Coupon reward. [Learn more about coupons](https://support.wix.com/en/article/using-coupons-as-loyalty-rewards). */
60
+ COUPON_REWARD = "COUPON_REWARD"
63
61
  }
64
62
  /** @enumType */
65
- type RewardTypeWithLiterals = RewardType | 'UNDEFINED' | 'DISCOUNT_AMOUNT' | 'COUPON_REWARD' | 'SPI_DISCOUNT_AMOUNT';
63
+ type RewardTypeWithLiterals = RewardType | 'UNDEFINED' | 'DISCOUNT_AMOUNT' | 'COUPON_REWARD';
66
64
  interface DiscountAmount {
67
65
  /**
68
66
  * Discount details for each tier.
@@ -99,11 +97,12 @@ interface CouponReward extends CouponRewardDiscountTypeOneOf, CouponRewardScopeO
99
97
  /** Limit the coupon to carts with a subtotal greater than this number. */
100
98
  minimumSubtotal?: number;
101
99
  /**
102
- * Specifies the type of line items this coupon will apply to.
103
- * For more information, see [valid scope values](https://dev.wix.com/api/rest/coupons/coupons/valid-scope-values).
100
+ * Specifies the type of line items this coupon applies to.
101
+ *
102
+ * For more information, see [valid scope values](https://dev.wix.com/docs/rest/business-management/marketing/coupons/coupons/valid-scope-values).
104
103
  */
105
104
  scope?: CouponScope;
106
- /** Whether the coupon is limited to one item. */
105
+ /** Whether the coupon is limited to 1 item. */
107
106
  limitedToOneItem?: boolean | null;
108
107
  /** Whether the coupon also applies to subscriptions. */
109
108
  appliesToSubscriptions?: boolean | null;
@@ -131,8 +130,9 @@ interface CouponRewardScopeOrMinSubtotalOneOf {
131
130
  /** Limit the coupon to carts with a subtotal greater than this number. */
132
131
  minimumSubtotal?: number;
133
132
  /**
134
- * Specifies the type of line items this coupon will apply to.
135
- * For more information, see [valid scope values](https://dev.wix.com/api/rest/coupons/coupons/valid-scope-values).
133
+ * Specifies the type of line items this coupon applies to.
134
+ *
135
+ * For more information, see [valid scope values](https://dev.wix.com/docs/rest/business-management/marketing/coupons/coupons/valid-scope-values).
136
136
  */
137
137
  scope?: CouponScope;
138
138
  }
@@ -156,7 +156,10 @@ interface FixedAmountDiscountConfig {
156
156
  * @max 9999999
157
157
  */
158
158
  costInPoints?: number;
159
- /** Discount amount. */
159
+ /**
160
+ * Discount amount.
161
+ * @min 0.01
162
+ */
160
163
  amount?: number;
161
164
  }
162
165
  interface PercentageDiscount {
@@ -207,13 +210,13 @@ interface CouponScope {
207
210
  /**
208
211
  * Scope namespace.
209
212
  *
210
- * See [valid scope values](https://dev.wix.com/api/rest/coupons/coupons/valid-scope-values) for valid namespaces.
213
+ * See [valid scope values](https://dev.wix.com/docs/rest/business-management/marketing/coupons/coupons/valid-scope-values) for valid namespaces.
211
214
  */
212
215
  namespace?: string;
213
216
  /**
214
217
  * Coupon scope's applied group.
215
218
  *
216
- * See [valid scope values](https://dev.wix.com/api/rest/coupons/coupons/valid-scope-values) for valid groups.
219
+ * See [valid scope values](https://dev.wix.com/docs/rest/business-management/marketing/coupons/coupons/valid-scope-values) for valid groups.
217
220
  */
218
221
  group?: Group;
219
222
  }
@@ -221,10 +224,10 @@ interface Group {
221
224
  /**
222
225
  * Name of coupon scope's group.
223
226
  *
224
- * See [valid scope values](https://dev.wix.com/api/rest/coupons/coupons/valid-scope-values) for valid groups.
227
+ * See [valid scope values](https://dev.wix.com/docs/rest/business-management/marketing/coupons/coupons/valid-scope-values) for valid groups.
225
228
  */
226
229
  name?: string;
227
- /** Entity ID, if the coupon scope is limited to just one item. */
230
+ /** Entity ID, if the coupon scope is limited to just 1 item. */
228
231
  entityId?: string | null;
229
232
  }
230
233
  interface SpiDiscountAmount {
@@ -314,7 +317,7 @@ interface BulkGetRewardsResponse {
314
317
  }
315
318
  interface RewardsInSite {
316
319
  /**
317
- * Metasite id.
320
+ * Metasite ID.
318
321
  * @format GUID
319
322
  */
320
323
  metaSiteId?: string;
@@ -335,13 +338,13 @@ interface CursorQuery extends CursorQueryPagingMethodOneOf {
335
338
  /**
336
339
  * Filter object.
337
340
  *
338
- * Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section).
341
+ * Learn more about [filtering](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#filters).
339
342
  */
340
343
  filter?: Record<string, any> | null;
341
344
  /**
342
345
  * Sort object.
343
346
  *
344
- * Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).
347
+ * Learn more about [sorting](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#sorting).
345
348
  * @maxSize 5
346
349
  */
347
350
  sort?: Sorting[];
@@ -433,7 +436,7 @@ interface DeleteRewardRequest {
433
436
  /**
434
437
  * Revision number, which increments by 1 each time the reward is updated.
435
438
  *
436
- * To prevent conflicting changes, the current `revision` must be passed when deleting the reward.
439
+ * To prevent conflicting changes, pass the current `revision` when deleting the reward.
437
440
  */
438
441
  revision?: string;
439
442
  }
@@ -463,7 +466,7 @@ interface PagingMetadataV2 {
463
466
  }
464
467
  interface ListRewardsInTierRequest {
465
468
  /**
466
- * Tier id.
469
+ * Tier ID.
467
470
  * @format GUID
468
471
  * @readonly
469
472
  */
@@ -482,25 +485,21 @@ interface DomainEvent extends DomainEventBodyOneOf {
482
485
  updatedEvent?: EntityUpdatedEvent;
483
486
  deletedEvent?: EntityDeletedEvent;
484
487
  actionEvent?: ActionEvent;
485
- /**
486
- * Unique event ID.
487
- * Allows clients to ignore duplicate webhooks.
488
- */
488
+ /** Event ID. With this ID you can easily spot duplicated events and ignore them. */
489
489
  _id?: string;
490
490
  /**
491
- * Assumes actions are also always typed to an entity_type
492
- * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
491
+ * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.
492
+ * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
493
493
  */
494
494
  entityFqdn?: string;
495
495
  /**
496
- * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
497
- * This is although the created/updated/deleted notion is duplication of the oneof types
498
- * Example: created/updated/deleted/started/completed/email_opened
496
+ * Event action name, placed at the top level to make it easier for users to dispatch messages.
497
+ * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
499
498
  */
500
499
  slug?: string;
501
500
  /** ID of the entity associated with the event. */
502
501
  entityId?: string;
503
- /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
502
+ /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */
504
503
  eventTime?: Date | null;
505
504
  /**
506
505
  * Whether the event was triggered as a result of a privacy regulation application
@@ -510,12 +509,8 @@ interface DomainEvent extends DomainEventBodyOneOf {
510
509
  /** If present, indicates the action that triggered the event. */
511
510
  originatedFrom?: string | null;
512
511
  /**
513
- * A sequence number defining the order of updates to the underlying entity.
514
- * For example, given that some entity was updated at 16:00 and than again at 16:01,
515
- * it is guaranteed that the sequence number of the second update is strictly higher than the first.
516
- * As the consumer, you can use this value to ensure that you handle messages in the correct order.
517
- * To do so, you will need to persist this number on your end, and compare the sequence number from the
518
- * message against the one you have stored. Given that the stored number is higher, you should ignore the message.
512
+ * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.
513
+ * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.
519
514
  */
520
515
  entityEventSequence?: string | null;
521
516
  }
@@ -541,7 +536,7 @@ interface EntityUpdatedEvent {
541
536
  currentEntity?: string;
542
537
  }
543
538
  interface EntityDeletedEvent {
544
- /** Entity that was deleted */
539
+ /** Entity that was deleted. */
545
540
  deletedEntity?: string | null;
546
541
  }
547
542
  interface ActionEvent {
@@ -636,25 +631,21 @@ interface BaseEventMetadata {
636
631
  identity?: IdentificationData;
637
632
  }
638
633
  interface EventMetadata extends BaseEventMetadata {
639
- /**
640
- * Unique event ID.
641
- * Allows clients to ignore duplicate webhooks.
642
- */
634
+ /** Event ID. With this ID you can easily spot duplicated events and ignore them. */
643
635
  _id?: string;
644
636
  /**
645
- * Assumes actions are also always typed to an entity_type
646
- * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
637
+ * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.
638
+ * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
647
639
  */
648
640
  entityFqdn?: string;
649
641
  /**
650
- * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
651
- * This is although the created/updated/deleted notion is duplication of the oneof types
652
- * Example: created/updated/deleted/started/completed/email_opened
642
+ * Event action name, placed at the top level to make it easier for users to dispatch messages.
643
+ * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
653
644
  */
654
645
  slug?: string;
655
646
  /** ID of the entity associated with the event. */
656
647
  entityId?: string;
657
- /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
648
+ /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */
658
649
  eventTime?: Date | null;
659
650
  /**
660
651
  * Whether the event was triggered as a result of a privacy regulation application
@@ -664,12 +655,8 @@ interface EventMetadata extends BaseEventMetadata {
664
655
  /** If present, indicates the action that triggered the event. */
665
656
  originatedFrom?: string | null;
666
657
  /**
667
- * A sequence number defining the order of updates to the underlying entity.
668
- * For example, given that some entity was updated at 16:00 and than again at 16:01,
669
- * it is guaranteed that the sequence number of the second update is strictly higher than the first.
670
- * As the consumer, you can use this value to ensure that you handle messages in the correct order.
671
- * To do so, you will need to persist this number on your end, and compare the sequence number from the
672
- * message against the one you have stored. Given that the stored number is higher, you should ignore the message.
658
+ * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.
659
+ * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.
673
660
  */
674
661
  entityEventSequence?: string | null;
675
662
  }
@@ -683,6 +670,8 @@ interface RewardCreatedEnvelope {
683
670
  * @permissionScopeId SCOPE.DC-LOYALTY.READ-LOYALTY
684
671
  * @permissionScope Manage Loyalty
685
672
  * @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
673
+ * @permissionScope Manage Restaurants - all permissions
674
+ * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
686
675
  * @permissionId LOYALTY.READ_REWARDS
687
676
  * @webhook
688
677
  * @eventType wix.loyalty.v1.reward_created
@@ -699,6 +688,8 @@ interface RewardDeletedEnvelope {
699
688
  * @permissionScopeId SCOPE.DC-LOYALTY.READ-LOYALTY
700
689
  * @permissionScope Manage Loyalty
701
690
  * @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
691
+ * @permissionScope Manage Restaurants - all permissions
692
+ * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
702
693
  * @permissionId LOYALTY.READ_REWARDS
703
694
  * @webhook
704
695
  * @eventType wix.loyalty.v1.reward_deleted
@@ -716,6 +707,8 @@ interface RewardUpdatedEnvelope {
716
707
  * @permissionScopeId SCOPE.DC-LOYALTY.READ-LOYALTY
717
708
  * @permissionScope Manage Loyalty
718
709
  * @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
710
+ * @permissionScope Manage Restaurants - all permissions
711
+ * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
719
712
  * @permissionId LOYALTY.READ_REWARDS
720
713
  * @webhook
721
714
  * @eventType wix.loyalty.v1.reward_updated
@@ -723,26 +716,24 @@ interface RewardUpdatedEnvelope {
723
716
  * @slug updated
724
717
  */
725
718
  declare function onRewardUpdated(handler: (event: RewardUpdatedEnvelope) => void | Promise<void>): void;
726
- type RewardNonNullablePaths = `discountAmount.configsByTier` | `discountAmount.configsByTier.${number}.amount` | `discountAmount.configsByTier.${number}.costInPoints` | `couponReward.fixedAmount.configsByTier` | `couponReward.fixedAmount.configsByTier.${number}.costInPoints` | `couponReward.fixedAmount.configsByTier.${number}.amount` | `couponReward.percentage.configsByTier` | `couponReward.percentage.configsByTier.${number}.costInPoints` | `couponReward.percentage.configsByTier.${number}.percentage` | `couponReward.freeShipping.configsByTier` | `couponReward.freeShipping.configsByTier.${number}.costInPoints` | `couponReward.minimumSubtotal` | `couponReward.scope.namespace` | `couponReward.scope.group.name` | `name` | `active` | `type`;
727
719
  /**
728
- * Creates a reward that can be redeemed with loyalty points.
720
+ * Creates a reward that customers can redeem with loyalty points.
729
721
  *
730
- * When a customer [redeems a reward](/coupons/redeem-points-for-coupon), a loyalty coupon is created
731
- * based on the specifications detailed in either the `discountAmount` or `couponReward` fields. This coupon can
732
- * then be used by the customer to receive the discount. Note that while the Rewards API uses coupon scopes and specifications,
733
- * no coupon is actually created until a [reward is redeemed](/coupons/redeem-points-for-coupon) with points.
734
- * See the [Coupons API](https://dev.wix.com/api/rest/coupons) for more information about coupons. The `type` of reward
735
- * cannot be updated.
722
+ * When a customer redeems a reward, a loyalty coupon is created
723
+ * based on the specifications detailed in the `discountAmount` or `couponReward` fields. The customer can
724
+ * then use this coupon to receive the discount. Note that while the Rewards API uses coupon scopes and specifications,
725
+ * no coupon is actually created until a customer redeems a reward with points.
726
+ * See the Coupons API for more information about coupons. You can't update the `type` of reward after it's created.
736
727
  *
737
728
  * A reward's `active` status defaults to `false`. To make the reward available to customers,
738
- * either set the `active` field to `true` during creation or call [Update Reward](/update-reward)
729
+ * either set the `active` field to `true` during creation or call Update Reward
739
730
  * to change the status.
740
731
  *
741
- * To customize a reward for each [loyalty tier](/tiers), use the `configsByTier` parameter.
732
+ * To customize a reward for each loyalty tier, use `configsByTier`.
742
733
  * This allows you to specify the amount of the earned discount, the cost in loyalty points
743
734
  * to redeem the reward, and the tier to which this configuration applies. Each tier requires its own
744
- * `configsByTier` configuration. To create a reward that is available to loyalty accounts in the base tier,
745
- * leave the `tierId` field empty. See the [Tiers API](/tiers) for more information on tiers.
735
+ * `configsByTier` configuration. To create a reward that's available to loyalty accounts in the base tier,
736
+ * leave the `tierId` field empty. See the Tiers API for more information on tiers.
746
737
  * @param reward - Reward to create.
747
738
  * @public
748
739
  * @requiredField reward
@@ -752,7 +743,7 @@ type RewardNonNullablePaths = `discountAmount.configsByTier` | `discountAmount.c
752
743
  * @returns Created reward.
753
744
  * @fqn com.wixpress.loyalty.reward.LoyaltyRewards.CreateReward
754
745
  */
755
- declare function createReward(reward: NonNullablePaths<Reward, `name`>): Promise<NonNullablePaths<Reward, RewardNonNullablePaths>>;
746
+ declare function createReward(reward: NonNullablePaths<Reward, `name`>): Promise<NonNullablePaths<Reward, `discountAmount.configsByTier` | `discountAmount.configsByTier.${number}.amount` | `discountAmount.configsByTier.${number}.costInPoints` | `couponReward.fixedAmount.configsByTier` | `couponReward.fixedAmount.configsByTier.${number}.costInPoints` | `couponReward.fixedAmount.configsByTier.${number}.amount` | `couponReward.percentage.configsByTier` | `couponReward.percentage.configsByTier.${number}.costInPoints` | `couponReward.percentage.configsByTier.${number}.percentage` | `couponReward.freeShipping.configsByTier` | `couponReward.freeShipping.configsByTier.${number}.costInPoints` | `couponReward.minimumSubtotal` | `couponReward.scope.namespace` | `couponReward.scope.group.name` | `name` | `active` | `type`>>;
756
747
  /**
757
748
  * Creates multiple rewards.
758
749
  * @param rewards - Rewards to create.
@@ -763,9 +754,7 @@ declare function createReward(reward: NonNullablePaths<Reward, `name`>): Promise
763
754
  * @applicableIdentity APP
764
755
  * @fqn com.wixpress.loyalty.reward.LoyaltyRewards.BulkCreateRewards
765
756
  */
766
- declare function bulkCreateRewards(rewards: NonNullablePaths<Reward, `name`>[]): Promise<NonNullablePaths<BulkCreateRewardsResponse, `results` | `results.${number}.itemMetadata.originalIndex` | `results.${number}.itemMetadata.success` | `results.${number}.itemMetadata.error.code` | `results.${number}.itemMetadata.error.description` | {
767
- [P in RewardNonNullablePaths]: `results.${number}.item.${P}`;
768
- }[RewardNonNullablePaths] | `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`>>;
757
+ declare function bulkCreateRewards(rewards: NonNullablePaths<Reward, `name`>[]): Promise<NonNullablePaths<BulkCreateRewardsResponse, `results` | `results.${number}.itemMetadata.originalIndex` | `results.${number}.itemMetadata.success` | `results.${number}.itemMetadata.error.code` | `results.${number}.itemMetadata.error.description` | `results.${number}.item.couponReward.minimumSubtotal` | `results.${number}.item.name` | `results.${number}.item.active` | `results.${number}.item.type` | `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`>>;
769
758
  /**
770
759
  * Retrieves a reward.
771
760
  * @param _id - ID of the reward to retrieve.
@@ -777,25 +766,22 @@ declare function bulkCreateRewards(rewards: NonNullablePaths<Reward, `name`>[]):
777
766
  * @returns Retrieved reward.
778
767
  * @fqn com.wixpress.loyalty.reward.LoyaltyRewards.GetReward
779
768
  */
780
- declare function getReward(_id: string): Promise<NonNullablePaths<Reward, RewardNonNullablePaths>>;
769
+ declare function getReward(_id: string): Promise<NonNullablePaths<Reward, `discountAmount.configsByTier` | `discountAmount.configsByTier.${number}.amount` | `discountAmount.configsByTier.${number}.costInPoints` | `couponReward.fixedAmount.configsByTier` | `couponReward.fixedAmount.configsByTier.${number}.costInPoints` | `couponReward.fixedAmount.configsByTier.${number}.amount` | `couponReward.percentage.configsByTier` | `couponReward.percentage.configsByTier.${number}.costInPoints` | `couponReward.percentage.configsByTier.${number}.percentage` | `couponReward.freeShipping.configsByTier` | `couponReward.freeShipping.configsByTier.${number}.costInPoints` | `couponReward.minimumSubtotal` | `couponReward.scope.namespace` | `couponReward.scope.group.name` | `name` | `active` | `type`>>;
781
770
  /**
782
- * Retrieves rewards from all metasites that the caller is the member of.
771
+ * Retrieves rewards from all metasites that the caller is a member of.
783
772
  *
784
773
  * Must be called with user identity.
785
774
  * @public
786
- * @documentationMaturity preview
787
775
  * @permissionId LOYALTY.REWARD_BULK_READ
788
776
  * @fqn com.wixpress.loyalty.reward.LoyaltyRewards.BulkGetRewards
789
777
  */
790
- declare function bulkGetRewards(): Promise<NonNullablePaths<BulkGetRewardsResponse, `rewardsInSite` | `rewardsInSite.${number}.metaSiteId` | {
791
- [P in RewardNonNullablePaths]: `rewardsInSite.${number}.rewards.${number}.${P}`;
792
- }[RewardNonNullablePaths]>>;
778
+ declare function bulkGetRewards(): Promise<NonNullablePaths<BulkGetRewardsResponse, `rewardsInSite` | `rewardsInSite.${number}.metaSiteId`>>;
793
779
  /**
794
- * Retrieves a list of rewards, given the provided paging, filtering, and sorting.
780
+ * Retrieves a list of rewards with the specified paging, filtering, and sorting.
795
781
  *
796
782
  * Query Rewards runs with these defaults, which you can override: `cursorPaging.limit` is `50`.
797
783
  *
798
- * To learn about working with _Query_ endpoints, see [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language),[Sorting and Paging](https://dev.wix.com/api/rest/getting-started/pagination),and [Field Projection](https://dev.wix.com/api/rest/getting-started/field-projection).
784
+ * To learn about working with _Query_ endpoints, see [API Query Language](https://dev.wix.com/docs/rest/articles/get-started/api-query-language),[Sorting and Paging](https://dev.wix.com/docs/rest/articles/get-started/sorting-and-paging),and [Field Projection](https://dev.wix.com/docs/rest/articles/get-started/field-projection).
799
785
  * @param query - Query parameters.
800
786
  * @public
801
787
  * @requiredField query
@@ -804,16 +790,14 @@ declare function bulkGetRewards(): Promise<NonNullablePaths<BulkGetRewardsRespon
804
790
  * @applicableIdentity VISITOR
805
791
  * @fqn com.wixpress.loyalty.reward.LoyaltyRewards.QueryRewards
806
792
  */
807
- declare function queryRewards(query: CursorQuery): Promise<NonNullablePaths<QueryRewardsResponse, {
808
- [P in RewardNonNullablePaths]: `rewards.${number}.${P}`;
809
- }[RewardNonNullablePaths]>>;
793
+ declare function queryRewards(query: CursorQuery): Promise<NonNullablePaths<QueryRewardsResponse, `rewards` | `rewards.${number}.couponReward.minimumSubtotal` | `rewards.${number}.couponReward.scope.namespace` | `rewards.${number}.name` | `rewards.${number}.active` | `rewards.${number}.type`>>;
810
794
  /**
811
795
  * Updates a loyalty reward.
812
796
  *
813
- * Use this endpoint to update details of a reward, such as the name, whether or not a reward is active,
814
- * or the amount of points it costs to redeem. Also use this endpoint to add new tiers that are eligible to redeem a reward.
797
+ * Call this method to update details of a reward, such as the name, whether a reward is active,
798
+ * or the amount of points it costs to redeem. Also call this method to add new tiers that are eligible to redeem a reward.
815
799
  *
816
- * You may not change the `type` of a reward. That is set upon creation and cannot be updated.
800
+ * You may not change the `type` of a reward. That's set upon creation and can't be updated.
817
801
  * @param _id - Reward ID.
818
802
  * @public
819
803
  * @requiredField _id
@@ -825,9 +809,7 @@ declare function queryRewards(query: CursorQuery): Promise<NonNullablePaths<Quer
825
809
  * @applicableIdentity APP
826
810
  * @fqn com.wixpress.loyalty.reward.LoyaltyRewards.UpdateReward
827
811
  */
828
- declare function updateReward(_id: string, reward: NonNullablePaths<UpdateReward, `name` | `revision`>): Promise<NonNullablePaths<UpdateRewardResponse, {
829
- [P in RewardNonNullablePaths]: `reward.${P}`;
830
- }[RewardNonNullablePaths]>>;
812
+ declare function updateReward(_id: string, reward: NonNullablePaths<UpdateReward, `name` | `revision`>): Promise<NonNullablePaths<UpdateRewardResponse, `reward.discountAmount.configsByTier` | `reward.discountAmount.configsByTier.${number}.amount` | `reward.discountAmount.configsByTier.${number}.costInPoints` | `reward.couponReward.fixedAmount.configsByTier` | `reward.couponReward.fixedAmount.configsByTier.${number}.costInPoints` | `reward.couponReward.fixedAmount.configsByTier.${number}.amount` | `reward.couponReward.percentage.configsByTier` | `reward.couponReward.percentage.configsByTier.${number}.costInPoints` | `reward.couponReward.percentage.configsByTier.${number}.percentage` | `reward.couponReward.freeShipping.configsByTier` | `reward.couponReward.freeShipping.configsByTier.${number}.costInPoints` | `reward.couponReward.minimumSubtotal` | `reward.couponReward.scope.namespace` | `reward.couponReward.scope.group.name` | `reward.name` | `reward.active` | `reward.type`>>;
831
813
  interface UpdateReward {
832
814
  /** Discount details. */
833
815
  discountAmount?: DiscountAmount;
@@ -872,7 +854,7 @@ interface UpdateReward {
872
854
  * @param _id - ID of the reward to delete.
873
855
  * @param revision - Revision number, which increments by 1 each time the reward is updated.
874
856
  *
875
- * To prevent conflicting changes, the current `revision` must be passed when deleting the reward.
857
+ * To prevent conflicting changes, pass the current `revision` when deleting the reward.
876
858
  * @public
877
859
  * @requiredField _id
878
860
  * @requiredField revision
@@ -892,9 +874,7 @@ declare function deleteReward(_id: string, revision: string): Promise<void>;
892
874
  * @applicableIdentity VISITOR
893
875
  * @fqn com.wixpress.loyalty.reward.LoyaltyRewards.ListRewards
894
876
  */
895
- declare function listRewards(options?: ListRewardsOptions): Promise<NonNullablePaths<ListRewardsResponse, {
896
- [P in RewardNonNullablePaths]: `rewards.${number}.${P}`;
897
- }[RewardNonNullablePaths]>>;
877
+ declare function listRewards(options?: ListRewardsOptions): Promise<NonNullablePaths<ListRewardsResponse, `rewards` | `rewards.${number}.couponReward.minimumSubtotal` | `rewards.${number}.couponReward.scope.namespace` | `rewards.${number}.name` | `rewards.${number}.active` | `rewards.${number}.type`>>;
898
878
  interface ListRewardsOptions {
899
879
  /** Pagination options. */
900
880
  cursorPaging?: CursorPaging;
@@ -450,7 +450,6 @@ var RewardType = /* @__PURE__ */ ((RewardType2) => {
450
450
  RewardType2["UNDEFINED"] = "UNDEFINED";
451
451
  RewardType2["DISCOUNT_AMOUNT"] = "DISCOUNT_AMOUNT";
452
452
  RewardType2["COUPON_REWARD"] = "COUPON_REWARD";
453
- RewardType2["SPI_DISCOUNT_AMOUNT"] = "SPI_DISCOUNT_AMOUNT";
454
453
  return RewardType2;
455
454
  })(RewardType || {});
456
455
  var SortOrder = /* @__PURE__ */ ((SortOrder2) => {