@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,83 +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 DiscountNonNullableFields {
876
- percentage: number;
877
- fixedAmount: string;
878
- fixedPrice: string;
879
- targetType: Type;
880
- specificItemsInfo?: SpecificItemsInfoNonNullableFields;
881
- discountType: DiscountType;
882
- }
883
- interface DiscountsNonNullableFields {
884
- values: DiscountNonNullableFields[];
885
- }
886
- export interface DiscountRuleNonNullableFields {
887
- trigger?: DiscountTriggerNonNullableFields;
888
- discounts?: DiscountsNonNullableFields;
889
- status: Status;
890
- usageCount: number;
891
- }
892
- export interface CreateDiscountRuleResponseNonNullableFields {
893
- discountRule?: DiscountRuleNonNullableFields;
894
- }
895
- export interface GetDiscountRuleResponseNonNullableFields {
896
- discountRule?: DiscountRuleNonNullableFields;
897
- }
898
- export interface UpdateDiscountRuleResponseNonNullableFields {
899
- discountRule?: DiscountRuleNonNullableFields;
900
- }
901
- export interface QueryDiscountRulesResponseNonNullableFields {
902
- discountRules: DiscountRuleNonNullableFields[];
903
- }
904
- export interface BaseEventMetadata {
835
+ interface BaseEventMetadata {
905
836
  /**
906
837
  * App instance ID.
907
838
  * @format GUID
@@ -915,7 +846,7 @@ export interface BaseEventMetadata {
915
846
  /** The identification type and identity data. */
916
847
  identity?: IdentificationData;
917
848
  }
918
- export interface EventMetadata extends BaseEventMetadata {
849
+ interface EventMetadata extends BaseEventMetadata {
919
850
  /**
920
851
  * Unique event ID.
921
852
  * Allows clients to ignore duplicate webhooks.
@@ -953,159 +884,18 @@ export interface EventMetadata extends BaseEventMetadata {
953
884
  */
954
885
  entityEventSequence?: string | null;
955
886
  }
956
- export interface DiscountRuleCreatedEnvelope {
887
+ interface DiscountRuleCreatedEnvelope {
957
888
  entity: DiscountRule;
958
889
  metadata: EventMetadata;
959
890
  }
960
- /**
961
- * Triggered when a discount rule is created.
962
- * @permissionScope Manage Stores - all permissions
963
- * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
964
- * @permissionScope Read eCommerce - all read permissions
965
- * @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM
966
- * @permissionScope Read Stores - all read permissions
967
- * @permissionScopeId SCOPE.DC-STORES-MEGA.READ-STORES
968
- * @permissionScope Manage Restaurants - all permissions
969
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
970
- * @permissionScope Manage eCommerce - all permissions
971
- * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
972
- * @permissionScope Picasso private app mega scope
973
- * @permissionScopeId SCOPE.TEST.MEGA-PICASSO-MANAGE-SITE
974
- * @permissionId ECOM.DISCOUNT_RULES_READ
975
- * @webhook
976
- * @eventType wix.ecom.discounts.v1.discount_rule_created
977
- * @serviceIdentifier com.wix.ecom.discounts.DiscountRuleService
978
- * @slug created
979
- */
980
- export declare function onDiscountRuleCreated(handler: (event: DiscountRuleCreatedEnvelope) => void | Promise<void>): void;
981
- export interface DiscountRuleDeletedEnvelope {
891
+ interface DiscountRuleDeletedEnvelope {
982
892
  metadata: EventMetadata;
983
893
  }
984
- /**
985
- * Triggered when a discount rule is deleted.
986
- * @permissionScope Manage Stores - all permissions
987
- * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
988
- * @permissionScope Read eCommerce - all read permissions
989
- * @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM
990
- * @permissionScope Read Stores - all read permissions
991
- * @permissionScopeId SCOPE.DC-STORES-MEGA.READ-STORES
992
- * @permissionScope Manage Restaurants - all permissions
993
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
994
- * @permissionScope Manage eCommerce - all permissions
995
- * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
996
- * @permissionScope Picasso private app mega scope
997
- * @permissionScopeId SCOPE.TEST.MEGA-PICASSO-MANAGE-SITE
998
- * @permissionId ECOM.DISCOUNT_RULES_READ
999
- * @webhook
1000
- * @eventType wix.ecom.discounts.v1.discount_rule_deleted
1001
- * @serviceIdentifier com.wix.ecom.discounts.DiscountRuleService
1002
- * @slug deleted
1003
- */
1004
- export declare function onDiscountRuleDeleted(handler: (event: DiscountRuleDeletedEnvelope) => void | Promise<void>): void;
1005
- export interface DiscountRuleUpdatedEnvelope {
894
+ interface DiscountRuleUpdatedEnvelope {
1006
895
  entity: DiscountRule;
1007
896
  metadata: EventMetadata;
1008
897
  }
1009
- /**
1010
- * Triggered when a discount rule is updated.
1011
- * @permissionScope Manage Stores - all permissions
1012
- * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
1013
- * @permissionScope Read eCommerce - all read permissions
1014
- * @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM
1015
- * @permissionScope Read Stores - all read permissions
1016
- * @permissionScopeId SCOPE.DC-STORES-MEGA.READ-STORES
1017
- * @permissionScope Manage Restaurants - all permissions
1018
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
1019
- * @permissionScope Manage eCommerce - all permissions
1020
- * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
1021
- * @permissionScope Picasso private app mega scope
1022
- * @permissionScopeId SCOPE.TEST.MEGA-PICASSO-MANAGE-SITE
1023
- * @permissionId ECOM.DISCOUNT_RULES_READ
1024
- * @webhook
1025
- * @eventType wix.ecom.discounts.v1.discount_rule_updated
1026
- * @serviceIdentifier com.wix.ecom.discounts.DiscountRuleService
1027
- * @slug updated
1028
- */
1029
- export declare function onDiscountRuleUpdated(handler: (event: DiscountRuleUpdatedEnvelope) => void | Promise<void>): void;
1030
- /**
1031
- * Creates a new discount rule.
1032
- *
1033
- *
1034
- * The `createDiscountRule()` function returns a Promise that resolves to the new discount rule when it's created.
1035
- * @param discountRule - Discount rule info.
1036
- * @public
1037
- * @requiredField discountRule
1038
- * @requiredField discountRule.discounts
1039
- * @requiredField discountRule.name
1040
- * @permissionId ECOM.DISCOUNT_RULES_CREATE
1041
- * @permissionScope Manage Stores - all permissions
1042
- * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
1043
- * @permissionScope Manage Restaurants - all permissions
1044
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
1045
- * @permissionScope Manage eCommerce - all permissions
1046
- * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
1047
- * @permissionScope Picasso private app mega scope
1048
- * @permissionScopeId SCOPE.TEST.MEGA-PICASSO-MANAGE-SITE
1049
- * @applicableIdentity APP
1050
- * @returns Discount rule.
1051
- * @fqn com.wix.ecom.discounts.DiscountRuleService.CreateDiscountRule
1052
- */
1053
- export declare function createDiscountRule(discountRule: DiscountRule): Promise<DiscountRule & DiscountRuleNonNullableFields>;
1054
- /**
1055
- * Retrieves a discount rule.
1056
- *
1057
- *
1058
- * The `getDiscountRule()` function returns a Promise that resolves when the specified discount rule is retrieved.
1059
- * @param discountRuleId - ID of the discount rule to retrieve.
1060
- * @public
1061
- * @requiredField discountRuleId
1062
- * @permissionId ECOM.DISCOUNT_RULES_READ
1063
- * @permissionScope Manage Stores - all permissions
1064
- * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
1065
- * @permissionScope Read eCommerce - all read permissions
1066
- * @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM
1067
- * @permissionScope Read Stores - all read permissions
1068
- * @permissionScopeId SCOPE.DC-STORES-MEGA.READ-STORES
1069
- * @permissionScope Manage Restaurants - all permissions
1070
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
1071
- * @permissionScope Manage eCommerce - all permissions
1072
- * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
1073
- * @permissionScope Picasso private app mega scope
1074
- * @permissionScopeId SCOPE.TEST.MEGA-PICASSO-MANAGE-SITE
1075
- * @applicableIdentity APP
1076
- * @returns The requested discount rule.
1077
- * @fqn com.wix.ecom.discounts.DiscountRuleService.GetDiscountRule
1078
- */
1079
- export declare function getDiscountRule(discountRuleId: string): Promise<DiscountRule & DiscountRuleNonNullableFields>;
1080
- /**
1081
- * Updates a discount rule's properties.
1082
- *
1083
- *
1084
- * The `updateDiscountRule()` function returns a Promise that resolves when the specified discount rule's properties are updated.
1085
- *
1086
- * 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.
1087
- * @param _id - Discount rule ID.
1088
- * @public
1089
- * @requiredField _id
1090
- * @requiredField discountRule
1091
- * @requiredField discountRule.revision
1092
- * @param discountRule - Discount rule info.
1093
- * @param options - Discount rule info.
1094
- * @permissionId ECOM.DISCOUNT_RULES_UPDATE
1095
- * @permissionScope Manage Stores - all permissions
1096
- * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
1097
- * @permissionScope Manage Restaurants - all permissions
1098
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
1099
- * @permissionScope Manage eCommerce - all permissions
1100
- * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
1101
- * @permissionScope Picasso private app mega scope
1102
- * @permissionScopeId SCOPE.TEST.MEGA-PICASSO-MANAGE-SITE
1103
- * @applicableIdentity APP
1104
- * @returns Updated discount rule.
1105
- * @fqn com.wix.ecom.discounts.DiscountRuleService.UpdateDiscountRule
1106
- */
1107
- export declare function updateDiscountRule(_id: string | null, discountRule: UpdateDiscountRule): Promise<DiscountRule & DiscountRuleNonNullableFields>;
1108
- export interface UpdateDiscountRule {
898
+ interface UpdateDiscountRule {
1109
899
  /**
1110
900
  * Discount rule ID.
1111
901
  * @format GUID
@@ -1170,60 +960,6 @@ export interface UpdateDiscountRule {
1170
960
  */
1171
961
  usageCount?: number;
1172
962
  }
1173
- /**
1174
- * Deletes a discount rule.
1175
- *
1176
- *
1177
- * The `deleteDiscountRule()` function returns a Promise that resolves when the specified discount rule is deleted.
1178
- * @param discountRuleId - ID of the discount rule to delete.
1179
- * @public
1180
- * @requiredField discountRuleId
1181
- * @permissionId ECOM.DISCOUNT_RULES_DELETE
1182
- * @permissionScope Manage Stores - all permissions
1183
- * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
1184
- * @permissionScope Manage Restaurants - all permissions
1185
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
1186
- * @permissionScope Manage eCommerce - all permissions
1187
- * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
1188
- * @permissionScope Picasso private app mega scope
1189
- * @permissionScopeId SCOPE.TEST.MEGA-PICASSO-MANAGE-SITE
1190
- * @applicableIdentity APP
1191
- * @fqn com.wix.ecom.discounts.DiscountRuleService.DeleteDiscountRule
1192
- */
1193
- export declare function deleteDiscountRule(discountRuleId: string): Promise<void>;
1194
- /**
1195
- * Creates a query to retrieve a list of discount rules.
1196
- *
1197
- *
1198
- * The `queryDiscountRules()` function builds a query to retrieve a list of up to 100 discount rules, and returns a [`DiscountRulesQueryBuilder`](#discountrulesquerybuilder) object.
1199
- *
1200
- * 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.
1201
- *
1202
- * 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.
1203
- *
1204
- * By default, `queryDiscountRules()` sorts results by [`ascending("_id")`](/discount-rules/discount-rules-query-builder/ascending) by default. This can be overridden.
1205
- *
1206
- * To learn how to query posts, refer to the table below.
1207
- *
1208
- * 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`.
1209
- * @public
1210
- * @permissionScope Manage Stores - all permissions
1211
- * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
1212
- * @permissionScope Read eCommerce - all read permissions
1213
- * @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM
1214
- * @permissionScope Read Stores - all read permissions
1215
- * @permissionScopeId SCOPE.DC-STORES-MEGA.READ-STORES
1216
- * @permissionScope Manage Restaurants - all permissions
1217
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
1218
- * @permissionScope Manage eCommerce - all permissions
1219
- * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
1220
- * @permissionScope Picasso private app mega scope
1221
- * @permissionScopeId SCOPE.TEST.MEGA-PICASSO-MANAGE-SITE
1222
- * @permissionId ECOM.DISCOUNT_RULES_READ
1223
- * @applicableIdentity APP
1224
- * @fqn com.wix.ecom.discounts.DiscountRuleService.QueryDiscountRules
1225
- */
1226
- export declare function queryDiscountRules(): DiscountRulesQueryBuilder;
1227
963
  interface QueryCursorResult {
1228
964
  cursors: Cursors;
1229
965
  hasNext: () => boolean;
@@ -1231,13 +967,13 @@ interface QueryCursorResult {
1231
967
  length: number;
1232
968
  pageSize: number;
1233
969
  }
1234
- export interface DiscountRulesQueryResult extends QueryCursorResult {
970
+ interface DiscountRulesQueryResult extends QueryCursorResult {
1235
971
  items: DiscountRule[];
1236
972
  query: DiscountRulesQueryBuilder;
1237
973
  next: () => Promise<DiscountRulesQueryResult>;
1238
974
  prev: () => Promise<DiscountRulesQueryResult>;
1239
975
  }
1240
- export interface DiscountRulesQueryBuilder {
976
+ interface DiscountRulesQueryBuilder {
1241
977
  /** @param propertyName - Property whose value is compared with `value`.
1242
978
  * @param value - Value to compare against.
1243
979
  */
@@ -1282,4 +1018,5 @@ export interface DiscountRulesQueryBuilder {
1282
1018
  skipTo: (cursor: string) => DiscountRulesQueryBuilder;
1283
1019
  find: () => Promise<DiscountRulesQueryResult>;
1284
1020
  }
1285
- 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 };