@wix/auto_sdk_loyalty_coupons 1.0.8 → 1.0.10

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 (130) hide show
  1. package/build/cjs/index.d.ts +1 -0
  2. package/build/cjs/index.js +18 -0
  3. package/build/cjs/index.js.map +1 -0
  4. package/build/cjs/index.typings.d.ts +1 -0
  5. package/build/cjs/index.typings.js +18 -0
  6. package/build/cjs/index.typings.js.map +1 -0
  7. package/build/cjs/meta.d.ts +1 -0
  8. package/build/cjs/meta.js +18 -0
  9. package/build/cjs/meta.js.map +1 -0
  10. package/build/cjs/src/loyalty-v1-coupon-coupons.context.d.ts +22 -0
  11. package/build/cjs/src/loyalty-v1-coupon-coupons.context.js +29 -0
  12. package/build/cjs/src/loyalty-v1-coupon-coupons.context.js.map +1 -0
  13. package/build/cjs/src/loyalty-v1-coupon-coupons.http.d.ts +43 -0
  14. package/build/cjs/src/loyalty-v1-coupon-coupons.http.js +389 -0
  15. package/build/cjs/src/loyalty-v1-coupon-coupons.http.js.map +1 -0
  16. package/build/cjs/src/loyalty-v1-coupon-coupons.meta.d.ts +23 -0
  17. package/build/cjs/src/loyalty-v1-coupon-coupons.meta.js +161 -0
  18. package/build/cjs/src/loyalty-v1-coupon-coupons.meta.js.map +1 -0
  19. package/build/cjs/src/loyalty-v1-coupon-coupons.public.d.ts +85 -0
  20. package/build/cjs/src/loyalty-v1-coupon-coupons.public.js +98 -0
  21. package/build/cjs/src/loyalty-v1-coupon-coupons.public.js.map +1 -0
  22. package/build/{meta.d.mts → cjs/src/loyalty-v1-coupon-coupons.types.d.ts} +201 -61
  23. package/build/cjs/src/loyalty-v1-coupon-coupons.types.js +41 -0
  24. package/build/cjs/src/loyalty-v1-coupon-coupons.types.js.map +1 -0
  25. package/build/{internal/loyalty-v1-coupon-coupons.universal-BpPn8h94.d.mts → cjs/src/loyalty-v1-coupon-coupons.universal.d.ts} +218 -58
  26. package/build/cjs/src/loyalty-v1-coupon-coupons.universal.js +370 -0
  27. package/build/cjs/src/loyalty-v1-coupon-coupons.universal.js.map +1 -0
  28. package/build/es/index.d.ts +1 -0
  29. package/build/es/index.js +2 -0
  30. package/build/es/index.js.map +1 -0
  31. package/build/es/index.typings.d.ts +1 -0
  32. package/build/es/index.typings.js +2 -0
  33. package/build/es/index.typings.js.map +1 -0
  34. package/build/es/meta.d.ts +1 -0
  35. package/build/es/meta.js +2 -0
  36. package/build/es/meta.js.map +1 -0
  37. package/build/es/package.json +3 -0
  38. package/build/es/src/loyalty-v1-coupon-coupons.context.d.ts +22 -0
  39. package/build/es/src/loyalty-v1-coupon-coupons.context.js +22 -0
  40. package/build/es/src/loyalty-v1-coupon-coupons.context.js.map +1 -0
  41. package/build/es/src/loyalty-v1-coupon-coupons.http.d.ts +43 -0
  42. package/build/es/src/loyalty-v1-coupon-coupons.http.js +379 -0
  43. package/build/es/src/loyalty-v1-coupon-coupons.http.js.map +1 -0
  44. package/build/es/src/loyalty-v1-coupon-coupons.meta.d.ts +23 -0
  45. package/build/es/src/loyalty-v1-coupon-coupons.meta.js +128 -0
  46. package/build/es/src/loyalty-v1-coupon-coupons.meta.js.map +1 -0
  47. package/build/es/src/loyalty-v1-coupon-coupons.public.d.ts +85 -0
  48. package/build/es/src/loyalty-v1-coupon-coupons.public.js +84 -0
  49. package/build/es/src/loyalty-v1-coupon-coupons.public.js.map +1 -0
  50. package/build/{internal/meta.d.mts → es/src/loyalty-v1-coupon-coupons.types.d.ts} +201 -61
  51. package/build/es/src/loyalty-v1-coupon-coupons.types.js +38 -0
  52. package/build/es/src/loyalty-v1-coupon-coupons.types.js.map +1 -0
  53. package/build/{loyalty-v1-coupon-coupons.universal-BpPn8h94.d.ts → es/src/loyalty-v1-coupon-coupons.universal.d.ts} +218 -58
  54. package/build/es/src/loyalty-v1-coupon-coupons.universal.js +337 -0
  55. package/build/es/src/loyalty-v1-coupon-coupons.universal.js.map +1 -0
  56. package/build/internal/cjs/index.d.ts +1 -0
  57. package/build/internal/cjs/index.js +18 -0
  58. package/build/internal/cjs/index.js.map +1 -0
  59. package/build/internal/cjs/index.typings.d.ts +1 -0
  60. package/build/internal/cjs/index.typings.js +18 -0
  61. package/build/internal/cjs/index.typings.js.map +1 -0
  62. package/build/internal/cjs/meta.d.ts +1 -0
  63. package/build/internal/cjs/meta.js +18 -0
  64. package/build/internal/cjs/meta.js.map +1 -0
  65. package/build/internal/cjs/src/loyalty-v1-coupon-coupons.context.d.ts +22 -0
  66. package/build/internal/cjs/src/loyalty-v1-coupon-coupons.context.js +29 -0
  67. package/build/internal/cjs/src/loyalty-v1-coupon-coupons.context.js.map +1 -0
  68. package/build/internal/cjs/src/loyalty-v1-coupon-coupons.http.d.ts +43 -0
  69. package/build/internal/cjs/src/loyalty-v1-coupon-coupons.http.js +389 -0
  70. package/build/internal/cjs/src/loyalty-v1-coupon-coupons.http.js.map +1 -0
  71. package/build/internal/cjs/src/loyalty-v1-coupon-coupons.meta.d.ts +23 -0
  72. package/build/internal/cjs/src/loyalty-v1-coupon-coupons.meta.js +161 -0
  73. package/build/internal/cjs/src/loyalty-v1-coupon-coupons.meta.js.map +1 -0
  74. package/build/internal/cjs/src/loyalty-v1-coupon-coupons.public.d.ts +85 -0
  75. package/build/internal/cjs/src/loyalty-v1-coupon-coupons.public.js +98 -0
  76. package/build/internal/cjs/src/loyalty-v1-coupon-coupons.public.js.map +1 -0
  77. package/build/internal/{meta.d.ts → cjs/src/loyalty-v1-coupon-coupons.types.d.ts} +201 -61
  78. package/build/internal/cjs/src/loyalty-v1-coupon-coupons.types.js +41 -0
  79. package/build/internal/cjs/src/loyalty-v1-coupon-coupons.types.js.map +1 -0
  80. package/build/{loyalty-v1-coupon-coupons.universal-BpPn8h94.d.mts → internal/cjs/src/loyalty-v1-coupon-coupons.universal.d.ts} +218 -58
  81. package/build/internal/cjs/src/loyalty-v1-coupon-coupons.universal.js +370 -0
  82. package/build/internal/cjs/src/loyalty-v1-coupon-coupons.universal.js.map +1 -0
  83. package/build/internal/es/index.d.ts +1 -0
  84. package/build/internal/es/index.js +2 -0
  85. package/build/internal/es/index.js.map +1 -0
  86. package/build/internal/es/index.typings.d.ts +1 -0
  87. package/build/internal/es/index.typings.js +2 -0
  88. package/build/internal/es/index.typings.js.map +1 -0
  89. package/build/internal/es/meta.d.ts +1 -0
  90. package/build/internal/es/meta.js +2 -0
  91. package/build/internal/es/meta.js.map +1 -0
  92. package/build/internal/es/src/loyalty-v1-coupon-coupons.context.d.ts +22 -0
  93. package/build/internal/es/src/loyalty-v1-coupon-coupons.context.js +22 -0
  94. package/build/internal/es/src/loyalty-v1-coupon-coupons.context.js.map +1 -0
  95. package/build/internal/es/src/loyalty-v1-coupon-coupons.http.d.ts +43 -0
  96. package/build/internal/es/src/loyalty-v1-coupon-coupons.http.js +379 -0
  97. package/build/internal/es/src/loyalty-v1-coupon-coupons.http.js.map +1 -0
  98. package/build/internal/es/src/loyalty-v1-coupon-coupons.meta.d.ts +23 -0
  99. package/build/internal/es/src/loyalty-v1-coupon-coupons.meta.js +128 -0
  100. package/build/internal/es/src/loyalty-v1-coupon-coupons.meta.js.map +1 -0
  101. package/build/internal/es/src/loyalty-v1-coupon-coupons.public.d.ts +85 -0
  102. package/build/internal/es/src/loyalty-v1-coupon-coupons.public.js +84 -0
  103. package/build/internal/es/src/loyalty-v1-coupon-coupons.public.js.map +1 -0
  104. package/build/{meta.d.ts → internal/es/src/loyalty-v1-coupon-coupons.types.d.ts} +201 -61
  105. package/build/internal/es/src/loyalty-v1-coupon-coupons.types.js +38 -0
  106. package/build/internal/es/src/loyalty-v1-coupon-coupons.types.js.map +1 -0
  107. package/build/internal/{loyalty-v1-coupon-coupons.universal-BpPn8h94.d.ts → es/src/loyalty-v1-coupon-coupons.universal.d.ts} +218 -58
  108. package/build/internal/es/src/loyalty-v1-coupon-coupons.universal.js +337 -0
  109. package/build/internal/es/src/loyalty-v1-coupon-coupons.universal.js.map +1 -0
  110. package/package.json +13 -14
  111. package/build/index.d.mts +0 -100
  112. package/build/index.d.ts +0 -100
  113. package/build/index.js +0 -753
  114. package/build/index.js.map +0 -1
  115. package/build/index.mjs +0 -717
  116. package/build/index.mjs.map +0 -1
  117. package/build/internal/index.d.mts +0 -100
  118. package/build/internal/index.d.ts +0 -100
  119. package/build/internal/index.js +0 -753
  120. package/build/internal/index.js.map +0 -1
  121. package/build/internal/index.mjs +0 -717
  122. package/build/internal/index.mjs.map +0 -1
  123. package/build/internal/meta.js +0 -515
  124. package/build/internal/meta.js.map +0 -1
  125. package/build/internal/meta.mjs +0 -482
  126. package/build/internal/meta.mjs.map +0 -1
  127. package/build/meta.js +0 -515
  128. package/build/meta.js.map +0 -1
  129. package/build/meta.mjs +0 -482
  130. package/build/meta.mjs.map +0 -1
@@ -0,0 +1,84 @@
1
+ import { renameKeysFromRESTResponseToSDKResponse } from '@wix/sdk-runtime/rename-all-nested-keys';
2
+ import { transformRESTFloatToSDKFloat } from '@wix/sdk-runtime/transformations/float';
3
+ import { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';
4
+ import { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';
5
+ import { EventDefinition } from '@wix/sdk-types';
6
+ import { bulkGetLoyaltyCoupon as universalBulkGetLoyaltyCoupon, deleteLoyaltyCoupon as universalDeleteLoyaltyCoupon, getCurrentMemberCoupons as universalGetCurrentMemberCoupons, getLoyaltyCoupon as universalGetLoyaltyCoupon, queryLoyaltyCoupons as universalQueryLoyaltyCoupons, redeemCurrentMemberPointsForCoupon as universalRedeemCurrentMemberPointsForCoupon, redeemPointsForCoupon as universalRedeemPointsForCoupon, } from './loyalty-v1-coupon-coupons.universal.js';
7
+ export const __metadata = { PACKAGE_NAME: '@wix/loyalty' };
8
+ export function redeemPointsForCoupon(httpClient) {
9
+ return (rewardId, options) => universalRedeemPointsForCoupon(rewardId, options,
10
+ // @ts-ignore
11
+ { httpClient });
12
+ }
13
+ export function redeemCurrentMemberPointsForCoupon(httpClient) {
14
+ return (rewardId) => universalRedeemCurrentMemberPointsForCoupon(rewardId,
15
+ // @ts-ignore
16
+ { httpClient });
17
+ }
18
+ export function getLoyaltyCoupon(httpClient) {
19
+ return (loyaltyCouponId) => universalGetLoyaltyCoupon(loyaltyCouponId,
20
+ // @ts-ignore
21
+ { httpClient });
22
+ }
23
+ export function bulkGetLoyaltyCoupon(httpClient) {
24
+ return (options) => universalBulkGetLoyaltyCoupon(options,
25
+ // @ts-ignore
26
+ { httpClient });
27
+ }
28
+ export function getCurrentMemberCoupons(httpClient) {
29
+ return () => universalGetCurrentMemberCoupons(
30
+ // @ts-ignore
31
+ { httpClient });
32
+ }
33
+ export function queryLoyaltyCoupons(httpClient) {
34
+ return () => universalQueryLoyaltyCoupons(
35
+ // @ts-ignore
36
+ { httpClient });
37
+ }
38
+ export function deleteLoyaltyCoupon(httpClient) {
39
+ return (_id, revision) => universalDeleteLoyaltyCoupon(_id, revision,
40
+ // @ts-ignore
41
+ { httpClient });
42
+ }
43
+ export const onCouponCreated = EventDefinition('wix.loyalty.v1.coupon_created', true, (event) => renameKeysFromRESTResponseToSDKResponse(transformPaths(event, [
44
+ {
45
+ transformFn: transformRESTTimestampToSDKTimestamp,
46
+ paths: [
47
+ { path: 'entity.createdDate' },
48
+ { path: 'entity.updatedDate' },
49
+ { path: 'metadata.eventTime' },
50
+ ],
51
+ },
52
+ {
53
+ transformFn: transformRESTFloatToSDKFloat,
54
+ paths: [
55
+ { path: 'entity.couponReference.specification.moneyOffAmount' },
56
+ { path: 'entity.couponReference.specification.percentOffRate' },
57
+ { path: 'entity.couponReference.specification.fixedPriceAmount' },
58
+ { path: 'entity.couponReference.specification.minimumSubtotal' },
59
+ ],
60
+ },
61
+ ])))();
62
+ export const onCouponDeleted = EventDefinition('wix.loyalty.v1.coupon_deleted', true, (event) => renameKeysFromRESTResponseToSDKResponse(transformPaths(event, [
63
+ {
64
+ transformFn: transformRESTTimestampToSDKTimestamp,
65
+ paths: [
66
+ { path: 'undefined.createdDate' },
67
+ { path: 'undefined.updatedDate' },
68
+ { path: 'metadata.eventTime' },
69
+ ],
70
+ },
71
+ {
72
+ transformFn: transformRESTFloatToSDKFloat,
73
+ paths: [
74
+ { path: 'undefined.couponReference.specification.moneyOffAmount' },
75
+ { path: 'undefined.couponReference.specification.percentOffRate' },
76
+ {
77
+ path: 'undefined.couponReference.specification.fixedPriceAmount',
78
+ },
79
+ { path: 'undefined.couponReference.specification.minimumSubtotal' },
80
+ ],
81
+ },
82
+ ])))();
83
+ export { SortOrder, Status, Type, WebhookIdentityType, } from './loyalty-v1-coupon-coupons.universal.js';
84
+ //# sourceMappingURL=loyalty-v1-coupon-coupons.public.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"loyalty-v1-coupon-coupons.public.js","sourceRoot":"","sources":["../../../src/loyalty-v1-coupon-coupons.public.ts"],"names":[],"mappings":"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"}
@@ -1,10 +1,8 @@
1
- import { k as RedeemPointsForCouponRequest$1, a as RedeemPointsForCouponResponse$1, l as RedeemCurrentMemberPointsForCouponRequest$1, b as RedeemCurrentMemberPointsForCouponResponse$1, o as GetLoyaltyCouponRequest$1, p as GetLoyaltyCouponResponse$1, q as BulkGetLoyaltyCouponRequest$1, c as BulkGetLoyaltyCouponResponse$1, w as GetCurrentMemberCouponsRequest$1, G as GetCurrentMemberCouponsResponse$1, Q as QueryLoyaltyCouponRequest$1, z as QueryLoyaltyCouponResponse$1, E as DeleteLoyaltyCouponRequest$1, F as DeleteLoyaltyCouponResponse$1 } from './loyalty-v1-coupon-coupons.universal-BpPn8h94.mjs';
2
-
3
1
  /**
4
2
  * A loyalty coupon is created when a customer redeems their loyalty points for a reward. Creating a loyalty coupon
5
3
  * also creates a corresponding "reference" coupon with the [Coupons API](https://dev.wix.com/api/rest/coupons/about-wix-coupons).
6
4
  */
7
- interface LoyaltyCoupon {
5
+ export interface LoyaltyCoupon {
8
6
  /**
9
7
  * Loyalty coupon ID.
10
8
  * @format GUID
@@ -77,7 +75,7 @@ interface LoyaltyCoupon {
77
75
  */
78
76
  updatedDate?: Date | null;
79
77
  }
80
- interface CouponReference {
78
+ export interface CouponReference {
81
79
  /**
82
80
  * Coupon ID.
83
81
  * @format GUID
@@ -109,7 +107,7 @@ interface CouponReference {
109
107
  */
110
108
  deleted?: boolean | null;
111
109
  }
112
- interface Specification extends SpecificationTypeDetailsOneOf, SpecificationScopeOrMinSubtotalOneOf {
110
+ export interface Specification extends SpecificationTypeDetailsOneOf, SpecificationScopeOrMinSubtotalOneOf {
113
111
  /** Fixed price discount. */
114
112
  moneyOffAmount?: number;
115
113
  /** Discount as a percentage. */
@@ -155,7 +153,7 @@ interface Specification extends SpecificationTypeDetailsOneOf, SpecificationScop
155
153
  discountedCycleCount?: number | null;
156
154
  }
157
155
  /** @oneof */
158
- interface SpecificationTypeDetailsOneOf {
156
+ export interface SpecificationTypeDetailsOneOf {
159
157
  /** Fixed price discount. */
160
158
  moneyOffAmount?: number;
161
159
  /** Discount as a percentage. */
@@ -172,7 +170,7 @@ interface SpecificationTypeDetailsOneOf {
172
170
  buyXGetY?: BuyXGetY;
173
171
  }
174
172
  /** @oneof */
175
- interface SpecificationScopeOrMinSubtotalOneOf {
173
+ export interface SpecificationScopeOrMinSubtotalOneOf {
176
174
  /**
177
175
  * Scope of the coupon. When no scope is defined, the coupon applies to all
178
176
  * items in all `namespaces` in the site.
@@ -181,7 +179,7 @@ interface SpecificationScopeOrMinSubtotalOneOf {
181
179
  /** The coupon is only applicable when the order subtotal is over this amount. */
182
180
  minimumSubtotal?: number | null;
183
181
  }
184
- declare enum Type {
182
+ export declare enum Type {
185
183
  UNKNOWN = "UNKNOWN",
186
184
  MONEY_OFF_AMOUNT = "MONEY_OFF_AMOUNT",
187
185
  PERCENT_OFF_RATE = "PERCENT_OFF_RATE",
@@ -189,13 +187,13 @@ declare enum Type {
189
187
  FIXED_PRICE_AMOUNT = "FIXED_PRICE_AMOUNT",
190
188
  BUY_X_GET_Y = "BUY_X_GET_Y"
191
189
  }
192
- interface BuyXGetY {
190
+ export interface BuyXGetY {
193
191
  /** Number of purchased items required to receive free items. */
194
192
  x?: number;
195
193
  /** Number of items received for free if required number of items were purchased. */
196
194
  y?: number;
197
195
  }
198
- interface Scope {
196
+ export interface Scope {
199
197
  /**
200
198
  * Group within a `namespace` for which the coupon is applicable.
201
199
  *
@@ -223,7 +221,7 @@ interface Scope {
223
221
  */
224
222
  namespace?: string;
225
223
  }
226
- declare enum Status {
224
+ export declare enum Status {
227
225
  /** Unknown status. */
228
226
  UNKNOWN = "UNKNOWN",
229
227
  /** The reference coupon was created but the loyalty points have not been redeemed yet. */
@@ -237,7 +235,7 @@ declare enum Status {
237
235
  /** The reference coupon was deleted. */
238
236
  ARCHIVED = "ARCHIVED"
239
237
  }
240
- interface RedeemPointsForCouponRequest {
238
+ export interface RedeemPointsForCouponRequest {
241
239
  /**
242
240
  * ID of the [loyalty reward](https://dev.wix.com/docs/rest/crm/loyalty-program/rewards/reward-object) to redeem.
243
241
  * @format GUID
@@ -249,37 +247,59 @@ interface RedeemPointsForCouponRequest {
249
247
  */
250
248
  loyaltyAccountId: string;
251
249
  }
252
- interface RedeemPointsForCouponResponse {
250
+ export interface RedeemPointsForCouponResponse {
253
251
  /** Created loyalty coupon. */
254
252
  coupon?: LoyaltyCoupon;
255
253
  }
256
- interface RedeemCurrentMemberPointsForCouponRequest {
254
+ export interface RedeemCurrentMemberPointsForCouponRequest {
257
255
  /**
258
256
  * ID of the [loyalty reward](https://dev.wix.com/docs/rest/crm/loyalty-program/rewards/reward-object) to redeem.
259
257
  * @format GUID
260
258
  */
261
259
  rewardId: string;
262
260
  }
263
- interface RedeemCurrentMemberPointsForCouponResponse {
261
+ export interface RedeemCurrentMemberPointsForCouponResponse {
264
262
  /** Created loyalty coupon. */
265
263
  coupon?: LoyaltyCoupon;
266
264
  }
267
- interface GetLoyaltyCouponRequest {
265
+ export interface RedeemMemberPointsForDiscountAmountCouponRequest {
266
+ /**
267
+ * ID of the [loyalty reward](https://dev.wix.com/api/rest/wix-loyalty-program/rewards) to redeem.
268
+ * @format GUID
269
+ */
270
+ rewardId?: string;
271
+ /**
272
+ * Loyalty account id.
273
+ * @format GUID
274
+ */
275
+ loyaltyAccountId?: string;
276
+ /** Number of points to redeem. */
277
+ pointsToRedeem?: number;
278
+ /** Coupon specification. */
279
+ specification?: Specification;
280
+ }
281
+ export interface RedeemMemberPointsForDiscountAmountCouponResponse {
282
+ /** Created loyalty coupon. */
283
+ coupon?: LoyaltyCoupon;
284
+ /** Transaction id of the coupon redemption */
285
+ transactionId?: string;
286
+ }
287
+ export interface GetLoyaltyCouponRequest {
268
288
  /**
269
289
  * ID of the loyalty coupon to retrieve.
270
290
  * @format GUID
271
291
  */
272
292
  loyaltyCouponId: string;
273
293
  }
274
- interface GetLoyaltyCouponResponse {
294
+ export interface GetLoyaltyCouponResponse {
275
295
  /** Retrieved loyalty coupon. */
276
296
  loyaltyCoupon?: LoyaltyCoupon;
277
297
  }
278
- interface BulkGetLoyaltyCouponRequest {
298
+ export interface BulkGetLoyaltyCouponRequest {
279
299
  /** Query to filter loyalty coupons. */
280
300
  query?: CursorQuery;
281
301
  }
282
- interface CursorQuery extends CursorQueryPagingMethodOneOf {
302
+ export interface CursorQuery extends CursorQueryPagingMethodOneOf {
283
303
  /**
284
304
  * Cursor paging options.
285
305
  *
@@ -301,7 +321,7 @@ interface CursorQuery extends CursorQueryPagingMethodOneOf {
301
321
  sort?: Sorting[];
302
322
  }
303
323
  /** @oneof */
304
- interface CursorQueryPagingMethodOneOf {
324
+ export interface CursorQueryPagingMethodOneOf {
305
325
  /**
306
326
  * Cursor paging options.
307
327
  *
@@ -309,7 +329,7 @@ interface CursorQueryPagingMethodOneOf {
309
329
  */
310
330
  cursorPaging?: CursorPaging;
311
331
  }
312
- interface Sorting {
332
+ export interface Sorting {
313
333
  /**
314
334
  * Name of the field to sort by.
315
335
  * @maxLength 512
@@ -318,11 +338,11 @@ interface Sorting {
318
338
  /** Sort order. */
319
339
  order?: SortOrder;
320
340
  }
321
- declare enum SortOrder {
341
+ export declare enum SortOrder {
322
342
  ASC = "ASC",
323
343
  DESC = "DESC"
324
344
  }
325
- interface CursorPaging {
345
+ export interface CursorPaging {
326
346
  /**
327
347
  * Maximum number of items to return in the results.
328
348
  * @max 100
@@ -337,14 +357,14 @@ interface CursorPaging {
337
357
  */
338
358
  cursor?: string | null;
339
359
  }
340
- interface BulkGetLoyaltyCouponResponse {
360
+ export interface BulkGetLoyaltyCouponResponse {
341
361
  /**
342
362
  * Retrieved loyalty coupons.
343
363
  * @maxSize 100
344
364
  */
345
365
  couponsInSite?: CouponsInSite[];
346
366
  }
347
- interface CouponsInSite {
367
+ export interface CouponsInSite {
348
368
  /**
349
369
  * Metasite id
350
370
  * @format GUID
@@ -356,17 +376,17 @@ interface CouponsInSite {
356
376
  */
357
377
  loyaltyCoupons?: LoyaltyCoupon[];
358
378
  }
359
- interface GetCurrentMemberCouponsRequest {
379
+ export interface GetCurrentMemberCouponsRequest {
360
380
  }
361
- interface GetCurrentMemberCouponsResponse {
381
+ export interface GetCurrentMemberCouponsResponse {
362
382
  /** Retrieved loyalty coupons. */
363
383
  loyaltyCoupons?: LoyaltyCoupon[];
364
384
  }
365
- interface QueryLoyaltyCouponRequest {
385
+ export interface QueryLoyaltyCouponRequest {
366
386
  /** Query options. */
367
387
  query: QueryV2;
368
388
  }
369
- interface QueryV2 extends QueryV2PagingMethodOneOf {
389
+ export interface QueryV2 extends QueryV2PagingMethodOneOf {
370
390
  /** Paging options to limit and skip the number of items. */
371
391
  paging?: Paging;
372
392
  /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
@@ -389,25 +409,25 @@ interface QueryV2 extends QueryV2PagingMethodOneOf {
389
409
  fieldsets?: string[];
390
410
  }
391
411
  /** @oneof */
392
- interface QueryV2PagingMethodOneOf {
412
+ export interface QueryV2PagingMethodOneOf {
393
413
  /** Paging options to limit and skip the number of items. */
394
414
  paging?: Paging;
395
415
  /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
396
416
  cursorPaging?: CursorPaging;
397
417
  }
398
- interface Paging {
418
+ export interface Paging {
399
419
  /** Number of items to load. */
400
420
  limit?: number | null;
401
421
  /** Number of items to skip in the current sort order. */
402
422
  offset?: number | null;
403
423
  }
404
- interface QueryLoyaltyCouponResponse {
424
+ export interface QueryLoyaltyCouponResponse {
405
425
  /** Retrieved loyalty coupons. */
406
426
  loyaltyCoupons?: LoyaltyCoupon[];
407
427
  /** Metadata. */
408
428
  metadata?: PagingMetadataV2;
409
429
  }
410
- interface PagingMetadataV2 {
430
+ export interface PagingMetadataV2 {
411
431
  /** Number of items returned in the response. */
412
432
  count?: number | null;
413
433
  /** Offset that was requested. */
@@ -419,7 +439,7 @@ interface PagingMetadataV2 {
419
439
  /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */
420
440
  cursors?: Cursors;
421
441
  }
422
- interface Cursors {
442
+ export interface Cursors {
423
443
  /**
424
444
  * Cursor string pointing to the next page in the list of results.
425
445
  * @maxLength 16000
@@ -431,7 +451,7 @@ interface Cursors {
431
451
  */
432
452
  prev?: string | null;
433
453
  }
434
- interface DeleteLoyaltyCouponRequest {
454
+ export interface DeleteLoyaltyCouponRequest {
435
455
  /**
436
456
  * ID of the loyalty coupon to delete.
437
457
  * @format GUID
@@ -444,29 +464,149 @@ interface DeleteLoyaltyCouponRequest {
444
464
  */
445
465
  revision?: string;
446
466
  }
447
- interface DeleteLoyaltyCouponResponse {
448
- }
449
-
450
- type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
451
- getUrl: (context: any) => string;
452
- httpMethod: K;
453
- path: string;
454
- pathParams: M;
455
- __requestType: T;
456
- __originalRequestType: S;
457
- __responseType: Q;
458
- __originalResponseType: R;
459
- };
460
- declare function redeemPointsForCoupon(): __PublicMethodMetaInfo<'POST', {}, RedeemPointsForCouponRequest$1, RedeemPointsForCouponRequest, RedeemPointsForCouponResponse$1, RedeemPointsForCouponResponse>;
461
- declare function redeemCurrentMemberPointsForCoupon(): __PublicMethodMetaInfo<'POST', {}, RedeemCurrentMemberPointsForCouponRequest$1, RedeemCurrentMemberPointsForCouponRequest, RedeemCurrentMemberPointsForCouponResponse$1, RedeemCurrentMemberPointsForCouponResponse>;
462
- declare function getLoyaltyCoupon(): __PublicMethodMetaInfo<'GET', {
463
- loyaltyCouponId: string;
464
- }, GetLoyaltyCouponRequest$1, GetLoyaltyCouponRequest, GetLoyaltyCouponResponse$1, GetLoyaltyCouponResponse>;
465
- declare function bulkGetLoyaltyCoupon(): __PublicMethodMetaInfo<'GET', {}, BulkGetLoyaltyCouponRequest$1, BulkGetLoyaltyCouponRequest, BulkGetLoyaltyCouponResponse$1, BulkGetLoyaltyCouponResponse>;
466
- declare function getCurrentMemberCoupons(): __PublicMethodMetaInfo<'GET', {}, GetCurrentMemberCouponsRequest$1, GetCurrentMemberCouponsRequest, GetCurrentMemberCouponsResponse$1, GetCurrentMemberCouponsResponse>;
467
- declare function queryLoyaltyCoupons(): __PublicMethodMetaInfo<'POST', {}, QueryLoyaltyCouponRequest$1, QueryLoyaltyCouponRequest, QueryLoyaltyCouponResponse$1, QueryLoyaltyCouponResponse>;
468
- declare function deleteLoyaltyCoupon(): __PublicMethodMetaInfo<'DELETE', {
469
- id: string;
470
- }, DeleteLoyaltyCouponRequest$1, DeleteLoyaltyCouponRequest, DeleteLoyaltyCouponResponse$1, DeleteLoyaltyCouponResponse>;
471
-
472
- export { type __PublicMethodMetaInfo, bulkGetLoyaltyCoupon, deleteLoyaltyCoupon, getCurrentMemberCoupons, getLoyaltyCoupon, queryLoyaltyCoupons, redeemCurrentMemberPointsForCoupon, redeemPointsForCoupon };
467
+ export interface DeleteLoyaltyCouponResponse {
468
+ }
469
+ export interface DomainEvent extends DomainEventBodyOneOf {
470
+ createdEvent?: EntityCreatedEvent;
471
+ updatedEvent?: EntityUpdatedEvent;
472
+ deletedEvent?: EntityDeletedEvent;
473
+ actionEvent?: ActionEvent;
474
+ /**
475
+ * Unique event ID.
476
+ * Allows clients to ignore duplicate webhooks.
477
+ */
478
+ id?: string;
479
+ /**
480
+ * Assumes actions are also always typed to an entity_type
481
+ * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
482
+ */
483
+ entityFqdn?: string;
484
+ /**
485
+ * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
486
+ * This is although the created/updated/deleted notion is duplication of the oneof types
487
+ * Example: created/updated/deleted/started/completed/email_opened
488
+ */
489
+ slug?: string;
490
+ /** ID of the entity associated with the event. */
491
+ entityId?: string;
492
+ /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
493
+ eventTime?: Date | null;
494
+ /**
495
+ * Whether the event was triggered as a result of a privacy regulation application
496
+ * (for example, GDPR).
497
+ */
498
+ triggeredByAnonymizeRequest?: boolean | null;
499
+ /** If present, indicates the action that triggered the event. */
500
+ originatedFrom?: string | null;
501
+ /**
502
+ * A sequence number defining the order of updates to the underlying entity.
503
+ * For example, given that some entity was updated at 16:00 and than again at 16:01,
504
+ * it is guaranteed that the sequence number of the second update is strictly higher than the first.
505
+ * As the consumer, you can use this value to ensure that you handle messages in the correct order.
506
+ * To do so, you will need to persist this number on your end, and compare the sequence number from the
507
+ * message against the one you have stored. Given that the stored number is higher, you should ignore the message.
508
+ */
509
+ entityEventSequence?: string | null;
510
+ }
511
+ /** @oneof */
512
+ export interface DomainEventBodyOneOf {
513
+ createdEvent?: EntityCreatedEvent;
514
+ updatedEvent?: EntityUpdatedEvent;
515
+ deletedEvent?: EntityDeletedEvent;
516
+ actionEvent?: ActionEvent;
517
+ }
518
+ export interface EntityCreatedEvent {
519
+ entityAsJson?: string;
520
+ /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */
521
+ restoreInfo?: RestoreInfo;
522
+ }
523
+ export interface RestoreInfo {
524
+ deletedDate?: Date | null;
525
+ }
526
+ export interface EntityUpdatedEvent {
527
+ /**
528
+ * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
529
+ * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
530
+ * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
531
+ */
532
+ currentEntityAsJson?: string;
533
+ }
534
+ export interface EntityDeletedEvent {
535
+ /** Entity that was deleted */
536
+ deletedEntityAsJson?: string | null;
537
+ }
538
+ export interface ActionEvent {
539
+ bodyAsJson?: string;
540
+ }
541
+ export interface Empty {
542
+ }
543
+ export interface MessageEnvelope {
544
+ /**
545
+ * App instance ID.
546
+ * @format GUID
547
+ */
548
+ instanceId?: string | null;
549
+ /**
550
+ * Event type.
551
+ * @maxLength 150
552
+ */
553
+ eventType?: string;
554
+ /** The identification type and identity data. */
555
+ identity?: IdentificationData;
556
+ /** Stringify payload. */
557
+ data?: string;
558
+ }
559
+ export interface IdentificationData extends IdentificationDataIdOneOf {
560
+ /**
561
+ * ID of a site visitor that has not logged in to the site.
562
+ * @format GUID
563
+ */
564
+ anonymousVisitorId?: string;
565
+ /**
566
+ * ID of a site visitor that has logged in to the site.
567
+ * @format GUID
568
+ */
569
+ memberId?: string;
570
+ /**
571
+ * ID of a Wix user (site owner, contributor, etc.).
572
+ * @format GUID
573
+ */
574
+ wixUserId?: string;
575
+ /**
576
+ * ID of an app.
577
+ * @format GUID
578
+ */
579
+ appId?: string;
580
+ /** @readonly */
581
+ identityType?: WebhookIdentityType;
582
+ }
583
+ /** @oneof */
584
+ export interface IdentificationDataIdOneOf {
585
+ /**
586
+ * ID of a site visitor that has not logged in to the site.
587
+ * @format GUID
588
+ */
589
+ anonymousVisitorId?: string;
590
+ /**
591
+ * ID of a site visitor that has logged in to the site.
592
+ * @format GUID
593
+ */
594
+ memberId?: string;
595
+ /**
596
+ * ID of a Wix user (site owner, contributor, etc.).
597
+ * @format GUID
598
+ */
599
+ wixUserId?: string;
600
+ /**
601
+ * ID of an app.
602
+ * @format GUID
603
+ */
604
+ appId?: string;
605
+ }
606
+ export declare enum WebhookIdentityType {
607
+ UNKNOWN = "UNKNOWN",
608
+ ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
609
+ MEMBER = "MEMBER",
610
+ WIX_USER = "WIX_USER",
611
+ APP = "APP"
612
+ }
@@ -0,0 +1,38 @@
1
+ export var Type;
2
+ (function (Type) {
3
+ Type["UNKNOWN"] = "UNKNOWN";
4
+ Type["MONEY_OFF_AMOUNT"] = "MONEY_OFF_AMOUNT";
5
+ Type["PERCENT_OFF_RATE"] = "PERCENT_OFF_RATE";
6
+ Type["FREE_SHIPPING"] = "FREE_SHIPPING";
7
+ Type["FIXED_PRICE_AMOUNT"] = "FIXED_PRICE_AMOUNT";
8
+ Type["BUY_X_GET_Y"] = "BUY_X_GET_Y";
9
+ })(Type || (Type = {}));
10
+ export var Status;
11
+ (function (Status) {
12
+ /** Unknown status. */
13
+ Status["UNKNOWN"] = "UNKNOWN";
14
+ /** The reference coupon was created but the loyalty points have not been redeemed yet. */
15
+ Status["PENDING"] = "PENDING";
16
+ /** The reference coupon is active and available to the customer. */
17
+ Status["ACTIVE"] = "ACTIVE";
18
+ /** The reference coupon was applied and is no longer available for use. */
19
+ Status["APPLIED"] = "APPLIED";
20
+ /** The reference coupon was created but something went wrong when redeeming points from the loyalty account. */
21
+ Status["FAILED"] = "FAILED";
22
+ /** The reference coupon was deleted. */
23
+ Status["ARCHIVED"] = "ARCHIVED";
24
+ })(Status || (Status = {}));
25
+ export var SortOrder;
26
+ (function (SortOrder) {
27
+ SortOrder["ASC"] = "ASC";
28
+ SortOrder["DESC"] = "DESC";
29
+ })(SortOrder || (SortOrder = {}));
30
+ export var WebhookIdentityType;
31
+ (function (WebhookIdentityType) {
32
+ WebhookIdentityType["UNKNOWN"] = "UNKNOWN";
33
+ WebhookIdentityType["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
34
+ WebhookIdentityType["MEMBER"] = "MEMBER";
35
+ WebhookIdentityType["WIX_USER"] = "WIX_USER";
36
+ WebhookIdentityType["APP"] = "APP";
37
+ })(WebhookIdentityType || (WebhookIdentityType = {}));
38
+ //# sourceMappingURL=loyalty-v1-coupon-coupons.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"loyalty-v1-coupon-coupons.types.js","sourceRoot":"","sources":["../../../src/loyalty-v1-coupon-coupons.types.ts"],"names":[],"mappings":"AA4LA,MAAM,CAAN,IAAY,IAOX;AAPD,WAAY,IAAI;IACd,2BAAmB,CAAA;IACnB,6CAAqC,CAAA;IACrC,6CAAqC,CAAA;IACrC,uCAA+B,CAAA;IAC/B,iDAAyC,CAAA;IACzC,mCAA2B,CAAA;AAC7B,CAAC,EAPW,IAAI,KAAJ,IAAI,QAOf;AAsCD,MAAM,CAAN,IAAY,MAaX;AAbD,WAAY,MAAM;IAChB,sBAAsB;IACtB,6BAAmB,CAAA;IACnB,0FAA0F;IAC1F,6BAAmB,CAAA;IACnB,oEAAoE;IACpE,2BAAiB,CAAA;IACjB,2EAA2E;IAC3E,6BAAmB,CAAA;IACnB,gHAAgH;IAChH,2BAAiB,CAAA;IACjB,wCAAwC;IACxC,+BAAqB,CAAA;AACvB,CAAC,EAbW,MAAM,KAAN,MAAM,QAajB;AAqHD,MAAM,CAAN,IAAY,SAGX;AAHD,WAAY,SAAS;IACnB,wBAAW,CAAA;IACX,0BAAa,CAAA;AACf,CAAC,EAHW,SAAS,KAAT,SAAS,QAGpB;AA6RD,MAAM,CAAN,IAAY,mBAMX;AAND,WAAY,mBAAmB;IAC7B,0CAAmB,CAAA;IACnB,8DAAuC,CAAA;IACvC,wCAAiB,CAAA;IACjB,4CAAqB,CAAA;IACrB,kCAAW,CAAA;AACb,CAAC,EANW,mBAAmB,KAAnB,mBAAmB,QAM9B"}