@wix/auto_sdk_ecom_discount-rules 1.0.4 → 1.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (134) hide show
  1. package/build/{cjs/src/ecom-discounts-v1-discount-rule-discount-rules.universal.d.ts → ecom-discounts-v1-discount-rule-discount-rules.universal--1DNaPHt.d.mts} +78 -341
  2. package/build/{es/src/ecom-discounts-v1-discount-rule-discount-rules.universal.d.ts → ecom-discounts-v1-discount-rule-discount-rules.universal--1DNaPHt.d.ts} +78 -341
  3. package/build/index.d.mts +96 -0
  4. package/build/index.d.ts +96 -0
  5. package/build/index.js +606 -0
  6. package/build/index.js.map +1 -0
  7. package/build/index.mjs +567 -0
  8. package/build/index.mjs.map +1 -0
  9. package/build/internal/{cjs/src/ecom-discounts-v1-discount-rule-discount-rules.universal.d.ts → ecom-discounts-v1-discount-rule-discount-rules.universal--1DNaPHt.d.mts} +78 -360
  10. package/build/internal/{es/src/ecom-discounts-v1-discount-rule-discount-rules.universal.d.ts → ecom-discounts-v1-discount-rule-discount-rules.universal--1DNaPHt.d.ts} +78 -360
  11. package/build/internal/index.d.mts +96 -0
  12. package/build/internal/index.d.ts +96 -0
  13. package/build/internal/index.js +606 -0
  14. package/build/internal/index.js.map +1 -0
  15. package/build/internal/index.mjs +567 -0
  16. package/build/internal/index.mjs.map +1 -0
  17. package/build/internal/meta.d.mts +472 -0
  18. package/build/internal/meta.d.ts +472 -0
  19. package/build/internal/meta.js +352 -0
  20. package/build/internal/meta.js.map +1 -0
  21. package/build/internal/meta.mjs +321 -0
  22. package/build/internal/meta.mjs.map +1 -0
  23. package/build/meta.d.mts +472 -0
  24. package/build/meta.d.ts +472 -0
  25. package/build/meta.js +352 -0
  26. package/build/meta.js.map +1 -0
  27. package/build/meta.mjs +321 -0
  28. package/build/meta.mjs.map +1 -0
  29. package/package.json +13 -12
  30. package/build/cjs/index.d.ts +0 -1
  31. package/build/cjs/index.js +0 -18
  32. package/build/cjs/index.js.map +0 -1
  33. package/build/cjs/index.typings.d.ts +0 -1
  34. package/build/cjs/index.typings.js +0 -18
  35. package/build/cjs/index.typings.js.map +0 -1
  36. package/build/cjs/meta.d.ts +0 -1
  37. package/build/cjs/meta.js +0 -18
  38. package/build/cjs/meta.js.map +0 -1
  39. package/build/cjs/src/ecom-discounts-v1-discount-rule-discount-rules.context.d.ts +0 -25
  40. package/build/cjs/src/ecom-discounts-v1-discount-rule-discount-rules.context.js +0 -36
  41. package/build/cjs/src/ecom-discounts-v1-discount-rule-discount-rules.context.js.map +0 -1
  42. package/build/cjs/src/ecom-discounts-v1-discount-rule-discount-rules.http.d.ts +0 -48
  43. package/build/cjs/src/ecom-discounts-v1-discount-rule-discount-rules.http.js +0 -271
  44. package/build/cjs/src/ecom-discounts-v1-discount-rule-discount-rules.http.js.map +0 -1
  45. package/build/cjs/src/ecom-discounts-v1-discount-rule-discount-rules.meta.d.ts +0 -23
  46. package/build/cjs/src/ecom-discounts-v1-discount-rule-discount-rules.meta.js +0 -123
  47. package/build/cjs/src/ecom-discounts-v1-discount-rule-discount-rules.meta.js.map +0 -1
  48. package/build/cjs/src/ecom-discounts-v1-discount-rule-discount-rules.public.d.ts +0 -80
  49. package/build/cjs/src/ecom-discounts-v1-discount-rule-discount-rules.public.js +0 -98
  50. package/build/cjs/src/ecom-discounts-v1-discount-rule-discount-rules.public.js.map +0 -1
  51. package/build/cjs/src/ecom-discounts-v1-discount-rule-discount-rules.types.d.ts +0 -893
  52. package/build/cjs/src/ecom-discounts-v1-discount-rule-discount-rules.types.js +0 -76
  53. package/build/cjs/src/ecom-discounts-v1-discount-rule-discount-rules.types.js.map +0 -1
  54. package/build/cjs/src/ecom-discounts-v1-discount-rule-discount-rules.universal.js +0 -369
  55. package/build/cjs/src/ecom-discounts-v1-discount-rule-discount-rules.universal.js.map +0 -1
  56. package/build/es/index.d.ts +0 -1
  57. package/build/es/index.js +0 -2
  58. package/build/es/index.js.map +0 -1
  59. package/build/es/index.typings.d.ts +0 -1
  60. package/build/es/index.typings.js +0 -2
  61. package/build/es/index.typings.js.map +0 -1
  62. package/build/es/meta.d.ts +0 -1
  63. package/build/es/meta.js +0 -2
  64. package/build/es/meta.js.map +0 -1
  65. package/build/es/package.json +0 -3
  66. package/build/es/src/ecom-discounts-v1-discount-rule-discount-rules.context.d.ts +0 -25
  67. package/build/es/src/ecom-discounts-v1-discount-rule-discount-rules.context.js +0 -25
  68. package/build/es/src/ecom-discounts-v1-discount-rule-discount-rules.context.js.map +0 -1
  69. package/build/es/src/ecom-discounts-v1-discount-rule-discount-rules.http.d.ts +0 -48
  70. package/build/es/src/ecom-discounts-v1-discount-rule-discount-rules.http.js +0 -263
  71. package/build/es/src/ecom-discounts-v1-discount-rule-discount-rules.http.js.map +0 -1
  72. package/build/es/src/ecom-discounts-v1-discount-rule-discount-rules.meta.d.ts +0 -23
  73. package/build/es/src/ecom-discounts-v1-discount-rule-discount-rules.meta.js +0 -92
  74. package/build/es/src/ecom-discounts-v1-discount-rule-discount-rules.meta.js.map +0 -1
  75. package/build/es/src/ecom-discounts-v1-discount-rule-discount-rules.public.d.ts +0 -80
  76. package/build/es/src/ecom-discounts-v1-discount-rule-discount-rules.public.js +0 -82
  77. package/build/es/src/ecom-discounts-v1-discount-rule-discount-rules.public.js.map +0 -1
  78. package/build/es/src/ecom-discounts-v1-discount-rule-discount-rules.types.d.ts +0 -893
  79. package/build/es/src/ecom-discounts-v1-discount-rule-discount-rules.types.js +0 -73
  80. package/build/es/src/ecom-discounts-v1-discount-rule-discount-rules.types.js.map +0 -1
  81. package/build/es/src/ecom-discounts-v1-discount-rule-discount-rules.universal.js +0 -338
  82. package/build/es/src/ecom-discounts-v1-discount-rule-discount-rules.universal.js.map +0 -1
  83. package/build/internal/cjs/index.d.ts +0 -1
  84. package/build/internal/cjs/index.js +0 -18
  85. package/build/internal/cjs/index.js.map +0 -1
  86. package/build/internal/cjs/index.typings.d.ts +0 -1
  87. package/build/internal/cjs/index.typings.js +0 -18
  88. package/build/internal/cjs/index.typings.js.map +0 -1
  89. package/build/internal/cjs/meta.d.ts +0 -1
  90. package/build/internal/cjs/meta.js +0 -18
  91. package/build/internal/cjs/meta.js.map +0 -1
  92. package/build/internal/cjs/src/ecom-discounts-v1-discount-rule-discount-rules.context.d.ts +0 -25
  93. package/build/internal/cjs/src/ecom-discounts-v1-discount-rule-discount-rules.context.js +0 -36
  94. package/build/internal/cjs/src/ecom-discounts-v1-discount-rule-discount-rules.context.js.map +0 -1
  95. package/build/internal/cjs/src/ecom-discounts-v1-discount-rule-discount-rules.http.d.ts +0 -48
  96. package/build/internal/cjs/src/ecom-discounts-v1-discount-rule-discount-rules.http.js +0 -271
  97. package/build/internal/cjs/src/ecom-discounts-v1-discount-rule-discount-rules.http.js.map +0 -1
  98. package/build/internal/cjs/src/ecom-discounts-v1-discount-rule-discount-rules.meta.d.ts +0 -23
  99. package/build/internal/cjs/src/ecom-discounts-v1-discount-rule-discount-rules.meta.js +0 -123
  100. package/build/internal/cjs/src/ecom-discounts-v1-discount-rule-discount-rules.meta.js.map +0 -1
  101. package/build/internal/cjs/src/ecom-discounts-v1-discount-rule-discount-rules.public.d.ts +0 -80
  102. package/build/internal/cjs/src/ecom-discounts-v1-discount-rule-discount-rules.public.js +0 -98
  103. package/build/internal/cjs/src/ecom-discounts-v1-discount-rule-discount-rules.public.js.map +0 -1
  104. package/build/internal/cjs/src/ecom-discounts-v1-discount-rule-discount-rules.types.d.ts +0 -912
  105. package/build/internal/cjs/src/ecom-discounts-v1-discount-rule-discount-rules.types.js +0 -76
  106. package/build/internal/cjs/src/ecom-discounts-v1-discount-rule-discount-rules.types.js.map +0 -1
  107. package/build/internal/cjs/src/ecom-discounts-v1-discount-rule-discount-rules.universal.js +0 -369
  108. package/build/internal/cjs/src/ecom-discounts-v1-discount-rule-discount-rules.universal.js.map +0 -1
  109. package/build/internal/es/index.d.ts +0 -1
  110. package/build/internal/es/index.js +0 -2
  111. package/build/internal/es/index.js.map +0 -1
  112. package/build/internal/es/index.typings.d.ts +0 -1
  113. package/build/internal/es/index.typings.js +0 -2
  114. package/build/internal/es/index.typings.js.map +0 -1
  115. package/build/internal/es/meta.d.ts +0 -1
  116. package/build/internal/es/meta.js +0 -2
  117. package/build/internal/es/meta.js.map +0 -1
  118. package/build/internal/es/src/ecom-discounts-v1-discount-rule-discount-rules.context.d.ts +0 -25
  119. package/build/internal/es/src/ecom-discounts-v1-discount-rule-discount-rules.context.js +0 -25
  120. package/build/internal/es/src/ecom-discounts-v1-discount-rule-discount-rules.context.js.map +0 -1
  121. package/build/internal/es/src/ecom-discounts-v1-discount-rule-discount-rules.http.d.ts +0 -48
  122. package/build/internal/es/src/ecom-discounts-v1-discount-rule-discount-rules.http.js +0 -263
  123. package/build/internal/es/src/ecom-discounts-v1-discount-rule-discount-rules.http.js.map +0 -1
  124. package/build/internal/es/src/ecom-discounts-v1-discount-rule-discount-rules.meta.d.ts +0 -23
  125. package/build/internal/es/src/ecom-discounts-v1-discount-rule-discount-rules.meta.js +0 -92
  126. package/build/internal/es/src/ecom-discounts-v1-discount-rule-discount-rules.meta.js.map +0 -1
  127. package/build/internal/es/src/ecom-discounts-v1-discount-rule-discount-rules.public.d.ts +0 -80
  128. package/build/internal/es/src/ecom-discounts-v1-discount-rule-discount-rules.public.js +0 -82
  129. package/build/internal/es/src/ecom-discounts-v1-discount-rule-discount-rules.public.js.map +0 -1
  130. package/build/internal/es/src/ecom-discounts-v1-discount-rule-discount-rules.types.d.ts +0 -912
  131. package/build/internal/es/src/ecom-discounts-v1-discount-rule-discount-rules.types.js +0 -73
  132. package/build/internal/es/src/ecom-discounts-v1-discount-rule-discount-rules.types.js.map +0 -1
  133. package/build/internal/es/src/ecom-discounts-v1-discount-rule-discount-rules.universal.js +0 -338
  134. package/build/internal/es/src/ecom-discounts-v1-discount-rule-discount-rules.universal.js.map +0 -1
@@ -1,4 +1,4 @@
1
- export interface DiscountRule {
1
+ interface DiscountRule {
2
2
  /**
3
3
  * Discount rule ID.
4
4
  * @format GUID
@@ -64,7 +64,7 @@ export interface DiscountRule {
64
64
  usageCount?: number;
65
65
  }
66
66
  /** DiscountTrigger - description of a set of conditions, that if met, will trigger the associated rule actions */
67
- export interface DiscountTrigger extends DiscountTriggerTriggerOneOf {
67
+ interface DiscountTrigger extends DiscountTriggerTriggerOneOf {
68
68
  /** Chain multiple triggers with the `and` operator. */
69
69
  and?: And;
70
70
  /** Chain multiple triggers with the `or` operator. */
@@ -86,7 +86,7 @@ export interface DiscountTrigger extends DiscountTriggerTriggerOneOf {
86
86
  triggerType?: TriggerType;
87
87
  }
88
88
  /** @oneof */
89
- export interface DiscountTriggerTriggerOneOf {
89
+ interface DiscountTriggerTriggerOneOf {
90
90
  /** Chain multiple triggers with the `and` operator. */
91
91
  and?: And;
92
92
  /** Chain multiple triggers with the `or` operator. */
@@ -104,7 +104,7 @@ export interface DiscountTriggerTriggerOneOf {
104
104
  * 2. Specific catalog item - type = CATALOG_ITEM, CatalogItemFilter with `catalog_app_id` + `catalog_item_ids`
105
105
  * 3. External catalog filter - type = CUSTOM_FILTER, CustomFilter with 'app_id' + 'params'
106
106
  */
107
- export interface Scope extends ScopeScopeItemsOneOf {
107
+ interface Scope extends ScopeScopeItemsOneOf {
108
108
  /** Catalog item filter. Must be passed with `type."CATALOG_ITEM"`. */
109
109
  catalogItemFilter?: CatalogItemFilter;
110
110
  /** Custom filter. Must be passed with `type."CATALOG_ITEM"`. */
@@ -119,20 +119,20 @@ export interface Scope extends ScopeScopeItemsOneOf {
119
119
  type?: ScopeType;
120
120
  }
121
121
  /** @oneof */
122
- export interface ScopeScopeItemsOneOf {
122
+ interface ScopeScopeItemsOneOf {
123
123
  /** Catalog item filter. Must be passed with `type."CATALOG_ITEM"`. */
124
124
  catalogItemFilter?: CatalogItemFilter;
125
125
  /** Custom filter. Must be passed with `type."CATALOG_ITEM"`. */
126
126
  customFilter?: CustomFilter;
127
127
  }
128
- export declare enum ScopeType {
128
+ declare enum ScopeType {
129
129
  UNDEFINED_SCOPE = "UNDEFINED_SCOPE",
130
130
  /** Specific catalog items */
131
131
  CATALOG_ITEM = "CATALOG_ITEM",
132
132
  /** Specific items by custom filters */
133
133
  CUSTOM_FILTER = "CUSTOM_FILTER"
134
134
  }
135
- export interface CatalogItemFilter {
135
+ interface CatalogItemFilter {
136
136
  /**
137
137
  * Catalog App ID. For example, the Wix Stores, Wix Bookings, or 3rd-party `appId`.
138
138
  * @format GUID
@@ -146,7 +146,7 @@ export interface CatalogItemFilter {
146
146
  */
147
147
  catalogItemIds?: string[];
148
148
  }
149
- export interface CustomFilter {
149
+ interface CustomFilter {
150
150
  /**
151
151
  * Custom filter app ID, when relevant.
152
152
  * @format GUID
@@ -159,7 +159,7 @@ export interface CustomFilter {
159
159
  */
160
160
  params?: Record<string, any> | null;
161
161
  }
162
- export interface And {
162
+ interface And {
163
163
  /**
164
164
  * List of triggers to have an "AND" operator between their results.
165
165
  * @minSize 2
@@ -167,7 +167,7 @@ export interface And {
167
167
  */
168
168
  triggers?: DiscountTrigger[];
169
169
  }
170
- export interface Or {
170
+ interface Or {
171
171
  /**
172
172
  * List of triggers to have an "OR" operator between their results.
173
173
  * @minSize 2
@@ -175,7 +175,7 @@ export interface Or {
175
175
  */
176
176
  triggers?: DiscountTrigger[];
177
177
  }
178
- export interface Custom {
178
+ interface Custom {
179
179
  /**
180
180
  * Trigger ID.
181
181
  * @minLength 1
@@ -188,7 +188,7 @@ export interface Custom {
188
188
  */
189
189
  appId?: string;
190
190
  }
191
- export interface SubtotalRange {
191
+ interface SubtotalRange {
192
192
  /**
193
193
  * Relevant scopes for `"SPECIFIC_ITEMS"` target type.
194
194
  * @maxSize 50
@@ -205,7 +205,7 @@ export interface SubtotalRange {
205
205
  */
206
206
  to?: string | null;
207
207
  }
208
- export interface ItemQuantityRange {
208
+ interface ItemQuantityRange {
209
209
  /**
210
210
  * Relevant scopes for `"SPECIFIC_ITEMS"` target type.
211
211
  * @maxSize 50
@@ -222,7 +222,7 @@ export interface ItemQuantityRange {
222
222
  */
223
223
  to?: number | null;
224
224
  }
225
- export declare enum TriggerType {
225
+ declare enum TriggerType {
226
226
  UNDEFINED = "UNDEFINED",
227
227
  /** Operator used for chaining multiple triggers. Currently 1 `AND` chain operator is supported. */
228
228
  AND = "AND",
@@ -235,13 +235,13 @@ export declare enum TriggerType {
235
235
  /** Chain multiple triggers with OR operator */
236
236
  OR = "OR"
237
237
  }
238
- export interface ActiveTimeInfo {
238
+ interface ActiveTimeInfo {
239
239
  /** Date and time the discount rule is active **from**, in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format. */
240
240
  start?: Date | null;
241
241
  /** Date and time the discount rule is active **till**, in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format. */
242
242
  end?: Date | null;
243
243
  }
244
- export interface Discounts {
244
+ interface Discounts {
245
245
  /**
246
246
  * Discounts.
247
247
  * @minSize 1
@@ -249,7 +249,7 @@ export interface Discounts {
249
249
  */
250
250
  values?: Discount[];
251
251
  }
252
- export interface Discount extends DiscountDiscountOneOf {
252
+ interface Discount extends DiscountDiscountOneOf {
253
253
  /**
254
254
  * Percentage to discount from original price.
255
255
  * @min 0.1
@@ -284,7 +284,7 @@ export interface Discount extends DiscountDiscountOneOf {
284
284
  discountType?: DiscountType;
285
285
  }
286
286
  /** @oneof */
287
- export interface DiscountDiscountOneOf {
287
+ interface DiscountDiscountOneOf {
288
288
  /**
289
289
  * Percentage to discount from original price.
290
290
  * @min 0.1
@@ -302,13 +302,13 @@ export interface DiscountDiscountOneOf {
302
302
  */
303
303
  fixedPrice?: string;
304
304
  }
305
- export declare enum Type {
305
+ declare enum Type {
306
306
  /** Target type is not defined */
307
307
  UNDEFINED = "UNDEFINED",
308
308
  /** Target type is a set of specific items */
309
309
  SPECIFIC_ITEMS = "SPECIFIC_ITEMS"
310
310
  }
311
- export interface SpecificItemsInfo {
311
+ interface SpecificItemsInfo {
312
312
  /**
313
313
  * All associated scopes for `"SPECIFIC_ITEMS"` target type.
314
314
  * @minSize 1
@@ -316,7 +316,7 @@ export interface SpecificItemsInfo {
316
316
  */
317
317
  scopes?: Scope[];
318
318
  }
319
- export declare enum DiscountType {
319
+ declare enum DiscountType {
320
320
  UNDEFINED = "UNDEFINED",
321
321
  /** Price is reduced by percentage value. */
322
322
  PERCENTAGE = "PERCENTAGE",
@@ -325,7 +325,7 @@ export declare enum DiscountType {
325
325
  /** Price will be set to fixed amount. */
326
326
  FIXED_PRICE = "FIXED_PRICE"
327
327
  }
328
- export interface BuyXGetYInfo {
328
+ interface BuyXGetYInfo {
329
329
  /** Information about which items must be in the cart (buy X) for the discount to apply (get Y). */
330
330
  customerBuys?: CustomerBuy;
331
331
  /** Information about which items will be discounted (get Y). */
@@ -339,7 +339,7 @@ export interface BuyXGetYInfo {
339
339
  */
340
340
  limit?: number | null;
341
341
  }
342
- export interface CustomerBuy extends CustomerBuyConditionOneOf {
342
+ interface CustomerBuy extends CustomerBuyConditionOneOf {
343
343
  /**
344
344
  * Minimum number of items the customer must add to the cart to be eligible for a discount.
345
345
  * @min 1
@@ -358,7 +358,7 @@ export interface CustomerBuy extends CustomerBuyConditionOneOf {
358
358
  scopes?: Scope[];
359
359
  }
360
360
  /** @oneof */
361
- export interface CustomerBuyConditionOneOf {
361
+ interface CustomerBuyConditionOneOf {
362
362
  /**
363
363
  * Minimum number of items the customer must add to the cart to be eligible for a discount.
364
364
  * @min 1
@@ -370,7 +370,7 @@ export interface CustomerBuyConditionOneOf {
370
370
  */
371
371
  minimumSpend?: string | null;
372
372
  }
373
- export interface CustomerGet {
373
+ interface CustomerGet {
374
374
  /**
375
375
  * Exact number of items in the cart that will be discounted.
376
376
  * If the cart contains fewer items than the value of quantity, the discount will not apply.
@@ -384,7 +384,7 @@ export interface CustomerGet {
384
384
  */
385
385
  scopes?: Scope[];
386
386
  }
387
- export declare enum Status {
387
+ declare enum Status {
388
388
  /** Rule status is not defined. */
389
389
  UNDEFINED = "UNDEFINED",
390
390
  /** Rule status is live. */
@@ -395,7 +395,7 @@ export declare enum Status {
395
395
  PENDING = "PENDING"
396
396
  }
397
397
  /** The discount settings */
398
- export interface DiscountSettings {
398
+ interface DiscountSettings {
399
399
  /** Discount applies to either `ALL_ITEMS`, or to the `LOWEST_PRICED_ITEM`. */
400
400
  appliesTo?: AppliedSubjectType;
401
401
  /**
@@ -419,14 +419,14 @@ export interface DiscountSettings {
419
419
  usageLimitPerUser?: number | null;
420
420
  }
421
421
  /** TODO: check if can be removed */
422
- export declare enum AppliedSubjectType {
422
+ declare enum AppliedSubjectType {
423
423
  UNDEFINED = "UNDEFINED",
424
424
  /** Discount applies to all items at checkout. */
425
425
  ALL_ITEMS = "ALL_ITEMS",
426
426
  /** Discount applies to the lowest priced item at checkout. */
427
427
  LOWEST_PRICED_ITEM = "LOWEST_PRICED_ITEM"
428
428
  }
429
- export interface ExtendedFields {
429
+ interface ExtendedFields {
430
430
  /**
431
431
  * Extended field data. Each key corresponds to the namespace of the app that created the extended fields.
432
432
  * The value of each key is structured according to the schema defined when the extended fields were configured.
@@ -437,47 +437,47 @@ export interface ExtendedFields {
437
437
  */
438
438
  namespaces?: Record<string, Record<string, any>>;
439
439
  }
440
- export interface CreateDiscountRuleRequest {
440
+ interface CreateDiscountRuleRequest {
441
441
  /** Discount rule info. */
442
442
  discountRule: DiscountRule;
443
443
  }
444
- export interface CreateDiscountRuleResponse {
444
+ interface CreateDiscountRuleResponse {
445
445
  /** Discount rule. */
446
446
  discountRule?: DiscountRule;
447
447
  }
448
- export interface GetDiscountRuleRequest {
448
+ interface GetDiscountRuleRequest {
449
449
  /**
450
450
  * ID of the discount rule to retrieve.
451
451
  * @format GUID
452
452
  */
453
453
  discountRuleId: string;
454
454
  }
455
- export interface GetDiscountRuleResponse {
455
+ interface GetDiscountRuleResponse {
456
456
  /** The requested discount rule. */
457
457
  discountRule?: DiscountRule;
458
458
  }
459
- export interface UpdateDiscountRuleRequest {
459
+ interface UpdateDiscountRuleRequest {
460
460
  /** Discount rule info. */
461
461
  discountRule: DiscountRule;
462
462
  }
463
- export interface UpdateDiscountRuleResponse {
463
+ interface UpdateDiscountRuleResponse {
464
464
  /** Updated discount rule. */
465
465
  discountRule?: DiscountRule;
466
466
  }
467
- export interface DeleteDiscountRuleRequest {
467
+ interface DeleteDiscountRuleRequest {
468
468
  /**
469
469
  * ID of the discount rule to delete.
470
470
  * @format GUID
471
471
  */
472
472
  discountRuleId: string;
473
473
  }
474
- export interface DeleteDiscountRuleResponse {
474
+ interface DeleteDiscountRuleResponse {
475
475
  }
476
- export interface QueryDiscountRulesRequest {
476
+ interface QueryDiscountRulesRequest {
477
477
  /** Query options. */
478
478
  query?: PlatformQuery;
479
479
  }
480
- export interface PlatformQuery extends PlatformQueryPagingMethodOneOf {
480
+ interface PlatformQuery extends PlatformQueryPagingMethodOneOf {
481
481
  /** Pointer to page of results using offset. Cannot be used together with `cursorPaging`. */
482
482
  paging?: PlatformPaging;
483
483
  /** Cursor pointing to page of results. Cannot be used together with `paging`. `cursorPaging.cursor` can not be used together with `filter` or `sort`. */
@@ -488,13 +488,13 @@ export interface PlatformQuery extends PlatformQueryPagingMethodOneOf {
488
488
  sort?: Sorting[];
489
489
  }
490
490
  /** @oneof */
491
- export interface PlatformQueryPagingMethodOneOf {
491
+ interface PlatformQueryPagingMethodOneOf {
492
492
  /** Pointer to page of results using offset. Cannot be used together with `cursorPaging`. */
493
493
  paging?: PlatformPaging;
494
494
  /** Cursor pointing to page of results. Cannot be used together with `paging`. `cursorPaging.cursor` can not be used together with `filter` or `sort`. */
495
495
  cursorPaging?: CursorPaging;
496
496
  }
497
- export interface Sorting {
497
+ interface Sorting {
498
498
  /**
499
499
  * Name of the field to sort by.
500
500
  * @maxLength 512
@@ -503,11 +503,11 @@ export interface Sorting {
503
503
  /** Sort order. */
504
504
  order?: SortOrder;
505
505
  }
506
- export declare enum SortOrder {
506
+ declare enum SortOrder {
507
507
  ASC = "ASC",
508
508
  DESC = "DESC"
509
509
  }
510
- export interface PlatformPaging {
510
+ interface PlatformPaging {
511
511
  /**
512
512
  * Number of items to load.
513
513
  * @max 100
@@ -516,7 +516,7 @@ export interface PlatformPaging {
516
516
  /** Number of items to skip in the current sort order. */
517
517
  offset?: number | null;
518
518
  }
519
- export interface CursorPaging {
519
+ interface CursorPaging {
520
520
  /**
521
521
  * Maximum number of items to return in the results.
522
522
  * @max 100
@@ -531,13 +531,13 @@ export interface CursorPaging {
531
531
  */
532
532
  cursor?: string | null;
533
533
  }
534
- export interface QueryDiscountRulesResponse {
534
+ interface QueryDiscountRulesResponse {
535
535
  /** List of discount rules. */
536
536
  discountRules?: DiscountRule[];
537
537
  /** Details on the paged set of results returned. */
538
538
  pagingMetadata?: PlatformPagingMetadata;
539
539
  }
540
- export interface PlatformPagingMetadata {
540
+ interface PlatformPagingMetadata {
541
541
  /** The number of items returned in this response. */
542
542
  count?: number | null;
543
543
  /** The offset which was requested. Returned if offset paging was used. */
@@ -547,7 +547,7 @@ export interface PlatformPagingMetadata {
547
547
  /** Cursors to navigate through result pages. Returned if cursor paging was used. */
548
548
  cursors?: Cursors;
549
549
  }
550
- export interface Cursors {
550
+ interface Cursors {
551
551
  /**
552
552
  * Cursor string pointing to the next page in the list of results.
553
553
  * @maxLength 16000
@@ -559,7 +559,7 @@ export interface Cursors {
559
559
  */
560
560
  prev?: string | null;
561
561
  }
562
- export interface GetAppliedDiscountsRequest {
562
+ interface GetAppliedDiscountsRequest {
563
563
  /**
564
564
  * Line items for which to check for discount rules.
565
565
  * @maxSize 1000
@@ -571,7 +571,7 @@ export interface GetAppliedDiscountsRequest {
571
571
  */
572
572
  purchaseFlowId?: string | null;
573
573
  }
574
- export interface LineItem {
574
+ interface LineItem {
575
575
  /**
576
576
  * Line item ID.
577
577
  * @minLength 1
@@ -592,7 +592,7 @@ export interface LineItem {
592
592
  price?: string;
593
593
  }
594
594
  /** Used for grouping line items. Sent when an item is added to a cart, checkout, or order. */
595
- export interface CatalogReference {
595
+ interface CatalogReference {
596
596
  /**
597
597
  * ID of the item within the catalog it belongs to.
598
598
  * @minLength 1
@@ -618,11 +618,11 @@ export interface CatalogReference {
618
618
  */
619
619
  options?: Record<string, any> | null;
620
620
  }
621
- export interface GetAppliedDiscountsResponse {
621
+ interface GetAppliedDiscountsResponse {
622
622
  /** All eligible discounts. */
623
623
  appliedDiscounts?: AppliedDiscount[];
624
624
  }
625
- export interface AppliedDiscount {
625
+ interface AppliedDiscount {
626
626
  /** Discount type. */
627
627
  discountType?: Type;
628
628
  /**
@@ -634,7 +634,7 @@ export interface AppliedDiscount {
634
634
  /** Applied discount rule. */
635
635
  appliedDiscountRule?: AppliedDiscountRule;
636
636
  }
637
- export interface AppliedDiscountRule {
637
+ interface AppliedDiscountRule {
638
638
  /**
639
639
  * Applied discount rule ID.
640
640
  * @format GUID
@@ -647,7 +647,7 @@ export interface AppliedDiscountRule {
647
647
  /** Discount rule type. */
648
648
  discountRuleType?: DiscountType;
649
649
  }
650
- export interface DiscountRuleName {
650
+ interface DiscountRuleName {
651
651
  /**
652
652
  * Original discount rule name (in site's default language).
653
653
  * @minLength 1
@@ -663,7 +663,7 @@ export interface DiscountRuleName {
663
663
  */
664
664
  translated?: string | null;
665
665
  }
666
- export interface MultiCurrencyPrice {
666
+ interface MultiCurrencyPrice {
667
667
  /**
668
668
  * Amount.
669
669
  * @decimalValue options { gte:0, lte:1000000000000000 }
@@ -686,7 +686,7 @@ export interface MultiCurrencyPrice {
686
686
  */
687
687
  formattedConvertedAmount?: string;
688
688
  }
689
- export interface DomainEvent extends DomainEventBodyOneOf {
689
+ interface DomainEvent extends DomainEventBodyOneOf {
690
690
  createdEvent?: EntityCreatedEvent;
691
691
  updatedEvent?: EntityUpdatedEvent;
692
692
  deletedEvent?: EntityDeletedEvent;
@@ -729,19 +729,19 @@ export interface DomainEvent extends DomainEventBodyOneOf {
729
729
  entityEventSequence?: string | null;
730
730
  }
731
731
  /** @oneof */
732
- export interface DomainEventBodyOneOf {
732
+ interface DomainEventBodyOneOf {
733
733
  createdEvent?: EntityCreatedEvent;
734
734
  updatedEvent?: EntityUpdatedEvent;
735
735
  deletedEvent?: EntityDeletedEvent;
736
736
  actionEvent?: ActionEvent;
737
737
  }
738
- export interface EntityCreatedEvent {
738
+ interface EntityCreatedEvent {
739
739
  entity?: string;
740
740
  }
741
- export interface RestoreInfo {
741
+ interface RestoreInfo {
742
742
  deletedDate?: Date | null;
743
743
  }
744
- export interface EntityUpdatedEvent {
744
+ interface EntityUpdatedEvent {
745
745
  /**
746
746
  * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
747
747
  * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
@@ -749,20 +749,20 @@ export interface EntityUpdatedEvent {
749
749
  */
750
750
  currentEntity?: string;
751
751
  }
752
- export interface EntityDeletedEvent {
752
+ interface EntityDeletedEvent {
753
753
  /** Entity that was deleted */
754
754
  deletedEntity?: string | null;
755
755
  }
756
- export interface ActionEvent {
756
+ interface ActionEvent {
757
757
  body?: string;
758
758
  }
759
- export interface Empty {
759
+ interface Empty {
760
760
  }
761
- export interface DiscountRuleUsageLimitReached {
761
+ interface DiscountRuleUsageLimitReached {
762
762
  /** Discount Rule */
763
763
  rule?: DiscountRule;
764
764
  }
765
- export interface MessageEnvelope {
765
+ interface MessageEnvelope {
766
766
  /**
767
767
  * App instance ID.
768
768
  * @format GUID
@@ -778,7 +778,7 @@ export interface MessageEnvelope {
778
778
  /** Stringify payload. */
779
779
  data?: string;
780
780
  }
781
- export interface IdentificationData extends IdentificationDataIdOneOf {
781
+ interface IdentificationData extends IdentificationDataIdOneOf {
782
782
  /**
783
783
  * ID of a site visitor that has not logged in to the site.
784
784
  * @format GUID
@@ -803,7 +803,7 @@ export interface IdentificationData extends IdentificationDataIdOneOf {
803
803
  identityType?: WebhookIdentityType;
804
804
  }
805
805
  /** @oneof */
806
- export interface IdentificationDataIdOneOf {
806
+ interface IdentificationDataIdOneOf {
807
807
  /**
808
808
  * ID of a site visitor that has not logged in to the site.
809
809
  * @format GUID
@@ -825,102 +825,14 @@ export interface IdentificationDataIdOneOf {
825
825
  */
826
826
  appId?: string;
827
827
  }
828
- export declare enum WebhookIdentityType {
828
+ declare enum WebhookIdentityType {
829
829
  UNKNOWN = "UNKNOWN",
830
830
  ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
831
831
  MEMBER = "MEMBER",
832
832
  WIX_USER = "WIX_USER",
833
833
  APP = "APP"
834
834
  }
835
- interface AndNonNullableFields {
836
- triggers: DiscountTriggerNonNullableFields[];
837
- }
838
- interface OrNonNullableFields {
839
- triggers: DiscountTriggerNonNullableFields[];
840
- }
841
- interface CustomNonNullableFields {
842
- _id: string;
843
- appId: string;
844
- }
845
- interface CatalogItemFilterNonNullableFields {
846
- catalogAppId: string;
847
- catalogItemIds: string[];
848
- }
849
- interface CustomFilterNonNullableFields {
850
- appId: string;
851
- }
852
- interface ScopeNonNullableFields {
853
- catalogItemFilter?: CatalogItemFilterNonNullableFields;
854
- customFilter?: CustomFilterNonNullableFields;
855
- _id: string;
856
- type: ScopeType;
857
- }
858
- interface SubtotalRangeNonNullableFields {
859
- scopes: ScopeNonNullableFields[];
860
- }
861
- interface ItemQuantityRangeNonNullableFields {
862
- scopes: ScopeNonNullableFields[];
863
- }
864
- interface DiscountTriggerNonNullableFields {
865
- and?: AndNonNullableFields;
866
- or?: OrNonNullableFields;
867
- customTrigger?: CustomNonNullableFields;
868
- subtotalRange?: SubtotalRangeNonNullableFields;
869
- itemQuantityRange?: ItemQuantityRangeNonNullableFields;
870
- triggerType: TriggerType;
871
- }
872
- interface SpecificItemsInfoNonNullableFields {
873
- scopes: ScopeNonNullableFields[];
874
- }
875
- interface CustomerBuyNonNullableFields {
876
- minimumQuantity: number;
877
- scopes: ScopeNonNullableFields[];
878
- }
879
- interface CustomerGetNonNullableFields {
880
- quantity: number;
881
- scopes: ScopeNonNullableFields[];
882
- }
883
- interface BuyXGetYInfoNonNullableFields {
884
- customerBuys?: CustomerBuyNonNullableFields;
885
- customerGets?: CustomerGetNonNullableFields;
886
- }
887
- interface DiscountNonNullableFields {
888
- percentage: number;
889
- fixedAmount: string;
890
- fixedPrice: string;
891
- targetType: Type;
892
- specificItemsInfo?: SpecificItemsInfoNonNullableFields;
893
- discountType: DiscountType;
894
- /** @internal */
895
- buyXGetYInfo?: BuyXGetYInfoNonNullableFields;
896
- }
897
- interface DiscountsNonNullableFields {
898
- values: DiscountNonNullableFields[];
899
- }
900
- interface DiscountSettingsNonNullableFields {
901
- appliesTo: AppliedSubjectType;
902
- }
903
- export interface DiscountRuleNonNullableFields {
904
- trigger?: DiscountTriggerNonNullableFields;
905
- discounts?: DiscountsNonNullableFields;
906
- status: Status;
907
- usageCount: number;
908
- /** @internal */
909
- settings?: DiscountSettingsNonNullableFields;
910
- }
911
- export interface CreateDiscountRuleResponseNonNullableFields {
912
- discountRule?: DiscountRuleNonNullableFields;
913
- }
914
- export interface GetDiscountRuleResponseNonNullableFields {
915
- discountRule?: DiscountRuleNonNullableFields;
916
- }
917
- export interface UpdateDiscountRuleResponseNonNullableFields {
918
- discountRule?: DiscountRuleNonNullableFields;
919
- }
920
- export interface QueryDiscountRulesResponseNonNullableFields {
921
- discountRules: DiscountRuleNonNullableFields[];
922
- }
923
- export interface BaseEventMetadata {
835
+ interface BaseEventMetadata {
924
836
  /**
925
837
  * App instance ID.
926
838
  * @format GUID
@@ -934,7 +846,7 @@ export interface BaseEventMetadata {
934
846
  /** The identification type and identity data. */
935
847
  identity?: IdentificationData;
936
848
  }
937
- export interface EventMetadata extends BaseEventMetadata {
849
+ interface EventMetadata extends BaseEventMetadata {
938
850
  /**
939
851
  * Unique event ID.
940
852
  * Allows clients to ignore duplicate webhooks.
@@ -972,159 +884,18 @@ export interface EventMetadata extends BaseEventMetadata {
972
884
  */
973
885
  entityEventSequence?: string | null;
974
886
  }
975
- export interface DiscountRuleCreatedEnvelope {
887
+ interface DiscountRuleCreatedEnvelope {
976
888
  entity: DiscountRule;
977
889
  metadata: EventMetadata;
978
890
  }
979
- /**
980
- * Triggered when a discount rule is created.
981
- * @permissionScope Manage Stores - all permissions
982
- * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
983
- * @permissionScope Read eCommerce - all read permissions
984
- * @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM
985
- * @permissionScope Read Stores - all read permissions
986
- * @permissionScopeId SCOPE.DC-STORES-MEGA.READ-STORES
987
- * @permissionScope Manage Restaurants - all permissions
988
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
989
- * @permissionScope Manage eCommerce - all permissions
990
- * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
991
- * @permissionScope Picasso private app mega scope
992
- * @permissionScopeId SCOPE.TEST.MEGA-PICASSO-MANAGE-SITE
993
- * @permissionId ECOM.DISCOUNT_RULES_READ
994
- * @webhook
995
- * @eventType wix.ecom.discounts.v1.discount_rule_created
996
- * @serviceIdentifier com.wix.ecom.discounts.DiscountRuleService
997
- * @slug created
998
- */
999
- export declare function onDiscountRuleCreated(handler: (event: DiscountRuleCreatedEnvelope) => void | Promise<void>): void;
1000
- export interface DiscountRuleDeletedEnvelope {
891
+ interface DiscountRuleDeletedEnvelope {
1001
892
  metadata: EventMetadata;
1002
893
  }
1003
- /**
1004
- * Triggered when a discount rule is deleted.
1005
- * @permissionScope Manage Stores - all permissions
1006
- * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
1007
- * @permissionScope Read eCommerce - all read permissions
1008
- * @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM
1009
- * @permissionScope Read Stores - all read permissions
1010
- * @permissionScopeId SCOPE.DC-STORES-MEGA.READ-STORES
1011
- * @permissionScope Manage Restaurants - all permissions
1012
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
1013
- * @permissionScope Manage eCommerce - all permissions
1014
- * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
1015
- * @permissionScope Picasso private app mega scope
1016
- * @permissionScopeId SCOPE.TEST.MEGA-PICASSO-MANAGE-SITE
1017
- * @permissionId ECOM.DISCOUNT_RULES_READ
1018
- * @webhook
1019
- * @eventType wix.ecom.discounts.v1.discount_rule_deleted
1020
- * @serviceIdentifier com.wix.ecom.discounts.DiscountRuleService
1021
- * @slug deleted
1022
- */
1023
- export declare function onDiscountRuleDeleted(handler: (event: DiscountRuleDeletedEnvelope) => void | Promise<void>): void;
1024
- export interface DiscountRuleUpdatedEnvelope {
894
+ interface DiscountRuleUpdatedEnvelope {
1025
895
  entity: DiscountRule;
1026
896
  metadata: EventMetadata;
1027
897
  }
1028
- /**
1029
- * Triggered when a discount rule is updated.
1030
- * @permissionScope Manage Stores - all permissions
1031
- * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
1032
- * @permissionScope Read eCommerce - all read permissions
1033
- * @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM
1034
- * @permissionScope Read Stores - all read permissions
1035
- * @permissionScopeId SCOPE.DC-STORES-MEGA.READ-STORES
1036
- * @permissionScope Manage Restaurants - all permissions
1037
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
1038
- * @permissionScope Manage eCommerce - all permissions
1039
- * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
1040
- * @permissionScope Picasso private app mega scope
1041
- * @permissionScopeId SCOPE.TEST.MEGA-PICASSO-MANAGE-SITE
1042
- * @permissionId ECOM.DISCOUNT_RULES_READ
1043
- * @webhook
1044
- * @eventType wix.ecom.discounts.v1.discount_rule_updated
1045
- * @serviceIdentifier com.wix.ecom.discounts.DiscountRuleService
1046
- * @slug updated
1047
- */
1048
- export declare function onDiscountRuleUpdated(handler: (event: DiscountRuleUpdatedEnvelope) => void | Promise<void>): void;
1049
- /**
1050
- * Creates a new discount rule.
1051
- *
1052
- *
1053
- * The `createDiscountRule()` function returns a Promise that resolves to the new discount rule when it's created.
1054
- * @param discountRule - Discount rule info.
1055
- * @public
1056
- * @requiredField discountRule
1057
- * @requiredField discountRule.discounts
1058
- * @requiredField discountRule.name
1059
- * @permissionId ECOM.DISCOUNT_RULES_CREATE
1060
- * @permissionScope Manage Stores - all permissions
1061
- * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
1062
- * @permissionScope Manage Restaurants - all permissions
1063
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
1064
- * @permissionScope Manage eCommerce - all permissions
1065
- * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
1066
- * @permissionScope Picasso private app mega scope
1067
- * @permissionScopeId SCOPE.TEST.MEGA-PICASSO-MANAGE-SITE
1068
- * @applicableIdentity APP
1069
- * @returns Discount rule.
1070
- * @fqn com.wix.ecom.discounts.DiscountRuleService.CreateDiscountRule
1071
- */
1072
- export declare function createDiscountRule(discountRule: DiscountRule): Promise<DiscountRule & DiscountRuleNonNullableFields>;
1073
- /**
1074
- * Retrieves a discount rule.
1075
- *
1076
- *
1077
- * The `getDiscountRule()` function returns a Promise that resolves when the specified discount rule is retrieved.
1078
- * @param discountRuleId - ID of the discount rule to retrieve.
1079
- * @public
1080
- * @requiredField discountRuleId
1081
- * @permissionId ECOM.DISCOUNT_RULES_READ
1082
- * @permissionScope Manage Stores - all permissions
1083
- * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
1084
- * @permissionScope Read eCommerce - all read permissions
1085
- * @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM
1086
- * @permissionScope Read Stores - all read permissions
1087
- * @permissionScopeId SCOPE.DC-STORES-MEGA.READ-STORES
1088
- * @permissionScope Manage Restaurants - all permissions
1089
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
1090
- * @permissionScope Manage eCommerce - all permissions
1091
- * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
1092
- * @permissionScope Picasso private app mega scope
1093
- * @permissionScopeId SCOPE.TEST.MEGA-PICASSO-MANAGE-SITE
1094
- * @applicableIdentity APP
1095
- * @returns The requested discount rule.
1096
- * @fqn com.wix.ecom.discounts.DiscountRuleService.GetDiscountRule
1097
- */
1098
- export declare function getDiscountRule(discountRuleId: string): Promise<DiscountRule & DiscountRuleNonNullableFields>;
1099
- /**
1100
- * Updates a discount rule's properties.
1101
- *
1102
- *
1103
- * The `updateDiscountRule()` function returns a Promise that resolves when the specified discount rule's properties are updated.
1104
- *
1105
- * Each time the discount rule is updated, `revision` increments by 1. The existing `revision` must be included when updating the discount rule. This ensures you're working with the latest discount rule information, and it prevents unintended overwrites.
1106
- * @param _id - Discount rule ID.
1107
- * @public
1108
- * @requiredField _id
1109
- * @requiredField discountRule
1110
- * @requiredField discountRule.revision
1111
- * @param discountRule - Discount rule info.
1112
- * @param options - Discount rule info.
1113
- * @permissionId ECOM.DISCOUNT_RULES_UPDATE
1114
- * @permissionScope Manage Stores - all permissions
1115
- * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
1116
- * @permissionScope Manage Restaurants - all permissions
1117
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
1118
- * @permissionScope Manage eCommerce - all permissions
1119
- * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
1120
- * @permissionScope Picasso private app mega scope
1121
- * @permissionScopeId SCOPE.TEST.MEGA-PICASSO-MANAGE-SITE
1122
- * @applicableIdentity APP
1123
- * @returns Updated discount rule.
1124
- * @fqn com.wix.ecom.discounts.DiscountRuleService.UpdateDiscountRule
1125
- */
1126
- export declare function updateDiscountRule(_id: string | null, discountRule: UpdateDiscountRule): Promise<DiscountRule & DiscountRuleNonNullableFields>;
1127
- export interface UpdateDiscountRule {
898
+ interface UpdateDiscountRule {
1128
899
  /**
1129
900
  * Discount rule ID.
1130
901
  * @format GUID
@@ -1189,60 +960,6 @@ export interface UpdateDiscountRule {
1189
960
  */
1190
961
  usageCount?: number;
1191
962
  }
1192
- /**
1193
- * Deletes a discount rule.
1194
- *
1195
- *
1196
- * The `deleteDiscountRule()` function returns a Promise that resolves when the specified discount rule is deleted.
1197
- * @param discountRuleId - ID of the discount rule to delete.
1198
- * @public
1199
- * @requiredField discountRuleId
1200
- * @permissionId ECOM.DISCOUNT_RULES_DELETE
1201
- * @permissionScope Manage Stores - all permissions
1202
- * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
1203
- * @permissionScope Manage Restaurants - all permissions
1204
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
1205
- * @permissionScope Manage eCommerce - all permissions
1206
- * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
1207
- * @permissionScope Picasso private app mega scope
1208
- * @permissionScopeId SCOPE.TEST.MEGA-PICASSO-MANAGE-SITE
1209
- * @applicableIdentity APP
1210
- * @fqn com.wix.ecom.discounts.DiscountRuleService.DeleteDiscountRule
1211
- */
1212
- export declare function deleteDiscountRule(discountRuleId: string): Promise<void>;
1213
- /**
1214
- * Creates a query to retrieve a list of discount rules.
1215
- *
1216
- *
1217
- * The `queryDiscountRules()` function builds a query to retrieve a list of up to 100 discount rules, and returns a [`DiscountRulesQueryBuilder`](#discountrulesquerybuilder) object.
1218
- *
1219
- * The returned object contains the query definition which is typically used to run the query using the [`find()`](/discount-rules/discount-rules-query-builder/find) function.
1220
- *
1221
- * You can refine the query by chaining `DiscountRulesQueryBuilder` functions onto the query. `DiscountRulesQueryBuilder` functions enable you to sort, filter, and control the results queryDiscountRules() returns.
1222
- *
1223
- * By default, `queryDiscountRules()` sorts results by [`ascending("_id")`](/discount-rules/discount-rules-query-builder/ascending) by default. This can be overridden.
1224
- *
1225
- * To learn how to query posts, refer to the table below.
1226
- *
1227
- * The following `DiscountRulesQueryBuilder` functions are supported for the `queryDiscountRules()` function. For a full description of the discount rule object, see the object returned for the [`items`](/discount-rules/discount-rules-query-result/items) property in the `DiscountRulesQueryResult`.
1228
- * @public
1229
- * @permissionScope Manage Stores - all permissions
1230
- * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
1231
- * @permissionScope Read eCommerce - all read permissions
1232
- * @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM
1233
- * @permissionScope Read Stores - all read permissions
1234
- * @permissionScopeId SCOPE.DC-STORES-MEGA.READ-STORES
1235
- * @permissionScope Manage Restaurants - all permissions
1236
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
1237
- * @permissionScope Manage eCommerce - all permissions
1238
- * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
1239
- * @permissionScope Picasso private app mega scope
1240
- * @permissionScopeId SCOPE.TEST.MEGA-PICASSO-MANAGE-SITE
1241
- * @permissionId ECOM.DISCOUNT_RULES_READ
1242
- * @applicableIdentity APP
1243
- * @fqn com.wix.ecom.discounts.DiscountRuleService.QueryDiscountRules
1244
- */
1245
- export declare function queryDiscountRules(): DiscountRulesQueryBuilder;
1246
963
  interface QueryCursorResult {
1247
964
  cursors: Cursors;
1248
965
  hasNext: () => boolean;
@@ -1250,13 +967,13 @@ interface QueryCursorResult {
1250
967
  length: number;
1251
968
  pageSize: number;
1252
969
  }
1253
- export interface DiscountRulesQueryResult extends QueryCursorResult {
970
+ interface DiscountRulesQueryResult extends QueryCursorResult {
1254
971
  items: DiscountRule[];
1255
972
  query: DiscountRulesQueryBuilder;
1256
973
  next: () => Promise<DiscountRulesQueryResult>;
1257
974
  prev: () => Promise<DiscountRulesQueryResult>;
1258
975
  }
1259
- export interface DiscountRulesQueryBuilder {
976
+ interface DiscountRulesQueryBuilder {
1260
977
  /** @param propertyName - Property whose value is compared with `value`.
1261
978
  * @param value - Value to compare against.
1262
979
  */
@@ -1301,4 +1018,5 @@ export interface DiscountRulesQueryBuilder {
1301
1018
  skipTo: (cursor: string) => DiscountRulesQueryBuilder;
1302
1019
  find: () => Promise<DiscountRulesQueryResult>;
1303
1020
  }
1304
- export {};
1021
+
1022
+ export { type GetAppliedDiscountsResponse as $, AppliedSubjectType as A, type BuyXGetYInfo as B, type CatalogItemFilter as C, type DiscountRule as D, type ExtendedFields as E, type UpdateDiscountRuleResponse as F, type GetDiscountRuleRequest as G, type DeleteDiscountRuleRequest as H, type ItemQuantityRange as I, type DeleteDiscountRuleResponse as J, type PlatformQueryPagingMethodOneOf as K, type Sorting as L, type PlatformPaging as M, type CursorPaging as N, type Or as O, type PlatformQuery as P, type QueryDiscountRulesRequest as Q, type QueryDiscountRulesResponse as R, ScopeType as S, TriggerType as T, type UpdateDiscountRule as U, type PlatformPagingMetadata as V, WebhookIdentityType as W, type Cursors as X, type GetAppliedDiscountsRequest as Y, type LineItem as Z, type CatalogReference as _, type DiscountRulesQueryBuilder as a, type AppliedDiscount as a0, type AppliedDiscountRule as a1, type DiscountRuleName as a2, type MultiCurrencyPrice as a3, type DomainEvent as a4, type DomainEventBodyOneOf as a5, type EntityCreatedEvent as a6, type RestoreInfo as a7, type EntityUpdatedEvent as a8, type EntityDeletedEvent as a9, type ActionEvent as aa, type Empty as ab, type DiscountRuleUsageLimitReached as ac, type MessageEnvelope as ad, type IdentificationData as ae, type IdentificationDataIdOneOf as af, type BaseEventMetadata as ag, type EventMetadata as ah, type DiscountRuleCreatedEnvelope as ai, type DiscountRuleDeletedEnvelope as aj, type DiscountRuleUpdatedEnvelope as ak, type DiscountRulesQueryResult as al, Type as b, DiscountType as c, Status as d, SortOrder as e, type DiscountTrigger as f, type DiscountTriggerTriggerOneOf as g, type Scope as h, type ScopeScopeItemsOneOf as i, type CustomFilter as j, type And as k, type Custom as l, type SubtotalRange as m, type ActiveTimeInfo as n, type Discounts as o, type Discount as p, type DiscountDiscountOneOf as q, type SpecificItemsInfo as r, type CustomerBuy as s, type CustomerBuyConditionOneOf as t, type CustomerGet as u, type DiscountSettings as v, type CreateDiscountRuleRequest as w, type CreateDiscountRuleResponse as x, type GetDiscountRuleResponse as y, type UpdateDiscountRuleRequest as z };