@wix/packages 1.0.0

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.
@@ -0,0 +1,1600 @@
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
+ interface Package {
6
+ /**
7
+ * Package ID.
8
+ * @readonly
9
+ */
10
+ _id?: string;
11
+ /**
12
+ * Wix account ID. See
13
+ * [Account Level APIs](https://dev.wix.com/api/rest/account-level-apis/about-account-level-apis)
14
+ * for more details.
15
+ * @readonly
16
+ */
17
+ accountId?: string;
18
+ /**
19
+ * External reference. For example, an external subscription ID.
20
+ * This field isn't validated by Wix.
21
+ *
22
+ * Max: 100 characters
23
+ */
24
+ externalId?: string | null;
25
+ /**
26
+ * Product instances that are included in the package.
27
+ *
28
+ * Min: 1 product instance
29
+ * Max: 1000 product instances
30
+ */
31
+ productInstances?: ProductInstance[];
32
+ /**
33
+ * Date and time the package was created.
34
+ * @readonly
35
+ */
36
+ _createdDate?: Date;
37
+ /**
38
+ * Date and time the package was last updated.
39
+ * @readonly
40
+ */
41
+ _updatedDate?: Date;
42
+ }
43
+ /**
44
+ * A product instance is a specific instance of a Wix service that a reseller
45
+ * offers to one of their customers.
46
+ */
47
+ interface ProductInstance extends ProductInstanceContractDetailsOneOf {
48
+ /** Billing information for the contract between the reseller and Wix. */
49
+ billingInfo?: ProductInstanceCycle;
50
+ /**
51
+ * ID of the instance of the resold Wix service. **Note:** Differs from the
52
+ * `catalogProductId`. Allows you to identify different instances of the same
53
+ * product in a package.
54
+ * @readonly
55
+ */
56
+ instanceId?: string;
57
+ /**
58
+ * ID of the Wix site that the product instance is assigned to.
59
+ * See the [Query Sites API](https://dev.wix.com/api/rest/account-level-apis/sites/query-sites)
60
+ * for more information.
61
+ */
62
+ siteId?: string | null;
63
+ /**
64
+ * Product ID, as defined in the Wix Premium Product Catalog.
65
+ * Contact the [Wix B2B sales team](mailto:bizdev@wix.com)
66
+ * for more details about available Wix services.
67
+ */
68
+ catalogProductId?: string;
69
+ /**
70
+ * Status of the product instance.
71
+ *
72
+ * + `PENDING`: The product instance isn't yet available to the customer.
73
+ * + `ENABLED`: The customer can use the product instance.
74
+ * + `CANCELED`: The product instance isn't any longer available to the customer.
75
+ * + `FAILED`: The product instance couldn't be delivered successfully and has never been available to the customer.
76
+ * + `AWAITING_ACTION`: The product instance isn't yet available to the customer, because an external provider or the customer must take an action.
77
+ * @readonly
78
+ */
79
+ status?: Status;
80
+ /**
81
+ * Failure object. Only present for status `FAILED`. Describes why the product instance `FAILED`.
82
+ * @readonly
83
+ */
84
+ failure?: FailureReason;
85
+ /**
86
+ * Date and time the product instance was created.
87
+ * @readonly
88
+ */
89
+ _createdDate?: Date;
90
+ /**
91
+ * Date and time the product instance was last updated.
92
+ * @readonly
93
+ */
94
+ _updatedDate?: Date;
95
+ /**
96
+ * Two-letter country code in
97
+ * [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements)
98
+ * format. Specifies where customers can claim vouchers that may come with the
99
+ * product. Contact the [Wix B2B sales team](mailto:bizdev@wix.com) to get more
100
+ * information about vouchers and supported locations.
101
+ */
102
+ countryCode?: string | null;
103
+ /**
104
+ * Date and time the product instance expires in `YYYY-MM-DDThh:mm:ss.sssZ` format.
105
+ * Used only for instances that don't auto renew at the end of the current billing cycle.
106
+ * @readonly
107
+ */
108
+ expirationDate?: Date;
109
+ /**
110
+ * Discount code indicating that the reseller provisioned the product instance
111
+ * during a sale. Wix doesn't guarantee that a discount code reduces the
112
+ * price between Wix and the reseller, even when it's valid. Contact the
113
+ * [Wix B2B sales team](mailto:bizdev@wix.com) for more information.
114
+ *
115
+ * Max: 25 characters
116
+ */
117
+ discountCode?: string | null;
118
+ /**
119
+ * ID of a different product instance that you can use to offer your customers
120
+ * time-limited free access to an additional product or service. For example,
121
+ * Wix offers a 1-year free domain registration to all customers who purchase a
122
+ * Premium plan. The referenced product instance must have either status `"PENDING"` or
123
+ * `"ACTIVE"`. You can use each product instance only a single time as reference
124
+ * instance.
125
+ */
126
+ referenceProductInstanceId?: string | null;
127
+ }
128
+ /** @oneof */
129
+ interface ProductInstanceContractDetailsOneOf {
130
+ /** Billing information for the contract between the reseller and Wix. */
131
+ billingInfo?: ProductInstanceCycle;
132
+ }
133
+ declare enum FailureReasonFailureReason {
134
+ UNKNOWN = "UNKNOWN",
135
+ /** The delivery of the product took too long */
136
+ DELIVERY_TIMEOUT = "DELIVERY_TIMEOUT",
137
+ /** An external process failed */
138
+ EXTERNAL_FAILURE = "EXTERNAL_FAILURE"
139
+ }
140
+ declare enum IntervalIntervalUnit {
141
+ /** unknown interval unit */
142
+ UNKNOWN = "UNKNOWN",
143
+ /** day */
144
+ DAY = "DAY",
145
+ /** week */
146
+ WEEK = "WEEK",
147
+ /** month */
148
+ MONTH = "MONTH",
149
+ /** year */
150
+ YEAR = "YEAR"
151
+ }
152
+ declare enum CycleDescriptorType {
153
+ UNKNOWN = "UNKNOWN",
154
+ ONE_TIME = "ONE_TIME",
155
+ RECURRING = "RECURRING"
156
+ }
157
+ interface CycleInterval {
158
+ /** Unit of the billing cycle. */
159
+ unit?: IntervalIntervalUnit;
160
+ /** Count of units that make up the billing cycle. */
161
+ count?: number;
162
+ }
163
+ declare enum Status {
164
+ PENDING = "PENDING",
165
+ ENABLED = "ENABLED",
166
+ CANCELED = "CANCELED",
167
+ FAILED = "FAILED",
168
+ AWAITING_ACTION = "AWAITING_ACTION"
169
+ }
170
+ interface FailureReason {
171
+ /**
172
+ * Failure code.
173
+ *
174
+ * + `DELIVERY_TIMEOUT`: The product instance couldn't be created because the Resellers API timed out.
175
+ * + `EXTERNAL_FAILURE`: The product instance couldn't be created because an external process failed. Contact the [Wix B2B sales team](mailto:bizdev@wix.com) for more information.
176
+ */
177
+ code?: FailureReasonFailureReason;
178
+ /** Failure message. */
179
+ message?: string;
180
+ }
181
+ interface ProductInstanceCycle {
182
+ /**
183
+ * Payment type.
184
+ * + `UNKNOWN`: The payment type hasn't been set.
185
+ * + `ONE_TIME`: The reseller pays Wix in a single payment.
186
+ * + `RECURRING`: The reseller pays Wix on a recurring schedule.
187
+ */
188
+ type?: CycleDescriptorType;
189
+ /** Duration of the billing cycle. Available only for `RECURRING` payments. */
190
+ cycleDuration?: CycleInterval;
191
+ }
192
+ interface MigrateSubscriptionToPackagesRequest {
193
+ /** Created package. */
194
+ productInstance?: ProductInstance;
195
+ /** Existing subscriptionId to migrate */
196
+ subscriptionId?: string | null;
197
+ /** User id of the migration - only for Immigrator */
198
+ userId?: string | null;
199
+ }
200
+ interface MigrateSubscriptionToPackagesResponse {
201
+ package?: Package;
202
+ }
203
+ interface CreatePackageRequest {
204
+ /** Idempotency key. */
205
+ idempotencyKey?: string | null;
206
+ /** External reference. For example, an external subscription ID. **Note:** This field is not validated by Wix. */
207
+ externalId?: string | null;
208
+ /** Wix services that are resold. */
209
+ products: ProductInstance[];
210
+ }
211
+ interface CreatePackageResponse {
212
+ /** Idempotency key. */
213
+ idempotencyKey?: string | null;
214
+ /** Created package. */
215
+ package?: Package;
216
+ }
217
+ interface CancelPackageRequest {
218
+ /** Idempotency key. */
219
+ idempotencyKey?: string | null;
220
+ /** ID of the package to cancel. */
221
+ _id: string;
222
+ }
223
+ interface CancelPackageResponse {
224
+ /** Idempotency key. */
225
+ idempotencyKey?: string | null;
226
+ /** Canceled package. */
227
+ package?: Package;
228
+ }
229
+ interface PackageCanceled {
230
+ /** Canceled package. */
231
+ package?: Package;
232
+ }
233
+ interface GetPackageRequest {
234
+ /** Package ID. */
235
+ _id: string;
236
+ }
237
+ interface GetPackageResponse {
238
+ /** Retrieved package. */
239
+ package?: Package;
240
+ }
241
+ interface QueryPackagesRequest {
242
+ /** Query options. See [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language) for more details. */
243
+ query: QueryV2;
244
+ }
245
+ interface QueryV2 extends QueryV2PagingMethodOneOf {
246
+ /** Paging options to limit and skip the number of items. */
247
+ paging?: Paging;
248
+ /** 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`. */
249
+ cursorPaging?: CursorPaging;
250
+ /**
251
+ * Filter object in the following format:
252
+ * `"filter" : {
253
+ * "fieldName1": "value1",
254
+ * "fieldName2":{"$operator":"value2"}
255
+ * }`
256
+ * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`
257
+ */
258
+ filter?: Record<string, any> | null;
259
+ /**
260
+ * Sort object in the following format:
261
+ * `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
262
+ */
263
+ sort?: Sorting[];
264
+ /** 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. */
265
+ fields?: string[];
266
+ /** 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. */
267
+ fieldsets?: string[];
268
+ }
269
+ /** @oneof */
270
+ interface QueryV2PagingMethodOneOf {
271
+ /** Paging options to limit and skip the number of items. */
272
+ paging?: Paging;
273
+ /** 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`. */
274
+ cursorPaging?: CursorPaging;
275
+ }
276
+ interface Sorting {
277
+ /** Name of the field to sort by. */
278
+ fieldName?: string;
279
+ /** Sort order. */
280
+ order?: SortOrder;
281
+ }
282
+ declare enum SortOrder {
283
+ ASC = "ASC",
284
+ DESC = "DESC"
285
+ }
286
+ interface Paging {
287
+ /** Number of items to load. */
288
+ limit?: number | null;
289
+ /** Number of items to skip in the current sort order. */
290
+ offset?: number | null;
291
+ }
292
+ interface CursorPaging {
293
+ /** Maximum number of items to return in the results. */
294
+ limit?: number | null;
295
+ /**
296
+ * Pointer to the next or previous page in the list of results.
297
+ *
298
+ * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
299
+ * Not relevant for the first request.
300
+ */
301
+ cursor?: string | null;
302
+ }
303
+ interface QueryPackagesResponse {
304
+ /** Paging metadata. */
305
+ metadata?: PagingMetadataV2;
306
+ /**
307
+ * Retrieved packages.
308
+ *
309
+ * Max: 1000 packages
310
+ */
311
+ packages?: Package[];
312
+ }
313
+ interface PagingMetadataV2 {
314
+ /** Number of items returned in the response. */
315
+ count?: number | null;
316
+ /** Offset that was requested. */
317
+ offset?: number | null;
318
+ /** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */
319
+ total?: number | null;
320
+ /** Flag that indicates the server failed to calculate the `total` field. */
321
+ tooManyToCount?: boolean | null;
322
+ /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */
323
+ cursors?: Cursors;
324
+ }
325
+ interface Cursors {
326
+ /** Cursor string pointing to the next page in the list of results. */
327
+ next?: string | null;
328
+ /** Cursor pointing to the previous page in the list of results. */
329
+ prev?: string | null;
330
+ }
331
+ interface AssignProductInstanceToSiteRequest {
332
+ /** Idempotency key. */
333
+ idempotencyKey?: string | null;
334
+ /** ID of the product instance to assign to a site. */
335
+ instanceId: string;
336
+ /** ID of the site to which the product instance is assigned. */
337
+ siteId: string;
338
+ }
339
+ interface AssignProductInstanceToSiteResponse {
340
+ /** Idempotency key. */
341
+ idempotencyKey?: string | null;
342
+ /** Updated package that includes the assigned product instance. */
343
+ package?: Package;
344
+ }
345
+ interface AssignedProductInstanceToSite {
346
+ /** Updated package. */
347
+ package?: Package;
348
+ /**
349
+ * ID of the product instance that was assigned to the site.
350
+ * @readonly
351
+ */
352
+ productInstanceId?: string;
353
+ /**
354
+ * ID of the site the product instance was assigned to.
355
+ * @readonly
356
+ */
357
+ siteId?: string;
358
+ }
359
+ interface UnassignProductInstanceFromSiteRequest {
360
+ /** Idempotency key. */
361
+ idempotencyKey?: string | null;
362
+ /** ID of the product instance to unassign from a site. */
363
+ instanceId: string;
364
+ }
365
+ interface UnassignProductInstanceFromSiteResponse {
366
+ /** Idempotency key. */
367
+ idempotencyKey?: string | null;
368
+ /** Updated package that includes the unassigned product instance. */
369
+ package?: Package;
370
+ }
371
+ interface UnassignedProductInstanceFromSite {
372
+ /** Updated package. */
373
+ package?: Package;
374
+ /**
375
+ * ID of the product instance that was unassigned from the site.
376
+ * @readonly
377
+ */
378
+ productInstanceId?: string;
379
+ /**
380
+ * MetasiteId of the site the product instance was unassigned from.
381
+ * @readonly
382
+ */
383
+ metaSiteId?: string;
384
+ }
385
+ interface CancelProductInstanceRequest {
386
+ /** Idempotency key. */
387
+ idempotencyKey?: string | null;
388
+ /** ID of the product instance to cancel. */
389
+ instanceId: string;
390
+ }
391
+ interface CancelProductInstanceResponse {
392
+ /** Idempotency key. */
393
+ idempotencyKey?: string | null;
394
+ /** Updated package that includes the previously included the canceled product instance. */
395
+ package?: Package;
396
+ }
397
+ interface ProductInstanceCanceled {
398
+ /** Updated package. */
399
+ package?: Package;
400
+ /**
401
+ * ID of the product instance that was canceled.
402
+ * @readonly
403
+ */
404
+ productInstanceId?: string;
405
+ }
406
+ interface AdjustProductInstanceSpecificationsRequest {
407
+ /** Idempotency key. */
408
+ idempotencyKey?: string | null;
409
+ /** ID of the product instance to adjust. */
410
+ instanceId: string;
411
+ /**
412
+ * ID of the product to replace the original instance. Required in case you don't
413
+ * provide a new `billingInfo` object.
414
+ */
415
+ catalogProductId?: string | null;
416
+ /**
417
+ * Information about the billing cycle. Required in case you don't provide a new
418
+ * `catalogProductId`. The new billing cycle must be supported for the service.
419
+ * Contact the [Wix B2B sales team](mailto:bizdev@wix.com) for
420
+ * information about a service's supported billing cycles. If
421
+ * you adjust the billing cycle for a product instance with `RECURRING`
422
+ * payments, you must also provide `billingInfo.cycleDuration.unit`.
423
+ */
424
+ billingInfo?: ProductInstanceCycle;
425
+ /**
426
+ * Discount code indicating that the reseller provisioned the product instance
427
+ * during a sale. Ignored when you don't pass a new `catalogProductId` as well.
428
+ * In case you pass a code that isn't valid, the call succeeds and
429
+ * no discount is applied to the product instance. Wix doesn't guarantee that a
430
+ * discount code reduces the price between Wix and the reseller, even when it's
431
+ * valid. You can't add a discount code after you've created the
432
+ * product instance. Contact the [Wix B2B sales team](mailto:bizdev@wix.com) for
433
+ * more information about supported codes.
434
+ *
435
+ * Max: 25 characters
436
+ */
437
+ discountCode?: string | null;
438
+ }
439
+ interface AdjustProductInstanceSpecificationsResponse {
440
+ /** Idempotency key. */
441
+ idempotencyKey?: string | null;
442
+ /** Updated package that includes the adjusted product instance. */
443
+ package?: Package;
444
+ }
445
+ interface AdjustedProductInstanceSpecifications {
446
+ /** Updated package. */
447
+ package?: Package;
448
+ /**
449
+ * ID of the product instance to adjust.
450
+ * @readonly
451
+ */
452
+ productInstanceId?: string;
453
+ }
454
+ interface SubscriptionEvent extends SubscriptionEventEventOneOf {
455
+ /** Triggered when a subscription is created. */
456
+ created?: SubscriptionCreated;
457
+ /**
458
+ * Triggered when a subscription is assigned to a Wix site, including the initial
459
+ * assignment of a floating subscription or a re-assignement from a different site.
460
+ */
461
+ assigned?: SubscriptionAssigned;
462
+ /** Triggered when a subscription is canceled. */
463
+ cancelled?: SubscriptionCancelled;
464
+ /** Triggered when the subscription's auto renew is turned on. */
465
+ autoRenewTurnedOn?: SubscriptionAutoRenewTurnedOn;
466
+ /** Triggered when the subscription's auto renew is turned off. */
467
+ autoRenewTurnedOff?: SubscriptionAutoRenewTurnedOff;
468
+ /**
469
+ * Triggered when a subscription is unassigned from a Wix site and becomes
470
+ * floating.
471
+ */
472
+ unassigned?: SubscriptionUnassigned;
473
+ /**
474
+ * Triggered when a subscription is transferred from one Wix account to another.
475
+ * A transfer includes cancelling the original subscription and creating a new
476
+ * subscription for the target account. The event returns both the original
477
+ * and the new subscription.
478
+ */
479
+ transferred?: SubscriptionTransferred;
480
+ /** Triggered when a recurring charge succeeds for a subscription. */
481
+ recurringChargeSucceeded?: RecurringChargeSucceeded;
482
+ /**
483
+ * Triggered when a subscription was updated including when its product has been
484
+ * up- or downgraded or the billing cycle is changed.
485
+ */
486
+ contractSwitched?: ContractSwitched;
487
+ /**
488
+ * Triggered when a subscription gets close to the end of its billing cycle.
489
+ * The exact number of days is defined in the billing system.
490
+ */
491
+ nearEndOfPeriod?: SubscriptionNearEndOfPeriod;
492
+ /**
493
+ * Triggered when a subscription is updated and the change doesn't happen
494
+ * immediately but at the end of the current billing cycle.
495
+ */
496
+ pendingChange?: SubscriptionPendingChange;
497
+ /** ID of the subscription's event. */
498
+ eventId?: string | null;
499
+ /**
500
+ * Date and time of the event in
501
+ * [UTC datetime](https://en.wikipedia.org/wiki/Coordinated_Universal_Time)
502
+ * `YYYY-MM-DDThh:mm:ss.sssZ` format.
503
+ */
504
+ eventDate?: Date;
505
+ }
506
+ /** @oneof */
507
+ interface SubscriptionEventEventOneOf {
508
+ /** Triggered when a subscription is created. */
509
+ created?: SubscriptionCreated;
510
+ /**
511
+ * Triggered when a subscription is assigned to a Wix site, including the initial
512
+ * assignment of a floating subscription or a re-assignement from a different site.
513
+ */
514
+ assigned?: SubscriptionAssigned;
515
+ /** Triggered when a subscription is canceled. */
516
+ cancelled?: SubscriptionCancelled;
517
+ /** Triggered when the subscription's auto renew is turned on. */
518
+ autoRenewTurnedOn?: SubscriptionAutoRenewTurnedOn;
519
+ /** Triggered when the subscription's auto renew is turned off. */
520
+ autoRenewTurnedOff?: SubscriptionAutoRenewTurnedOff;
521
+ /**
522
+ * Triggered when a subscription is unassigned from a Wix site and becomes
523
+ * floating.
524
+ */
525
+ unassigned?: SubscriptionUnassigned;
526
+ /**
527
+ * Triggered when a subscription is transferred from one Wix account to another.
528
+ * A transfer includes cancelling the original subscription and creating a new
529
+ * subscription for the target account. The event returns both the original
530
+ * and the new subscription.
531
+ */
532
+ transferred?: SubscriptionTransferred;
533
+ /** Triggered when a recurring charge succeeds for a subscription. */
534
+ recurringChargeSucceeded?: RecurringChargeSucceeded;
535
+ /**
536
+ * Triggered when a subscription was updated including when its product has been
537
+ * up- or downgraded or the billing cycle is changed.
538
+ */
539
+ contractSwitched?: ContractSwitched;
540
+ /**
541
+ * Triggered when a subscription gets close to the end of its billing cycle.
542
+ * The exact number of days is defined in the billing system.
543
+ */
544
+ nearEndOfPeriod?: SubscriptionNearEndOfPeriod;
545
+ /**
546
+ * Triggered when a subscription is updated and the change doesn't happen
547
+ * immediately but at the end of the current billing cycle.
548
+ */
549
+ pendingChange?: SubscriptionPendingChange;
550
+ }
551
+ /** Triggered when a subscription is created. */
552
+ interface SubscriptionCreated {
553
+ /** Created subscription. */
554
+ subscription?: Subscription;
555
+ /** Metadata for the `created` event. */
556
+ metadata?: Record<string, string>;
557
+ /**
558
+ * Subscription reactivation data.
559
+ * A subscription can be reactivated for example if it was incorrectly canceled because of fraud and then reactivated
560
+ * by the billing system
561
+ */
562
+ reactivationData?: ReactivationData;
563
+ }
564
+ /**
565
+ * A subscription holds information about a Premium product that a Wix account
566
+ * owner has purchased including details about the billing.
567
+ */
568
+ interface Subscription {
569
+ /** ID of the subscription. */
570
+ _id?: string;
571
+ /** ID of the Wix account that purchased the subscription. */
572
+ userId?: string;
573
+ /**
574
+ * ID of the [product](https://bo.wix.com/wix-docs/rest/premium/premium-product-catalog-v2/products/product-object)
575
+ * for which the subscription was purchased.
576
+ */
577
+ productId?: string;
578
+ /**
579
+ * Date and time the subscription was created in
580
+ * [UTC datetime](https://en.wikipedia.org/wiki/Coordinated_Universal_Time)
581
+ * `YYYY-MM-DDThh:mm:ss.sssZ` format.
582
+ */
583
+ createdAt?: Date;
584
+ /**
585
+ * Date and time the subscription was last updated in
586
+ * [UTC datetime](https://en.wikipedia.org/wiki/Coordinated_Universal_Time)
587
+ * `YYYY-MM-DDThh:mm:ss.sssZ` format.
588
+ */
589
+ updatedAt?: Date;
590
+ /**
591
+ * ID of the metasite that the subscription is assigned to.
592
+ * Available only when the subscription is assigned to a Wix site.
593
+ * Subscriptions for account level products can't be assigned to a Wix site.
594
+ */
595
+ metaSiteId?: string | null;
596
+ /** Information about the system that manages the subscription's billing. */
597
+ billingReference?: BillingReference;
598
+ /** Information about the billing cycle of the subscription. */
599
+ cycle?: Cycle;
600
+ /**
601
+ * Subscription status.
602
+ *
603
+ * + `UNKNOWN`: Default status.
604
+ * + `AUTO_RENEW_ON`: Subscription is active and automatically renews at the end of the current billing cycle.
605
+ * + `AUTO_RENEW_OFF`: Subscription is active but expires at the end of the current billing cycle.
606
+ * + `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.
607
+ * + `CANCELLED`: Subscription isn't active because it has been canceled.
608
+ * + `TRANSFERRED`: Subscription isn't active because it has been transferred to a different account. A different active subscription was created for the target account.
609
+ */
610
+ status?: SubscriptionStatus;
611
+ /**
612
+ * Date and time the subscription was last transferred from one Wix account to
613
+ * another in
614
+ * [UTC datetime](https://en.wikipedia.org/wiki/Coordinated_Universal_Time)
615
+ * `YYYY-MM-DDThh:mm:ss.sssZ` format.
616
+ */
617
+ transferredAt?: Date;
618
+ /**
619
+ * ID of the [product type](https://bo.wix.com/wix-docs/rest/premium/premium-product-catalog-v2/product-types/product-type-object)
620
+ * that the product, for which the subscription was purchased, belongs to.
621
+ */
622
+ productTypeId?: string;
623
+ /** Version number, which increments by 1 each time the subscription is updated. */
624
+ version?: number;
625
+ /**
626
+ * Whether the subscription is active. Includes the statuses
627
+ * `"AUTO_RENEW_ON"`, `"AUTO_RENEW_OFF"`, and `"MANUAL_RECURRING"`.
628
+ */
629
+ active?: boolean;
630
+ /**
631
+ * Date and time the subscription was originally created in
632
+ * [UTC datetime](https://en.wikipedia.org/wiki/Coordinated_Universal_Time)
633
+ * `YYYY-MM-DDThh:mm:ss.sssZ` format.
634
+ * Differs from `createdAt` in case the subscription was originally created for a different Wix account and has been transferred.
635
+ */
636
+ originalCreationDate?: Date;
637
+ /** Custom metadata about the subscription. */
638
+ metadata?: Record<string, string>;
639
+ /**
640
+ * 2-letter country code in
641
+ * [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements)
642
+ * format.
643
+ */
644
+ countryCode?: string | null;
645
+ }
646
+ interface BillingReference {
647
+ /**
648
+ * Name of the billing system that manages the subscription.
649
+ *
650
+ * + `"UNKNOWN"`: Default value.
651
+ * + `"SBS"`: [Wix Billing](https://github.com/wix-p/premium-billing/tree/master/sbs).
652
+ * + `"LICENSER"`:
653
+ * + `"BASS"`: [Billing and Subscriptions System](https://dev.wix.com/docs/rest/internal-only/premium/subscriptions-by-billing-by-wix/introduction).
654
+ * + `"RESELLER"`: [External Reseller](https://dev.wix.com/api/rest/account-level-apis/resellers/introduction).
655
+ */
656
+ providerName?: ProviderName;
657
+ /** Current provider reference ID. */
658
+ providerReferenceId?: string | null;
659
+ /** Previous provider reference IDs. Used for when a subscription is extended, specifically for domains. */
660
+ previousProviderReferenceIds?: string[];
661
+ }
662
+ declare enum ProviderName {
663
+ UNKNOWN = "UNKNOWN",
664
+ SBS = "SBS",
665
+ LICENSER = "LICENSER",
666
+ BASS = "BASS",
667
+ RESELLER = "RESELLER",
668
+ RECURRING_INVOICES = "RECURRING_INVOICES"
669
+ }
670
+ interface Cycle extends CycleCycleSelectorOneOf {
671
+ /** repetitive interval */
672
+ interval?: Interval;
673
+ /** one time */
674
+ oneTime?: OneTime;
675
+ }
676
+ /** @oneof */
677
+ interface CycleCycleSelectorOneOf {
678
+ /** repetitive interval */
679
+ interval?: Interval;
680
+ /** one time */
681
+ oneTime?: OneTime;
682
+ }
683
+ interface Interval {
684
+ /** interval unit of measure */
685
+ unit?: IntervalUnit;
686
+ /** number of interval */
687
+ count?: number;
688
+ }
689
+ declare enum IntervalUnit {
690
+ /** unknown interval unit */
691
+ UNKNOWN = "UNKNOWN",
692
+ /** day */
693
+ DAY = "DAY",
694
+ /** week */
695
+ WEEK = "WEEK",
696
+ /** month */
697
+ MONTH = "MONTH",
698
+ /** year */
699
+ YEAR = "YEAR"
700
+ }
701
+ interface OneTime {
702
+ }
703
+ declare enum SubscriptionStatus {
704
+ UNKNOWN = "UNKNOWN",
705
+ AUTO_RENEW_ON = "AUTO_RENEW_ON",
706
+ AUTO_RENEW_OFF = "AUTO_RENEW_OFF",
707
+ MANUAL_RECURRING = "MANUAL_RECURRING",
708
+ CANCELLED = "CANCELLED",
709
+ TRANSFERRED = "TRANSFERRED"
710
+ }
711
+ /** Triggered when a subscription is reactivated. */
712
+ interface ReactivationData {
713
+ reactivationReason?: ReactivationReasonEnum;
714
+ /**
715
+ * In the event of reactivation after chargeback dispute, the subscription may be extended according to the
716
+ * number of days it was inactive during the time of resolving the dispute
717
+ */
718
+ newEndOfPeriod?: Date;
719
+ /** The original end date, before the inactive period. */
720
+ oldEndOfPeriod?: Date;
721
+ /** The difference in days between the new new_end_of_period and old_end_of_period */
722
+ differenceInDays?: number | null;
723
+ }
724
+ /** Reason for subscription reactivation */
725
+ declare enum ReactivationReasonEnum {
726
+ UNKNOWN = "UNKNOWN",
727
+ /**
728
+ * Subscription was reactivated due to billing status change from CANCELED to ACTIVE, for example if it was incorrectly
729
+ * canceled because of suspicion of fraud
730
+ */
731
+ BILLING_STATUS_CHANGE = "BILLING_STATUS_CHANGE",
732
+ /** Subscription was reactivated after a chargeback dispute */
733
+ REACTIVATED_AFTER_CHARGEBACK = "REACTIVATED_AFTER_CHARGEBACK"
734
+ }
735
+ /**
736
+ * Triggered when a subscription is assigned to a Wix site, including the initial
737
+ * assignment of a floating subscription or a re-assignement from a different site.
738
+ */
739
+ interface SubscriptionAssigned {
740
+ /** Assigned subscription. */
741
+ subscription?: Subscription;
742
+ /** ID of the metasite that the subscription has been assigned to before the update. */
743
+ previousMetaSiteId?: string | null;
744
+ }
745
+ /** Triggered when a subscription is canceled. */
746
+ interface SubscriptionCancelled {
747
+ /** Canceled subscription. */
748
+ subscription?: Subscription;
749
+ /** Details about the cancellation including who canceled the subscription and why. */
750
+ cancellationDetails?: CancellationDetails;
751
+ /**
752
+ * Whether the subscription is canceled immediately or expires at the end of the current billing cycle.
753
+ *
754
+ * Default: `false`
755
+ */
756
+ immediateCancel?: boolean;
757
+ /** Whether the subscription was canceled during the free trial period. */
758
+ canceledInFreeTrial?: boolean;
759
+ }
760
+ /** Information about the cancellation flow including who canceled the subscription and why it was canceled. */
761
+ interface CancellationDetails {
762
+ /**
763
+ * Cancellation code.
764
+ *
765
+ * Values supported for cancellations on behalf of the billing system: `-1`, `-2`, `-3`, `-4`, `-5`, `-6`, `-7`, `-8`.
766
+ * For cancellations on behalf of the site owner or the service provider `cancellationCode`
767
+ * is taken from the request of
768
+ * [Cancel Immediately Offline](https://bo.wix.com/wix-docs/rest/premium/premium-subscriptions-manager/cancel-immediately-offline).
769
+ *
770
+ * + `-1`: The subscription has been cancelled by the billing system but none of the listed cancellation reasons applies.
771
+ * + `-2`: There were payment problems.
772
+ * + `-3`: There was a chargeback.
773
+ * + `-4`: Customer support has canceled the subscription and issued a refund.
774
+ * + `-5`: The site owner has changed their existing subscription.
775
+ * + `-6`: The subscription has been transferred to a different Wix account.
776
+ * + `-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.
777
+ * + `-8`: The Wix account that the subscription belonged to has been deleted.
778
+ */
779
+ cancellationCode?: number | null;
780
+ /**
781
+ * Cancellation reason. For cancellations on behalf of the site owner or the service provider `cancellationReason`
782
+ * is taken from the request of
783
+ * [Cancel Immediately Offline](https://bo.wix.com/wix-docs/rest/premium/premium-subscriptions-manager/cancel-immediately-offline).
784
+ * For cancellations on behalf of the billing system `cancellationReason` is `null` or an empty string.
785
+ */
786
+ cancellationReason?: string | null;
787
+ /**
788
+ * Initiator of the cancellation. For `"USER_REQUESTED"` and `"APP_MANAGED"`,
789
+ * `cancellationCode` and `cancellationReason` are taken from the request of
790
+ * [Cancel Immediately](https://bo.wix.com/wix-docs/rest/premium/premium-subscriptions-manager/cancel-immediately)
791
+ * or [Cancel Immediately Offline](https://bo.wix.com/wix-docs/rest/premium/premium-subscriptions-manager/cancel-immediately-offline).
792
+ * For `"PASSIVE"`, cancellations `cancellationCode` is automatically calculated and `cancellationReason`
793
+ * is `null` or an empty string.
794
+ *
795
+ * + `"UNKNOWN`: Default value.
796
+ * + `"USER_REQUESTED"`: The Wix account owner has canceled the subscription.
797
+ * + `"APP_MANAGED"`: The service provider has canceled the subscription.
798
+ * + `"PASSIVE"`: The billing system has canceled the subscription. For example, in case of payment failure or fraud.
799
+ */
800
+ initiator?: Initiator;
801
+ }
802
+ declare enum Initiator {
803
+ UNKNOWN = "UNKNOWN",
804
+ USER_REQUESTED = "USER_REQUESTED",
805
+ APP_MANAGED = "APP_MANAGED",
806
+ PASSIVE = "PASSIVE"
807
+ }
808
+ /** Triggered when the subscription's auto renew is turned on. */
809
+ interface SubscriptionAutoRenewTurnedOn {
810
+ /** Subscription for which auto renew is turned on. */
811
+ subscription?: Subscription;
812
+ /**
813
+ * Supported values: `USER`, `APP`.
814
+ *
815
+ * Information about who turned auto renew on.
816
+ * + `"USER"`: The site owner who purchased the subscription has turned auto renew on.
817
+ * + `"APP"`: The service provider has turned auto renew on.
818
+ */
819
+ initiator?: string | null;
820
+ }
821
+ /** Triggered when the subscription's auto renew is turned off. */
822
+ interface SubscriptionAutoRenewTurnedOff {
823
+ /** Subscription for which auto renew is turned off. */
824
+ subscription?: Subscription;
825
+ /** Details about the cancellation including who canceled the subscription and why. */
826
+ cancellationDetails?: CancellationDetails;
827
+ /**
828
+ * Whether the subscription is immediately canceled or expires at the end of the current billing cycle.
829
+ *
830
+ * Default: `false`
831
+ */
832
+ immediateCancel?: boolean;
833
+ }
834
+ /**
835
+ * Triggered when a subscription is unassigned from a Wix site and becomes
836
+ * floating.
837
+ */
838
+ interface SubscriptionUnassigned {
839
+ /** Unassigned subscription. */
840
+ subscription?: Subscription;
841
+ /** ID of the metasite that the subscription has been assigned to before the event. */
842
+ previousMetaSiteId?: string;
843
+ /**
844
+ * Reason why the subscription is unassigned.
845
+ *
846
+ * + `"UNKNOWN"`: Default value.
847
+ * + `"USER_REQUESTED"`: The Wix account owner has unassigned the subscription.
848
+ * + `"REPLACED_BY_ANOTHER_SUBSCRIPTION"`: A different subscription that replaces this subscription is assigned to the site.
849
+ */
850
+ unassignReason?: UnassignReason;
851
+ }
852
+ declare enum UnassignReason {
853
+ UNKNOWN = "UNKNOWN",
854
+ USER_REQUESTED = "USER_REQUESTED",
855
+ REPLACED_BY_ANOTHER_SUBSCRIPTION = "REPLACED_BY_ANOTHER_SUBSCRIPTION"
856
+ }
857
+ /**
858
+ * Triggered when a subscription is transferred from one Wix account to another.
859
+ * A transfer includes cancelling the original subscription and creating a new
860
+ * subscription for the target account. The event returns both the original
861
+ * and the new subscription.
862
+ */
863
+ interface SubscriptionTransferred {
864
+ /** Original subscription that was canceled for the transfer. */
865
+ originSubscription?: Subscription;
866
+ /** Newly created subscription for the target account. */
867
+ targetSubscription?: Subscription;
868
+ }
869
+ /** Triggered when a recurring charge succeeds for a subscription. */
870
+ interface RecurringChargeSucceeded {
871
+ /** Subscription for which the recurring charge has succeeded. */
872
+ subscription?: Subscription;
873
+ /** Indication that there was a successful charge at the end of the free trial period */
874
+ freeTrialPeriodEnd?: boolean;
875
+ }
876
+ /**
877
+ * Triggered when a subscription was updated including when its product has been
878
+ * up- or downgraded or the billing cycle is changed.
879
+ */
880
+ interface ContractSwitched {
881
+ /** Updated subscription. */
882
+ subscription?: Subscription;
883
+ /** Billing cycle before the update. */
884
+ previousCycle?: Cycle;
885
+ /** ID of the product belonging to the subscription before the update. */
886
+ previousProductId?: string;
887
+ /** ID of the product type that the subscription's original product belonged to before the update. */
888
+ previousProductTypeId?: string;
889
+ /**
890
+ * Update type. __Note__: Doesn't include information about a product adjustment.
891
+ * For that purpose, see `productAdjustment`.
892
+ *
893
+ * + `"NOT_APPLICABLE"`: Default value.
894
+ * + `"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.
895
+ * + `"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.
896
+ * + `"REFUND_PRICE_DIFF"`: Not implemented.
897
+ * + `"ADJUST_PERIOD_END"`: Not implemented.
898
+ * + `"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.
899
+ * + `"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.
900
+ * + `"END_OF_PERIOD"`: The subscription's billing current cycle is extended because of a downgrade.
901
+ * + `"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.
902
+ * + `"DOWNGRADE_RENEWAL"`: The subscription is downgraded because of a declined payment. This prevents subscriptions from churning.
903
+ */
904
+ contractSwitchType?: ContractSwitchType;
905
+ /**
906
+ * ID of the metasite the subscription has been assigned to previously.
907
+ * Available only in case the subscription is assigned to a different site.
908
+ */
909
+ previousMetaSiteId?: string | null;
910
+ /**
911
+ * Update reason.
912
+ *
913
+ * + `"PRICE_INCREASE"`: The subscription's price has been increased.
914
+ * + `"EXTERNAL_PROVIDER_TRIGGER"`: Any reason other than a price increase.
915
+ */
916
+ contractSwitchReason?: ContractSwitchReason;
917
+ /** Information about the price update. Available only for updates with a price increase. */
918
+ productPriceIncreaseData?: ProductPriceIncreaseData;
919
+ /**
920
+ * Information about a product adjustment. For example, a downgrade.
921
+ * __Note__: This isn't the same as `contractSwitchType`.
922
+ *
923
+ * + `NOT_APPLICABLE`: There is no information about whether the product has been up- or downgraded.
924
+ * + `DOWNGRADE`: The product has been downgraded.
925
+ */
926
+ productAdjustment?: ProductAdjustment;
927
+ }
928
+ /** Copied from SBS */
929
+ declare enum ContractSwitchType {
930
+ NOT_APPLICABLE = "NOT_APPLICABLE",
931
+ ADDITIONAL_QUANTITY = "ADDITIONAL_QUANTITY",
932
+ CREDIT_UNUSED_PERIOD = "CREDIT_UNUSED_PERIOD",
933
+ REFUND_PRICE_DIFF = "REFUND_PRICE_DIFF",
934
+ ADJUST_PERIOD_END = "ADJUST_PERIOD_END",
935
+ DOWNGRADE_GRACE_PERIOD = "DOWNGRADE_GRACE_PERIOD",
936
+ FULL_AMOUNT_PERIOD = "FULL_AMOUNT_PERIOD",
937
+ END_OF_PERIOD = "END_OF_PERIOD",
938
+ PENDING_CHANGES = "PENDING_CHANGES",
939
+ DOWNGRADE_RENEWAL = "DOWNGRADE_RENEWAL"
940
+ }
941
+ declare enum ContractSwitchReason {
942
+ EXTERNAL_PROVIDER_TRIGGER = "EXTERNAL_PROVIDER_TRIGGER",
943
+ PRICE_INCREASE = "PRICE_INCREASE"
944
+ }
945
+ /** Triggered when a subscription's price is increased. */
946
+ interface ProductPriceIncreaseData {
947
+ /** Price of the subscription before the update. */
948
+ previousPrice?: string | null;
949
+ /** A value that is used in order to select the correct email template to send the user regarding the price increase. */
950
+ emailTemplateSelector?: string | null;
951
+ /** Used to differentiate between migration segments. Does not have to be unique per segment. */
952
+ segmentName?: string | null;
953
+ /** Used to determine how the price increase was triggered. */
954
+ priceIncreaseTrigger?: PriceIncreaseTrigger;
955
+ }
956
+ /** Reason for Price Increase Trigger */
957
+ declare enum PriceIncreaseTrigger {
958
+ NEAR_RENEWAL = "NEAR_RENEWAL",
959
+ RECURRING_SUCCESS = "RECURRING_SUCCESS",
960
+ MANUAL = "MANUAL"
961
+ }
962
+ /** Triggered when a subscription's product is adusted. */
963
+ declare enum ProductAdjustment {
964
+ /** flag to show that the ContractSwitchedEvent is not applicable / needed */
965
+ NOT_APPLICABLE = "NOT_APPLICABLE",
966
+ /** flag to show that the ContractSwitchedEvent is a Downgrade */
967
+ DOWNGRADE = "DOWNGRADE"
968
+ }
969
+ /**
970
+ * Triggered when a subscription gets close to the end of its billing cycle.
971
+ * The exact number of days is defined in the billing system.
972
+ */
973
+ interface SubscriptionNearEndOfPeriod {
974
+ /** Subscription that got close to the end of its billing cycle. */
975
+ subscription?: Subscription;
976
+ /** Whether the subscription is within the free trial period. */
977
+ inFreeTrial?: boolean;
978
+ }
979
+ /**
980
+ * Triggered when a subscription is updated and the change doesn't happen
981
+ * immediately but at the end of the current billing cycle.
982
+ */
983
+ interface SubscriptionPendingChange {
984
+ /** Subscription for which a pending update is triggered. */
985
+ subscription?: Subscription;
986
+ }
987
+ interface Empty {
988
+ }
989
+ interface ProductInstanceUpdated {
990
+ /** Updated package. */
991
+ package?: Package;
992
+ /**
993
+ * ID of the product instance that was adjusted.
994
+ * @readonly
995
+ */
996
+ productInstanceId?: string;
997
+ }
998
+ interface DomainEvent extends DomainEventBodyOneOf {
999
+ createdEvent?: EntityCreatedEvent;
1000
+ updatedEvent?: EntityUpdatedEvent;
1001
+ deletedEvent?: EntityDeletedEvent;
1002
+ actionEvent?: ActionEvent;
1003
+ /**
1004
+ * Unique event ID.
1005
+ * Allows clients to ignore duplicate webhooks.
1006
+ */
1007
+ _id?: string;
1008
+ /**
1009
+ * Assumes actions are also always typed to an entity_type
1010
+ * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
1011
+ */
1012
+ entityFqdn?: string;
1013
+ /**
1014
+ * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
1015
+ * This is although the created/updated/deleted notion is duplication of the oneof types
1016
+ * Example: created/updated/deleted/started/completed/email_opened
1017
+ */
1018
+ slug?: string;
1019
+ /** ID of the entity associated with the event. */
1020
+ entityId?: string;
1021
+ /** Event timestamp. */
1022
+ eventTime?: Date;
1023
+ /**
1024
+ * Whether the event was triggered as a result of a privacy regulation application
1025
+ * (for example, GDPR).
1026
+ */
1027
+ triggeredByAnonymizeRequest?: boolean | null;
1028
+ /** If present, indicates the action that triggered the event. */
1029
+ originatedFrom?: string | null;
1030
+ /**
1031
+ * A sequence number defining the order of updates to the underlying entity.
1032
+ * For example, given that some entity was updated at 16:00 and than again at 16:01,
1033
+ * it is guaranteed that the sequence number of the second update is strictly higher than the first.
1034
+ * As the consumer, you can use this value to ensure that you handle messages in the correct order.
1035
+ * To do so, you will need to persist this number on your end, and compare the sequence number from the
1036
+ * message against the one you have stored. Given that the stored number is higher, you should ignore the message.
1037
+ */
1038
+ entityEventSequence?: string | null;
1039
+ }
1040
+ /** @oneof */
1041
+ interface DomainEventBodyOneOf {
1042
+ createdEvent?: EntityCreatedEvent;
1043
+ updatedEvent?: EntityUpdatedEvent;
1044
+ deletedEvent?: EntityDeletedEvent;
1045
+ actionEvent?: ActionEvent;
1046
+ }
1047
+ interface EntityCreatedEvent {
1048
+ entity?: string;
1049
+ }
1050
+ interface EntityUpdatedEvent {
1051
+ /**
1052
+ * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
1053
+ * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
1054
+ * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
1055
+ */
1056
+ currentEntity?: string;
1057
+ }
1058
+ interface EntityDeletedEvent {
1059
+ /** Entity that was deleted */
1060
+ deletedEntity?: string | null;
1061
+ }
1062
+ interface ActionEvent {
1063
+ body?: string;
1064
+ }
1065
+ interface FailureReportRequest {
1066
+ /** ID of the product instance that failed. */
1067
+ instanceId?: string;
1068
+ /** Failure reason. */
1069
+ reason?: FailureReason;
1070
+ }
1071
+ interface ProductInstanceFailed {
1072
+ /** Updated package. */
1073
+ package?: Package;
1074
+ /**
1075
+ * ID of the product instance that `FAILED`.
1076
+ * @readonly
1077
+ */
1078
+ productInstanceId?: string;
1079
+ /** Failure reason. */
1080
+ reason?: FailureReason;
1081
+ }
1082
+ interface Task {
1083
+ key?: TaskKey;
1084
+ executeAt?: Date;
1085
+ payload?: string | null;
1086
+ }
1087
+ interface TaskKey {
1088
+ appId?: string;
1089
+ instanceId?: string;
1090
+ subjectId?: string | null;
1091
+ }
1092
+ interface TaskAction extends TaskActionActionOneOf {
1093
+ complete?: Complete;
1094
+ cancel?: Cancel;
1095
+ reschedule?: Reschedule;
1096
+ }
1097
+ /** @oneof */
1098
+ interface TaskActionActionOneOf {
1099
+ complete?: Complete;
1100
+ cancel?: Cancel;
1101
+ reschedule?: Reschedule;
1102
+ }
1103
+ interface Complete {
1104
+ }
1105
+ interface Cancel {
1106
+ }
1107
+ interface Reschedule {
1108
+ executeAt?: Date;
1109
+ payload?: string | null;
1110
+ }
1111
+ interface UpdateProductInstanceRequest {
1112
+ /** ID of the product instance to update. */
1113
+ instanceId?: string;
1114
+ status?: Status;
1115
+ countryCode?: string | null;
1116
+ /** Which field to update, currently only status and countryCode are supported. */
1117
+ fieldToUpdate?: FieldToUpdate;
1118
+ }
1119
+ declare enum FieldToUpdate {
1120
+ STATUS = "STATUS",
1121
+ COUNTRY_CODE = "COUNTRY_CODE"
1122
+ }
1123
+ interface UpdateProductInstanceResponse {
1124
+ productInstance?: ProductInstance;
1125
+ }
1126
+ interface CountPackagesRequest {
1127
+ filter?: Record<string, any> | null;
1128
+ }
1129
+ interface CountPackagesResponse {
1130
+ count?: number;
1131
+ }
1132
+ interface MessageEnvelope {
1133
+ /** App instance ID. */
1134
+ instanceId?: string | null;
1135
+ /** Event type. */
1136
+ eventType?: string;
1137
+ /** The identification type and identity data. */
1138
+ identity?: IdentificationData;
1139
+ /** Stringify payload. */
1140
+ data?: string;
1141
+ }
1142
+ interface IdentificationData extends IdentificationDataIdOneOf {
1143
+ /** ID of a site visitor that has not logged in to the site. */
1144
+ anonymousVisitorId?: string;
1145
+ /** ID of a site visitor that has logged in to the site. */
1146
+ memberId?: string;
1147
+ /** ID of a Wix user (site owner, contributor, etc.). */
1148
+ wixUserId?: string;
1149
+ /** ID of an app. */
1150
+ appId?: string;
1151
+ /** @readonly */
1152
+ identityType?: WebhookIdentityType;
1153
+ }
1154
+ /** @oneof */
1155
+ interface IdentificationDataIdOneOf {
1156
+ /** ID of a site visitor that has not logged in to the site. */
1157
+ anonymousVisitorId?: string;
1158
+ /** ID of a site visitor that has logged in to the site. */
1159
+ memberId?: string;
1160
+ /** ID of a Wix user (site owner, contributor, etc.). */
1161
+ wixUserId?: string;
1162
+ /** ID of an app. */
1163
+ appId?: string;
1164
+ }
1165
+ declare enum WebhookIdentityType {
1166
+ UNKNOWN = "UNKNOWN",
1167
+ ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
1168
+ MEMBER = "MEMBER",
1169
+ WIX_USER = "WIX_USER",
1170
+ APP = "APP"
1171
+ }
1172
+ interface CreatePackageResponseNonNullableFields {
1173
+ package?: {
1174
+ _id: string;
1175
+ accountId: string;
1176
+ productInstances: {
1177
+ billingInfo?: {
1178
+ type: CycleDescriptorType;
1179
+ cycleDuration?: {
1180
+ unit: IntervalIntervalUnit;
1181
+ count: number;
1182
+ };
1183
+ };
1184
+ instanceId: string;
1185
+ catalogProductId: string;
1186
+ status: Status;
1187
+ failure?: {
1188
+ code: FailureReasonFailureReason;
1189
+ message: string;
1190
+ };
1191
+ }[];
1192
+ };
1193
+ }
1194
+ interface CancelPackageResponseNonNullableFields {
1195
+ package?: {
1196
+ _id: string;
1197
+ accountId: string;
1198
+ productInstances: {
1199
+ billingInfo?: {
1200
+ type: CycleDescriptorType;
1201
+ cycleDuration?: {
1202
+ unit: IntervalIntervalUnit;
1203
+ count: number;
1204
+ };
1205
+ };
1206
+ instanceId: string;
1207
+ catalogProductId: string;
1208
+ status: Status;
1209
+ failure?: {
1210
+ code: FailureReasonFailureReason;
1211
+ message: string;
1212
+ };
1213
+ }[];
1214
+ };
1215
+ }
1216
+ interface GetPackageResponseNonNullableFields {
1217
+ package?: {
1218
+ _id: string;
1219
+ accountId: string;
1220
+ productInstances: {
1221
+ billingInfo?: {
1222
+ type: CycleDescriptorType;
1223
+ cycleDuration?: {
1224
+ unit: IntervalIntervalUnit;
1225
+ count: number;
1226
+ };
1227
+ };
1228
+ instanceId: string;
1229
+ catalogProductId: string;
1230
+ status: Status;
1231
+ failure?: {
1232
+ code: FailureReasonFailureReason;
1233
+ message: string;
1234
+ };
1235
+ }[];
1236
+ };
1237
+ }
1238
+ interface QueryPackagesResponseNonNullableFields {
1239
+ packages: {
1240
+ _id: string;
1241
+ accountId: string;
1242
+ productInstances: {
1243
+ billingInfo?: {
1244
+ type: CycleDescriptorType;
1245
+ cycleDuration?: {
1246
+ unit: IntervalIntervalUnit;
1247
+ count: number;
1248
+ };
1249
+ };
1250
+ instanceId: string;
1251
+ catalogProductId: string;
1252
+ status: Status;
1253
+ failure?: {
1254
+ code: FailureReasonFailureReason;
1255
+ message: string;
1256
+ };
1257
+ }[];
1258
+ }[];
1259
+ }
1260
+ interface AssignProductInstanceToSiteResponseNonNullableFields {
1261
+ package?: {
1262
+ _id: string;
1263
+ accountId: string;
1264
+ productInstances: {
1265
+ billingInfo?: {
1266
+ type: CycleDescriptorType;
1267
+ cycleDuration?: {
1268
+ unit: IntervalIntervalUnit;
1269
+ count: number;
1270
+ };
1271
+ };
1272
+ instanceId: string;
1273
+ catalogProductId: string;
1274
+ status: Status;
1275
+ failure?: {
1276
+ code: FailureReasonFailureReason;
1277
+ message: string;
1278
+ };
1279
+ }[];
1280
+ };
1281
+ }
1282
+ interface UnassignProductInstanceFromSiteResponseNonNullableFields {
1283
+ package?: {
1284
+ _id: string;
1285
+ accountId: string;
1286
+ productInstances: {
1287
+ billingInfo?: {
1288
+ type: CycleDescriptorType;
1289
+ cycleDuration?: {
1290
+ unit: IntervalIntervalUnit;
1291
+ count: number;
1292
+ };
1293
+ };
1294
+ instanceId: string;
1295
+ catalogProductId: string;
1296
+ status: Status;
1297
+ failure?: {
1298
+ code: FailureReasonFailureReason;
1299
+ message: string;
1300
+ };
1301
+ }[];
1302
+ };
1303
+ }
1304
+ interface CancelProductInstanceResponseNonNullableFields {
1305
+ package?: {
1306
+ _id: string;
1307
+ accountId: string;
1308
+ productInstances: {
1309
+ billingInfo?: {
1310
+ type: CycleDescriptorType;
1311
+ cycleDuration?: {
1312
+ unit: IntervalIntervalUnit;
1313
+ count: number;
1314
+ };
1315
+ };
1316
+ instanceId: string;
1317
+ catalogProductId: string;
1318
+ status: Status;
1319
+ failure?: {
1320
+ code: FailureReasonFailureReason;
1321
+ message: string;
1322
+ };
1323
+ }[];
1324
+ };
1325
+ }
1326
+ interface AdjustProductInstanceSpecificationsResponseNonNullableFields {
1327
+ package?: {
1328
+ _id: string;
1329
+ accountId: string;
1330
+ productInstances: {
1331
+ billingInfo?: {
1332
+ type: CycleDescriptorType;
1333
+ cycleDuration?: {
1334
+ unit: IntervalIntervalUnit;
1335
+ count: number;
1336
+ };
1337
+ };
1338
+ instanceId: string;
1339
+ catalogProductId: string;
1340
+ status: Status;
1341
+ failure?: {
1342
+ code: FailureReasonFailureReason;
1343
+ message: string;
1344
+ };
1345
+ }[];
1346
+ };
1347
+ }
1348
+ interface CreatePackageOptions {
1349
+ /** Idempotency key. */
1350
+ idempotencyKey?: string | null;
1351
+ /** External reference. For example, an external subscription ID. **Note:** This field is not validated by Wix. */
1352
+ externalId?: string | null;
1353
+ /** Wix services that are resold. */
1354
+ products: ProductInstance[];
1355
+ }
1356
+ interface CreatePackageV2Options {
1357
+ /** Idempotency key. */
1358
+ idempotencyKey?: string | null;
1359
+ /** External reference. For example, an external subscription ID. **Note:** This field is not validated by Wix. */
1360
+ externalId?: string | null;
1361
+ /** Wix services that are resold. */
1362
+ products: ProductInstance[];
1363
+ }
1364
+ interface CancelPackageOptions {
1365
+ /** Idempotency key. */
1366
+ idempotencyKey?: string | null;
1367
+ }
1368
+ interface AssignProductInstanceToSiteIdentifiers {
1369
+ /** ID of the product instance to assign to a site. */
1370
+ instanceId: string;
1371
+ /** ID of the site to which the product instance is assigned. */
1372
+ siteId: string;
1373
+ }
1374
+ interface AssignProductInstanceToSiteOptions {
1375
+ /** Idempotency key. */
1376
+ idempotencyKey?: string | null;
1377
+ }
1378
+ interface UnassignProductInstanceFromSiteOptions {
1379
+ /** Idempotency key. */
1380
+ idempotencyKey?: string | null;
1381
+ }
1382
+ interface CancelProductInstanceOptions {
1383
+ /** Idempotency key. */
1384
+ idempotencyKey?: string | null;
1385
+ }
1386
+ interface AdjustProductInstanceSpecificationsOptions {
1387
+ /** Idempotency key. */
1388
+ idempotencyKey?: string | null;
1389
+ /**
1390
+ * ID of the product to replace the original instance. Required in case you don't
1391
+ * provide a new `billingInfo` object.
1392
+ */
1393
+ catalogProductId?: string | null;
1394
+ /**
1395
+ * Information about the billing cycle. Required in case you don't provide a new
1396
+ * `catalogProductId`. The new billing cycle must be supported for the service.
1397
+ * Contact the [Wix B2B sales team](mailto:bizdev@wix.com) for
1398
+ * information about a service's supported billing cycles. If
1399
+ * you adjust the billing cycle for a product instance with `RECURRING`
1400
+ * payments, you must also provide `billingInfo.cycleDuration.unit`.
1401
+ */
1402
+ billingInfo?: ProductInstanceCycle;
1403
+ /**
1404
+ * Discount code indicating that the reseller provisioned the product instance
1405
+ * during a sale. Ignored when you don't pass a new `catalogProductId` as well.
1406
+ * In case you pass a code that isn't valid, the call succeeds and
1407
+ * no discount is applied to the product instance. Wix doesn't guarantee that a
1408
+ * discount code reduces the price between Wix and the reseller, even when it's
1409
+ * valid. You can't add a discount code after you've created the
1410
+ * product instance. Contact the [Wix B2B sales team](mailto:bizdev@wix.com) for
1411
+ * more information about supported codes.
1412
+ *
1413
+ * Max: 25 characters
1414
+ */
1415
+ discountCode?: string | null;
1416
+ }
1417
+
1418
+ interface HttpClient {
1419
+ request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
1420
+ }
1421
+ type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
1422
+ type HttpResponse<T = any> = {
1423
+ data: T;
1424
+ status: number;
1425
+ statusText: string;
1426
+ headers: any;
1427
+ request?: any;
1428
+ };
1429
+ type RequestOptions<_TResponse = any, Data = any> = {
1430
+ method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
1431
+ url: string;
1432
+ data?: Data;
1433
+ params?: URLSearchParams;
1434
+ } & APIMetadata;
1435
+ type APIMetadata = {
1436
+ methodFqn?: string;
1437
+ entityFqdn?: string;
1438
+ packageName?: string;
1439
+ };
1440
+
1441
+ declare const __metadata: {
1442
+ PACKAGE_NAME: string;
1443
+ };
1444
+ declare function createPackage(httpClient: HttpClient): (options?: CreatePackageOptions) => Promise<CreatePackageResponse & CreatePackageResponseNonNullableFields>;
1445
+ declare function createPackageV2(httpClient: HttpClient): (options?: CreatePackageV2Options) => Promise<CreatePackageResponse & CreatePackageResponseNonNullableFields>;
1446
+ declare function cancelPackage(httpClient: HttpClient): (_id: string, options?: CancelPackageOptions) => Promise<CancelPackageResponse & CancelPackageResponseNonNullableFields>;
1447
+ declare function getPackage(httpClient: HttpClient): (_id: string) => Promise<GetPackageResponse & GetPackageResponseNonNullableFields>;
1448
+ declare function queryPackages(httpClient: HttpClient): (query: QueryV2) => Promise<QueryPackagesResponse & QueryPackagesResponseNonNullableFields>;
1449
+ declare function assignProductInstanceToSite(httpClient: HttpClient): (identifiers: AssignProductInstanceToSiteIdentifiers, options?: AssignProductInstanceToSiteOptions) => Promise<AssignProductInstanceToSiteResponse & AssignProductInstanceToSiteResponseNonNullableFields>;
1450
+ declare function unassignProductInstanceFromSite(httpClient: HttpClient): (instanceId: string, options?: UnassignProductInstanceFromSiteOptions) => Promise<UnassignProductInstanceFromSiteResponse & UnassignProductInstanceFromSiteResponseNonNullableFields>;
1451
+ declare function cancelProductInstance(httpClient: HttpClient): (instanceId: string, options?: CancelProductInstanceOptions) => Promise<CancelProductInstanceResponse & CancelProductInstanceResponseNonNullableFields>;
1452
+ declare function adjustProductInstanceSpecifications(httpClient: HttpClient): (instanceId: string, options?: AdjustProductInstanceSpecificationsOptions) => Promise<AdjustProductInstanceSpecificationsResponse & AdjustProductInstanceSpecificationsResponseNonNullableFields>;
1453
+
1454
+ type index_d_ActionEvent = ActionEvent;
1455
+ type index_d_AdjustProductInstanceSpecificationsOptions = AdjustProductInstanceSpecificationsOptions;
1456
+ type index_d_AdjustProductInstanceSpecificationsRequest = AdjustProductInstanceSpecificationsRequest;
1457
+ type index_d_AdjustProductInstanceSpecificationsResponse = AdjustProductInstanceSpecificationsResponse;
1458
+ type index_d_AdjustProductInstanceSpecificationsResponseNonNullableFields = AdjustProductInstanceSpecificationsResponseNonNullableFields;
1459
+ type index_d_AdjustedProductInstanceSpecifications = AdjustedProductInstanceSpecifications;
1460
+ type index_d_AssignProductInstanceToSiteIdentifiers = AssignProductInstanceToSiteIdentifiers;
1461
+ type index_d_AssignProductInstanceToSiteOptions = AssignProductInstanceToSiteOptions;
1462
+ type index_d_AssignProductInstanceToSiteRequest = AssignProductInstanceToSiteRequest;
1463
+ type index_d_AssignProductInstanceToSiteResponse = AssignProductInstanceToSiteResponse;
1464
+ type index_d_AssignProductInstanceToSiteResponseNonNullableFields = AssignProductInstanceToSiteResponseNonNullableFields;
1465
+ type index_d_AssignedProductInstanceToSite = AssignedProductInstanceToSite;
1466
+ type index_d_BillingReference = BillingReference;
1467
+ type index_d_Cancel = Cancel;
1468
+ type index_d_CancelPackageOptions = CancelPackageOptions;
1469
+ type index_d_CancelPackageRequest = CancelPackageRequest;
1470
+ type index_d_CancelPackageResponse = CancelPackageResponse;
1471
+ type index_d_CancelPackageResponseNonNullableFields = CancelPackageResponseNonNullableFields;
1472
+ type index_d_CancelProductInstanceOptions = CancelProductInstanceOptions;
1473
+ type index_d_CancelProductInstanceRequest = CancelProductInstanceRequest;
1474
+ type index_d_CancelProductInstanceResponse = CancelProductInstanceResponse;
1475
+ type index_d_CancelProductInstanceResponseNonNullableFields = CancelProductInstanceResponseNonNullableFields;
1476
+ type index_d_CancellationDetails = CancellationDetails;
1477
+ type index_d_Complete = Complete;
1478
+ type index_d_ContractSwitchReason = ContractSwitchReason;
1479
+ declare const index_d_ContractSwitchReason: typeof ContractSwitchReason;
1480
+ type index_d_ContractSwitchType = ContractSwitchType;
1481
+ declare const index_d_ContractSwitchType: typeof ContractSwitchType;
1482
+ type index_d_ContractSwitched = ContractSwitched;
1483
+ type index_d_CountPackagesRequest = CountPackagesRequest;
1484
+ type index_d_CountPackagesResponse = CountPackagesResponse;
1485
+ type index_d_CreatePackageOptions = CreatePackageOptions;
1486
+ type index_d_CreatePackageRequest = CreatePackageRequest;
1487
+ type index_d_CreatePackageResponse = CreatePackageResponse;
1488
+ type index_d_CreatePackageResponseNonNullableFields = CreatePackageResponseNonNullableFields;
1489
+ type index_d_CreatePackageV2Options = CreatePackageV2Options;
1490
+ type index_d_CursorPaging = CursorPaging;
1491
+ type index_d_Cursors = Cursors;
1492
+ type index_d_Cycle = Cycle;
1493
+ type index_d_CycleCycleSelectorOneOf = CycleCycleSelectorOneOf;
1494
+ type index_d_CycleDescriptorType = CycleDescriptorType;
1495
+ declare const index_d_CycleDescriptorType: typeof CycleDescriptorType;
1496
+ type index_d_CycleInterval = CycleInterval;
1497
+ type index_d_DomainEvent = DomainEvent;
1498
+ type index_d_DomainEventBodyOneOf = DomainEventBodyOneOf;
1499
+ type index_d_Empty = Empty;
1500
+ type index_d_EntityCreatedEvent = EntityCreatedEvent;
1501
+ type index_d_EntityDeletedEvent = EntityDeletedEvent;
1502
+ type index_d_EntityUpdatedEvent = EntityUpdatedEvent;
1503
+ type index_d_FailureReason = FailureReason;
1504
+ type index_d_FailureReasonFailureReason = FailureReasonFailureReason;
1505
+ declare const index_d_FailureReasonFailureReason: typeof FailureReasonFailureReason;
1506
+ type index_d_FailureReportRequest = FailureReportRequest;
1507
+ type index_d_FieldToUpdate = FieldToUpdate;
1508
+ declare const index_d_FieldToUpdate: typeof FieldToUpdate;
1509
+ type index_d_GetPackageRequest = GetPackageRequest;
1510
+ type index_d_GetPackageResponse = GetPackageResponse;
1511
+ type index_d_GetPackageResponseNonNullableFields = GetPackageResponseNonNullableFields;
1512
+ type index_d_IdentificationData = IdentificationData;
1513
+ type index_d_IdentificationDataIdOneOf = IdentificationDataIdOneOf;
1514
+ type index_d_Initiator = Initiator;
1515
+ declare const index_d_Initiator: typeof Initiator;
1516
+ type index_d_Interval = Interval;
1517
+ type index_d_IntervalIntervalUnit = IntervalIntervalUnit;
1518
+ declare const index_d_IntervalIntervalUnit: typeof IntervalIntervalUnit;
1519
+ type index_d_IntervalUnit = IntervalUnit;
1520
+ declare const index_d_IntervalUnit: typeof IntervalUnit;
1521
+ type index_d_MessageEnvelope = MessageEnvelope;
1522
+ type index_d_MigrateSubscriptionToPackagesRequest = MigrateSubscriptionToPackagesRequest;
1523
+ type index_d_MigrateSubscriptionToPackagesResponse = MigrateSubscriptionToPackagesResponse;
1524
+ type index_d_OneTime = OneTime;
1525
+ type index_d_Package = Package;
1526
+ type index_d_PackageCanceled = PackageCanceled;
1527
+ type index_d_Paging = Paging;
1528
+ type index_d_PagingMetadataV2 = PagingMetadataV2;
1529
+ type index_d_PriceIncreaseTrigger = PriceIncreaseTrigger;
1530
+ declare const index_d_PriceIncreaseTrigger: typeof PriceIncreaseTrigger;
1531
+ type index_d_ProductAdjustment = ProductAdjustment;
1532
+ declare const index_d_ProductAdjustment: typeof ProductAdjustment;
1533
+ type index_d_ProductInstance = ProductInstance;
1534
+ type index_d_ProductInstanceCanceled = ProductInstanceCanceled;
1535
+ type index_d_ProductInstanceContractDetailsOneOf = ProductInstanceContractDetailsOneOf;
1536
+ type index_d_ProductInstanceCycle = ProductInstanceCycle;
1537
+ type index_d_ProductInstanceFailed = ProductInstanceFailed;
1538
+ type index_d_ProductInstanceUpdated = ProductInstanceUpdated;
1539
+ type index_d_ProductPriceIncreaseData = ProductPriceIncreaseData;
1540
+ type index_d_ProviderName = ProviderName;
1541
+ declare const index_d_ProviderName: typeof ProviderName;
1542
+ type index_d_QueryPackagesRequest = QueryPackagesRequest;
1543
+ type index_d_QueryPackagesResponse = QueryPackagesResponse;
1544
+ type index_d_QueryPackagesResponseNonNullableFields = QueryPackagesResponseNonNullableFields;
1545
+ type index_d_QueryV2 = QueryV2;
1546
+ type index_d_QueryV2PagingMethodOneOf = QueryV2PagingMethodOneOf;
1547
+ type index_d_ReactivationData = ReactivationData;
1548
+ type index_d_ReactivationReasonEnum = ReactivationReasonEnum;
1549
+ declare const index_d_ReactivationReasonEnum: typeof ReactivationReasonEnum;
1550
+ type index_d_RecurringChargeSucceeded = RecurringChargeSucceeded;
1551
+ type index_d_Reschedule = Reschedule;
1552
+ type index_d_SortOrder = SortOrder;
1553
+ declare const index_d_SortOrder: typeof SortOrder;
1554
+ type index_d_Sorting = Sorting;
1555
+ type index_d_Status = Status;
1556
+ declare const index_d_Status: typeof Status;
1557
+ type index_d_Subscription = Subscription;
1558
+ type index_d_SubscriptionAssigned = SubscriptionAssigned;
1559
+ type index_d_SubscriptionAutoRenewTurnedOff = SubscriptionAutoRenewTurnedOff;
1560
+ type index_d_SubscriptionAutoRenewTurnedOn = SubscriptionAutoRenewTurnedOn;
1561
+ type index_d_SubscriptionCancelled = SubscriptionCancelled;
1562
+ type index_d_SubscriptionCreated = SubscriptionCreated;
1563
+ type index_d_SubscriptionEvent = SubscriptionEvent;
1564
+ type index_d_SubscriptionEventEventOneOf = SubscriptionEventEventOneOf;
1565
+ type index_d_SubscriptionNearEndOfPeriod = SubscriptionNearEndOfPeriod;
1566
+ type index_d_SubscriptionPendingChange = SubscriptionPendingChange;
1567
+ type index_d_SubscriptionStatus = SubscriptionStatus;
1568
+ declare const index_d_SubscriptionStatus: typeof SubscriptionStatus;
1569
+ type index_d_SubscriptionTransferred = SubscriptionTransferred;
1570
+ type index_d_SubscriptionUnassigned = SubscriptionUnassigned;
1571
+ type index_d_Task = Task;
1572
+ type index_d_TaskAction = TaskAction;
1573
+ type index_d_TaskActionActionOneOf = TaskActionActionOneOf;
1574
+ type index_d_TaskKey = TaskKey;
1575
+ type index_d_UnassignProductInstanceFromSiteOptions = UnassignProductInstanceFromSiteOptions;
1576
+ type index_d_UnassignProductInstanceFromSiteRequest = UnassignProductInstanceFromSiteRequest;
1577
+ type index_d_UnassignProductInstanceFromSiteResponse = UnassignProductInstanceFromSiteResponse;
1578
+ type index_d_UnassignProductInstanceFromSiteResponseNonNullableFields = UnassignProductInstanceFromSiteResponseNonNullableFields;
1579
+ type index_d_UnassignReason = UnassignReason;
1580
+ declare const index_d_UnassignReason: typeof UnassignReason;
1581
+ type index_d_UnassignedProductInstanceFromSite = UnassignedProductInstanceFromSite;
1582
+ type index_d_UpdateProductInstanceRequest = UpdateProductInstanceRequest;
1583
+ type index_d_UpdateProductInstanceResponse = UpdateProductInstanceResponse;
1584
+ type index_d_WebhookIdentityType = WebhookIdentityType;
1585
+ declare const index_d_WebhookIdentityType: typeof WebhookIdentityType;
1586
+ declare const index_d___metadata: typeof __metadata;
1587
+ declare const index_d_adjustProductInstanceSpecifications: typeof adjustProductInstanceSpecifications;
1588
+ declare const index_d_assignProductInstanceToSite: typeof assignProductInstanceToSite;
1589
+ declare const index_d_cancelPackage: typeof cancelPackage;
1590
+ declare const index_d_cancelProductInstance: typeof cancelProductInstance;
1591
+ declare const index_d_createPackage: typeof createPackage;
1592
+ declare const index_d_createPackageV2: typeof createPackageV2;
1593
+ declare const index_d_getPackage: typeof getPackage;
1594
+ declare const index_d_queryPackages: typeof queryPackages;
1595
+ declare const index_d_unassignProductInstanceFromSite: typeof unassignProductInstanceFromSite;
1596
+ declare namespace index_d {
1597
+ export { type index_d_ActionEvent as ActionEvent, type index_d_AdjustProductInstanceSpecificationsOptions as AdjustProductInstanceSpecificationsOptions, type index_d_AdjustProductInstanceSpecificationsRequest as AdjustProductInstanceSpecificationsRequest, type index_d_AdjustProductInstanceSpecificationsResponse as AdjustProductInstanceSpecificationsResponse, type index_d_AdjustProductInstanceSpecificationsResponseNonNullableFields as AdjustProductInstanceSpecificationsResponseNonNullableFields, type index_d_AdjustedProductInstanceSpecifications as AdjustedProductInstanceSpecifications, type index_d_AssignProductInstanceToSiteIdentifiers as AssignProductInstanceToSiteIdentifiers, type index_d_AssignProductInstanceToSiteOptions as AssignProductInstanceToSiteOptions, type index_d_AssignProductInstanceToSiteRequest as AssignProductInstanceToSiteRequest, type index_d_AssignProductInstanceToSiteResponse as AssignProductInstanceToSiteResponse, type index_d_AssignProductInstanceToSiteResponseNonNullableFields as AssignProductInstanceToSiteResponseNonNullableFields, type index_d_AssignedProductInstanceToSite as AssignedProductInstanceToSite, type index_d_BillingReference as BillingReference, type index_d_Cancel as Cancel, type index_d_CancelPackageOptions as CancelPackageOptions, type index_d_CancelPackageRequest as CancelPackageRequest, type index_d_CancelPackageResponse as CancelPackageResponse, type index_d_CancelPackageResponseNonNullableFields as CancelPackageResponseNonNullableFields, type index_d_CancelProductInstanceOptions as CancelProductInstanceOptions, type index_d_CancelProductInstanceRequest as CancelProductInstanceRequest, type index_d_CancelProductInstanceResponse as CancelProductInstanceResponse, type index_d_CancelProductInstanceResponseNonNullableFields as CancelProductInstanceResponseNonNullableFields, type index_d_CancellationDetails as CancellationDetails, type index_d_Complete as Complete, index_d_ContractSwitchReason as ContractSwitchReason, index_d_ContractSwitchType as ContractSwitchType, type index_d_ContractSwitched as ContractSwitched, type index_d_CountPackagesRequest as CountPackagesRequest, type index_d_CountPackagesResponse as CountPackagesResponse, type index_d_CreatePackageOptions as CreatePackageOptions, type index_d_CreatePackageRequest as CreatePackageRequest, type index_d_CreatePackageResponse as CreatePackageResponse, type index_d_CreatePackageResponseNonNullableFields as CreatePackageResponseNonNullableFields, type index_d_CreatePackageV2Options as CreatePackageV2Options, type index_d_CursorPaging as CursorPaging, type index_d_Cursors as Cursors, type index_d_Cycle as Cycle, type index_d_CycleCycleSelectorOneOf as CycleCycleSelectorOneOf, index_d_CycleDescriptorType as CycleDescriptorType, type index_d_CycleInterval as CycleInterval, type index_d_DomainEvent as DomainEvent, type index_d_DomainEventBodyOneOf as DomainEventBodyOneOf, type index_d_Empty as Empty, type index_d_EntityCreatedEvent as EntityCreatedEvent, type index_d_EntityDeletedEvent as EntityDeletedEvent, type index_d_EntityUpdatedEvent as EntityUpdatedEvent, type index_d_FailureReason as FailureReason, index_d_FailureReasonFailureReason as FailureReasonFailureReason, type index_d_FailureReportRequest as FailureReportRequest, index_d_FieldToUpdate as FieldToUpdate, type index_d_GetPackageRequest as GetPackageRequest, type index_d_GetPackageResponse as GetPackageResponse, type index_d_GetPackageResponseNonNullableFields as GetPackageResponseNonNullableFields, type index_d_IdentificationData as IdentificationData, type index_d_IdentificationDataIdOneOf as IdentificationDataIdOneOf, index_d_Initiator as Initiator, type index_d_Interval as Interval, index_d_IntervalIntervalUnit as IntervalIntervalUnit, index_d_IntervalUnit as IntervalUnit, type index_d_MessageEnvelope as MessageEnvelope, type index_d_MigrateSubscriptionToPackagesRequest as MigrateSubscriptionToPackagesRequest, type index_d_MigrateSubscriptionToPackagesResponse as MigrateSubscriptionToPackagesResponse, type index_d_OneTime as OneTime, type index_d_Package as Package, type index_d_PackageCanceled as PackageCanceled, type index_d_Paging as Paging, type index_d_PagingMetadataV2 as PagingMetadataV2, index_d_PriceIncreaseTrigger as PriceIncreaseTrigger, index_d_ProductAdjustment as ProductAdjustment, type index_d_ProductInstance as ProductInstance, type index_d_ProductInstanceCanceled as ProductInstanceCanceled, type index_d_ProductInstanceContractDetailsOneOf as ProductInstanceContractDetailsOneOf, type index_d_ProductInstanceCycle as ProductInstanceCycle, type index_d_ProductInstanceFailed as ProductInstanceFailed, type index_d_ProductInstanceUpdated as ProductInstanceUpdated, type index_d_ProductPriceIncreaseData as ProductPriceIncreaseData, index_d_ProviderName as ProviderName, type index_d_QueryPackagesRequest as QueryPackagesRequest, type index_d_QueryPackagesResponse as QueryPackagesResponse, type index_d_QueryPackagesResponseNonNullableFields as QueryPackagesResponseNonNullableFields, type index_d_QueryV2 as QueryV2, type index_d_QueryV2PagingMethodOneOf as QueryV2PagingMethodOneOf, type index_d_ReactivationData as ReactivationData, index_d_ReactivationReasonEnum as ReactivationReasonEnum, type index_d_RecurringChargeSucceeded as RecurringChargeSucceeded, type index_d_Reschedule as Reschedule, index_d_SortOrder as SortOrder, type index_d_Sorting as Sorting, index_d_Status as Status, type index_d_Subscription as Subscription, type index_d_SubscriptionAssigned as SubscriptionAssigned, type index_d_SubscriptionAutoRenewTurnedOff as SubscriptionAutoRenewTurnedOff, type index_d_SubscriptionAutoRenewTurnedOn as SubscriptionAutoRenewTurnedOn, type index_d_SubscriptionCancelled as SubscriptionCancelled, type index_d_SubscriptionCreated as SubscriptionCreated, type index_d_SubscriptionEvent as SubscriptionEvent, type index_d_SubscriptionEventEventOneOf as SubscriptionEventEventOneOf, type index_d_SubscriptionNearEndOfPeriod as SubscriptionNearEndOfPeriod, type index_d_SubscriptionPendingChange as SubscriptionPendingChange, index_d_SubscriptionStatus as SubscriptionStatus, type index_d_SubscriptionTransferred as SubscriptionTransferred, type index_d_SubscriptionUnassigned as SubscriptionUnassigned, type index_d_Task as Task, type index_d_TaskAction as TaskAction, type index_d_TaskActionActionOneOf as TaskActionActionOneOf, type index_d_TaskKey as TaskKey, type index_d_UnassignProductInstanceFromSiteOptions as UnassignProductInstanceFromSiteOptions, type index_d_UnassignProductInstanceFromSiteRequest as UnassignProductInstanceFromSiteRequest, type index_d_UnassignProductInstanceFromSiteResponse as UnassignProductInstanceFromSiteResponse, type index_d_UnassignProductInstanceFromSiteResponseNonNullableFields as UnassignProductInstanceFromSiteResponseNonNullableFields, index_d_UnassignReason as UnassignReason, type index_d_UnassignedProductInstanceFromSite as UnassignedProductInstanceFromSite, type index_d_UpdateProductInstanceRequest as UpdateProductInstanceRequest, type index_d_UpdateProductInstanceResponse as UpdateProductInstanceResponse, index_d_WebhookIdentityType as WebhookIdentityType, index_d___metadata as __metadata, index_d_adjustProductInstanceSpecifications as adjustProductInstanceSpecifications, index_d_assignProductInstanceToSite as assignProductInstanceToSite, index_d_cancelPackage as cancelPackage, index_d_cancelProductInstance as cancelProductInstance, index_d_createPackage as createPackage, index_d_createPackageV2 as createPackageV2, index_d_getPackage as getPackage, index_d_queryPackages as queryPackages, index_d_unassignProductInstanceFromSite as unassignProductInstanceFromSite };
1598
+ }
1599
+
1600
+ export { index_d as packages };