@wix/auto_sdk_packages_packages 1.0.2 → 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} +321 -199
  8. package/build/{internal/cjs/src/premium-reseller-v1-packages-packages.public.d.ts → es/index.d.mts} +36 -25
  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} +321 -199
  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} +321 -199
  22. package/build/{es/src/premium-reseller-v1-packages-packages.public.d.ts → internal/es/index.d.mts} +36 -25
  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} +321 -199
  29. package/package.json +11 -10
  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 -1865
  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 -1865
  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 -1865
  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 -1865
  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
@@ -1,1865 +0,0 @@
1
- /**
2
- * A package is group of instances of Wix services that a reseller offers to a
3
- * customer as part of a single transaction.
4
- */
5
- export interface Package {
6
- /**
7
- * Package ID.
8
- * @readonly
9
- * @format GUID
10
- */
11
- _id?: string;
12
- /**
13
- * Wix account ID. See
14
- * [Account Level APIs](https://dev.wix.com/docs/rest/account-level/about-account-level-apis)
15
- * for more details.
16
- * @readonly
17
- * @format GUID
18
- */
19
- accountId?: string;
20
- /**
21
- * External reference. For example, an external subscription ID.
22
- * This field isn't validated by Wix.
23
- *
24
- * Max: 100 characters
25
- * @maxLength 100
26
- */
27
- externalId?: string | null;
28
- /**
29
- * Product instances that are included in the package.
30
- *
31
- * Min: 1 product instance
32
- * Max: 1000 product instances
33
- * @maxSize 1000
34
- * @minSize 1
35
- */
36
- productInstances?: ProductInstance[];
37
- /**
38
- * Date and time the package was created.
39
- * @readonly
40
- */
41
- _createdDate?: Date | null;
42
- /**
43
- * Date and time the package was last updated.
44
- * @readonly
45
- */
46
- _updatedDate?: Date | null;
47
- }
48
- /**
49
- * A product instance is a specific instance of a Wix service that a reseller
50
- * offers to one of their customers.
51
- */
52
- export interface ProductInstance extends ProductInstanceContractDetailsOneOf {
53
- /** Billing information for the contract between the reseller and Wix. */
54
- billingInfo?: ProductInstanceCycle;
55
- /**
56
- * ID of the instance of the resold Wix service. **Note:** Differs from the
57
- * `catalogProductId`. Allows you to identify different instances of the same
58
- * product in a package.
59
- * @readonly
60
- * @format GUID
61
- */
62
- instanceId?: string;
63
- /**
64
- * ID of the Wix site that the product instance is assigned to.
65
- * See the [Query Sites API](https://dev.wix.com/api/rest/account-level-apis/sites/query-sites)
66
- * for more information.
67
- * @format GUID
68
- */
69
- siteId?: string | null;
70
- /**
71
- * Product ID, as defined in the Wix Premium Product Catalog.
72
- * Contact the [Wix B2B sales team](mailto:bizdev@wix.com)
73
- * for more details about available Wix services.
74
- * @format GUID
75
- */
76
- catalogProductId?: string;
77
- /**
78
- * Status of the product instance.
79
- * @readonly
80
- */
81
- status?: Status;
82
- /**
83
- * Failure object. Only present for status `FAILED`. Describes why the product instance `FAILED`.
84
- * @readonly
85
- */
86
- failure?: FailureReason;
87
- /**
88
- * Date and time the product instance was created.
89
- * @readonly
90
- */
91
- _createdDate?: Date | null;
92
- /**
93
- * Date and time the product instance was last updated.
94
- * @readonly
95
- */
96
- _updatedDate?: Date | null;
97
- /**
98
- * Two-letter country code in
99
- * [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements)
100
- * format. Specifies where customers can claim vouchers that may come with the
101
- * product. Contact the [Wix B2B sales team](mailto:bizdev@wix.com) to get more
102
- * information about vouchers and supported locations.
103
- * @format COUNTRY
104
- */
105
- countryCode?: string | null;
106
- /**
107
- * Date and time the product instance expires in `YYYY-MM-DDThh:mm:ss.sssZ` format.
108
- * Used only for instances that don't auto renew at the end of the current billing cycle.
109
- * @readonly
110
- */
111
- expirationDate?: Date | null;
112
- /**
113
- * Discount code indicating that the reseller provisioned the product instance
114
- * during a sale. Wix doesn't guarantee that a discount code reduces the
115
- * price between Wix and the reseller, even when it's valid. Contact the
116
- * [Wix B2B sales team](mailto:bizdev@wix.com) for more information.
117
- *
118
- * Max: 25 characters
119
- * @maxLength 25
120
- */
121
- discountCode?: string | null;
122
- /**
123
- * ID of a different product instance that you can use to offer your customers
124
- * time-limited free access to an additional product or service. For example,
125
- * Wix offers a 1-year free domain registration to all customers who purchase a
126
- * Premium plan. The referenced product instance must have either status `"PENDING"` or
127
- * `"ACTIVE"`. You can use each product instance only a single time as reference
128
- * instance.
129
- * @format GUID
130
- */
131
- referenceProductInstanceId?: string | null;
132
- }
133
- /** @oneof */
134
- export interface ProductInstanceContractDetailsOneOf {
135
- /** Billing information for the contract between the reseller and Wix. */
136
- billingInfo?: ProductInstanceCycle;
137
- }
138
- export declare enum FailureReasonFailureReason {
139
- UNKNOWN = "UNKNOWN",
140
- /** The product instance couldn't be created because the Resellers API timed out. */
141
- DELIVERY_TIMEOUT = "DELIVERY_TIMEOUT",
142
- /** The product instance couldn't be created because an external process failed. */
143
- EXTERNAL_FAILURE = "EXTERNAL_FAILURE"
144
- }
145
- export declare enum IntervalIntervalUnit {
146
- /** unknown interval unit */
147
- UNKNOWN = "UNKNOWN",
148
- /** Day */
149
- DAY = "DAY",
150
- /** Week */
151
- WEEK = "WEEK",
152
- /** Month */
153
- MONTH = "MONTH",
154
- /** Year */
155
- YEAR = "YEAR"
156
- }
157
- export declare enum CycleDescriptorType {
158
- /** The payment type hasn't been set. */
159
- UNKNOWN = "UNKNOWN",
160
- /** The reseller pays Wix in a single payment. */
161
- ONE_TIME = "ONE_TIME",
162
- /** The reseller pays Wix on a recurring schedule. */
163
- RECURRING = "RECURRING"
164
- }
165
- export interface CycleInterval {
166
- /** Unit of the billing cycle. */
167
- unit?: IntervalIntervalUnit;
168
- /**
169
- * Count of units that make up the billing cycle.
170
- * @min 1
171
- */
172
- count?: number;
173
- }
174
- export declare enum Status {
175
- /** The product instance isn't yet available to the customer. */
176
- PENDING = "PENDING",
177
- /** The customer can use the product instance. */
178
- ENABLED = "ENABLED",
179
- /** The product instance isn't any longer available to the customer. */
180
- CANCELED = "CANCELED",
181
- /** The product instance couldn't be delivered successfully and has never been available to the customer. */
182
- FAILED = "FAILED",
183
- /** The product instance isn't yet available to the customer, because an external provider or the customer must take an action. */
184
- AWAITING_ACTION = "AWAITING_ACTION"
185
- }
186
- export interface FailureReason {
187
- /** Failure code. */
188
- code?: FailureReasonFailureReason;
189
- /** Failure message. */
190
- message?: string;
191
- }
192
- export interface ProductInstanceCycle {
193
- /** Payment type. */
194
- type?: CycleDescriptorType;
195
- /** Duration of the billing cycle. Available only for `RECURRING` payments. */
196
- cycleDuration?: CycleInterval;
197
- }
198
- export interface CreatePackageRequest {
199
- /**
200
- * Idempotency key.
201
- * @maxLength 100
202
- */
203
- idempotencyKey?: string | null;
204
- /**
205
- * External reference. For example, an external subscription ID. **Note:** This field is not validated by Wix.
206
- * @maxLength 100
207
- */
208
- externalId?: string | null;
209
- /**
210
- * Wix services that are resold.
211
- * @maxSize 1000
212
- * @minSize 1
213
- */
214
- products: ProductInstance[];
215
- }
216
- export interface CreatePackageResponse {
217
- /**
218
- * Idempotency key.
219
- * @maxLength 100
220
- */
221
- idempotencyKey?: string | null;
222
- /** Created package. */
223
- package?: Package;
224
- }
225
- export interface CancelPackageRequest {
226
- /**
227
- * Idempotency key.
228
- * @maxLength 100
229
- */
230
- idempotencyKey?: string | null;
231
- /**
232
- * ID of the package to cancel.
233
- * @format GUID
234
- */
235
- _id: string;
236
- }
237
- export interface CancelPackageResponse {
238
- /**
239
- * Idempotency key.
240
- * @maxLength 100
241
- */
242
- idempotencyKey?: string | null;
243
- /** Canceled package. */
244
- package?: Package;
245
- }
246
- export interface PackageCanceled {
247
- /** Canceled package. */
248
- package?: Package;
249
- }
250
- export interface GetPackageRequest {
251
- /**
252
- * Package ID.
253
- * @format GUID
254
- */
255
- _id: string;
256
- }
257
- export interface GetPackageResponse {
258
- /** Retrieved package. */
259
- package?: Package;
260
- }
261
- export interface QueryPackagesRequest {
262
- /** Query options. See [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language) for more details. */
263
- query: QueryV2;
264
- }
265
- export interface QueryV2 extends QueryV2PagingMethodOneOf {
266
- /** Paging options to limit and skip the number of items. */
267
- paging?: Paging;
268
- /** 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
- cursorPaging?: CursorPaging;
270
- /**
271
- * Filter object.
272
- *
273
- * Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section).
274
- */
275
- filter?: Record<string, any> | null;
276
- /**
277
- * Sort object.
278
- *
279
- * Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).
280
- */
281
- sort?: Sorting[];
282
- /** 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. */
283
- fields?: string[];
284
- /** Array of named, predefined sets of projected fields. A array of predefined named sets of fields to be returned. Specifying multiple `fieldsets` will return the union of fields from all sets. If `fields` are also specified, the union of `fieldsets` and `fields` is returned. */
285
- fieldsets?: string[];
286
- }
287
- /** @oneof */
288
- export interface QueryV2PagingMethodOneOf {
289
- /** Paging options to limit and skip the number of items. */
290
- paging?: Paging;
291
- /** 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
- cursorPaging?: CursorPaging;
293
- }
294
- export interface Sorting {
295
- /**
296
- * Name of the field to sort by.
297
- * @maxLength 512
298
- */
299
- fieldName?: string;
300
- /** Sort order. */
301
- order?: SortOrder;
302
- }
303
- export declare enum SortOrder {
304
- ASC = "ASC",
305
- DESC = "DESC"
306
- }
307
- export interface Paging {
308
- /** Number of items to load. */
309
- limit?: number | null;
310
- /** Number of items to skip in the current sort order. */
311
- offset?: number | null;
312
- }
313
- export interface CursorPaging {
314
- /**
315
- * Maximum number of items to return in the results.
316
- * @max 100
317
- */
318
- limit?: number | null;
319
- /**
320
- * Pointer to the next or previous page in the list of results.
321
- *
322
- * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
323
- * Not relevant for the first request.
324
- * @maxLength 16000
325
- */
326
- cursor?: string | null;
327
- }
328
- export interface QueryPackagesResponse {
329
- /** Paging metadata. */
330
- metadata?: PagingMetadataV2;
331
- /**
332
- * Retrieved packages.
333
- *
334
- * Max: 1000 packages
335
- * @maxSize 1000
336
- */
337
- packages?: Package[];
338
- }
339
- export interface PagingMetadataV2 {
340
- /** Number of items returned in the response. */
341
- count?: number | null;
342
- /** Offset that was requested. */
343
- offset?: number | null;
344
- /** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */
345
- total?: number | null;
346
- /** Flag that indicates the server failed to calculate the `total` field. */
347
- tooManyToCount?: boolean | null;
348
- /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */
349
- cursors?: Cursors;
350
- }
351
- export interface Cursors {
352
- /**
353
- * Cursor string pointing to the next page in the list of results.
354
- * @maxLength 16000
355
- */
356
- next?: string | null;
357
- /**
358
- * Cursor pointing to the previous page in the list of results.
359
- * @maxLength 16000
360
- */
361
- prev?: string | null;
362
- }
363
- export interface AssignProductInstanceToSiteRequest {
364
- /**
365
- * Idempotency key.
366
- * @maxLength 100
367
- */
368
- idempotencyKey?: string | null;
369
- /**
370
- * ID of the product instance to assign to a site.
371
- * @format GUID
372
- */
373
- instanceId: string;
374
- /**
375
- * ID of the site to which the product instance is assigned.
376
- * @format GUID
377
- */
378
- siteId: string;
379
- }
380
- export interface AssignProductInstanceToSiteResponse {
381
- /**
382
- * Idempotency key.
383
- * @maxLength 100
384
- */
385
- idempotencyKey?: string | null;
386
- /** Updated package that includes the assigned product instance. */
387
- package?: Package;
388
- }
389
- export interface AssignedProductInstanceToSite {
390
- /** Updated package. */
391
- package?: Package;
392
- /**
393
- * ID of the product instance that was assigned to the site.
394
- * @readonly
395
- * @format GUID
396
- */
397
- productInstanceId?: string;
398
- /**
399
- * ID of the site the product instance was assigned to.
400
- * @readonly
401
- * @format GUID
402
- */
403
- siteId?: string;
404
- }
405
- export interface UnassignProductInstanceFromSiteRequest {
406
- /**
407
- * Idempotency key.
408
- * @maxLength 100
409
- */
410
- idempotencyKey?: string | null;
411
- /**
412
- * ID of the product instance to unassign from a site.
413
- * @format GUID
414
- */
415
- instanceId: string;
416
- }
417
- export interface UnassignProductInstanceFromSiteResponse {
418
- /**
419
- * Idempotency key.
420
- * @maxLength 100
421
- */
422
- idempotencyKey?: string | null;
423
- /** Updated package that includes the unassigned product instance. */
424
- package?: Package;
425
- }
426
- export interface UnassignedProductInstanceFromSite {
427
- /** Updated package. */
428
- package?: Package;
429
- /**
430
- * ID of the product instance that was unassigned from the site.
431
- * @readonly
432
- * @format GUID
433
- */
434
- productInstanceId?: string;
435
- /**
436
- * MetasiteId of the site the product instance was unassigned from.
437
- * @readonly
438
- * @format GUID
439
- */
440
- metaSiteId?: string;
441
- }
442
- export interface CancelProductInstanceRequest {
443
- /**
444
- * Idempotency key.
445
- * @maxLength 100
446
- */
447
- idempotencyKey?: string | null;
448
- /**
449
- * ID of the product instance to cancel.
450
- * @format GUID
451
- */
452
- instanceId: string;
453
- }
454
- export interface CancelProductInstanceResponse {
455
- /**
456
- * Idempotency key.
457
- * @maxLength 100
458
- */
459
- idempotencyKey?: string | null;
460
- /** Updated package that includes the previously included the canceled product instance. */
461
- package?: Package;
462
- }
463
- export interface ProductInstanceCanceled {
464
- /** Updated package. */
465
- package?: Package;
466
- /**
467
- * ID of the product instance that was canceled.
468
- * @readonly
469
- * @format GUID
470
- */
471
- productInstanceId?: string;
472
- }
473
- export interface AdjustProductInstanceSpecificationsRequest {
474
- /**
475
- * Idempotency key.
476
- * @maxLength 100
477
- */
478
- idempotencyKey?: string | null;
479
- /**
480
- * ID of the product instance to adjust.
481
- * @format GUID
482
- */
483
- instanceId: string;
484
- /**
485
- * ID of the product to replace the original instance. Required in case you don't
486
- * provide a new `billingInfo` object.
487
- * @format GUID
488
- */
489
- catalogProductId?: string | null;
490
- /**
491
- * Information about the billing cycle. Required in case you don't provide a new
492
- * `catalogProductId`. The new billing cycle must be supported for the service.
493
- * Contact the [Wix B2B sales team](mailto:bizdev@wix.com) for
494
- * information about a service's supported billing cycles. If
495
- * you adjust the billing cycle for a product instance with `RECURRING`
496
- * payments, you must also provide `billingInfo.cycleDuration.unit`.
497
- */
498
- billingInfo?: ProductInstanceCycle;
499
- /**
500
- * Discount code indicating that the reseller provisioned the product instance
501
- * during a sale. In case you pass a code that isn't valid, the call succeeds and
502
- * no discount is applied to the product instance. Wix doesn't guarantee that a
503
- * discount code reduces the price between Wix and the reseller, even when it's
504
- * valid. You can't add a discount code after you've created the
505
- * product instance. Contact the [Wix B2B sales team](mailto:bizdev@wix.com) for
506
- * more information about supported codes.
507
- *
508
- * Max: 25 characters
509
- * @maxLength 25
510
- */
511
- discountCode?: string | null;
512
- }
513
- export interface AdjustProductInstanceSpecificationsResponse {
514
- /**
515
- * Idempotency key.
516
- * @maxLength 100
517
- */
518
- idempotencyKey?: string | null;
519
- /** Updated package that includes the adjusted product instance. */
520
- package?: Package;
521
- }
522
- export interface AdjustedProductInstanceSpecifications {
523
- /** Updated package. */
524
- package?: Package;
525
- /**
526
- * ID of the product instance to adjust.
527
- * @readonly
528
- * @format GUID
529
- */
530
- productInstanceId?: string;
531
- }
532
- export interface SubscriptionEvent extends SubscriptionEventEventOneOf {
533
- /** Triggered when a subscription is created. */
534
- created?: SubscriptionCreated;
535
- /**
536
- * Triggered when a subscription is assigned to a Wix site, including the initial
537
- * assignment of a floating subscription or a re-assignement from a different site.
538
- */
539
- assigned?: SubscriptionAssigned;
540
- /** Triggered when a subscription is canceled. */
541
- cancelled?: SubscriptionCancelled;
542
- /** Triggered when the subscription's auto renew is turned on. */
543
- autoRenewTurnedOn?: SubscriptionAutoRenewTurnedOn;
544
- /** Triggered when the subscription's auto renew is turned off. */
545
- autoRenewTurnedOff?: SubscriptionAutoRenewTurnedOff;
546
- /**
547
- * Triggered when a subscription is unassigned from a Wix site and becomes
548
- * floating.
549
- */
550
- unassigned?: SubscriptionUnassigned;
551
- /**
552
- * Triggered when a subscription is transferred from one Wix account to another.
553
- * A transfer includes cancelling the original subscription and creating a new
554
- * subscription for the target account. The event returns both the original
555
- * and the new subscription.
556
- */
557
- transferred?: SubscriptionTransferred;
558
- /** Triggered when a recurring charge succeeds for a subscription. */
559
- recurringChargeSucceeded?: RecurringChargeSucceeded;
560
- /**
561
- * Triggered when a subscription was updated including when its product has been
562
- * up- or downgraded or the billing cycle is changed.
563
- */
564
- contractSwitched?: ContractSwitched;
565
- /**
566
- * Triggered when a subscription gets close to the end of its billing cycle.
567
- * The exact number of days is defined in the billing system.
568
- */
569
- nearEndOfPeriod?: SubscriptionNearEndOfPeriod;
570
- /**
571
- * Triggered when a subscription is updated and the change doesn't happen
572
- * immediately but at the end of the current billing cycle.
573
- */
574
- pendingChange?: SubscriptionPendingChange;
575
- /** Triggered when a recurring charge attempt fails for a subscription. */
576
- recurringChargeAttemptFailed?: RecurringChargeAttemptFailed;
577
- /**
578
- * ID of the subscription's event.
579
- * @format GUID
580
- */
581
- eventId?: string | null;
582
- /**
583
- * Date and time of the event in
584
- * [UTC datetime](https://en.wikipedia.org/wiki/Coordinated_Universal_Time)
585
- * `YYYY-MM-DDThh:mm:ss.sssZ` format.
586
- */
587
- eventDate?: Date | null;
588
- }
589
- /** @oneof */
590
- export interface SubscriptionEventEventOneOf {
591
- /** Triggered when a subscription is created. */
592
- created?: SubscriptionCreated;
593
- /**
594
- * Triggered when a subscription is assigned to a Wix site, including the initial
595
- * assignment of a floating subscription or a re-assignement from a different site.
596
- */
597
- assigned?: SubscriptionAssigned;
598
- /** Triggered when a subscription is canceled. */
599
- cancelled?: SubscriptionCancelled;
600
- /** Triggered when the subscription's auto renew is turned on. */
601
- autoRenewTurnedOn?: SubscriptionAutoRenewTurnedOn;
602
- /** Triggered when the subscription's auto renew is turned off. */
603
- autoRenewTurnedOff?: SubscriptionAutoRenewTurnedOff;
604
- /**
605
- * Triggered when a subscription is unassigned from a Wix site and becomes
606
- * floating.
607
- */
608
- unassigned?: SubscriptionUnassigned;
609
- /**
610
- * Triggered when a subscription is transferred from one Wix account to another.
611
- * A transfer includes cancelling the original subscription and creating a new
612
- * subscription for the target account. The event returns both the original
613
- * and the new subscription.
614
- */
615
- transferred?: SubscriptionTransferred;
616
- /** Triggered when a recurring charge succeeds for a subscription. */
617
- recurringChargeSucceeded?: RecurringChargeSucceeded;
618
- /**
619
- * Triggered when a subscription was updated including when its product has been
620
- * up- or downgraded or the billing cycle is changed.
621
- */
622
- contractSwitched?: ContractSwitched;
623
- /**
624
- * Triggered when a subscription gets close to the end of its billing cycle.
625
- * The exact number of days is defined in the billing system.
626
- */
627
- nearEndOfPeriod?: SubscriptionNearEndOfPeriod;
628
- /**
629
- * Triggered when a subscription is updated and the change doesn't happen
630
- * immediately but at the end of the current billing cycle.
631
- */
632
- pendingChange?: SubscriptionPendingChange;
633
- /** Triggered when a recurring charge attempt fails for a subscription. */
634
- recurringChargeAttemptFailed?: RecurringChargeAttemptFailed;
635
- }
636
- /** Triggered when a subscription is created. */
637
- export interface SubscriptionCreated {
638
- /** Created subscription. */
639
- subscription?: Subscription;
640
- /** Metadata for the `created` event. */
641
- metadata?: Record<string, string>;
642
- /**
643
- * Subscription reactivation data.
644
- * A subscription can be reactivated for example if it was incorrectly canceled because of fraud and then reactivated
645
- * by the billing system
646
- */
647
- reactivationData?: ReactivationData;
648
- }
649
- /**
650
- * A subscription holds information about a Premium product that a Wix account
651
- * owner has purchased including details about the billing.
652
- */
653
- export interface Subscription {
654
- /**
655
- * ID of the subscription.
656
- * @format GUID
657
- */
658
- _id?: string;
659
- /**
660
- * ID of the Wix account that purchased the subscription.
661
- * @format GUID
662
- */
663
- userId?: string;
664
- /**
665
- * ID of the [product](https://bo.wix.com/wix-docs/rest/premium/premium-product-catalog-v2/products/product-object)
666
- * for which the subscription was purchased.
667
- * @format GUID
668
- */
669
- productId?: string;
670
- /**
671
- * Date and time the subscription was created in
672
- * [UTC datetime](https://en.wikipedia.org/wiki/Coordinated_Universal_Time)
673
- * `YYYY-MM-DDThh:mm:ss.sssZ` format.
674
- */
675
- createdAt?: Date | null;
676
- /**
677
- * Date and time the subscription was last updated in
678
- * [UTC datetime](https://en.wikipedia.org/wiki/Coordinated_Universal_Time)
679
- * `YYYY-MM-DDThh:mm:ss.sssZ` format.
680
- */
681
- updatedAt?: Date | null;
682
- /**
683
- * ID of the metasite that the subscription is assigned to.
684
- * Available only when the subscription is assigned to a Wix site.
685
- * Subscriptions for account level products can't be assigned to a Wix site.
686
- * @format GUID
687
- */
688
- metaSiteId?: string | null;
689
- /** Information about the system that manages the subscription's billing. */
690
- billingReference?: BillingReference;
691
- /** Information about the billing cycle of the subscription. */
692
- cycle?: Cycle;
693
- /**
694
- * Subscription status.
695
- *
696
- * + `UNKNOWN`: Default status.
697
- * + `AUTO_RENEW_ON`: Subscription is active and automatically renews at the end of the current billing cycle.
698
- * + `AUTO_RENEW_OFF`: Subscription is active but expires at the end of the current billing cycle.
699
- * + `MANUAL_RECURRING`: Subscription is active and renews at the end of the current billing cycle, in case the customer takes an action related to the payment.
700
- * + `CANCELLED`: Subscription isn't active because it has been canceled.
701
- * + `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
- */
703
- status?: SubscriptionStatus;
704
- /**
705
- * Date and time the subscription was last transferred from one Wix account to
706
- * another in
707
- * [UTC datetime](https://en.wikipedia.org/wiki/Coordinated_Universal_Time)
708
- * `YYYY-MM-DDThh:mm:ss.sssZ` format.
709
- */
710
- transferredAt?: Date | null;
711
- /**
712
- * ID of the [product type](https://bo.wix.com/wix-docs/rest/premium/premium-product-catalog-v2/product-types/product-type-object)
713
- * that the product, for which the subscription was purchased, belongs to.
714
- * @format GUID
715
- */
716
- productTypeId?: string;
717
- /** Version number, which increments by 1 each time the subscription is updated. */
718
- version?: number;
719
- /**
720
- * Whether the subscription is active. Includes the statuses
721
- * `"AUTO_RENEW_ON"`, `"AUTO_RENEW_OFF"`, and `"MANUAL_RECURRING"`.
722
- */
723
- active?: boolean;
724
- /**
725
- * Date and time the subscription was originally created in
726
- * [UTC datetime](https://en.wikipedia.org/wiki/Coordinated_Universal_Time)
727
- * `YYYY-MM-DDThh:mm:ss.sssZ` format.
728
- * Differs from `createdAt` in case the subscription was originally created for a different Wix account and has been transferred.
729
- */
730
- originalCreationDate?: Date | null;
731
- /** Custom metadata about the subscription. */
732
- metadata?: Record<string, string>;
733
- /**
734
- * 2-letter country code in
735
- * [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements)
736
- * format.
737
- */
738
- countryCode?: string | null;
739
- }
740
- export interface BillingReference {
741
- /**
742
- * Name of the billing system that manages the subscription.
743
- *
744
- * + `"UNKNOWN"`: Default value.
745
- * + `"SBS"`: [Wix Billing](https://github.com/wix-p/premium-billing/tree/master/sbs).
746
- * + `"LICENSER"`:
747
- * + `"BASS"`: [Billing and Subscriptions System](https://dev.wix.com/docs/rest/internal-only/premium/subscriptions-by-billing-by-wix/introduction).
748
- * + `"RESELLER"`: [External Reseller](https://dev.wix.com/api/rest/account-level-apis/resellers/introduction).
749
- */
750
- providerName?: ProviderName;
751
- /** Current provider reference ID. */
752
- providerReferenceId?: string | null;
753
- /** Previous provider reference IDs. Used for when a subscription is extended, specifically for domains. */
754
- previousProviderReferenceIds?: string[];
755
- }
756
- export declare enum ProviderName {
757
- UNKNOWN = "UNKNOWN",
758
- SBS = "SBS",
759
- LICENSER = "LICENSER",
760
- BASS = "BASS",
761
- RESELLER = "RESELLER",
762
- RECURRING_INVOICES = "RECURRING_INVOICES"
763
- }
764
- export interface Cycle extends CycleCycleSelectorOneOf {
765
- /** repetitive interval */
766
- interval?: Interval;
767
- /** one time */
768
- oneTime?: OneTime;
769
- }
770
- /** @oneof */
771
- export interface CycleCycleSelectorOneOf {
772
- /** repetitive interval */
773
- interval?: Interval;
774
- /** one time */
775
- oneTime?: OneTime;
776
- }
777
- export interface Interval {
778
- /** interval unit of measure */
779
- unit?: IntervalUnit;
780
- /** number of interval */
781
- count?: number;
782
- }
783
- export declare enum IntervalUnit {
784
- /** unknown interval unit */
785
- UNKNOWN = "UNKNOWN",
786
- /** day */
787
- DAY = "DAY",
788
- /** week */
789
- WEEK = "WEEK",
790
- /** month */
791
- MONTH = "MONTH",
792
- /** year */
793
- YEAR = "YEAR"
794
- }
795
- export interface OneTime {
796
- }
797
- export declare enum SubscriptionStatus {
798
- UNKNOWN = "UNKNOWN",
799
- AUTO_RENEW_ON = "AUTO_RENEW_ON",
800
- AUTO_RENEW_OFF = "AUTO_RENEW_OFF",
801
- MANUAL_RECURRING = "MANUAL_RECURRING",
802
- CANCELLED = "CANCELLED",
803
- TRANSFERRED = "TRANSFERRED"
804
- }
805
- /** Triggered when a subscription is reactivated. */
806
- export interface ReactivationData {
807
- reactivationReason?: ReactivationReasonEnum;
808
- /**
809
- * In the event of reactivation after chargeback dispute, the subscription may be extended according to the
810
- * number of days it was inactive during the time of resolving the dispute
811
- */
812
- newEndOfPeriod?: Date | null;
813
- /** The original end date, before the inactive period. */
814
- oldEndOfPeriod?: Date | null;
815
- /** The difference in days between the new new_end_of_period and old_end_of_period */
816
- differenceInDays?: number | null;
817
- }
818
- /** Reason for subscription reactivation */
819
- export declare enum ReactivationReasonEnum {
820
- UNKNOWN = "UNKNOWN",
821
- /**
822
- * Subscription was reactivated due to billing status change from CANCELED to ACTIVE, for example if it was incorrectly
823
- * canceled because of suspicion of fraud
824
- */
825
- BILLING_STATUS_CHANGE = "BILLING_STATUS_CHANGE",
826
- /** Subscription was reactivated after a chargeback dispute */
827
- REACTIVATED_AFTER_CHARGEBACK = "REACTIVATED_AFTER_CHARGEBACK"
828
- }
829
- /**
830
- * Triggered when a subscription is assigned to a Wix site, including the initial
831
- * assignment of a floating subscription or a re-assignement from a different site.
832
- */
833
- export interface SubscriptionAssigned {
834
- /** Assigned subscription. */
835
- subscription?: Subscription;
836
- /**
837
- * ID of the metasite that the subscription has been assigned to before the update.
838
- * @format GUID
839
- */
840
- previousMetaSiteId?: string | null;
841
- }
842
- /** Triggered when a subscription is canceled. */
843
- export interface SubscriptionCancelled {
844
- /** Canceled subscription. */
845
- subscription?: Subscription;
846
- /** Details about the cancellation including who canceled the subscription and why. */
847
- cancellationDetails?: CancellationDetails;
848
- /**
849
- * Whether the subscription is canceled immediately or expires at the end of the current billing cycle.
850
- *
851
- * Default: `false`
852
- */
853
- immediateCancel?: boolean;
854
- /** Whether the subscription was canceled during the free trial period. */
855
- canceledInFreeTrial?: boolean;
856
- }
857
- /** Information about the cancellation flow including who canceled the subscription and why it was canceled. */
858
- export interface CancellationDetails {
859
- /**
860
- * Cancellation code.
861
- *
862
- * Values supported for cancellations on behalf of the billing system: `-1`, `-2`, `-3`, `-4`, `-5`, `-6`, `-7`, `-8`.
863
- * For cancellations on behalf of the site owner or the service provider `cancellationCode`
864
- * is taken from the request of
865
- * [Cancel Immediately Offline](https://bo.wix.com/wix-docs/rest/premium/premium-subscriptions-manager/cancel-immediately-offline).
866
- *
867
- * + `-1`: The subscription has been cancelled by the billing system but none of the listed cancellation reasons applies.
868
- * + `-2`: There were payment problems.
869
- * + `-3`: There was a chargeback.
870
- * + `-4`: Customer support has canceled the subscription and issued a refund.
871
- * + `-5`: The site owner has changed their existing subscription.
872
- * + `-6`: The subscription has been transferred to a different Wix account.
873
- * + `-7`: The subscription has been canceled because the site owner hasn't manually authenticated the recurring payment during the subscription's grace period. For example, site owners must manually confirm recurring payments within 40 days when paying with boleto.
874
- * + `-8`: The Wix account that the subscription belonged to has been deleted.
875
- */
876
- cancellationCode?: number | null;
877
- /**
878
- * Cancellation reason. For cancellations on behalf of the site owner or the service provider `cancellationReason`
879
- * is taken from the request of
880
- * [Cancel Immediately Offline](https://bo.wix.com/wix-docs/rest/premium/premium-subscriptions-manager/cancel-immediately-offline).
881
- * For cancellations on behalf of the billing system `cancellationReason` is `null` or an empty string.
882
- */
883
- cancellationReason?: string | null;
884
- /**
885
- * Initiator of the cancellation. For `"USER_REQUESTED"` and `"APP_MANAGED"`,
886
- * `cancellationCode` and `cancellationReason` are taken from the request of
887
- * [Cancel Immediately](https://dev.wix.com/docs/rest/account-level/premium/premium-subscriptions-manager/subscription-v1/cancel-immediately)
888
- * or [Cancel Immediately Offline](https://dev.wix.com/docs/rest/account-level/premium/premium-subscriptions-manager/subscription-v1/cancel-immediately-offline).
889
- * For `"PASSIVE"`, cancellations `cancellationCode` is automatically calculated and `cancellationReason`
890
- * is `null` or an empty string.
891
- *
892
- * + `"UNKNOWN`: Default value.
893
- * + `"USER_REQUESTED"`: The Wix account owner has canceled the subscription.
894
- * + `"APP_MANAGED"`: The service provider has canceled the subscription.
895
- * + `"PASSIVE"`: The billing system has canceled the subscription. For example, in case of payment failure or fraud.
896
- */
897
- initiator?: Initiator;
898
- }
899
- export declare enum Initiator {
900
- UNKNOWN = "UNKNOWN",
901
- USER_REQUESTED = "USER_REQUESTED",
902
- APP_MANAGED = "APP_MANAGED",
903
- PASSIVE = "PASSIVE"
904
- }
905
- /** Triggered when the subscription's auto renew is turned on. */
906
- export interface SubscriptionAutoRenewTurnedOn {
907
- /** Subscription for which auto renew is turned on. */
908
- subscription?: Subscription;
909
- /**
910
- * Supported values: `USER`, `APP`.
911
- *
912
- * Information about who turned auto renew on.
913
- * + `"USER"`: The site owner who purchased the subscription has turned auto renew on.
914
- * + `"APP"`: The service provider has turned auto renew on.
915
- */
916
- initiator?: string | null;
917
- }
918
- /** Triggered when the subscription's auto renew is turned off. */
919
- export interface SubscriptionAutoRenewTurnedOff {
920
- /** Subscription for which auto renew is turned off. */
921
- subscription?: Subscription;
922
- /** Details about the cancellation including who canceled the subscription and why. */
923
- cancellationDetails?: CancellationDetails;
924
- /**
925
- * Whether the subscription is immediately canceled or expires at the end of the current billing cycle.
926
- *
927
- * Default: `false`
928
- */
929
- immediateCancel?: boolean;
930
- }
931
- /**
932
- * Triggered when a subscription is unassigned from a Wix site and becomes
933
- * floating.
934
- */
935
- export interface SubscriptionUnassigned {
936
- /** Unassigned subscription. */
937
- subscription?: Subscription;
938
- /**
939
- * ID of the metasite that the subscription has been assigned to before the event.
940
- * @format GUID
941
- */
942
- previousMetaSiteId?: string;
943
- /**
944
- * Reason why the subscription is unassigned.
945
- *
946
- * + `"UNKNOWN"`: Default value.
947
- * + `"USER_REQUESTED"`: The Wix account owner has unassigned the subscription.
948
- * + `"REPLACED_BY_ANOTHER_SUBSCRIPTION"`: A different subscription that replaces this subscription is assigned to the site.
949
- */
950
- unassignReason?: UnassignReason;
951
- }
952
- export declare enum UnassignReason {
953
- UNKNOWN = "UNKNOWN",
954
- USER_REQUESTED = "USER_REQUESTED",
955
- REPLACED_BY_ANOTHER_SUBSCRIPTION = "REPLACED_BY_ANOTHER_SUBSCRIPTION"
956
- }
957
- /**
958
- * Triggered when a subscription is transferred from one Wix account to another.
959
- * A transfer includes cancelling the original subscription and creating a new
960
- * subscription for the target account. The event returns both the original
961
- * and the new subscription.
962
- */
963
- export interface SubscriptionTransferred {
964
- /** Original subscription that was canceled for the transfer. */
965
- originSubscription?: Subscription;
966
- /** Newly created subscription for the target account. */
967
- targetSubscription?: Subscription;
968
- }
969
- /** Triggered when a recurring charge succeeds for a subscription. */
970
- export interface RecurringChargeSucceeded {
971
- /** Subscription for which the recurring charge has succeeded. */
972
- subscription?: Subscription;
973
- /** Indication that there was a successful charge at the end of the free trial period */
974
- freeTrialPeriodEnd?: boolean;
975
- }
976
- /**
977
- * Triggered when a subscription was updated including when its product has been
978
- * up- or downgraded or the billing cycle is changed.
979
- */
980
- export interface ContractSwitched {
981
- /** Updated subscription. */
982
- subscription?: Subscription;
983
- /** Billing cycle before the update. */
984
- previousCycle?: Cycle;
985
- /**
986
- * ID of the product belonging to the subscription before the update.
987
- * @format GUID
988
- */
989
- previousProductId?: string;
990
- /**
991
- * ID of the product type that the subscription's original product belonged to before the update.
992
- * @format GUID
993
- */
994
- previousProductTypeId?: string;
995
- /**
996
- * Update type. __Note__: Doesn't include information about a product adjustment.
997
- * For that purpose, see `productAdjustment`.
998
- *
999
- * + `"NOT_APPLICABLE"`: Default value.
1000
- * + `"ADDITIONAL_QUANTITY"`: An increased usage quota is added to the subscription. For example, a second mailbox is added to a subscription that previously included a single mailbox.
1001
- * + `"CREDIT_UNUSED_PERIOD"`: The subscription is upgraded and the new price is less than the regular price. The new price applies to every billing cycle, not just the first cycle.
1002
- * + `"REFUND_PRICE_DIFF"`: Not implemented.
1003
- * + `"ADJUST_PERIOD_END"`: Not implemented.
1004
- * + `"DOWNGRADE_GRACE_PERIOD"`: For downgrades during the grace period. In this situation, the site owner hasn’t paid yet and must immediately pay for the downgraded subscription.
1005
- * + `"FULL_AMOUNT_PERIOD"`: For upgrades in which the site owner retains unused benefits. For example, site owners upgrading a Facebook Ads subscription retain their unused FB Ads credit. The unused credit is added to the new credit.
1006
- * + `"END_OF_PERIOD"`: The subscription's billing current cycle is extended because of a downgrade.
1007
- * + `"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
- * + `"DOWNGRADE_RENEWAL"`: The subscription is downgraded because of a declined payment. This prevents subscriptions from churning.
1009
- */
1010
- contractSwitchType?: ContractSwitchType;
1011
- /**
1012
- * ID of the metasite the subscription has been assigned to previously.
1013
- * Available only in case the subscription is assigned to a different site.
1014
- * @format GUID
1015
- */
1016
- previousMetaSiteId?: string | null;
1017
- /**
1018
- * Update reason.
1019
- *
1020
- * + `"PRICE_INCREASE"`: The subscription's price has been increased.
1021
- * + `"EXTERNAL_PROVIDER_TRIGGER"`: Any reason other than a price increase.
1022
- */
1023
- contractSwitchReason?: ContractSwitchReason;
1024
- /** Information about the price update. Available only for updates with a price increase. */
1025
- productPriceIncreaseData?: ProductPriceIncreaseData;
1026
- /**
1027
- * Information about a product adjustment. For example, a downgrade.
1028
- * __Note__: This isn't the same as `contractSwitchType`.
1029
- *
1030
- * + `NOT_APPLICABLE`: There is no information about whether the product has been up- or downgraded.
1031
- * + `DOWNGRADE`: The product has been downgraded.
1032
- */
1033
- productAdjustment?: ProductAdjustment;
1034
- }
1035
- /** Copied from SBS */
1036
- export declare enum ContractSwitchType {
1037
- NOT_APPLICABLE = "NOT_APPLICABLE",
1038
- ADDITIONAL_QUANTITY = "ADDITIONAL_QUANTITY",
1039
- CREDIT_UNUSED_PERIOD = "CREDIT_UNUSED_PERIOD",
1040
- REFUND_PRICE_DIFF = "REFUND_PRICE_DIFF",
1041
- ADJUST_PERIOD_END = "ADJUST_PERIOD_END",
1042
- DOWNGRADE_GRACE_PERIOD = "DOWNGRADE_GRACE_PERIOD",
1043
- FULL_AMOUNT_PERIOD = "FULL_AMOUNT_PERIOD",
1044
- END_OF_PERIOD = "END_OF_PERIOD",
1045
- PENDING_CHANGES = "PENDING_CHANGES",
1046
- DOWNGRADE_RENEWAL = "DOWNGRADE_RENEWAL"
1047
- }
1048
- export declare enum ContractSwitchReason {
1049
- EXTERNAL_PROVIDER_TRIGGER = "EXTERNAL_PROVIDER_TRIGGER",
1050
- PRICE_INCREASE = "PRICE_INCREASE"
1051
- }
1052
- /** Triggered when a subscription's price is increased. */
1053
- export interface ProductPriceIncreaseData {
1054
- /**
1055
- * Price of the subscription before the update.
1056
- * @format DECIMAL_VALUE
1057
- */
1058
- previousPrice?: string | null;
1059
- /** A value that is used in order to select the correct email template to send the user regarding the price increase. */
1060
- emailTemplateSelector?: string | null;
1061
- /** Used to differentiate between migration segments. Does not have to be unique per segment. */
1062
- segmentName?: string | null;
1063
- /** Used to determine how the price increase was triggered. */
1064
- priceIncreaseTrigger?: PriceIncreaseTrigger;
1065
- }
1066
- /** Reason for Price Increase Trigger */
1067
- export declare enum PriceIncreaseTrigger {
1068
- NEAR_RENEWAL = "NEAR_RENEWAL",
1069
- RECURRING_SUCCESS = "RECURRING_SUCCESS",
1070
- MANUAL = "MANUAL"
1071
- }
1072
- /** Triggered when a subscription's product is adusted. */
1073
- export declare enum ProductAdjustment {
1074
- /** flag to show that the ContractSwitchedEvent is not applicable / needed */
1075
- NOT_APPLICABLE = "NOT_APPLICABLE",
1076
- /** flag to show that the ContractSwitchedEvent is a Downgrade */
1077
- DOWNGRADE = "DOWNGRADE"
1078
- }
1079
- /**
1080
- * Triggered when a subscription gets close to the end of its billing cycle.
1081
- * The exact number of days is defined in the billing system.
1082
- */
1083
- export interface SubscriptionNearEndOfPeriod {
1084
- /** Subscription that got close to the end of its billing cycle. */
1085
- subscription?: Subscription;
1086
- /** Whether the subscription is within the free trial period. */
1087
- inFreeTrial?: boolean;
1088
- }
1089
- /**
1090
- * Triggered when a subscription is updated and the change doesn't happen
1091
- * immediately but at the end of the current billing cycle.
1092
- */
1093
- export interface SubscriptionPendingChange {
1094
- /** Subscription for which a pending update is triggered. */
1095
- subscription?: Subscription;
1096
- }
1097
- /** Triggered when a recurring charge attempt failed for a subscription. */
1098
- export interface RecurringChargeAttemptFailed {
1099
- /** Subscription for which the recurring charge attempt has failed. */
1100
- subscription?: Subscription;
1101
- }
1102
- export interface Empty {
1103
- }
1104
- export interface ProductInstanceUpdated {
1105
- /** Updated package. */
1106
- package?: Package;
1107
- /**
1108
- * ID of the product instance that was adjusted.
1109
- * @readonly
1110
- * @format GUID
1111
- */
1112
- productInstanceId?: string;
1113
- }
1114
- export interface FailureReportRequest {
1115
- /**
1116
- * ID of the product instance that failed.
1117
- * @format GUID
1118
- */
1119
- instanceId?: string;
1120
- /** Failure reason. */
1121
- reason?: FailureReason;
1122
- }
1123
- export interface ProductInstanceFailed {
1124
- /** Updated package. */
1125
- package?: Package;
1126
- /**
1127
- * ID of the product instance that `FAILED`.
1128
- * @readonly
1129
- * @format GUID
1130
- */
1131
- productInstanceId?: string;
1132
- /** Failure reason. */
1133
- reason?: FailureReason;
1134
- }
1135
- export interface Task {
1136
- key?: TaskKey;
1137
- executeAt?: Date | null;
1138
- payload?: string | null;
1139
- }
1140
- export interface TaskKey {
1141
- appId?: string;
1142
- instanceId?: string;
1143
- subjectId?: string | null;
1144
- }
1145
- export interface TaskAction extends TaskActionActionOneOf {
1146
- complete?: Complete;
1147
- cancel?: Cancel;
1148
- reschedule?: Reschedule;
1149
- }
1150
- /** @oneof */
1151
- export interface TaskActionActionOneOf {
1152
- complete?: Complete;
1153
- cancel?: Cancel;
1154
- reschedule?: Reschedule;
1155
- }
1156
- export interface Complete {
1157
- }
1158
- export interface Cancel {
1159
- }
1160
- export interface Reschedule {
1161
- executeAt?: Date | null;
1162
- payload?: string | null;
1163
- }
1164
- export interface UpdateProductInstanceRequest {
1165
- /**
1166
- * ID of the product instance to update.
1167
- * @format GUID
1168
- */
1169
- instanceId?: string;
1170
- status?: Status;
1171
- /** @format COUNTRY */
1172
- countryCode?: string | null;
1173
- /** Which field to update, currently only status and countryCode are supported. */
1174
- fieldToUpdate?: FieldToUpdate;
1175
- }
1176
- export declare enum FieldToUpdate {
1177
- STATUS = "STATUS",
1178
- COUNTRY_CODE = "COUNTRY_CODE"
1179
- }
1180
- export interface UpdateProductInstanceResponse {
1181
- /** Updated Product Instance */
1182
- productInstance?: ProductInstance;
1183
- }
1184
- export interface UpdatePackageExternalIdRequest {
1185
- /**
1186
- * ID of the package to update.
1187
- * @format GUID
1188
- */
1189
- packageId: string;
1190
- /**
1191
- * External ID that will be assigned to the package.
1192
- * @maxLength 100
1193
- */
1194
- externalId: string;
1195
- }
1196
- export interface UpdatePackageExternalIdResponse {
1197
- /** Updated package. */
1198
- updatedPackage?: Package;
1199
- }
1200
- export interface CountPackagesRequest {
1201
- /** Filter on what packages to count */
1202
- filter?: Record<string, any> | null;
1203
- }
1204
- export interface CountPackagesResponse {
1205
- /** Number of packages */
1206
- count?: number;
1207
- }
1208
- export interface DomainEvent extends DomainEventBodyOneOf {
1209
- createdEvent?: EntityCreatedEvent;
1210
- updatedEvent?: EntityUpdatedEvent;
1211
- deletedEvent?: EntityDeletedEvent;
1212
- actionEvent?: ActionEvent;
1213
- /**
1214
- * Unique event ID.
1215
- * Allows clients to ignore duplicate webhooks.
1216
- */
1217
- _id?: string;
1218
- /**
1219
- * Assumes actions are also always typed to an entity_type
1220
- * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
1221
- */
1222
- entityFqdn?: string;
1223
- /**
1224
- * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
1225
- * This is although the created/updated/deleted notion is duplication of the oneof types
1226
- * Example: created/updated/deleted/started/completed/email_opened
1227
- */
1228
- slug?: string;
1229
- /** ID of the entity associated with the event. */
1230
- entityId?: string;
1231
- /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
1232
- eventTime?: Date | null;
1233
- /**
1234
- * Whether the event was triggered as a result of a privacy regulation application
1235
- * (for example, GDPR).
1236
- */
1237
- triggeredByAnonymizeRequest?: boolean | null;
1238
- /** If present, indicates the action that triggered the event. */
1239
- originatedFrom?: string | null;
1240
- /**
1241
- * A sequence number defining the order of updates to the underlying entity.
1242
- * For example, given that some entity was updated at 16:00 and than again at 16:01,
1243
- * it is guaranteed that the sequence number of the second update is strictly higher than the first.
1244
- * As the consumer, you can use this value to ensure that you handle messages in the correct order.
1245
- * To do so, you will need to persist this number on your end, and compare the sequence number from the
1246
- * message against the one you have stored. Given that the stored number is higher, you should ignore the message.
1247
- */
1248
- entityEventSequence?: string | null;
1249
- }
1250
- /** @oneof */
1251
- export interface DomainEventBodyOneOf {
1252
- createdEvent?: EntityCreatedEvent;
1253
- updatedEvent?: EntityUpdatedEvent;
1254
- deletedEvent?: EntityDeletedEvent;
1255
- actionEvent?: ActionEvent;
1256
- }
1257
- export interface EntityCreatedEvent {
1258
- entity?: string;
1259
- }
1260
- export interface RestoreInfo {
1261
- deletedDate?: Date | null;
1262
- }
1263
- export interface EntityUpdatedEvent {
1264
- /**
1265
- * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
1266
- * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
1267
- * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
1268
- */
1269
- currentEntity?: string;
1270
- }
1271
- export interface EntityDeletedEvent {
1272
- /** Entity that was deleted */
1273
- deletedEntity?: string | null;
1274
- }
1275
- export interface ActionEvent {
1276
- body?: string;
1277
- }
1278
- export interface MessageEnvelope {
1279
- /**
1280
- * App instance ID.
1281
- * @format GUID
1282
- */
1283
- instanceId?: string | null;
1284
- /**
1285
- * Event type.
1286
- * @maxLength 150
1287
- */
1288
- eventType?: string;
1289
- /** The identification type and identity data. */
1290
- identity?: IdentificationData;
1291
- /** Stringify payload. */
1292
- data?: string;
1293
- }
1294
- export interface IdentificationData extends IdentificationDataIdOneOf {
1295
- /**
1296
- * ID of a site visitor that has not logged in to the site.
1297
- * @format GUID
1298
- */
1299
- anonymousVisitorId?: string;
1300
- /**
1301
- * ID of a site visitor that has logged in to the site.
1302
- * @format GUID
1303
- */
1304
- memberId?: string;
1305
- /**
1306
- * ID of a Wix user (site owner, contributor, etc.).
1307
- * @format GUID
1308
- */
1309
- wixUserId?: string;
1310
- /**
1311
- * ID of an app.
1312
- * @format GUID
1313
- */
1314
- appId?: string;
1315
- /** @readonly */
1316
- identityType?: WebhookIdentityType;
1317
- }
1318
- /** @oneof */
1319
- export interface IdentificationDataIdOneOf {
1320
- /**
1321
- * ID of a site visitor that has not logged in to the site.
1322
- * @format GUID
1323
- */
1324
- anonymousVisitorId?: string;
1325
- /**
1326
- * ID of a site visitor that has logged in to the site.
1327
- * @format GUID
1328
- */
1329
- memberId?: string;
1330
- /**
1331
- * ID of a Wix user (site owner, contributor, etc.).
1332
- * @format GUID
1333
- */
1334
- wixUserId?: string;
1335
- /**
1336
- * ID of an app.
1337
- * @format GUID
1338
- */
1339
- appId?: string;
1340
- }
1341
- export declare enum WebhookIdentityType {
1342
- UNKNOWN = "UNKNOWN",
1343
- ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
1344
- MEMBER = "MEMBER",
1345
- WIX_USER = "WIX_USER",
1346
- APP = "APP"
1347
- }
1348
- export interface MigrateSubscriptionToPackagesRequest {
1349
- /** Created package. */
1350
- productInstance?: ProductInstance;
1351
- /**
1352
- * Existing subscriptionId to migrate
1353
- * @format GUID
1354
- */
1355
- subscriptionId?: string | null;
1356
- /**
1357
- * User id of the migration - only for Immigrator
1358
- * @format GUID
1359
- */
1360
- userId?: string | null;
1361
- }
1362
- export interface MigrateSubscriptionToPackagesResponse {
1363
- package?: Package;
1364
- }
1365
- export interface FixBrokenMigrationRequest {
1366
- /**
1367
- * Subscription id of the broken subscription
1368
- * @format GUID
1369
- */
1370
- subscriptionId?: string;
1371
- /**
1372
- * SBS service id that points to the broken subscription
1373
- * @format GUID
1374
- */
1375
- sbsServiceId?: string;
1376
- /**
1377
- * Owner of the broken subscription
1378
- * @format GUID
1379
- */
1380
- userId?: string;
1381
- }
1382
- export interface FixBrokenMigrationResponse {
1383
- }
1384
- interface CycleIntervalNonNullableFields {
1385
- unit: IntervalIntervalUnit;
1386
- count: number;
1387
- }
1388
- interface ProductInstanceCycleNonNullableFields {
1389
- type: CycleDescriptorType;
1390
- cycleDuration?: CycleIntervalNonNullableFields;
1391
- }
1392
- interface FailureReasonNonNullableFields {
1393
- code: FailureReasonFailureReason;
1394
- message: string;
1395
- }
1396
- interface ProductInstanceNonNullableFields {
1397
- billingInfo?: ProductInstanceCycleNonNullableFields;
1398
- instanceId: string;
1399
- catalogProductId: string;
1400
- status: Status;
1401
- failure?: FailureReasonNonNullableFields;
1402
- }
1403
- export interface PackageNonNullableFields {
1404
- _id: string;
1405
- accountId: string;
1406
- productInstances: ProductInstanceNonNullableFields[];
1407
- }
1408
- export interface CreatePackageResponseNonNullableFields {
1409
- package?: PackageNonNullableFields;
1410
- }
1411
- export interface CancelPackageResponseNonNullableFields {
1412
- package?: PackageNonNullableFields;
1413
- }
1414
- export interface GetPackageResponseNonNullableFields {
1415
- package?: PackageNonNullableFields;
1416
- }
1417
- export interface QueryPackagesResponseNonNullableFields {
1418
- packages: PackageNonNullableFields[];
1419
- }
1420
- export interface AssignProductInstanceToSiteResponseNonNullableFields {
1421
- package?: PackageNonNullableFields;
1422
- }
1423
- export interface UnassignProductInstanceFromSiteResponseNonNullableFields {
1424
- package?: PackageNonNullableFields;
1425
- }
1426
- export interface CancelProductInstanceResponseNonNullableFields {
1427
- package?: PackageNonNullableFields;
1428
- }
1429
- export interface AdjustProductInstanceSpecificationsResponseNonNullableFields {
1430
- package?: PackageNonNullableFields;
1431
- }
1432
- export interface UpdatePackageExternalIdResponseNonNullableFields {
1433
- updatedPackage?: PackageNonNullableFields;
1434
- }
1435
- /**
1436
- * Creates a new package.
1437
- *
1438
- * Deprecated: This method is deprecated and will be removed by 2024-12-31.
1439
- * Use com.wixpress.premium.reseller.packages.v1.Packages.CreatePackageV2 instead.
1440
- *
1441
- * HTTP Request:
1442
- * POST /v1/packages
1443
- *
1444
- * Permissions:
1445
- * Requires the "premium.reseller-package.manage" permission with MANUAL type.
1446
- *
1447
- * Event:
1448
- * A PRIVATE callback will be triggered when the package is successfully created.
1449
- *
1450
- * Required Fields:
1451
- * - CreatePackageRequest.products
1452
- *
1453
- * Maturity: BETA
1454
- * Exposure: PUBLIC
1455
- * @public
1456
- * @documentationMaturity preview
1457
- * @requiredField options.products
1458
- * @permissionId premium.reseller-package.manage
1459
- * @fqn com.wixpress.premium.reseller.packages.v1.Packages.CreatePackage
1460
- * @deprecated
1461
- * @replacedBy com.wixpress.premium.reseller.packages.v1.Packages.CreatePackageV2
1462
- * @targetRemovalDate 2024-12-31
1463
- */
1464
- export declare function createPackage(options?: CreatePackageOptions): Promise<CreatePackageResponse & CreatePackageResponseNonNullableFields>;
1465
- export interface CreatePackageOptions {
1466
- /**
1467
- * Idempotency key.
1468
- * @maxLength 100
1469
- */
1470
- idempotencyKey?: string | null;
1471
- /**
1472
- * External reference. For example, an external subscription ID. **Note:** This field is not validated by Wix.
1473
- * @maxLength 100
1474
- */
1475
- externalId?: string | null;
1476
- /**
1477
- * Wix services that are resold.
1478
- * @maxSize 1000
1479
- * @minSize 1
1480
- */
1481
- products: ProductInstance[];
1482
- }
1483
- /**
1484
- * Creates a package of product instances.
1485
- *
1486
- *
1487
- * You must pass the relevant Wix account ID in the header of the call. In
1488
- * the DIY flow, we recommend to pass the customer's sub-account ID instead
1489
- * of your main reseller account ID.
1490
- *
1491
- * You may also pass a Wix site ID for each product in the body of the call.
1492
- * If you omit the site ID, a floating product instance is created.
1493
- *
1494
- * When Wix customers purchase a specific paid service or product, Wix may offer
1495
- * them time-limited free access to a different product. For example, customers
1496
- * get a voucher for a free 1-year domain registration when purchasing any Wix
1497
- * Premium plan. If you want to offer your customers the same benefit, create a
1498
- * package containing the original product first. Then, create a second package
1499
- * with the additional product. In the second Create Package call, pass the
1500
- * instance ID of the original product as `referenceProductInstanceId`. This way,
1501
- * Wix doesn't charge you for the additional product. Make sure that the status
1502
- * of the referenced product is either `"PENDING"` or `"ACTIVE"`. Note that you
1503
- * can use each product instance only a single time as reference instance.
1504
- *
1505
- * You need to pass a `countryCode` to specify where customers can claim
1506
- * vouchers that may come with a product. Contact the
1507
- * [Wix B2B sales team](mailto:bizdev@wix.com) to get information about
1508
- * vouchers and supported locations.
1509
- *
1510
- * > **Important**: This call requires an account level API key and cannot be
1511
- * > authenticated with the standard authorization header.
1512
- * @public
1513
- * @documentationMaturity preview
1514
- * @requiredField options.products
1515
- * @requiredField options.products.countryCode
1516
- * @permissionId premium.reseller-package.manage
1517
- * @fqn com.wixpress.premium.reseller.packages.v1.Packages.CreatePackageV2
1518
- */
1519
- export declare function createPackageV2(options?: CreatePackageV2Options): Promise<CreatePackageResponse & CreatePackageResponseNonNullableFields>;
1520
- export interface CreatePackageV2Options {
1521
- /**
1522
- * Idempotency key.
1523
- * @maxLength 100
1524
- */
1525
- idempotencyKey?: string | null;
1526
- /**
1527
- * External reference. For example, an external subscription ID. **Note:** This field is not validated by Wix.
1528
- * @maxLength 100
1529
- */
1530
- externalId?: string | null;
1531
- /**
1532
- * Wix services that are resold.
1533
- * @maxSize 1000
1534
- * @minSize 1
1535
- */
1536
- products: ProductInstance[];
1537
- }
1538
- /**
1539
- * Cancels all product instances included in the package and the customer
1540
- * immediately loses access to the canceled functionality.
1541
- *
1542
- *
1543
- * You must pass the ID of the Wix account that the package belongs to in the
1544
- * header of the call. The call fails, if the package and Wix account don't
1545
- * match.
1546
- *
1547
- * If a canceled product instance is a requirement for another Wix service, that
1548
- * functionality is also no longer available to the customer. For example, if
1549
- * you cancel a Premium plan, a previously connected domain is automatically
1550
- * disconnected from the site.
1551
- *
1552
- * > **Important**: This call requires an account level API key and cannot be
1553
- * > authenticated with the standard authorization header.
1554
- * @param _id - ID of the package to cancel.
1555
- * @public
1556
- * @documentationMaturity preview
1557
- * @requiredField _id
1558
- * @permissionId premium.reseller-package.manage
1559
- * @fqn com.wixpress.premium.reseller.packages.v1.Packages.CancelPackage
1560
- */
1561
- export declare function cancelPackage(_id: string, options?: CancelPackageOptions): Promise<CancelPackageResponse & CancelPackageResponseNonNullableFields>;
1562
- export interface CancelPackageOptions {
1563
- /**
1564
- * Idempotency key.
1565
- * @maxLength 100
1566
- */
1567
- idempotencyKey?: string | null;
1568
- }
1569
- /**
1570
- * Retrieves a package.
1571
- *
1572
- *
1573
- * You must pass the ID of the Wix account that the package belongs to in the
1574
- * header of the call. The call fails, if the package and Wix account don't
1575
- * match.
1576
- *
1577
- * > **Important**: This call requires an account level API key and cannot be
1578
- * > authenticated with the standard authorization header.
1579
- * @param _id - Package ID.
1580
- * @public
1581
- * @documentationMaturity preview
1582
- * @requiredField _id
1583
- * @permissionId premium.reseller-package.read
1584
- * @returns Retrieved package.
1585
- * @fqn com.wixpress.premium.reseller.packages.v1.Packages.GetPackage
1586
- */
1587
- export declare function getPackage(_id: string): Promise<Package & PackageNonNullableFields>;
1588
- /**
1589
- * Retrieves a list of packages, given the provided paging, filtering, and sorting.
1590
- *
1591
- *
1592
- * You must pass the ID of the Wix account that the packages belong to in the
1593
- * header of the call. The call returns packages that belong to the parent
1594
- * account, regardless if you pass the ID of a parent or sub-account. In case
1595
- * you want to retrieve only packages that belong to a sub-account, you must
1596
- * pass the sub-account ID as `filter` in the `query` object like this:
1597
- *
1598
- * ```json
1599
- * {
1600
- * "query": {
1601
- * "filter": {
1602
- * "accountId": {
1603
- * "$eq": "<SUB_ACCOUNT_ID>"
1604
- * }
1605
- * }
1606
- * }
1607
- * }
1608
- * ```
1609
- *
1610
- * Query Packages runs with these defaults, which you can override:
1611
- *
1612
- * - `createdDate` is sorted in `DESC` order
1613
- * - `cursorPaging.limit` is `100`
1614
- *
1615
- * By default `pagingMetadata.cursors` are returned, unless you specifically pass
1616
- * `query.paging`.
1617
- *
1618
- * The maximum for `cursorPaging.limit` is `100`.
1619
- *
1620
- * If you pass a cursor token that you have received in a previous Query Package response,
1621
- * passing additional sort or filter information results in an invalid cursor
1622
- * error. Since the received cursor token already holds all the needed information
1623
- * for sort and filter. Changing the sort and filter properties during the span of
1624
- * a cursor query isn't supported. But you can provide a different limit.
1625
- *
1626
- * For field support for filters and sorting,
1627
- * see [Query Packages: Supported Filters and Sorting](https://dev.wix.com/api/rest/account-level-apis/resellers/supported-filters).
1628
- *
1629
- * To learn about working with _Query_ endpoints, see
1630
- * [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language),
1631
- * [Sorting and Paging](https://dev.wix.com/api/rest/getting-started/pagination),
1632
- * and [Field Projection](https://dev.wix.com/api/rest/getting-started/field-projection).
1633
- *
1634
- * > **Important**: This call requires an account level API key and cannot be
1635
- * > authenticated with the standard authorization header.
1636
- * @public
1637
- * @documentationMaturity preview
1638
- * @permissionId premium.reseller-package.read
1639
- * @fqn com.wixpress.premium.reseller.packages.v1.Packages.QueryPackages
1640
- */
1641
- export declare function queryPackages(): PackagesQueryBuilder;
1642
- interface QueryCursorResult {
1643
- cursors: Cursors;
1644
- hasNext: () => boolean;
1645
- hasPrev: () => boolean;
1646
- length: number;
1647
- pageSize: number;
1648
- }
1649
- export interface PackagesQueryResult extends QueryCursorResult {
1650
- items: Package[];
1651
- query: PackagesQueryBuilder;
1652
- next: () => Promise<PackagesQueryResult>;
1653
- prev: () => Promise<PackagesQueryResult>;
1654
- }
1655
- export interface PackagesQueryBuilder {
1656
- /** @param limit - Number of items to return, which is also the `pageSize` of the results object.
1657
- * @documentationMaturity preview
1658
- */
1659
- limit: (limit: number) => PackagesQueryBuilder;
1660
- /** @param cursor - A pointer to specific record
1661
- * @documentationMaturity preview
1662
- */
1663
- skipTo: (cursor: string) => PackagesQueryBuilder;
1664
- /** @documentationMaturity preview */
1665
- find: () => Promise<PackagesQueryResult>;
1666
- }
1667
- /**
1668
- * Assigns a product instance to a site.
1669
- *
1670
- * You must pass the ID of the Wix account that the product instance belongs to in the header of the call.
1671
- *
1672
- * The customer immediately gains access to features included in the assigned service. It's up to the reseller to decide whether assigning a product instance affects the customer’s payment.
1673
- *
1674
- * It's possible to assign a product instance that's already assigned to a site, to a different site without [unassigning](/packages/unassign-product-instance-from-site) it first. But if the call fails in such a situation, the product instance may either remain assigned to the original site or become unassigned. You can confirm the instance's status by [retrieving the relevant package](/packages/get-package).
1675
- *
1676
- * > **Important:** This call requires an account level API key and cannot be authenticated with the standard authorization header.
1677
- * @public
1678
- * @documentationMaturity preview
1679
- * @requiredField identifiers
1680
- * @requiredField identifiers.instanceId
1681
- * @requiredField identifiers.siteId
1682
- * @permissionId premium.reseller-package.manage
1683
- * @fqn com.wixpress.premium.reseller.packages.v1.Packages.AssignProductInstanceToSite
1684
- */
1685
- export declare function assignProductInstanceToSite(identifiers: AssignProductInstanceToSiteIdentifiers, options?: AssignProductInstanceToSiteOptions): Promise<AssignProductInstanceToSiteResponse & AssignProductInstanceToSiteResponseNonNullableFields>;
1686
- export interface AssignProductInstanceToSiteIdentifiers {
1687
- /**
1688
- * ID of the product instance to assign to a site.
1689
- * @format GUID
1690
- */
1691
- instanceId: string;
1692
- /**
1693
- * ID of the site to which the product instance is assigned.
1694
- * @format GUID
1695
- */
1696
- siteId: string;
1697
- }
1698
- export interface AssignProductInstanceToSiteOptions {
1699
- /**
1700
- * Idempotency key.
1701
- * @maxLength 100
1702
- */
1703
- idempotencyKey?: string | null;
1704
- }
1705
- /**
1706
- * Unassigns a product instance from a site.
1707
- *
1708
- * You must pass the ID of the Wix account that the product instance belongs to in the header of the call.
1709
- *
1710
- * The product instance becomes floating and the customer immediately looses access to features included in the unassigned service. It's up to the reseller to decide whether unassigning a product instance affects the customer’s payment.
1711
- *
1712
- * If an unassigned product instance is a requirement for another service, that service may not be available to the customer any longer. For example, if you unassign a `Combo Plan` plan from a site, a previously connected domain is disconnected.
1713
- *
1714
- * You can assign floating product instances to sites using the [Assign Product Instance to Site](/packages/assign-product-instance-to-site) method.
1715
- *
1716
- * > **Important:** This call requires an account level API key and cannot be authenticated with the standard authorization header.
1717
- * @param instanceId - ID of the product instance to unassign from a site.
1718
- * @public
1719
- * @documentationMaturity preview
1720
- * @requiredField instanceId
1721
- * @permissionId premium.reseller-package.manage
1722
- * @fqn com.wixpress.premium.reseller.packages.v1.Packages.UnassignProductInstanceFromSite
1723
- */
1724
- export declare function unassignProductInstanceFromSite(instanceId: string, options?: UnassignProductInstanceFromSiteOptions): Promise<UnassignProductInstanceFromSiteResponse & UnassignProductInstanceFromSiteResponseNonNullableFields>;
1725
- export interface UnassignProductInstanceFromSiteOptions {
1726
- /**
1727
- * Idempotency key.
1728
- * @maxLength 100
1729
- */
1730
- idempotencyKey?: string | null;
1731
- }
1732
- /**
1733
- * Cancels a product instance.
1734
- *
1735
- *
1736
- * You must pass the ID of the Wix account that the product instance belongs
1737
- * to in the header of the call. The call fails, if the product instance and
1738
- * Wix account don't match.
1739
- *
1740
- * The customer immediately loses access to features included in the
1741
- * canceled service. It's up to the reseller to decide whether the adjustment
1742
- * affects the customer’s payment.
1743
- *
1744
- * If a canceled service is a requirement for another service, that service
1745
- * may not be available to the customer any longer. For example, if you cancel
1746
- * a `Combo Plan` plan, a previously connected domain is disconnected
1747
- * from the site.
1748
- *
1749
- *
1750
- * > **Important**: This call requires an account level API key and cannot be
1751
- * > authenticated with the standard authorization header.
1752
- * @param instanceId - ID of the product instance to cancel.
1753
- * @public
1754
- * @documentationMaturity preview
1755
- * @requiredField instanceId
1756
- * @permissionId premium.reseller-package.manage
1757
- * @fqn com.wixpress.premium.reseller.packages.v1.Packages.CancelProductInstance
1758
- */
1759
- export declare function cancelProductInstance(instanceId: string, options?: CancelProductInstanceOptions): Promise<CancelProductInstanceResponse & CancelProductInstanceResponseNonNullableFields>;
1760
- export interface CancelProductInstanceOptions {
1761
- /**
1762
- * Idempotency key.
1763
- * @maxLength 100
1764
- */
1765
- idempotencyKey?: string | null;
1766
- }
1767
- /**
1768
- * Upgrades or downgrades a product instance. For example, you can upgrade a
1769
- * customer's `Business Unlimited Premium` plan to `Business VIP` using this
1770
- * endpoint.
1771
- *
1772
- *
1773
- * You must pass the ID of the Wix account that the product instance belongs
1774
- * to in the header of the call. The call fails, if the product instance and
1775
- * Wix account don't match.
1776
- *
1777
- * The customer has immediate access to new features, while losing access to
1778
- * features not included in the new service. It's up to the reseller to
1779
- * decide whether the adjustment affects the customer’s payment.
1780
- *
1781
- * You can only exchange a product instance with a service of the same type.
1782
- * Contact the [Wix B2B sales team](mailto:bizdev@wix.com) for details about
1783
- * which services belong to the same type.
1784
- *
1785
- * You must provide either a new `catalogProductId` or a new `billingInfo`
1786
- * object. The new billing cycle must be supported for the product. Contact the
1787
- * [Wix B2B sales team](mailto:bizdev@wix.com) for information
1788
- * about which billing cycles are supported for each product. If you adjust the
1789
- * billing cycle for a product instance with `RECURRING` payments, you must
1790
- * also provide `billingInfo.cycleDuration.unit`.
1791
- *
1792
- * If a removed feature is a requirement for another service, that service
1793
- * may not be available to the customer any longer. For example, if you downgrade a
1794
- * `Business Unlimited` plan to `Business Basic`, the site owners won’t be
1795
- * able to use `Pro eCommerce Features` any longer.
1796
- *
1797
- * > **Important**: This call requires an account level API key and cannot be
1798
- * > authenticated with the standard authorization header.
1799
- * @param instanceId - ID of the product instance to adjust.
1800
- * @public
1801
- * @documentationMaturity preview
1802
- * @requiredField instanceId
1803
- * @permissionId premium.reseller-package.manage
1804
- * @fqn com.wixpress.premium.reseller.packages.v1.Packages.AdjustProductInstanceSpecifications
1805
- */
1806
- export declare function adjustProductInstanceSpecifications(instanceId: string, options?: AdjustProductInstanceSpecificationsOptions): Promise<AdjustProductInstanceSpecificationsResponse & AdjustProductInstanceSpecificationsResponseNonNullableFields>;
1807
- export interface AdjustProductInstanceSpecificationsOptions {
1808
- /**
1809
- * Idempotency key.
1810
- * @maxLength 100
1811
- */
1812
- idempotencyKey?: string | null;
1813
- /**
1814
- * ID of the product to replace the original instance. Required in case you don't
1815
- * provide a new `billingInfo` object.
1816
- * @format GUID
1817
- */
1818
- catalogProductId?: string | null;
1819
- /**
1820
- * Information about the billing cycle. Required in case you don't provide a new
1821
- * `catalogProductId`. The new billing cycle must be supported for the service.
1822
- * Contact the [Wix B2B sales team](mailto:bizdev@wix.com) for
1823
- * information about a service's supported billing cycles. If
1824
- * you adjust the billing cycle for a product instance with `RECURRING`
1825
- * payments, you must also provide `billingInfo.cycleDuration.unit`.
1826
- */
1827
- billingInfo?: ProductInstanceCycle;
1828
- /**
1829
- * Discount code indicating that the reseller provisioned the product instance
1830
- * during a sale. In case you pass a code that isn't valid, the call succeeds and
1831
- * no discount is applied to the product instance. Wix doesn't guarantee that a
1832
- * discount code reduces the price between Wix and the reseller, even when it's
1833
- * valid. You can't add a discount code after you've created the
1834
- * product instance. Contact the [Wix B2B sales team](mailto:bizdev@wix.com) for
1835
- * more information about supported codes.
1836
- *
1837
- * Max: 25 characters
1838
- * @maxLength 25
1839
- */
1840
- discountCode?: string | null;
1841
- }
1842
- /**
1843
- * Updates a package's external ID field.
1844
- * @public
1845
- * @documentationMaturity preview
1846
- * @requiredField identifiers
1847
- * @requiredField identifiers.externalId
1848
- * @requiredField identifiers.packageId
1849
- * @permissionId PREMIUM.PACKAGE_UPDATE_EXTERNAL_ID
1850
- * @fqn com.wixpress.premium.reseller.packages.v1.Packages.UpdatePackageExternalId
1851
- */
1852
- export declare function updatePackageExternalId(identifiers: UpdatePackageExternalIdIdentifiers): Promise<UpdatePackageExternalIdResponse & UpdatePackageExternalIdResponseNonNullableFields>;
1853
- export interface UpdatePackageExternalIdIdentifiers {
1854
- /**
1855
- * ID of the package to update.
1856
- * @format GUID
1857
- */
1858
- packageId: string;
1859
- /**
1860
- * External ID that will be assigned to the package.
1861
- * @maxLength 100
1862
- */
1863
- externalId: string;
1864
- }
1865
- export {};