@wix/auto_sdk_packages_packages 1.0.7 → 1.0.8
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.
- package/build/cjs/index.d.ts +1 -1
- package/build/cjs/index.js +39 -0
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +11 -1
- package/build/cjs/index.typings.js +39 -0
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +934 -1
- package/build/cjs/meta.js +195 -0
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +1 -1
- package/build/es/index.mjs +38 -0
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +11 -1
- package/build/es/index.typings.mjs +38 -0
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +934 -1
- package/build/es/meta.mjs +177 -0
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +1 -1
- package/build/internal/cjs/index.js +39 -0
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +11 -1
- package/build/internal/cjs/index.typings.js +39 -0
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +934 -1
- package/build/internal/cjs/meta.js +195 -0
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.d.mts +1 -1
- package/build/internal/es/index.mjs +38 -0
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +11 -1
- package/build/internal/es/index.typings.mjs +38 -0
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +934 -1
- package/build/internal/es/meta.mjs +177 -0
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +3 -3
package/build/cjs/meta.d.ts
CHANGED
|
@@ -254,6 +254,10 @@ interface CancelPackageResponse {
|
|
|
254
254
|
/** Canceled package. */
|
|
255
255
|
package?: Package;
|
|
256
256
|
}
|
|
257
|
+
interface PackageCanceled {
|
|
258
|
+
/** Canceled package. */
|
|
259
|
+
package?: Package;
|
|
260
|
+
}
|
|
257
261
|
interface GetPackageRequest {
|
|
258
262
|
/**
|
|
259
263
|
* Package ID.
|
|
@@ -395,6 +399,22 @@ interface AssignProductInstanceToSiteResponse {
|
|
|
395
399
|
/** Updated package that includes the assigned product instance. */
|
|
396
400
|
package?: Package;
|
|
397
401
|
}
|
|
402
|
+
interface AssignedProductInstanceToSite {
|
|
403
|
+
/** Updated package. */
|
|
404
|
+
package?: Package;
|
|
405
|
+
/**
|
|
406
|
+
* ID of the product instance that was assigned to the site.
|
|
407
|
+
* @readonly
|
|
408
|
+
* @format GUID
|
|
409
|
+
*/
|
|
410
|
+
productInstanceId?: string;
|
|
411
|
+
/**
|
|
412
|
+
* ID of the site the product instance was assigned to.
|
|
413
|
+
* @readonly
|
|
414
|
+
* @format GUID
|
|
415
|
+
*/
|
|
416
|
+
siteId?: string;
|
|
417
|
+
}
|
|
398
418
|
interface UnassignProductInstanceFromSiteRequest {
|
|
399
419
|
/**
|
|
400
420
|
* Idempotency key.
|
|
@@ -416,6 +436,22 @@ interface UnassignProductInstanceFromSiteResponse {
|
|
|
416
436
|
/** Updated package that includes the unassigned product instance. */
|
|
417
437
|
package?: Package;
|
|
418
438
|
}
|
|
439
|
+
interface UnassignedProductInstanceFromSite {
|
|
440
|
+
/** Updated package. */
|
|
441
|
+
package?: Package;
|
|
442
|
+
/**
|
|
443
|
+
* ID of the product instance that was unassigned from the site.
|
|
444
|
+
* @readonly
|
|
445
|
+
* @format GUID
|
|
446
|
+
*/
|
|
447
|
+
productInstanceId?: string;
|
|
448
|
+
/**
|
|
449
|
+
* MetasiteId of the site the product instance was unassigned from.
|
|
450
|
+
* @readonly
|
|
451
|
+
* @format GUID
|
|
452
|
+
*/
|
|
453
|
+
metaSiteId?: string;
|
|
454
|
+
}
|
|
419
455
|
interface CancelProductInstanceRequest {
|
|
420
456
|
/**
|
|
421
457
|
* Idempotency key.
|
|
@@ -437,6 +473,16 @@ interface CancelProductInstanceResponse {
|
|
|
437
473
|
/** Updated package that includes the previously included the canceled product instance. */
|
|
438
474
|
package?: Package;
|
|
439
475
|
}
|
|
476
|
+
interface ProductInstanceCanceled {
|
|
477
|
+
/** Updated package. */
|
|
478
|
+
package?: Package;
|
|
479
|
+
/**
|
|
480
|
+
* ID of the product instance that was canceled.
|
|
481
|
+
* @readonly
|
|
482
|
+
* @format GUID
|
|
483
|
+
*/
|
|
484
|
+
productInstanceId?: string;
|
|
485
|
+
}
|
|
440
486
|
interface AdjustProductInstanceSpecificationsRequest {
|
|
441
487
|
/**
|
|
442
488
|
* Idempotency key.
|
|
@@ -486,6 +532,713 @@ interface AdjustProductInstanceSpecificationsResponse {
|
|
|
486
532
|
/** Updated package that includes the adjusted product instance. */
|
|
487
533
|
package?: Package;
|
|
488
534
|
}
|
|
535
|
+
interface AdjustedProductInstanceSpecifications {
|
|
536
|
+
/** Updated package. */
|
|
537
|
+
package?: Package;
|
|
538
|
+
/**
|
|
539
|
+
* ID of the product instance to adjust.
|
|
540
|
+
* @readonly
|
|
541
|
+
* @format GUID
|
|
542
|
+
*/
|
|
543
|
+
productInstanceId?: string;
|
|
544
|
+
}
|
|
545
|
+
interface SubscriptionEvent extends SubscriptionEventEventOneOf {
|
|
546
|
+
/** Triggered when a subscription is created. */
|
|
547
|
+
created?: SubscriptionCreated;
|
|
548
|
+
/**
|
|
549
|
+
* Triggered when a subscription is assigned to a Wix site, including the initial
|
|
550
|
+
* assignment of a floating subscription or a re-assignement from a different site.
|
|
551
|
+
*/
|
|
552
|
+
assigned?: SubscriptionAssigned;
|
|
553
|
+
/** Triggered when a subscription is canceled. */
|
|
554
|
+
cancelled?: SubscriptionCancelled;
|
|
555
|
+
/** Triggered when the subscription's auto renew is turned on. */
|
|
556
|
+
autoRenewTurnedOn?: SubscriptionAutoRenewTurnedOn;
|
|
557
|
+
/** Triggered when the subscription's auto renew is turned off. */
|
|
558
|
+
autoRenewTurnedOff?: SubscriptionAutoRenewTurnedOff;
|
|
559
|
+
/**
|
|
560
|
+
* Triggered when a subscription is unassigned from a Wix site and becomes
|
|
561
|
+
* floating.
|
|
562
|
+
*/
|
|
563
|
+
unassigned?: SubscriptionUnassigned;
|
|
564
|
+
/**
|
|
565
|
+
* Triggered when a subscription is transferred from one Wix account to another.
|
|
566
|
+
* A transfer includes cancelling the original subscription and creating a new
|
|
567
|
+
* subscription for the target account. The event returns both the original
|
|
568
|
+
* and the new subscription.
|
|
569
|
+
*/
|
|
570
|
+
transferred?: SubscriptionTransferred;
|
|
571
|
+
/** Triggered when a recurring charge succeeds for a subscription. */
|
|
572
|
+
recurringChargeSucceeded?: RecurringChargeSucceeded;
|
|
573
|
+
/**
|
|
574
|
+
* Triggered when a subscription was updated including when its product has been
|
|
575
|
+
* up- or downgraded or the billing cycle is changed.
|
|
576
|
+
*/
|
|
577
|
+
contractSwitched?: ContractSwitched;
|
|
578
|
+
/**
|
|
579
|
+
* Triggered when a subscription gets close to the end of its billing cycle.
|
|
580
|
+
* The exact number of days is defined in the billing system.
|
|
581
|
+
*/
|
|
582
|
+
nearEndOfPeriod?: SubscriptionNearEndOfPeriod;
|
|
583
|
+
/**
|
|
584
|
+
* Triggered when a subscription is updated and the change doesn't happen
|
|
585
|
+
* immediately but at the end of the current billing cycle.
|
|
586
|
+
*/
|
|
587
|
+
pendingChange?: SubscriptionPendingChange;
|
|
588
|
+
/** Triggered when a recurring charge attempt fails for a subscription. */
|
|
589
|
+
recurringChargeAttemptFailed?: RecurringChargeAttemptFailed;
|
|
590
|
+
/**
|
|
591
|
+
* ID of the subscription's event.
|
|
592
|
+
* @format GUID
|
|
593
|
+
*/
|
|
594
|
+
eventId?: string | null;
|
|
595
|
+
/**
|
|
596
|
+
* Date and time of the event in
|
|
597
|
+
* [UTC datetime](https://en.wikipedia.org/wiki/Coordinated_Universal_Time)
|
|
598
|
+
* `YYYY-MM-DDThh:mm:ss.sssZ` format.
|
|
599
|
+
*/
|
|
600
|
+
eventDate?: Date | null;
|
|
601
|
+
}
|
|
602
|
+
/** @oneof */
|
|
603
|
+
interface SubscriptionEventEventOneOf {
|
|
604
|
+
/** Triggered when a subscription is created. */
|
|
605
|
+
created?: SubscriptionCreated;
|
|
606
|
+
/**
|
|
607
|
+
* Triggered when a subscription is assigned to a Wix site, including the initial
|
|
608
|
+
* assignment of a floating subscription or a re-assignement from a different site.
|
|
609
|
+
*/
|
|
610
|
+
assigned?: SubscriptionAssigned;
|
|
611
|
+
/** Triggered when a subscription is canceled. */
|
|
612
|
+
cancelled?: SubscriptionCancelled;
|
|
613
|
+
/** Triggered when the subscription's auto renew is turned on. */
|
|
614
|
+
autoRenewTurnedOn?: SubscriptionAutoRenewTurnedOn;
|
|
615
|
+
/** Triggered when the subscription's auto renew is turned off. */
|
|
616
|
+
autoRenewTurnedOff?: SubscriptionAutoRenewTurnedOff;
|
|
617
|
+
/**
|
|
618
|
+
* Triggered when a subscription is unassigned from a Wix site and becomes
|
|
619
|
+
* floating.
|
|
620
|
+
*/
|
|
621
|
+
unassigned?: SubscriptionUnassigned;
|
|
622
|
+
/**
|
|
623
|
+
* Triggered when a subscription is transferred from one Wix account to another.
|
|
624
|
+
* A transfer includes cancelling the original subscription and creating a new
|
|
625
|
+
* subscription for the target account. The event returns both the original
|
|
626
|
+
* and the new subscription.
|
|
627
|
+
*/
|
|
628
|
+
transferred?: SubscriptionTransferred;
|
|
629
|
+
/** Triggered when a recurring charge succeeds for a subscription. */
|
|
630
|
+
recurringChargeSucceeded?: RecurringChargeSucceeded;
|
|
631
|
+
/**
|
|
632
|
+
* Triggered when a subscription was updated including when its product has been
|
|
633
|
+
* up- or downgraded or the billing cycle is changed.
|
|
634
|
+
*/
|
|
635
|
+
contractSwitched?: ContractSwitched;
|
|
636
|
+
/**
|
|
637
|
+
* Triggered when a subscription gets close to the end of its billing cycle.
|
|
638
|
+
* The exact number of days is defined in the billing system.
|
|
639
|
+
*/
|
|
640
|
+
nearEndOfPeriod?: SubscriptionNearEndOfPeriod;
|
|
641
|
+
/**
|
|
642
|
+
* Triggered when a subscription is updated and the change doesn't happen
|
|
643
|
+
* immediately but at the end of the current billing cycle.
|
|
644
|
+
*/
|
|
645
|
+
pendingChange?: SubscriptionPendingChange;
|
|
646
|
+
/** Triggered when a recurring charge attempt fails for a subscription. */
|
|
647
|
+
recurringChargeAttemptFailed?: RecurringChargeAttemptFailed;
|
|
648
|
+
}
|
|
649
|
+
/** Triggered when a subscription is created. */
|
|
650
|
+
interface SubscriptionCreated {
|
|
651
|
+
/** Created subscription. */
|
|
652
|
+
subscription?: Subscription;
|
|
653
|
+
/** Metadata for the `created` event. */
|
|
654
|
+
metadata?: Record<string, string>;
|
|
655
|
+
/**
|
|
656
|
+
* Subscription reactivation data.
|
|
657
|
+
* A subscription can be reactivated for example if it was incorrectly canceled because of fraud and then reactivated
|
|
658
|
+
* by the billing system
|
|
659
|
+
*/
|
|
660
|
+
reactivationData?: ReactivationData;
|
|
661
|
+
}
|
|
662
|
+
/**
|
|
663
|
+
* A subscription holds information about a Premium product that a Wix account
|
|
664
|
+
* owner has purchased including details about the billing.
|
|
665
|
+
*/
|
|
666
|
+
interface Subscription {
|
|
667
|
+
/**
|
|
668
|
+
* ID of the subscription.
|
|
669
|
+
* @format GUID
|
|
670
|
+
*/
|
|
671
|
+
id?: string;
|
|
672
|
+
/**
|
|
673
|
+
* ID of the Wix account that purchased the subscription.
|
|
674
|
+
* @format GUID
|
|
675
|
+
*/
|
|
676
|
+
userId?: string;
|
|
677
|
+
/**
|
|
678
|
+
* ID of the [product](https://bo.wix.com/wix-docs/rest/premium/premium-product-catalog-v2/products/product-object)
|
|
679
|
+
* for which the subscription was purchased.
|
|
680
|
+
* @format GUID
|
|
681
|
+
*/
|
|
682
|
+
productId?: string;
|
|
683
|
+
/**
|
|
684
|
+
* Date and time the subscription was created in
|
|
685
|
+
* [UTC datetime](https://en.wikipedia.org/wiki/Coordinated_Universal_Time)
|
|
686
|
+
* `YYYY-MM-DDThh:mm:ss.sssZ` format.
|
|
687
|
+
*/
|
|
688
|
+
createdAt?: Date | null;
|
|
689
|
+
/**
|
|
690
|
+
* Date and time the subscription was last updated in
|
|
691
|
+
* [UTC datetime](https://en.wikipedia.org/wiki/Coordinated_Universal_Time)
|
|
692
|
+
* `YYYY-MM-DDThh:mm:ss.sssZ` format.
|
|
693
|
+
*/
|
|
694
|
+
updatedAt?: Date | null;
|
|
695
|
+
/**
|
|
696
|
+
* ID of the metasite that the subscription is assigned to.
|
|
697
|
+
* Available only when the subscription is assigned to a Wix site.
|
|
698
|
+
* Subscriptions for account level products can't be assigned to a Wix site.
|
|
699
|
+
* @format GUID
|
|
700
|
+
*/
|
|
701
|
+
metaSiteId?: string | null;
|
|
702
|
+
/** Information about the system that manages the subscription's billing. */
|
|
703
|
+
billingReference?: BillingReference;
|
|
704
|
+
/** Information about the billing cycle of the subscription. */
|
|
705
|
+
cycle?: Cycle;
|
|
706
|
+
/**
|
|
707
|
+
* Subscription status.
|
|
708
|
+
*
|
|
709
|
+
* + `UNKNOWN`: Default status.
|
|
710
|
+
* + `AUTO_RENEW_ON`: Subscription is active and automatically renews at the end of the current billing cycle.
|
|
711
|
+
* + `AUTO_RENEW_OFF`: Subscription is active but expires at the end of the current billing cycle.
|
|
712
|
+
* + `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.
|
|
713
|
+
* + `CANCELLED`: Subscription isn't active because it has been canceled.
|
|
714
|
+
* + `TRANSFERRED`: Subscription isn't active because it has been transferred to a different account. A different active subscription was created for the target account.
|
|
715
|
+
*/
|
|
716
|
+
status?: SubscriptionStatusWithLiterals;
|
|
717
|
+
/**
|
|
718
|
+
* Date and time the subscription was last transferred from one Wix account to
|
|
719
|
+
* another in
|
|
720
|
+
* [UTC datetime](https://en.wikipedia.org/wiki/Coordinated_Universal_Time)
|
|
721
|
+
* `YYYY-MM-DDThh:mm:ss.sssZ` format.
|
|
722
|
+
*/
|
|
723
|
+
transferredAt?: Date | null;
|
|
724
|
+
/**
|
|
725
|
+
* ID of the [product type](https://bo.wix.com/wix-docs/rest/premium/premium-product-catalog-v2/product-types/product-type-object)
|
|
726
|
+
* that the product, for which the subscription was purchased, belongs to.
|
|
727
|
+
* @format GUID
|
|
728
|
+
*/
|
|
729
|
+
productTypeId?: string;
|
|
730
|
+
/** Version number, which increments by 1 each time the subscription is updated. */
|
|
731
|
+
version?: number;
|
|
732
|
+
/**
|
|
733
|
+
* Whether the subscription is active. Includes the statuses
|
|
734
|
+
* `"AUTO_RENEW_ON"`, `"AUTO_RENEW_OFF"`, and `"MANUAL_RECURRING"`.
|
|
735
|
+
*/
|
|
736
|
+
active?: boolean;
|
|
737
|
+
/**
|
|
738
|
+
* Date and time the subscription was originally created in
|
|
739
|
+
* [UTC datetime](https://en.wikipedia.org/wiki/Coordinated_Universal_Time)
|
|
740
|
+
* `YYYY-MM-DDThh:mm:ss.sssZ` format.
|
|
741
|
+
* Differs from `createdAt` in case the subscription was originally created for a different Wix account and has been transferred.
|
|
742
|
+
*/
|
|
743
|
+
originalCreationDate?: Date | null;
|
|
744
|
+
/** Custom metadata about the subscription. */
|
|
745
|
+
metadata?: Record<string, string>;
|
|
746
|
+
/**
|
|
747
|
+
* 2-letter country code in
|
|
748
|
+
* [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements)
|
|
749
|
+
* format.
|
|
750
|
+
*/
|
|
751
|
+
countryCode?: string | null;
|
|
752
|
+
/**
|
|
753
|
+
* Seats of the product that the subscription was purchased for.
|
|
754
|
+
* Will be Null for products that don't support seats.
|
|
755
|
+
* @min 1
|
|
756
|
+
* @max 500
|
|
757
|
+
*/
|
|
758
|
+
seats?: number | null;
|
|
759
|
+
}
|
|
760
|
+
interface BillingReference {
|
|
761
|
+
/**
|
|
762
|
+
* Name of the billing system that manages the subscription.
|
|
763
|
+
*
|
|
764
|
+
* + `"UNKNOWN"`: Default value.
|
|
765
|
+
* + `"SBS"`: [Wix Billing](https://github.com/wix-p/premium-billing/tree/master/sbs).
|
|
766
|
+
* + `"LICENSER"`:
|
|
767
|
+
* + `"BASS"`: [Billing and Subscriptions System](https://dev.wix.com/docs/rest/internal-only/premium/subscriptions-by-billing-by-wix/introduction).
|
|
768
|
+
* + `"RESELLER"`: [External Reseller](https://dev.wix.com/api/rest/account-level-apis/resellers/introduction).
|
|
769
|
+
*/
|
|
770
|
+
providerName?: ProviderNameWithLiterals;
|
|
771
|
+
/** Current provider reference ID. */
|
|
772
|
+
providerReferenceId?: string | null;
|
|
773
|
+
/** Previous provider reference IDs. Used for when a subscription is extended, specifically for domains. */
|
|
774
|
+
previousProviderReferenceIds?: string[];
|
|
775
|
+
}
|
|
776
|
+
declare enum ProviderName {
|
|
777
|
+
UNKNOWN = "UNKNOWN",
|
|
778
|
+
SBS = "SBS",
|
|
779
|
+
LICENSER = "LICENSER",
|
|
780
|
+
BASS = "BASS",
|
|
781
|
+
RESELLER = "RESELLER",
|
|
782
|
+
RECURRING_INVOICES = "RECURRING_INVOICES"
|
|
783
|
+
}
|
|
784
|
+
/** @enumType */
|
|
785
|
+
type ProviderNameWithLiterals = ProviderName | 'UNKNOWN' | 'SBS' | 'LICENSER' | 'BASS' | 'RESELLER' | 'RECURRING_INVOICES';
|
|
786
|
+
interface Cycle extends CycleCycleSelectorOneOf {
|
|
787
|
+
/** repetitive interval */
|
|
788
|
+
interval?: Interval;
|
|
789
|
+
/** one time */
|
|
790
|
+
oneTime?: OneTime;
|
|
791
|
+
}
|
|
792
|
+
/** @oneof */
|
|
793
|
+
interface CycleCycleSelectorOneOf {
|
|
794
|
+
/** repetitive interval */
|
|
795
|
+
interval?: Interval;
|
|
796
|
+
/** one time */
|
|
797
|
+
oneTime?: OneTime;
|
|
798
|
+
}
|
|
799
|
+
interface Interval {
|
|
800
|
+
/** interval unit of measure */
|
|
801
|
+
unit?: IntervalUnitWithLiterals;
|
|
802
|
+
/** number of interval */
|
|
803
|
+
count?: number;
|
|
804
|
+
}
|
|
805
|
+
declare enum IntervalUnit {
|
|
806
|
+
/** unknown interval unit */
|
|
807
|
+
UNKNOWN = "UNKNOWN",
|
|
808
|
+
/** day */
|
|
809
|
+
DAY = "DAY",
|
|
810
|
+
/** week */
|
|
811
|
+
WEEK = "WEEK",
|
|
812
|
+
/** month */
|
|
813
|
+
MONTH = "MONTH",
|
|
814
|
+
/** year */
|
|
815
|
+
YEAR = "YEAR"
|
|
816
|
+
}
|
|
817
|
+
/** @enumType */
|
|
818
|
+
type IntervalUnitWithLiterals = IntervalUnit | 'UNKNOWN' | 'DAY' | 'WEEK' | 'MONTH' | 'YEAR';
|
|
819
|
+
interface OneTime {
|
|
820
|
+
}
|
|
821
|
+
declare enum SubscriptionStatus {
|
|
822
|
+
UNKNOWN = "UNKNOWN",
|
|
823
|
+
AUTO_RENEW_ON = "AUTO_RENEW_ON",
|
|
824
|
+
AUTO_RENEW_OFF = "AUTO_RENEW_OFF",
|
|
825
|
+
MANUAL_RECURRING = "MANUAL_RECURRING",
|
|
826
|
+
CANCELLED = "CANCELLED",
|
|
827
|
+
TRANSFERRED = "TRANSFERRED"
|
|
828
|
+
}
|
|
829
|
+
/** @enumType */
|
|
830
|
+
type SubscriptionStatusWithLiterals = SubscriptionStatus | 'UNKNOWN' | 'AUTO_RENEW_ON' | 'AUTO_RENEW_OFF' | 'MANUAL_RECURRING' | 'CANCELLED' | 'TRANSFERRED';
|
|
831
|
+
/** Triggered when a subscription is reactivated. */
|
|
832
|
+
interface ReactivationData {
|
|
833
|
+
reactivationReason?: ReactivationReasonEnumWithLiterals;
|
|
834
|
+
/**
|
|
835
|
+
* In the event of reactivation after chargeback dispute, the subscription may be extended according to the
|
|
836
|
+
* number of days it was inactive during the time of resolving the dispute
|
|
837
|
+
*/
|
|
838
|
+
newEndOfPeriod?: Date | null;
|
|
839
|
+
/** The original end date, before the inactive period. */
|
|
840
|
+
oldEndOfPeriod?: Date | null;
|
|
841
|
+
/** The difference in days between the new new_end_of_period and old_end_of_period */
|
|
842
|
+
differenceInDays?: number | null;
|
|
843
|
+
}
|
|
844
|
+
/** Reason for subscription reactivation */
|
|
845
|
+
declare enum ReactivationReasonEnum {
|
|
846
|
+
UNKNOWN = "UNKNOWN",
|
|
847
|
+
/**
|
|
848
|
+
* Subscription was reactivated due to billing status change from CANCELED to ACTIVE, for example if it was incorrectly
|
|
849
|
+
* canceled because of suspicion of fraud
|
|
850
|
+
*/
|
|
851
|
+
BILLING_STATUS_CHANGE = "BILLING_STATUS_CHANGE",
|
|
852
|
+
/** Subscription was reactivated after a chargeback dispute */
|
|
853
|
+
REACTIVATED_AFTER_CHARGEBACK = "REACTIVATED_AFTER_CHARGEBACK"
|
|
854
|
+
}
|
|
855
|
+
/** @enumType */
|
|
856
|
+
type ReactivationReasonEnumWithLiterals = ReactivationReasonEnum | 'UNKNOWN' | 'BILLING_STATUS_CHANGE' | 'REACTIVATED_AFTER_CHARGEBACK';
|
|
857
|
+
/**
|
|
858
|
+
* Triggered when a subscription is assigned to a Wix site, including the initial
|
|
859
|
+
* assignment of a floating subscription or a re-assignement from a different site.
|
|
860
|
+
*/
|
|
861
|
+
interface SubscriptionAssigned {
|
|
862
|
+
/** Assigned subscription. */
|
|
863
|
+
subscription?: Subscription;
|
|
864
|
+
/**
|
|
865
|
+
* ID of the metasite that the subscription has been assigned to before the update.
|
|
866
|
+
* @format GUID
|
|
867
|
+
*/
|
|
868
|
+
previousMetaSiteId?: string | null;
|
|
869
|
+
}
|
|
870
|
+
/** Triggered when a subscription is canceled. */
|
|
871
|
+
interface SubscriptionCancelled {
|
|
872
|
+
/** Canceled subscription. */
|
|
873
|
+
subscription?: Subscription;
|
|
874
|
+
/** Details about the cancellation including who canceled the subscription and why. */
|
|
875
|
+
cancellationDetails?: CancellationDetails;
|
|
876
|
+
/**
|
|
877
|
+
* Whether the subscription is canceled immediately or expires at the end of the current billing cycle.
|
|
878
|
+
*
|
|
879
|
+
* Default: `false`
|
|
880
|
+
*/
|
|
881
|
+
immediateCancel?: boolean;
|
|
882
|
+
/** Whether the subscription was canceled during the free trial period. */
|
|
883
|
+
canceledInFreeTrial?: boolean;
|
|
884
|
+
/** The type of refund applied to the cancellation. */
|
|
885
|
+
refundType?: RefundTypeWithLiterals;
|
|
886
|
+
}
|
|
887
|
+
/** Information about the cancellation flow including who canceled the subscription and why it was canceled. */
|
|
888
|
+
interface CancellationDetails {
|
|
889
|
+
/**
|
|
890
|
+
* Cancellation code.
|
|
891
|
+
*
|
|
892
|
+
* Values supported for cancellations on behalf of the billing system: `-1`, `-2`, `-3`, `-4`, `-5`, `-6`, `-7`, `-8`.
|
|
893
|
+
* For cancellations on behalf of the site owner or the service provider `cancellationCode`
|
|
894
|
+
* is taken from the request of
|
|
895
|
+
* [Cancel Immediately Offline](https://bo.wix.com/wix-docs/rest/premium/premium-subscriptions-manager/cancel-immediately-offline).
|
|
896
|
+
*
|
|
897
|
+
* + `-1`: The subscription has been cancelled by the billing system but none of the listed cancellation reasons applies.
|
|
898
|
+
* + `-2`: There were payment problems.
|
|
899
|
+
* + `-3`: There was a chargeback.
|
|
900
|
+
* + `-4`: Customer support has canceled the subscription and issued a refund.
|
|
901
|
+
* + `-5`: The site owner has changed their existing subscription.
|
|
902
|
+
* + `-6`: The subscription has been transferred to a different Wix account.
|
|
903
|
+
* + `-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.
|
|
904
|
+
* + `-8`: The Wix account that the subscription belonged to has been deleted.
|
|
905
|
+
*/
|
|
906
|
+
cancellationCode?: number | null;
|
|
907
|
+
/**
|
|
908
|
+
* Cancellation reason. For cancellations on behalf of the site owner or the service provider `cancellationReason`
|
|
909
|
+
* is taken from the request of
|
|
910
|
+
* [Cancel Immediately Offline](https://bo.wix.com/wix-docs/rest/premium/premium-subscriptions-manager/cancel-immediately-offline).
|
|
911
|
+
* For cancellations on behalf of the billing system `cancellationReason` is `null` or an empty string.
|
|
912
|
+
*/
|
|
913
|
+
cancellationReason?: string | null;
|
|
914
|
+
/**
|
|
915
|
+
* Initiator of the cancellation. For `"USER_REQUESTED"` and `"APP_MANAGED"`,
|
|
916
|
+
* `cancellationCode` and `cancellationReason` are taken from the request of
|
|
917
|
+
* [Cancel Immediately](https://dev.wix.com/docs/rest/account-level/premium/premium-subscriptions-manager/subscription-v1/cancel-immediately)
|
|
918
|
+
* or [Cancel Immediately Offline](https://dev.wix.com/docs/rest/account-level/premium/premium-subscriptions-manager/subscription-v1/cancel-immediately-offline).
|
|
919
|
+
* For `"PASSIVE"`, cancellations `cancellationCode` is automatically calculated and `cancellationReason`
|
|
920
|
+
* is `null` or an empty string.
|
|
921
|
+
*
|
|
922
|
+
* + `"UNKNOWN`: Default value.
|
|
923
|
+
* + `"USER_REQUESTED"`: The Wix account owner has canceled the subscription.
|
|
924
|
+
* + `"APP_MANAGED"`: The service provider has canceled the subscription.
|
|
925
|
+
* + `"PASSIVE"`: The billing system has canceled the subscription. For example, in case of payment failure or fraud.
|
|
926
|
+
*/
|
|
927
|
+
initiator?: InitiatorWithLiterals;
|
|
928
|
+
}
|
|
929
|
+
declare enum Initiator {
|
|
930
|
+
UNKNOWN = "UNKNOWN",
|
|
931
|
+
USER_REQUESTED = "USER_REQUESTED",
|
|
932
|
+
APP_MANAGED = "APP_MANAGED",
|
|
933
|
+
PASSIVE = "PASSIVE"
|
|
934
|
+
}
|
|
935
|
+
/** @enumType */
|
|
936
|
+
type InitiatorWithLiterals = Initiator | 'UNKNOWN' | 'USER_REQUESTED' | 'APP_MANAGED' | 'PASSIVE';
|
|
937
|
+
declare enum RefundType {
|
|
938
|
+
UNKNOWN = "UNKNOWN",
|
|
939
|
+
NO_REFUND = "NO_REFUND",
|
|
940
|
+
FULL_REFUND = "FULL_REFUND",
|
|
941
|
+
PRORATED_REFUND = "PRORATED_REFUND"
|
|
942
|
+
}
|
|
943
|
+
/** @enumType */
|
|
944
|
+
type RefundTypeWithLiterals = RefundType | 'UNKNOWN' | 'NO_REFUND' | 'FULL_REFUND' | 'PRORATED_REFUND';
|
|
945
|
+
/** Triggered when the subscription's auto renew is turned on. */
|
|
946
|
+
interface SubscriptionAutoRenewTurnedOn {
|
|
947
|
+
/** Subscription for which auto renew is turned on. */
|
|
948
|
+
subscription?: Subscription;
|
|
949
|
+
/**
|
|
950
|
+
* Supported values: `USER`, `APP`.
|
|
951
|
+
*
|
|
952
|
+
* Information about who turned auto renew on.
|
|
953
|
+
* + `"USER"`: The site owner who purchased the subscription has turned auto renew on.
|
|
954
|
+
* + `"APP"`: The service provider has turned auto renew on.
|
|
955
|
+
*/
|
|
956
|
+
initiator?: string | null;
|
|
957
|
+
}
|
|
958
|
+
/** Triggered when the subscription's auto renew is turned off. */
|
|
959
|
+
interface SubscriptionAutoRenewTurnedOff {
|
|
960
|
+
/** Subscription for which auto renew is turned off. */
|
|
961
|
+
subscription?: Subscription;
|
|
962
|
+
/** Details about the cancellation including who canceled the subscription and why. */
|
|
963
|
+
cancellationDetails?: CancellationDetails;
|
|
964
|
+
/**
|
|
965
|
+
* Whether the subscription is immediately canceled or expires at the end of the current billing cycle.
|
|
966
|
+
*
|
|
967
|
+
* Default: `false`
|
|
968
|
+
*/
|
|
969
|
+
immediateCancel?: boolean;
|
|
970
|
+
}
|
|
971
|
+
/**
|
|
972
|
+
* Triggered when a subscription is unassigned from a Wix site and becomes
|
|
973
|
+
* floating.
|
|
974
|
+
*/
|
|
975
|
+
interface SubscriptionUnassigned {
|
|
976
|
+
/** Unassigned subscription. */
|
|
977
|
+
subscription?: Subscription;
|
|
978
|
+
/**
|
|
979
|
+
* ID of the metasite that the subscription has been assigned to before the event.
|
|
980
|
+
* @format GUID
|
|
981
|
+
*/
|
|
982
|
+
previousMetaSiteId?: string;
|
|
983
|
+
/**
|
|
984
|
+
* Reason why the subscription is unassigned.
|
|
985
|
+
*
|
|
986
|
+
* + `"UNKNOWN"`: Default value.
|
|
987
|
+
* + `"USER_REQUESTED"`: The Wix account owner has unassigned the subscription.
|
|
988
|
+
* + `"REPLACED_BY_ANOTHER_SUBSCRIPTION"`: A different subscription that replaces this subscription is assigned to the site.
|
|
989
|
+
*/
|
|
990
|
+
unassignReason?: UnassignReasonWithLiterals;
|
|
991
|
+
}
|
|
992
|
+
declare enum UnassignReason {
|
|
993
|
+
UNKNOWN = "UNKNOWN",
|
|
994
|
+
USER_REQUESTED = "USER_REQUESTED",
|
|
995
|
+
REPLACED_BY_ANOTHER_SUBSCRIPTION = "REPLACED_BY_ANOTHER_SUBSCRIPTION"
|
|
996
|
+
}
|
|
997
|
+
/** @enumType */
|
|
998
|
+
type UnassignReasonWithLiterals = UnassignReason | 'UNKNOWN' | 'USER_REQUESTED' | 'REPLACED_BY_ANOTHER_SUBSCRIPTION';
|
|
999
|
+
/**
|
|
1000
|
+
* Triggered when a subscription is transferred from one Wix account to another.
|
|
1001
|
+
* A transfer includes cancelling the original subscription and creating a new
|
|
1002
|
+
* subscription for the target account. The event returns both the original
|
|
1003
|
+
* and the new subscription.
|
|
1004
|
+
*/
|
|
1005
|
+
interface SubscriptionTransferred {
|
|
1006
|
+
/** Original subscription that was canceled for the transfer. */
|
|
1007
|
+
originSubscription?: Subscription;
|
|
1008
|
+
/** Newly created subscription for the target account. */
|
|
1009
|
+
targetSubscription?: Subscription;
|
|
1010
|
+
}
|
|
1011
|
+
/** Triggered when a recurring charge succeeds for a subscription. */
|
|
1012
|
+
interface RecurringChargeSucceeded {
|
|
1013
|
+
/** Subscription for which the recurring charge has succeeded. */
|
|
1014
|
+
subscription?: Subscription;
|
|
1015
|
+
/** Indication that there was a successful charge at the end of the free trial period */
|
|
1016
|
+
freeTrialPeriodEnd?: boolean;
|
|
1017
|
+
}
|
|
1018
|
+
/**
|
|
1019
|
+
* Triggered when a subscription was updated including when its product has been
|
|
1020
|
+
* up- or downgraded or the billing cycle is changed.
|
|
1021
|
+
*/
|
|
1022
|
+
interface ContractSwitched {
|
|
1023
|
+
/** Updated subscription. */
|
|
1024
|
+
subscription?: Subscription;
|
|
1025
|
+
/** Billing cycle before the update. */
|
|
1026
|
+
previousCycle?: Cycle;
|
|
1027
|
+
/**
|
|
1028
|
+
* ID of the product belonging to the subscription before the update.
|
|
1029
|
+
* @format GUID
|
|
1030
|
+
*/
|
|
1031
|
+
previousProductId?: string;
|
|
1032
|
+
/**
|
|
1033
|
+
* ID of the product type that the subscription's original product belonged to before the update.
|
|
1034
|
+
* @format GUID
|
|
1035
|
+
*/
|
|
1036
|
+
previousProductTypeId?: string;
|
|
1037
|
+
/**
|
|
1038
|
+
* Update type. __Note__: Doesn't include information about a product adjustment.
|
|
1039
|
+
* For that purpose, see `productAdjustment`.
|
|
1040
|
+
*
|
|
1041
|
+
* + `"NOT_APPLICABLE"`: Default value.
|
|
1042
|
+
* + `"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.
|
|
1043
|
+
* + `"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.
|
|
1044
|
+
* + `"REFUND_PRICE_DIFF"`: Not implemented.
|
|
1045
|
+
* + `"ADJUST_PERIOD_END"`: Not implemented.
|
|
1046
|
+
* + `"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.
|
|
1047
|
+
* + `"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.
|
|
1048
|
+
* + `"END_OF_PERIOD"`: The subscription's billing current cycle is extended because of a downgrade.
|
|
1049
|
+
* + `"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.
|
|
1050
|
+
* + `"DOWNGRADE_RENEWAL"`: The subscription is downgraded because of a declined payment. This prevents subscriptions from churning.
|
|
1051
|
+
*/
|
|
1052
|
+
contractSwitchType?: ContractSwitchTypeWithLiterals;
|
|
1053
|
+
/**
|
|
1054
|
+
* ID of the metasite the subscription has been assigned to previously.
|
|
1055
|
+
* Available only in case the subscription is assigned to a different site.
|
|
1056
|
+
* @format GUID
|
|
1057
|
+
*/
|
|
1058
|
+
previousMetaSiteId?: string | null;
|
|
1059
|
+
/**
|
|
1060
|
+
* Update reason.
|
|
1061
|
+
*
|
|
1062
|
+
* + `"PRICE_INCREASE"`: The subscription's price has been increased.
|
|
1063
|
+
* + `"EXTERNAL_PROVIDER_TRIGGER"`: Any reason other than a price increase.
|
|
1064
|
+
*/
|
|
1065
|
+
contractSwitchReason?: ContractSwitchReasonWithLiterals;
|
|
1066
|
+
/** Information about the price update. Available only for updates with a price increase. */
|
|
1067
|
+
productPriceIncreaseData?: ProductPriceIncreaseData;
|
|
1068
|
+
/**
|
|
1069
|
+
* Information about a product adjustment. For example, a downgrade.
|
|
1070
|
+
* __Note__: This isn't the same as `contractSwitchType`.
|
|
1071
|
+
*
|
|
1072
|
+
* + `NOT_APPLICABLE`: There is no information about whether the product has been up- or downgraded.
|
|
1073
|
+
* + `DOWNGRADE`: The product has been downgraded.
|
|
1074
|
+
*/
|
|
1075
|
+
productAdjustment?: ProductAdjustmentWithLiterals;
|
|
1076
|
+
/**
|
|
1077
|
+
* Number of seats before the contract switch.
|
|
1078
|
+
* @min 1
|
|
1079
|
+
* @max 500
|
|
1080
|
+
*/
|
|
1081
|
+
previousSeats?: number | null;
|
|
1082
|
+
}
|
|
1083
|
+
/** Copied from SBS */
|
|
1084
|
+
declare enum ContractSwitchType {
|
|
1085
|
+
NOT_APPLICABLE = "NOT_APPLICABLE",
|
|
1086
|
+
ADDITIONAL_QUANTITY = "ADDITIONAL_QUANTITY",
|
|
1087
|
+
CREDIT_UNUSED_PERIOD = "CREDIT_UNUSED_PERIOD",
|
|
1088
|
+
REFUND_PRICE_DIFF = "REFUND_PRICE_DIFF",
|
|
1089
|
+
ADJUST_PERIOD_END = "ADJUST_PERIOD_END",
|
|
1090
|
+
DOWNGRADE_GRACE_PERIOD = "DOWNGRADE_GRACE_PERIOD",
|
|
1091
|
+
FULL_AMOUNT_PERIOD = "FULL_AMOUNT_PERIOD",
|
|
1092
|
+
END_OF_PERIOD = "END_OF_PERIOD",
|
|
1093
|
+
PENDING_CHANGES = "PENDING_CHANGES",
|
|
1094
|
+
DOWNGRADE_RENEWAL = "DOWNGRADE_RENEWAL"
|
|
1095
|
+
}
|
|
1096
|
+
/** @enumType */
|
|
1097
|
+
type ContractSwitchTypeWithLiterals = ContractSwitchType | 'NOT_APPLICABLE' | 'ADDITIONAL_QUANTITY' | 'CREDIT_UNUSED_PERIOD' | 'REFUND_PRICE_DIFF' | 'ADJUST_PERIOD_END' | 'DOWNGRADE_GRACE_PERIOD' | 'FULL_AMOUNT_PERIOD' | 'END_OF_PERIOD' | 'PENDING_CHANGES' | 'DOWNGRADE_RENEWAL';
|
|
1098
|
+
declare enum ContractSwitchReason {
|
|
1099
|
+
EXTERNAL_PROVIDER_TRIGGER = "EXTERNAL_PROVIDER_TRIGGER",
|
|
1100
|
+
PRICE_INCREASE = "PRICE_INCREASE"
|
|
1101
|
+
}
|
|
1102
|
+
/** @enumType */
|
|
1103
|
+
type ContractSwitchReasonWithLiterals = ContractSwitchReason | 'EXTERNAL_PROVIDER_TRIGGER' | 'PRICE_INCREASE';
|
|
1104
|
+
/** Triggered when a subscription's price is increased. */
|
|
1105
|
+
interface ProductPriceIncreaseData {
|
|
1106
|
+
/**
|
|
1107
|
+
* Price of the subscription before the update.
|
|
1108
|
+
* @format DECIMAL_VALUE
|
|
1109
|
+
*/
|
|
1110
|
+
previousPrice?: string | null;
|
|
1111
|
+
/** A value that is used in order to select the correct email template to send the user regarding the price increase. */
|
|
1112
|
+
emailTemplateSelector?: string | null;
|
|
1113
|
+
/** Used to differentiate between migration segments. Does not have to be unique per segment. */
|
|
1114
|
+
segmentName?: string | null;
|
|
1115
|
+
/** Used to determine how the price increase was triggered. */
|
|
1116
|
+
priceIncreaseTrigger?: PriceIncreaseTriggerWithLiterals;
|
|
1117
|
+
}
|
|
1118
|
+
/** Reason for Price Increase Trigger */
|
|
1119
|
+
declare enum PriceIncreaseTrigger {
|
|
1120
|
+
NEAR_RENEWAL = "NEAR_RENEWAL",
|
|
1121
|
+
RECURRING_SUCCESS = "RECURRING_SUCCESS",
|
|
1122
|
+
MANUAL = "MANUAL"
|
|
1123
|
+
}
|
|
1124
|
+
/** @enumType */
|
|
1125
|
+
type PriceIncreaseTriggerWithLiterals = PriceIncreaseTrigger | 'NEAR_RENEWAL' | 'RECURRING_SUCCESS' | 'MANUAL';
|
|
1126
|
+
/** Triggered when a subscription's product is adusted. */
|
|
1127
|
+
declare enum ProductAdjustment {
|
|
1128
|
+
/** flag to show that the ContractSwitchedEvent is not applicable / needed */
|
|
1129
|
+
NOT_APPLICABLE = "NOT_APPLICABLE",
|
|
1130
|
+
/** flag to show that the ContractSwitchedEvent is a Downgrade */
|
|
1131
|
+
DOWNGRADE = "DOWNGRADE"
|
|
1132
|
+
}
|
|
1133
|
+
/** @enumType */
|
|
1134
|
+
type ProductAdjustmentWithLiterals = ProductAdjustment | 'NOT_APPLICABLE' | 'DOWNGRADE';
|
|
1135
|
+
/**
|
|
1136
|
+
* Triggered when a subscription gets close to the end of its billing cycle.
|
|
1137
|
+
* The exact number of days is defined in the billing system.
|
|
1138
|
+
*/
|
|
1139
|
+
interface SubscriptionNearEndOfPeriod {
|
|
1140
|
+
/** Subscription that got close to the end of its billing cycle. */
|
|
1141
|
+
subscription?: Subscription;
|
|
1142
|
+
/** Whether the subscription is within the free trial period. */
|
|
1143
|
+
inFreeTrial?: boolean;
|
|
1144
|
+
}
|
|
1145
|
+
/**
|
|
1146
|
+
* Triggered when a subscription is updated and the change doesn't happen
|
|
1147
|
+
* immediately but at the end of the current billing cycle.
|
|
1148
|
+
*/
|
|
1149
|
+
interface SubscriptionPendingChange {
|
|
1150
|
+
/** Subscription for which a pending update is triggered. */
|
|
1151
|
+
subscription?: Subscription;
|
|
1152
|
+
}
|
|
1153
|
+
/** Triggered when a recurring charge attempt failed for a subscription. */
|
|
1154
|
+
interface RecurringChargeAttemptFailed {
|
|
1155
|
+
/** Subscription for which the recurring charge attempt has failed. */
|
|
1156
|
+
subscription?: Subscription;
|
|
1157
|
+
}
|
|
1158
|
+
interface Empty {
|
|
1159
|
+
}
|
|
1160
|
+
interface ProductInstanceUpdated {
|
|
1161
|
+
/** Updated package. */
|
|
1162
|
+
package?: Package;
|
|
1163
|
+
/**
|
|
1164
|
+
* ID of the product instance that was adjusted.
|
|
1165
|
+
* @readonly
|
|
1166
|
+
* @format GUID
|
|
1167
|
+
*/
|
|
1168
|
+
productInstanceId?: string;
|
|
1169
|
+
}
|
|
1170
|
+
interface FailureReportRequest {
|
|
1171
|
+
/**
|
|
1172
|
+
* ID of the product instance that failed.
|
|
1173
|
+
* @format GUID
|
|
1174
|
+
*/
|
|
1175
|
+
instanceId?: string;
|
|
1176
|
+
/** Failure reason. */
|
|
1177
|
+
reason?: FailureReason;
|
|
1178
|
+
}
|
|
1179
|
+
interface ProductInstanceFailed {
|
|
1180
|
+
/** Updated package. */
|
|
1181
|
+
package?: Package;
|
|
1182
|
+
/**
|
|
1183
|
+
* ID of the product instance that `FAILED`.
|
|
1184
|
+
* @readonly
|
|
1185
|
+
* @format GUID
|
|
1186
|
+
*/
|
|
1187
|
+
productInstanceId?: string;
|
|
1188
|
+
/** Failure reason. */
|
|
1189
|
+
reason?: FailureReason;
|
|
1190
|
+
}
|
|
1191
|
+
interface Task {
|
|
1192
|
+
key?: TaskKey;
|
|
1193
|
+
executeAt?: Date | null;
|
|
1194
|
+
payload?: string | null;
|
|
1195
|
+
}
|
|
1196
|
+
interface TaskKey {
|
|
1197
|
+
appId?: string;
|
|
1198
|
+
instanceId?: string;
|
|
1199
|
+
subjectId?: string | null;
|
|
1200
|
+
}
|
|
1201
|
+
interface TaskAction extends TaskActionActionOneOf {
|
|
1202
|
+
complete?: Complete;
|
|
1203
|
+
cancel?: Cancel;
|
|
1204
|
+
reschedule?: Reschedule;
|
|
1205
|
+
}
|
|
1206
|
+
/** @oneof */
|
|
1207
|
+
interface TaskActionActionOneOf {
|
|
1208
|
+
complete?: Complete;
|
|
1209
|
+
cancel?: Cancel;
|
|
1210
|
+
reschedule?: Reschedule;
|
|
1211
|
+
}
|
|
1212
|
+
interface Complete {
|
|
1213
|
+
}
|
|
1214
|
+
interface Cancel {
|
|
1215
|
+
}
|
|
1216
|
+
interface Reschedule {
|
|
1217
|
+
executeAt?: Date | null;
|
|
1218
|
+
payload?: string | null;
|
|
1219
|
+
}
|
|
1220
|
+
interface UpdateProductInstanceRequest {
|
|
1221
|
+
/**
|
|
1222
|
+
* ID of the product instance to update.
|
|
1223
|
+
* @format GUID
|
|
1224
|
+
*/
|
|
1225
|
+
instanceId?: string;
|
|
1226
|
+
status?: StatusWithLiterals;
|
|
1227
|
+
/** @format COUNTRY */
|
|
1228
|
+
countryCode?: string | null;
|
|
1229
|
+
/** Which field to update, currently only status and countryCode are supported. */
|
|
1230
|
+
fieldToUpdate?: FieldToUpdateWithLiterals;
|
|
1231
|
+
}
|
|
1232
|
+
declare enum FieldToUpdate {
|
|
1233
|
+
STATUS = "STATUS",
|
|
1234
|
+
COUNTRY_CODE = "COUNTRY_CODE"
|
|
1235
|
+
}
|
|
1236
|
+
/** @enumType */
|
|
1237
|
+
type FieldToUpdateWithLiterals = FieldToUpdate | 'STATUS' | 'COUNTRY_CODE';
|
|
1238
|
+
interface UpdateProductInstanceResponse {
|
|
1239
|
+
/** Updated Product Instance */
|
|
1240
|
+
productInstance?: ProductInstance;
|
|
1241
|
+
}
|
|
489
1242
|
interface UpdatePackageExternalIdRequest {
|
|
490
1243
|
/**
|
|
491
1244
|
* ID of the package to update.
|
|
@@ -502,6 +1255,186 @@ interface UpdatePackageExternalIdResponse {
|
|
|
502
1255
|
/** Updated package. */
|
|
503
1256
|
updatedPackage?: Package;
|
|
504
1257
|
}
|
|
1258
|
+
interface CountPackagesRequest {
|
|
1259
|
+
/** Filter on what packages to count */
|
|
1260
|
+
filter?: Record<string, any> | null;
|
|
1261
|
+
}
|
|
1262
|
+
interface CountPackagesResponse {
|
|
1263
|
+
/** Number of packages */
|
|
1264
|
+
count?: number;
|
|
1265
|
+
}
|
|
1266
|
+
interface DomainEvent extends DomainEventBodyOneOf {
|
|
1267
|
+
createdEvent?: EntityCreatedEvent;
|
|
1268
|
+
updatedEvent?: EntityUpdatedEvent;
|
|
1269
|
+
deletedEvent?: EntityDeletedEvent;
|
|
1270
|
+
actionEvent?: ActionEvent;
|
|
1271
|
+
/** Event ID. With this ID you can easily spot duplicated events and ignore them. */
|
|
1272
|
+
id?: string;
|
|
1273
|
+
/**
|
|
1274
|
+
* Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.
|
|
1275
|
+
* For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
|
|
1276
|
+
*/
|
|
1277
|
+
entityFqdn?: string;
|
|
1278
|
+
/**
|
|
1279
|
+
* Event action name, placed at the top level to make it easier for users to dispatch messages.
|
|
1280
|
+
* For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
|
|
1281
|
+
*/
|
|
1282
|
+
slug?: string;
|
|
1283
|
+
/** ID of the entity associated with the event. */
|
|
1284
|
+
entityId?: string;
|
|
1285
|
+
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */
|
|
1286
|
+
eventTime?: Date | null;
|
|
1287
|
+
/**
|
|
1288
|
+
* Whether the event was triggered as a result of a privacy regulation application
|
|
1289
|
+
* (for example, GDPR).
|
|
1290
|
+
*/
|
|
1291
|
+
triggeredByAnonymizeRequest?: boolean | null;
|
|
1292
|
+
/** If present, indicates the action that triggered the event. */
|
|
1293
|
+
originatedFrom?: string | null;
|
|
1294
|
+
/**
|
|
1295
|
+
* 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.
|
|
1296
|
+
* 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.
|
|
1297
|
+
*/
|
|
1298
|
+
entityEventSequence?: string | null;
|
|
1299
|
+
}
|
|
1300
|
+
/** @oneof */
|
|
1301
|
+
interface DomainEventBodyOneOf {
|
|
1302
|
+
createdEvent?: EntityCreatedEvent;
|
|
1303
|
+
updatedEvent?: EntityUpdatedEvent;
|
|
1304
|
+
deletedEvent?: EntityDeletedEvent;
|
|
1305
|
+
actionEvent?: ActionEvent;
|
|
1306
|
+
}
|
|
1307
|
+
interface EntityCreatedEvent {
|
|
1308
|
+
entityAsJson?: string;
|
|
1309
|
+
/** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */
|
|
1310
|
+
restoreInfo?: RestoreInfo;
|
|
1311
|
+
}
|
|
1312
|
+
interface RestoreInfo {
|
|
1313
|
+
deletedDate?: Date | null;
|
|
1314
|
+
}
|
|
1315
|
+
interface EntityUpdatedEvent {
|
|
1316
|
+
/**
|
|
1317
|
+
* Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
|
|
1318
|
+
* This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
|
|
1319
|
+
* We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
|
|
1320
|
+
*/
|
|
1321
|
+
currentEntityAsJson?: string;
|
|
1322
|
+
}
|
|
1323
|
+
interface EntityDeletedEvent {
|
|
1324
|
+
/** Entity that was deleted. */
|
|
1325
|
+
deletedEntityAsJson?: string | null;
|
|
1326
|
+
}
|
|
1327
|
+
interface ActionEvent {
|
|
1328
|
+
bodyAsJson?: string;
|
|
1329
|
+
}
|
|
1330
|
+
interface MessageEnvelope {
|
|
1331
|
+
/**
|
|
1332
|
+
* App instance ID.
|
|
1333
|
+
* @format GUID
|
|
1334
|
+
*/
|
|
1335
|
+
instanceId?: string | null;
|
|
1336
|
+
/**
|
|
1337
|
+
* Event type.
|
|
1338
|
+
* @maxLength 150
|
|
1339
|
+
*/
|
|
1340
|
+
eventType?: string;
|
|
1341
|
+
/** The identification type and identity data. */
|
|
1342
|
+
identity?: IdentificationData;
|
|
1343
|
+
/** Stringify payload. */
|
|
1344
|
+
data?: string;
|
|
1345
|
+
}
|
|
1346
|
+
interface IdentificationData extends IdentificationDataIdOneOf {
|
|
1347
|
+
/**
|
|
1348
|
+
* ID of a site visitor that has not logged in to the site.
|
|
1349
|
+
* @format GUID
|
|
1350
|
+
*/
|
|
1351
|
+
anonymousVisitorId?: string;
|
|
1352
|
+
/**
|
|
1353
|
+
* ID of a site visitor that has logged in to the site.
|
|
1354
|
+
* @format GUID
|
|
1355
|
+
*/
|
|
1356
|
+
memberId?: string;
|
|
1357
|
+
/**
|
|
1358
|
+
* ID of a Wix user (site owner, contributor, etc.).
|
|
1359
|
+
* @format GUID
|
|
1360
|
+
*/
|
|
1361
|
+
wixUserId?: string;
|
|
1362
|
+
/**
|
|
1363
|
+
* ID of an app.
|
|
1364
|
+
* @format GUID
|
|
1365
|
+
*/
|
|
1366
|
+
appId?: string;
|
|
1367
|
+
/** @readonly */
|
|
1368
|
+
identityType?: WebhookIdentityTypeWithLiterals;
|
|
1369
|
+
}
|
|
1370
|
+
/** @oneof */
|
|
1371
|
+
interface IdentificationDataIdOneOf {
|
|
1372
|
+
/**
|
|
1373
|
+
* ID of a site visitor that has not logged in to the site.
|
|
1374
|
+
* @format GUID
|
|
1375
|
+
*/
|
|
1376
|
+
anonymousVisitorId?: string;
|
|
1377
|
+
/**
|
|
1378
|
+
* ID of a site visitor that has logged in to the site.
|
|
1379
|
+
* @format GUID
|
|
1380
|
+
*/
|
|
1381
|
+
memberId?: string;
|
|
1382
|
+
/**
|
|
1383
|
+
* ID of a Wix user (site owner, contributor, etc.).
|
|
1384
|
+
* @format GUID
|
|
1385
|
+
*/
|
|
1386
|
+
wixUserId?: string;
|
|
1387
|
+
/**
|
|
1388
|
+
* ID of an app.
|
|
1389
|
+
* @format GUID
|
|
1390
|
+
*/
|
|
1391
|
+
appId?: string;
|
|
1392
|
+
}
|
|
1393
|
+
declare enum WebhookIdentityType {
|
|
1394
|
+
UNKNOWN = "UNKNOWN",
|
|
1395
|
+
ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
|
|
1396
|
+
MEMBER = "MEMBER",
|
|
1397
|
+
WIX_USER = "WIX_USER",
|
|
1398
|
+
APP = "APP"
|
|
1399
|
+
}
|
|
1400
|
+
/** @enumType */
|
|
1401
|
+
type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
|
|
1402
|
+
interface MigrateSubscriptionToPackagesRequest {
|
|
1403
|
+
/** Created package. */
|
|
1404
|
+
productInstance?: ProductInstance;
|
|
1405
|
+
/**
|
|
1406
|
+
* Existing subscriptionId to migrate
|
|
1407
|
+
* @format GUID
|
|
1408
|
+
*/
|
|
1409
|
+
subscriptionId?: string | null;
|
|
1410
|
+
/**
|
|
1411
|
+
* User id of the migration - only for Immigrator
|
|
1412
|
+
* @format GUID
|
|
1413
|
+
*/
|
|
1414
|
+
userId?: string | null;
|
|
1415
|
+
}
|
|
1416
|
+
interface MigrateSubscriptionToPackagesResponse {
|
|
1417
|
+
package?: Package;
|
|
1418
|
+
}
|
|
1419
|
+
interface FixBrokenMigrationRequest {
|
|
1420
|
+
/**
|
|
1421
|
+
* Subscription id of the broken subscription
|
|
1422
|
+
* @format GUID
|
|
1423
|
+
*/
|
|
1424
|
+
subscriptionId?: string;
|
|
1425
|
+
/**
|
|
1426
|
+
* SBS service id that points to the broken subscription
|
|
1427
|
+
* @format GUID
|
|
1428
|
+
*/
|
|
1429
|
+
sbsServiceId?: string;
|
|
1430
|
+
/**
|
|
1431
|
+
* Owner of the broken subscription
|
|
1432
|
+
* @format GUID
|
|
1433
|
+
*/
|
|
1434
|
+
userId?: string;
|
|
1435
|
+
}
|
|
1436
|
+
interface FixBrokenMigrationResponse {
|
|
1437
|
+
}
|
|
505
1438
|
|
|
506
1439
|
type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
|
|
507
1440
|
getUrl: (context: any) => string;
|
|
@@ -540,4 +1473,4 @@ declare function updatePackageExternalId(): __PublicMethodMetaInfo<'PATCH', {
|
|
|
540
1473
|
externalId: string;
|
|
541
1474
|
}, UpdatePackageExternalIdRequest$1, UpdatePackageExternalIdRequest, UpdatePackageExternalIdResponse$1, UpdatePackageExternalIdResponse>;
|
|
542
1475
|
|
|
543
|
-
export { type __PublicMethodMetaInfo, adjustProductInstanceSpecifications, assignProductInstanceToSite, cancelPackage, cancelProductInstance, createPackage, createPackageV2, getPackage, queryPackages, unassignProductInstanceFromSite, updatePackageExternalId };
|
|
1476
|
+
export { type ActionEvent as ActionEventOriginal, type AdjustProductInstanceSpecificationsRequest as AdjustProductInstanceSpecificationsRequestOriginal, type AdjustProductInstanceSpecificationsResponse as AdjustProductInstanceSpecificationsResponseOriginal, type AdjustedProductInstanceSpecifications as AdjustedProductInstanceSpecificationsOriginal, type AssignProductInstanceToSiteRequest as AssignProductInstanceToSiteRequestOriginal, type AssignProductInstanceToSiteResponse as AssignProductInstanceToSiteResponseOriginal, type AssignedProductInstanceToSite as AssignedProductInstanceToSiteOriginal, type BillingReference as BillingReferenceOriginal, type Cancel as CancelOriginal, type CancelPackageRequest as CancelPackageRequestOriginal, type CancelPackageResponse as CancelPackageResponseOriginal, type CancelProductInstanceRequest as CancelProductInstanceRequestOriginal, type CancelProductInstanceResponse as CancelProductInstanceResponseOriginal, type CancellationDetails as CancellationDetailsOriginal, type Complete as CompleteOriginal, ContractSwitchReason as ContractSwitchReasonOriginal, type ContractSwitchReasonWithLiterals as ContractSwitchReasonWithLiteralsOriginal, ContractSwitchType as ContractSwitchTypeOriginal, type ContractSwitchTypeWithLiterals as ContractSwitchTypeWithLiteralsOriginal, type ContractSwitched as ContractSwitchedOriginal, type CountPackagesRequest as CountPackagesRequestOriginal, type CountPackagesResponse as CountPackagesResponseOriginal, type CreatePackageRequest as CreatePackageRequestOriginal, type CreatePackageResponse as CreatePackageResponseOriginal, type CursorPaging as CursorPagingOriginal, type Cursors as CursorsOriginal, type CycleCycleSelectorOneOf as CycleCycleSelectorOneOfOriginal, CycleDescriptorType as CycleDescriptorTypeOriginal, type CycleDescriptorTypeWithLiterals as CycleDescriptorTypeWithLiteralsOriginal, type CycleInterval as CycleIntervalOriginal, type Cycle as CycleOriginal, type DomainEventBodyOneOf as DomainEventBodyOneOfOriginal, type DomainEvent as DomainEventOriginal, type Empty as EmptyOriginal, type EntityCreatedEvent as EntityCreatedEventOriginal, type EntityDeletedEvent as EntityDeletedEventOriginal, type EntityUpdatedEvent as EntityUpdatedEventOriginal, FailureReasonFailureReason as FailureReasonFailureReasonOriginal, type FailureReasonFailureReasonWithLiterals as FailureReasonFailureReasonWithLiteralsOriginal, type FailureReason as FailureReasonOriginal, type FailureReportRequest as FailureReportRequestOriginal, FieldToUpdate as FieldToUpdateOriginal, type FieldToUpdateWithLiterals as FieldToUpdateWithLiteralsOriginal, type FixBrokenMigrationRequest as FixBrokenMigrationRequestOriginal, type FixBrokenMigrationResponse as FixBrokenMigrationResponseOriginal, type GetPackageRequest as GetPackageRequestOriginal, type GetPackageResponse as GetPackageResponseOriginal, type IdentificationDataIdOneOf as IdentificationDataIdOneOfOriginal, type IdentificationData as IdentificationDataOriginal, Initiator as InitiatorOriginal, type InitiatorWithLiterals as InitiatorWithLiteralsOriginal, IntervalIntervalUnit as IntervalIntervalUnitOriginal, type IntervalIntervalUnitWithLiterals as IntervalIntervalUnitWithLiteralsOriginal, type Interval as IntervalOriginal, IntervalUnit as IntervalUnitOriginal, type IntervalUnitWithLiterals as IntervalUnitWithLiteralsOriginal, type MessageEnvelope as MessageEnvelopeOriginal, type MigrateSubscriptionToPackagesRequest as MigrateSubscriptionToPackagesRequestOriginal, type MigrateSubscriptionToPackagesResponse as MigrateSubscriptionToPackagesResponseOriginal, type OneTime as OneTimeOriginal, type PackageCanceled as PackageCanceledOriginal, type Package as PackageOriginal, type PagingMetadataV2 as PagingMetadataV2Original, type Paging as PagingOriginal, PriceIncreaseTrigger as PriceIncreaseTriggerOriginal, type PriceIncreaseTriggerWithLiterals as PriceIncreaseTriggerWithLiteralsOriginal, ProductAdjustment as ProductAdjustmentOriginal, type ProductAdjustmentWithLiterals as ProductAdjustmentWithLiteralsOriginal, type ProductInstanceCanceled as ProductInstanceCanceledOriginal, type ProductInstanceContractDetailsOneOf as ProductInstanceContractDetailsOneOfOriginal, type ProductInstanceCycle as ProductInstanceCycleOriginal, type ProductInstanceFailed as ProductInstanceFailedOriginal, type ProductInstance as ProductInstanceOriginal, type ProductInstanceUpdated as ProductInstanceUpdatedOriginal, type ProductPriceIncreaseData as ProductPriceIncreaseDataOriginal, ProviderName as ProviderNameOriginal, type ProviderNameWithLiterals as ProviderNameWithLiteralsOriginal, type QueryPackagesRequest as QueryPackagesRequestOriginal, type QueryPackagesResponse as QueryPackagesResponseOriginal, type QueryV2 as QueryV2Original, type QueryV2PagingMethodOneOf as QueryV2PagingMethodOneOfOriginal, type ReactivationData as ReactivationDataOriginal, ReactivationReasonEnum as ReactivationReasonEnumOriginal, type ReactivationReasonEnumWithLiterals as ReactivationReasonEnumWithLiteralsOriginal, type RecurringChargeAttemptFailed as RecurringChargeAttemptFailedOriginal, type RecurringChargeSucceeded as RecurringChargeSucceededOriginal, RefundType as RefundTypeOriginal, type RefundTypeWithLiterals as RefundTypeWithLiteralsOriginal, type Reschedule as RescheduleOriginal, type RestoreInfo as RestoreInfoOriginal, SortOrder as SortOrderOriginal, type SortOrderWithLiterals as SortOrderWithLiteralsOriginal, type Sorting as SortingOriginal, Status as StatusOriginal, type StatusWithLiterals as StatusWithLiteralsOriginal, type SubscriptionAssigned as SubscriptionAssignedOriginal, type SubscriptionAutoRenewTurnedOff as SubscriptionAutoRenewTurnedOffOriginal, type SubscriptionAutoRenewTurnedOn as SubscriptionAutoRenewTurnedOnOriginal, type SubscriptionCancelled as SubscriptionCancelledOriginal, type SubscriptionCreated as SubscriptionCreatedOriginal, type SubscriptionEventEventOneOf as SubscriptionEventEventOneOfOriginal, type SubscriptionEvent as SubscriptionEventOriginal, type SubscriptionNearEndOfPeriod as SubscriptionNearEndOfPeriodOriginal, type Subscription as SubscriptionOriginal, type SubscriptionPendingChange as SubscriptionPendingChangeOriginal, SubscriptionStatus as SubscriptionStatusOriginal, type SubscriptionStatusWithLiterals as SubscriptionStatusWithLiteralsOriginal, type SubscriptionTransferred as SubscriptionTransferredOriginal, type SubscriptionUnassigned as SubscriptionUnassignedOriginal, type TaskActionActionOneOf as TaskActionActionOneOfOriginal, type TaskAction as TaskActionOriginal, type TaskKey as TaskKeyOriginal, type Task as TaskOriginal, type UnassignProductInstanceFromSiteRequest as UnassignProductInstanceFromSiteRequestOriginal, type UnassignProductInstanceFromSiteResponse as UnassignProductInstanceFromSiteResponseOriginal, UnassignReason as UnassignReasonOriginal, type UnassignReasonWithLiterals as UnassignReasonWithLiteralsOriginal, type UnassignedProductInstanceFromSite as UnassignedProductInstanceFromSiteOriginal, type UpdatePackageExternalIdRequest as UpdatePackageExternalIdRequestOriginal, type UpdatePackageExternalIdResponse as UpdatePackageExternalIdResponseOriginal, type UpdateProductInstanceRequest as UpdateProductInstanceRequestOriginal, type UpdateProductInstanceResponse as UpdateProductInstanceResponseOriginal, WebhookIdentityType as WebhookIdentityTypeOriginal, type WebhookIdentityTypeWithLiterals as WebhookIdentityTypeWithLiteralsOriginal, type __PublicMethodMetaInfo, adjustProductInstanceSpecifications, assignProductInstanceToSite, cancelPackage, cancelProductInstance, createPackage, createPackageV2, getPackage, queryPackages, unassignProductInstanceFromSite, updatePackageExternalId };
|