@wix/auto_sdk_packages_packages 1.0.3 → 1.0.4

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 (119) hide show
  1. package/build/cjs/index.d.ts +273 -1
  2. package/build/cjs/index.js +953 -15
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/meta.d.ts +542 -1
  5. package/build/cjs/meta.js +574 -15
  6. package/build/cjs/meta.js.map +1 -1
  7. package/build/cjs/{src/premium-reseller-v1-packages-packages.types.d.ts → premium-reseller-v1-packages-packages.universal-CeJKqN8_.d.ts} +324 -142
  8. package/build/es/{src/premium-reseller-v1-packages-packages.public.d.ts → index.d.mts} +27 -16
  9. package/build/es/index.mjs +906 -0
  10. package/build/es/index.mjs.map +1 -0
  11. package/build/es/meta.d.mts +542 -0
  12. package/build/es/meta.mjs +541 -0
  13. package/build/es/meta.mjs.map +1 -0
  14. package/build/{internal/cjs/src/premium-reseller-v1-packages-packages.types.d.ts → es/premium-reseller-v1-packages-packages.universal-CeJKqN8_.d.mts} +324 -142
  15. package/build/internal/cjs/index.d.ts +273 -1
  16. package/build/internal/cjs/index.js +953 -15
  17. package/build/internal/cjs/index.js.map +1 -1
  18. package/build/internal/cjs/meta.d.ts +542 -1
  19. package/build/internal/cjs/meta.js +574 -15
  20. package/build/internal/cjs/meta.js.map +1 -1
  21. package/build/internal/{es/src/premium-reseller-v1-packages-packages.types.d.ts → cjs/premium-reseller-v1-packages-packages.universal-CeJKqN8_.d.ts} +324 -142
  22. package/build/internal/{cjs/src/premium-reseller-v1-packages-packages.public.d.ts → es/index.d.mts} +27 -16
  23. package/build/internal/es/index.mjs +906 -0
  24. package/build/internal/es/index.mjs.map +1 -0
  25. package/build/internal/es/meta.d.mts +542 -0
  26. package/build/internal/es/meta.mjs +541 -0
  27. package/build/internal/es/meta.mjs.map +1 -0
  28. package/build/{es/src/premium-reseller-v1-packages-packages.types.d.ts → internal/es/premium-reseller-v1-packages-packages.universal-CeJKqN8_.d.mts} +324 -142
  29. package/package.json +10 -9
  30. package/build/cjs/index.typings.d.ts +0 -1
  31. package/build/cjs/index.typings.js +0 -18
  32. package/build/cjs/index.typings.js.map +0 -1
  33. package/build/cjs/src/premium-reseller-v1-packages-packages.context.d.ts +0 -14
  34. package/build/cjs/src/premium-reseller-v1-packages-packages.context.js +0 -34
  35. package/build/cjs/src/premium-reseller-v1-packages-packages.context.js.map +0 -1
  36. package/build/cjs/src/premium-reseller-v1-packages-packages.http.d.ts +0 -219
  37. package/build/cjs/src/premium-reseller-v1-packages-packages.http.js +0 -563
  38. package/build/cjs/src/premium-reseller-v1-packages-packages.http.js.map +0 -1
  39. package/build/cjs/src/premium-reseller-v1-packages-packages.meta.d.ts +0 -38
  40. package/build/cjs/src/premium-reseller-v1-packages-packages.meta.js +0 -218
  41. package/build/cjs/src/premium-reseller-v1-packages-packages.meta.js.map +0 -1
  42. package/build/cjs/src/premium-reseller-v1-packages-packages.public.d.ts +0 -262
  43. package/build/cjs/src/premium-reseller-v1-packages-packages.public.js +0 -84
  44. package/build/cjs/src/premium-reseller-v1-packages-packages.public.js.map +0 -1
  45. package/build/cjs/src/premium-reseller-v1-packages-packages.types.js +0 -155
  46. package/build/cjs/src/premium-reseller-v1-packages-packages.types.js.map +0 -1
  47. package/build/cjs/src/premium-reseller-v1-packages-packages.universal.d.ts +0 -1824
  48. package/build/cjs/src/premium-reseller-v1-packages-packages.universal.js +0 -756
  49. package/build/cjs/src/premium-reseller-v1-packages-packages.universal.js.map +0 -1
  50. package/build/es/index.d.ts +0 -1
  51. package/build/es/index.js +0 -2
  52. package/build/es/index.js.map +0 -1
  53. package/build/es/index.typings.d.ts +0 -1
  54. package/build/es/index.typings.js +0 -2
  55. package/build/es/index.typings.js.map +0 -1
  56. package/build/es/meta.d.ts +0 -1
  57. package/build/es/meta.js +0 -2
  58. package/build/es/meta.js.map +0 -1
  59. package/build/es/src/premium-reseller-v1-packages-packages.context.d.ts +0 -14
  60. package/build/es/src/premium-reseller-v1-packages-packages.context.js +0 -14
  61. package/build/es/src/premium-reseller-v1-packages-packages.context.js.map +0 -1
  62. package/build/es/src/premium-reseller-v1-packages-packages.http.d.ts +0 -219
  63. package/build/es/src/premium-reseller-v1-packages-packages.http.js +0 -550
  64. package/build/es/src/premium-reseller-v1-packages-packages.http.js.map +0 -1
  65. package/build/es/src/premium-reseller-v1-packages-packages.meta.d.ts +0 -38
  66. package/build/es/src/premium-reseller-v1-packages-packages.meta.js +0 -182
  67. package/build/es/src/premium-reseller-v1-packages-packages.meta.js.map +0 -1
  68. package/build/es/src/premium-reseller-v1-packages-packages.public.js +0 -54
  69. package/build/es/src/premium-reseller-v1-packages-packages.public.js.map +0 -1
  70. package/build/es/src/premium-reseller-v1-packages-packages.types.js +0 -152
  71. package/build/es/src/premium-reseller-v1-packages-packages.types.js.map +0 -1
  72. package/build/es/src/premium-reseller-v1-packages-packages.universal.d.ts +0 -1824
  73. package/build/es/src/premium-reseller-v1-packages-packages.universal.js +0 -720
  74. package/build/es/src/premium-reseller-v1-packages-packages.universal.js.map +0 -1
  75. package/build/internal/cjs/index.typings.d.ts +0 -1
  76. package/build/internal/cjs/index.typings.js +0 -18
  77. package/build/internal/cjs/index.typings.js.map +0 -1
  78. package/build/internal/cjs/src/premium-reseller-v1-packages-packages.context.d.ts +0 -14
  79. package/build/internal/cjs/src/premium-reseller-v1-packages-packages.context.js +0 -34
  80. package/build/internal/cjs/src/premium-reseller-v1-packages-packages.context.js.map +0 -1
  81. package/build/internal/cjs/src/premium-reseller-v1-packages-packages.http.d.ts +0 -219
  82. package/build/internal/cjs/src/premium-reseller-v1-packages-packages.http.js +0 -563
  83. package/build/internal/cjs/src/premium-reseller-v1-packages-packages.http.js.map +0 -1
  84. package/build/internal/cjs/src/premium-reseller-v1-packages-packages.meta.d.ts +0 -38
  85. package/build/internal/cjs/src/premium-reseller-v1-packages-packages.meta.js +0 -218
  86. package/build/internal/cjs/src/premium-reseller-v1-packages-packages.meta.js.map +0 -1
  87. package/build/internal/cjs/src/premium-reseller-v1-packages-packages.public.js +0 -84
  88. package/build/internal/cjs/src/premium-reseller-v1-packages-packages.public.js.map +0 -1
  89. package/build/internal/cjs/src/premium-reseller-v1-packages-packages.types.js +0 -155
  90. package/build/internal/cjs/src/premium-reseller-v1-packages-packages.types.js.map +0 -1
  91. package/build/internal/cjs/src/premium-reseller-v1-packages-packages.universal.d.ts +0 -1824
  92. package/build/internal/cjs/src/premium-reseller-v1-packages-packages.universal.js +0 -756
  93. package/build/internal/cjs/src/premium-reseller-v1-packages-packages.universal.js.map +0 -1
  94. package/build/internal/es/index.d.ts +0 -1
  95. package/build/internal/es/index.js +0 -2
  96. package/build/internal/es/index.js.map +0 -1
  97. package/build/internal/es/index.typings.d.ts +0 -1
  98. package/build/internal/es/index.typings.js +0 -2
  99. package/build/internal/es/index.typings.js.map +0 -1
  100. package/build/internal/es/meta.d.ts +0 -1
  101. package/build/internal/es/meta.js +0 -2
  102. package/build/internal/es/meta.js.map +0 -1
  103. package/build/internal/es/src/premium-reseller-v1-packages-packages.context.d.ts +0 -14
  104. package/build/internal/es/src/premium-reseller-v1-packages-packages.context.js +0 -14
  105. package/build/internal/es/src/premium-reseller-v1-packages-packages.context.js.map +0 -1
  106. package/build/internal/es/src/premium-reseller-v1-packages-packages.http.d.ts +0 -219
  107. package/build/internal/es/src/premium-reseller-v1-packages-packages.http.js +0 -550
  108. package/build/internal/es/src/premium-reseller-v1-packages-packages.http.js.map +0 -1
  109. package/build/internal/es/src/premium-reseller-v1-packages-packages.meta.d.ts +0 -38
  110. package/build/internal/es/src/premium-reseller-v1-packages-packages.meta.js +0 -182
  111. package/build/internal/es/src/premium-reseller-v1-packages-packages.meta.js.map +0 -1
  112. package/build/internal/es/src/premium-reseller-v1-packages-packages.public.d.ts +0 -262
  113. package/build/internal/es/src/premium-reseller-v1-packages-packages.public.js +0 -54
  114. package/build/internal/es/src/premium-reseller-v1-packages-packages.public.js.map +0 -1
  115. package/build/internal/es/src/premium-reseller-v1-packages-packages.types.js +0 -152
  116. package/build/internal/es/src/premium-reseller-v1-packages-packages.types.js.map +0 -1
  117. package/build/internal/es/src/premium-reseller-v1-packages-packages.universal.d.ts +0 -1824
  118. package/build/internal/es/src/premium-reseller-v1-packages-packages.universal.js +0 -720
  119. package/build/internal/es/src/premium-reseller-v1-packages-packages.universal.js.map +0 -1
@@ -2,13 +2,13 @@
2
2
  * A package is group of instances of Wix services that a reseller offers to a
3
3
  * customer as part of a single transaction.
4
4
  */
5
- export interface Package {
5
+ interface Package {
6
6
  /**
7
7
  * Package ID.
8
8
  * @readonly
9
9
  * @format GUID
10
10
  */
11
- id?: string;
11
+ _id?: string;
12
12
  /**
13
13
  * Wix account ID. See
14
14
  * [Account Level APIs](https://dev.wix.com/docs/rest/account-level/about-account-level-apis)
@@ -38,18 +38,18 @@ export interface Package {
38
38
  * Date and time the package was created.
39
39
  * @readonly
40
40
  */
41
- createdDate?: Date | null;
41
+ _createdDate?: Date | null;
42
42
  /**
43
43
  * Date and time the package was last updated.
44
44
  * @readonly
45
45
  */
46
- updatedDate?: Date | null;
46
+ _updatedDate?: Date | null;
47
47
  }
48
48
  /**
49
49
  * A product instance is a specific instance of a Wix service that a reseller
50
50
  * offers to one of their customers.
51
51
  */
52
- export interface ProductInstance extends ProductInstanceContractDetailsOneOf {
52
+ interface ProductInstance extends ProductInstanceContractDetailsOneOf {
53
53
  /** Billing information for the contract between the reseller and Wix. */
54
54
  billingInfo?: ProductInstanceCycle;
55
55
  /**
@@ -78,7 +78,7 @@ export interface ProductInstance extends ProductInstanceContractDetailsOneOf {
78
78
  * Status of the product instance.
79
79
  * @readonly
80
80
  */
81
- status?: Status;
81
+ status?: StatusWithLiterals;
82
82
  /**
83
83
  * Failure object. Only present for status `FAILED`. Describes why the product instance `FAILED`.
84
84
  * @readonly
@@ -88,12 +88,12 @@ export interface ProductInstance extends ProductInstanceContractDetailsOneOf {
88
88
  * Date and time the product instance was created.
89
89
  * @readonly
90
90
  */
91
- createdDate?: Date | null;
91
+ _createdDate?: Date | null;
92
92
  /**
93
93
  * Date and time the product instance was last updated.
94
94
  * @readonly
95
95
  */
96
- updatedDate?: Date | null;
96
+ _updatedDate?: Date | null;
97
97
  /**
98
98
  * Two-letter country code in
99
99
  * [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements)
@@ -131,18 +131,20 @@ export interface ProductInstance extends ProductInstanceContractDetailsOneOf {
131
131
  referenceProductInstanceId?: string | null;
132
132
  }
133
133
  /** @oneof */
134
- export interface ProductInstanceContractDetailsOneOf {
134
+ interface ProductInstanceContractDetailsOneOf {
135
135
  /** Billing information for the contract between the reseller and Wix. */
136
136
  billingInfo?: ProductInstanceCycle;
137
137
  }
138
- export declare enum FailureReasonFailureReason {
138
+ declare enum FailureReasonFailureReason {
139
139
  UNKNOWN = "UNKNOWN",
140
140
  /** The product instance couldn't be created because the Resellers API timed out. */
141
141
  DELIVERY_TIMEOUT = "DELIVERY_TIMEOUT",
142
142
  /** The product instance couldn't be created because an external process failed. */
143
143
  EXTERNAL_FAILURE = "EXTERNAL_FAILURE"
144
144
  }
145
- export declare enum IntervalIntervalUnit {
145
+ /** @enumType */
146
+ type FailureReasonFailureReasonWithLiterals = FailureReasonFailureReason | 'UNKNOWN' | 'DELIVERY_TIMEOUT' | 'EXTERNAL_FAILURE';
147
+ declare enum IntervalIntervalUnit {
146
148
  /** unknown interval unit */
147
149
  UNKNOWN = "UNKNOWN",
148
150
  /** Day */
@@ -154,7 +156,9 @@ export declare enum IntervalIntervalUnit {
154
156
  /** Year */
155
157
  YEAR = "YEAR"
156
158
  }
157
- export declare enum CycleDescriptorType {
159
+ /** @enumType */
160
+ type IntervalIntervalUnitWithLiterals = IntervalIntervalUnit | 'UNKNOWN' | 'DAY' | 'WEEK' | 'MONTH' | 'YEAR';
161
+ declare enum CycleDescriptorType {
158
162
  /** The payment type hasn't been set. */
159
163
  UNKNOWN = "UNKNOWN",
160
164
  /** The reseller pays Wix in a single payment. */
@@ -162,16 +166,18 @@ export declare enum CycleDescriptorType {
162
166
  /** The reseller pays Wix on a recurring schedule. */
163
167
  RECURRING = "RECURRING"
164
168
  }
165
- export interface CycleInterval {
169
+ /** @enumType */
170
+ type CycleDescriptorTypeWithLiterals = CycleDescriptorType | 'UNKNOWN' | 'ONE_TIME' | 'RECURRING';
171
+ interface CycleInterval {
166
172
  /** Unit of the billing cycle. */
167
- unit?: IntervalIntervalUnit;
173
+ unit?: IntervalIntervalUnitWithLiterals;
168
174
  /**
169
175
  * Count of units that make up the billing cycle.
170
176
  * @min 1
171
177
  */
172
178
  count?: number;
173
179
  }
174
- export declare enum Status {
180
+ declare enum Status {
175
181
  /** The product instance isn't yet available to the customer. */
176
182
  PENDING = "PENDING",
177
183
  /** The customer can use the product instance. */
@@ -183,19 +189,21 @@ export declare enum Status {
183
189
  /** The product instance isn't yet available to the customer, because an external provider or the customer must take an action. */
184
190
  AWAITING_ACTION = "AWAITING_ACTION"
185
191
  }
186
- export interface FailureReason {
192
+ /** @enumType */
193
+ type StatusWithLiterals = Status | 'PENDING' | 'ENABLED' | 'CANCELED' | 'FAILED' | 'AWAITING_ACTION';
194
+ interface FailureReason {
187
195
  /** Failure code. */
188
- code?: FailureReasonFailureReason;
196
+ code?: FailureReasonFailureReasonWithLiterals;
189
197
  /** Failure message. */
190
198
  message?: string;
191
199
  }
192
- export interface ProductInstanceCycle {
200
+ interface ProductInstanceCycle {
193
201
  /** Payment type. */
194
- type?: CycleDescriptorType;
202
+ type?: CycleDescriptorTypeWithLiterals;
195
203
  /** Duration of the billing cycle. Available only for `RECURRING` payments. */
196
204
  cycleDuration?: CycleInterval;
197
205
  }
198
- export interface CreatePackageRequest {
206
+ interface CreatePackageRequest {
199
207
  /**
200
208
  * Idempotency key.
201
209
  * @maxLength 100
@@ -213,7 +221,7 @@ export interface CreatePackageRequest {
213
221
  */
214
222
  products: ProductInstance[];
215
223
  }
216
- export interface CreatePackageResponse {
224
+ interface CreatePackageResponse {
217
225
  /**
218
226
  * Idempotency key.
219
227
  * @maxLength 100
@@ -222,7 +230,7 @@ export interface CreatePackageResponse {
222
230
  /** Created package. */
223
231
  package?: Package;
224
232
  }
225
- export interface CancelPackageRequest {
233
+ interface CancelPackageRequest {
226
234
  /**
227
235
  * Idempotency key.
228
236
  * @maxLength 100
@@ -232,9 +240,9 @@ export interface CancelPackageRequest {
232
240
  * ID of the package to cancel.
233
241
  * @format GUID
234
242
  */
235
- id: string;
243
+ _id: string;
236
244
  }
237
- export interface CancelPackageResponse {
245
+ interface CancelPackageResponse {
238
246
  /**
239
247
  * Idempotency key.
240
248
  * @maxLength 100
@@ -243,40 +251,40 @@ export interface CancelPackageResponse {
243
251
  /** Canceled package. */
244
252
  package?: Package;
245
253
  }
246
- export interface PackageCanceled {
254
+ interface PackageCanceled {
247
255
  /** Canceled package. */
248
256
  package?: Package;
249
257
  }
250
- export interface GetPackageRequest {
258
+ interface GetPackageRequest {
251
259
  /**
252
260
  * Package ID.
253
261
  * @format GUID
254
262
  */
255
- id: string;
263
+ _id: string;
256
264
  }
257
- export interface GetPackageResponse {
265
+ interface GetPackageResponse {
258
266
  /** Retrieved package. */
259
267
  package?: Package;
260
268
  }
261
- export interface QueryPackagesRequest {
269
+ interface QueryPackagesRequest {
262
270
  /** Query options. See [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language) for more details. */
263
271
  query: QueryV2;
264
272
  }
265
- export interface QueryV2 extends QueryV2PagingMethodOneOf {
266
- /** Paging options to limit and skip the number of items. */
273
+ interface QueryV2 extends QueryV2PagingMethodOneOf {
274
+ /** Paging options to limit and offset the number of items. */
267
275
  paging?: Paging;
268
276
  /** 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`. */
269
277
  cursorPaging?: CursorPaging;
270
278
  /**
271
279
  * Filter object.
272
280
  *
273
- * Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section).
281
+ * Learn more about [filtering](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#filters).
274
282
  */
275
283
  filter?: Record<string, any> | null;
276
284
  /**
277
285
  * Sort object.
278
286
  *
279
- * Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).
287
+ * Learn more about [sorting](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#sorting).
280
288
  */
281
289
  sort?: Sorting[];
282
290
  /** Array of projected fields. A list of specific field names to return. If `fieldsets` are also specified, the union of `fieldsets` and `fields` is returned. */
@@ -285,32 +293,34 @@ export interface QueryV2 extends QueryV2PagingMethodOneOf {
285
293
  fieldsets?: string[];
286
294
  }
287
295
  /** @oneof */
288
- export interface QueryV2PagingMethodOneOf {
289
- /** Paging options to limit and skip the number of items. */
296
+ interface QueryV2PagingMethodOneOf {
297
+ /** Paging options to limit and offset the number of items. */
290
298
  paging?: Paging;
291
299
  /** 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`. */
292
300
  cursorPaging?: CursorPaging;
293
301
  }
294
- export interface Sorting {
302
+ interface Sorting {
295
303
  /**
296
304
  * Name of the field to sort by.
297
305
  * @maxLength 512
298
306
  */
299
307
  fieldName?: string;
300
308
  /** Sort order. */
301
- order?: SortOrder;
309
+ order?: SortOrderWithLiterals;
302
310
  }
303
- export declare enum SortOrder {
311
+ declare enum SortOrder {
304
312
  ASC = "ASC",
305
313
  DESC = "DESC"
306
314
  }
307
- export interface Paging {
315
+ /** @enumType */
316
+ type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';
317
+ interface Paging {
308
318
  /** Number of items to load. */
309
319
  limit?: number | null;
310
320
  /** Number of items to skip in the current sort order. */
311
321
  offset?: number | null;
312
322
  }
313
- export interface CursorPaging {
323
+ interface CursorPaging {
314
324
  /**
315
325
  * Maximum number of items to return in the results.
316
326
  * @max 100
@@ -325,7 +335,7 @@ export interface CursorPaging {
325
335
  */
326
336
  cursor?: string | null;
327
337
  }
328
- export interface QueryPackagesResponse {
338
+ interface QueryPackagesResponse {
329
339
  /** Paging metadata. */
330
340
  metadata?: PagingMetadataV2;
331
341
  /**
@@ -336,7 +346,7 @@ export interface QueryPackagesResponse {
336
346
  */
337
347
  packages?: Package[];
338
348
  }
339
- export interface PagingMetadataV2 {
349
+ interface PagingMetadataV2 {
340
350
  /** Number of items returned in the response. */
341
351
  count?: number | null;
342
352
  /** Offset that was requested. */
@@ -348,7 +358,7 @@ export interface PagingMetadataV2 {
348
358
  /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */
349
359
  cursors?: Cursors;
350
360
  }
351
- export interface Cursors {
361
+ interface Cursors {
352
362
  /**
353
363
  * Cursor string pointing to the next page in the list of results.
354
364
  * @maxLength 16000
@@ -360,7 +370,7 @@ export interface Cursors {
360
370
  */
361
371
  prev?: string | null;
362
372
  }
363
- export interface AssignProductInstanceToSiteRequest {
373
+ interface AssignProductInstanceToSiteRequest {
364
374
  /**
365
375
  * Idempotency key.
366
376
  * @maxLength 100
@@ -377,7 +387,7 @@ export interface AssignProductInstanceToSiteRequest {
377
387
  */
378
388
  siteId: string;
379
389
  }
380
- export interface AssignProductInstanceToSiteResponse {
390
+ interface AssignProductInstanceToSiteResponse {
381
391
  /**
382
392
  * Idempotency key.
383
393
  * @maxLength 100
@@ -386,7 +396,7 @@ export interface AssignProductInstanceToSiteResponse {
386
396
  /** Updated package that includes the assigned product instance. */
387
397
  package?: Package;
388
398
  }
389
- export interface AssignedProductInstanceToSite {
399
+ interface AssignedProductInstanceToSite {
390
400
  /** Updated package. */
391
401
  package?: Package;
392
402
  /**
@@ -402,7 +412,7 @@ export interface AssignedProductInstanceToSite {
402
412
  */
403
413
  siteId?: string;
404
414
  }
405
- export interface UnassignProductInstanceFromSiteRequest {
415
+ interface UnassignProductInstanceFromSiteRequest {
406
416
  /**
407
417
  * Idempotency key.
408
418
  * @maxLength 100
@@ -414,7 +424,7 @@ export interface UnassignProductInstanceFromSiteRequest {
414
424
  */
415
425
  instanceId: string;
416
426
  }
417
- export interface UnassignProductInstanceFromSiteResponse {
427
+ interface UnassignProductInstanceFromSiteResponse {
418
428
  /**
419
429
  * Idempotency key.
420
430
  * @maxLength 100
@@ -423,7 +433,7 @@ export interface UnassignProductInstanceFromSiteResponse {
423
433
  /** Updated package that includes the unassigned product instance. */
424
434
  package?: Package;
425
435
  }
426
- export interface UnassignedProductInstanceFromSite {
436
+ interface UnassignedProductInstanceFromSite {
427
437
  /** Updated package. */
428
438
  package?: Package;
429
439
  /**
@@ -439,7 +449,7 @@ export interface UnassignedProductInstanceFromSite {
439
449
  */
440
450
  metaSiteId?: string;
441
451
  }
442
- export interface CancelProductInstanceRequest {
452
+ interface CancelProductInstanceRequest {
443
453
  /**
444
454
  * Idempotency key.
445
455
  * @maxLength 100
@@ -451,7 +461,7 @@ export interface CancelProductInstanceRequest {
451
461
  */
452
462
  instanceId: string;
453
463
  }
454
- export interface CancelProductInstanceResponse {
464
+ interface CancelProductInstanceResponse {
455
465
  /**
456
466
  * Idempotency key.
457
467
  * @maxLength 100
@@ -460,7 +470,7 @@ export interface CancelProductInstanceResponse {
460
470
  /** Updated package that includes the previously included the canceled product instance. */
461
471
  package?: Package;
462
472
  }
463
- export interface ProductInstanceCanceled {
473
+ interface ProductInstanceCanceled {
464
474
  /** Updated package. */
465
475
  package?: Package;
466
476
  /**
@@ -470,7 +480,7 @@ export interface ProductInstanceCanceled {
470
480
  */
471
481
  productInstanceId?: string;
472
482
  }
473
- export interface AdjustProductInstanceSpecificationsRequest {
483
+ interface AdjustProductInstanceSpecificationsRequest {
474
484
  /**
475
485
  * Idempotency key.
476
486
  * @maxLength 100
@@ -510,7 +520,7 @@ export interface AdjustProductInstanceSpecificationsRequest {
510
520
  */
511
521
  discountCode?: string | null;
512
522
  }
513
- export interface AdjustProductInstanceSpecificationsResponse {
523
+ interface AdjustProductInstanceSpecificationsResponse {
514
524
  /**
515
525
  * Idempotency key.
516
526
  * @maxLength 100
@@ -519,7 +529,7 @@ export interface AdjustProductInstanceSpecificationsResponse {
519
529
  /** Updated package that includes the adjusted product instance. */
520
530
  package?: Package;
521
531
  }
522
- export interface AdjustedProductInstanceSpecifications {
532
+ interface AdjustedProductInstanceSpecifications {
523
533
  /** Updated package. */
524
534
  package?: Package;
525
535
  /**
@@ -529,7 +539,7 @@ export interface AdjustedProductInstanceSpecifications {
529
539
  */
530
540
  productInstanceId?: string;
531
541
  }
532
- export interface SubscriptionEvent extends SubscriptionEventEventOneOf {
542
+ interface SubscriptionEvent extends SubscriptionEventEventOneOf {
533
543
  /** Triggered when a subscription is created. */
534
544
  created?: SubscriptionCreated;
535
545
  /**
@@ -587,7 +597,7 @@ export interface SubscriptionEvent extends SubscriptionEventEventOneOf {
587
597
  eventDate?: Date | null;
588
598
  }
589
599
  /** @oneof */
590
- export interface SubscriptionEventEventOneOf {
600
+ interface SubscriptionEventEventOneOf {
591
601
  /** Triggered when a subscription is created. */
592
602
  created?: SubscriptionCreated;
593
603
  /**
@@ -634,7 +644,7 @@ export interface SubscriptionEventEventOneOf {
634
644
  recurringChargeAttemptFailed?: RecurringChargeAttemptFailed;
635
645
  }
636
646
  /** Triggered when a subscription is created. */
637
- export interface SubscriptionCreated {
647
+ interface SubscriptionCreated {
638
648
  /** Created subscription. */
639
649
  subscription?: Subscription;
640
650
  /** Metadata for the `created` event. */
@@ -650,12 +660,12 @@ export interface SubscriptionCreated {
650
660
  * A subscription holds information about a Premium product that a Wix account
651
661
  * owner has purchased including details about the billing.
652
662
  */
653
- export interface Subscription {
663
+ interface Subscription {
654
664
  /**
655
665
  * ID of the subscription.
656
666
  * @format GUID
657
667
  */
658
- id?: string;
668
+ _id?: string;
659
669
  /**
660
670
  * ID of the Wix account that purchased the subscription.
661
671
  * @format GUID
@@ -700,7 +710,7 @@ export interface Subscription {
700
710
  * + `CANCELLED`: Subscription isn't active because it has been canceled.
701
711
  * + `TRANSFERRED`: Subscription isn't active because it has been transferred to a different account. A different active subscription was created for the target account.
702
712
  */
703
- status?: SubscriptionStatus;
713
+ status?: SubscriptionStatusWithLiterals;
704
714
  /**
705
715
  * Date and time the subscription was last transferred from one Wix account to
706
716
  * another in
@@ -737,7 +747,7 @@ export interface Subscription {
737
747
  */
738
748
  countryCode?: string | null;
739
749
  }
740
- export interface BillingReference {
750
+ interface BillingReference {
741
751
  /**
742
752
  * Name of the billing system that manages the subscription.
743
753
  *
@@ -747,13 +757,13 @@ export interface BillingReference {
747
757
  * + `"BASS"`: [Billing and Subscriptions System](https://dev.wix.com/docs/rest/internal-only/premium/subscriptions-by-billing-by-wix/introduction).
748
758
  * + `"RESELLER"`: [External Reseller](https://dev.wix.com/api/rest/account-level-apis/resellers/introduction).
749
759
  */
750
- providerName?: ProviderName;
760
+ providerName?: ProviderNameWithLiterals;
751
761
  /** Current provider reference ID. */
752
762
  providerReferenceId?: string | null;
753
763
  /** Previous provider reference IDs. Used for when a subscription is extended, specifically for domains. */
754
764
  previousProviderReferenceIds?: string[];
755
765
  }
756
- export declare enum ProviderName {
766
+ declare enum ProviderName {
757
767
  UNKNOWN = "UNKNOWN",
758
768
  SBS = "SBS",
759
769
  LICENSER = "LICENSER",
@@ -761,26 +771,28 @@ export declare enum ProviderName {
761
771
  RESELLER = "RESELLER",
762
772
  RECURRING_INVOICES = "RECURRING_INVOICES"
763
773
  }
764
- export interface Cycle extends CycleCycleSelectorOneOf {
774
+ /** @enumType */
775
+ type ProviderNameWithLiterals = ProviderName | 'UNKNOWN' | 'SBS' | 'LICENSER' | 'BASS' | 'RESELLER' | 'RECURRING_INVOICES';
776
+ interface Cycle extends CycleCycleSelectorOneOf {
765
777
  /** repetitive interval */
766
778
  interval?: Interval;
767
779
  /** one time */
768
780
  oneTime?: OneTime;
769
781
  }
770
782
  /** @oneof */
771
- export interface CycleCycleSelectorOneOf {
783
+ interface CycleCycleSelectorOneOf {
772
784
  /** repetitive interval */
773
785
  interval?: Interval;
774
786
  /** one time */
775
787
  oneTime?: OneTime;
776
788
  }
777
- export interface Interval {
789
+ interface Interval {
778
790
  /** interval unit of measure */
779
- unit?: IntervalUnit;
791
+ unit?: IntervalUnitWithLiterals;
780
792
  /** number of interval */
781
793
  count?: number;
782
794
  }
783
- export declare enum IntervalUnit {
795
+ declare enum IntervalUnit {
784
796
  /** unknown interval unit */
785
797
  UNKNOWN = "UNKNOWN",
786
798
  /** day */
@@ -792,9 +804,11 @@ export declare enum IntervalUnit {
792
804
  /** year */
793
805
  YEAR = "YEAR"
794
806
  }
795
- export interface OneTime {
807
+ /** @enumType */
808
+ type IntervalUnitWithLiterals = IntervalUnit | 'UNKNOWN' | 'DAY' | 'WEEK' | 'MONTH' | 'YEAR';
809
+ interface OneTime {
796
810
  }
797
- export declare enum SubscriptionStatus {
811
+ declare enum SubscriptionStatus {
798
812
  UNKNOWN = "UNKNOWN",
799
813
  AUTO_RENEW_ON = "AUTO_RENEW_ON",
800
814
  AUTO_RENEW_OFF = "AUTO_RENEW_OFF",
@@ -802,9 +816,11 @@ export declare enum SubscriptionStatus {
802
816
  CANCELLED = "CANCELLED",
803
817
  TRANSFERRED = "TRANSFERRED"
804
818
  }
819
+ /** @enumType */
820
+ type SubscriptionStatusWithLiterals = SubscriptionStatus | 'UNKNOWN' | 'AUTO_RENEW_ON' | 'AUTO_RENEW_OFF' | 'MANUAL_RECURRING' | 'CANCELLED' | 'TRANSFERRED';
805
821
  /** Triggered when a subscription is reactivated. */
806
- export interface ReactivationData {
807
- reactivationReason?: ReactivationReasonEnum;
822
+ interface ReactivationData {
823
+ reactivationReason?: ReactivationReasonEnumWithLiterals;
808
824
  /**
809
825
  * In the event of reactivation after chargeback dispute, the subscription may be extended according to the
810
826
  * number of days it was inactive during the time of resolving the dispute
@@ -816,7 +832,7 @@ export interface ReactivationData {
816
832
  differenceInDays?: number | null;
817
833
  }
818
834
  /** Reason for subscription reactivation */
819
- export declare enum ReactivationReasonEnum {
835
+ declare enum ReactivationReasonEnum {
820
836
  UNKNOWN = "UNKNOWN",
821
837
  /**
822
838
  * Subscription was reactivated due to billing status change from CANCELED to ACTIVE, for example if it was incorrectly
@@ -826,11 +842,13 @@ export declare enum ReactivationReasonEnum {
826
842
  /** Subscription was reactivated after a chargeback dispute */
827
843
  REACTIVATED_AFTER_CHARGEBACK = "REACTIVATED_AFTER_CHARGEBACK"
828
844
  }
845
+ /** @enumType */
846
+ type ReactivationReasonEnumWithLiterals = ReactivationReasonEnum | 'UNKNOWN' | 'BILLING_STATUS_CHANGE' | 'REACTIVATED_AFTER_CHARGEBACK';
829
847
  /**
830
848
  * Triggered when a subscription is assigned to a Wix site, including the initial
831
849
  * assignment of a floating subscription or a re-assignement from a different site.
832
850
  */
833
- export interface SubscriptionAssigned {
851
+ interface SubscriptionAssigned {
834
852
  /** Assigned subscription. */
835
853
  subscription?: Subscription;
836
854
  /**
@@ -840,7 +858,7 @@ export interface SubscriptionAssigned {
840
858
  previousMetaSiteId?: string | null;
841
859
  }
842
860
  /** Triggered when a subscription is canceled. */
843
- export interface SubscriptionCancelled {
861
+ interface SubscriptionCancelled {
844
862
  /** Canceled subscription. */
845
863
  subscription?: Subscription;
846
864
  /** Details about the cancellation including who canceled the subscription and why. */
@@ -855,7 +873,7 @@ export interface SubscriptionCancelled {
855
873
  canceledInFreeTrial?: boolean;
856
874
  }
857
875
  /** Information about the cancellation flow including who canceled the subscription and why it was canceled. */
858
- export interface CancellationDetails {
876
+ interface CancellationDetails {
859
877
  /**
860
878
  * Cancellation code.
861
879
  *
@@ -894,16 +912,18 @@ export interface CancellationDetails {
894
912
  * + `"APP_MANAGED"`: The service provider has canceled the subscription.
895
913
  * + `"PASSIVE"`: The billing system has canceled the subscription. For example, in case of payment failure or fraud.
896
914
  */
897
- initiator?: Initiator;
915
+ initiator?: InitiatorWithLiterals;
898
916
  }
899
- export declare enum Initiator {
917
+ declare enum Initiator {
900
918
  UNKNOWN = "UNKNOWN",
901
919
  USER_REQUESTED = "USER_REQUESTED",
902
920
  APP_MANAGED = "APP_MANAGED",
903
921
  PASSIVE = "PASSIVE"
904
922
  }
923
+ /** @enumType */
924
+ type InitiatorWithLiterals = Initiator | 'UNKNOWN' | 'USER_REQUESTED' | 'APP_MANAGED' | 'PASSIVE';
905
925
  /** Triggered when the subscription's auto renew is turned on. */
906
- export interface SubscriptionAutoRenewTurnedOn {
926
+ interface SubscriptionAutoRenewTurnedOn {
907
927
  /** Subscription for which auto renew is turned on. */
908
928
  subscription?: Subscription;
909
929
  /**
@@ -916,7 +936,7 @@ export interface SubscriptionAutoRenewTurnedOn {
916
936
  initiator?: string | null;
917
937
  }
918
938
  /** Triggered when the subscription's auto renew is turned off. */
919
- export interface SubscriptionAutoRenewTurnedOff {
939
+ interface SubscriptionAutoRenewTurnedOff {
920
940
  /** Subscription for which auto renew is turned off. */
921
941
  subscription?: Subscription;
922
942
  /** Details about the cancellation including who canceled the subscription and why. */
@@ -932,7 +952,7 @@ export interface SubscriptionAutoRenewTurnedOff {
932
952
  * Triggered when a subscription is unassigned from a Wix site and becomes
933
953
  * floating.
934
954
  */
935
- export interface SubscriptionUnassigned {
955
+ interface SubscriptionUnassigned {
936
956
  /** Unassigned subscription. */
937
957
  subscription?: Subscription;
938
958
  /**
@@ -947,27 +967,29 @@ export interface SubscriptionUnassigned {
947
967
  * + `"USER_REQUESTED"`: The Wix account owner has unassigned the subscription.
948
968
  * + `"REPLACED_BY_ANOTHER_SUBSCRIPTION"`: A different subscription that replaces this subscription is assigned to the site.
949
969
  */
950
- unassignReason?: UnassignReason;
970
+ unassignReason?: UnassignReasonWithLiterals;
951
971
  }
952
- export declare enum UnassignReason {
972
+ declare enum UnassignReason {
953
973
  UNKNOWN = "UNKNOWN",
954
974
  USER_REQUESTED = "USER_REQUESTED",
955
975
  REPLACED_BY_ANOTHER_SUBSCRIPTION = "REPLACED_BY_ANOTHER_SUBSCRIPTION"
956
976
  }
977
+ /** @enumType */
978
+ type UnassignReasonWithLiterals = UnassignReason | 'UNKNOWN' | 'USER_REQUESTED' | 'REPLACED_BY_ANOTHER_SUBSCRIPTION';
957
979
  /**
958
980
  * Triggered when a subscription is transferred from one Wix account to another.
959
981
  * A transfer includes cancelling the original subscription and creating a new
960
982
  * subscription for the target account. The event returns both the original
961
983
  * and the new subscription.
962
984
  */
963
- export interface SubscriptionTransferred {
985
+ interface SubscriptionTransferred {
964
986
  /** Original subscription that was canceled for the transfer. */
965
987
  originSubscription?: Subscription;
966
988
  /** Newly created subscription for the target account. */
967
989
  targetSubscription?: Subscription;
968
990
  }
969
991
  /** Triggered when a recurring charge succeeds for a subscription. */
970
- export interface RecurringChargeSucceeded {
992
+ interface RecurringChargeSucceeded {
971
993
  /** Subscription for which the recurring charge has succeeded. */
972
994
  subscription?: Subscription;
973
995
  /** Indication that there was a successful charge at the end of the free trial period */
@@ -977,7 +999,7 @@ export interface RecurringChargeSucceeded {
977
999
  * Triggered when a subscription was updated including when its product has been
978
1000
  * up- or downgraded or the billing cycle is changed.
979
1001
  */
980
- export interface ContractSwitched {
1002
+ interface ContractSwitched {
981
1003
  /** Updated subscription. */
982
1004
  subscription?: Subscription;
983
1005
  /** Billing cycle before the update. */
@@ -1007,7 +1029,7 @@ export interface ContractSwitched {
1007
1029
  * + `"PENDING_CHANGES"`: The subscription's billing is updated, but the change doesn't apply immediately. Instead, the update becomes effective at the end of current billing cycle.
1008
1030
  * + `"DOWNGRADE_RENEWAL"`: The subscription is downgraded because of a declined payment. This prevents subscriptions from churning.
1009
1031
  */
1010
- contractSwitchType?: ContractSwitchType;
1032
+ contractSwitchType?: ContractSwitchTypeWithLiterals;
1011
1033
  /**
1012
1034
  * ID of the metasite the subscription has been assigned to previously.
1013
1035
  * Available only in case the subscription is assigned to a different site.
@@ -1020,7 +1042,7 @@ export interface ContractSwitched {
1020
1042
  * + `"PRICE_INCREASE"`: The subscription's price has been increased.
1021
1043
  * + `"EXTERNAL_PROVIDER_TRIGGER"`: Any reason other than a price increase.
1022
1044
  */
1023
- contractSwitchReason?: ContractSwitchReason;
1045
+ contractSwitchReason?: ContractSwitchReasonWithLiterals;
1024
1046
  /** Information about the price update. Available only for updates with a price increase. */
1025
1047
  productPriceIncreaseData?: ProductPriceIncreaseData;
1026
1048
  /**
@@ -1030,10 +1052,10 @@ export interface ContractSwitched {
1030
1052
  * + `NOT_APPLICABLE`: There is no information about whether the product has been up- or downgraded.
1031
1053
  * + `DOWNGRADE`: The product has been downgraded.
1032
1054
  */
1033
- productAdjustment?: ProductAdjustment;
1055
+ productAdjustment?: ProductAdjustmentWithLiterals;
1034
1056
  }
1035
1057
  /** Copied from SBS */
1036
- export declare enum ContractSwitchType {
1058
+ declare enum ContractSwitchType {
1037
1059
  NOT_APPLICABLE = "NOT_APPLICABLE",
1038
1060
  ADDITIONAL_QUANTITY = "ADDITIONAL_QUANTITY",
1039
1061
  CREDIT_UNUSED_PERIOD = "CREDIT_UNUSED_PERIOD",
@@ -1045,12 +1067,16 @@ export declare enum ContractSwitchType {
1045
1067
  PENDING_CHANGES = "PENDING_CHANGES",
1046
1068
  DOWNGRADE_RENEWAL = "DOWNGRADE_RENEWAL"
1047
1069
  }
1048
- export declare enum ContractSwitchReason {
1070
+ /** @enumType */
1071
+ type ContractSwitchTypeWithLiterals = ContractSwitchType | 'NOT_APPLICABLE' | 'ADDITIONAL_QUANTITY' | 'CREDIT_UNUSED_PERIOD' | 'REFUND_PRICE_DIFF' | 'ADJUST_PERIOD_END' | 'DOWNGRADE_GRACE_PERIOD' | 'FULL_AMOUNT_PERIOD' | 'END_OF_PERIOD' | 'PENDING_CHANGES' | 'DOWNGRADE_RENEWAL';
1072
+ declare enum ContractSwitchReason {
1049
1073
  EXTERNAL_PROVIDER_TRIGGER = "EXTERNAL_PROVIDER_TRIGGER",
1050
1074
  PRICE_INCREASE = "PRICE_INCREASE"
1051
1075
  }
1076
+ /** @enumType */
1077
+ type ContractSwitchReasonWithLiterals = ContractSwitchReason | 'EXTERNAL_PROVIDER_TRIGGER' | 'PRICE_INCREASE';
1052
1078
  /** Triggered when a subscription's price is increased. */
1053
- export interface ProductPriceIncreaseData {
1079
+ interface ProductPriceIncreaseData {
1054
1080
  /**
1055
1081
  * Price of the subscription before the update.
1056
1082
  * @format DECIMAL_VALUE
@@ -1061,26 +1087,30 @@ export interface ProductPriceIncreaseData {
1061
1087
  /** Used to differentiate between migration segments. Does not have to be unique per segment. */
1062
1088
  segmentName?: string | null;
1063
1089
  /** Used to determine how the price increase was triggered. */
1064
- priceIncreaseTrigger?: PriceIncreaseTrigger;
1090
+ priceIncreaseTrigger?: PriceIncreaseTriggerWithLiterals;
1065
1091
  }
1066
1092
  /** Reason for Price Increase Trigger */
1067
- export declare enum PriceIncreaseTrigger {
1093
+ declare enum PriceIncreaseTrigger {
1068
1094
  NEAR_RENEWAL = "NEAR_RENEWAL",
1069
1095
  RECURRING_SUCCESS = "RECURRING_SUCCESS",
1070
1096
  MANUAL = "MANUAL"
1071
1097
  }
1098
+ /** @enumType */
1099
+ type PriceIncreaseTriggerWithLiterals = PriceIncreaseTrigger | 'NEAR_RENEWAL' | 'RECURRING_SUCCESS' | 'MANUAL';
1072
1100
  /** Triggered when a subscription's product is adusted. */
1073
- export declare enum ProductAdjustment {
1101
+ declare enum ProductAdjustment {
1074
1102
  /** flag to show that the ContractSwitchedEvent is not applicable / needed */
1075
1103
  NOT_APPLICABLE = "NOT_APPLICABLE",
1076
1104
  /** flag to show that the ContractSwitchedEvent is a Downgrade */
1077
1105
  DOWNGRADE = "DOWNGRADE"
1078
1106
  }
1107
+ /** @enumType */
1108
+ type ProductAdjustmentWithLiterals = ProductAdjustment | 'NOT_APPLICABLE' | 'DOWNGRADE';
1079
1109
  /**
1080
1110
  * Triggered when a subscription gets close to the end of its billing cycle.
1081
1111
  * The exact number of days is defined in the billing system.
1082
1112
  */
1083
- export interface SubscriptionNearEndOfPeriod {
1113
+ interface SubscriptionNearEndOfPeriod {
1084
1114
  /** Subscription that got close to the end of its billing cycle. */
1085
1115
  subscription?: Subscription;
1086
1116
  /** Whether the subscription is within the free trial period. */
@@ -1090,18 +1120,18 @@ export interface SubscriptionNearEndOfPeriod {
1090
1120
  * Triggered when a subscription is updated and the change doesn't happen
1091
1121
  * immediately but at the end of the current billing cycle.
1092
1122
  */
1093
- export interface SubscriptionPendingChange {
1123
+ interface SubscriptionPendingChange {
1094
1124
  /** Subscription for which a pending update is triggered. */
1095
1125
  subscription?: Subscription;
1096
1126
  }
1097
1127
  /** Triggered when a recurring charge attempt failed for a subscription. */
1098
- export interface RecurringChargeAttemptFailed {
1128
+ interface RecurringChargeAttemptFailed {
1099
1129
  /** Subscription for which the recurring charge attempt has failed. */
1100
1130
  subscription?: Subscription;
1101
1131
  }
1102
- export interface Empty {
1132
+ interface Empty {
1103
1133
  }
1104
- export interface ProductInstanceUpdated {
1134
+ interface ProductInstanceUpdated {
1105
1135
  /** Updated package. */
1106
1136
  package?: Package;
1107
1137
  /**
@@ -1111,7 +1141,7 @@ export interface ProductInstanceUpdated {
1111
1141
  */
1112
1142
  productInstanceId?: string;
1113
1143
  }
1114
- export interface FailureReportRequest {
1144
+ interface FailureReportRequest {
1115
1145
  /**
1116
1146
  * ID of the product instance that failed.
1117
1147
  * @format GUID
@@ -1120,7 +1150,7 @@ export interface FailureReportRequest {
1120
1150
  /** Failure reason. */
1121
1151
  reason?: FailureReason;
1122
1152
  }
1123
- export interface ProductInstanceFailed {
1153
+ interface ProductInstanceFailed {
1124
1154
  /** Updated package. */
1125
1155
  package?: Package;
1126
1156
  /**
@@ -1132,56 +1162,58 @@ export interface ProductInstanceFailed {
1132
1162
  /** Failure reason. */
1133
1163
  reason?: FailureReason;
1134
1164
  }
1135
- export interface Task {
1165
+ interface Task {
1136
1166
  key?: TaskKey;
1137
1167
  executeAt?: Date | null;
1138
1168
  payload?: string | null;
1139
1169
  }
1140
- export interface TaskKey {
1170
+ interface TaskKey {
1141
1171
  appId?: string;
1142
1172
  instanceId?: string;
1143
1173
  subjectId?: string | null;
1144
1174
  }
1145
- export interface TaskAction extends TaskActionActionOneOf {
1175
+ interface TaskAction extends TaskActionActionOneOf {
1146
1176
  complete?: Complete;
1147
1177
  cancel?: Cancel;
1148
1178
  reschedule?: Reschedule;
1149
1179
  }
1150
1180
  /** @oneof */
1151
- export interface TaskActionActionOneOf {
1181
+ interface TaskActionActionOneOf {
1152
1182
  complete?: Complete;
1153
1183
  cancel?: Cancel;
1154
1184
  reschedule?: Reschedule;
1155
1185
  }
1156
- export interface Complete {
1186
+ interface Complete {
1157
1187
  }
1158
- export interface Cancel {
1188
+ interface Cancel {
1159
1189
  }
1160
- export interface Reschedule {
1190
+ interface Reschedule {
1161
1191
  executeAt?: Date | null;
1162
1192
  payload?: string | null;
1163
1193
  }
1164
- export interface UpdateProductInstanceRequest {
1194
+ interface UpdateProductInstanceRequest {
1165
1195
  /**
1166
1196
  * ID of the product instance to update.
1167
1197
  * @format GUID
1168
1198
  */
1169
1199
  instanceId?: string;
1170
- status?: Status;
1200
+ status?: StatusWithLiterals;
1171
1201
  /** @format COUNTRY */
1172
1202
  countryCode?: string | null;
1173
1203
  /** Which field to update, currently only status and countryCode are supported. */
1174
- fieldToUpdate?: FieldToUpdate;
1204
+ fieldToUpdate?: FieldToUpdateWithLiterals;
1175
1205
  }
1176
- export declare enum FieldToUpdate {
1206
+ declare enum FieldToUpdate {
1177
1207
  STATUS = "STATUS",
1178
1208
  COUNTRY_CODE = "COUNTRY_CODE"
1179
1209
  }
1180
- export interface UpdateProductInstanceResponse {
1210
+ /** @enumType */
1211
+ type FieldToUpdateWithLiterals = FieldToUpdate | 'STATUS' | 'COUNTRY_CODE';
1212
+ interface UpdateProductInstanceResponse {
1181
1213
  /** Updated Product Instance */
1182
1214
  productInstance?: ProductInstance;
1183
1215
  }
1184
- export interface UpdatePackageExternalIdRequest {
1216
+ interface UpdatePackageExternalIdRequest {
1185
1217
  /**
1186
1218
  * ID of the package to update.
1187
1219
  * @format GUID
@@ -1193,25 +1225,25 @@ export interface UpdatePackageExternalIdRequest {
1193
1225
  */
1194
1226
  externalId: string;
1195
1227
  }
1196
- export interface UpdatePackageExternalIdResponse {
1228
+ interface UpdatePackageExternalIdResponse {
1197
1229
  /** Updated package. */
1198
1230
  updatedPackage?: Package;
1199
1231
  }
1200
- export interface CountPackagesRequest {
1232
+ interface CountPackagesRequest {
1201
1233
  /** Filter on what packages to count */
1202
1234
  filter?: Record<string, any> | null;
1203
1235
  }
1204
- export interface CountPackagesResponse {
1236
+ interface CountPackagesResponse {
1205
1237
  /** Number of packages */
1206
1238
  count?: number;
1207
1239
  }
1208
- export interface DomainEvent extends DomainEventBodyOneOf {
1240
+ interface DomainEvent extends DomainEventBodyOneOf {
1209
1241
  createdEvent?: EntityCreatedEvent;
1210
1242
  updatedEvent?: EntityUpdatedEvent;
1211
1243
  deletedEvent?: EntityDeletedEvent;
1212
1244
  actionEvent?: ActionEvent;
1213
1245
  /** Event ID. With this ID you can easily spot duplicated events and ignore them. */
1214
- id?: string;
1246
+ _id?: string;
1215
1247
  /**
1216
1248
  * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.
1217
1249
  * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
@@ -1240,36 +1272,34 @@ export interface DomainEvent extends DomainEventBodyOneOf {
1240
1272
  entityEventSequence?: string | null;
1241
1273
  }
1242
1274
  /** @oneof */
1243
- export interface DomainEventBodyOneOf {
1275
+ interface DomainEventBodyOneOf {
1244
1276
  createdEvent?: EntityCreatedEvent;
1245
1277
  updatedEvent?: EntityUpdatedEvent;
1246
1278
  deletedEvent?: EntityDeletedEvent;
1247
1279
  actionEvent?: ActionEvent;
1248
1280
  }
1249
- export interface EntityCreatedEvent {
1250
- entityAsJson?: string;
1251
- /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */
1252
- restoreInfo?: RestoreInfo;
1281
+ interface EntityCreatedEvent {
1282
+ entity?: string;
1253
1283
  }
1254
- export interface RestoreInfo {
1284
+ interface RestoreInfo {
1255
1285
  deletedDate?: Date | null;
1256
1286
  }
1257
- export interface EntityUpdatedEvent {
1287
+ interface EntityUpdatedEvent {
1258
1288
  /**
1259
1289
  * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
1260
1290
  * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
1261
1291
  * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
1262
1292
  */
1263
- currentEntityAsJson?: string;
1293
+ currentEntity?: string;
1264
1294
  }
1265
- export interface EntityDeletedEvent {
1295
+ interface EntityDeletedEvent {
1266
1296
  /** Entity that was deleted. */
1267
- deletedEntityAsJson?: string | null;
1297
+ deletedEntity?: string | null;
1268
1298
  }
1269
- export interface ActionEvent {
1270
- bodyAsJson?: string;
1299
+ interface ActionEvent {
1300
+ body?: string;
1271
1301
  }
1272
- export interface MessageEnvelope {
1302
+ interface MessageEnvelope {
1273
1303
  /**
1274
1304
  * App instance ID.
1275
1305
  * @format GUID
@@ -1285,7 +1315,7 @@ export interface MessageEnvelope {
1285
1315
  /** Stringify payload. */
1286
1316
  data?: string;
1287
1317
  }
1288
- export interface IdentificationData extends IdentificationDataIdOneOf {
1318
+ interface IdentificationData extends IdentificationDataIdOneOf {
1289
1319
  /**
1290
1320
  * ID of a site visitor that has not logged in to the site.
1291
1321
  * @format GUID
@@ -1307,10 +1337,10 @@ export interface IdentificationData extends IdentificationDataIdOneOf {
1307
1337
  */
1308
1338
  appId?: string;
1309
1339
  /** @readonly */
1310
- identityType?: WebhookIdentityType;
1340
+ identityType?: WebhookIdentityTypeWithLiterals;
1311
1341
  }
1312
1342
  /** @oneof */
1313
- export interface IdentificationDataIdOneOf {
1343
+ interface IdentificationDataIdOneOf {
1314
1344
  /**
1315
1345
  * ID of a site visitor that has not logged in to the site.
1316
1346
  * @format GUID
@@ -1332,14 +1362,16 @@ export interface IdentificationDataIdOneOf {
1332
1362
  */
1333
1363
  appId?: string;
1334
1364
  }
1335
- export declare enum WebhookIdentityType {
1365
+ declare enum WebhookIdentityType {
1336
1366
  UNKNOWN = "UNKNOWN",
1337
1367
  ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
1338
1368
  MEMBER = "MEMBER",
1339
1369
  WIX_USER = "WIX_USER",
1340
1370
  APP = "APP"
1341
1371
  }
1342
- export interface MigrateSubscriptionToPackagesRequest {
1372
+ /** @enumType */
1373
+ type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
1374
+ interface MigrateSubscriptionToPackagesRequest {
1343
1375
  /** Created package. */
1344
1376
  productInstance?: ProductInstance;
1345
1377
  /**
@@ -1353,10 +1385,10 @@ export interface MigrateSubscriptionToPackagesRequest {
1353
1385
  */
1354
1386
  userId?: string | null;
1355
1387
  }
1356
- export interface MigrateSubscriptionToPackagesResponse {
1388
+ interface MigrateSubscriptionToPackagesResponse {
1357
1389
  package?: Package;
1358
1390
  }
1359
- export interface FixBrokenMigrationRequest {
1391
+ interface FixBrokenMigrationRequest {
1360
1392
  /**
1361
1393
  * Subscription id of the broken subscription
1362
1394
  * @format GUID
@@ -1373,5 +1405,155 @@ export interface FixBrokenMigrationRequest {
1373
1405
  */
1374
1406
  userId?: string;
1375
1407
  }
1376
- export interface FixBrokenMigrationResponse {
1408
+ interface FixBrokenMigrationResponse {
1377
1409
  }
1410
+ interface CreatePackageOptions {
1411
+ /**
1412
+ * Idempotency key.
1413
+ * @maxLength 100
1414
+ */
1415
+ idempotencyKey?: string | null;
1416
+ /**
1417
+ * External reference. For example, an external subscription ID. **Note:** This field is not validated by Wix.
1418
+ * @maxLength 100
1419
+ */
1420
+ externalId?: string | null;
1421
+ /**
1422
+ * Wix services that are resold.
1423
+ * @maxSize 1000
1424
+ * @minSize 1
1425
+ */
1426
+ products: ProductInstance[];
1427
+ }
1428
+ interface CreatePackageV2Options {
1429
+ /**
1430
+ * Idempotency key.
1431
+ * @maxLength 100
1432
+ */
1433
+ idempotencyKey?: string | null;
1434
+ /**
1435
+ * External reference. For example, an external subscription ID. **Note:** This field is not validated by Wix.
1436
+ * @maxLength 100
1437
+ */
1438
+ externalId?: string | null;
1439
+ /**
1440
+ * Wix services that are resold.
1441
+ * @maxSize 1000
1442
+ * @minSize 1
1443
+ */
1444
+ products: ProductInstance[];
1445
+ }
1446
+ interface CancelPackageOptions {
1447
+ /**
1448
+ * Idempotency key.
1449
+ * @maxLength 100
1450
+ */
1451
+ idempotencyKey?: string | null;
1452
+ }
1453
+ interface QueryCursorResult {
1454
+ cursors: Cursors;
1455
+ hasNext: () => boolean;
1456
+ hasPrev: () => boolean;
1457
+ length: number;
1458
+ pageSize: number;
1459
+ }
1460
+ interface PackagesQueryResult extends QueryCursorResult {
1461
+ items: Package[];
1462
+ query: PackagesQueryBuilder;
1463
+ next: () => Promise<PackagesQueryResult>;
1464
+ prev: () => Promise<PackagesQueryResult>;
1465
+ }
1466
+ interface PackagesQueryBuilder {
1467
+ /** @param limit - Number of items to return, which is also the `pageSize` of the results object.
1468
+ * @documentationMaturity preview
1469
+ */
1470
+ limit: (limit: number) => PackagesQueryBuilder;
1471
+ /** @param cursor - A pointer to specific record
1472
+ * @documentationMaturity preview
1473
+ */
1474
+ skipTo: (cursor: string) => PackagesQueryBuilder;
1475
+ /** @documentationMaturity preview */
1476
+ find: () => Promise<PackagesQueryResult>;
1477
+ }
1478
+ interface AssignProductInstanceToSiteIdentifiers {
1479
+ /**
1480
+ * ID of the product instance to assign to a site.
1481
+ * @format GUID
1482
+ */
1483
+ instanceId: string;
1484
+ /**
1485
+ * ID of the site to which the product instance is assigned.
1486
+ * @format GUID
1487
+ */
1488
+ siteId: string;
1489
+ }
1490
+ interface AssignProductInstanceToSiteOptions {
1491
+ /**
1492
+ * Idempotency key.
1493
+ * @maxLength 100
1494
+ */
1495
+ idempotencyKey?: string | null;
1496
+ }
1497
+ interface UnassignProductInstanceFromSiteOptions {
1498
+ /**
1499
+ * Idempotency key.
1500
+ * @maxLength 100
1501
+ */
1502
+ idempotencyKey?: string | null;
1503
+ }
1504
+ interface CancelProductInstanceOptions {
1505
+ /**
1506
+ * Idempotency key.
1507
+ * @maxLength 100
1508
+ */
1509
+ idempotencyKey?: string | null;
1510
+ }
1511
+ interface AdjustProductInstanceSpecificationsOptions {
1512
+ /**
1513
+ * Idempotency key.
1514
+ * @maxLength 100
1515
+ */
1516
+ idempotencyKey?: string | null;
1517
+ /**
1518
+ * ID of the product to replace the original instance. Required in case you don't
1519
+ * provide a new `billingInfo` object.
1520
+ * @format GUID
1521
+ */
1522
+ catalogProductId?: string | null;
1523
+ /**
1524
+ * Information about the billing cycle. Required in case you don't provide a new
1525
+ * `catalogProductId`. The new billing cycle must be supported for the service.
1526
+ * Contact the [Wix B2B sales team](mailto:bizdev@wix.com) for
1527
+ * information about a service's supported billing cycles. If
1528
+ * you adjust the billing cycle for a product instance with `RECURRING`
1529
+ * payments, you must also provide `billingInfo.cycleDuration.unit`.
1530
+ */
1531
+ billingInfo?: ProductInstanceCycle;
1532
+ /**
1533
+ * Discount code indicating that the reseller provisioned the product instance
1534
+ * during a sale. In case you pass a code that isn't valid, the call succeeds and
1535
+ * no discount is applied to the product instance. Wix doesn't guarantee that a
1536
+ * discount code reduces the price between Wix and the reseller, even when it's
1537
+ * valid. You can't add a discount code after you've created the
1538
+ * product instance. Contact the [Wix B2B sales team](mailto:bizdev@wix.com) for
1539
+ * more information about supported codes.
1540
+ *
1541
+ * Max: 25 characters
1542
+ * @maxLength 25
1543
+ */
1544
+ discountCode?: string | null;
1545
+ }
1546
+ interface UpdatePackageExternalIdIdentifiers {
1547
+ /**
1548
+ * ID of the package to update.
1549
+ * @format GUID
1550
+ */
1551
+ packageId: string;
1552
+ /**
1553
+ * External ID that will be assigned to the package.
1554
+ * @maxLength 100
1555
+ */
1556
+ externalId: string;
1557
+ }
1558
+
1559
+ export { type Cursors as $, type AssignProductInstanceToSiteIdentifiers as A, type ProductInstance as B, type CreatePackageOptions as C, type ProductInstanceContractDetailsOneOf as D, type CycleInterval as E, FailureReasonFailureReason as F, type FailureReason as G, type ProductInstanceCycle as H, IntervalIntervalUnit as I, type CreatePackageRequest as J, type CancelPackageRequest as K, type PackageCanceled as L, type GetPackageRequest as M, type GetPackageResponse as N, type QueryV2 as O, type Package as P, type QueryPackagesRequest as Q, ReactivationReasonEnum as R, Status as S, type QueryV2PagingMethodOneOf as T, type UnassignProductInstanceFromSiteOptions as U, type Sorting as V, WebhookIdentityType as W, type Paging as X, type CursorPaging as Y, type QueryPackagesResponse as Z, type PagingMetadataV2 as _, type CreatePackageResponse as a, type AssignProductInstanceToSiteRequest as a0, type AssignedProductInstanceToSite as a1, type UnassignProductInstanceFromSiteRequest as a2, type UnassignedProductInstanceFromSite as a3, type CancelProductInstanceRequest as a4, type ProductInstanceCanceled as a5, type AdjustProductInstanceSpecificationsRequest as a6, type AdjustedProductInstanceSpecifications as a7, type SubscriptionEvent as a8, type SubscriptionEventEventOneOf as a9, type TaskKey as aA, type TaskAction as aB, type TaskActionActionOneOf as aC, type Complete as aD, type Cancel as aE, type Reschedule as aF, type UpdateProductInstanceRequest as aG, type UpdateProductInstanceResponse as aH, type UpdatePackageExternalIdRequest as aI, type CountPackagesRequest as aJ, type CountPackagesResponse as aK, type DomainEvent as aL, type DomainEventBodyOneOf as aM, type EntityCreatedEvent as aN, type RestoreInfo as aO, type EntityUpdatedEvent as aP, type EntityDeletedEvent as aQ, type ActionEvent as aR, type MessageEnvelope as aS, type IdentificationData as aT, type IdentificationDataIdOneOf as aU, type MigrateSubscriptionToPackagesRequest as aV, type MigrateSubscriptionToPackagesResponse as aW, type FixBrokenMigrationRequest as aX, type FixBrokenMigrationResponse as aY, type PackagesQueryResult as aZ, type SubscriptionCreated as aa, type Subscription as ab, type BillingReference as ac, type Cycle as ad, type CycleCycleSelectorOneOf as ae, type Interval as af, type OneTime as ag, type ReactivationData as ah, type SubscriptionAssigned as ai, type SubscriptionCancelled as aj, type CancellationDetails as ak, type SubscriptionAutoRenewTurnedOn as al, type SubscriptionAutoRenewTurnedOff as am, type SubscriptionUnassigned as an, type SubscriptionTransferred as ao, type RecurringChargeSucceeded as ap, type ContractSwitched as aq, type ProductPriceIncreaseData as ar, type SubscriptionNearEndOfPeriod as as, type SubscriptionPendingChange as at, type RecurringChargeAttemptFailed as au, type Empty as av, type ProductInstanceUpdated as aw, type FailureReportRequest as ax, type ProductInstanceFailed as ay, type Task as az, type CreatePackageV2Options as b, type CancelPackageOptions as c, type CancelPackageResponse as d, type PackagesQueryBuilder as e, type AssignProductInstanceToSiteOptions as f, type AssignProductInstanceToSiteResponse as g, type UnassignProductInstanceFromSiteResponse as h, type CancelProductInstanceOptions as i, type CancelProductInstanceResponse as j, type AdjustProductInstanceSpecificationsOptions as k, type AdjustProductInstanceSpecificationsResponse as l, type UpdatePackageExternalIdIdentifiers as m, type UpdatePackageExternalIdResponse as n, CycleDescriptorType as o, SortOrder as p, ProviderName as q, IntervalUnit as r, SubscriptionStatus as s, Initiator as t, UnassignReason as u, ContractSwitchType as v, ContractSwitchReason as w, PriceIncreaseTrigger as x, ProductAdjustment as y, FieldToUpdate as z };