@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
|
@@ -1,612 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A loyalty coupon is created when a customer redeems their loyalty points for a reward. Creating a loyalty coupon
|
|
3
|
-
* also creates a corresponding "reference" coupon with the [Coupons API](https://dev.wix.com/api/rest/coupons/about-wix-coupons).
|
|
4
|
-
*/
|
|
5
|
-
export interface LoyaltyCoupon {
|
|
6
|
-
/**
|
|
7
|
-
* Loyalty coupon ID.
|
|
8
|
-
* @format GUID
|
|
9
|
-
* @readonly
|
|
10
|
-
*/
|
|
11
|
-
id?: string;
|
|
12
|
-
/**
|
|
13
|
-
* [Loyalty account ID](https://dev.wix.com/docs/rest/crm/loyalty-program/accounts/account-object) of the customer that redeemed points for a coupon.
|
|
14
|
-
* @format GUID
|
|
15
|
-
* @readonly
|
|
16
|
-
*/
|
|
17
|
-
accountId?: string;
|
|
18
|
-
/**
|
|
19
|
-
* [Member ID](https://dev.wix.com/api/rest/members/members/member-object) of the customer that redeemed points for a coupon.
|
|
20
|
-
* @format GUID
|
|
21
|
-
* @readonly
|
|
22
|
-
* @deprecated [Member ID](https://dev.wix.com/api/rest/members/members/member-object) of the customer that redeemed points for a coupon.
|
|
23
|
-
* @replacedBy member_id
|
|
24
|
-
* @targetRemovalDate 2024-06-01
|
|
25
|
-
*/
|
|
26
|
-
memberIdDeprecated?: string;
|
|
27
|
-
/**
|
|
28
|
-
* [Member ID](https://dev.wix.com/docs/rest/crm/members-contacts/members/members/member-object) of the customer that redeemed points for a coupon.
|
|
29
|
-
* @format GUID
|
|
30
|
-
* @readonly
|
|
31
|
-
*/
|
|
32
|
-
memberId?: string | null;
|
|
33
|
-
/**
|
|
34
|
-
* Transaction ID for the transaction that created a coupon.
|
|
35
|
-
* @format GUID
|
|
36
|
-
* @readonly
|
|
37
|
-
*/
|
|
38
|
-
transactionId?: string | null;
|
|
39
|
-
/**
|
|
40
|
-
* Reference coupon information for the corresponding [coupon](https://dev.wix.com/api/rest/coupons/about-wix-coupons)
|
|
41
|
-
* that is created along with the loyalty coupon.
|
|
42
|
-
* @readonly
|
|
43
|
-
*/
|
|
44
|
-
couponReference?: CouponReference;
|
|
45
|
-
/**
|
|
46
|
-
* Loyalty coupon status.
|
|
47
|
-
*
|
|
48
|
-
* This status relates to the corresponding coupon that is created
|
|
49
|
-
* at the same time as the loyalty coupon and is included in `couponReference`.
|
|
50
|
-
* @readonly
|
|
51
|
-
*/
|
|
52
|
-
status?: StatusWithLiterals;
|
|
53
|
-
/**
|
|
54
|
-
* Name of reward that was redeemed to create this coupon.
|
|
55
|
-
* @minLength 1
|
|
56
|
-
* @maxLength 50
|
|
57
|
-
* @readonly
|
|
58
|
-
*/
|
|
59
|
-
rewardName?: string;
|
|
60
|
-
/**
|
|
61
|
-
* Revision number, which increments by 1 each time the loyalty coupon is updated.
|
|
62
|
-
*
|
|
63
|
-
* To prevent conflicting changes, the current `revision` must be passed when updating the loyalty coupon.
|
|
64
|
-
* @immutable
|
|
65
|
-
*/
|
|
66
|
-
revision?: string | null;
|
|
67
|
-
/**
|
|
68
|
-
* Date and time the loyalty coupon was created.
|
|
69
|
-
* @readonly
|
|
70
|
-
*/
|
|
71
|
-
createdDate?: Date | null;
|
|
72
|
-
/**
|
|
73
|
-
* Date and time the loyalty coupon was last updated.
|
|
74
|
-
* @readonly
|
|
75
|
-
*/
|
|
76
|
-
updatedDate?: Date | null;
|
|
77
|
-
}
|
|
78
|
-
export interface CouponReference {
|
|
79
|
-
/**
|
|
80
|
-
* Coupon ID.
|
|
81
|
-
* @format GUID
|
|
82
|
-
* @readonly
|
|
83
|
-
*/
|
|
84
|
-
couponId?: string;
|
|
85
|
-
/**
|
|
86
|
-
* Coupon code.
|
|
87
|
-
*
|
|
88
|
-
* Unique code entered by a customer to apply the coupon.
|
|
89
|
-
* @maxLength 20
|
|
90
|
-
* @readonly
|
|
91
|
-
*/
|
|
92
|
-
code?: string;
|
|
93
|
-
/**
|
|
94
|
-
* Name of coupon.
|
|
95
|
-
* @maxLength 80
|
|
96
|
-
* @readonly
|
|
97
|
-
*/
|
|
98
|
-
name?: string | null;
|
|
99
|
-
/**
|
|
100
|
-
* The information to use when creating the coupon.
|
|
101
|
-
* @readonly
|
|
102
|
-
*/
|
|
103
|
-
specification?: Specification;
|
|
104
|
-
/**
|
|
105
|
-
* Whether the referenced coupon was deleted.
|
|
106
|
-
* @readonly
|
|
107
|
-
*/
|
|
108
|
-
deleted?: boolean | null;
|
|
109
|
-
}
|
|
110
|
-
export interface Specification extends SpecificationTypeDetailsOneOf, SpecificationScopeOrMinSubtotalOneOf {
|
|
111
|
-
/** Fixed price discount. */
|
|
112
|
-
moneyOffAmount?: number;
|
|
113
|
-
/** Discount as a percentage. */
|
|
114
|
-
percentOffRate?: number;
|
|
115
|
-
/** Free shipping. If true, the coupon applies to all items in all `namespaces` in the site. */
|
|
116
|
-
freeShipping?: boolean;
|
|
117
|
-
/** Specific sale price. Currently only supported for coupons with a `stores` `namespace`. */
|
|
118
|
-
fixedPriceAmount?: number;
|
|
119
|
-
/**
|
|
120
|
-
* Free products when making a purchase. `buyXGetY` is an object that specifies `x` and `y` in the
|
|
121
|
-
* following scenario: if a visitor purchases x number of products, they receive y number of products for free. C
|
|
122
|
-
* urrently only supported for coupons with a `stores` `namespace`.
|
|
123
|
-
*/
|
|
124
|
-
buyXGetY?: BuyXGetY;
|
|
125
|
-
/**
|
|
126
|
-
* Scope of the coupon. When no scope is defined, the coupon applies to all
|
|
127
|
-
* items in all `namespaces` in the site.
|
|
128
|
-
*/
|
|
129
|
-
scope?: Scope;
|
|
130
|
-
/** The coupon is only applicable when the order subtotal is over this amount. */
|
|
131
|
-
minimumSubtotal?: number | null;
|
|
132
|
-
/** Name of coupon. */
|
|
133
|
-
name?: string | null;
|
|
134
|
-
type?: TypeWithLiterals;
|
|
135
|
-
/**
|
|
136
|
-
* Whether the coupon is limited to 1 discount per order. If true and a customer pays for multiple items
|
|
137
|
-
* that the coupon applies to, only the lowest priced item is discounted.
|
|
138
|
-
* Coupons with a `bookings` `namespace` are always limited to 1 item.
|
|
139
|
-
*/
|
|
140
|
-
limitedToOneItem?: boolean | null;
|
|
141
|
-
/** Whether the coupon also applies to subscriptions. */
|
|
142
|
-
appliesToSubscriptions?: boolean | null;
|
|
143
|
-
/**
|
|
144
|
-
* Specifies the amount of cycles to apply the discount to for a subscription item.
|
|
145
|
-
*
|
|
146
|
-
* Can only be set when `appliesToSubscriptions` is `TRUE` and `specification.scope.namespace` is `pricingPlans`.
|
|
147
|
-
* If `discountedCycleCount` is empty, the coupon applies to all available cycles.
|
|
148
|
-
*
|
|
149
|
-
* Min: `1`
|
|
150
|
-
*
|
|
151
|
-
* Max: `999`
|
|
152
|
-
*/
|
|
153
|
-
discountedCycleCount?: number | null;
|
|
154
|
-
}
|
|
155
|
-
/** @oneof */
|
|
156
|
-
export interface SpecificationTypeDetailsOneOf {
|
|
157
|
-
/** Fixed price discount. */
|
|
158
|
-
moneyOffAmount?: number;
|
|
159
|
-
/** Discount as a percentage. */
|
|
160
|
-
percentOffRate?: number;
|
|
161
|
-
/** Free shipping. If true, the coupon applies to all items in all `namespaces` in the site. */
|
|
162
|
-
freeShipping?: boolean;
|
|
163
|
-
/** Specific sale price. Currently only supported for coupons with a `stores` `namespace`. */
|
|
164
|
-
fixedPriceAmount?: number;
|
|
165
|
-
/**
|
|
166
|
-
* Free products when making a purchase. `buyXGetY` is an object that specifies `x` and `y` in the
|
|
167
|
-
* following scenario: if a visitor purchases x number of products, they receive y number of products for free. C
|
|
168
|
-
* urrently only supported for coupons with a `stores` `namespace`.
|
|
169
|
-
*/
|
|
170
|
-
buyXGetY?: BuyXGetY;
|
|
171
|
-
}
|
|
172
|
-
/** @oneof */
|
|
173
|
-
export interface SpecificationScopeOrMinSubtotalOneOf {
|
|
174
|
-
/**
|
|
175
|
-
* Scope of the coupon. When no scope is defined, the coupon applies to all
|
|
176
|
-
* items in all `namespaces` in the site.
|
|
177
|
-
*/
|
|
178
|
-
scope?: Scope;
|
|
179
|
-
/** The coupon is only applicable when the order subtotal is over this amount. */
|
|
180
|
-
minimumSubtotal?: number | null;
|
|
181
|
-
}
|
|
182
|
-
export declare enum Type {
|
|
183
|
-
UNKNOWN = "UNKNOWN",
|
|
184
|
-
MONEY_OFF_AMOUNT = "MONEY_OFF_AMOUNT",
|
|
185
|
-
PERCENT_OFF_RATE = "PERCENT_OFF_RATE",
|
|
186
|
-
FREE_SHIPPING = "FREE_SHIPPING",
|
|
187
|
-
FIXED_PRICE_AMOUNT = "FIXED_PRICE_AMOUNT",
|
|
188
|
-
BUY_X_GET_Y = "BUY_X_GET_Y"
|
|
189
|
-
}
|
|
190
|
-
/** @enumType */
|
|
191
|
-
export type TypeWithLiterals = Type | 'UNKNOWN' | 'MONEY_OFF_AMOUNT' | 'PERCENT_OFF_RATE' | 'FREE_SHIPPING' | 'FIXED_PRICE_AMOUNT' | 'BUY_X_GET_Y';
|
|
192
|
-
export interface BuyXGetY {
|
|
193
|
-
/** Number of purchased items required to receive free items. */
|
|
194
|
-
x?: number;
|
|
195
|
-
/** Number of items received for free if required number of items were purchased. */
|
|
196
|
-
y?: number;
|
|
197
|
-
}
|
|
198
|
-
export interface Scope {
|
|
199
|
-
/**
|
|
200
|
-
* Group within a `namespace` for which the coupon is applicable.
|
|
201
|
-
*
|
|
202
|
-
* If no group is specified, the coupon applies to all items in the namespace.
|
|
203
|
-
* `group` is required in some namespaces. See [Scope Values](https://dev.wix.com/api/rest/coupons/coupons/valid-scope-values)
|
|
204
|
-
* for a list of currently supported groups for each namespace.
|
|
205
|
-
*/
|
|
206
|
-
name?: string | null;
|
|
207
|
-
/**
|
|
208
|
-
* ID of the specific entity in the group for which the coupon is applicable.
|
|
209
|
-
*
|
|
210
|
-
* If no `entityId` is specified, the coupon applies to all entities in the group. In some cases when a group is specified,
|
|
211
|
-
* an `entityId` is required. See [Scope Values](https://dev.wix.com/api/rest/coupons/coupons/valid-scope-values)
|
|
212
|
-
* for a list of currently supported entities for each namespace and group.
|
|
213
|
-
*/
|
|
214
|
-
entityId?: string | null;
|
|
215
|
-
/**
|
|
216
|
-
* Wix application for which the coupon is applicable.
|
|
217
|
-
*
|
|
218
|
-
* One of the following:
|
|
219
|
-
* + `"stores"`
|
|
220
|
-
* + `"bookings"`
|
|
221
|
-
* + `"events"`
|
|
222
|
-
* + `"pricingPlans"`
|
|
223
|
-
*/
|
|
224
|
-
namespace?: string;
|
|
225
|
-
}
|
|
226
|
-
export declare enum Status {
|
|
227
|
-
/** Unknown status. */
|
|
228
|
-
UNKNOWN = "UNKNOWN",
|
|
229
|
-
/** The reference coupon was created but the loyalty points have not been redeemed yet. */
|
|
230
|
-
PENDING = "PENDING",
|
|
231
|
-
/** The reference coupon is active and available to the customer. */
|
|
232
|
-
ACTIVE = "ACTIVE",
|
|
233
|
-
/** The reference coupon was applied and is no longer available for use. */
|
|
234
|
-
APPLIED = "APPLIED",
|
|
235
|
-
/** The reference coupon was created but something went wrong when redeeming points from the loyalty account. */
|
|
236
|
-
FAILED = "FAILED",
|
|
237
|
-
/** The reference coupon was deleted. */
|
|
238
|
-
ARCHIVED = "ARCHIVED"
|
|
239
|
-
}
|
|
240
|
-
/** @enumType */
|
|
241
|
-
export type StatusWithLiterals = Status | 'UNKNOWN' | 'PENDING' | 'ACTIVE' | 'APPLIED' | 'FAILED' | 'ARCHIVED';
|
|
242
|
-
export interface RedeemPointsForCouponRequest {
|
|
243
|
-
/**
|
|
244
|
-
* ID of the [loyalty reward](https://dev.wix.com/docs/rest/crm/loyalty-program/rewards/reward-object) to redeem.
|
|
245
|
-
* @format GUID
|
|
246
|
-
*/
|
|
247
|
-
rewardId: string;
|
|
248
|
-
/**
|
|
249
|
-
* ID of the [loyalty account](https://dev.wix.com/docs/rest/crm/loyalty-program/accounts/account-object) of the customer redeeming points.
|
|
250
|
-
* @format GUID
|
|
251
|
-
*/
|
|
252
|
-
loyaltyAccountId: string;
|
|
253
|
-
}
|
|
254
|
-
export interface RedeemPointsForCouponResponse {
|
|
255
|
-
/** Created loyalty coupon. */
|
|
256
|
-
coupon?: LoyaltyCoupon;
|
|
257
|
-
}
|
|
258
|
-
export interface RedeemCurrentMemberPointsForCouponRequest {
|
|
259
|
-
/**
|
|
260
|
-
* ID of the [loyalty reward](https://dev.wix.com/docs/rest/crm/loyalty-program/rewards/reward-object) to redeem.
|
|
261
|
-
* @format GUID
|
|
262
|
-
*/
|
|
263
|
-
rewardId: string;
|
|
264
|
-
}
|
|
265
|
-
export interface RedeemCurrentMemberPointsForCouponResponse {
|
|
266
|
-
/** Created loyalty coupon. */
|
|
267
|
-
coupon?: LoyaltyCoupon;
|
|
268
|
-
}
|
|
269
|
-
export interface RedeemMemberPointsForDiscountAmountCouponRequest {
|
|
270
|
-
/**
|
|
271
|
-
* ID of the [loyalty reward](https://dev.wix.com/api/rest/wix-loyalty-program/rewards) to redeem.
|
|
272
|
-
* @format GUID
|
|
273
|
-
*/
|
|
274
|
-
rewardId?: string;
|
|
275
|
-
/**
|
|
276
|
-
* Loyalty account id.
|
|
277
|
-
* @format GUID
|
|
278
|
-
*/
|
|
279
|
-
loyaltyAccountId?: string;
|
|
280
|
-
/** Number of points to redeem. */
|
|
281
|
-
pointsToRedeem?: number;
|
|
282
|
-
/** Coupon specification. */
|
|
283
|
-
specification?: Specification;
|
|
284
|
-
}
|
|
285
|
-
export interface RedeemMemberPointsForDiscountAmountCouponResponse {
|
|
286
|
-
/** Created loyalty coupon. */
|
|
287
|
-
coupon?: LoyaltyCoupon;
|
|
288
|
-
/** Transaction id of the coupon redemption */
|
|
289
|
-
transactionId?: string;
|
|
290
|
-
}
|
|
291
|
-
export interface GetLoyaltyCouponRequest {
|
|
292
|
-
/**
|
|
293
|
-
* ID of the loyalty coupon to retrieve.
|
|
294
|
-
* @format GUID
|
|
295
|
-
*/
|
|
296
|
-
loyaltyCouponId: string;
|
|
297
|
-
}
|
|
298
|
-
export interface GetLoyaltyCouponResponse {
|
|
299
|
-
/** Retrieved loyalty coupon. */
|
|
300
|
-
loyaltyCoupon?: LoyaltyCoupon;
|
|
301
|
-
}
|
|
302
|
-
export interface BulkGetLoyaltyCouponRequest {
|
|
303
|
-
/** Query to filter loyalty coupons. */
|
|
304
|
-
query?: CursorQuery;
|
|
305
|
-
}
|
|
306
|
-
export interface CursorQuery extends CursorQueryPagingMethodOneOf {
|
|
307
|
-
/**
|
|
308
|
-
* Cursor paging options.
|
|
309
|
-
*
|
|
310
|
-
* Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).
|
|
311
|
-
*/
|
|
312
|
-
cursorPaging?: CursorPaging;
|
|
313
|
-
/**
|
|
314
|
-
* Filter object.
|
|
315
|
-
*
|
|
316
|
-
* Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section).
|
|
317
|
-
*/
|
|
318
|
-
filter?: Record<string, any> | null;
|
|
319
|
-
/**
|
|
320
|
-
* Sort object.
|
|
321
|
-
*
|
|
322
|
-
* Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).
|
|
323
|
-
* @maxSize 5
|
|
324
|
-
*/
|
|
325
|
-
sort?: Sorting[];
|
|
326
|
-
}
|
|
327
|
-
/** @oneof */
|
|
328
|
-
export interface CursorQueryPagingMethodOneOf {
|
|
329
|
-
/**
|
|
330
|
-
* Cursor paging options.
|
|
331
|
-
*
|
|
332
|
-
* Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).
|
|
333
|
-
*/
|
|
334
|
-
cursorPaging?: CursorPaging;
|
|
335
|
-
}
|
|
336
|
-
export interface Sorting {
|
|
337
|
-
/**
|
|
338
|
-
* Name of the field to sort by.
|
|
339
|
-
* @maxLength 512
|
|
340
|
-
*/
|
|
341
|
-
fieldName?: string;
|
|
342
|
-
/** Sort order. */
|
|
343
|
-
order?: SortOrderWithLiterals;
|
|
344
|
-
}
|
|
345
|
-
export declare enum SortOrder {
|
|
346
|
-
ASC = "ASC",
|
|
347
|
-
DESC = "DESC"
|
|
348
|
-
}
|
|
349
|
-
/** @enumType */
|
|
350
|
-
export type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';
|
|
351
|
-
export interface CursorPaging {
|
|
352
|
-
/**
|
|
353
|
-
* Maximum number of items to return in the results.
|
|
354
|
-
* @max 100
|
|
355
|
-
*/
|
|
356
|
-
limit?: number | null;
|
|
357
|
-
/**
|
|
358
|
-
* Pointer to the next or previous page in the list of results.
|
|
359
|
-
*
|
|
360
|
-
* Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
|
|
361
|
-
* Not relevant for the first request.
|
|
362
|
-
* @maxLength 16000
|
|
363
|
-
*/
|
|
364
|
-
cursor?: string | null;
|
|
365
|
-
}
|
|
366
|
-
export interface BulkGetLoyaltyCouponResponse {
|
|
367
|
-
/**
|
|
368
|
-
* Retrieved loyalty coupons.
|
|
369
|
-
* @maxSize 100
|
|
370
|
-
*/
|
|
371
|
-
couponsInSite?: CouponsInSite[];
|
|
372
|
-
}
|
|
373
|
-
export interface CouponsInSite {
|
|
374
|
-
/**
|
|
375
|
-
* Metasite id
|
|
376
|
-
* @format GUID
|
|
377
|
-
*/
|
|
378
|
-
metaSiteId?: string;
|
|
379
|
-
/**
|
|
380
|
-
* Retrieved loyalty coupons.
|
|
381
|
-
* @maxSize 100
|
|
382
|
-
*/
|
|
383
|
-
loyaltyCoupons?: LoyaltyCoupon[];
|
|
384
|
-
}
|
|
385
|
-
export interface GetCurrentMemberCouponsRequest {
|
|
386
|
-
}
|
|
387
|
-
export interface GetCurrentMemberCouponsResponse {
|
|
388
|
-
/** Retrieved loyalty coupons. */
|
|
389
|
-
loyaltyCoupons?: LoyaltyCoupon[];
|
|
390
|
-
}
|
|
391
|
-
export interface QueryLoyaltyCouponRequest {
|
|
392
|
-
/** Query options. */
|
|
393
|
-
query: QueryV2;
|
|
394
|
-
}
|
|
395
|
-
export interface QueryV2 extends QueryV2PagingMethodOneOf {
|
|
396
|
-
/** Paging options to limit and skip the number of items. */
|
|
397
|
-
paging?: Paging;
|
|
398
|
-
/** 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`. */
|
|
399
|
-
cursorPaging?: CursorPaging;
|
|
400
|
-
/**
|
|
401
|
-
* Filter object.
|
|
402
|
-
*
|
|
403
|
-
* Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section).
|
|
404
|
-
*/
|
|
405
|
-
filter?: Record<string, any> | null;
|
|
406
|
-
/**
|
|
407
|
-
* Sort object.
|
|
408
|
-
*
|
|
409
|
-
* Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).
|
|
410
|
-
*/
|
|
411
|
-
sort?: Sorting[];
|
|
412
|
-
/** 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. */
|
|
413
|
-
fields?: string[];
|
|
414
|
-
/** 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. */
|
|
415
|
-
fieldsets?: string[];
|
|
416
|
-
}
|
|
417
|
-
/** @oneof */
|
|
418
|
-
export interface QueryV2PagingMethodOneOf {
|
|
419
|
-
/** Paging options to limit and skip the number of items. */
|
|
420
|
-
paging?: Paging;
|
|
421
|
-
/** 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`. */
|
|
422
|
-
cursorPaging?: CursorPaging;
|
|
423
|
-
}
|
|
424
|
-
export interface Paging {
|
|
425
|
-
/** Number of items to load. */
|
|
426
|
-
limit?: number | null;
|
|
427
|
-
/** Number of items to skip in the current sort order. */
|
|
428
|
-
offset?: number | null;
|
|
429
|
-
}
|
|
430
|
-
export interface QueryLoyaltyCouponResponse {
|
|
431
|
-
/** Retrieved loyalty coupons. */
|
|
432
|
-
loyaltyCoupons?: LoyaltyCoupon[];
|
|
433
|
-
/** Metadata. */
|
|
434
|
-
metadata?: PagingMetadataV2;
|
|
435
|
-
}
|
|
436
|
-
export interface PagingMetadataV2 {
|
|
437
|
-
/** Number of items returned in the response. */
|
|
438
|
-
count?: number | null;
|
|
439
|
-
/** Offset that was requested. */
|
|
440
|
-
offset?: number | null;
|
|
441
|
-
/** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */
|
|
442
|
-
total?: number | null;
|
|
443
|
-
/** Flag that indicates the server failed to calculate the `total` field. */
|
|
444
|
-
tooManyToCount?: boolean | null;
|
|
445
|
-
/** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */
|
|
446
|
-
cursors?: Cursors;
|
|
447
|
-
}
|
|
448
|
-
export interface Cursors {
|
|
449
|
-
/**
|
|
450
|
-
* Cursor string pointing to the next page in the list of results.
|
|
451
|
-
* @maxLength 16000
|
|
452
|
-
*/
|
|
453
|
-
next?: string | null;
|
|
454
|
-
/**
|
|
455
|
-
* Cursor pointing to the previous page in the list of results.
|
|
456
|
-
* @maxLength 16000
|
|
457
|
-
*/
|
|
458
|
-
prev?: string | null;
|
|
459
|
-
}
|
|
460
|
-
export interface DeleteLoyaltyCouponRequest {
|
|
461
|
-
/**
|
|
462
|
-
* ID of the loyalty coupon to delete.
|
|
463
|
-
* @format GUID
|
|
464
|
-
*/
|
|
465
|
-
id: string;
|
|
466
|
-
/**
|
|
467
|
-
* Revision number, which increments by 1 each time the loyalty coupon is updated.
|
|
468
|
-
*
|
|
469
|
-
* To prevent conflicting changes, the current `revision` must be passed when updating the loyalty coupon.
|
|
470
|
-
*/
|
|
471
|
-
revision?: string;
|
|
472
|
-
}
|
|
473
|
-
export interface DeleteLoyaltyCouponResponse {
|
|
474
|
-
}
|
|
475
|
-
export interface DomainEvent extends DomainEventBodyOneOf {
|
|
476
|
-
createdEvent?: EntityCreatedEvent;
|
|
477
|
-
updatedEvent?: EntityUpdatedEvent;
|
|
478
|
-
deletedEvent?: EntityDeletedEvent;
|
|
479
|
-
actionEvent?: ActionEvent;
|
|
480
|
-
/** Event ID. With this ID you can easily spot duplicated events and ignore them. */
|
|
481
|
-
id?: string;
|
|
482
|
-
/**
|
|
483
|
-
* Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.
|
|
484
|
-
* For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
|
|
485
|
-
*/
|
|
486
|
-
entityFqdn?: string;
|
|
487
|
-
/**
|
|
488
|
-
* Event action name, placed at the top level to make it easier for users to dispatch messages.
|
|
489
|
-
* For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
|
|
490
|
-
*/
|
|
491
|
-
slug?: string;
|
|
492
|
-
/** ID of the entity associated with the event. */
|
|
493
|
-
entityId?: string;
|
|
494
|
-
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */
|
|
495
|
-
eventTime?: Date | null;
|
|
496
|
-
/**
|
|
497
|
-
* Whether the event was triggered as a result of a privacy regulation application
|
|
498
|
-
* (for example, GDPR).
|
|
499
|
-
*/
|
|
500
|
-
triggeredByAnonymizeRequest?: boolean | null;
|
|
501
|
-
/** If present, indicates the action that triggered the event. */
|
|
502
|
-
originatedFrom?: string | null;
|
|
503
|
-
/**
|
|
504
|
-
* 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.
|
|
505
|
-
* 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.
|
|
506
|
-
*/
|
|
507
|
-
entityEventSequence?: string | null;
|
|
508
|
-
}
|
|
509
|
-
/** @oneof */
|
|
510
|
-
export interface DomainEventBodyOneOf {
|
|
511
|
-
createdEvent?: EntityCreatedEvent;
|
|
512
|
-
updatedEvent?: EntityUpdatedEvent;
|
|
513
|
-
deletedEvent?: EntityDeletedEvent;
|
|
514
|
-
actionEvent?: ActionEvent;
|
|
515
|
-
}
|
|
516
|
-
export interface EntityCreatedEvent {
|
|
517
|
-
entityAsJson?: string;
|
|
518
|
-
/** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */
|
|
519
|
-
restoreInfo?: RestoreInfo;
|
|
520
|
-
}
|
|
521
|
-
export interface RestoreInfo {
|
|
522
|
-
deletedDate?: Date | null;
|
|
523
|
-
}
|
|
524
|
-
export interface EntityUpdatedEvent {
|
|
525
|
-
/**
|
|
526
|
-
* Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
|
|
527
|
-
* This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
|
|
528
|
-
* We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
|
|
529
|
-
*/
|
|
530
|
-
currentEntityAsJson?: string;
|
|
531
|
-
}
|
|
532
|
-
export interface EntityDeletedEvent {
|
|
533
|
-
/** Entity that was deleted. */
|
|
534
|
-
deletedEntityAsJson?: string | null;
|
|
535
|
-
}
|
|
536
|
-
export interface ActionEvent {
|
|
537
|
-
bodyAsJson?: string;
|
|
538
|
-
}
|
|
539
|
-
export interface Empty {
|
|
540
|
-
}
|
|
541
|
-
export interface MessageEnvelope {
|
|
542
|
-
/**
|
|
543
|
-
* App instance ID.
|
|
544
|
-
* @format GUID
|
|
545
|
-
*/
|
|
546
|
-
instanceId?: string | null;
|
|
547
|
-
/**
|
|
548
|
-
* Event type.
|
|
549
|
-
* @maxLength 150
|
|
550
|
-
*/
|
|
551
|
-
eventType?: string;
|
|
552
|
-
/** The identification type and identity data. */
|
|
553
|
-
identity?: IdentificationData;
|
|
554
|
-
/** Stringify payload. */
|
|
555
|
-
data?: string;
|
|
556
|
-
}
|
|
557
|
-
export interface IdentificationData extends IdentificationDataIdOneOf {
|
|
558
|
-
/**
|
|
559
|
-
* ID of a site visitor that has not logged in to the site.
|
|
560
|
-
* @format GUID
|
|
561
|
-
*/
|
|
562
|
-
anonymousVisitorId?: string;
|
|
563
|
-
/**
|
|
564
|
-
* ID of a site visitor that has logged in to the site.
|
|
565
|
-
* @format GUID
|
|
566
|
-
*/
|
|
567
|
-
memberId?: string;
|
|
568
|
-
/**
|
|
569
|
-
* ID of a Wix user (site owner, contributor, etc.).
|
|
570
|
-
* @format GUID
|
|
571
|
-
*/
|
|
572
|
-
wixUserId?: string;
|
|
573
|
-
/**
|
|
574
|
-
* ID of an app.
|
|
575
|
-
* @format GUID
|
|
576
|
-
*/
|
|
577
|
-
appId?: string;
|
|
578
|
-
/** @readonly */
|
|
579
|
-
identityType?: WebhookIdentityTypeWithLiterals;
|
|
580
|
-
}
|
|
581
|
-
/** @oneof */
|
|
582
|
-
export interface IdentificationDataIdOneOf {
|
|
583
|
-
/**
|
|
584
|
-
* ID of a site visitor that has not logged in to the site.
|
|
585
|
-
* @format GUID
|
|
586
|
-
*/
|
|
587
|
-
anonymousVisitorId?: string;
|
|
588
|
-
/**
|
|
589
|
-
* ID of a site visitor that has logged in to the site.
|
|
590
|
-
* @format GUID
|
|
591
|
-
*/
|
|
592
|
-
memberId?: string;
|
|
593
|
-
/**
|
|
594
|
-
* ID of a Wix user (site owner, contributor, etc.).
|
|
595
|
-
* @format GUID
|
|
596
|
-
*/
|
|
597
|
-
wixUserId?: string;
|
|
598
|
-
/**
|
|
599
|
-
* ID of an app.
|
|
600
|
-
* @format GUID
|
|
601
|
-
*/
|
|
602
|
-
appId?: string;
|
|
603
|
-
}
|
|
604
|
-
export declare enum WebhookIdentityType {
|
|
605
|
-
UNKNOWN = "UNKNOWN",
|
|
606
|
-
ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
|
|
607
|
-
MEMBER = "MEMBER",
|
|
608
|
-
WIX_USER = "WIX_USER",
|
|
609
|
-
APP = "APP"
|
|
610
|
-
}
|
|
611
|
-
/** @enumType */
|
|
612
|
-
export type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
|
|
@@ -1,38 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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;AAgDD,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;AA+HD,MAAM,CAAN,IAAY,SAGX;AAHD,WAAY,SAAS;IACnB,wBAAW,CAAA;IACX,0BAAa,CAAA;AACf,CAAC,EAHW,SAAS,KAAT,SAAS,QAGpB;AAwRD,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"}
|