@wix/auto_sdk_packages_packages 1.0.3 → 1.0.5

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 (123) 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/index.typings.d.ts +1867 -1
  5. package/build/cjs/index.typings.js +864 -15
  6. package/build/cjs/index.typings.js.map +1 -1
  7. package/build/cjs/meta.d.ts +543 -1
  8. package/build/cjs/meta.js +574 -15
  9. package/build/cjs/meta.js.map +1 -1
  10. package/build/{internal/cjs/src/premium-reseller-v1-packages-packages.public.d.ts → es/index.d.mts} +27 -16
  11. package/build/es/index.mjs +906 -0
  12. package/build/es/index.mjs.map +1 -0
  13. package/build/{internal/cjs/src/premium-reseller-v1-packages-packages.universal.d.ts → es/index.typings.d.mts} +192 -149
  14. package/build/es/index.typings.mjs +817 -0
  15. package/build/es/index.typings.mjs.map +1 -0
  16. package/build/es/meta.d.mts +543 -0
  17. package/build/es/meta.mjs +541 -0
  18. package/build/es/meta.mjs.map +1 -0
  19. package/build/internal/cjs/index.d.ts +273 -1
  20. package/build/internal/cjs/index.js +953 -15
  21. package/build/internal/cjs/index.js.map +1 -1
  22. package/build/internal/cjs/index.typings.d.ts +1867 -1
  23. package/build/internal/cjs/index.typings.js +864 -15
  24. package/build/internal/cjs/index.typings.js.map +1 -1
  25. package/build/internal/cjs/meta.d.ts +543 -1
  26. package/build/internal/cjs/meta.js +574 -15
  27. package/build/internal/cjs/meta.js.map +1 -1
  28. package/build/{cjs/src/premium-reseller-v1-packages-packages.public.d.ts → internal/es/index.d.mts} +27 -16
  29. package/build/internal/es/index.mjs +906 -0
  30. package/build/internal/es/index.mjs.map +1 -0
  31. package/build/{cjs/src/premium-reseller-v1-packages-packages.universal.d.ts → internal/es/index.typings.d.mts} +192 -149
  32. package/build/internal/es/index.typings.mjs +817 -0
  33. package/build/internal/es/index.typings.mjs.map +1 -0
  34. package/build/internal/es/meta.d.mts +543 -0
  35. package/build/internal/es/meta.mjs +541 -0
  36. package/build/internal/es/meta.mjs.map +1 -0
  37. package/package.json +11 -10
  38. package/build/cjs/src/premium-reseller-v1-packages-packages.context.d.ts +0 -14
  39. package/build/cjs/src/premium-reseller-v1-packages-packages.context.js +0 -34
  40. package/build/cjs/src/premium-reseller-v1-packages-packages.context.js.map +0 -1
  41. package/build/cjs/src/premium-reseller-v1-packages-packages.http.d.ts +0 -219
  42. package/build/cjs/src/premium-reseller-v1-packages-packages.http.js +0 -563
  43. package/build/cjs/src/premium-reseller-v1-packages-packages.http.js.map +0 -1
  44. package/build/cjs/src/premium-reseller-v1-packages-packages.meta.d.ts +0 -38
  45. package/build/cjs/src/premium-reseller-v1-packages-packages.meta.js +0 -218
  46. package/build/cjs/src/premium-reseller-v1-packages-packages.meta.js.map +0 -1
  47. package/build/cjs/src/premium-reseller-v1-packages-packages.public.js +0 -84
  48. package/build/cjs/src/premium-reseller-v1-packages-packages.public.js.map +0 -1
  49. package/build/cjs/src/premium-reseller-v1-packages-packages.types.d.ts +0 -1377
  50. package/build/cjs/src/premium-reseller-v1-packages-packages.types.js +0 -155
  51. package/build/cjs/src/premium-reseller-v1-packages-packages.types.js.map +0 -1
  52. package/build/cjs/src/premium-reseller-v1-packages-packages.universal.js +0 -756
  53. package/build/cjs/src/premium-reseller-v1-packages-packages.universal.js.map +0 -1
  54. package/build/es/index.d.ts +0 -1
  55. package/build/es/index.js +0 -2
  56. package/build/es/index.js.map +0 -1
  57. package/build/es/index.typings.d.ts +0 -1
  58. package/build/es/index.typings.js +0 -2
  59. package/build/es/index.typings.js.map +0 -1
  60. package/build/es/meta.d.ts +0 -1
  61. package/build/es/meta.js +0 -2
  62. package/build/es/meta.js.map +0 -1
  63. package/build/es/src/premium-reseller-v1-packages-packages.context.d.ts +0 -14
  64. package/build/es/src/premium-reseller-v1-packages-packages.context.js +0 -14
  65. package/build/es/src/premium-reseller-v1-packages-packages.context.js.map +0 -1
  66. package/build/es/src/premium-reseller-v1-packages-packages.http.d.ts +0 -219
  67. package/build/es/src/premium-reseller-v1-packages-packages.http.js +0 -550
  68. package/build/es/src/premium-reseller-v1-packages-packages.http.js.map +0 -1
  69. package/build/es/src/premium-reseller-v1-packages-packages.meta.d.ts +0 -38
  70. package/build/es/src/premium-reseller-v1-packages-packages.meta.js +0 -182
  71. package/build/es/src/premium-reseller-v1-packages-packages.meta.js.map +0 -1
  72. package/build/es/src/premium-reseller-v1-packages-packages.public.d.ts +0 -262
  73. package/build/es/src/premium-reseller-v1-packages-packages.public.js +0 -54
  74. package/build/es/src/premium-reseller-v1-packages-packages.public.js.map +0 -1
  75. package/build/es/src/premium-reseller-v1-packages-packages.types.d.ts +0 -1377
  76. package/build/es/src/premium-reseller-v1-packages-packages.types.js +0 -152
  77. package/build/es/src/premium-reseller-v1-packages-packages.types.js.map +0 -1
  78. package/build/es/src/premium-reseller-v1-packages-packages.universal.d.ts +0 -1824
  79. package/build/es/src/premium-reseller-v1-packages-packages.universal.js +0 -720
  80. package/build/es/src/premium-reseller-v1-packages-packages.universal.js.map +0 -1
  81. package/build/internal/cjs/src/premium-reseller-v1-packages-packages.context.d.ts +0 -14
  82. package/build/internal/cjs/src/premium-reseller-v1-packages-packages.context.js +0 -34
  83. package/build/internal/cjs/src/premium-reseller-v1-packages-packages.context.js.map +0 -1
  84. package/build/internal/cjs/src/premium-reseller-v1-packages-packages.http.d.ts +0 -219
  85. package/build/internal/cjs/src/premium-reseller-v1-packages-packages.http.js +0 -563
  86. package/build/internal/cjs/src/premium-reseller-v1-packages-packages.http.js.map +0 -1
  87. package/build/internal/cjs/src/premium-reseller-v1-packages-packages.meta.d.ts +0 -38
  88. package/build/internal/cjs/src/premium-reseller-v1-packages-packages.meta.js +0 -218
  89. package/build/internal/cjs/src/premium-reseller-v1-packages-packages.meta.js.map +0 -1
  90. package/build/internal/cjs/src/premium-reseller-v1-packages-packages.public.js +0 -84
  91. package/build/internal/cjs/src/premium-reseller-v1-packages-packages.public.js.map +0 -1
  92. package/build/internal/cjs/src/premium-reseller-v1-packages-packages.types.d.ts +0 -1377
  93. package/build/internal/cjs/src/premium-reseller-v1-packages-packages.types.js +0 -155
  94. package/build/internal/cjs/src/premium-reseller-v1-packages-packages.types.js.map +0 -1
  95. package/build/internal/cjs/src/premium-reseller-v1-packages-packages.universal.js +0 -756
  96. package/build/internal/cjs/src/premium-reseller-v1-packages-packages.universal.js.map +0 -1
  97. package/build/internal/es/index.d.ts +0 -1
  98. package/build/internal/es/index.js +0 -2
  99. package/build/internal/es/index.js.map +0 -1
  100. package/build/internal/es/index.typings.d.ts +0 -1
  101. package/build/internal/es/index.typings.js +0 -2
  102. package/build/internal/es/index.typings.js.map +0 -1
  103. package/build/internal/es/meta.d.ts +0 -1
  104. package/build/internal/es/meta.js +0 -2
  105. package/build/internal/es/meta.js.map +0 -1
  106. package/build/internal/es/src/premium-reseller-v1-packages-packages.context.d.ts +0 -14
  107. package/build/internal/es/src/premium-reseller-v1-packages-packages.context.js +0 -14
  108. package/build/internal/es/src/premium-reseller-v1-packages-packages.context.js.map +0 -1
  109. package/build/internal/es/src/premium-reseller-v1-packages-packages.http.d.ts +0 -219
  110. package/build/internal/es/src/premium-reseller-v1-packages-packages.http.js +0 -550
  111. package/build/internal/es/src/premium-reseller-v1-packages-packages.http.js.map +0 -1
  112. package/build/internal/es/src/premium-reseller-v1-packages-packages.meta.d.ts +0 -38
  113. package/build/internal/es/src/premium-reseller-v1-packages-packages.meta.js +0 -182
  114. package/build/internal/es/src/premium-reseller-v1-packages-packages.meta.js.map +0 -1
  115. package/build/internal/es/src/premium-reseller-v1-packages-packages.public.d.ts +0 -262
  116. package/build/internal/es/src/premium-reseller-v1-packages-packages.public.js +0 -54
  117. package/build/internal/es/src/premium-reseller-v1-packages-packages.public.js.map +0 -1
  118. package/build/internal/es/src/premium-reseller-v1-packages-packages.types.d.ts +0 -1377
  119. package/build/internal/es/src/premium-reseller-v1-packages-packages.types.js +0 -152
  120. package/build/internal/es/src/premium-reseller-v1-packages-packages.types.js.map +0 -1
  121. package/build/internal/es/src/premium-reseller-v1-packages-packages.universal.d.ts +0 -1824
  122. package/build/internal/es/src/premium-reseller-v1-packages-packages.universal.js +0 -720
  123. package/build/internal/es/src/premium-reseller-v1-packages-packages.universal.js.map +0 -1
@@ -1,1377 +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
- /** Event ID. With this ID you can easily spot duplicated events and ignore them. */
1214
- id?: string;
1215
- /**
1216
- * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.
1217
- * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
1218
- */
1219
- entityFqdn?: string;
1220
- /**
1221
- * Event action name, placed at the top level to make it easier for users to dispatch messages.
1222
- * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
1223
- */
1224
- slug?: string;
1225
- /** ID of the entity associated with the event. */
1226
- entityId?: string;
1227
- /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */
1228
- eventTime?: Date | null;
1229
- /**
1230
- * Whether the event was triggered as a result of a privacy regulation application
1231
- * (for example, GDPR).
1232
- */
1233
- triggeredByAnonymizeRequest?: boolean | null;
1234
- /** If present, indicates the action that triggered the event. */
1235
- originatedFrom?: string | null;
1236
- /**
1237
- * 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.
1238
- * 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.
1239
- */
1240
- entityEventSequence?: string | null;
1241
- }
1242
- /** @oneof */
1243
- export interface DomainEventBodyOneOf {
1244
- createdEvent?: EntityCreatedEvent;
1245
- updatedEvent?: EntityUpdatedEvent;
1246
- deletedEvent?: EntityDeletedEvent;
1247
- actionEvent?: ActionEvent;
1248
- }
1249
- export interface EntityCreatedEvent {
1250
- entityAsJson?: string;
1251
- /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */
1252
- restoreInfo?: RestoreInfo;
1253
- }
1254
- export interface RestoreInfo {
1255
- deletedDate?: Date | null;
1256
- }
1257
- export interface EntityUpdatedEvent {
1258
- /**
1259
- * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
1260
- * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
1261
- * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
1262
- */
1263
- currentEntityAsJson?: string;
1264
- }
1265
- export interface EntityDeletedEvent {
1266
- /** Entity that was deleted. */
1267
- deletedEntityAsJson?: string | null;
1268
- }
1269
- export interface ActionEvent {
1270
- bodyAsJson?: string;
1271
- }
1272
- export interface MessageEnvelope {
1273
- /**
1274
- * App instance ID.
1275
- * @format GUID
1276
- */
1277
- instanceId?: string | null;
1278
- /**
1279
- * Event type.
1280
- * @maxLength 150
1281
- */
1282
- eventType?: string;
1283
- /** The identification type and identity data. */
1284
- identity?: IdentificationData;
1285
- /** Stringify payload. */
1286
- data?: string;
1287
- }
1288
- export interface IdentificationData extends IdentificationDataIdOneOf {
1289
- /**
1290
- * ID of a site visitor that has not logged in to the site.
1291
- * @format GUID
1292
- */
1293
- anonymousVisitorId?: string;
1294
- /**
1295
- * ID of a site visitor that has logged in to the site.
1296
- * @format GUID
1297
- */
1298
- memberId?: string;
1299
- /**
1300
- * ID of a Wix user (site owner, contributor, etc.).
1301
- * @format GUID
1302
- */
1303
- wixUserId?: string;
1304
- /**
1305
- * ID of an app.
1306
- * @format GUID
1307
- */
1308
- appId?: string;
1309
- /** @readonly */
1310
- identityType?: WebhookIdentityType;
1311
- }
1312
- /** @oneof */
1313
- export interface IdentificationDataIdOneOf {
1314
- /**
1315
- * ID of a site visitor that has not logged in to the site.
1316
- * @format GUID
1317
- */
1318
- anonymousVisitorId?: string;
1319
- /**
1320
- * ID of a site visitor that has logged in to the site.
1321
- * @format GUID
1322
- */
1323
- memberId?: string;
1324
- /**
1325
- * ID of a Wix user (site owner, contributor, etc.).
1326
- * @format GUID
1327
- */
1328
- wixUserId?: string;
1329
- /**
1330
- * ID of an app.
1331
- * @format GUID
1332
- */
1333
- appId?: string;
1334
- }
1335
- export declare enum WebhookIdentityType {
1336
- UNKNOWN = "UNKNOWN",
1337
- ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
1338
- MEMBER = "MEMBER",
1339
- WIX_USER = "WIX_USER",
1340
- APP = "APP"
1341
- }
1342
- export interface MigrateSubscriptionToPackagesRequest {
1343
- /** Created package. */
1344
- productInstance?: ProductInstance;
1345
- /**
1346
- * Existing subscriptionId to migrate
1347
- * @format GUID
1348
- */
1349
- subscriptionId?: string | null;
1350
- /**
1351
- * User id of the migration - only for Immigrator
1352
- * @format GUID
1353
- */
1354
- userId?: string | null;
1355
- }
1356
- export interface MigrateSubscriptionToPackagesResponse {
1357
- package?: Package;
1358
- }
1359
- export interface FixBrokenMigrationRequest {
1360
- /**
1361
- * Subscription id of the broken subscription
1362
- * @format GUID
1363
- */
1364
- subscriptionId?: string;
1365
- /**
1366
- * SBS service id that points to the broken subscription
1367
- * @format GUID
1368
- */
1369
- sbsServiceId?: string;
1370
- /**
1371
- * Owner of the broken subscription
1372
- * @format GUID
1373
- */
1374
- userId?: string;
1375
- }
1376
- export interface FixBrokenMigrationResponse {
1377
- }