@wix/referral 1.0.15 → 1.0.16
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/package.json +3 -3
- package/type-bundles/context.bundle.d.ts +144 -89
- package/type-bundles/index.bundle.d.ts +144 -89
- package/type-bundles/meta.bundle.d.ts +212 -116
|
@@ -2062,160 +2062,202 @@ declare namespace meta$3 {
|
|
|
2062
2062
|
export { type __PublicMethodMetaInfo$3 as __PublicMethodMetaInfo, meta$3_getReferralEvent as getReferralEvent, meta$3_getReferralStatistics as getReferralStatistics, meta$3_queryReferralEvent as queryReferralEvent, meta$3_queryReferredFriendActions as queryReferredFriendActions, meta$3_queryReferringCustomerTotals as queryReferringCustomerTotals };
|
|
2063
2063
|
}
|
|
2064
2064
|
|
|
2065
|
-
/** ReferralReward is the main entity of ReferralRewards that can be used for lorem ipsum dolor */
|
|
2066
2065
|
interface ReferralReward$1 extends ReferralRewardReceiverOneOf$1, ReferralRewardRewardTypeOptionsOneOf$1 {
|
|
2067
2066
|
/**
|
|
2068
|
-
*
|
|
2067
|
+
* ID of the referring customer who received the reward.
|
|
2069
2068
|
* @readonly
|
|
2070
2069
|
*/
|
|
2071
2070
|
rewardedReferringCustomerId?: string;
|
|
2072
2071
|
/**
|
|
2073
|
-
*
|
|
2072
|
+
* ID of the referred friend who received the reward.
|
|
2074
2073
|
* @readonly
|
|
2075
2074
|
*/
|
|
2076
2075
|
rewardedReferredFriendId?: string;
|
|
2077
|
-
/**
|
|
2076
|
+
/** Details of a coupon reward. Present when `reward_type` is `COUPON`. */
|
|
2078
2077
|
coupon?: V1Coupon$1;
|
|
2079
|
-
/**
|
|
2078
|
+
/** Details of a loyalty points reward. Present when `reward_type` is `LOYALTY_POINTS`. */
|
|
2080
2079
|
loyaltyPoints?: V1LoyaltyPoints$1;
|
|
2081
2080
|
/**
|
|
2082
|
-
*
|
|
2081
|
+
* Referral reward ID.
|
|
2083
2082
|
* @readonly
|
|
2084
2083
|
*/
|
|
2085
2084
|
id?: string | null;
|
|
2086
|
-
/**
|
|
2085
|
+
/**
|
|
2086
|
+
* Revision number, which increments by 1 each time the referral reward is updated.
|
|
2087
|
+
* To prevent conflicting changes, the current revision must be passed when updating the referral reward.
|
|
2088
|
+
*/
|
|
2087
2089
|
revision?: string | null;
|
|
2088
2090
|
/**
|
|
2089
|
-
*
|
|
2091
|
+
* Date and time the referral reward was created.
|
|
2090
2092
|
* @readonly
|
|
2091
2093
|
*/
|
|
2092
2094
|
createdDate?: Date;
|
|
2093
2095
|
/**
|
|
2094
|
-
*
|
|
2096
|
+
* Date and time the referral reward was last updated.
|
|
2095
2097
|
* @readonly
|
|
2096
2098
|
*/
|
|
2097
2099
|
updatedDate?: Date;
|
|
2098
|
-
/**
|
|
2100
|
+
/**
|
|
2101
|
+
* Type of reward given.
|
|
2102
|
+
*
|
|
2103
|
+
* Possible values:
|
|
2104
|
+
* - `UNKNOWN`: Unknown reward.
|
|
2105
|
+
* - `COUPON`: A loyalty coupon is given.
|
|
2106
|
+
* - `LOYALTY_POINTS`: Loyalty points are awarded.
|
|
2107
|
+
* - `NOTHING`: No reward is given.
|
|
2108
|
+
*/
|
|
2099
2109
|
rewardType?: RewardTypeType$1;
|
|
2100
2110
|
}
|
|
2101
2111
|
/** @oneof */
|
|
2102
2112
|
interface ReferralRewardReceiverOneOf$1 {
|
|
2103
2113
|
/**
|
|
2104
|
-
*
|
|
2114
|
+
* ID of the referring customer who received the reward.
|
|
2105
2115
|
* @readonly
|
|
2106
2116
|
*/
|
|
2107
2117
|
rewardedReferringCustomerId?: string;
|
|
2108
2118
|
/**
|
|
2109
|
-
*
|
|
2119
|
+
* ID of the referred friend who received the reward.
|
|
2110
2120
|
* @readonly
|
|
2111
2121
|
*/
|
|
2112
2122
|
rewardedReferredFriendId?: string;
|
|
2113
2123
|
}
|
|
2114
2124
|
/** @oneof */
|
|
2115
2125
|
interface ReferralRewardRewardTypeOptionsOneOf$1 {
|
|
2116
|
-
/**
|
|
2126
|
+
/** Details of a coupon reward. Present when `reward_type` is `COUPON`. */
|
|
2117
2127
|
coupon?: V1Coupon$1;
|
|
2118
|
-
/**
|
|
2128
|
+
/** Details of a loyalty points reward. Present when `reward_type` is `LOYALTY_POINTS`. */
|
|
2119
2129
|
loyaltyPoints?: V1LoyaltyPoints$1;
|
|
2120
2130
|
}
|
|
2121
2131
|
declare enum RewardTypeType$1 {
|
|
2122
|
-
/** Unknown reward
|
|
2132
|
+
/** Unknown reward. */
|
|
2123
2133
|
UNKNOWN = "UNKNOWN",
|
|
2124
|
-
/**
|
|
2134
|
+
/** A loyalty coupon is given. */
|
|
2125
2135
|
COUPON = "COUPON",
|
|
2126
|
-
/** Loyalty points
|
|
2136
|
+
/** Loyalty points are awarded. */
|
|
2127
2137
|
LOYALTY_POINTS = "LOYALTY_POINTS",
|
|
2128
|
-
/** No reward. */
|
|
2138
|
+
/** No reward is given. */
|
|
2129
2139
|
NOTHING = "NOTHING"
|
|
2130
2140
|
}
|
|
2131
2141
|
interface V1Coupon$1 {
|
|
2132
2142
|
/**
|
|
2133
|
-
* Coupon ID.
|
|
2143
|
+
* Coupon ID. Example: `8934b045-7052-4a90-be2b-832c70afc9da`.
|
|
2134
2144
|
* @readonly
|
|
2135
2145
|
*/
|
|
2136
2146
|
id?: string;
|
|
2137
2147
|
/**
|
|
2138
|
-
*
|
|
2148
|
+
* The code that customers can use to apply the coupon. Example: `6RFD2A3HSPXW`.
|
|
2139
2149
|
* @readonly
|
|
2140
2150
|
*/
|
|
2141
2151
|
code?: string;
|
|
2142
2152
|
/**
|
|
2143
|
-
*
|
|
2153
|
+
* Current status of the coupon.
|
|
2154
|
+
*
|
|
2155
|
+
* Possible values:
|
|
2156
|
+
*
|
|
2157
|
+
* - `UNKNOWN`: Unknown coupon status.
|
|
2158
|
+
* - `ACTIVE`: Coupon is active and can be applied.
|
|
2159
|
+
* - `APPLIED`: Coupon was already applied and can't be used anymore.
|
|
2160
|
+
* - `DELETED`: Coupon was deleted.
|
|
2144
2161
|
* @readonly
|
|
2145
2162
|
*/
|
|
2146
2163
|
status?: Status$3;
|
|
2147
2164
|
/**
|
|
2148
|
-
*
|
|
2165
|
+
* Detailed specifications of the coupon.
|
|
2149
2166
|
* @readonly
|
|
2150
2167
|
*/
|
|
2151
2168
|
couponSpecification?: Coupon$1;
|
|
2152
2169
|
}
|
|
2153
2170
|
declare enum Status$3 {
|
|
2154
|
-
/**
|
|
2171
|
+
/** The coupon status is unknown or not specified. */
|
|
2155
2172
|
UNKNOWN = "UNKNOWN",
|
|
2156
|
-
/**
|
|
2173
|
+
/** The coupon is active and can be applied to purchases. */
|
|
2157
2174
|
ACTIVE = "ACTIVE",
|
|
2158
|
-
/**
|
|
2175
|
+
/** The coupon has been applied and can't be used again. */
|
|
2159
2176
|
APPLIED = "APPLIED",
|
|
2160
|
-
/**
|
|
2177
|
+
/** The coupon has been deleted and is no longer valid. */
|
|
2161
2178
|
DELETED = "DELETED"
|
|
2162
2179
|
}
|
|
2163
2180
|
interface Coupon$1 extends CouponDiscountTypeOptionsOneOf$1, CouponScopeOrMinSubtotalOneOf$1 {
|
|
2164
|
-
/** Options for fixed amount discount
|
|
2181
|
+
/** Options for fixed amount discount. */
|
|
2165
2182
|
fixedAmountOptions?: FixedAmountDiscount$1;
|
|
2166
|
-
/** Options for percentage discount
|
|
2183
|
+
/** Options for percentage discount. */
|
|
2167
2184
|
percentageOptions?: PercentageDiscount$1;
|
|
2168
2185
|
/** Limit the coupon to carts with a subtotal above this number. */
|
|
2169
2186
|
minimumSubtotal?: number;
|
|
2170
|
-
/** Specifies the type of line items this coupon will apply to. */
|
|
2187
|
+
/** Specifies the type of line items this coupon will apply to. See [valid scope values](https://dev.wix.com/api/rest/coupons/coupons/valid-scope-values). */
|
|
2171
2188
|
scope?: CouponScope$1;
|
|
2172
|
-
/** Coupon name */
|
|
2189
|
+
/** Coupon name. */
|
|
2173
2190
|
name?: string;
|
|
2174
|
-
/**
|
|
2191
|
+
/**
|
|
2192
|
+
* Coupon discount type.
|
|
2193
|
+
*
|
|
2194
|
+
* - `UNKNOWN`: Unknown discount type.
|
|
2195
|
+
* - `FIXED_AMOUNT`: Discount as a fixed amount.
|
|
2196
|
+
* - `PERCENTAGE`: Discount as a perctange.
|
|
2197
|
+
* - `FREE_SHIPPING`: Free shipping. If `true`, the coupon applies to all items in all `namespaces`.
|
|
2198
|
+
*/
|
|
2175
2199
|
discountType?: DiscountType$1;
|
|
2176
|
-
/**
|
|
2200
|
+
/**
|
|
2201
|
+
* Whether the coupon is limited to one item.
|
|
2202
|
+
* If `true` and a customer pays for multiple items, the discount applies to only the lowest priced item.
|
|
2203
|
+
* Coupons with a bookings `scope.namespace` are always limited to one item.
|
|
2204
|
+
*/
|
|
2177
2205
|
limitedToOneItem?: boolean | null;
|
|
2178
|
-
/**
|
|
2206
|
+
/** Whether the coupon applies to subscription products. */
|
|
2179
2207
|
appliesToSubscriptions?: boolean | null;
|
|
2180
|
-
/**
|
|
2208
|
+
/**
|
|
2209
|
+
* Specifies the amount of discounted cycles for a subscription item.
|
|
2210
|
+
*
|
|
2211
|
+
* - Can only be set when `scope.namespace = pricingPlans`.
|
|
2212
|
+
* - If `discountedCycleCount` is empty, the coupon applies to all available cycles.
|
|
2213
|
+
* - `discountedCycleCount` is ignored if `appliesToSubscriptions = true`.
|
|
2214
|
+
*
|
|
2215
|
+
* Max: `999`
|
|
2216
|
+
*/
|
|
2181
2217
|
discountedCycleCount?: number | null;
|
|
2182
2218
|
}
|
|
2183
2219
|
/** @oneof */
|
|
2184
2220
|
interface CouponDiscountTypeOptionsOneOf$1 {
|
|
2185
|
-
/** Options for fixed amount discount
|
|
2221
|
+
/** Options for fixed amount discount. */
|
|
2186
2222
|
fixedAmountOptions?: FixedAmountDiscount$1;
|
|
2187
|
-
/** Options for percentage discount
|
|
2223
|
+
/** Options for percentage discount. */
|
|
2188
2224
|
percentageOptions?: PercentageDiscount$1;
|
|
2189
2225
|
}
|
|
2190
2226
|
/** @oneof */
|
|
2191
2227
|
interface CouponScopeOrMinSubtotalOneOf$1 {
|
|
2192
2228
|
/** Limit the coupon to carts with a subtotal above this number. */
|
|
2193
2229
|
minimumSubtotal?: number;
|
|
2194
|
-
/** Specifies the type of line items this coupon will apply to. */
|
|
2230
|
+
/** Specifies the type of line items this coupon will apply to. See [valid scope values](https://dev.wix.com/api/rest/coupons/coupons/valid-scope-values). */
|
|
2195
2231
|
scope?: CouponScope$1;
|
|
2196
2232
|
}
|
|
2197
2233
|
declare enum DiscountType$1 {
|
|
2234
|
+
/** Unknown discount type. */
|
|
2198
2235
|
UNKNOWN = "UNKNOWN",
|
|
2199
|
-
/** Discount as a fixed amount */
|
|
2236
|
+
/** Discount as a fixed amount. */
|
|
2200
2237
|
FIXED_AMOUNT = "FIXED_AMOUNT",
|
|
2201
|
-
/** Discount as a percentage */
|
|
2238
|
+
/** Discount as a percentage. */
|
|
2202
2239
|
PERCENTAGE = "PERCENTAGE",
|
|
2203
|
-
/** Free shipping */
|
|
2240
|
+
/** Free shipping. */
|
|
2204
2241
|
FREE_SHIPPING = "FREE_SHIPPING"
|
|
2205
2242
|
}
|
|
2206
2243
|
interface FixedAmountDiscount$1 {
|
|
2207
|
-
/**
|
|
2244
|
+
/** Amount of discount as a fixed value. */
|
|
2208
2245
|
amount?: number;
|
|
2209
2246
|
}
|
|
2210
2247
|
interface PercentageDiscount$1 {
|
|
2248
|
+
/** Percentage of discount. */
|
|
2211
2249
|
percentage?: number;
|
|
2212
2250
|
}
|
|
2213
2251
|
interface CouponScope$1 {
|
|
2252
|
+
/** Scope namespace (Wix Stores, Wix Bookings, Wix Events, Wix Pricing Plans) */
|
|
2214
2253
|
namespace?: string;
|
|
2254
|
+
/** Coupon scope's applied group, for example: Event or ticket in Wix Events */
|
|
2215
2255
|
group?: Group$1;
|
|
2216
2256
|
}
|
|
2217
2257
|
interface Group$1 {
|
|
2258
|
+
/** Name of the group. */
|
|
2218
2259
|
name?: string;
|
|
2260
|
+
/** Entity ID of the group. */
|
|
2219
2261
|
entityId?: string | null;
|
|
2220
2262
|
}
|
|
2221
2263
|
interface V1LoyaltyPoints$1 {
|
|
@@ -2225,46 +2267,52 @@ interface V1LoyaltyPoints$1 {
|
|
|
2225
2267
|
*/
|
|
2226
2268
|
transactionId?: string;
|
|
2227
2269
|
/**
|
|
2228
|
-
*
|
|
2270
|
+
* The number of loyalty points awarded.
|
|
2229
2271
|
* @readonly
|
|
2230
2272
|
*/
|
|
2231
2273
|
amount?: number;
|
|
2232
2274
|
}
|
|
2233
2275
|
interface GetReferralRewardRequest$1 {
|
|
2234
|
-
/**
|
|
2276
|
+
/** Referral reward ID. */
|
|
2235
2277
|
id: string;
|
|
2236
2278
|
}
|
|
2237
2279
|
interface GetReferralRewardResponse$1 {
|
|
2238
|
-
/**
|
|
2280
|
+
/** Retrieved referral reward. */
|
|
2239
2281
|
referralReward?: ReferralReward$1;
|
|
2240
2282
|
}
|
|
2241
2283
|
interface QueryReferralRewardsRequest$1 {
|
|
2242
|
-
/** Query to filter
|
|
2284
|
+
/** Query to filter referral rewards. */
|
|
2243
2285
|
query: CursorQuery$5;
|
|
2244
|
-
/**
|
|
2286
|
+
/** Contact ID to filter rewards by. Use `"me"` for current identity's rewards. */
|
|
2245
2287
|
contactId?: string | null;
|
|
2246
2288
|
}
|
|
2247
2289
|
interface CursorQuery$5 extends CursorQueryPagingMethodOneOf$5 {
|
|
2248
|
-
/**
|
|
2290
|
+
/**
|
|
2291
|
+
* Cursor paging options.
|
|
2292
|
+
*
|
|
2293
|
+
* Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).
|
|
2294
|
+
*/
|
|
2249
2295
|
cursorPaging?: CursorPaging$5;
|
|
2250
2296
|
/**
|
|
2251
|
-
* Filter object
|
|
2252
|
-
*
|
|
2253
|
-
*
|
|
2254
|
-
* "fieldName2":{"$operator":"value2"}
|
|
2255
|
-
* }`
|
|
2256
|
-
* Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`
|
|
2297
|
+
* Filter object.
|
|
2298
|
+
*
|
|
2299
|
+
* Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section).
|
|
2257
2300
|
*/
|
|
2258
2301
|
filter?: Record<string, any> | null;
|
|
2259
2302
|
/**
|
|
2260
|
-
* Sort object
|
|
2261
|
-
*
|
|
2303
|
+
* Sort object.
|
|
2304
|
+
*
|
|
2305
|
+
* Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).
|
|
2262
2306
|
*/
|
|
2263
2307
|
sort?: Sorting$5[];
|
|
2264
2308
|
}
|
|
2265
2309
|
/** @oneof */
|
|
2266
2310
|
interface CursorQueryPagingMethodOneOf$5 {
|
|
2267
|
-
/**
|
|
2311
|
+
/**
|
|
2312
|
+
* Cursor paging options.
|
|
2313
|
+
*
|
|
2314
|
+
* Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).
|
|
2315
|
+
*/
|
|
2268
2316
|
cursorPaging?: CursorPaging$5;
|
|
2269
2317
|
}
|
|
2270
2318
|
interface Sorting$5 {
|
|
@@ -2289,13 +2337,13 @@ interface CursorPaging$5 {
|
|
|
2289
2337
|
cursor?: string | null;
|
|
2290
2338
|
}
|
|
2291
2339
|
interface QueryReferralRewardsResponse$1 {
|
|
2292
|
-
/**
|
|
2340
|
+
/** Retrieved referral rewards. */
|
|
2293
2341
|
referralRewards?: ReferralReward$1[];
|
|
2294
2342
|
/** Metadata for paging. */
|
|
2295
2343
|
metadata?: CursorPagingMetadata$5;
|
|
2296
2344
|
}
|
|
2297
2345
|
interface CursorPagingMetadata$5 {
|
|
2298
|
-
/** Number of items returned in
|
|
2346
|
+
/** Number of items returned in current page. */
|
|
2299
2347
|
count?: number | null;
|
|
2300
2348
|
/** Cursor strings that point to the next page, previous page, or both. */
|
|
2301
2349
|
cursors?: Cursors$5;
|
|
@@ -2358,160 +2406,202 @@ interface QueryReferralRewardsResponseNonNullableFields$1 {
|
|
|
2358
2406
|
referralRewards: ReferralRewardNonNullableFields$1[];
|
|
2359
2407
|
}
|
|
2360
2408
|
|
|
2361
|
-
/** ReferralReward is the main entity of ReferralRewards that can be used for lorem ipsum dolor */
|
|
2362
2409
|
interface ReferralReward extends ReferralRewardReceiverOneOf, ReferralRewardRewardTypeOptionsOneOf {
|
|
2363
2410
|
/**
|
|
2364
|
-
*
|
|
2411
|
+
* ID of the referring customer who received the reward.
|
|
2365
2412
|
* @readonly
|
|
2366
2413
|
*/
|
|
2367
2414
|
rewardedReferringCustomerId?: string;
|
|
2368
2415
|
/**
|
|
2369
|
-
*
|
|
2416
|
+
* ID of the referred friend who received the reward.
|
|
2370
2417
|
* @readonly
|
|
2371
2418
|
*/
|
|
2372
2419
|
rewardedReferredFriendId?: string;
|
|
2373
|
-
/**
|
|
2420
|
+
/** Details of a coupon reward. Present when `reward_type` is `COUPON`. */
|
|
2374
2421
|
coupon?: V1Coupon;
|
|
2375
|
-
/**
|
|
2422
|
+
/** Details of a loyalty points reward. Present when `reward_type` is `LOYALTY_POINTS`. */
|
|
2376
2423
|
loyaltyPoints?: V1LoyaltyPoints;
|
|
2377
2424
|
/**
|
|
2378
|
-
*
|
|
2425
|
+
* Referral reward ID.
|
|
2379
2426
|
* @readonly
|
|
2380
2427
|
*/
|
|
2381
2428
|
_id?: string | null;
|
|
2382
|
-
/**
|
|
2429
|
+
/**
|
|
2430
|
+
* Revision number, which increments by 1 each time the referral reward is updated.
|
|
2431
|
+
* To prevent conflicting changes, the current revision must be passed when updating the referral reward.
|
|
2432
|
+
*/
|
|
2383
2433
|
revision?: string | null;
|
|
2384
2434
|
/**
|
|
2385
|
-
*
|
|
2435
|
+
* Date and time the referral reward was created.
|
|
2386
2436
|
* @readonly
|
|
2387
2437
|
*/
|
|
2388
2438
|
_createdDate?: Date;
|
|
2389
2439
|
/**
|
|
2390
|
-
*
|
|
2440
|
+
* Date and time the referral reward was last updated.
|
|
2391
2441
|
* @readonly
|
|
2392
2442
|
*/
|
|
2393
2443
|
_updatedDate?: Date;
|
|
2394
|
-
/**
|
|
2444
|
+
/**
|
|
2445
|
+
* Type of reward given.
|
|
2446
|
+
*
|
|
2447
|
+
* Possible values:
|
|
2448
|
+
* - `UNKNOWN`: Unknown reward.
|
|
2449
|
+
* - `COUPON`: A loyalty coupon is given.
|
|
2450
|
+
* - `LOYALTY_POINTS`: Loyalty points are awarded.
|
|
2451
|
+
* - `NOTHING`: No reward is given.
|
|
2452
|
+
*/
|
|
2395
2453
|
rewardType?: RewardTypeType;
|
|
2396
2454
|
}
|
|
2397
2455
|
/** @oneof */
|
|
2398
2456
|
interface ReferralRewardReceiverOneOf {
|
|
2399
2457
|
/**
|
|
2400
|
-
*
|
|
2458
|
+
* ID of the referring customer who received the reward.
|
|
2401
2459
|
* @readonly
|
|
2402
2460
|
*/
|
|
2403
2461
|
rewardedReferringCustomerId?: string;
|
|
2404
2462
|
/**
|
|
2405
|
-
*
|
|
2463
|
+
* ID of the referred friend who received the reward.
|
|
2406
2464
|
* @readonly
|
|
2407
2465
|
*/
|
|
2408
2466
|
rewardedReferredFriendId?: string;
|
|
2409
2467
|
}
|
|
2410
2468
|
/** @oneof */
|
|
2411
2469
|
interface ReferralRewardRewardTypeOptionsOneOf {
|
|
2412
|
-
/**
|
|
2470
|
+
/** Details of a coupon reward. Present when `reward_type` is `COUPON`. */
|
|
2413
2471
|
coupon?: V1Coupon;
|
|
2414
|
-
/**
|
|
2472
|
+
/** Details of a loyalty points reward. Present when `reward_type` is `LOYALTY_POINTS`. */
|
|
2415
2473
|
loyaltyPoints?: V1LoyaltyPoints;
|
|
2416
2474
|
}
|
|
2417
2475
|
declare enum RewardTypeType {
|
|
2418
|
-
/** Unknown reward
|
|
2476
|
+
/** Unknown reward. */
|
|
2419
2477
|
UNKNOWN = "UNKNOWN",
|
|
2420
|
-
/**
|
|
2478
|
+
/** A loyalty coupon is given. */
|
|
2421
2479
|
COUPON = "COUPON",
|
|
2422
|
-
/** Loyalty points
|
|
2480
|
+
/** Loyalty points are awarded. */
|
|
2423
2481
|
LOYALTY_POINTS = "LOYALTY_POINTS",
|
|
2424
|
-
/** No reward. */
|
|
2482
|
+
/** No reward is given. */
|
|
2425
2483
|
NOTHING = "NOTHING"
|
|
2426
2484
|
}
|
|
2427
2485
|
interface V1Coupon {
|
|
2428
2486
|
/**
|
|
2429
|
-
* Coupon ID.
|
|
2487
|
+
* Coupon ID. Example: `8934b045-7052-4a90-be2b-832c70afc9da`.
|
|
2430
2488
|
* @readonly
|
|
2431
2489
|
*/
|
|
2432
2490
|
_id?: string;
|
|
2433
2491
|
/**
|
|
2434
|
-
*
|
|
2492
|
+
* The code that customers can use to apply the coupon. Example: `6RFD2A3HSPXW`.
|
|
2435
2493
|
* @readonly
|
|
2436
2494
|
*/
|
|
2437
2495
|
code?: string;
|
|
2438
2496
|
/**
|
|
2439
|
-
*
|
|
2497
|
+
* Current status of the coupon.
|
|
2498
|
+
*
|
|
2499
|
+
* Possible values:
|
|
2500
|
+
*
|
|
2501
|
+
* - `UNKNOWN`: Unknown coupon status.
|
|
2502
|
+
* - `ACTIVE`: Coupon is active and can be applied.
|
|
2503
|
+
* - `APPLIED`: Coupon was already applied and can't be used anymore.
|
|
2504
|
+
* - `DELETED`: Coupon was deleted.
|
|
2440
2505
|
* @readonly
|
|
2441
2506
|
*/
|
|
2442
2507
|
status?: Status$2;
|
|
2443
2508
|
/**
|
|
2444
|
-
*
|
|
2509
|
+
* Detailed specifications of the coupon.
|
|
2445
2510
|
* @readonly
|
|
2446
2511
|
*/
|
|
2447
2512
|
couponSpecification?: Coupon;
|
|
2448
2513
|
}
|
|
2449
2514
|
declare enum Status$2 {
|
|
2450
|
-
/**
|
|
2515
|
+
/** The coupon status is unknown or not specified. */
|
|
2451
2516
|
UNKNOWN = "UNKNOWN",
|
|
2452
|
-
/**
|
|
2517
|
+
/** The coupon is active and can be applied to purchases. */
|
|
2453
2518
|
ACTIVE = "ACTIVE",
|
|
2454
|
-
/**
|
|
2519
|
+
/** The coupon has been applied and can't be used again. */
|
|
2455
2520
|
APPLIED = "APPLIED",
|
|
2456
|
-
/**
|
|
2521
|
+
/** The coupon has been deleted and is no longer valid. */
|
|
2457
2522
|
DELETED = "DELETED"
|
|
2458
2523
|
}
|
|
2459
2524
|
interface Coupon extends CouponDiscountTypeOptionsOneOf, CouponScopeOrMinSubtotalOneOf {
|
|
2460
|
-
/** Options for fixed amount discount
|
|
2525
|
+
/** Options for fixed amount discount. */
|
|
2461
2526
|
fixedAmountOptions?: FixedAmountDiscount;
|
|
2462
|
-
/** Options for percentage discount
|
|
2527
|
+
/** Options for percentage discount. */
|
|
2463
2528
|
percentageOptions?: PercentageDiscount;
|
|
2464
2529
|
/** Limit the coupon to carts with a subtotal above this number. */
|
|
2465
2530
|
minimumSubtotal?: number;
|
|
2466
|
-
/** Specifies the type of line items this coupon will apply to. */
|
|
2531
|
+
/** Specifies the type of line items this coupon will apply to. See [valid scope values](https://dev.wix.com/api/rest/coupons/coupons/valid-scope-values). */
|
|
2467
2532
|
scope?: CouponScope;
|
|
2468
|
-
/** Coupon name */
|
|
2533
|
+
/** Coupon name. */
|
|
2469
2534
|
name?: string;
|
|
2470
|
-
/**
|
|
2535
|
+
/**
|
|
2536
|
+
* Coupon discount type.
|
|
2537
|
+
*
|
|
2538
|
+
* - `UNKNOWN`: Unknown discount type.
|
|
2539
|
+
* - `FIXED_AMOUNT`: Discount as a fixed amount.
|
|
2540
|
+
* - `PERCENTAGE`: Discount as a perctange.
|
|
2541
|
+
* - `FREE_SHIPPING`: Free shipping. If `true`, the coupon applies to all items in all `namespaces`.
|
|
2542
|
+
*/
|
|
2471
2543
|
discountType?: DiscountType;
|
|
2472
|
-
/**
|
|
2544
|
+
/**
|
|
2545
|
+
* Whether the coupon is limited to one item.
|
|
2546
|
+
* If `true` and a customer pays for multiple items, the discount applies to only the lowest priced item.
|
|
2547
|
+
* Coupons with a bookings `scope.namespace` are always limited to one item.
|
|
2548
|
+
*/
|
|
2473
2549
|
limitedToOneItem?: boolean | null;
|
|
2474
|
-
/**
|
|
2550
|
+
/** Whether the coupon applies to subscription products. */
|
|
2475
2551
|
appliesToSubscriptions?: boolean | null;
|
|
2476
|
-
/**
|
|
2552
|
+
/**
|
|
2553
|
+
* Specifies the amount of discounted cycles for a subscription item.
|
|
2554
|
+
*
|
|
2555
|
+
* - Can only be set when `scope.namespace = pricingPlans`.
|
|
2556
|
+
* - If `discountedCycleCount` is empty, the coupon applies to all available cycles.
|
|
2557
|
+
* - `discountedCycleCount` is ignored if `appliesToSubscriptions = true`.
|
|
2558
|
+
*
|
|
2559
|
+
* Max: `999`
|
|
2560
|
+
*/
|
|
2477
2561
|
discountedCycleCount?: number | null;
|
|
2478
2562
|
}
|
|
2479
2563
|
/** @oneof */
|
|
2480
2564
|
interface CouponDiscountTypeOptionsOneOf {
|
|
2481
|
-
/** Options for fixed amount discount
|
|
2565
|
+
/** Options for fixed amount discount. */
|
|
2482
2566
|
fixedAmountOptions?: FixedAmountDiscount;
|
|
2483
|
-
/** Options for percentage discount
|
|
2567
|
+
/** Options for percentage discount. */
|
|
2484
2568
|
percentageOptions?: PercentageDiscount;
|
|
2485
2569
|
}
|
|
2486
2570
|
/** @oneof */
|
|
2487
2571
|
interface CouponScopeOrMinSubtotalOneOf {
|
|
2488
2572
|
/** Limit the coupon to carts with a subtotal above this number. */
|
|
2489
2573
|
minimumSubtotal?: number;
|
|
2490
|
-
/** Specifies the type of line items this coupon will apply to. */
|
|
2574
|
+
/** Specifies the type of line items this coupon will apply to. See [valid scope values](https://dev.wix.com/api/rest/coupons/coupons/valid-scope-values). */
|
|
2491
2575
|
scope?: CouponScope;
|
|
2492
2576
|
}
|
|
2493
2577
|
declare enum DiscountType {
|
|
2578
|
+
/** Unknown discount type. */
|
|
2494
2579
|
UNKNOWN = "UNKNOWN",
|
|
2495
|
-
/** Discount as a fixed amount */
|
|
2580
|
+
/** Discount as a fixed amount. */
|
|
2496
2581
|
FIXED_AMOUNT = "FIXED_AMOUNT",
|
|
2497
|
-
/** Discount as a percentage */
|
|
2582
|
+
/** Discount as a percentage. */
|
|
2498
2583
|
PERCENTAGE = "PERCENTAGE",
|
|
2499
|
-
/** Free shipping */
|
|
2584
|
+
/** Free shipping. */
|
|
2500
2585
|
FREE_SHIPPING = "FREE_SHIPPING"
|
|
2501
2586
|
}
|
|
2502
2587
|
interface FixedAmountDiscount {
|
|
2503
|
-
/**
|
|
2588
|
+
/** Amount of discount as a fixed value. */
|
|
2504
2589
|
amount?: number;
|
|
2505
2590
|
}
|
|
2506
2591
|
interface PercentageDiscount {
|
|
2592
|
+
/** Percentage of discount. */
|
|
2507
2593
|
percentage?: number;
|
|
2508
2594
|
}
|
|
2509
2595
|
interface CouponScope {
|
|
2596
|
+
/** Scope namespace (Wix Stores, Wix Bookings, Wix Events, Wix Pricing Plans) */
|
|
2510
2597
|
namespace?: string;
|
|
2598
|
+
/** Coupon scope's applied group, for example: Event or ticket in Wix Events */
|
|
2511
2599
|
group?: Group;
|
|
2512
2600
|
}
|
|
2513
2601
|
interface Group {
|
|
2602
|
+
/** Name of the group. */
|
|
2514
2603
|
name?: string;
|
|
2604
|
+
/** Entity ID of the group. */
|
|
2515
2605
|
entityId?: string | null;
|
|
2516
2606
|
}
|
|
2517
2607
|
interface V1LoyaltyPoints {
|
|
@@ -2521,46 +2611,52 @@ interface V1LoyaltyPoints {
|
|
|
2521
2611
|
*/
|
|
2522
2612
|
transactionId?: string;
|
|
2523
2613
|
/**
|
|
2524
|
-
*
|
|
2614
|
+
* The number of loyalty points awarded.
|
|
2525
2615
|
* @readonly
|
|
2526
2616
|
*/
|
|
2527
2617
|
amount?: number;
|
|
2528
2618
|
}
|
|
2529
2619
|
interface GetReferralRewardRequest {
|
|
2530
|
-
/**
|
|
2620
|
+
/** Referral reward ID. */
|
|
2531
2621
|
_id: string;
|
|
2532
2622
|
}
|
|
2533
2623
|
interface GetReferralRewardResponse {
|
|
2534
|
-
/**
|
|
2624
|
+
/** Retrieved referral reward. */
|
|
2535
2625
|
referralReward?: ReferralReward;
|
|
2536
2626
|
}
|
|
2537
2627
|
interface QueryReferralRewardsRequest {
|
|
2538
|
-
/** Query to filter
|
|
2628
|
+
/** Query to filter referral rewards. */
|
|
2539
2629
|
query: CursorQuery$4;
|
|
2540
|
-
/**
|
|
2630
|
+
/** Contact ID to filter rewards by. Use `"me"` for current identity's rewards. */
|
|
2541
2631
|
contactId?: string | null;
|
|
2542
2632
|
}
|
|
2543
2633
|
interface CursorQuery$4 extends CursorQueryPagingMethodOneOf$4 {
|
|
2544
|
-
/**
|
|
2634
|
+
/**
|
|
2635
|
+
* Cursor paging options.
|
|
2636
|
+
*
|
|
2637
|
+
* Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).
|
|
2638
|
+
*/
|
|
2545
2639
|
cursorPaging?: CursorPaging$4;
|
|
2546
2640
|
/**
|
|
2547
|
-
* Filter object
|
|
2548
|
-
*
|
|
2549
|
-
*
|
|
2550
|
-
* "fieldName2":{"$operator":"value2"}
|
|
2551
|
-
* }`
|
|
2552
|
-
* Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`
|
|
2641
|
+
* Filter object.
|
|
2642
|
+
*
|
|
2643
|
+
* Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section).
|
|
2553
2644
|
*/
|
|
2554
2645
|
filter?: Record<string, any> | null;
|
|
2555
2646
|
/**
|
|
2556
|
-
* Sort object
|
|
2557
|
-
*
|
|
2647
|
+
* Sort object.
|
|
2648
|
+
*
|
|
2649
|
+
* Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).
|
|
2558
2650
|
*/
|
|
2559
2651
|
sort?: Sorting$4[];
|
|
2560
2652
|
}
|
|
2561
2653
|
/** @oneof */
|
|
2562
2654
|
interface CursorQueryPagingMethodOneOf$4 {
|
|
2563
|
-
/**
|
|
2655
|
+
/**
|
|
2656
|
+
* Cursor paging options.
|
|
2657
|
+
*
|
|
2658
|
+
* Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).
|
|
2659
|
+
*/
|
|
2564
2660
|
cursorPaging?: CursorPaging$4;
|
|
2565
2661
|
}
|
|
2566
2662
|
interface Sorting$4 {
|
|
@@ -2585,13 +2681,13 @@ interface CursorPaging$4 {
|
|
|
2585
2681
|
cursor?: string | null;
|
|
2586
2682
|
}
|
|
2587
2683
|
interface QueryReferralRewardsResponse {
|
|
2588
|
-
/**
|
|
2684
|
+
/** Retrieved referral rewards. */
|
|
2589
2685
|
referralRewards?: ReferralReward[];
|
|
2590
2686
|
/** Metadata for paging. */
|
|
2591
2687
|
metadata?: CursorPagingMetadata$4;
|
|
2592
2688
|
}
|
|
2593
2689
|
interface CursorPagingMetadata$4 {
|
|
2594
|
-
/** Number of items returned in
|
|
2690
|
+
/** Number of items returned in current page. */
|
|
2595
2691
|
count?: number | null;
|
|
2596
2692
|
/** Cursor strings that point to the next page, previous page, or both. */
|
|
2597
2693
|
cursors?: Cursors$4;
|