@wix/auto_sdk_ecom_discount-rules 1.0.5 → 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/{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 -274
  2. package/build/{cjs/src/ecom-discounts-v1-discount-rule-discount-rules.universal.d.ts → ecom-discounts-v1-discount-rule-discount-rules.universal--1DNaPHt.d.ts} +78 -274
  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/{es/src/ecom-discounts-v1-discount-rule-discount-rules.universal.d.ts → ecom-discounts-v1-discount-rule-discount-rules.universal--1DNaPHt.d.mts} +78 -274
  10. package/build/{es/src/ecom-discounts-v1-discount-rule-discount-rules.universal.d.ts → internal/ecom-discounts-v1-discount-rule-discount-rules.universal--1DNaPHt.d.ts} +78 -274
  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 -823
  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 -823
  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 -823
  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 -823
  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,5 +1,4 @@
1
- import { NonNullablePaths } from '@wix/sdk-types';
2
- export interface DiscountRule {
1
+ interface DiscountRule {
3
2
  /**
4
3
  * Discount rule ID.
5
4
  * @format GUID
@@ -65,7 +64,7 @@ export interface DiscountRule {
65
64
  usageCount?: number;
66
65
  }
67
66
  /** DiscountTrigger - description of a set of conditions, that if met, will trigger the associated rule actions */
68
- export interface DiscountTrigger extends DiscountTriggerTriggerOneOf {
67
+ interface DiscountTrigger extends DiscountTriggerTriggerOneOf {
69
68
  /** Chain multiple triggers with the `and` operator. */
70
69
  and?: And;
71
70
  /** Chain multiple triggers with the `or` operator. */
@@ -87,7 +86,7 @@ export interface DiscountTrigger extends DiscountTriggerTriggerOneOf {
87
86
  triggerType?: TriggerType;
88
87
  }
89
88
  /** @oneof */
90
- export interface DiscountTriggerTriggerOneOf {
89
+ interface DiscountTriggerTriggerOneOf {
91
90
  /** Chain multiple triggers with the `and` operator. */
92
91
  and?: And;
93
92
  /** Chain multiple triggers with the `or` operator. */
@@ -105,7 +104,7 @@ export interface DiscountTriggerTriggerOneOf {
105
104
  * 2. Specific catalog item - type = CATALOG_ITEM, CatalogItemFilter with `catalog_app_id` + `catalog_item_ids`
106
105
  * 3. External catalog filter - type = CUSTOM_FILTER, CustomFilter with 'app_id' + 'params'
107
106
  */
108
- export interface Scope extends ScopeScopeItemsOneOf {
107
+ interface Scope extends ScopeScopeItemsOneOf {
109
108
  /** Catalog item filter. Must be passed with `type."CATALOG_ITEM"`. */
110
109
  catalogItemFilter?: CatalogItemFilter;
111
110
  /** Custom filter. Must be passed with `type."CATALOG_ITEM"`. */
@@ -120,20 +119,20 @@ export interface Scope extends ScopeScopeItemsOneOf {
120
119
  type?: ScopeType;
121
120
  }
122
121
  /** @oneof */
123
- export interface ScopeScopeItemsOneOf {
122
+ interface ScopeScopeItemsOneOf {
124
123
  /** Catalog item filter. Must be passed with `type."CATALOG_ITEM"`. */
125
124
  catalogItemFilter?: CatalogItemFilter;
126
125
  /** Custom filter. Must be passed with `type."CATALOG_ITEM"`. */
127
126
  customFilter?: CustomFilter;
128
127
  }
129
- export declare enum ScopeType {
128
+ declare enum ScopeType {
130
129
  UNDEFINED_SCOPE = "UNDEFINED_SCOPE",
131
130
  /** Specific catalog items */
132
131
  CATALOG_ITEM = "CATALOG_ITEM",
133
132
  /** Specific items by custom filters */
134
133
  CUSTOM_FILTER = "CUSTOM_FILTER"
135
134
  }
136
- export interface CatalogItemFilter {
135
+ interface CatalogItemFilter {
137
136
  /**
138
137
  * Catalog App ID. For example, the Wix Stores, Wix Bookings, or 3rd-party `appId`.
139
138
  * @format GUID
@@ -147,7 +146,7 @@ export interface CatalogItemFilter {
147
146
  */
148
147
  catalogItemIds?: string[];
149
148
  }
150
- export interface CustomFilter {
149
+ interface CustomFilter {
151
150
  /**
152
151
  * Custom filter app ID, when relevant.
153
152
  * @format GUID
@@ -160,7 +159,7 @@ export interface CustomFilter {
160
159
  */
161
160
  params?: Record<string, any> | null;
162
161
  }
163
- export interface And {
162
+ interface And {
164
163
  /**
165
164
  * List of triggers to have an "AND" operator between their results.
166
165
  * @minSize 2
@@ -168,7 +167,7 @@ export interface And {
168
167
  */
169
168
  triggers?: DiscountTrigger[];
170
169
  }
171
- export interface Or {
170
+ interface Or {
172
171
  /**
173
172
  * List of triggers to have an "OR" operator between their results.
174
173
  * @minSize 2
@@ -176,7 +175,7 @@ export interface Or {
176
175
  */
177
176
  triggers?: DiscountTrigger[];
178
177
  }
179
- export interface Custom {
178
+ interface Custom {
180
179
  /**
181
180
  * Trigger ID.
182
181
  * @minLength 1
@@ -189,7 +188,7 @@ export interface Custom {
189
188
  */
190
189
  appId?: string;
191
190
  }
192
- export interface SubtotalRange {
191
+ interface SubtotalRange {
193
192
  /**
194
193
  * Relevant scopes for `"SPECIFIC_ITEMS"` target type.
195
194
  * @maxSize 50
@@ -206,7 +205,7 @@ export interface SubtotalRange {
206
205
  */
207
206
  to?: string | null;
208
207
  }
209
- export interface ItemQuantityRange {
208
+ interface ItemQuantityRange {
210
209
  /**
211
210
  * Relevant scopes for `"SPECIFIC_ITEMS"` target type.
212
211
  * @maxSize 50
@@ -223,7 +222,7 @@ export interface ItemQuantityRange {
223
222
  */
224
223
  to?: number | null;
225
224
  }
226
- export declare enum TriggerType {
225
+ declare enum TriggerType {
227
226
  UNDEFINED = "UNDEFINED",
228
227
  /** Operator used for chaining multiple triggers. Currently 1 `AND` chain operator is supported. */
229
228
  AND = "AND",
@@ -236,13 +235,13 @@ export declare enum TriggerType {
236
235
  /** Chain multiple triggers with OR operator */
237
236
  OR = "OR"
238
237
  }
239
- export interface ActiveTimeInfo {
238
+ interface ActiveTimeInfo {
240
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. */
241
240
  start?: Date | null;
242
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. */
243
242
  end?: Date | null;
244
243
  }
245
- export interface Discounts {
244
+ interface Discounts {
246
245
  /**
247
246
  * Discounts.
248
247
  * @minSize 1
@@ -250,7 +249,7 @@ export interface Discounts {
250
249
  */
251
250
  values?: Discount[];
252
251
  }
253
- export interface Discount extends DiscountDiscountOneOf {
252
+ interface Discount extends DiscountDiscountOneOf {
254
253
  /**
255
254
  * Percentage to discount from original price.
256
255
  * @min 0.1
@@ -285,7 +284,7 @@ export interface Discount extends DiscountDiscountOneOf {
285
284
  discountType?: DiscountType;
286
285
  }
287
286
  /** @oneof */
288
- export interface DiscountDiscountOneOf {
287
+ interface DiscountDiscountOneOf {
289
288
  /**
290
289
  * Percentage to discount from original price.
291
290
  * @min 0.1
@@ -303,13 +302,13 @@ export interface DiscountDiscountOneOf {
303
302
  */
304
303
  fixedPrice?: string;
305
304
  }
306
- export declare enum Type {
305
+ declare enum Type {
307
306
  /** Target type is not defined */
308
307
  UNDEFINED = "UNDEFINED",
309
308
  /** Target type is a set of specific items */
310
309
  SPECIFIC_ITEMS = "SPECIFIC_ITEMS"
311
310
  }
312
- export interface SpecificItemsInfo {
311
+ interface SpecificItemsInfo {
313
312
  /**
314
313
  * All associated scopes for `"SPECIFIC_ITEMS"` target type.
315
314
  * @minSize 1
@@ -317,7 +316,7 @@ export interface SpecificItemsInfo {
317
316
  */
318
317
  scopes?: Scope[];
319
318
  }
320
- export declare enum DiscountType {
319
+ declare enum DiscountType {
321
320
  UNDEFINED = "UNDEFINED",
322
321
  /** Price is reduced by percentage value. */
323
322
  PERCENTAGE = "PERCENTAGE",
@@ -326,7 +325,7 @@ export declare enum DiscountType {
326
325
  /** Price will be set to fixed amount. */
327
326
  FIXED_PRICE = "FIXED_PRICE"
328
327
  }
329
- export interface BuyXGetYInfo {
328
+ interface BuyXGetYInfo {
330
329
  /** Information about which items must be in the cart (buy X) for the discount to apply (get Y). */
331
330
  customerBuys?: CustomerBuy;
332
331
  /** Information about which items will be discounted (get Y). */
@@ -340,7 +339,7 @@ export interface BuyXGetYInfo {
340
339
  */
341
340
  limit?: number | null;
342
341
  }
343
- export interface CustomerBuy extends CustomerBuyConditionOneOf {
342
+ interface CustomerBuy extends CustomerBuyConditionOneOf {
344
343
  /**
345
344
  * Minimum number of items the customer must add to the cart to be eligible for a discount.
346
345
  * @min 1
@@ -359,7 +358,7 @@ export interface CustomerBuy extends CustomerBuyConditionOneOf {
359
358
  scopes?: Scope[];
360
359
  }
361
360
  /** @oneof */
362
- export interface CustomerBuyConditionOneOf {
361
+ interface CustomerBuyConditionOneOf {
363
362
  /**
364
363
  * Minimum number of items the customer must add to the cart to be eligible for a discount.
365
364
  * @min 1
@@ -371,7 +370,7 @@ export interface CustomerBuyConditionOneOf {
371
370
  */
372
371
  minimumSpend?: string | null;
373
372
  }
374
- export interface CustomerGet {
373
+ interface CustomerGet {
375
374
  /**
376
375
  * Exact number of items in the cart that will be discounted.
377
376
  * If the cart contains fewer items than the value of quantity, the discount will not apply.
@@ -385,7 +384,7 @@ export interface CustomerGet {
385
384
  */
386
385
  scopes?: Scope[];
387
386
  }
388
- export declare enum Status {
387
+ declare enum Status {
389
388
  /** Rule status is not defined. */
390
389
  UNDEFINED = "UNDEFINED",
391
390
  /** Rule status is live. */
@@ -396,7 +395,7 @@ export declare enum Status {
396
395
  PENDING = "PENDING"
397
396
  }
398
397
  /** The discount settings */
399
- export interface DiscountSettings {
398
+ interface DiscountSettings {
400
399
  /** Discount applies to either `ALL_ITEMS`, or to the `LOWEST_PRICED_ITEM`. */
401
400
  appliesTo?: AppliedSubjectType;
402
401
  /**
@@ -420,14 +419,14 @@ export interface DiscountSettings {
420
419
  usageLimitPerUser?: number | null;
421
420
  }
422
421
  /** TODO: check if can be removed */
423
- export declare enum AppliedSubjectType {
422
+ declare enum AppliedSubjectType {
424
423
  UNDEFINED = "UNDEFINED",
425
424
  /** Discount applies to all items at checkout. */
426
425
  ALL_ITEMS = "ALL_ITEMS",
427
426
  /** Discount applies to the lowest priced item at checkout. */
428
427
  LOWEST_PRICED_ITEM = "LOWEST_PRICED_ITEM"
429
428
  }
430
- export interface ExtendedFields {
429
+ interface ExtendedFields {
431
430
  /**
432
431
  * Extended field data. Each key corresponds to the namespace of the app that created the extended fields.
433
432
  * The value of each key is structured according to the schema defined when the extended fields were configured.
@@ -438,47 +437,47 @@ export interface ExtendedFields {
438
437
  */
439
438
  namespaces?: Record<string, Record<string, any>>;
440
439
  }
441
- export interface CreateDiscountRuleRequest {
440
+ interface CreateDiscountRuleRequest {
442
441
  /** Discount rule info. */
443
442
  discountRule: DiscountRule;
444
443
  }
445
- export interface CreateDiscountRuleResponse {
444
+ interface CreateDiscountRuleResponse {
446
445
  /** Discount rule. */
447
446
  discountRule?: DiscountRule;
448
447
  }
449
- export interface GetDiscountRuleRequest {
448
+ interface GetDiscountRuleRequest {
450
449
  /**
451
450
  * ID of the discount rule to retrieve.
452
451
  * @format GUID
453
452
  */
454
453
  discountRuleId: string;
455
454
  }
456
- export interface GetDiscountRuleResponse {
455
+ interface GetDiscountRuleResponse {
457
456
  /** The requested discount rule. */
458
457
  discountRule?: DiscountRule;
459
458
  }
460
- export interface UpdateDiscountRuleRequest {
459
+ interface UpdateDiscountRuleRequest {
461
460
  /** Discount rule info. */
462
461
  discountRule: DiscountRule;
463
462
  }
464
- export interface UpdateDiscountRuleResponse {
463
+ interface UpdateDiscountRuleResponse {
465
464
  /** Updated discount rule. */
466
465
  discountRule?: DiscountRule;
467
466
  }
468
- export interface DeleteDiscountRuleRequest {
467
+ interface DeleteDiscountRuleRequest {
469
468
  /**
470
469
  * ID of the discount rule to delete.
471
470
  * @format GUID
472
471
  */
473
472
  discountRuleId: string;
474
473
  }
475
- export interface DeleteDiscountRuleResponse {
474
+ interface DeleteDiscountRuleResponse {
476
475
  }
477
- export interface QueryDiscountRulesRequest {
476
+ interface QueryDiscountRulesRequest {
478
477
  /** Query options. */
479
478
  query?: PlatformQuery;
480
479
  }
481
- export interface PlatformQuery extends PlatformQueryPagingMethodOneOf {
480
+ interface PlatformQuery extends PlatformQueryPagingMethodOneOf {
482
481
  /** Pointer to page of results using offset. Cannot be used together with `cursorPaging`. */
483
482
  paging?: PlatformPaging;
484
483
  /** Cursor pointing to page of results. Cannot be used together with `paging`. `cursorPaging.cursor` can not be used together with `filter` or `sort`. */
@@ -489,13 +488,13 @@ export interface PlatformQuery extends PlatformQueryPagingMethodOneOf {
489
488
  sort?: Sorting[];
490
489
  }
491
490
  /** @oneof */
492
- export interface PlatformQueryPagingMethodOneOf {
491
+ interface PlatformQueryPagingMethodOneOf {
493
492
  /** Pointer to page of results using offset. Cannot be used together with `cursorPaging`. */
494
493
  paging?: PlatformPaging;
495
494
  /** Cursor pointing to page of results. Cannot be used together with `paging`. `cursorPaging.cursor` can not be used together with `filter` or `sort`. */
496
495
  cursorPaging?: CursorPaging;
497
496
  }
498
- export interface Sorting {
497
+ interface Sorting {
499
498
  /**
500
499
  * Name of the field to sort by.
501
500
  * @maxLength 512
@@ -504,11 +503,11 @@ export interface Sorting {
504
503
  /** Sort order. */
505
504
  order?: SortOrder;
506
505
  }
507
- export declare enum SortOrder {
506
+ declare enum SortOrder {
508
507
  ASC = "ASC",
509
508
  DESC = "DESC"
510
509
  }
511
- export interface PlatformPaging {
510
+ interface PlatformPaging {
512
511
  /**
513
512
  * Number of items to load.
514
513
  * @max 100
@@ -517,7 +516,7 @@ export interface PlatformPaging {
517
516
  /** Number of items to skip in the current sort order. */
518
517
  offset?: number | null;
519
518
  }
520
- export interface CursorPaging {
519
+ interface CursorPaging {
521
520
  /**
522
521
  * Maximum number of items to return in the results.
523
522
  * @max 100
@@ -532,13 +531,13 @@ export interface CursorPaging {
532
531
  */
533
532
  cursor?: string | null;
534
533
  }
535
- export interface QueryDiscountRulesResponse {
534
+ interface QueryDiscountRulesResponse {
536
535
  /** List of discount rules. */
537
536
  discountRules?: DiscountRule[];
538
537
  /** Details on the paged set of results returned. */
539
538
  pagingMetadata?: PlatformPagingMetadata;
540
539
  }
541
- export interface PlatformPagingMetadata {
540
+ interface PlatformPagingMetadata {
542
541
  /** The number of items returned in this response. */
543
542
  count?: number | null;
544
543
  /** The offset which was requested. Returned if offset paging was used. */
@@ -548,7 +547,7 @@ export interface PlatformPagingMetadata {
548
547
  /** Cursors to navigate through result pages. Returned if cursor paging was used. */
549
548
  cursors?: Cursors;
550
549
  }
551
- export interface Cursors {
550
+ interface Cursors {
552
551
  /**
553
552
  * Cursor string pointing to the next page in the list of results.
554
553
  * @maxLength 16000
@@ -560,7 +559,7 @@ export interface Cursors {
560
559
  */
561
560
  prev?: string | null;
562
561
  }
563
- export interface GetAppliedDiscountsRequest {
562
+ interface GetAppliedDiscountsRequest {
564
563
  /**
565
564
  * Line items for which to check for discount rules.
566
565
  * @maxSize 1000
@@ -572,7 +571,7 @@ export interface GetAppliedDiscountsRequest {
572
571
  */
573
572
  purchaseFlowId?: string | null;
574
573
  }
575
- export interface LineItem {
574
+ interface LineItem {
576
575
  /**
577
576
  * Line item ID.
578
577
  * @minLength 1
@@ -593,7 +592,7 @@ export interface LineItem {
593
592
  price?: string;
594
593
  }
595
594
  /** Used for grouping line items. Sent when an item is added to a cart, checkout, or order. */
596
- export interface CatalogReference {
595
+ interface CatalogReference {
597
596
  /**
598
597
  * ID of the item within the catalog it belongs to.
599
598
  * @minLength 1
@@ -619,11 +618,11 @@ export interface CatalogReference {
619
618
  */
620
619
  options?: Record<string, any> | null;
621
620
  }
622
- export interface GetAppliedDiscountsResponse {
621
+ interface GetAppliedDiscountsResponse {
623
622
  /** All eligible discounts. */
624
623
  appliedDiscounts?: AppliedDiscount[];
625
624
  }
626
- export interface AppliedDiscount {
625
+ interface AppliedDiscount {
627
626
  /** Discount type. */
628
627
  discountType?: Type;
629
628
  /**
@@ -635,7 +634,7 @@ export interface AppliedDiscount {
635
634
  /** Applied discount rule. */
636
635
  appliedDiscountRule?: AppliedDiscountRule;
637
636
  }
638
- export interface AppliedDiscountRule {
637
+ interface AppliedDiscountRule {
639
638
  /**
640
639
  * Applied discount rule ID.
641
640
  * @format GUID
@@ -648,7 +647,7 @@ export interface AppliedDiscountRule {
648
647
  /** Discount rule type. */
649
648
  discountRuleType?: DiscountType;
650
649
  }
651
- export interface DiscountRuleName {
650
+ interface DiscountRuleName {
652
651
  /**
653
652
  * Original discount rule name (in site's default language).
654
653
  * @minLength 1
@@ -664,7 +663,7 @@ export interface DiscountRuleName {
664
663
  */
665
664
  translated?: string | null;
666
665
  }
667
- export interface MultiCurrencyPrice {
666
+ interface MultiCurrencyPrice {
668
667
  /**
669
668
  * Amount.
670
669
  * @decimalValue options { gte:0, lte:1000000000000000 }
@@ -687,7 +686,7 @@ export interface MultiCurrencyPrice {
687
686
  */
688
687
  formattedConvertedAmount?: string;
689
688
  }
690
- export interface DomainEvent extends DomainEventBodyOneOf {
689
+ interface DomainEvent extends DomainEventBodyOneOf {
691
690
  createdEvent?: EntityCreatedEvent;
692
691
  updatedEvent?: EntityUpdatedEvent;
693
692
  deletedEvent?: EntityDeletedEvent;
@@ -730,19 +729,19 @@ export interface DomainEvent extends DomainEventBodyOneOf {
730
729
  entityEventSequence?: string | null;
731
730
  }
732
731
  /** @oneof */
733
- export interface DomainEventBodyOneOf {
732
+ interface DomainEventBodyOneOf {
734
733
  createdEvent?: EntityCreatedEvent;
735
734
  updatedEvent?: EntityUpdatedEvent;
736
735
  deletedEvent?: EntityDeletedEvent;
737
736
  actionEvent?: ActionEvent;
738
737
  }
739
- export interface EntityCreatedEvent {
738
+ interface EntityCreatedEvent {
740
739
  entity?: string;
741
740
  }
742
- export interface RestoreInfo {
741
+ interface RestoreInfo {
743
742
  deletedDate?: Date | null;
744
743
  }
745
- export interface EntityUpdatedEvent {
744
+ interface EntityUpdatedEvent {
746
745
  /**
747
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.
748
747
  * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
@@ -750,20 +749,20 @@ export interface EntityUpdatedEvent {
750
749
  */
751
750
  currentEntity?: string;
752
751
  }
753
- export interface EntityDeletedEvent {
752
+ interface EntityDeletedEvent {
754
753
  /** Entity that was deleted */
755
754
  deletedEntity?: string | null;
756
755
  }
757
- export interface ActionEvent {
756
+ interface ActionEvent {
758
757
  body?: string;
759
758
  }
760
- export interface Empty {
759
+ interface Empty {
761
760
  }
762
- export interface DiscountRuleUsageLimitReached {
761
+ interface DiscountRuleUsageLimitReached {
763
762
  /** Discount Rule */
764
763
  rule?: DiscountRule;
765
764
  }
766
- export interface MessageEnvelope {
765
+ interface MessageEnvelope {
767
766
  /**
768
767
  * App instance ID.
769
768
  * @format GUID
@@ -779,7 +778,7 @@ export interface MessageEnvelope {
779
778
  /** Stringify payload. */
780
779
  data?: string;
781
780
  }
782
- export interface IdentificationData extends IdentificationDataIdOneOf {
781
+ interface IdentificationData extends IdentificationDataIdOneOf {
783
782
  /**
784
783
  * ID of a site visitor that has not logged in to the site.
785
784
  * @format GUID
@@ -804,7 +803,7 @@ export interface IdentificationData extends IdentificationDataIdOneOf {
804
803
  identityType?: WebhookIdentityType;
805
804
  }
806
805
  /** @oneof */
807
- export interface IdentificationDataIdOneOf {
806
+ interface IdentificationDataIdOneOf {
808
807
  /**
809
808
  * ID of a site visitor that has not logged in to the site.
810
809
  * @format GUID
@@ -826,14 +825,14 @@ export interface IdentificationDataIdOneOf {
826
825
  */
827
826
  appId?: string;
828
827
  }
829
- export declare enum WebhookIdentityType {
828
+ declare enum WebhookIdentityType {
830
829
  UNKNOWN = "UNKNOWN",
831
830
  ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
832
831
  MEMBER = "MEMBER",
833
832
  WIX_USER = "WIX_USER",
834
833
  APP = "APP"
835
834
  }
836
- export interface BaseEventMetadata {
835
+ interface BaseEventMetadata {
837
836
  /**
838
837
  * App instance ID.
839
838
  * @format GUID
@@ -847,7 +846,7 @@ export interface BaseEventMetadata {
847
846
  /** The identification type and identity data. */
848
847
  identity?: IdentificationData;
849
848
  }
850
- export interface EventMetadata extends BaseEventMetadata {
849
+ interface EventMetadata extends BaseEventMetadata {
851
850
  /**
852
851
  * Unique event ID.
853
852
  * Allows clients to ignore duplicate webhooks.
@@ -885,160 +884,18 @@ export interface EventMetadata extends BaseEventMetadata {
885
884
  */
886
885
  entityEventSequence?: string | null;
887
886
  }
888
- export interface DiscountRuleCreatedEnvelope {
887
+ interface DiscountRuleCreatedEnvelope {
889
888
  entity: DiscountRule;
890
889
  metadata: EventMetadata;
891
890
  }
892
- /**
893
- * Triggered when a discount rule is created.
894
- * @permissionScope Manage Stores - all permissions
895
- * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
896
- * @permissionScope Read eCommerce - all read permissions
897
- * @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM
898
- * @permissionScope Read Stores - all read permissions
899
- * @permissionScopeId SCOPE.DC-STORES-MEGA.READ-STORES
900
- * @permissionScope Manage Restaurants - all permissions
901
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
902
- * @permissionScope Manage eCommerce - all permissions
903
- * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
904
- * @permissionScope Picasso private app mega scope
905
- * @permissionScopeId SCOPE.TEST.MEGA-PICASSO-MANAGE-SITE
906
- * @permissionId ECOM.DISCOUNT_RULES_READ
907
- * @webhook
908
- * @eventType wix.ecom.discounts.v1.discount_rule_created
909
- * @serviceIdentifier com.wix.ecom.discounts.DiscountRuleService
910
- * @slug created
911
- */
912
- export declare function onDiscountRuleCreated(handler: (event: DiscountRuleCreatedEnvelope) => void | Promise<void>): void;
913
- export interface DiscountRuleDeletedEnvelope {
891
+ interface DiscountRuleDeletedEnvelope {
914
892
  metadata: EventMetadata;
915
893
  }
916
- /**
917
- * Triggered when a discount rule is deleted.
918
- * @permissionScope Manage Stores - all permissions
919
- * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
920
- * @permissionScope Read eCommerce - all read permissions
921
- * @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM
922
- * @permissionScope Read Stores - all read permissions
923
- * @permissionScopeId SCOPE.DC-STORES-MEGA.READ-STORES
924
- * @permissionScope Manage Restaurants - all permissions
925
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
926
- * @permissionScope Manage eCommerce - all permissions
927
- * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
928
- * @permissionScope Picasso private app mega scope
929
- * @permissionScopeId SCOPE.TEST.MEGA-PICASSO-MANAGE-SITE
930
- * @permissionId ECOM.DISCOUNT_RULES_READ
931
- * @webhook
932
- * @eventType wix.ecom.discounts.v1.discount_rule_deleted
933
- * @serviceIdentifier com.wix.ecom.discounts.DiscountRuleService
934
- * @slug deleted
935
- */
936
- export declare function onDiscountRuleDeleted(handler: (event: DiscountRuleDeletedEnvelope) => void | Promise<void>): void;
937
- export interface DiscountRuleUpdatedEnvelope {
894
+ interface DiscountRuleUpdatedEnvelope {
938
895
  entity: DiscountRule;
939
896
  metadata: EventMetadata;
940
897
  }
941
- /**
942
- * Triggered when a discount rule is updated.
943
- * @permissionScope Manage Stores - all permissions
944
- * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
945
- * @permissionScope Read eCommerce - all read permissions
946
- * @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM
947
- * @permissionScope Read Stores - all read permissions
948
- * @permissionScopeId SCOPE.DC-STORES-MEGA.READ-STORES
949
- * @permissionScope Manage Restaurants - all permissions
950
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
951
- * @permissionScope Manage eCommerce - all permissions
952
- * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
953
- * @permissionScope Picasso private app mega scope
954
- * @permissionScopeId SCOPE.TEST.MEGA-PICASSO-MANAGE-SITE
955
- * @permissionId ECOM.DISCOUNT_RULES_READ
956
- * @webhook
957
- * @eventType wix.ecom.discounts.v1.discount_rule_updated
958
- * @serviceIdentifier com.wix.ecom.discounts.DiscountRuleService
959
- * @slug updated
960
- */
961
- export declare function onDiscountRuleUpdated(handler: (event: DiscountRuleUpdatedEnvelope) => void | Promise<void>): void;
962
- type DiscountRuleNonNullablePaths = `trigger.and.triggers` | `trigger.or.triggers` | `trigger.customTrigger._id` | `trigger.customTrigger.appId` | `trigger.subtotalRange.scopes` | `trigger.subtotalRange.scopes.${number}.catalogItemFilter.catalogAppId` | `trigger.subtotalRange.scopes.${number}.catalogItemFilter.catalogItemIds` | `trigger.subtotalRange.scopes.${number}.customFilter.appId` | `trigger.subtotalRange.scopes.${number}._id` | `trigger.subtotalRange.scopes.${number}.type` | `trigger.itemQuantityRange.scopes` | `trigger.triggerType` | `discounts.values` | `discounts.values.${number}.percentage` | `discounts.values.${number}.fixedAmount` | `discounts.values.${number}.fixedPrice` | `discounts.values.${number}.targetType` | `discounts.values.${number}.specificItemsInfo.scopes` | `discounts.values.${number}.specificItemsInfo.scopes.${number}.catalogItemFilter.catalogAppId` | `discounts.values.${number}.specificItemsInfo.scopes.${number}.catalogItemFilter.catalogItemIds` | `discounts.values.${number}.specificItemsInfo.scopes.${number}.customFilter.appId` | `discounts.values.${number}.specificItemsInfo.scopes.${number}._id` | `discounts.values.${number}.specificItemsInfo.scopes.${number}.type` | `discounts.values.${number}.discountType` | `status` | `usageCount`;
963
- /**
964
- * Creates a new discount rule.
965
- *
966
- *
967
- * The `createDiscountRule()` function returns a Promise that resolves to the new discount rule when it's created.
968
- * @param discountRule - Discount rule info.
969
- * @public
970
- * @requiredField discountRule
971
- * @requiredField discountRule.discounts
972
- * @requiredField discountRule.name
973
- * @permissionId ECOM.DISCOUNT_RULES_CREATE
974
- * @permissionScope Manage Stores - all permissions
975
- * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
976
- * @permissionScope Manage Restaurants - all permissions
977
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
978
- * @permissionScope Manage eCommerce - all permissions
979
- * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
980
- * @permissionScope Picasso private app mega scope
981
- * @permissionScopeId SCOPE.TEST.MEGA-PICASSO-MANAGE-SITE
982
- * @applicableIdentity APP
983
- * @returns Discount rule.
984
- * @fqn com.wix.ecom.discounts.DiscountRuleService.CreateDiscountRule
985
- */
986
- export declare function createDiscountRule(discountRule: NonNullablePaths<DiscountRule, `discounts` | `name`>): Promise<NonNullablePaths<DiscountRule, DiscountRuleNonNullablePaths>>;
987
- /**
988
- * Retrieves a discount rule.
989
- *
990
- *
991
- * The `getDiscountRule()` function returns a Promise that resolves when the specified discount rule is retrieved.
992
- * @param discountRuleId - ID of the discount rule to retrieve.
993
- * @public
994
- * @requiredField discountRuleId
995
- * @permissionId ECOM.DISCOUNT_RULES_READ
996
- * @permissionScope Manage Stores - all permissions
997
- * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
998
- * @permissionScope Read eCommerce - all read permissions
999
- * @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM
1000
- * @permissionScope Read Stores - all read permissions
1001
- * @permissionScopeId SCOPE.DC-STORES-MEGA.READ-STORES
1002
- * @permissionScope Manage Restaurants - all permissions
1003
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
1004
- * @permissionScope Manage eCommerce - all permissions
1005
- * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
1006
- * @permissionScope Picasso private app mega scope
1007
- * @permissionScopeId SCOPE.TEST.MEGA-PICASSO-MANAGE-SITE
1008
- * @applicableIdentity APP
1009
- * @returns The requested discount rule.
1010
- * @fqn com.wix.ecom.discounts.DiscountRuleService.GetDiscountRule
1011
- */
1012
- export declare function getDiscountRule(discountRuleId: string): Promise<NonNullablePaths<DiscountRule, DiscountRuleNonNullablePaths>>;
1013
- /**
1014
- * Updates a discount rule's properties.
1015
- *
1016
- *
1017
- * The `updateDiscountRule()` function returns a Promise that resolves when the specified discount rule's properties are updated.
1018
- *
1019
- * 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.
1020
- * @param _id - Discount rule ID.
1021
- * @public
1022
- * @requiredField _id
1023
- * @requiredField discountRule
1024
- * @requiredField discountRule.revision
1025
- * @param discountRule - Discount rule info.
1026
- * @param options - Discount rule info.
1027
- * @permissionId ECOM.DISCOUNT_RULES_UPDATE
1028
- * @permissionScope Manage Stores - all permissions
1029
- * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
1030
- * @permissionScope Manage Restaurants - all permissions
1031
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
1032
- * @permissionScope Manage eCommerce - all permissions
1033
- * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
1034
- * @permissionScope Picasso private app mega scope
1035
- * @permissionScopeId SCOPE.TEST.MEGA-PICASSO-MANAGE-SITE
1036
- * @applicableIdentity APP
1037
- * @returns Updated discount rule.
1038
- * @fqn com.wix.ecom.discounts.DiscountRuleService.UpdateDiscountRule
1039
- */
1040
- export declare function updateDiscountRule(_id: string, discountRule: NonNullablePaths<UpdateDiscountRule, `revision`>): Promise<NonNullablePaths<DiscountRule, DiscountRuleNonNullablePaths>>;
1041
- export interface UpdateDiscountRule {
898
+ interface UpdateDiscountRule {
1042
899
  /**
1043
900
  * Discount rule ID.
1044
901
  * @format GUID
@@ -1103,60 +960,6 @@ export interface UpdateDiscountRule {
1103
960
  */
1104
961
  usageCount?: number;
1105
962
  }
1106
- /**
1107
- * Deletes a discount rule.
1108
- *
1109
- *
1110
- * The `deleteDiscountRule()` function returns a Promise that resolves when the specified discount rule is deleted.
1111
- * @param discountRuleId - ID of the discount rule to delete.
1112
- * @public
1113
- * @requiredField discountRuleId
1114
- * @permissionId ECOM.DISCOUNT_RULES_DELETE
1115
- * @permissionScope Manage Stores - all permissions
1116
- * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
1117
- * @permissionScope Manage Restaurants - all permissions
1118
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
1119
- * @permissionScope Manage eCommerce - all permissions
1120
- * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
1121
- * @permissionScope Picasso private app mega scope
1122
- * @permissionScopeId SCOPE.TEST.MEGA-PICASSO-MANAGE-SITE
1123
- * @applicableIdentity APP
1124
- * @fqn com.wix.ecom.discounts.DiscountRuleService.DeleteDiscountRule
1125
- */
1126
- export declare function deleteDiscountRule(discountRuleId: string): Promise<void>;
1127
- /**
1128
- * Creates a query to retrieve a list of discount rules.
1129
- *
1130
- *
1131
- * The `queryDiscountRules()` function builds a query to retrieve a list of up to 100 discount rules, and returns a [`DiscountRulesQueryBuilder`](#discountrulesquerybuilder) object.
1132
- *
1133
- * 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.
1134
- *
1135
- * 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.
1136
- *
1137
- * By default, `queryDiscountRules()` sorts results by [`ascending("_id")`](/discount-rules/discount-rules-query-builder/ascending) by default. This can be overridden.
1138
- *
1139
- * To learn how to query posts, refer to the table below.
1140
- *
1141
- * 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`.
1142
- * @public
1143
- * @permissionScope Manage Stores - all permissions
1144
- * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
1145
- * @permissionScope Read eCommerce - all read permissions
1146
- * @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM
1147
- * @permissionScope Read Stores - all read permissions
1148
- * @permissionScopeId SCOPE.DC-STORES-MEGA.READ-STORES
1149
- * @permissionScope Manage Restaurants - all permissions
1150
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
1151
- * @permissionScope Manage eCommerce - all permissions
1152
- * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
1153
- * @permissionScope Picasso private app mega scope
1154
- * @permissionScopeId SCOPE.TEST.MEGA-PICASSO-MANAGE-SITE
1155
- * @permissionId ECOM.DISCOUNT_RULES_READ
1156
- * @applicableIdentity APP
1157
- * @fqn com.wix.ecom.discounts.DiscountRuleService.QueryDiscountRules
1158
- */
1159
- export declare function queryDiscountRules(): DiscountRulesQueryBuilder;
1160
963
  interface QueryCursorResult {
1161
964
  cursors: Cursors;
1162
965
  hasNext: () => boolean;
@@ -1164,13 +967,13 @@ interface QueryCursorResult {
1164
967
  length: number;
1165
968
  pageSize: number;
1166
969
  }
1167
- export interface DiscountRulesQueryResult extends QueryCursorResult {
970
+ interface DiscountRulesQueryResult extends QueryCursorResult {
1168
971
  items: DiscountRule[];
1169
972
  query: DiscountRulesQueryBuilder;
1170
973
  next: () => Promise<DiscountRulesQueryResult>;
1171
974
  prev: () => Promise<DiscountRulesQueryResult>;
1172
975
  }
1173
- export interface DiscountRulesQueryBuilder {
976
+ interface DiscountRulesQueryBuilder {
1174
977
  /** @param propertyName - Property whose value is compared with `value`.
1175
978
  * @param value - Value to compare against.
1176
979
  */
@@ -1215,4 +1018,5 @@ export interface DiscountRulesQueryBuilder {
1215
1018
  skipTo: (cursor: string) => DiscountRulesQueryBuilder;
1216
1019
  find: () => Promise<DiscountRulesQueryResult>;
1217
1020
  }
1218
- 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 };