@wix/auto_sdk_loyalty_coupons 1.0.13 → 1.0.15
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.
- package/build/cjs/index.d.ts +101 -1
- package/build/cjs/index.js +753 -15
- package/build/cjs/index.js.map +1 -1
- package/build/{internal/cjs/src/loyalty-v1-coupon-coupons.universal.d.ts → cjs/loyalty-v1-coupon-coupons.universal-YZSAPFpG.d.ts} +62 -222
- package/build/cjs/meta.d.ts +478 -1
- package/build/cjs/meta.js +512 -15
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +101 -0
- package/build/es/index.mjs +720 -0
- package/build/es/index.mjs.map +1 -0
- package/build/{internal/es/src/loyalty-v1-coupon-coupons.universal.d.ts → es/loyalty-v1-coupon-coupons.universal-YZSAPFpG.d.mts} +62 -222
- package/build/{internal/cjs/src/loyalty-v1-coupon-coupons.types.d.ts → es/meta.d.mts} +64 -198
- package/build/es/meta.mjs +482 -0
- package/build/es/meta.mjs.map +1 -0
- package/build/internal/cjs/index.d.ts +101 -1
- package/build/internal/cjs/index.js +753 -15
- package/build/internal/cjs/index.js.map +1 -1
- package/build/{cjs/src/loyalty-v1-coupon-coupons.universal.d.ts → internal/cjs/loyalty-v1-coupon-coupons.universal-YZSAPFpG.d.ts} +62 -222
- package/build/internal/cjs/meta.d.ts +478 -1
- package/build/internal/cjs/meta.js +512 -15
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.d.mts +101 -0
- package/build/internal/es/index.mjs +720 -0
- package/build/internal/es/index.mjs.map +1 -0
- package/build/{es/src/loyalty-v1-coupon-coupons.universal.d.ts → internal/es/loyalty-v1-coupon-coupons.universal-YZSAPFpG.d.mts} +62 -222
- package/build/{cjs/src/loyalty-v1-coupon-coupons.types.d.ts → internal/es/meta.d.mts} +64 -198
- package/build/internal/es/meta.mjs +482 -0
- package/build/internal/es/meta.mjs.map +1 -0
- package/package.json +10 -9
- package/build/cjs/index.typings.d.ts +0 -1
- package/build/cjs/index.typings.js +0 -18
- package/build/cjs/index.typings.js.map +0 -1
- package/build/cjs/src/loyalty-v1-coupon-coupons.context.d.ts +0 -22
- package/build/cjs/src/loyalty-v1-coupon-coupons.context.js +0 -29
- package/build/cjs/src/loyalty-v1-coupon-coupons.context.js.map +0 -1
- package/build/cjs/src/loyalty-v1-coupon-coupons.http.d.ts +0 -43
- package/build/cjs/src/loyalty-v1-coupon-coupons.http.js +0 -389
- package/build/cjs/src/loyalty-v1-coupon-coupons.http.js.map +0 -1
- package/build/cjs/src/loyalty-v1-coupon-coupons.meta.d.ts +0 -23
- package/build/cjs/src/loyalty-v1-coupon-coupons.meta.js +0 -161
- package/build/cjs/src/loyalty-v1-coupon-coupons.meta.js.map +0 -1
- package/build/cjs/src/loyalty-v1-coupon-coupons.public.d.ts +0 -85
- package/build/cjs/src/loyalty-v1-coupon-coupons.public.js +0 -98
- package/build/cjs/src/loyalty-v1-coupon-coupons.public.js.map +0 -1
- package/build/cjs/src/loyalty-v1-coupon-coupons.types.js +0 -41
- package/build/cjs/src/loyalty-v1-coupon-coupons.types.js.map +0 -1
- package/build/cjs/src/loyalty-v1-coupon-coupons.universal.js +0 -372
- package/build/cjs/src/loyalty-v1-coupon-coupons.universal.js.map +0 -1
- package/build/es/index.d.ts +0 -1
- package/build/es/index.js +0 -2
- package/build/es/index.js.map +0 -1
- package/build/es/index.typings.d.ts +0 -1
- package/build/es/index.typings.js +0 -2
- package/build/es/index.typings.js.map +0 -1
- package/build/es/meta.d.ts +0 -1
- package/build/es/meta.js +0 -2
- package/build/es/meta.js.map +0 -1
- package/build/es/src/loyalty-v1-coupon-coupons.context.d.ts +0 -22
- package/build/es/src/loyalty-v1-coupon-coupons.context.js +0 -22
- package/build/es/src/loyalty-v1-coupon-coupons.context.js.map +0 -1
- package/build/es/src/loyalty-v1-coupon-coupons.http.d.ts +0 -43
- package/build/es/src/loyalty-v1-coupon-coupons.http.js +0 -379
- package/build/es/src/loyalty-v1-coupon-coupons.http.js.map +0 -1
- package/build/es/src/loyalty-v1-coupon-coupons.meta.d.ts +0 -23
- package/build/es/src/loyalty-v1-coupon-coupons.meta.js +0 -128
- package/build/es/src/loyalty-v1-coupon-coupons.meta.js.map +0 -1
- package/build/es/src/loyalty-v1-coupon-coupons.public.d.ts +0 -85
- package/build/es/src/loyalty-v1-coupon-coupons.public.js +0 -84
- package/build/es/src/loyalty-v1-coupon-coupons.public.js.map +0 -1
- package/build/es/src/loyalty-v1-coupon-coupons.types.d.ts +0 -612
- package/build/es/src/loyalty-v1-coupon-coupons.types.js +0 -38
- package/build/es/src/loyalty-v1-coupon-coupons.types.js.map +0 -1
- package/build/es/src/loyalty-v1-coupon-coupons.universal.js +0 -339
- package/build/es/src/loyalty-v1-coupon-coupons.universal.js.map +0 -1
- package/build/internal/cjs/index.typings.d.ts +0 -1
- package/build/internal/cjs/index.typings.js +0 -18
- package/build/internal/cjs/index.typings.js.map +0 -1
- package/build/internal/cjs/src/loyalty-v1-coupon-coupons.context.d.ts +0 -22
- package/build/internal/cjs/src/loyalty-v1-coupon-coupons.context.js +0 -29
- package/build/internal/cjs/src/loyalty-v1-coupon-coupons.context.js.map +0 -1
- package/build/internal/cjs/src/loyalty-v1-coupon-coupons.http.d.ts +0 -43
- package/build/internal/cjs/src/loyalty-v1-coupon-coupons.http.js +0 -389
- package/build/internal/cjs/src/loyalty-v1-coupon-coupons.http.js.map +0 -1
- package/build/internal/cjs/src/loyalty-v1-coupon-coupons.meta.d.ts +0 -23
- package/build/internal/cjs/src/loyalty-v1-coupon-coupons.meta.js +0 -161
- package/build/internal/cjs/src/loyalty-v1-coupon-coupons.meta.js.map +0 -1
- package/build/internal/cjs/src/loyalty-v1-coupon-coupons.public.d.ts +0 -85
- package/build/internal/cjs/src/loyalty-v1-coupon-coupons.public.js +0 -98
- package/build/internal/cjs/src/loyalty-v1-coupon-coupons.public.js.map +0 -1
- package/build/internal/cjs/src/loyalty-v1-coupon-coupons.types.js +0 -41
- package/build/internal/cjs/src/loyalty-v1-coupon-coupons.types.js.map +0 -1
- package/build/internal/cjs/src/loyalty-v1-coupon-coupons.universal.js +0 -372
- package/build/internal/cjs/src/loyalty-v1-coupon-coupons.universal.js.map +0 -1
- package/build/internal/es/index.d.ts +0 -1
- package/build/internal/es/index.js +0 -2
- package/build/internal/es/index.js.map +0 -1
- package/build/internal/es/index.typings.d.ts +0 -1
- package/build/internal/es/index.typings.js +0 -2
- package/build/internal/es/index.typings.js.map +0 -1
- package/build/internal/es/meta.d.ts +0 -1
- package/build/internal/es/meta.js +0 -2
- package/build/internal/es/meta.js.map +0 -1
- package/build/internal/es/src/loyalty-v1-coupon-coupons.context.d.ts +0 -22
- package/build/internal/es/src/loyalty-v1-coupon-coupons.context.js +0 -22
- package/build/internal/es/src/loyalty-v1-coupon-coupons.context.js.map +0 -1
- package/build/internal/es/src/loyalty-v1-coupon-coupons.http.d.ts +0 -43
- package/build/internal/es/src/loyalty-v1-coupon-coupons.http.js +0 -379
- package/build/internal/es/src/loyalty-v1-coupon-coupons.http.js.map +0 -1
- package/build/internal/es/src/loyalty-v1-coupon-coupons.meta.d.ts +0 -23
- package/build/internal/es/src/loyalty-v1-coupon-coupons.meta.js +0 -128
- package/build/internal/es/src/loyalty-v1-coupon-coupons.meta.js.map +0 -1
- package/build/internal/es/src/loyalty-v1-coupon-coupons.public.d.ts +0 -85
- package/build/internal/es/src/loyalty-v1-coupon-coupons.public.js +0 -84
- package/build/internal/es/src/loyalty-v1-coupon-coupons.public.js.map +0 -1
- package/build/internal/es/src/loyalty-v1-coupon-coupons.types.d.ts +0 -612
- package/build/internal/es/src/loyalty-v1-coupon-coupons.types.js +0 -38
- package/build/internal/es/src/loyalty-v1-coupon-coupons.types.js.map +0 -1
- package/build/internal/es/src/loyalty-v1-coupon-coupons.universal.js +0 -339
- package/build/internal/es/src/loyalty-v1-coupon-coupons.universal.js.map +0 -1
package/build/cjs/meta.d.ts
CHANGED
|
@@ -1 +1,478 @@
|
|
|
1
|
-
|
|
1
|
+
import { m as RedeemPointsForCouponRequest$1, a as RedeemPointsForCouponResponse$1, n as RedeemCurrentMemberPointsForCouponRequest$1, b as RedeemCurrentMemberPointsForCouponResponse$1, q as GetLoyaltyCouponRequest$1, r as GetLoyaltyCouponResponse$1, s as BulkGetLoyaltyCouponRequest$1, c as BulkGetLoyaltyCouponResponse$1, y as GetCurrentMemberCouponsRequest$1, G as GetCurrentMemberCouponsResponse$1, Q as QueryLoyaltyCouponRequest$1, D as QueryLoyaltyCouponResponse$1, H as DeleteLoyaltyCouponRequest$1, I as DeleteLoyaltyCouponResponse$1 } from './loyalty-v1-coupon-coupons.universal-YZSAPFpG.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* A loyalty coupon is created when a customer redeems their loyalty points for a reward. Creating a loyalty coupon
|
|
5
|
+
* also creates a corresponding "reference" coupon with the [Coupons API](https://dev.wix.com/api/rest/coupons/about-wix-coupons).
|
|
6
|
+
*/
|
|
7
|
+
interface LoyaltyCoupon {
|
|
8
|
+
/**
|
|
9
|
+
* Loyalty coupon ID.
|
|
10
|
+
* @format GUID
|
|
11
|
+
* @readonly
|
|
12
|
+
*/
|
|
13
|
+
id?: string;
|
|
14
|
+
/**
|
|
15
|
+
* [Loyalty account ID](https://dev.wix.com/docs/rest/crm/loyalty-program/accounts/account-object) of the customer that redeemed points for a coupon.
|
|
16
|
+
* @format GUID
|
|
17
|
+
* @readonly
|
|
18
|
+
*/
|
|
19
|
+
accountId?: string;
|
|
20
|
+
/**
|
|
21
|
+
* [Member ID](https://dev.wix.com/api/rest/members/members/member-object) of the customer that redeemed points for a coupon.
|
|
22
|
+
* @format GUID
|
|
23
|
+
* @readonly
|
|
24
|
+
* @deprecated [Member ID](https://dev.wix.com/api/rest/members/members/member-object) of the customer that redeemed points for a coupon.
|
|
25
|
+
* @replacedBy member_id
|
|
26
|
+
* @targetRemovalDate 2024-06-01
|
|
27
|
+
*/
|
|
28
|
+
memberIdDeprecated?: string;
|
|
29
|
+
/**
|
|
30
|
+
* [Member ID](https://dev.wix.com/docs/rest/crm/members-contacts/members/members/member-object) of the customer that redeemed points for a coupon.
|
|
31
|
+
* @format GUID
|
|
32
|
+
* @readonly
|
|
33
|
+
*/
|
|
34
|
+
memberId?: string | null;
|
|
35
|
+
/**
|
|
36
|
+
* Transaction ID for the transaction that created a coupon.
|
|
37
|
+
* @format GUID
|
|
38
|
+
* @readonly
|
|
39
|
+
*/
|
|
40
|
+
transactionId?: string | null;
|
|
41
|
+
/**
|
|
42
|
+
* Reference coupon information for the corresponding [coupon](https://dev.wix.com/api/rest/coupons/about-wix-coupons)
|
|
43
|
+
* that is created along with the loyalty coupon.
|
|
44
|
+
* @readonly
|
|
45
|
+
*/
|
|
46
|
+
couponReference?: CouponReference;
|
|
47
|
+
/**
|
|
48
|
+
* Loyalty coupon status.
|
|
49
|
+
*
|
|
50
|
+
* This status relates to the corresponding coupon that is created
|
|
51
|
+
* at the same time as the loyalty coupon and is included in `couponReference`.
|
|
52
|
+
* @readonly
|
|
53
|
+
*/
|
|
54
|
+
status?: StatusWithLiterals;
|
|
55
|
+
/**
|
|
56
|
+
* Name of reward that was redeemed to create this coupon.
|
|
57
|
+
* @minLength 1
|
|
58
|
+
* @maxLength 50
|
|
59
|
+
* @readonly
|
|
60
|
+
*/
|
|
61
|
+
rewardName?: string;
|
|
62
|
+
/**
|
|
63
|
+
* Revision number, which increments by 1 each time the loyalty coupon is updated.
|
|
64
|
+
*
|
|
65
|
+
* To prevent conflicting changes, the current `revision` must be passed when updating the loyalty coupon.
|
|
66
|
+
* @immutable
|
|
67
|
+
*/
|
|
68
|
+
revision?: string | null;
|
|
69
|
+
/**
|
|
70
|
+
* Date and time the loyalty coupon was created.
|
|
71
|
+
* @readonly
|
|
72
|
+
*/
|
|
73
|
+
createdDate?: Date | null;
|
|
74
|
+
/**
|
|
75
|
+
* Date and time the loyalty coupon was last updated.
|
|
76
|
+
* @readonly
|
|
77
|
+
*/
|
|
78
|
+
updatedDate?: Date | null;
|
|
79
|
+
}
|
|
80
|
+
interface CouponReference {
|
|
81
|
+
/**
|
|
82
|
+
* Coupon ID.
|
|
83
|
+
* @format GUID
|
|
84
|
+
* @readonly
|
|
85
|
+
*/
|
|
86
|
+
couponId?: string;
|
|
87
|
+
/**
|
|
88
|
+
* Coupon code.
|
|
89
|
+
*
|
|
90
|
+
* Unique code entered by a customer to apply the coupon.
|
|
91
|
+
* @maxLength 20
|
|
92
|
+
* @readonly
|
|
93
|
+
*/
|
|
94
|
+
code?: string;
|
|
95
|
+
/**
|
|
96
|
+
* Name of coupon.
|
|
97
|
+
* @maxLength 80
|
|
98
|
+
* @readonly
|
|
99
|
+
*/
|
|
100
|
+
name?: string | null;
|
|
101
|
+
/**
|
|
102
|
+
* The information to use when creating the coupon.
|
|
103
|
+
* @readonly
|
|
104
|
+
*/
|
|
105
|
+
specification?: Specification;
|
|
106
|
+
/**
|
|
107
|
+
* Whether the referenced coupon was deleted.
|
|
108
|
+
* @readonly
|
|
109
|
+
*/
|
|
110
|
+
deleted?: boolean | null;
|
|
111
|
+
}
|
|
112
|
+
interface Specification extends SpecificationTypeDetailsOneOf, SpecificationScopeOrMinSubtotalOneOf {
|
|
113
|
+
/** Fixed price discount. */
|
|
114
|
+
moneyOffAmount?: number;
|
|
115
|
+
/** Discount as a percentage. */
|
|
116
|
+
percentOffRate?: number;
|
|
117
|
+
/** Free shipping. If true, the coupon applies to all items in all `namespaces` in the site. */
|
|
118
|
+
freeShipping?: boolean;
|
|
119
|
+
/** Specific sale price. Currently only supported for coupons with a `stores` `namespace`. */
|
|
120
|
+
fixedPriceAmount?: number;
|
|
121
|
+
/**
|
|
122
|
+
* Free products when making a purchase. `buyXGetY` is an object that specifies `x` and `y` in the
|
|
123
|
+
* following scenario: if a visitor purchases x number of products, they receive y number of products for free. C
|
|
124
|
+
* urrently only supported for coupons with a `stores` `namespace`.
|
|
125
|
+
*/
|
|
126
|
+
buyXGetY?: BuyXGetY;
|
|
127
|
+
/**
|
|
128
|
+
* Scope of the coupon. When no scope is defined, the coupon applies to all
|
|
129
|
+
* items in all `namespaces` in the site.
|
|
130
|
+
*/
|
|
131
|
+
scope?: Scope;
|
|
132
|
+
/** The coupon is only applicable when the order subtotal is over this amount. */
|
|
133
|
+
minimumSubtotal?: number | null;
|
|
134
|
+
/** Name of coupon. */
|
|
135
|
+
name?: string | null;
|
|
136
|
+
type?: TypeWithLiterals;
|
|
137
|
+
/**
|
|
138
|
+
* Whether the coupon is limited to 1 discount per order. If true and a customer pays for multiple items
|
|
139
|
+
* that the coupon applies to, only the lowest priced item is discounted.
|
|
140
|
+
* Coupons with a `bookings` `namespace` are always limited to 1 item.
|
|
141
|
+
*/
|
|
142
|
+
limitedToOneItem?: boolean | null;
|
|
143
|
+
/** Whether the coupon also applies to subscriptions. */
|
|
144
|
+
appliesToSubscriptions?: boolean | null;
|
|
145
|
+
/**
|
|
146
|
+
* Specifies the amount of cycles to apply the discount to for a subscription item.
|
|
147
|
+
*
|
|
148
|
+
* Can only be set when `appliesToSubscriptions` is `TRUE` and `specification.scope.namespace` is `pricingPlans`.
|
|
149
|
+
* If `discountedCycleCount` is empty, the coupon applies to all available cycles.
|
|
150
|
+
*
|
|
151
|
+
* Min: `1`
|
|
152
|
+
*
|
|
153
|
+
* Max: `999`
|
|
154
|
+
*/
|
|
155
|
+
discountedCycleCount?: number | null;
|
|
156
|
+
}
|
|
157
|
+
/** @oneof */
|
|
158
|
+
interface SpecificationTypeDetailsOneOf {
|
|
159
|
+
/** Fixed price discount. */
|
|
160
|
+
moneyOffAmount?: number;
|
|
161
|
+
/** Discount as a percentage. */
|
|
162
|
+
percentOffRate?: number;
|
|
163
|
+
/** Free shipping. If true, the coupon applies to all items in all `namespaces` in the site. */
|
|
164
|
+
freeShipping?: boolean;
|
|
165
|
+
/** Specific sale price. Currently only supported for coupons with a `stores` `namespace`. */
|
|
166
|
+
fixedPriceAmount?: number;
|
|
167
|
+
/**
|
|
168
|
+
* Free products when making a purchase. `buyXGetY` is an object that specifies `x` and `y` in the
|
|
169
|
+
* following scenario: if a visitor purchases x number of products, they receive y number of products for free. C
|
|
170
|
+
* urrently only supported for coupons with a `stores` `namespace`.
|
|
171
|
+
*/
|
|
172
|
+
buyXGetY?: BuyXGetY;
|
|
173
|
+
}
|
|
174
|
+
/** @oneof */
|
|
175
|
+
interface SpecificationScopeOrMinSubtotalOneOf {
|
|
176
|
+
/**
|
|
177
|
+
* Scope of the coupon. When no scope is defined, the coupon applies to all
|
|
178
|
+
* items in all `namespaces` in the site.
|
|
179
|
+
*/
|
|
180
|
+
scope?: Scope;
|
|
181
|
+
/** The coupon is only applicable when the order subtotal is over this amount. */
|
|
182
|
+
minimumSubtotal?: number | null;
|
|
183
|
+
}
|
|
184
|
+
declare enum Type {
|
|
185
|
+
UNKNOWN = "UNKNOWN",
|
|
186
|
+
MONEY_OFF_AMOUNT = "MONEY_OFF_AMOUNT",
|
|
187
|
+
PERCENT_OFF_RATE = "PERCENT_OFF_RATE",
|
|
188
|
+
FREE_SHIPPING = "FREE_SHIPPING",
|
|
189
|
+
FIXED_PRICE_AMOUNT = "FIXED_PRICE_AMOUNT",
|
|
190
|
+
BUY_X_GET_Y = "BUY_X_GET_Y"
|
|
191
|
+
}
|
|
192
|
+
/** @enumType */
|
|
193
|
+
type TypeWithLiterals = Type | 'UNKNOWN' | 'MONEY_OFF_AMOUNT' | 'PERCENT_OFF_RATE' | 'FREE_SHIPPING' | 'FIXED_PRICE_AMOUNT' | 'BUY_X_GET_Y';
|
|
194
|
+
interface BuyXGetY {
|
|
195
|
+
/** Number of purchased items required to receive free items. */
|
|
196
|
+
x?: number;
|
|
197
|
+
/** Number of items received for free if required number of items were purchased. */
|
|
198
|
+
y?: number;
|
|
199
|
+
}
|
|
200
|
+
interface Scope {
|
|
201
|
+
/**
|
|
202
|
+
* Group within a `namespace` for which the coupon is applicable.
|
|
203
|
+
*
|
|
204
|
+
* If no group is specified, the coupon applies to all items in the namespace.
|
|
205
|
+
* `group` is required in some namespaces. See [Scope Values](https://dev.wix.com/api/rest/coupons/coupons/valid-scope-values)
|
|
206
|
+
* for a list of currently supported groups for each namespace.
|
|
207
|
+
*/
|
|
208
|
+
name?: string | null;
|
|
209
|
+
/**
|
|
210
|
+
* ID of the specific entity in the group for which the coupon is applicable.
|
|
211
|
+
*
|
|
212
|
+
* If no `entityId` is specified, the coupon applies to all entities in the group. In some cases when a group is specified,
|
|
213
|
+
* an `entityId` is required. See [Scope Values](https://dev.wix.com/api/rest/coupons/coupons/valid-scope-values)
|
|
214
|
+
* for a list of currently supported entities for each namespace and group.
|
|
215
|
+
*/
|
|
216
|
+
entityId?: string | null;
|
|
217
|
+
/**
|
|
218
|
+
* Wix application for which the coupon is applicable.
|
|
219
|
+
*
|
|
220
|
+
* One of the following:
|
|
221
|
+
* + `"stores"`
|
|
222
|
+
* + `"bookings"`
|
|
223
|
+
* + `"events"`
|
|
224
|
+
* + `"pricingPlans"`
|
|
225
|
+
*/
|
|
226
|
+
namespace?: string;
|
|
227
|
+
}
|
|
228
|
+
declare enum Status {
|
|
229
|
+
/** Unknown status. */
|
|
230
|
+
UNKNOWN = "UNKNOWN",
|
|
231
|
+
/** The reference coupon was created but the loyalty points have not been redeemed yet. */
|
|
232
|
+
PENDING = "PENDING",
|
|
233
|
+
/** The reference coupon is active and available to the customer. */
|
|
234
|
+
ACTIVE = "ACTIVE",
|
|
235
|
+
/** The reference coupon was applied and is no longer available for use. */
|
|
236
|
+
APPLIED = "APPLIED",
|
|
237
|
+
/** The reference coupon was created but something went wrong when redeeming points from the loyalty account. */
|
|
238
|
+
FAILED = "FAILED",
|
|
239
|
+
/** The reference coupon was deleted. */
|
|
240
|
+
ARCHIVED = "ARCHIVED"
|
|
241
|
+
}
|
|
242
|
+
/** @enumType */
|
|
243
|
+
type StatusWithLiterals = Status | 'UNKNOWN' | 'PENDING' | 'ACTIVE' | 'APPLIED' | 'FAILED' | 'ARCHIVED';
|
|
244
|
+
interface RedeemPointsForCouponRequest {
|
|
245
|
+
/**
|
|
246
|
+
* ID of the [loyalty reward](https://dev.wix.com/docs/rest/crm/loyalty-program/rewards/reward-object) to redeem.
|
|
247
|
+
* @format GUID
|
|
248
|
+
*/
|
|
249
|
+
rewardId: string;
|
|
250
|
+
/**
|
|
251
|
+
* ID of the [loyalty account](https://dev.wix.com/docs/rest/crm/loyalty-program/accounts/account-object) of the customer redeeming points.
|
|
252
|
+
* @format GUID
|
|
253
|
+
*/
|
|
254
|
+
loyaltyAccountId: string;
|
|
255
|
+
}
|
|
256
|
+
interface RedeemPointsForCouponResponse {
|
|
257
|
+
/** Created loyalty coupon. */
|
|
258
|
+
coupon?: LoyaltyCoupon;
|
|
259
|
+
}
|
|
260
|
+
interface RedeemCurrentMemberPointsForCouponRequest {
|
|
261
|
+
/**
|
|
262
|
+
* ID of the [loyalty reward](https://dev.wix.com/docs/rest/crm/loyalty-program/rewards/reward-object) to redeem.
|
|
263
|
+
* @format GUID
|
|
264
|
+
*/
|
|
265
|
+
rewardId: string;
|
|
266
|
+
}
|
|
267
|
+
interface RedeemCurrentMemberPointsForCouponResponse {
|
|
268
|
+
/** Created loyalty coupon. */
|
|
269
|
+
coupon?: LoyaltyCoupon;
|
|
270
|
+
}
|
|
271
|
+
interface GetLoyaltyCouponRequest {
|
|
272
|
+
/**
|
|
273
|
+
* ID of the loyalty coupon to retrieve.
|
|
274
|
+
* @format GUID
|
|
275
|
+
*/
|
|
276
|
+
loyaltyCouponId: string;
|
|
277
|
+
}
|
|
278
|
+
interface GetLoyaltyCouponResponse {
|
|
279
|
+
/** Retrieved loyalty coupon. */
|
|
280
|
+
loyaltyCoupon?: LoyaltyCoupon;
|
|
281
|
+
}
|
|
282
|
+
interface BulkGetLoyaltyCouponRequest {
|
|
283
|
+
/** Query to filter loyalty coupons. */
|
|
284
|
+
query?: CursorQuery;
|
|
285
|
+
}
|
|
286
|
+
interface CursorQuery extends CursorQueryPagingMethodOneOf {
|
|
287
|
+
/**
|
|
288
|
+
* Cursor paging options.
|
|
289
|
+
*
|
|
290
|
+
* Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).
|
|
291
|
+
*/
|
|
292
|
+
cursorPaging?: CursorPaging;
|
|
293
|
+
/**
|
|
294
|
+
* Filter object.
|
|
295
|
+
*
|
|
296
|
+
* Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section).
|
|
297
|
+
*/
|
|
298
|
+
filter?: Record<string, any> | null;
|
|
299
|
+
/**
|
|
300
|
+
* Sort object.
|
|
301
|
+
*
|
|
302
|
+
* Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).
|
|
303
|
+
* @maxSize 5
|
|
304
|
+
*/
|
|
305
|
+
sort?: Sorting[];
|
|
306
|
+
}
|
|
307
|
+
/** @oneof */
|
|
308
|
+
interface CursorQueryPagingMethodOneOf {
|
|
309
|
+
/**
|
|
310
|
+
* Cursor paging options.
|
|
311
|
+
*
|
|
312
|
+
* Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).
|
|
313
|
+
*/
|
|
314
|
+
cursorPaging?: CursorPaging;
|
|
315
|
+
}
|
|
316
|
+
interface Sorting {
|
|
317
|
+
/**
|
|
318
|
+
* Name of the field to sort by.
|
|
319
|
+
* @maxLength 512
|
|
320
|
+
*/
|
|
321
|
+
fieldName?: string;
|
|
322
|
+
/** Sort order. */
|
|
323
|
+
order?: SortOrderWithLiterals;
|
|
324
|
+
}
|
|
325
|
+
declare enum SortOrder {
|
|
326
|
+
ASC = "ASC",
|
|
327
|
+
DESC = "DESC"
|
|
328
|
+
}
|
|
329
|
+
/** @enumType */
|
|
330
|
+
type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';
|
|
331
|
+
interface CursorPaging {
|
|
332
|
+
/**
|
|
333
|
+
* Maximum number of items to return in the results.
|
|
334
|
+
* @max 100
|
|
335
|
+
*/
|
|
336
|
+
limit?: number | null;
|
|
337
|
+
/**
|
|
338
|
+
* Pointer to the next or previous page in the list of results.
|
|
339
|
+
*
|
|
340
|
+
* Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
|
|
341
|
+
* Not relevant for the first request.
|
|
342
|
+
* @maxLength 16000
|
|
343
|
+
*/
|
|
344
|
+
cursor?: string | null;
|
|
345
|
+
}
|
|
346
|
+
interface BulkGetLoyaltyCouponResponse {
|
|
347
|
+
/**
|
|
348
|
+
* Retrieved loyalty coupons.
|
|
349
|
+
* @maxSize 100
|
|
350
|
+
*/
|
|
351
|
+
couponsInSite?: CouponsInSite[];
|
|
352
|
+
}
|
|
353
|
+
interface CouponsInSite {
|
|
354
|
+
/**
|
|
355
|
+
* Metasite id
|
|
356
|
+
* @format GUID
|
|
357
|
+
*/
|
|
358
|
+
metaSiteId?: string;
|
|
359
|
+
/**
|
|
360
|
+
* Retrieved loyalty coupons.
|
|
361
|
+
* @maxSize 100
|
|
362
|
+
*/
|
|
363
|
+
loyaltyCoupons?: LoyaltyCoupon[];
|
|
364
|
+
}
|
|
365
|
+
interface GetCurrentMemberCouponsRequest {
|
|
366
|
+
}
|
|
367
|
+
interface GetCurrentMemberCouponsResponse {
|
|
368
|
+
/** Retrieved loyalty coupons. */
|
|
369
|
+
loyaltyCoupons?: LoyaltyCoupon[];
|
|
370
|
+
}
|
|
371
|
+
interface QueryLoyaltyCouponRequest {
|
|
372
|
+
/** Query options. */
|
|
373
|
+
query: QueryV2;
|
|
374
|
+
}
|
|
375
|
+
interface QueryV2 extends QueryV2PagingMethodOneOf {
|
|
376
|
+
/** Paging options to limit and skip the number of items. */
|
|
377
|
+
paging?: Paging;
|
|
378
|
+
/** 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`. */
|
|
379
|
+
cursorPaging?: CursorPaging;
|
|
380
|
+
/**
|
|
381
|
+
* Filter object.
|
|
382
|
+
*
|
|
383
|
+
* Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section).
|
|
384
|
+
*/
|
|
385
|
+
filter?: Record<string, any> | null;
|
|
386
|
+
/**
|
|
387
|
+
* Sort object.
|
|
388
|
+
*
|
|
389
|
+
* Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).
|
|
390
|
+
*/
|
|
391
|
+
sort?: Sorting[];
|
|
392
|
+
/** Array of projected fields. A list of specific field names to return. If `fieldsets` are also specified, the union of `fieldsets` and `fields` is returned. */
|
|
393
|
+
fields?: string[];
|
|
394
|
+
/** Array of named, predefined sets of projected fields. A array of predefined named sets of fields to be returned. Specifying multiple `fieldsets` will return the union of fields from all sets. If `fields` are also specified, the union of `fieldsets` and `fields` is returned. */
|
|
395
|
+
fieldsets?: string[];
|
|
396
|
+
}
|
|
397
|
+
/** @oneof */
|
|
398
|
+
interface QueryV2PagingMethodOneOf {
|
|
399
|
+
/** Paging options to limit and skip the number of items. */
|
|
400
|
+
paging?: Paging;
|
|
401
|
+
/** 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`. */
|
|
402
|
+
cursorPaging?: CursorPaging;
|
|
403
|
+
}
|
|
404
|
+
interface Paging {
|
|
405
|
+
/** Number of items to load. */
|
|
406
|
+
limit?: number | null;
|
|
407
|
+
/** Number of items to skip in the current sort order. */
|
|
408
|
+
offset?: number | null;
|
|
409
|
+
}
|
|
410
|
+
interface QueryLoyaltyCouponResponse {
|
|
411
|
+
/** Retrieved loyalty coupons. */
|
|
412
|
+
loyaltyCoupons?: LoyaltyCoupon[];
|
|
413
|
+
/** Metadata. */
|
|
414
|
+
metadata?: PagingMetadataV2;
|
|
415
|
+
}
|
|
416
|
+
interface PagingMetadataV2 {
|
|
417
|
+
/** Number of items returned in the response. */
|
|
418
|
+
count?: number | null;
|
|
419
|
+
/** Offset that was requested. */
|
|
420
|
+
offset?: number | null;
|
|
421
|
+
/** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */
|
|
422
|
+
total?: number | null;
|
|
423
|
+
/** Flag that indicates the server failed to calculate the `total` field. */
|
|
424
|
+
tooManyToCount?: boolean | null;
|
|
425
|
+
/** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */
|
|
426
|
+
cursors?: Cursors;
|
|
427
|
+
}
|
|
428
|
+
interface Cursors {
|
|
429
|
+
/**
|
|
430
|
+
* Cursor string pointing to the next page in the list of results.
|
|
431
|
+
* @maxLength 16000
|
|
432
|
+
*/
|
|
433
|
+
next?: string | null;
|
|
434
|
+
/**
|
|
435
|
+
* Cursor pointing to the previous page in the list of results.
|
|
436
|
+
* @maxLength 16000
|
|
437
|
+
*/
|
|
438
|
+
prev?: string | null;
|
|
439
|
+
}
|
|
440
|
+
interface DeleteLoyaltyCouponRequest {
|
|
441
|
+
/**
|
|
442
|
+
* ID of the loyalty coupon to delete.
|
|
443
|
+
* @format GUID
|
|
444
|
+
*/
|
|
445
|
+
id: string;
|
|
446
|
+
/**
|
|
447
|
+
* Revision number, which increments by 1 each time the loyalty coupon is updated.
|
|
448
|
+
*
|
|
449
|
+
* To prevent conflicting changes, the current `revision` must be passed when updating the loyalty coupon.
|
|
450
|
+
*/
|
|
451
|
+
revision?: string;
|
|
452
|
+
}
|
|
453
|
+
interface DeleteLoyaltyCouponResponse {
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
|
|
457
|
+
getUrl: (context: any) => string;
|
|
458
|
+
httpMethod: K;
|
|
459
|
+
path: string;
|
|
460
|
+
pathParams: M;
|
|
461
|
+
__requestType: T;
|
|
462
|
+
__originalRequestType: S;
|
|
463
|
+
__responseType: Q;
|
|
464
|
+
__originalResponseType: R;
|
|
465
|
+
};
|
|
466
|
+
declare function redeemPointsForCoupon(): __PublicMethodMetaInfo<'POST', {}, RedeemPointsForCouponRequest$1, RedeemPointsForCouponRequest, RedeemPointsForCouponResponse$1, RedeemPointsForCouponResponse>;
|
|
467
|
+
declare function redeemCurrentMemberPointsForCoupon(): __PublicMethodMetaInfo<'POST', {}, RedeemCurrentMemberPointsForCouponRequest$1, RedeemCurrentMemberPointsForCouponRequest, RedeemCurrentMemberPointsForCouponResponse$1, RedeemCurrentMemberPointsForCouponResponse>;
|
|
468
|
+
declare function getLoyaltyCoupon(): __PublicMethodMetaInfo<'GET', {
|
|
469
|
+
loyaltyCouponId: string;
|
|
470
|
+
}, GetLoyaltyCouponRequest$1, GetLoyaltyCouponRequest, GetLoyaltyCouponResponse$1, GetLoyaltyCouponResponse>;
|
|
471
|
+
declare function bulkGetLoyaltyCoupon(): __PublicMethodMetaInfo<'GET', {}, BulkGetLoyaltyCouponRequest$1, BulkGetLoyaltyCouponRequest, BulkGetLoyaltyCouponResponse$1, BulkGetLoyaltyCouponResponse>;
|
|
472
|
+
declare function getCurrentMemberCoupons(): __PublicMethodMetaInfo<'GET', {}, GetCurrentMemberCouponsRequest$1, GetCurrentMemberCouponsRequest, GetCurrentMemberCouponsResponse$1, GetCurrentMemberCouponsResponse>;
|
|
473
|
+
declare function queryLoyaltyCoupons(): __PublicMethodMetaInfo<'POST', {}, QueryLoyaltyCouponRequest$1, QueryLoyaltyCouponRequest, QueryLoyaltyCouponResponse$1, QueryLoyaltyCouponResponse>;
|
|
474
|
+
declare function deleteLoyaltyCoupon(): __PublicMethodMetaInfo<'DELETE', {
|
|
475
|
+
id: string;
|
|
476
|
+
}, DeleteLoyaltyCouponRequest$1, DeleteLoyaltyCouponRequest, DeleteLoyaltyCouponResponse$1, DeleteLoyaltyCouponResponse>;
|
|
477
|
+
|
|
478
|
+
export { type __PublicMethodMetaInfo, bulkGetLoyaltyCoupon, deleteLoyaltyCoupon, getCurrentMemberCoupons, getLoyaltyCoupon, queryLoyaltyCoupons, redeemCurrentMemberPointsForCoupon, redeemPointsForCoupon };
|