@wix/auto_sdk_loyalty_rewards 1.0.6 → 1.0.8

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 (134) hide show
  1. package/build/index.d.mts +128 -0
  2. package/build/index.d.ts +128 -0
  3. package/build/index.js +834 -0
  4. package/build/index.js.map +1 -0
  5. package/build/index.mjs +797 -0
  6. package/build/index.mjs.map +1 -0
  7. package/build/internal/index.d.mts +128 -0
  8. package/build/internal/index.d.ts +128 -0
  9. package/build/internal/index.js +834 -0
  10. package/build/internal/index.js.map +1 -0
  11. package/build/internal/index.mjs +797 -0
  12. package/build/internal/index.mjs.map +1 -0
  13. package/build/{es/src/loyalty-v1-reward-rewards.types.d.ts → internal/loyalty-v1-reward-rewards.universal-BFnbQRqi.d.mts} +202 -87
  14. package/build/{cjs/src/loyalty-v1-reward-rewards.types.d.ts → internal/loyalty-v1-reward-rewards.universal-BFnbQRqi.d.ts} +202 -87
  15. package/build/internal/meta.d.mts +476 -0
  16. package/build/internal/meta.d.ts +476 -0
  17. package/build/internal/meta.js +597 -0
  18. package/build/internal/meta.js.map +1 -0
  19. package/build/internal/meta.mjs +563 -0
  20. package/build/internal/meta.mjs.map +1 -0
  21. package/build/{internal/cjs/src/loyalty-v1-reward-rewards.types.d.ts → loyalty-v1-reward-rewards.universal-BFnbQRqi.d.mts} +202 -87
  22. package/build/{internal/es/src/loyalty-v1-reward-rewards.types.d.ts → loyalty-v1-reward-rewards.universal-BFnbQRqi.d.ts} +202 -87
  23. package/build/meta.d.mts +476 -0
  24. package/build/meta.d.ts +476 -0
  25. package/build/meta.js +597 -0
  26. package/build/meta.js.map +1 -0
  27. package/build/meta.mjs +563 -0
  28. package/build/meta.mjs.map +1 -0
  29. package/package.json +13 -12
  30. package/build/cjs/index.d.ts +0 -1
  31. package/build/cjs/index.js +0 -18
  32. package/build/cjs/index.js.map +0 -1
  33. package/build/cjs/index.typings.d.ts +0 -1
  34. package/build/cjs/index.typings.js +0 -18
  35. package/build/cjs/index.typings.js.map +0 -1
  36. package/build/cjs/meta.d.ts +0 -1
  37. package/build/cjs/meta.js +0 -18
  38. package/build/cjs/meta.js.map +0 -1
  39. package/build/cjs/src/loyalty-v1-reward-rewards.context.d.ts +0 -28
  40. package/build/cjs/src/loyalty-v1-reward-rewards.context.js +0 -34
  41. package/build/cjs/src/loyalty-v1-reward-rewards.context.js.map +0 -1
  42. package/build/cjs/src/loyalty-v1-reward-rewards.http.d.ts +0 -56
  43. package/build/cjs/src/loyalty-v1-reward-rewards.http.js +0 -464
  44. package/build/cjs/src/loyalty-v1-reward-rewards.http.js.map +0 -1
  45. package/build/cjs/src/loyalty-v1-reward-rewards.meta.d.ts +0 -26
  46. package/build/cjs/src/loyalty-v1-reward-rewards.meta.js +0 -180
  47. package/build/cjs/src/loyalty-v1-reward-rewards.meta.js.map +0 -1
  48. package/build/cjs/src/loyalty-v1-reward-rewards.public.d.ts +0 -107
  49. package/build/cjs/src/loyalty-v1-reward-rewards.public.js +0 -119
  50. package/build/cjs/src/loyalty-v1-reward-rewards.public.js.map +0 -1
  51. package/build/cjs/src/loyalty-v1-reward-rewards.types.js +0 -29
  52. package/build/cjs/src/loyalty-v1-reward-rewards.types.js.map +0 -1
  53. package/build/cjs/src/loyalty-v1-reward-rewards.universal.d.ts +0 -920
  54. package/build/cjs/src/loyalty-v1-reward-rewards.universal.js +0 -373
  55. package/build/cjs/src/loyalty-v1-reward-rewards.universal.js.map +0 -1
  56. package/build/es/index.d.ts +0 -1
  57. package/build/es/index.js +0 -2
  58. package/build/es/index.js.map +0 -1
  59. package/build/es/index.typings.d.ts +0 -1
  60. package/build/es/index.typings.js +0 -2
  61. package/build/es/index.typings.js.map +0 -1
  62. package/build/es/meta.d.ts +0 -1
  63. package/build/es/meta.js +0 -2
  64. package/build/es/meta.js.map +0 -1
  65. package/build/es/package.json +0 -3
  66. package/build/es/src/loyalty-v1-reward-rewards.context.d.ts +0 -28
  67. package/build/es/src/loyalty-v1-reward-rewards.context.js +0 -28
  68. package/build/es/src/loyalty-v1-reward-rewards.context.js.map +0 -1
  69. package/build/es/src/loyalty-v1-reward-rewards.http.d.ts +0 -56
  70. package/build/es/src/loyalty-v1-reward-rewards.http.js +0 -453
  71. package/build/es/src/loyalty-v1-reward-rewards.http.js.map +0 -1
  72. package/build/es/src/loyalty-v1-reward-rewards.meta.d.ts +0 -26
  73. package/build/es/src/loyalty-v1-reward-rewards.meta.js +0 -146
  74. package/build/es/src/loyalty-v1-reward-rewards.meta.js.map +0 -1
  75. package/build/es/src/loyalty-v1-reward-rewards.public.d.ts +0 -107
  76. package/build/es/src/loyalty-v1-reward-rewards.public.js +0 -105
  77. package/build/es/src/loyalty-v1-reward-rewards.public.js.map +0 -1
  78. package/build/es/src/loyalty-v1-reward-rewards.types.js +0 -26
  79. package/build/es/src/loyalty-v1-reward-rewards.types.js.map +0 -1
  80. package/build/es/src/loyalty-v1-reward-rewards.universal.d.ts +0 -920
  81. package/build/es/src/loyalty-v1-reward-rewards.universal.js +0 -339
  82. package/build/es/src/loyalty-v1-reward-rewards.universal.js.map +0 -1
  83. package/build/internal/cjs/index.d.ts +0 -1
  84. package/build/internal/cjs/index.js +0 -18
  85. package/build/internal/cjs/index.js.map +0 -1
  86. package/build/internal/cjs/index.typings.d.ts +0 -1
  87. package/build/internal/cjs/index.typings.js +0 -18
  88. package/build/internal/cjs/index.typings.js.map +0 -1
  89. package/build/internal/cjs/meta.d.ts +0 -1
  90. package/build/internal/cjs/meta.js +0 -18
  91. package/build/internal/cjs/meta.js.map +0 -1
  92. package/build/internal/cjs/src/loyalty-v1-reward-rewards.context.d.ts +0 -28
  93. package/build/internal/cjs/src/loyalty-v1-reward-rewards.context.js +0 -34
  94. package/build/internal/cjs/src/loyalty-v1-reward-rewards.context.js.map +0 -1
  95. package/build/internal/cjs/src/loyalty-v1-reward-rewards.http.d.ts +0 -56
  96. package/build/internal/cjs/src/loyalty-v1-reward-rewards.http.js +0 -464
  97. package/build/internal/cjs/src/loyalty-v1-reward-rewards.http.js.map +0 -1
  98. package/build/internal/cjs/src/loyalty-v1-reward-rewards.meta.d.ts +0 -26
  99. package/build/internal/cjs/src/loyalty-v1-reward-rewards.meta.js +0 -180
  100. package/build/internal/cjs/src/loyalty-v1-reward-rewards.meta.js.map +0 -1
  101. package/build/internal/cjs/src/loyalty-v1-reward-rewards.public.d.ts +0 -107
  102. package/build/internal/cjs/src/loyalty-v1-reward-rewards.public.js +0 -119
  103. package/build/internal/cjs/src/loyalty-v1-reward-rewards.public.js.map +0 -1
  104. package/build/internal/cjs/src/loyalty-v1-reward-rewards.types.js +0 -29
  105. package/build/internal/cjs/src/loyalty-v1-reward-rewards.types.js.map +0 -1
  106. package/build/internal/cjs/src/loyalty-v1-reward-rewards.universal.d.ts +0 -920
  107. package/build/internal/cjs/src/loyalty-v1-reward-rewards.universal.js +0 -373
  108. package/build/internal/cjs/src/loyalty-v1-reward-rewards.universal.js.map +0 -1
  109. package/build/internal/es/index.d.ts +0 -1
  110. package/build/internal/es/index.js +0 -2
  111. package/build/internal/es/index.js.map +0 -1
  112. package/build/internal/es/index.typings.d.ts +0 -1
  113. package/build/internal/es/index.typings.js +0 -2
  114. package/build/internal/es/index.typings.js.map +0 -1
  115. package/build/internal/es/meta.d.ts +0 -1
  116. package/build/internal/es/meta.js +0 -2
  117. package/build/internal/es/meta.js.map +0 -1
  118. package/build/internal/es/src/loyalty-v1-reward-rewards.context.d.ts +0 -28
  119. package/build/internal/es/src/loyalty-v1-reward-rewards.context.js +0 -28
  120. package/build/internal/es/src/loyalty-v1-reward-rewards.context.js.map +0 -1
  121. package/build/internal/es/src/loyalty-v1-reward-rewards.http.d.ts +0 -56
  122. package/build/internal/es/src/loyalty-v1-reward-rewards.http.js +0 -453
  123. package/build/internal/es/src/loyalty-v1-reward-rewards.http.js.map +0 -1
  124. package/build/internal/es/src/loyalty-v1-reward-rewards.meta.d.ts +0 -26
  125. package/build/internal/es/src/loyalty-v1-reward-rewards.meta.js +0 -146
  126. package/build/internal/es/src/loyalty-v1-reward-rewards.meta.js.map +0 -1
  127. package/build/internal/es/src/loyalty-v1-reward-rewards.public.d.ts +0 -107
  128. package/build/internal/es/src/loyalty-v1-reward-rewards.public.js +0 -105
  129. package/build/internal/es/src/loyalty-v1-reward-rewards.public.js.map +0 -1
  130. package/build/internal/es/src/loyalty-v1-reward-rewards.types.js +0 -26
  131. package/build/internal/es/src/loyalty-v1-reward-rewards.types.js.map +0 -1
  132. package/build/internal/es/src/loyalty-v1-reward-rewards.universal.d.ts +0 -920
  133. package/build/internal/es/src/loyalty-v1-reward-rewards.universal.js +0 -339
  134. package/build/internal/es/src/loyalty-v1-reward-rewards.universal.js.map +0 -1
@@ -0,0 +1,128 @@
1
+ import { HttpClient, EventDefinition, MaybeContext, BuildRESTFunction, BuildEventDefinition } from '@wix/sdk-types';
2
+ import { R as Reward, B as BulkCreateRewardsResponse, a as BulkGetRewardsResponse, C as CursorQuery, Q as QueryRewardsResponse, U as UpdateReward, b as UpdateRewardResponse, L as ListRewardsOptions, c as ListRewardsResponse, d as RewardCreatedEnvelope, e as RewardDeletedEnvelope, f as RewardUpdatedEnvelope } from './loyalty-v1-reward-rewards.universal-BFnbQRqi.mjs';
3
+ export { a7 as ActionEvent, A as ApplicationError, ac as BaseEventMetadata, x as BulkActionMetadata, v as BulkCreateRewardsRequest, E as BulkGetRewardsRequest, w as BulkRewardResult, j as CouponReward, k as CouponRewardDiscountTypeOneOf, l as CouponRewardScopeOrMinSubtotalOneOf, q as CouponScope, t as CreateRewardRequest, u as CreateRewardResponse, N as CursorPaging, O as CursorPagingMetadata, K as CursorQueryPagingMethodOneOf, T as Cursors, X as DeleteRewardRequest, Y as DeleteRewardResponse, D as DiscountAmount, i as DiscountAmountConfig, a1 as DomainEvent, a2 as DomainEventBodyOneOf, a8 as Empty, a3 as EntityCreatedEvent, a6 as EntityDeletedEvent, a5 as EntityUpdatedEvent, ad as EventMetadata, F as FixedAmountDiscount, m as FixedAmountDiscountConfig, o as FreeShippingDiscount, p as FreeShippingDiscountConfig, y as GetRewardRequest, z as GetRewardResponse, G as Group, aa as IdentificationData, ab as IdentificationDataIdOneOf, I as ItemMetadata, $ as ListRewardsInTierRequest, a0 as ListRewardsInTierResponse, Z as ListRewardsRequest, a9 as MessageEnvelope, _ as PagingMetadataV2, P as PercentageDiscount, n as PercentageDiscountConfig, J as QueryRewardsRequest, a4 as RestoreInfo, s as RewardDisabled, g as RewardType, h as RewardTypeDetailsOneOf, H as RewardsInSite, S as SortOrder, M as Sorting, r as SpiDiscountAmount, V as UpdateRewardRequest, W as WebhookIdentityType } from './loyalty-v1-reward-rewards.universal-BFnbQRqi.mjs';
4
+
5
+ declare function createReward$1(httpClient: HttpClient): CreateRewardSignature;
6
+ interface CreateRewardSignature {
7
+ /**
8
+ * Creates a reward that can be redeemed with loyalty points.
9
+ *
10
+ * When a customer redeems a reward, a loyalty coupon is created
11
+ * based on the specifications detailed in either the `discountAmount` or `couponReward` fields. This coupon can
12
+ * then be used by the customer to receive the discount. Note that while the Rewards API uses coupon scopes and specifications,
13
+ * no coupon is actually created until a reward is redeemed with points.
14
+ * See the Coupons API for more information about coupons.
15
+ *
16
+ * A reward's `active` status defaults to `false`. To make the reward available to customers,
17
+ * either set the `active` field to `true` during creation or call [`updateReward()`](#updatereward)
18
+ * to change the status.
19
+ *
20
+ * To customize a reward for each loyalty tier, use the `configsByTier` parameter.
21
+ * This allows you to specify the amount of the earned discount, the cost in loyalty points
22
+ * to redeem the reward, and the tier to which this configuration applies. Each tier requires its own
23
+ * `configsByTier` configuration. To create a reward that is available to loyalty accounts in the base tier,
24
+ * leave the `tierId` field empty. See the Loyalty Tiers API for more information on tiers.
25
+ * @param - Reward to create.
26
+ * @returns Created reward.
27
+ */
28
+ (reward: Reward): Promise<Reward>;
29
+ }
30
+ declare function bulkCreateRewards$1(httpClient: HttpClient): BulkCreateRewardsSignature;
31
+ interface BulkCreateRewardsSignature {
32
+ /**
33
+ * Creates multiple rewards.
34
+ * @param - Rewards to create.
35
+ */
36
+ (rewards: Reward[]): Promise<BulkCreateRewardsResponse>;
37
+ }
38
+ declare function getReward$1(httpClient: HttpClient): GetRewardSignature;
39
+ interface GetRewardSignature {
40
+ /**
41
+ * Retrieves a reward.
42
+ * @param - ID of the reward to retrieve.
43
+ * @returns Retrieved reward.
44
+ */
45
+ (_id: string): Promise<Reward>;
46
+ }
47
+ declare function bulkGetRewards$1(httpClient: HttpClient): BulkGetRewardsSignature;
48
+ interface BulkGetRewardsSignature {
49
+ /**
50
+ * Retrieves rewards from all metasites that the caller is the member of.
51
+ *
52
+ * Must be called with user identity.
53
+ */
54
+ (): Promise<BulkGetRewardsResponse>;
55
+ }
56
+ declare function queryRewards$1(httpClient: HttpClient): QueryRewardsSignature;
57
+ interface QueryRewardsSignature {
58
+ /**
59
+ * Retrieves a list of rewards, given the provided paging, filtering, and sorting.
60
+ *
61
+ * Query Rewards runs with these defaults, which you can override: `cursorPaging.limit` is `50`.
62
+ *
63
+ * 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).
64
+ * @param - Query parameters.
65
+ */
66
+ (query: CursorQuery): Promise<QueryRewardsResponse>;
67
+ }
68
+ declare function updateReward$1(httpClient: HttpClient): UpdateRewardSignature;
69
+ interface UpdateRewardSignature {
70
+ /**
71
+ * Updates a loyalty reward.
72
+ *
73
+ * Use this endpoint to update details of a reward, such as the name, whether or not a reward is active,
74
+ * or the amount of points it costs to redeem. Also use this endpoint to add new tiers that are eligible to redeem a reward.
75
+ *
76
+ * You may not change the `type` of a reward. That is set upon creation and cannot be updated.
77
+ * @param - Reward ID.
78
+ * @param - Reward info to update.
79
+ */
80
+ (_id: string, reward: UpdateReward): Promise<UpdateRewardResponse>;
81
+ }
82
+ declare function deleteReward$1(httpClient: HttpClient): DeleteRewardSignature;
83
+ interface DeleteRewardSignature {
84
+ /**
85
+ * Deletes a reward.
86
+ * @param - ID of the reward to delete.
87
+ * @param - Revision number, which increments by 1 each time the reward is updated.
88
+ *
89
+ * To prevent conflicting changes, the current `revision` must be passed when deleting the reward.
90
+ */
91
+ (_id: string, revision: string): Promise<void>;
92
+ }
93
+ declare function listRewards$1(httpClient: HttpClient): ListRewardsSignature;
94
+ interface ListRewardsSignature {
95
+ /**
96
+ * Retrieves a list of rewards.
97
+ *
98
+ * The list includes rewards that are currently nonredeemable due to insufficient points held by any customers.
99
+ * @param - List options.
100
+ */
101
+ (options?: ListRewardsOptions | undefined): Promise<ListRewardsResponse>;
102
+ }
103
+ declare const onRewardCreated$1: EventDefinition<RewardCreatedEnvelope, "wix.loyalty.v1.reward_created">;
104
+ declare const onRewardDeleted$1: EventDefinition<RewardDeletedEnvelope, "wix.loyalty.v1.reward_deleted">;
105
+ declare const onRewardUpdated$1: EventDefinition<RewardUpdatedEnvelope, "wix.loyalty.v1.reward_updated">;
106
+
107
+ declare const createReward: MaybeContext<BuildRESTFunction<typeof createReward$1> & typeof createReward$1>;
108
+ declare const bulkCreateRewards: MaybeContext<BuildRESTFunction<typeof bulkCreateRewards$1> & typeof bulkCreateRewards$1>;
109
+ declare const getReward: MaybeContext<BuildRESTFunction<typeof getReward$1> & typeof getReward$1>;
110
+ declare const bulkGetRewards: MaybeContext<BuildRESTFunction<typeof bulkGetRewards$1> & typeof bulkGetRewards$1>;
111
+ declare const queryRewards: MaybeContext<BuildRESTFunction<typeof queryRewards$1> & typeof queryRewards$1>;
112
+ declare const updateReward: MaybeContext<BuildRESTFunction<typeof updateReward$1> & typeof updateReward$1>;
113
+ declare const deleteReward: MaybeContext<BuildRESTFunction<typeof deleteReward$1> & typeof deleteReward$1>;
114
+ declare const listRewards: MaybeContext<BuildRESTFunction<typeof listRewards$1> & typeof listRewards$1>;
115
+ /**
116
+ * Triggered when a reward is created.
117
+ */
118
+ declare const onRewardCreated: BuildEventDefinition<typeof onRewardCreated$1>;
119
+ /**
120
+ * Triggered when a reward is deleted.
121
+ */
122
+ declare const onRewardDeleted: BuildEventDefinition<typeof onRewardDeleted$1>;
123
+ /**
124
+ * Triggered when a reward is updated.
125
+ */
126
+ declare const onRewardUpdated: BuildEventDefinition<typeof onRewardUpdated$1>;
127
+
128
+ export { BulkCreateRewardsResponse, BulkGetRewardsResponse, CursorQuery, ListRewardsOptions, ListRewardsResponse, QueryRewardsResponse, Reward, RewardCreatedEnvelope, RewardDeletedEnvelope, RewardUpdatedEnvelope, UpdateReward, UpdateRewardResponse, bulkCreateRewards, bulkGetRewards, createReward, deleteReward, getReward, listRewards, onRewardCreated, onRewardDeleted, onRewardUpdated, queryRewards, updateReward };
@@ -0,0 +1,128 @@
1
+ import { HttpClient, EventDefinition, MaybeContext, BuildRESTFunction, BuildEventDefinition } from '@wix/sdk-types';
2
+ import { R as Reward, B as BulkCreateRewardsResponse, a as BulkGetRewardsResponse, C as CursorQuery, Q as QueryRewardsResponse, U as UpdateReward, b as UpdateRewardResponse, L as ListRewardsOptions, c as ListRewardsResponse, d as RewardCreatedEnvelope, e as RewardDeletedEnvelope, f as RewardUpdatedEnvelope } from './loyalty-v1-reward-rewards.universal-BFnbQRqi.js';
3
+ export { a7 as ActionEvent, A as ApplicationError, ac as BaseEventMetadata, x as BulkActionMetadata, v as BulkCreateRewardsRequest, E as BulkGetRewardsRequest, w as BulkRewardResult, j as CouponReward, k as CouponRewardDiscountTypeOneOf, l as CouponRewardScopeOrMinSubtotalOneOf, q as CouponScope, t as CreateRewardRequest, u as CreateRewardResponse, N as CursorPaging, O as CursorPagingMetadata, K as CursorQueryPagingMethodOneOf, T as Cursors, X as DeleteRewardRequest, Y as DeleteRewardResponse, D as DiscountAmount, i as DiscountAmountConfig, a1 as DomainEvent, a2 as DomainEventBodyOneOf, a8 as Empty, a3 as EntityCreatedEvent, a6 as EntityDeletedEvent, a5 as EntityUpdatedEvent, ad as EventMetadata, F as FixedAmountDiscount, m as FixedAmountDiscountConfig, o as FreeShippingDiscount, p as FreeShippingDiscountConfig, y as GetRewardRequest, z as GetRewardResponse, G as Group, aa as IdentificationData, ab as IdentificationDataIdOneOf, I as ItemMetadata, $ as ListRewardsInTierRequest, a0 as ListRewardsInTierResponse, Z as ListRewardsRequest, a9 as MessageEnvelope, _ as PagingMetadataV2, P as PercentageDiscount, n as PercentageDiscountConfig, J as QueryRewardsRequest, a4 as RestoreInfo, s as RewardDisabled, g as RewardType, h as RewardTypeDetailsOneOf, H as RewardsInSite, S as SortOrder, M as Sorting, r as SpiDiscountAmount, V as UpdateRewardRequest, W as WebhookIdentityType } from './loyalty-v1-reward-rewards.universal-BFnbQRqi.js';
4
+
5
+ declare function createReward$1(httpClient: HttpClient): CreateRewardSignature;
6
+ interface CreateRewardSignature {
7
+ /**
8
+ * Creates a reward that can be redeemed with loyalty points.
9
+ *
10
+ * When a customer redeems a reward, a loyalty coupon is created
11
+ * based on the specifications detailed in either the `discountAmount` or `couponReward` fields. This coupon can
12
+ * then be used by the customer to receive the discount. Note that while the Rewards API uses coupon scopes and specifications,
13
+ * no coupon is actually created until a reward is redeemed with points.
14
+ * See the Coupons API for more information about coupons.
15
+ *
16
+ * A reward's `active` status defaults to `false`. To make the reward available to customers,
17
+ * either set the `active` field to `true` during creation or call [`updateReward()`](#updatereward)
18
+ * to change the status.
19
+ *
20
+ * To customize a reward for each loyalty tier, use the `configsByTier` parameter.
21
+ * This allows you to specify the amount of the earned discount, the cost in loyalty points
22
+ * to redeem the reward, and the tier to which this configuration applies. Each tier requires its own
23
+ * `configsByTier` configuration. To create a reward that is available to loyalty accounts in the base tier,
24
+ * leave the `tierId` field empty. See the Loyalty Tiers API for more information on tiers.
25
+ * @param - Reward to create.
26
+ * @returns Created reward.
27
+ */
28
+ (reward: Reward): Promise<Reward>;
29
+ }
30
+ declare function bulkCreateRewards$1(httpClient: HttpClient): BulkCreateRewardsSignature;
31
+ interface BulkCreateRewardsSignature {
32
+ /**
33
+ * Creates multiple rewards.
34
+ * @param - Rewards to create.
35
+ */
36
+ (rewards: Reward[]): Promise<BulkCreateRewardsResponse>;
37
+ }
38
+ declare function getReward$1(httpClient: HttpClient): GetRewardSignature;
39
+ interface GetRewardSignature {
40
+ /**
41
+ * Retrieves a reward.
42
+ * @param - ID of the reward to retrieve.
43
+ * @returns Retrieved reward.
44
+ */
45
+ (_id: string): Promise<Reward>;
46
+ }
47
+ declare function bulkGetRewards$1(httpClient: HttpClient): BulkGetRewardsSignature;
48
+ interface BulkGetRewardsSignature {
49
+ /**
50
+ * Retrieves rewards from all metasites that the caller is the member of.
51
+ *
52
+ * Must be called with user identity.
53
+ */
54
+ (): Promise<BulkGetRewardsResponse>;
55
+ }
56
+ declare function queryRewards$1(httpClient: HttpClient): QueryRewardsSignature;
57
+ interface QueryRewardsSignature {
58
+ /**
59
+ * Retrieves a list of rewards, given the provided paging, filtering, and sorting.
60
+ *
61
+ * Query Rewards runs with these defaults, which you can override: `cursorPaging.limit` is `50`.
62
+ *
63
+ * 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).
64
+ * @param - Query parameters.
65
+ */
66
+ (query: CursorQuery): Promise<QueryRewardsResponse>;
67
+ }
68
+ declare function updateReward$1(httpClient: HttpClient): UpdateRewardSignature;
69
+ interface UpdateRewardSignature {
70
+ /**
71
+ * Updates a loyalty reward.
72
+ *
73
+ * Use this endpoint to update details of a reward, such as the name, whether or not a reward is active,
74
+ * or the amount of points it costs to redeem. Also use this endpoint to add new tiers that are eligible to redeem a reward.
75
+ *
76
+ * You may not change the `type` of a reward. That is set upon creation and cannot be updated.
77
+ * @param - Reward ID.
78
+ * @param - Reward info to update.
79
+ */
80
+ (_id: string, reward: UpdateReward): Promise<UpdateRewardResponse>;
81
+ }
82
+ declare function deleteReward$1(httpClient: HttpClient): DeleteRewardSignature;
83
+ interface DeleteRewardSignature {
84
+ /**
85
+ * Deletes a reward.
86
+ * @param - ID of the reward to delete.
87
+ * @param - Revision number, which increments by 1 each time the reward is updated.
88
+ *
89
+ * To prevent conflicting changes, the current `revision` must be passed when deleting the reward.
90
+ */
91
+ (_id: string, revision: string): Promise<void>;
92
+ }
93
+ declare function listRewards$1(httpClient: HttpClient): ListRewardsSignature;
94
+ interface ListRewardsSignature {
95
+ /**
96
+ * Retrieves a list of rewards.
97
+ *
98
+ * The list includes rewards that are currently nonredeemable due to insufficient points held by any customers.
99
+ * @param - List options.
100
+ */
101
+ (options?: ListRewardsOptions | undefined): Promise<ListRewardsResponse>;
102
+ }
103
+ declare const onRewardCreated$1: EventDefinition<RewardCreatedEnvelope, "wix.loyalty.v1.reward_created">;
104
+ declare const onRewardDeleted$1: EventDefinition<RewardDeletedEnvelope, "wix.loyalty.v1.reward_deleted">;
105
+ declare const onRewardUpdated$1: EventDefinition<RewardUpdatedEnvelope, "wix.loyalty.v1.reward_updated">;
106
+
107
+ declare const createReward: MaybeContext<BuildRESTFunction<typeof createReward$1> & typeof createReward$1>;
108
+ declare const bulkCreateRewards: MaybeContext<BuildRESTFunction<typeof bulkCreateRewards$1> & typeof bulkCreateRewards$1>;
109
+ declare const getReward: MaybeContext<BuildRESTFunction<typeof getReward$1> & typeof getReward$1>;
110
+ declare const bulkGetRewards: MaybeContext<BuildRESTFunction<typeof bulkGetRewards$1> & typeof bulkGetRewards$1>;
111
+ declare const queryRewards: MaybeContext<BuildRESTFunction<typeof queryRewards$1> & typeof queryRewards$1>;
112
+ declare const updateReward: MaybeContext<BuildRESTFunction<typeof updateReward$1> & typeof updateReward$1>;
113
+ declare const deleteReward: MaybeContext<BuildRESTFunction<typeof deleteReward$1> & typeof deleteReward$1>;
114
+ declare const listRewards: MaybeContext<BuildRESTFunction<typeof listRewards$1> & typeof listRewards$1>;
115
+ /**
116
+ * Triggered when a reward is created.
117
+ */
118
+ declare const onRewardCreated: BuildEventDefinition<typeof onRewardCreated$1>;
119
+ /**
120
+ * Triggered when a reward is deleted.
121
+ */
122
+ declare const onRewardDeleted: BuildEventDefinition<typeof onRewardDeleted$1>;
123
+ /**
124
+ * Triggered when a reward is updated.
125
+ */
126
+ declare const onRewardUpdated: BuildEventDefinition<typeof onRewardUpdated$1>;
127
+
128
+ export { BulkCreateRewardsResponse, BulkGetRewardsResponse, CursorQuery, ListRewardsOptions, ListRewardsResponse, QueryRewardsResponse, Reward, RewardCreatedEnvelope, RewardDeletedEnvelope, RewardUpdatedEnvelope, UpdateReward, UpdateRewardResponse, bulkCreateRewards, bulkGetRewards, createReward, deleteReward, getReward, listRewards, onRewardCreated, onRewardDeleted, onRewardUpdated, queryRewards, updateReward };