@wix/referral 1.0.14 → 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.
@@ -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
- * Referring customer ID.
2067
+ * ID of the referring customer who received the reward.
2069
2068
  * @readonly
2070
2069
  */
2071
2070
  rewardedReferringCustomerId?: string;
2072
2071
  /**
2073
- * Referred friend ID.
2072
+ * ID of the referred friend who received the reward.
2074
2073
  * @readonly
2075
2074
  */
2076
2075
  rewardedReferredFriendId?: string;
2077
- /** Coupon reward type options. */
2076
+ /** Details of a coupon reward. Present when `reward_type` is `COUPON`. */
2078
2077
  coupon?: V1Coupon$1;
2079
- /** Loyalty points reward type options. */
2078
+ /** Details of a loyalty points reward. Present when `reward_type` is `LOYALTY_POINTS`. */
2080
2079
  loyaltyPoints?: V1LoyaltyPoints$1;
2081
2080
  /**
2082
- * ReferralReward ID.
2081
+ * Referral reward ID.
2083
2082
  * @readonly
2084
2083
  */
2085
2084
  id?: string | null;
2086
- /** Represents the current state of an item. Each time the item is modified, its `revision` changes. for an update operation to succeed, you MUST pass the latest revision. */
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
- * Represents the time this ReferralReward was created.
2091
+ * Date and time the referral reward was created.
2090
2092
  * @readonly
2091
2093
  */
2092
2094
  createdDate?: Date;
2093
2095
  /**
2094
- * Represents the time this ReferralReward was last updated.
2096
+ * Date and time the referral reward was last updated.
2095
2097
  * @readonly
2096
2098
  */
2097
2099
  updatedDate?: Date;
2098
- /** Reward type. */
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
- * Referring customer ID.
2114
+ * ID of the referring customer who received the reward.
2105
2115
  * @readonly
2106
2116
  */
2107
2117
  rewardedReferringCustomerId?: string;
2108
2118
  /**
2109
- * Referred friend ID.
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
- /** Coupon reward type options. */
2126
+ /** Details of a coupon reward. Present when `reward_type` is `COUPON`. */
2117
2127
  coupon?: V1Coupon$1;
2118
- /** Loyalty points reward type options. */
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 type. */
2132
+ /** Unknown reward. */
2123
2133
  UNKNOWN = "UNKNOWN",
2124
- /** Coupon reward type. */
2134
+ /** A loyalty coupon is given. */
2125
2135
  COUPON = "COUPON",
2126
- /** Loyalty points reward type. */
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
- * Coupon code.
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
- * Coupon status.
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
- * Coupon specification.
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
- /** Unknown coupon status. */
2171
+ /** The coupon status is unknown or not specified. */
2155
2172
  UNKNOWN = "UNKNOWN",
2156
- /** Coupon is active and can be applied. */
2173
+ /** The coupon is active and can be applied to purchases. */
2157
2174
  ACTIVE = "ACTIVE",
2158
- /** Coupon was already applied and can not be used anymore. */
2175
+ /** The coupon has been applied and can't be used again. */
2159
2176
  APPLIED = "APPLIED",
2160
- /** Coupon was deleted. */
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 type */
2181
+ /** Options for fixed amount discount. */
2165
2182
  fixedAmountOptions?: FixedAmountDiscount$1;
2166
- /** Options for percentage discount type */
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
- /** Coupon discount type */
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
- /** Limit the coupon to only apply to one item in cart. */
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
- /** If true, coupon also applies to subscriptions. */
2206
+ /** Whether the coupon applies to subscription products. */
2179
2207
  appliesToSubscriptions?: boolean | null;
2180
- /** Specifies the amount of discounted cycles for subscription item. See Stores Coupons documentation for more info. */
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 type */
2221
+ /** Options for fixed amount discount. */
2186
2222
  fixedAmountOptions?: FixedAmountDiscount$1;
2187
- /** Options for percentage discount type */
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
- /** Fixed amount to discount */
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
- * Loyalty points amount given.
2270
+ * The number of loyalty points awarded.
2229
2271
  * @readonly
2230
2272
  */
2231
2273
  amount?: number;
2232
2274
  }
2233
2275
  interface GetReferralRewardRequest$1 {
2234
- /** Id of the ReferralReward to retrieve. */
2276
+ /** Referral reward ID. */
2235
2277
  id: string;
2236
2278
  }
2237
2279
  interface GetReferralRewardResponse$1 {
2238
- /** The retrieved ReferralReward. */
2280
+ /** Retrieved referral reward. */
2239
2281
  referralReward?: ReferralReward$1;
2240
2282
  }
2241
2283
  interface QueryReferralRewardsRequest$1 {
2242
- /** Query to filter ReferralRewards. */
2284
+ /** Query to filter referral rewards. */
2243
2285
  query: CursorQuery$5;
2244
- /** Filter by contact id or set to "me" for current identity's rewards. */
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
- /** 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`. */
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 in the following format:
2252
- * `"filter" : {
2253
- * "fieldName1": "value1",
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 in the following format:
2261
- * `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
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
- /** 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`. */
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
- /** The retrieved ReferralRewards. */
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 the response. */
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
- * Referring customer ID.
2411
+ * ID of the referring customer who received the reward.
2365
2412
  * @readonly
2366
2413
  */
2367
2414
  rewardedReferringCustomerId?: string;
2368
2415
  /**
2369
- * Referred friend ID.
2416
+ * ID of the referred friend who received the reward.
2370
2417
  * @readonly
2371
2418
  */
2372
2419
  rewardedReferredFriendId?: string;
2373
- /** Coupon reward type options. */
2420
+ /** Details of a coupon reward. Present when `reward_type` is `COUPON`. */
2374
2421
  coupon?: V1Coupon;
2375
- /** Loyalty points reward type options. */
2422
+ /** Details of a loyalty points reward. Present when `reward_type` is `LOYALTY_POINTS`. */
2376
2423
  loyaltyPoints?: V1LoyaltyPoints;
2377
2424
  /**
2378
- * ReferralReward ID.
2425
+ * Referral reward ID.
2379
2426
  * @readonly
2380
2427
  */
2381
2428
  _id?: string | null;
2382
- /** Represents the current state of an item. Each time the item is modified, its `revision` changes. for an update operation to succeed, you MUST pass the latest revision. */
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
- * Represents the time this ReferralReward was created.
2435
+ * Date and time the referral reward was created.
2386
2436
  * @readonly
2387
2437
  */
2388
2438
  _createdDate?: Date;
2389
2439
  /**
2390
- * Represents the time this ReferralReward was last updated.
2440
+ * Date and time the referral reward was last updated.
2391
2441
  * @readonly
2392
2442
  */
2393
2443
  _updatedDate?: Date;
2394
- /** Reward type. */
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
- * Referring customer ID.
2458
+ * ID of the referring customer who received the reward.
2401
2459
  * @readonly
2402
2460
  */
2403
2461
  rewardedReferringCustomerId?: string;
2404
2462
  /**
2405
- * Referred friend ID.
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
- /** Coupon reward type options. */
2470
+ /** Details of a coupon reward. Present when `reward_type` is `COUPON`. */
2413
2471
  coupon?: V1Coupon;
2414
- /** Loyalty points reward type options. */
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 type. */
2476
+ /** Unknown reward. */
2419
2477
  UNKNOWN = "UNKNOWN",
2420
- /** Coupon reward type. */
2478
+ /** A loyalty coupon is given. */
2421
2479
  COUPON = "COUPON",
2422
- /** Loyalty points reward type. */
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
- * Coupon code.
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
- * Coupon status.
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
- * Coupon specification.
2509
+ * Detailed specifications of the coupon.
2445
2510
  * @readonly
2446
2511
  */
2447
2512
  couponSpecification?: Coupon;
2448
2513
  }
2449
2514
  declare enum Status$2 {
2450
- /** Unknown coupon status. */
2515
+ /** The coupon status is unknown or not specified. */
2451
2516
  UNKNOWN = "UNKNOWN",
2452
- /** Coupon is active and can be applied. */
2517
+ /** The coupon is active and can be applied to purchases. */
2453
2518
  ACTIVE = "ACTIVE",
2454
- /** Coupon was already applied and can not be used anymore. */
2519
+ /** The coupon has been applied and can't be used again. */
2455
2520
  APPLIED = "APPLIED",
2456
- /** Coupon was deleted. */
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 type */
2525
+ /** Options for fixed amount discount. */
2461
2526
  fixedAmountOptions?: FixedAmountDiscount;
2462
- /** Options for percentage discount type */
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
- /** Coupon discount type */
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
- /** Limit the coupon to only apply to one item in cart. */
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
- /** If true, coupon also applies to subscriptions. */
2550
+ /** Whether the coupon applies to subscription products. */
2475
2551
  appliesToSubscriptions?: boolean | null;
2476
- /** Specifies the amount of discounted cycles for subscription item. See Stores Coupons documentation for more info. */
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 type */
2565
+ /** Options for fixed amount discount. */
2482
2566
  fixedAmountOptions?: FixedAmountDiscount;
2483
- /** Options for percentage discount type */
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
- /** Fixed amount to discount */
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
- * Loyalty points amount given.
2614
+ * The number of loyalty points awarded.
2525
2615
  * @readonly
2526
2616
  */
2527
2617
  amount?: number;
2528
2618
  }
2529
2619
  interface GetReferralRewardRequest {
2530
- /** Id of the ReferralReward to retrieve. */
2620
+ /** Referral reward ID. */
2531
2621
  _id: string;
2532
2622
  }
2533
2623
  interface GetReferralRewardResponse {
2534
- /** The retrieved ReferralReward. */
2624
+ /** Retrieved referral reward. */
2535
2625
  referralReward?: ReferralReward;
2536
2626
  }
2537
2627
  interface QueryReferralRewardsRequest {
2538
- /** Query to filter ReferralRewards. */
2628
+ /** Query to filter referral rewards. */
2539
2629
  query: CursorQuery$4;
2540
- /** Filter by contact id or set to "me" for current identity's rewards. */
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
- /** 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`. */
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 in the following format:
2548
- * `"filter" : {
2549
- * "fieldName1": "value1",
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 in the following format:
2557
- * `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
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
- /** 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`. */
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
- /** The retrieved ReferralRewards. */
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 the response. */
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;
@@ -2677,34 +2773,35 @@ declare namespace meta$2 {
2677
2773
 
2678
2774
  interface ReferredFriend$1 {
2679
2775
  /**
2680
- * ReferredFriend ID.
2776
+ * ID of the referred friend.
2681
2777
  * @readonly
2682
2778
  */
2683
2779
  id?: string;
2684
2780
  /**
2685
- * ReferredFriend Contact ID.
2781
+ * Contact ID of the referred friend.
2686
2782
  * @readonly
2687
2783
  */
2688
2784
  contactId?: string;
2689
2785
  /**
2690
- * Customer who referred.
2786
+ * ID of the customer who referred this friend.
2691
2787
  * @readonly
2692
2788
  */
2693
2789
  referringCustomerId?: string;
2694
- /** Status of the ReferredFriend. */
2790
+ /** Status of the referred friend. */
2695
2791
  status?: Status$1;
2696
2792
  /**
2697
- * Represents the current state of an item. Each time the item is modified, its `revision` changes by the server. for an update operation to succeed, you MUST pass the latest revision.
2793
+ * Revision number, which increments by 1 each time the referred friend is updated.
2794
+ * To prevent conflicting changes, the current revision must be passed when updating the referred friend.
2698
2795
  * @readonly
2699
2796
  */
2700
2797
  revision?: string | null;
2701
2798
  /**
2702
- * Represents the time this ReferredFriend was created.
2799
+ * Date and time the referred friend was created.
2703
2800
  * @readonly
2704
2801
  */
2705
2802
  createdDate?: Date;
2706
2803
  /**
2707
- * Represents the time this ReferredFriend was last updated.
2804
+ * Date and time the referred friend was last updated.
2708
2805
  * @readonly
2709
2806
  */
2710
2807
  updatedDate?: Date;
@@ -2712,47 +2809,49 @@ interface ReferredFriend$1 {
2712
2809
  declare enum Status$1 {
2713
2810
  /** Unknown status. */
2714
2811
  UNKNOWN = "UNKNOWN",
2715
- /** Initial status, when Referred friend joins site as member. */
2812
+ /** Initial status when the referred friend joins the site as a member. */
2716
2813
  SIGN_UP_COMPLETED = "SIGN_UP_COMPLETED",
2717
- /** After complete some actions (eg. Purchase Order), Action Completed Status is used. */
2814
+ /** Status after the referred friend completes specific actions, such as making a purchase. */
2718
2815
  ACTIONS_COMPLETED = "ACTIONS_COMPLETED"
2719
2816
  }
2720
2817
  interface CreateReferredFriendRequest$1 {
2721
- /** Referral code for referred friend */
2818
+ /** Referral code for the referred friend. */
2722
2819
  referralCode?: string | null;
2723
2820
  }
2724
2821
  interface CreateReferredFriendResponse$1 {
2725
- /** The created ReferredFriend. */
2822
+ /** Created referred friend. */
2726
2823
  referredFriend?: ReferredFriend$1;
2727
2824
  }
2728
2825
  interface GetReferredFriendRequest$1 {
2729
- /** Id of the ReferredFriend to retrieve. */
2826
+ /** ID of the referred friend to retrieve. */
2730
2827
  referredFriendId: string;
2731
2828
  }
2732
2829
  interface GetReferredFriendResponse$1 {
2733
- /** The retrieved ReferredFriend. */
2830
+ /** Retrieved referred friend. */
2734
2831
  referredFriend?: ReferredFriend$1;
2735
2832
  }
2736
2833
  interface GetReferredFriendByContactIdRequest$1 {
2737
- /** Contact id or "me" to get current identity's Contact. */
2834
+ /** Contact ID or "me" to get the current identity's contact. */
2738
2835
  contactId: string;
2739
2836
  }
2740
2837
  interface GetReferredFriendByContactIdResponse$1 {
2741
- /** The retrieved ReferredFriend. */
2838
+ /** Retrieved referred friend. */
2742
2839
  referredFriend?: ReferredFriend$1;
2743
2840
  }
2744
2841
  interface UpdateReferredFriendRequest$1 {
2745
- /** ReferredFriend to be updated, may be partial. */
2842
+ /** Referred friend to be updated. May be partial. */
2746
2843
  referredFriend: ReferredFriend$1;
2747
2844
  }
2748
2845
  interface UpdateReferredFriendResponse$1 {
2749
- /** The updated ReferredFriend. */
2846
+ /** Updated referred friend. */
2750
2847
  referredFriend?: ReferredFriend$1;
2751
2848
  }
2752
2849
  interface DeleteReferredFriendRequest$1 {
2753
- /** Id of the ReferredFriend to delete. */
2754
2850
  referredFriendId: string;
2755
- /** The revision of the ReferredFriend. */
2851
+ /**
2852
+ * Revision number, which increments by 1 each time the referred friend is updated.
2853
+ * To prevent conflicting changes, the current revision must be passed when updating the referred friend.
2854
+ */
2756
2855
  revision?: string;
2757
2856
  }
2758
2857
  interface DeleteReferredFriendResponse$1 {
@@ -2812,9 +2911,9 @@ interface CursorPaging$3 {
2812
2911
  cursor?: string | null;
2813
2912
  }
2814
2913
  interface QueryReferredFriendResponse$1 {
2815
- /** The retrieved ReferredFriends. */
2914
+ /** Retrieved referred friends. */
2816
2915
  referredFriends?: ReferredFriend$1[];
2817
- /** CursorPagingMetadata. */
2916
+ /** Cursor paging metadata. */
2818
2917
  metadata?: CursorPagingMetadata$3;
2819
2918
  }
2820
2919
  interface CursorPagingMetadata$3 {
@@ -2860,34 +2959,35 @@ interface QueryReferredFriendResponseNonNullableFields$1 {
2860
2959
 
2861
2960
  interface ReferredFriend {
2862
2961
  /**
2863
- * ReferredFriend ID.
2962
+ * ID of the referred friend.
2864
2963
  * @readonly
2865
2964
  */
2866
2965
  _id?: string;
2867
2966
  /**
2868
- * ReferredFriend Contact ID.
2967
+ * Contact ID of the referred friend.
2869
2968
  * @readonly
2870
2969
  */
2871
2970
  contactId?: string;
2872
2971
  /**
2873
- * Customer who referred.
2972
+ * ID of the customer who referred this friend.
2874
2973
  * @readonly
2875
2974
  */
2876
2975
  referringCustomerId?: string;
2877
- /** Status of the ReferredFriend. */
2976
+ /** Status of the referred friend. */
2878
2977
  status?: Status;
2879
2978
  /**
2880
- * Represents the current state of an item. Each time the item is modified, its `revision` changes by the server. for an update operation to succeed, you MUST pass the latest revision.
2979
+ * Revision number, which increments by 1 each time the referred friend is updated.
2980
+ * To prevent conflicting changes, the current revision must be passed when updating the referred friend.
2881
2981
  * @readonly
2882
2982
  */
2883
2983
  revision?: string | null;
2884
2984
  /**
2885
- * Represents the time this ReferredFriend was created.
2985
+ * Date and time the referred friend was created.
2886
2986
  * @readonly
2887
2987
  */
2888
2988
  _createdDate?: Date;
2889
2989
  /**
2890
- * Represents the time this ReferredFriend was last updated.
2990
+ * Date and time the referred friend was last updated.
2891
2991
  * @readonly
2892
2992
  */
2893
2993
  _updatedDate?: Date;
@@ -2895,47 +2995,49 @@ interface ReferredFriend {
2895
2995
  declare enum Status {
2896
2996
  /** Unknown status. */
2897
2997
  UNKNOWN = "UNKNOWN",
2898
- /** Initial status, when Referred friend joins site as member. */
2998
+ /** Initial status when the referred friend joins the site as a member. */
2899
2999
  SIGN_UP_COMPLETED = "SIGN_UP_COMPLETED",
2900
- /** After complete some actions (eg. Purchase Order), Action Completed Status is used. */
3000
+ /** Status after the referred friend completes specific actions, such as making a purchase. */
2901
3001
  ACTIONS_COMPLETED = "ACTIONS_COMPLETED"
2902
3002
  }
2903
3003
  interface CreateReferredFriendRequest {
2904
- /** Referral code for referred friend */
3004
+ /** Referral code for the referred friend. */
2905
3005
  referralCode?: string | null;
2906
3006
  }
2907
3007
  interface CreateReferredFriendResponse {
2908
- /** The created ReferredFriend. */
3008
+ /** Created referred friend. */
2909
3009
  referredFriend?: ReferredFriend;
2910
3010
  }
2911
3011
  interface GetReferredFriendRequest {
2912
- /** Id of the ReferredFriend to retrieve. */
3012
+ /** ID of the referred friend to retrieve. */
2913
3013
  referredFriendId: string;
2914
3014
  }
2915
3015
  interface GetReferredFriendResponse {
2916
- /** The retrieved ReferredFriend. */
3016
+ /** Retrieved referred friend. */
2917
3017
  referredFriend?: ReferredFriend;
2918
3018
  }
2919
3019
  interface GetReferredFriendByContactIdRequest {
2920
- /** Contact id or "me" to get current identity's Contact. */
3020
+ /** Contact ID or "me" to get the current identity's contact. */
2921
3021
  contactId: string;
2922
3022
  }
2923
3023
  interface GetReferredFriendByContactIdResponse {
2924
- /** The retrieved ReferredFriend. */
3024
+ /** Retrieved referred friend. */
2925
3025
  referredFriend?: ReferredFriend;
2926
3026
  }
2927
3027
  interface UpdateReferredFriendRequest {
2928
- /** ReferredFriend to be updated, may be partial. */
3028
+ /** Referred friend to be updated. May be partial. */
2929
3029
  referredFriend: ReferredFriend;
2930
3030
  }
2931
3031
  interface UpdateReferredFriendResponse {
2932
- /** The updated ReferredFriend. */
3032
+ /** Updated referred friend. */
2933
3033
  referredFriend?: ReferredFriend;
2934
3034
  }
2935
3035
  interface DeleteReferredFriendRequest {
2936
- /** Id of the ReferredFriend to delete. */
2937
3036
  referredFriendId: string;
2938
- /** The revision of the ReferredFriend. */
3037
+ /**
3038
+ * Revision number, which increments by 1 each time the referred friend is updated.
3039
+ * To prevent conflicting changes, the current revision must be passed when updating the referred friend.
3040
+ */
2939
3041
  revision?: string;
2940
3042
  }
2941
3043
  interface DeleteReferredFriendResponse {
@@ -2995,9 +3097,9 @@ interface CursorPaging$2 {
2995
3097
  cursor?: string | null;
2996
3098
  }
2997
3099
  interface QueryReferredFriendResponse {
2998
- /** The retrieved ReferredFriends. */
3100
+ /** Retrieved referred friends. */
2999
3101
  referredFriends?: ReferredFriend[];
3000
- /** CursorPagingMetadata. */
3102
+ /** Cursor paging metadata. */
3001
3103
  metadata?: CursorPagingMetadata$2;
3002
3104
  }
3003
3105
  interface CursorPagingMetadata$2 {