@wix/auto_sdk_benefit-programs_pool-definitions 1.0.12 → 1.0.14

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/index.d.ts +1 -0
  2. package/build/cjs/index.js +18 -0
  3. package/build/cjs/index.js.map +1 -0
  4. package/build/cjs/index.typings.d.ts +1 -0
  5. package/build/cjs/index.typings.js +18 -0
  6. package/build/cjs/index.typings.js.map +1 -0
  7. package/build/cjs/meta.d.ts +1 -0
  8. package/build/cjs/meta.js +18 -0
  9. package/build/cjs/meta.js.map +1 -0
  10. package/build/cjs/src/benefit-programs-v1-pool-definition-pool-definitions.context.d.ts +15 -0
  11. package/build/cjs/src/benefit-programs-v1-pool-definition-pool-definitions.context.js +25 -0
  12. package/build/cjs/src/benefit-programs-v1-pool-definition-pool-definitions.context.js.map +1 -0
  13. package/build/cjs/src/benefit-programs-v1-pool-definition-pool-definitions.http.d.ts +51 -0
  14. package/build/cjs/src/benefit-programs-v1-pool-definition-pool-definitions.http.js +524 -0
  15. package/build/cjs/src/benefit-programs-v1-pool-definition-pool-definitions.http.js.map +1 -0
  16. package/build/cjs/src/benefit-programs-v1-pool-definition-pool-definitions.meta.d.ts +29 -0
  17. package/build/cjs/src/benefit-programs-v1-pool-definition-pool-definitions.meta.js +237 -0
  18. package/build/cjs/src/benefit-programs-v1-pool-definition-pool-definitions.meta.js.map +1 -0
  19. package/build/cjs/src/benefit-programs-v1-pool-definition-pool-definitions.public.d.ts +115 -0
  20. package/build/cjs/src/benefit-programs-v1-pool-definition-pool-definitions.public.js +80 -0
  21. package/build/cjs/src/benefit-programs-v1-pool-definition-pool-definitions.public.js.map +1 -0
  22. package/build/cjs/src/benefit-programs-v1-pool-definition-pool-definitions.types.d.ts +805 -0
  23. package/build/cjs/src/benefit-programs-v1-pool-definition-pool-definitions.types.js +81 -0
  24. package/build/cjs/src/benefit-programs-v1-pool-definition-pool-definitions.types.js.map +1 -0
  25. package/build/{benefit-programs-v1-pool-definition-pool-definitions.universal-C-P5ex9L.d.mts → cjs/src/benefit-programs-v1-pool-definition-pool-definitions.universal.d.ts} +298 -85
  26. package/build/cjs/src/benefit-programs-v1-pool-definition-pool-definitions.universal.js +627 -0
  27. package/build/cjs/src/benefit-programs-v1-pool-definition-pool-definitions.universal.js.map +1 -0
  28. package/build/es/index.d.ts +1 -0
  29. package/build/es/index.js +2 -0
  30. package/build/es/index.js.map +1 -0
  31. package/build/es/index.typings.d.ts +1 -0
  32. package/build/es/index.typings.js +2 -0
  33. package/build/es/index.typings.js.map +1 -0
  34. package/build/es/meta.d.ts +1 -0
  35. package/build/es/meta.js +2 -0
  36. package/build/es/meta.js.map +1 -0
  37. package/build/es/package.json +3 -0
  38. package/build/es/src/benefit-programs-v1-pool-definition-pool-definitions.context.d.ts +15 -0
  39. package/build/es/src/benefit-programs-v1-pool-definition-pool-definitions.context.js +15 -0
  40. package/build/es/src/benefit-programs-v1-pool-definition-pool-definitions.context.js.map +1 -0
  41. package/build/es/src/benefit-programs-v1-pool-definition-pool-definitions.http.d.ts +51 -0
  42. package/build/es/src/benefit-programs-v1-pool-definition-pool-definitions.http.js +510 -0
  43. package/build/es/src/benefit-programs-v1-pool-definition-pool-definitions.http.js.map +1 -0
  44. package/build/es/src/benefit-programs-v1-pool-definition-pool-definitions.meta.d.ts +29 -0
  45. package/build/es/src/benefit-programs-v1-pool-definition-pool-definitions.meta.js +200 -0
  46. package/build/es/src/benefit-programs-v1-pool-definition-pool-definitions.meta.js.map +1 -0
  47. package/build/es/src/benefit-programs-v1-pool-definition-pool-definitions.public.d.ts +115 -0
  48. package/build/es/src/benefit-programs-v1-pool-definition-pool-definitions.public.js +59 -0
  49. package/build/es/src/benefit-programs-v1-pool-definition-pool-definitions.public.js.map +1 -0
  50. package/build/es/src/benefit-programs-v1-pool-definition-pool-definitions.types.d.ts +805 -0
  51. package/build/es/src/benefit-programs-v1-pool-definition-pool-definitions.types.js +78 -0
  52. package/build/es/src/benefit-programs-v1-pool-definition-pool-definitions.types.js.map +1 -0
  53. package/build/{benefit-programs-v1-pool-definition-pool-definitions.universal-C-P5ex9L.d.ts → es/src/benefit-programs-v1-pool-definition-pool-definitions.universal.d.ts} +298 -85
  54. package/build/es/src/benefit-programs-v1-pool-definition-pool-definitions.universal.js +590 -0
  55. package/build/es/src/benefit-programs-v1-pool-definition-pool-definitions.universal.js.map +1 -0
  56. package/build/internal/cjs/index.d.ts +1 -0
  57. package/build/internal/cjs/index.js +18 -0
  58. package/build/internal/cjs/index.js.map +1 -0
  59. package/build/internal/cjs/index.typings.d.ts +1 -0
  60. package/build/internal/cjs/index.typings.js +18 -0
  61. package/build/internal/cjs/index.typings.js.map +1 -0
  62. package/build/internal/cjs/meta.d.ts +1 -0
  63. package/build/internal/cjs/meta.js +18 -0
  64. package/build/internal/cjs/meta.js.map +1 -0
  65. package/build/internal/cjs/src/benefit-programs-v1-pool-definition-pool-definitions.context.d.ts +15 -0
  66. package/build/internal/cjs/src/benefit-programs-v1-pool-definition-pool-definitions.context.js +25 -0
  67. package/build/internal/cjs/src/benefit-programs-v1-pool-definition-pool-definitions.context.js.map +1 -0
  68. package/build/internal/cjs/src/benefit-programs-v1-pool-definition-pool-definitions.http.d.ts +51 -0
  69. package/build/internal/cjs/src/benefit-programs-v1-pool-definition-pool-definitions.http.js +524 -0
  70. package/build/internal/cjs/src/benefit-programs-v1-pool-definition-pool-definitions.http.js.map +1 -0
  71. package/build/internal/cjs/src/benefit-programs-v1-pool-definition-pool-definitions.meta.d.ts +29 -0
  72. package/build/internal/cjs/src/benefit-programs-v1-pool-definition-pool-definitions.meta.js +237 -0
  73. package/build/internal/cjs/src/benefit-programs-v1-pool-definition-pool-definitions.meta.js.map +1 -0
  74. package/build/internal/cjs/src/benefit-programs-v1-pool-definition-pool-definitions.public.d.ts +115 -0
  75. package/build/internal/cjs/src/benefit-programs-v1-pool-definition-pool-definitions.public.js +80 -0
  76. package/build/internal/cjs/src/benefit-programs-v1-pool-definition-pool-definitions.public.js.map +1 -0
  77. package/build/internal/cjs/src/benefit-programs-v1-pool-definition-pool-definitions.types.d.ts +805 -0
  78. package/build/internal/cjs/src/benefit-programs-v1-pool-definition-pool-definitions.types.js +81 -0
  79. package/build/internal/cjs/src/benefit-programs-v1-pool-definition-pool-definitions.types.js.map +1 -0
  80. package/build/internal/{benefit-programs-v1-pool-definition-pool-definitions.universal-C-P5ex9L.d.ts → cjs/src/benefit-programs-v1-pool-definition-pool-definitions.universal.d.ts} +298 -85
  81. package/build/internal/cjs/src/benefit-programs-v1-pool-definition-pool-definitions.universal.js +627 -0
  82. package/build/internal/cjs/src/benefit-programs-v1-pool-definition-pool-definitions.universal.js.map +1 -0
  83. package/build/internal/es/index.d.ts +1 -0
  84. package/build/internal/es/index.js +2 -0
  85. package/build/internal/es/index.js.map +1 -0
  86. package/build/internal/es/index.typings.d.ts +1 -0
  87. package/build/internal/es/index.typings.js +2 -0
  88. package/build/internal/es/index.typings.js.map +1 -0
  89. package/build/internal/es/meta.d.ts +1 -0
  90. package/build/internal/es/meta.js +2 -0
  91. package/build/internal/es/meta.js.map +1 -0
  92. package/build/internal/es/src/benefit-programs-v1-pool-definition-pool-definitions.context.d.ts +15 -0
  93. package/build/internal/es/src/benefit-programs-v1-pool-definition-pool-definitions.context.js +15 -0
  94. package/build/internal/es/src/benefit-programs-v1-pool-definition-pool-definitions.context.js.map +1 -0
  95. package/build/internal/es/src/benefit-programs-v1-pool-definition-pool-definitions.http.d.ts +51 -0
  96. package/build/internal/es/src/benefit-programs-v1-pool-definition-pool-definitions.http.js +510 -0
  97. package/build/internal/es/src/benefit-programs-v1-pool-definition-pool-definitions.http.js.map +1 -0
  98. package/build/internal/es/src/benefit-programs-v1-pool-definition-pool-definitions.meta.d.ts +29 -0
  99. package/build/internal/es/src/benefit-programs-v1-pool-definition-pool-definitions.meta.js +200 -0
  100. package/build/internal/es/src/benefit-programs-v1-pool-definition-pool-definitions.meta.js.map +1 -0
  101. package/build/internal/es/src/benefit-programs-v1-pool-definition-pool-definitions.public.d.ts +115 -0
  102. package/build/internal/es/src/benefit-programs-v1-pool-definition-pool-definitions.public.js +59 -0
  103. package/build/internal/es/src/benefit-programs-v1-pool-definition-pool-definitions.public.js.map +1 -0
  104. package/build/internal/es/src/benefit-programs-v1-pool-definition-pool-definitions.types.d.ts +805 -0
  105. package/build/internal/es/src/benefit-programs-v1-pool-definition-pool-definitions.types.js +78 -0
  106. package/build/internal/es/src/benefit-programs-v1-pool-definition-pool-definitions.types.js.map +1 -0
  107. package/build/internal/{benefit-programs-v1-pool-definition-pool-definitions.universal-C-P5ex9L.d.mts → es/src/benefit-programs-v1-pool-definition-pool-definitions.universal.d.ts} +298 -85
  108. package/build/internal/es/src/benefit-programs-v1-pool-definition-pool-definitions.universal.js +590 -0
  109. package/build/internal/es/src/benefit-programs-v1-pool-definition-pool-definitions.universal.js.map +1 -0
  110. package/package.json +11 -12
  111. package/build/index.d.mts +0 -127
  112. package/build/index.d.ts +0 -127
  113. package/build/index.js +0 -1050
  114. package/build/index.js.map +0 -1
  115. package/build/index.mjs +0 -1009
  116. package/build/index.mjs.map +0 -1
  117. package/build/internal/index.d.mts +0 -127
  118. package/build/internal/index.d.ts +0 -127
  119. package/build/internal/index.js +0 -1050
  120. package/build/internal/index.js.map +0 -1
  121. package/build/internal/index.mjs +0 -1009
  122. package/build/internal/index.mjs.map +0 -1
  123. package/build/internal/meta.d.mts +0 -490
  124. package/build/internal/meta.d.ts +0 -490
  125. package/build/internal/meta.js +0 -734
  126. package/build/internal/meta.js.map +0 -1
  127. package/build/internal/meta.mjs +0 -697
  128. package/build/internal/meta.mjs.map +0 -1
  129. package/build/meta.d.mts +0 -490
  130. package/build/meta.d.ts +0 -490
  131. package/build/meta.js +0 -734
  132. package/build/meta.js.map +0 -1
  133. package/build/meta.mjs +0 -697
  134. package/build/meta.mjs.map +0 -1
@@ -0,0 +1,805 @@
1
+ export interface PoolDefinition {
2
+ /**
3
+ * Pool definition ID.
4
+ * @format GUID
5
+ * @immutable
6
+ * @readonly
7
+ */
8
+ id?: string | null;
9
+ /**
10
+ * Revision number, which increments by 1 each time the pool definition is updated.
11
+ * To prevent conflicting changes, the current revision must be specified when updating the pool definition.
12
+ *
13
+ * Ignored when creating a pool definition.
14
+ * @readonly
15
+ */
16
+ revision?: string | null;
17
+ /**
18
+ * Date and time the pool definition was created.
19
+ * @readonly
20
+ */
21
+ createdDate?: Date | null;
22
+ /**
23
+ * Date and time the pool definition was updated.
24
+ * @readonly
25
+ */
26
+ updatedDate?: Date | null;
27
+ /**
28
+ * Pool definition name.
29
+ * @maxLength 128
30
+ */
31
+ displayName?: string;
32
+ /**
33
+ * List of program definition IDs that are associated with this pool definition.
34
+ * @format GUID
35
+ * @maxSize 100
36
+ */
37
+ programDefinitionIds?: string[];
38
+ /** Pool definition benefits and settings. */
39
+ details?: Details;
40
+ /**
41
+ * Namespace for your app or site's benefit programs. Namespaces allow you to distinguish between entities that you created and entities that other apps created.
42
+ * @immutable
43
+ * @readonly
44
+ * @minLength 1
45
+ * @maxLength 50
46
+ */
47
+ namespace?: string | null;
48
+ /**
49
+ * Custom field data for the pool definition object.
50
+ *
51
+ * [Extended fields](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/schema-plugins/about-schema-plugin-extensions) must be configured in the app dashboard before they can be accessed with API calls.
52
+ */
53
+ extendedFields?: ExtendedFields;
54
+ }
55
+ export interface Details {
56
+ /**
57
+ * List of benefits.
58
+ * @maxSize 10
59
+ */
60
+ benefits?: Benefit[];
61
+ /**
62
+ * Credit settings.
63
+ *
64
+ * If this object is empty, you can't set a price for the benefit.
65
+ */
66
+ creditConfiguration?: CreditConfiguration;
67
+ /** Additional information relating to this object. */
68
+ additionalData?: Record<string, any> | null;
69
+ }
70
+ export interface Benefit {
71
+ /**
72
+ * Unique identifier for this benefit.
73
+ *
74
+ * This key is consistent across the pool definition and all associated pools that contain this benefit.
75
+ * @maxLength 64
76
+ */
77
+ benefitKey?: string;
78
+ /**
79
+ * ID that is used to associated items with this benefit.
80
+ * @format GUID
81
+ * @immutable
82
+ * @readonly
83
+ */
84
+ itemSetId?: string | null;
85
+ /**
86
+ * Price of the benefit in credits. The price is the same for all of this benefit's items.
87
+ * @decimalValue options { gte:0, maxScale:4 }
88
+ */
89
+ price?: string | null;
90
+ /** Additional information for this benefit. */
91
+ additionalData?: Record<string, any> | null;
92
+ /**
93
+ * ID of the app providing the benefit items.
94
+ * @format GUID
95
+ * @immutable
96
+ */
97
+ providerAppId?: string | null;
98
+ /**
99
+ * Benefit name.
100
+ * @maxLength 40
101
+ */
102
+ displayName?: string | null;
103
+ /**
104
+ * Benefit description.
105
+ * @maxLength 255
106
+ */
107
+ description?: string | null;
108
+ }
109
+ export interface PolicyExpression extends PolicyExpressionExpressionOneOf {
110
+ /** Benefits can be redeemed if the expression in this object is not fulfilled. */
111
+ operatorNotOptions?: PolicyExpressionNot;
112
+ /** Benefits can be redeemed if all the expression in this object's array are fulfilled. */
113
+ operatorAndOptions?: PolicyExpressionAnd;
114
+ /** Benefits can be redeemed if at least one of the expressions in this object's array is fulfilled. */
115
+ operatorOrOptions?: PolicyExpressionOr;
116
+ /** Defines when benefits can be redeemed or how many benefits can be redeemed in a specific time period. */
117
+ policyOptions?: Policy;
118
+ /** Policy expression type. */
119
+ type?: PolicyExpressionType;
120
+ }
121
+ /** @oneof */
122
+ export interface PolicyExpressionExpressionOneOf {
123
+ /** Benefits can be redeemed if the expression in this object is not fulfilled. */
124
+ operatorNotOptions?: PolicyExpressionNot;
125
+ /** Benefits can be redeemed if all the expression in this object's array are fulfilled. */
126
+ operatorAndOptions?: PolicyExpressionAnd;
127
+ /** Benefits can be redeemed if at least one of the expressions in this object's array is fulfilled. */
128
+ operatorOrOptions?: PolicyExpressionOr;
129
+ /** Defines when benefits can be redeemed or how many benefits can be redeemed in a specific time period. */
130
+ policyOptions?: Policy;
131
+ }
132
+ export declare enum PolicyExpressionType {
133
+ UNKNOWN = "UNKNOWN",
134
+ /** Use with `operatorNotOptions`. */
135
+ OPERATOR_NOT = "OPERATOR_NOT",
136
+ /** Use with `operatorAndOptions`. */
137
+ OPERATOR_AND = "OPERATOR_AND",
138
+ /** Use with `operatorOrOptions`. */
139
+ OPERATOR_OR = "OPERATOR_OR",
140
+ /** Use with `policyOptions`. */
141
+ POLICY = "POLICY"
142
+ }
143
+ export interface PolicyExpressionNot {
144
+ /** Policy expression. If this expression is not fulfilled, benefits can be redeemed. */
145
+ expression?: PolicyExpression;
146
+ }
147
+ export interface PolicyExpressionAnd {
148
+ /**
149
+ * Array of policy expressions. If all expressions are fulfilled, benefits can be redeemed.
150
+ * @minSize 2
151
+ * @maxSize 10
152
+ */
153
+ expressions?: PolicyExpression[];
154
+ }
155
+ export interface PolicyExpressionOr {
156
+ /**
157
+ * Array of policy expressions. If at least one expression is fulfilled, benefits can be redeemed.
158
+ * @minSize 2
159
+ * @maxSize 10
160
+ */
161
+ expressions?: PolicyExpression[];
162
+ }
163
+ export interface Policy extends PolicyPolicyOneOf {
164
+ /**
165
+ * Defines an interval during which the policy expression is fulfilled.
166
+ *
167
+ * If `fromWeekDay` and `toWeekDay` are defined, this interval applies weekly. Otherwise, it applies daily.
168
+ */
169
+ fixedIntervalOptions?: FixedIntervalPolicy;
170
+ /** Maximum amount of times a benefit can be redeemed during a specified time period. */
171
+ rateLimitedOptions?: RateLimitedPolicy;
172
+ /** Custom policy defined by a different app. */
173
+ customOptions?: CustomPolicy;
174
+ /** Policy type. */
175
+ type?: Type;
176
+ }
177
+ /** @oneof */
178
+ export interface PolicyPolicyOneOf {
179
+ /**
180
+ * Defines an interval during which the policy expression is fulfilled.
181
+ *
182
+ * If `fromWeekDay` and `toWeekDay` are defined, this interval applies weekly. Otherwise, it applies daily.
183
+ */
184
+ fixedIntervalOptions?: FixedIntervalPolicy;
185
+ /** Maximum amount of times a benefit can be redeemed during a specified time period. */
186
+ rateLimitedOptions?: RateLimitedPolicy;
187
+ /** Custom policy defined by a different app. */
188
+ customOptions?: CustomPolicy;
189
+ }
190
+ export declare enum Type {
191
+ /** Unknown policy type. */
192
+ UNKNOWN = "UNKNOWN",
193
+ /** Use with `fixedIntervalOptions`. */
194
+ FIXED_INTERVAL = "FIXED_INTERVAL",
195
+ /** Use with `rateLimitedOptions`. */
196
+ RATE_LIMITED = "RATE_LIMITED",
197
+ /** Use with `customOptions`. */
198
+ CUSTOM = "CUSTOM"
199
+ }
200
+ export interface FixedIntervalPolicy {
201
+ /** Weekday that this interval starts from. If this field is defined, then `toWeekDay` is required. */
202
+ fromWeekDay?: WeekDay;
203
+ /** Weekday that this interval ends at. If this field is defined, then `fromWeekDay` is required. */
204
+ toWeekDay?: WeekDay;
205
+ /**
206
+ * Hour that this interval starts from. If this field is defined, then `toHour` is required.
207
+ * @max 23
208
+ */
209
+ fromHour?: number | null;
210
+ /**
211
+ * Hour that this interval ends at. If this field is defined, then `fromHour` is required.
212
+ * @max 23
213
+ */
214
+ toHour?: number | null;
215
+ /**
216
+ * Minute that this interval starts from. If this field is defined, then `toMinute` is required.
217
+ * @max 59
218
+ */
219
+ fromMinute?: number | null;
220
+ /**
221
+ * Minute that this interval ends at. If this field is defined, then `fromMinute` is required.
222
+ * @max 59
223
+ */
224
+ toMinute?: number | null;
225
+ }
226
+ export declare enum WeekDay {
227
+ /** Unknown weekday. */
228
+ UNKNOWN = "UNKNOWN",
229
+ /** Monday. */
230
+ MONDAY = "MONDAY",
231
+ /** Tuesday. */
232
+ TUESDAY = "TUESDAY",
233
+ /** Wednesday. */
234
+ WEDNESDAY = "WEDNESDAY",
235
+ /** Thursday. */
236
+ THURSDAY = "THURSDAY",
237
+ /** Friday. */
238
+ FRIDAY = "FRIDAY",
239
+ /** Saturday. */
240
+ SATURDAY = "SATURDAY",
241
+ /** Sunday. */
242
+ SUNDAY = "SUNDAY"
243
+ }
244
+ export interface RateLimitedPolicy extends RateLimitedPolicyPeriodOneOf {
245
+ /** Fixed interval used to limit benefit redemption. */
246
+ fixedIntervalOptions?: FixedIntervalPolicy;
247
+ /** Maximum number of times a benefit can be redeemed per specified time period. */
248
+ times?: number;
249
+ /** Time period type. */
250
+ type?: RateLimitedPolicyType;
251
+ }
252
+ /** @oneof */
253
+ export interface RateLimitedPolicyPeriodOneOf {
254
+ /** Fixed interval used to limit benefit redemption. */
255
+ fixedIntervalOptions?: FixedIntervalPolicy;
256
+ }
257
+ export declare enum RateLimitedPolicyType {
258
+ /** Unknown rate limit method. */
259
+ UNKNOWN = "UNKNOWN",
260
+ /** Time period is defined using `fixedIntervalOptions`. */
261
+ FIXED_INTERVAL = "FIXED_INTERVAL",
262
+ /** Time period is from one program renewal to the next. */
263
+ PER_CYCLE = "PER_CYCLE"
264
+ }
265
+ /** Custom policy as implemented by the Entitlement Policy Provider */
266
+ export interface CustomPolicy {
267
+ /**
268
+ * Policy ID.
269
+ * @format GUID
270
+ */
271
+ id?: string;
272
+ /**
273
+ * ID of the app providing the policy.
274
+ * @format GUID
275
+ */
276
+ appId?: string | null;
277
+ /** Additional information for this custom policy. */
278
+ additionalData?: Record<string, any> | null;
279
+ }
280
+ export interface CreditConfiguration {
281
+ /**
282
+ * Initial available amount for associated balances.
283
+ * @decimalValue options { gte:0, maxScale:4 }
284
+ */
285
+ amount?: string;
286
+ /** Rollover settings. */
287
+ rolloverConfiguration?: RolloverConfiguration;
288
+ /**
289
+ * Credit unit display name.
290
+ * @maxLength 32
291
+ */
292
+ unitDisplayName?: string | null;
293
+ }
294
+ export interface RolloverConfiguration {
295
+ /** Whether unused credits roll over to a new cycle when a program renews. */
296
+ enabled?: boolean | null;
297
+ /**
298
+ * Maximum number of credits that can roll over to the next cycle when a program renews.
299
+ * @decimalValue options { gte:0, maxScale:4 }
300
+ */
301
+ balanceCap?: string | null;
302
+ }
303
+ export interface ExtendedFields {
304
+ /**
305
+ * Extended field data. Each key corresponds to the namespace of the app that created the extended fields.
306
+ * The value of each key is structured according to the schema defined when the extended fields were configured.
307
+ *
308
+ * You can only access fields for which you have the appropriate permissions.
309
+ *
310
+ * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).
311
+ */
312
+ namespaces?: Record<string, Record<string, any>>;
313
+ }
314
+ export interface PoolDefinitionAddedToProgramDefinition {
315
+ /** PoolDefinition that was added to the program definition */
316
+ poolDefinition?: PoolDefinition;
317
+ /**
318
+ * Program Definition that the pool definition was added to
319
+ * @format GUID
320
+ */
321
+ programDefinitionId?: string;
322
+ /** Type of cascade */
323
+ cascadeType?: Cascade;
324
+ }
325
+ export declare enum Cascade {
326
+ /** Unknown cascade. */
327
+ UNKNOWN_CASCADE = "UNKNOWN_CASCADE",
328
+ /** Changes are applied to existing programs and pools when they are next renewed. */
329
+ NEXT_RENEWAL = "NEXT_RENEWAL",
330
+ /** Changes are applied to associated programs and pools immediately. */
331
+ IMMEDIATELY = "IMMEDIATELY",
332
+ /** Changes are not applied to existing associated programs and pools. They are only applied to future programs and pools. */
333
+ FUTURE_PROVISIONS = "FUTURE_PROVISIONS"
334
+ }
335
+ export interface PoolDefinitionRemovedFromProgramDefinition {
336
+ /** PoolDefinition that was removed from the program definition */
337
+ poolDefinition?: PoolDefinition;
338
+ /**
339
+ * Program Definition that the pool definition was removed from
340
+ * @format GUID
341
+ */
342
+ programDefinitionId?: string;
343
+ /** Type of cascade */
344
+ cascadeType?: Cascade;
345
+ }
346
+ /** This event is needed to support legacy benefit notification event. Should be only consumed in the proxy. */
347
+ export interface PoolDefinitionUpdatedProxySupport {
348
+ /** PoolDefinition after the update */
349
+ currentPoolDefinition?: PoolDefinition;
350
+ /** PoolDefinition before the update */
351
+ previousPoolDefinition?: PoolDefinition;
352
+ }
353
+ /** This event is needed to support legacy benefit notification event. Should be only consumed in the proxy. */
354
+ export interface PoolDefinitionDeletedProxySupport {
355
+ /** PoolDefinition which was deleted */
356
+ deletedPoolDefinition?: PoolDefinition;
357
+ }
358
+ export interface CreatePoolDefinitionRequest {
359
+ /** Pool definition to create. */
360
+ poolDefinition: PoolDefinition;
361
+ /**
362
+ * Determines when the changes to the program definitions containing this pool definition will be applied to associated programs.
363
+ *
364
+ * Required if the `poolDefinition.programDefinitionIds` parameter is defined.
365
+ */
366
+ cascade?: Cascade;
367
+ }
368
+ export interface CreatePoolDefinitionResponse {
369
+ /** Created pool definition. */
370
+ poolDefinition?: PoolDefinition;
371
+ }
372
+ export interface BulkCreatePoolDefinitionsRequest {
373
+ /**
374
+ * Pool definitions to create.
375
+ * @minSize 1
376
+ * @maxSize 100
377
+ */
378
+ poolDefinitions: PoolDefinition[];
379
+ /**
380
+ * Determines when the changes to the program definitions containing these pool definitions will be applied to associated programs.
381
+ *
382
+ * Required if the `poolDefinition.programDefinitionIds` parameter is defined.
383
+ */
384
+ cascade?: Cascade;
385
+ /**
386
+ * Whether to return the created pool definitions.
387
+ *
388
+ * Default: `false`
389
+ */
390
+ returnEntity?: boolean;
391
+ }
392
+ export interface BulkCreatePoolDefinitionsResponse {
393
+ /**
394
+ * List of created pool definitions and associated metadata.
395
+ * @minSize 1
396
+ * @maxSize 100
397
+ */
398
+ results?: BulkPoolDefinitionResult[];
399
+ /** Bulk action metadata. */
400
+ bulkActionMetadata?: BulkActionMetadata;
401
+ }
402
+ export interface BulkPoolDefinitionResult {
403
+ /** Item metadata. */
404
+ itemMetadata?: ItemMetadata;
405
+ /** Pool definition. */
406
+ poolDefinition?: PoolDefinition;
407
+ }
408
+ export interface ItemMetadata {
409
+ /**
410
+ * Item ID. Should always be available, unless it's impossible (for example, when failing to create an item).
411
+ * @format GUID
412
+ */
413
+ id?: string | null;
414
+ /** Index of the item within the request array. Allows for correlation between request and response items. */
415
+ originalIndex?: number;
416
+ /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */
417
+ success?: boolean;
418
+ /** Details about the error in case of failure. */
419
+ error?: ApplicationError;
420
+ }
421
+ export interface ApplicationError {
422
+ /** Error code. */
423
+ code?: string;
424
+ /** Description of the error. */
425
+ description?: string;
426
+ /** Data related to the error. */
427
+ data?: Record<string, any> | null;
428
+ }
429
+ export interface BulkActionMetadata {
430
+ /** Number of items that were successfully processed. */
431
+ totalSuccesses?: number;
432
+ /** Number of items that couldn't be processed. */
433
+ totalFailures?: number;
434
+ /** Number of failures without details because detailed failure threshold was exceeded. */
435
+ undetailedFailures?: number;
436
+ }
437
+ export interface UpdatePoolDefinitionRequest {
438
+ /** Pool definition to update. */
439
+ poolDefinition: PoolDefinition;
440
+ /** *Required.** Determines when the changes to this pool definition and program definitions containing it will be applied to associated programs and pools. */
441
+ cascade?: Cascade;
442
+ }
443
+ export interface UpdatePoolDefinitionResponse {
444
+ /** Updated pool definition. */
445
+ poolDefinition?: PoolDefinition;
446
+ }
447
+ export interface BulkUpdatePoolDefinitionsRequest {
448
+ /**
449
+ * Pool definitions to update.
450
+ * @minSize 1
451
+ * @maxSize 100
452
+ */
453
+ poolDefinitions?: MaskedPoolDefinition[];
454
+ /** *Required.** Determines when the changes to these pool definitions program definitions containing them will be applied to associated programs and pools. */
455
+ cascade?: Cascade;
456
+ /**
457
+ * Whether to return the updated pool definitions.
458
+ *
459
+ * Default: `false`
460
+ */
461
+ returnEntity?: boolean;
462
+ }
463
+ export interface MaskedPoolDefinition {
464
+ /** Pool definition to update. */
465
+ poolDefinition?: PoolDefinition;
466
+ /** Explicit list of fields to update. */
467
+ fieldMask?: string[];
468
+ }
469
+ export interface BulkUpdatePoolDefinitionsResponse {
470
+ /**
471
+ * List of updated pool definitions and associated metadata.
472
+ * @minSize 1
473
+ * @maxSize 100
474
+ */
475
+ results?: BulkPoolDefinitionResult[];
476
+ /** Bulk action metadata. */
477
+ bulkActionMetadata?: BulkActionMetadata;
478
+ }
479
+ export interface DeletePoolDefinitionRequest {
480
+ /**
481
+ * ID of the pool definition to delete.
482
+ * @format GUID
483
+ */
484
+ poolDefinitionId: string;
485
+ /** *Required**. Determines when the changes to this pool definition the program definitions containing it will be applied to associated programs and pools. */
486
+ cascade?: Cascade;
487
+ }
488
+ export interface DeletePoolDefinitionResponse {
489
+ }
490
+ export interface BulkDeletePoolDefinitionsRequest {
491
+ /**
492
+ * List of IDs of the pool definitions to delete.
493
+ * @minSize 1
494
+ * @maxSize 100
495
+ * @format GUID
496
+ */
497
+ poolDefinitionIds: string[];
498
+ /** *Required**. Determines when the changes to these pool definitions the program definitions containing it will be applied to associated programs and pools. */
499
+ cascade?: Cascade;
500
+ }
501
+ export interface BulkDeletePoolDefinitionsResponse {
502
+ /**
503
+ * List of deleted pool definitions and associated metadata.
504
+ * @minSize 1
505
+ * @maxSize 100
506
+ */
507
+ results?: BulkPoolDefinitionResult[];
508
+ /** Bulk action metadata. */
509
+ bulkActionMetadata?: BulkActionMetadata;
510
+ }
511
+ export interface GetPoolDefinitionRequest {
512
+ /**
513
+ * ID of the pool definition to retrieve.
514
+ * @format GUID
515
+ */
516
+ poolDefinitionId: string;
517
+ }
518
+ export interface GetPoolDefinitionResponse {
519
+ /** Retrieved pool definition. */
520
+ poolDefinition?: PoolDefinition;
521
+ }
522
+ export interface QueryPoolDefinitionsRequest {
523
+ /** Filter, sort, and paging to apply to the query. */
524
+ query?: CursorQuery;
525
+ }
526
+ export interface CursorQuery extends CursorQueryPagingMethodOneOf {
527
+ /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
528
+ cursorPaging?: CursorPaging;
529
+ /**
530
+ * Filter object.
531
+ * See [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language)
532
+ * for more information.
533
+ */
534
+ filter?: Record<string, any> | null;
535
+ /**
536
+ * List of sort objects.
537
+ * @maxSize 5
538
+ */
539
+ sort?: Sorting[];
540
+ }
541
+ /** @oneof */
542
+ export interface CursorQueryPagingMethodOneOf {
543
+ /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
544
+ cursorPaging?: CursorPaging;
545
+ }
546
+ export interface Sorting {
547
+ /**
548
+ * Field to sort by.
549
+ * @maxLength 512
550
+ */
551
+ fieldName?: string;
552
+ /**
553
+ * Sort order. Use `ASC` for ascending order or `DESC` for descending order.
554
+ *
555
+ * Default: `ASC`
556
+ */
557
+ order?: SortOrder;
558
+ }
559
+ export declare enum SortOrder {
560
+ /** Ascending sort order. */
561
+ ASC = "ASC",
562
+ /** Descending sort order. */
563
+ DESC = "DESC"
564
+ }
565
+ export interface CursorPaging {
566
+ /**
567
+ * Maximum number of items to return.
568
+ * @max 100
569
+ */
570
+ limit?: number | null;
571
+ /**
572
+ * Pointer to the next or previous page in the list of results.
573
+ *
574
+ * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
575
+ * Not relevant for the first request.
576
+ * @maxLength 16000
577
+ */
578
+ cursor?: string | null;
579
+ }
580
+ export interface QueryPoolDefinitionsResponse {
581
+ /** List of retrieved pool definitions. */
582
+ poolDefinitions?: PoolDefinition[];
583
+ /** Metadata for the paginated results. */
584
+ metadata?: CursorPagingMetadata;
585
+ }
586
+ export interface CursorPagingMetadata {
587
+ /** Number of items returned in the response. */
588
+ count?: number | null;
589
+ /** Cursor strings that point to the next page, previous page, or both. */
590
+ cursors?: Cursors;
591
+ /**
592
+ * Whether there are more pages to retrieve following the current page.
593
+ *
594
+ * + `true`: Another page of results can be retrieved.
595
+ * + `false`: This is the last page.
596
+ */
597
+ hasNext?: boolean | null;
598
+ }
599
+ export interface Cursors {
600
+ /**
601
+ * Cursor string pointing to the next page in the list of results.
602
+ * @maxLength 16000
603
+ */
604
+ next?: string | null;
605
+ /**
606
+ * Cursor pointing to the previous page in the list of results.
607
+ * @maxLength 16000
608
+ */
609
+ prev?: string | null;
610
+ }
611
+ export interface AddPoolDefinitionToProgramDefinitionRequest {
612
+ /**
613
+ * ID of the pool definition to add to the program definition.
614
+ * @format GUID
615
+ */
616
+ poolDefinitionId: string;
617
+ /**
618
+ * ID of the program definition to add the pool definition to.
619
+ * @format GUID
620
+ */
621
+ programDefinitionId: string;
622
+ /** Determines when the changes to this program definition and pool definition will be applied to associated programs and pools. */
623
+ cascade: Cascade;
624
+ }
625
+ export interface AddPoolDefinitionToProgramDefinitionResponse {
626
+ /** Updated pool definition. */
627
+ poolDefinition?: PoolDefinition;
628
+ }
629
+ export interface RemovePoolDefinitionFromProgramDefinitionRequest {
630
+ /**
631
+ * ID of the pool definition to remove from the program definition.
632
+ * @format GUID
633
+ */
634
+ poolDefinitionId: string;
635
+ /**
636
+ * ID of the program definition to remove the pool definition from.
637
+ * @format GUID
638
+ */
639
+ programDefinitionId: string;
640
+ /** Determines when the changes to this program definition and pool definition will be applied to associated programs and pools. */
641
+ cascade: Cascade;
642
+ }
643
+ export interface RemovePoolDefinitionFromProgramDefinitionResponse {
644
+ /** Updated pool definition. */
645
+ poolDefinition?: PoolDefinition;
646
+ }
647
+ export interface FindPoolDefinitionsByProgramDefinitionRequest {
648
+ /**
649
+ * ID of the program definition to retrieve its pool definitions.
650
+ * @format GUID
651
+ */
652
+ programDefinitionId: string;
653
+ /**
654
+ * Namespace for your app or site's benefit programs. Namespaces allow you to distinguish between entities that you created and entities that other apps created.
655
+ * @minLength 1
656
+ * @maxLength 50
657
+ */
658
+ namespace: string;
659
+ }
660
+ export interface FindPoolDefinitionsByProgramDefinitionResponse {
661
+ /** Retrieved pool definitions. */
662
+ poolDefinitions?: PoolDefinition[];
663
+ }
664
+ export interface DomainEvent extends DomainEventBodyOneOf {
665
+ createdEvent?: EntityCreatedEvent;
666
+ updatedEvent?: EntityUpdatedEvent;
667
+ deletedEvent?: EntityDeletedEvent;
668
+ actionEvent?: ActionEvent;
669
+ /**
670
+ * Unique event ID.
671
+ * Allows clients to ignore duplicate webhooks.
672
+ */
673
+ id?: string;
674
+ /**
675
+ * Assumes actions are also always typed to an entity_type
676
+ * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
677
+ */
678
+ entityFqdn?: string;
679
+ /**
680
+ * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
681
+ * This is although the created/updated/deleted notion is duplication of the oneof types
682
+ * Example: created/updated/deleted/started/completed/email_opened
683
+ */
684
+ slug?: string;
685
+ /** ID of the entity associated with the event. */
686
+ entityId?: string;
687
+ /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
688
+ eventTime?: Date | null;
689
+ /**
690
+ * Whether the event was triggered as a result of a privacy regulation application
691
+ * (for example, GDPR).
692
+ */
693
+ triggeredByAnonymizeRequest?: boolean | null;
694
+ /** If present, indicates the action that triggered the event. */
695
+ originatedFrom?: string | null;
696
+ /**
697
+ * A sequence number defining the order of updates to the underlying entity.
698
+ * For example, given that some entity was updated at 16:00 and than again at 16:01,
699
+ * it is guaranteed that the sequence number of the second update is strictly higher than the first.
700
+ * As the consumer, you can use this value to ensure that you handle messages in the correct order.
701
+ * To do so, you will need to persist this number on your end, and compare the sequence number from the
702
+ * message against the one you have stored. Given that the stored number is higher, you should ignore the message.
703
+ */
704
+ entityEventSequence?: string | null;
705
+ }
706
+ /** @oneof */
707
+ export interface DomainEventBodyOneOf {
708
+ createdEvent?: EntityCreatedEvent;
709
+ updatedEvent?: EntityUpdatedEvent;
710
+ deletedEvent?: EntityDeletedEvent;
711
+ actionEvent?: ActionEvent;
712
+ }
713
+ export interface EntityCreatedEvent {
714
+ entityAsJson?: string;
715
+ /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */
716
+ restoreInfo?: RestoreInfo;
717
+ }
718
+ export interface RestoreInfo {
719
+ deletedDate?: Date | null;
720
+ }
721
+ export interface EntityUpdatedEvent {
722
+ /**
723
+ * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
724
+ * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
725
+ * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
726
+ */
727
+ currentEntityAsJson?: string;
728
+ }
729
+ export interface EntityDeletedEvent {
730
+ /** Entity that was deleted */
731
+ deletedEntityAsJson?: string | null;
732
+ }
733
+ export interface ActionEvent {
734
+ bodyAsJson?: string;
735
+ }
736
+ export interface MessageEnvelope {
737
+ /**
738
+ * App instance ID.
739
+ * @format GUID
740
+ */
741
+ instanceId?: string | null;
742
+ /**
743
+ * Event type.
744
+ * @maxLength 150
745
+ */
746
+ eventType?: string;
747
+ /** The identification type and identity data. */
748
+ identity?: IdentificationData;
749
+ /** Stringify payload. */
750
+ data?: string;
751
+ }
752
+ export interface IdentificationData extends IdentificationDataIdOneOf {
753
+ /**
754
+ * ID of a site visitor that has not logged in to the site.
755
+ * @format GUID
756
+ */
757
+ anonymousVisitorId?: string;
758
+ /**
759
+ * ID of a site visitor that has logged in to the site.
760
+ * @format GUID
761
+ */
762
+ memberId?: string;
763
+ /**
764
+ * ID of a Wix user (site owner, contributor, etc.).
765
+ * @format GUID
766
+ */
767
+ wixUserId?: string;
768
+ /**
769
+ * ID of an app.
770
+ * @format GUID
771
+ */
772
+ appId?: string;
773
+ /** @readonly */
774
+ identityType?: WebhookIdentityType;
775
+ }
776
+ /** @oneof */
777
+ export interface IdentificationDataIdOneOf {
778
+ /**
779
+ * ID of a site visitor that has not logged in to the site.
780
+ * @format GUID
781
+ */
782
+ anonymousVisitorId?: string;
783
+ /**
784
+ * ID of a site visitor that has logged in to the site.
785
+ * @format GUID
786
+ */
787
+ memberId?: string;
788
+ /**
789
+ * ID of a Wix user (site owner, contributor, etc.).
790
+ * @format GUID
791
+ */
792
+ wixUserId?: string;
793
+ /**
794
+ * ID of an app.
795
+ * @format GUID
796
+ */
797
+ appId?: string;
798
+ }
799
+ export declare enum WebhookIdentityType {
800
+ UNKNOWN = "UNKNOWN",
801
+ ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
802
+ MEMBER = "MEMBER",
803
+ WIX_USER = "WIX_USER",
804
+ APP = "APP"
805
+ }