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