@wix/auto_sdk_subscription_subscriptions 1.0.15 → 1.0.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/build/cjs/index.d.ts +1 -1
  2. package/build/cjs/index.js +96 -0
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/index.typings.d.ts +9 -1
  5. package/build/cjs/index.typings.js +96 -0
  6. package/build/cjs/index.typings.js.map +1 -1
  7. package/build/cjs/meta.d.ts +1957 -348
  8. package/build/cjs/meta.js +447 -0
  9. package/build/cjs/meta.js.map +1 -1
  10. package/build/es/index.d.mts +1 -1
  11. package/build/es/index.mjs +96 -0
  12. package/build/es/index.mjs.map +1 -1
  13. package/build/es/index.typings.d.mts +9 -1
  14. package/build/es/index.typings.mjs +96 -0
  15. package/build/es/index.typings.mjs.map +1 -1
  16. package/build/es/meta.d.mts +1957 -348
  17. package/build/es/meta.mjs +410 -0
  18. package/build/es/meta.mjs.map +1 -1
  19. package/build/internal/cjs/index.d.ts +1 -1
  20. package/build/internal/cjs/index.js +96 -0
  21. package/build/internal/cjs/index.js.map +1 -1
  22. package/build/internal/cjs/index.typings.d.ts +9 -1
  23. package/build/internal/cjs/index.typings.js +96 -0
  24. package/build/internal/cjs/index.typings.js.map +1 -1
  25. package/build/internal/cjs/meta.d.ts +1957 -348
  26. package/build/internal/cjs/meta.js +447 -0
  27. package/build/internal/cjs/meta.js.map +1 -1
  28. package/build/internal/es/index.d.mts +1 -1
  29. package/build/internal/es/index.mjs +96 -0
  30. package/build/internal/es/index.mjs.map +1 -1
  31. package/build/internal/es/index.typings.d.mts +9 -1
  32. package/build/internal/es/index.typings.mjs +96 -0
  33. package/build/internal/es/index.typings.mjs.map +1 -1
  34. package/build/internal/es/meta.d.mts +1957 -348
  35. package/build/internal/es/meta.mjs +410 -0
  36. package/build/internal/es/meta.mjs.map +1 -1
  37. package/package.json +3 -3
@@ -732,6 +732,15 @@ interface FreeTrialData {
732
732
  */
733
733
  endDate?: Date | null;
734
734
  }
735
+ interface UpdateBillingDateData {
736
+ /**
737
+ * Date until the subscription is paid for.
738
+ * Different from `nextBillingDate` only when the next billing date is updated without immediately issuing a new invoice.
739
+ */
740
+ paidUntil?: Date | null;
741
+ /** Information about how to adjust the item's payment due to the update of the billing date */
742
+ proration?: Proration;
743
+ }
735
744
  interface Proration extends ProrationTypeOneOf {
736
745
  /**
737
746
  * BASS automatically calculates the proration amount based on the number
@@ -1642,6 +1651,171 @@ interface InitiatePaymentMethodSetupResponse {
1642
1651
  /** @format GUID */
1643
1652
  paymentOrderId?: string;
1644
1653
  }
1654
+ interface DomainEvent extends DomainEventBodyOneOf {
1655
+ createdEvent?: EntityCreatedEvent;
1656
+ updatedEvent?: EntityUpdatedEvent;
1657
+ deletedEvent?: EntityDeletedEvent;
1658
+ actionEvent?: ActionEvent;
1659
+ /** Event ID. With this ID you can easily spot duplicated events and ignore them. */
1660
+ id?: string;
1661
+ /**
1662
+ * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.
1663
+ * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
1664
+ */
1665
+ entityFqdn?: string;
1666
+ /**
1667
+ * Event action name, placed at the top level to make it easier for users to dispatch messages.
1668
+ * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
1669
+ */
1670
+ slug?: string;
1671
+ /** ID of the entity associated with the event. */
1672
+ entityId?: string;
1673
+ /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */
1674
+ eventTime?: Date | null;
1675
+ /**
1676
+ * Whether the event was triggered as a result of a privacy regulation application
1677
+ * (for example, GDPR).
1678
+ */
1679
+ triggeredByAnonymizeRequest?: boolean | null;
1680
+ /** If present, indicates the action that triggered the event. */
1681
+ originatedFrom?: string | null;
1682
+ /**
1683
+ * 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.
1684
+ * 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.
1685
+ */
1686
+ entityEventSequence?: string | null;
1687
+ }
1688
+ /** @oneof */
1689
+ interface DomainEventBodyOneOf {
1690
+ createdEvent?: EntityCreatedEvent;
1691
+ updatedEvent?: EntityUpdatedEvent;
1692
+ deletedEvent?: EntityDeletedEvent;
1693
+ actionEvent?: ActionEvent;
1694
+ }
1695
+ interface EntityCreatedEvent {
1696
+ entityAsJson?: string;
1697
+ /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */
1698
+ restoreInfo?: RestoreInfo;
1699
+ }
1700
+ interface RestoreInfo {
1701
+ deletedDate?: Date | null;
1702
+ }
1703
+ interface EntityUpdatedEvent {
1704
+ /**
1705
+ * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
1706
+ * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
1707
+ * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
1708
+ */
1709
+ currentEntityAsJson?: string;
1710
+ }
1711
+ interface EntityDeletedEvent {
1712
+ /** Entity that was deleted. */
1713
+ deletedEntityAsJson?: string | null;
1714
+ }
1715
+ interface ActionEvent {
1716
+ bodyAsJson?: string;
1717
+ }
1718
+ interface MessageEnvelope {
1719
+ /**
1720
+ * App instance ID.
1721
+ * @format GUID
1722
+ */
1723
+ instanceId?: string | null;
1724
+ /**
1725
+ * Event type.
1726
+ * @maxLength 150
1727
+ */
1728
+ eventType?: string;
1729
+ /** The identification type and identity data. */
1730
+ identity?: IdentificationData;
1731
+ /** Stringify payload. */
1732
+ data?: string;
1733
+ }
1734
+ interface IdentificationData extends IdentificationDataIdOneOf {
1735
+ /**
1736
+ * ID of a site visitor that has not logged in to the site.
1737
+ * @format GUID
1738
+ */
1739
+ anonymousVisitorId?: string;
1740
+ /**
1741
+ * ID of a site visitor that has logged in to the site.
1742
+ * @format GUID
1743
+ */
1744
+ memberId?: string;
1745
+ /**
1746
+ * ID of a Wix user (site owner, contributor, etc.).
1747
+ * @format GUID
1748
+ */
1749
+ wixUserId?: string;
1750
+ /**
1751
+ * ID of an app.
1752
+ * @format GUID
1753
+ */
1754
+ appId?: string;
1755
+ /** @readonly */
1756
+ identityType?: WebhookIdentityTypeWithLiterals;
1757
+ }
1758
+ /** @oneof */
1759
+ interface IdentificationDataIdOneOf {
1760
+ /**
1761
+ * ID of a site visitor that has not logged in to the site.
1762
+ * @format GUID
1763
+ */
1764
+ anonymousVisitorId?: string;
1765
+ /**
1766
+ * ID of a site visitor that has logged in to the site.
1767
+ * @format GUID
1768
+ */
1769
+ memberId?: string;
1770
+ /**
1771
+ * ID of a Wix user (site owner, contributor, etc.).
1772
+ * @format GUID
1773
+ */
1774
+ wixUserId?: string;
1775
+ /**
1776
+ * ID of an app.
1777
+ * @format GUID
1778
+ */
1779
+ appId?: string;
1780
+ }
1781
+ declare enum WebhookIdentityType {
1782
+ UNKNOWN = "UNKNOWN",
1783
+ ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
1784
+ MEMBER = "MEMBER",
1785
+ WIX_USER = "WIX_USER",
1786
+ APP = "APP"
1787
+ }
1788
+ /** @enumType */
1789
+ type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
1790
+ interface CreateSubscriptionInStateRequest extends CreateSubscriptionInStateRequestModeOneOf {
1791
+ activeSubscription?: CreateSubscriptionRequest;
1792
+ }
1793
+ /** @oneof */
1794
+ interface CreateSubscriptionInStateRequestModeOneOf {
1795
+ activeSubscription?: CreateSubscriptionRequest;
1796
+ }
1797
+ interface CreateSubscriptionRequest {
1798
+ subscription?: Subscription;
1799
+ /** Optional settings for the payments. Should be empty for free subscriptions. */
1800
+ paymentSettings?: PaymentSettings;
1801
+ /**
1802
+ * Optional unique identifier for this request in order to prevent subscription duplications
1803
+ * @format GUID
1804
+ */
1805
+ idempotencyKey?: string | null;
1806
+ /** Optional origin override for setting identity of subscription creator instead of extracting from context */
1807
+ originOverride?: OriginOverride;
1808
+ }
1809
+ interface OriginOverride {
1810
+ /** @format GUID */
1811
+ appId?: string;
1812
+ /** @format GUID */
1813
+ instanceId?: string;
1814
+ }
1815
+ interface CreateSubscriptionInStateResponse {
1816
+ /** @format GUID */
1817
+ subscriptionId?: string;
1818
+ }
1645
1819
  interface PayCycleRequest {
1646
1820
  /** @format GUID */
1647
1821
  subscriptionId: string;
@@ -1664,461 +1838,1802 @@ interface PayCycleResponse {
1664
1838
  paymentOrderId?: string | null;
1665
1839
  subscription?: Subscription;
1666
1840
  }
1667
- declare enum ActionInitiator {
1668
- UNDEFINED = "UNDEFINED",
1669
- BUSINESS = "BUSINESS",
1670
- CUSTOMER = "CUSTOMER",
1671
- SYSTEM = "SYSTEM"
1672
- }
1673
- /** @enumType */
1674
- type ActionInitiatorWithLiterals = ActionInitiator | 'UNDEFINED' | 'BUSINESS' | 'CUSTOMER' | 'SYSTEM';
1675
- interface SubscriptionBillingCycleStarted {
1676
- subscription?: Subscription;
1677
- /**
1678
- * Wix Pay transaction id, optional. Exists if event was triggered by a payment.
1679
- * @format GUID
1680
- */
1681
- paymentTransactionId?: string | null;
1682
- }
1683
- /**
1684
- * Sent each time a subscription status has been set to Active
1685
- * Active shows that a subscription is live and operational.
1686
- * For example:
1687
- * * For subscription with free trial, free trial start date is also the activation date.
1688
- * * For a subscription with future start date, the start date is also the activation date.
1689
- * * When a subscription is resumed from a pause status, the resume date is also the activation date.
1690
- */
1691
- interface SubscriptionActivated {
1692
- subscription?: Subscription;
1841
+ interface GetFullSubscriptionDataRequest {
1842
+ /** @format GUID */
1843
+ id?: string;
1693
1844
  }
1694
- /**
1695
- * Sent each time a subscription status has been set to Ended
1696
- * Ended shows that a subscription reached its end date and ended its life cycle as a result of the agreement.
1697
- * This is different from a Canceled subscription which ends the subscription before a designated end date.
1698
- * Therefore, Ended and Canceled are mutually exclusive.
1699
- */
1700
- interface SubscriptionEnded {
1845
+ interface GetFullSubscriptionDataResponse {
1701
1846
  subscription?: Subscription;
1847
+ internalSubscriptionData?: InternalSubscriptionData;
1702
1848
  }
1703
- interface SubscriptionInitialPurchaseCompleted {
1704
- subscription?: Subscription;
1705
- actionDetails?: ActionDetails;
1849
+ interface InternalSubscriptionData {
1706
1850
  /** @format GUID */
1707
- paymentTransactionId?: string | null;
1851
+ originInstanceId?: string;
1852
+ source?: string | null;
1853
+ billingType?: string;
1854
+ isOneTime?: boolean;
1855
+ migrationDetails?: MigrationDetails;
1856
+ pausePaidDuration?: string | null;
1857
+ authorizationPaymentData?: PaymentData;
1858
+ currentCyclePausePeriods?: PausePeriod[];
1859
+ }
1860
+ interface MigrationDetails {
1861
+ /** system (application) where the Subscription has been created */
1862
+ originSystem?: string;
1863
+ /** date when the Subscription started to be managed in BASS */
1864
+ shiftManagementDate?: Date | null;
1865
+ }
1866
+ interface PausePeriod {
1867
+ startDate?: Date | null;
1868
+ endDate?: Date | null;
1708
1869
  }
1709
- interface SubscriptionCycleReadyToPay {
1710
- subscription?: Subscription;
1870
+ interface GetSubscriptionAndInternalDataRequest {
1871
+ /** @format GUID */
1872
+ subscriptionId?: string;
1873
+ /** @format GUID */
1874
+ tenantId?: string;
1711
1875
  }
1712
- interface SubscriptionRevived {
1876
+ interface GetSubscriptionAndInternalDataResponse {
1713
1877
  subscription?: Subscription;
1878
+ internalSubscriptionData?: InternalSubscriptionData;
1714
1879
  }
1715
- interface UpdateSubscriptionBillingDateRequest {
1716
- /**
1717
- * ID of the subscription to update the billing date for.
1718
- * @format GUID
1719
- */
1720
- id: string;
1721
- /** New billing date in `YYYY-MM-DDThh:mm:ss:sssZ` format. */
1722
- billingDate: Date | null;
1723
- /**
1724
- * Information about how BASS adjusts the total of the next invoice. Extending
1725
- * the current billing cycle results in a higher payment, while shortening it
1726
- * leads to a lower payment. BASS offers automatic calculation of the proration
1727
- * amount based on the number of days added to or removed from the current billing
1728
- * cycle. Alternatively, you can use your own custom method to calculate the
1729
- * proration amount. The custom proration amount can't exceed the total of the
1730
- * current billing cycle.
1731
- */
1732
- proration?: Proration;
1733
- }
1734
- interface UpdateSubscriptionBillingDateResponse {
1735
- /** Updated subscription. */
1736
- subscription?: Subscription;
1880
+ interface SearchSubscriptionRequest {
1881
+ /** @format GUID */
1882
+ id?: string;
1883
+ /** @format GUID */
1884
+ tenantId?: string;
1737
1885
  }
1738
- interface SubscriptionBillingDateUpdated {
1886
+ interface SearchSubscriptionResponse {
1739
1887
  subscription?: Subscription;
1740
- billingDate?: Date | null;
1741
- proration?: Proration;
1742
- }
1743
- declare enum UpdateAction {
1744
- NONE = "NONE",
1745
- /** Update subscription immediately, please note proration for updates changing price are not yet supported */
1746
- IMMEDIATELY = "IMMEDIATELY",
1747
- /** Request updates that will take affect only at the start of the next billing cycle. */
1748
- NEXT_BILLING_CYCLE = "NEXT_BILLING_CYCLE",
1749
- /** Reset all pending updates */
1750
- RESET_PENDING_UPDATES = "RESET_PENDING_UPDATES",
1751
- /** Request updates that will take affect only at a specific date. */
1752
- SPECIFIC_DATE = "SPECIFIC_DATE"
1753
1888
  }
1754
- /** @enumType */
1755
- type UpdateActionWithLiterals = UpdateAction | 'NONE' | 'IMMEDIATELY' | 'NEXT_BILLING_CYCLE' | 'RESET_PENDING_UPDATES' | 'SPECIFIC_DATE';
1756
- interface ScheduleAdditionalInfo extends ScheduleAdditionalInfoParamOneOf {
1757
- /**
1758
- * Future date when the update becomes effective in `YYYY-MM-DDThh:mm:ss.sssZ`
1759
- * format. The use of this field may be restricted in various BASS endpoints.
1760
- * For example, in _Bulk Update Subscription Items_ it's only available in
1761
- * combination with `{"updateAction": "SPECIFIC_DATE"}`, in _Resume Subscription_
1762
- * only in combination with `{"resumeAt": "SPECIFIC_DATE"}`, and in
1763
- * _Pause Subscription_ only in combination with `{"pauseAt": "SPECIFIC_DATE"}`.
1764
- */
1765
- specificDate?: Date | null;
1889
+ interface UpdatePausePaidDurationRequest {
1890
+ /** @format GUID */
1891
+ subscriptionId?: string;
1766
1892
  /**
1767
- * When the update becomes effective, as number of billing cycles from now.
1768
- * The use of this field may be restricted in various BASS endpoints.
1769
- * For example, in _Pause Subscription_ it's only available in
1770
- * combination with `{"pauseAt": "NUMBER_OF_CYCLES_FROM_TODAY"}`.
1771
- * __Note__: Currently not supported in _Bulk Update Subscription Items by Filter_.
1772
1893
  * @min 1
1894
+ * @max 10000000
1773
1895
  */
1774
- numberOfCycles?: number;
1896
+ pausePaidDurationSeconds?: string;
1897
+ /** @format GUID */
1898
+ tenantId?: string;
1775
1899
  }
1776
- /** @oneof */
1777
- interface ScheduleAdditionalInfoParamOneOf {
1778
- /**
1779
- * Future date when the update becomes effective in `YYYY-MM-DDThh:mm:ss.sssZ`
1780
- * format. The use of this field may be restricted in various BASS endpoints.
1781
- * For example, in _Bulk Update Subscription Items_ it's only available in
1782
- * combination with `{"updateAction": "SPECIFIC_DATE"}`, in _Resume Subscription_
1783
- * only in combination with `{"resumeAt": "SPECIFIC_DATE"}`, and in
1784
- * _Pause Subscription_ only in combination with `{"pauseAt": "SPECIFIC_DATE"}`.
1785
- */
1786
- specificDate?: Date | null;
1787
- /**
1788
- * When the update becomes effective, as number of billing cycles from now.
1789
- * The use of this field may be restricted in various BASS endpoints.
1790
- * For example, in _Pause Subscription_ it's only available in
1791
- * combination with `{"pauseAt": "NUMBER_OF_CYCLES_FROM_TODAY"}`.
1792
- * __Note__: Currently not supported in _Bulk Update Subscription Items by Filter_.
1793
- * @min 1
1794
- */
1795
- numberOfCycles?: number;
1900
+ interface UpdatePausePaidDurationResponse {
1796
1901
  }
1797
- interface CancelSubscriptionRequest {
1902
+ interface UpdateStatusRequest {
1798
1903
  /** @format GUID */
1799
- id: string;
1800
- actionContext: ActionContext;
1801
- }
1802
- interface ActionContext {
1803
- initiator?: ActionInitiatorWithLiterals;
1804
- /** Optional action reason message */
1805
- reason?: string | null;
1904
+ subscriptionId?: string;
1905
+ /** @format GUID */
1906
+ tenantId?: string;
1907
+ status?: SubscriptionStatusEnumSubscriptionStatusWithLiterals;
1806
1908
  }
1807
- interface CancelSubscriptionResponse {
1909
+ interface UpdateStatusResponse {
1808
1910
  subscription?: Subscription;
1809
1911
  }
1810
- interface PauseSubscriptionRequest {
1912
+ interface UpdatePaymentStatusRequest {
1811
1913
  /** @format GUID */
1812
- id: string;
1813
- pausePolicy?: PausePolicyWithLiterals;
1814
- pauseAt?: PauseAtWithLiterals;
1815
- /** contains additional scheduling information for certain pause_at options (for example: SPECIFIC_DATE & NUMBER_OF_CYCLES_FROM_TODAY) */
1816
- pauseAtSchedule?: ScheduleAdditionalInfo;
1817
- /** contains additional scheduling information for certain auto_resume_at either specific date */
1818
- autoResumeAtSchedule?: ScheduleAdditionalInfo;
1819
- actionContext: ActionContext;
1914
+ subscriptionId?: string;
1915
+ /** @format GUID */
1916
+ tenantId?: string;
1917
+ paymentStatus?: PaymentStatusWithLiterals;
1820
1918
  }
1821
- interface PauseSubscriptionResponse {
1919
+ interface UpdatePaymentStatusResponse {
1822
1920
  subscription?: Subscription;
1823
1921
  }
1824
- interface SubscriptionPaused {
1825
- subscription?: Subscription;
1826
- pausePolicy?: PausePolicyWithLiterals;
1827
- actionDetails?: ActionDetails;
1922
+ interface ReviveSubscriptionRequest {
1923
+ /** @format GUID */
1924
+ tenantId?: string;
1925
+ /** @format GUID */
1926
+ subscriptionId?: string;
1927
+ revivePolicy?: RevivePolicyWithLiterals;
1928
+ isTestRun?: boolean;
1828
1929
  }
1829
- interface PauseSubscriptionRequested {
1930
+ declare enum RevivePolicy {
1931
+ SIMPLE = "SIMPLE",
1932
+ RESUME = "RESUME"
1933
+ }
1934
+ /** @enumType */
1935
+ type RevivePolicyWithLiterals = RevivePolicy | 'SIMPLE' | 'RESUME';
1936
+ interface ReviveSubscriptionResponse {
1830
1937
  subscription?: Subscription;
1831
- pauseAt?: PauseAtWithLiterals;
1832
- pausePolicy?: PausePolicyWithLiterals;
1833
- actionDetails?: ActionDetails;
1834
1938
  }
1835
- interface ScheduledPauseCanceled {
1939
+ interface ConvertSapiRequest {
1940
+ /** @format GUID */
1941
+ subscriptionId?: string;
1942
+ }
1943
+ interface ConvertSapiResponse {
1836
1944
  subscription?: Subscription;
1837
- actionDetails?: ActionDetails;
1838
1945
  }
1839
- interface ResumeSubscriptionRequest {
1946
+ interface GetSubscriptionInvoicesRequest {
1840
1947
  /** @format GUID */
1841
- id: string;
1842
- resumeAt?: ResumeAtWithLiterals;
1843
- /** contains additional scheduling information for certain resume_at options (for example: SPECIFIC_DATE) */
1844
- resumeAtSchedule?: ScheduleAdditionalInfo;
1845
- actionContext: ActionContext;
1948
+ id?: string;
1846
1949
  }
1847
- interface ResumeSubscriptionResponse {
1950
+ interface GetSubscriptionInvoicesResponse {
1951
+ invoices?: SubscriptionInvoice[];
1952
+ }
1953
+ interface SubscriptionInvoice {
1954
+ /** @format GUID */
1955
+ id?: string;
1956
+ subscriptionCycle?: number;
1957
+ createdDate?: Date | null;
1958
+ }
1959
+ interface FinishFreeTrialNowRequest {
1960
+ /** @format GUID */
1961
+ subscriptionId?: string;
1962
+ /** @format GUID */
1963
+ tenantId?: string;
1964
+ }
1965
+ interface FinishFreeTrialNowResponse {
1848
1966
  subscription?: Subscription;
1849
1967
  }
1850
- interface SubscriptionResumed {
1968
+ interface FixSubscriptionTimeCapsuleTasksRequest {
1969
+ /** @format GUID */
1970
+ subscriptionId?: string;
1971
+ /** @format GUID */
1972
+ tenantId?: string;
1973
+ }
1974
+ interface FixSubscriptionTimeCapsuleTasksResponse {
1975
+ }
1976
+ interface SendTimeCapsuleTaskCanceledBIRequest {
1977
+ /** @format GUID */
1978
+ tenantId?: string;
1979
+ /** @format GUID */
1980
+ subscriptionId?: string;
1981
+ /** @minLength 1 */
1982
+ taskType?: string;
1983
+ }
1984
+ interface Empty {
1985
+ }
1986
+ interface ScheduleTimeCapsuleTaskRequest {
1987
+ /** @format GUID */
1988
+ subscriptionId?: string;
1989
+ /** @minLength 1 */
1990
+ taskType?: string;
1991
+ executionTime?: Date | null;
1992
+ /** @format GUID */
1993
+ tenantId?: string;
1994
+ }
1995
+ interface CancelTimeCapsuleTaskRequest {
1996
+ /** @format GUID */
1997
+ tenantId?: string;
1998
+ /** @format GUID */
1999
+ subscriptionId?: string;
2000
+ /** @minLength 1 */
2001
+ taskType?: string;
2002
+ }
2003
+ interface UpdateFullSubscriptionRequest {
2004
+ /** @format GUID */
2005
+ tenantId?: string;
1851
2006
  subscription?: Subscription;
1852
- actionDetails?: ActionDetails;
1853
2007
  }
1854
- interface ResumeSubscriptionRequested {
2008
+ interface UpdateFullSubscriptionResponse {
1855
2009
  subscription?: Subscription;
1856
- resumeAt?: ResumeAtWithLiterals;
1857
- actionDetails?: ActionDetails;
1858
2010
  }
1859
- interface ScheduledResumeCanceled {
2011
+ interface UpdateSubscriptionInvoiceCycleRequest {
2012
+ /** @format GUID */
2013
+ subscriptionId?: string;
2014
+ /** @format GUID */
2015
+ tenantId?: string;
2016
+ /** @format GUID */
2017
+ invoiceId?: string;
2018
+ subscriptionCycle?: number;
2019
+ }
2020
+ interface UpdateSubscriptionInvoiceCycleResponse {
2021
+ subscriptionInvoice?: SubscriptionInvoice;
2022
+ }
2023
+ interface AddPausePeriodRequest {
2024
+ /** @format GUID */
2025
+ tenantId?: string;
2026
+ /** @format GUID */
2027
+ subscriptionId?: string;
2028
+ pauseStartDate?: Date | null;
2029
+ pauseEndDate?: Date | null;
2030
+ }
2031
+ interface AddPausePeriodResponse {
1860
2032
  subscription?: Subscription;
1861
- actionDetails?: ActionDetails;
1862
2033
  }
1863
- interface SearchSubscriptionsRequest extends SearchSubscriptionsRequestPagingMethodOneOf {
1864
- /** Limit number of results and enable to skip rows. The default limit is 25. */
1865
- paging?: Paging;
1866
- /** A Cursor option for efficient paging. Pass this field from the previous search response to continue to the next page. */
1867
- cursor?: CursorPaging;
1868
- /** A filter object */
1869
- filter?: any;
1870
- /** A Sorting option by field name and order. */
1871
- sorting?: SortingClauses;
2034
+ interface RunTimeCapsuleTaskNowRequest {
2035
+ /** @format GUID */
2036
+ tenantId?: string;
2037
+ /** @format GUID */
2038
+ subscriptionId?: string;
2039
+ /** @minLength 1 */
2040
+ taskType?: string;
2041
+ }
2042
+ interface CreateRecurringInvoiceBORequest {
2043
+ /** @format GUID */
2044
+ subscriptionId?: string;
2045
+ /** @format GUID */
2046
+ tenantId?: string;
2047
+ /** @min 2 */
2048
+ cycleNumber?: number;
2049
+ }
2050
+ interface CreateRecurringInvoiceBOResponse {
2051
+ invoiceId?: string;
2052
+ }
2053
+ interface SetShiftingDataRequest {
2054
+ /** @format GUID */
2055
+ subscriptionId?: string;
2056
+ /** @format GUID */
2057
+ tenantId?: string;
2058
+ isBassManaged?: boolean;
2059
+ shiftManagementDate?: Date | null;
2060
+ }
2061
+ interface SetShiftingDataResponse {
2062
+ subscription?: Subscription;
2063
+ }
2064
+ interface FixSubscriptionInvoicesRequest extends FixSubscriptionInvoicesRequestModeOneOf {
2065
+ attachInvoice?: AttachInvoice;
2066
+ detachInvoice?: DetachInvoice;
2067
+ /** @format GUID */
2068
+ tenantId?: string;
2069
+ /** @format GUID */
2070
+ subscriptionId?: string;
1872
2071
  }
1873
2072
  /** @oneof */
1874
- interface SearchSubscriptionsRequestPagingMethodOneOf {
1875
- /** Limit number of results and enable to skip rows. The default limit is 25. */
1876
- paging?: Paging;
1877
- /** A Cursor option for efficient paging. Pass this field from the previous search response to continue to the next page. */
1878
- cursor?: CursorPaging;
2073
+ interface FixSubscriptionInvoicesRequestModeOneOf {
2074
+ attachInvoice?: AttachInvoice;
2075
+ detachInvoice?: DetachInvoice;
1879
2076
  }
1880
- interface SortingClauses {
1881
- sorting?: Sorting[];
2077
+ interface AttachInvoice {
2078
+ /** @format GUID */
2079
+ invoiceId?: string;
1882
2080
  }
1883
- interface SearchSubscriptionsResponse {
1884
- subscriptions?: Subscription[];
1885
- cursor?: CursorPaging;
1886
- pagingMetadata?: CursorPagingMetadata;
2081
+ interface DetachInvoice {
2082
+ /** @format GUID */
2083
+ invoiceId?: string;
1887
2084
  }
1888
- interface CursorPagingMetadata {
1889
- /** Total number of items matching the filter. Available only on the first page of *Search* */
1890
- total?: number | null;
2085
+ interface FixSubscriptionInvoicesResponse {
2086
+ invoices?: SubscriptionInvoice[];
1891
2087
  }
1892
- interface TurnOnSubscriptionAutoRenewalRequest {
2088
+ interface RestoreDraftSubscriptionRequest {
1893
2089
  /** @format GUID */
1894
- id: string;
1895
- actionContext: ActionContext;
2090
+ tenantId?: string;
2091
+ /** @format GUID */
2092
+ subscriptionId?: string;
1896
2093
  }
1897
- interface TurnOnSubscriptionAutoRenewalResponse {
2094
+ interface RestoreDraftSubscriptionResponse {
1898
2095
  subscription?: Subscription;
1899
2096
  }
1900
- interface SubscriptionAutoRenewalTurnedOn {
2097
+ interface DeleteDraftSubscriptionRequest {
2098
+ /** @format GUID */
2099
+ tenantId?: string;
2100
+ /** @format GUID */
2101
+ subscriptionId?: string;
2102
+ }
2103
+ interface DeleteDraftSubscriptionResponse {
1901
2104
  subscription?: Subscription;
1902
- actionDetails?: ActionDetails;
1903
2105
  }
1904
- interface TurnOffSubscriptionAutoRenewalRequest {
2106
+ interface DeleteSubscriptionBORequest {
1905
2107
  /** @format GUID */
1906
- id: string;
1907
- actionContext: ActionContext;
2108
+ tenantId?: string;
2109
+ /** @format GUID */
2110
+ subscriptionId?: string;
1908
2111
  }
1909
- interface TurnOffSubscriptionAutoRenewalResponse {
2112
+ interface DeleteSubscriptionBOResponse {
1910
2113
  subscription?: Subscription;
1911
2114
  }
1912
- interface SubscriptionAutoRenewalTurnedOff {
2115
+ interface CancelSubscriptionBORequest {
2116
+ /** @format GUID */
2117
+ tenantId?: string;
2118
+ /** @format GUID */
2119
+ subscriptionId?: string;
2120
+ initiator?: ActionInitiatorWithLiterals;
2121
+ reason?: string | null;
2122
+ }
2123
+ declare enum ActionInitiator {
2124
+ UNDEFINED = "UNDEFINED",
2125
+ BUSINESS = "BUSINESS",
2126
+ CUSTOMER = "CUSTOMER",
2127
+ SYSTEM = "SYSTEM"
2128
+ }
2129
+ /** @enumType */
2130
+ type ActionInitiatorWithLiterals = ActionInitiator | 'UNDEFINED' | 'BUSINESS' | 'CUSTOMER' | 'SYSTEM';
2131
+ interface CancelSubscriptionBOResponse {
2132
+ subscription?: Subscription;
2133
+ }
2134
+ interface UpdatePaymentMethodBORequest {
2135
+ /** @format GUID */
2136
+ tenantId?: string;
2137
+ /** @format GUID */
2138
+ subscriptionId?: string;
2139
+ /** @format GUID */
2140
+ paymentMethodId?: string;
2141
+ }
2142
+ interface UpdatePaymentMethodBOResponse {
2143
+ subscription?: Subscription;
2144
+ }
2145
+ interface SendSubscriptionActionEventBORequest extends SendSubscriptionActionEventBORequestEventOneOf {
2146
+ billingCycleStarted?: SubscriptionBillingCycleStarted;
2147
+ /** @format GUID */
2148
+ tenantId?: string;
2149
+ /** @format GUID */
2150
+ subscriptionId?: string;
2151
+ }
2152
+ /** @oneof */
2153
+ interface SendSubscriptionActionEventBORequestEventOneOf {
2154
+ billingCycleStarted?: SubscriptionBillingCycleStarted;
2155
+ }
2156
+ interface SubscriptionBillingCycleStarted {
2157
+ subscription?: Subscription;
2158
+ /**
2159
+ * Wix Pay transaction id, optional. Exists if event was triggered by a payment.
2160
+ * @format GUID
2161
+ */
2162
+ paymentTransactionId?: string | null;
2163
+ }
2164
+ interface SendSubscriptionActionEventResponse {
2165
+ }
2166
+ interface HandleSubscriptionAfterInvoiceMarkedAsPaidRequest {
2167
+ /** @format GUID */
2168
+ tenantId?: string;
2169
+ /** @format GUID */
2170
+ subscriptionId?: string;
2171
+ transactionId?: string;
2172
+ }
2173
+ interface PauseSubscriptionBORequest {
2174
+ /** @format GUID */
2175
+ tenantId?: string;
2176
+ /** @format GUID */
2177
+ subscriptionId?: string;
2178
+ pausePolicy?: PausePolicyWithLiterals;
2179
+ pauseAt?: PauseAtWithLiterals;
2180
+ initiator?: ActionInitiatorWithLiterals;
2181
+ /** @maxLength 500 */
2182
+ reason?: string | null;
2183
+ }
2184
+ interface PauseSubscriptionBOResponse {
2185
+ subscription?: Subscription;
2186
+ }
2187
+ interface FixSubscriptionInvoicesConsistencyRequest {
2188
+ /** @format GUID */
2189
+ tenantId?: string;
2190
+ /** @format GUID */
2191
+ subscriptionId?: string;
2192
+ }
2193
+ interface FixSubscriptionInvoicesConsistencyResponse {
2194
+ }
2195
+ interface SetIsMigratedEvent {
2196
+ /** @format GUID */
2197
+ subscriptionId?: string;
2198
+ }
2199
+ interface SubscriptionDelayedSyncEvent {
2200
+ /** @format GUID */
2201
+ subscriptionId?: string;
2202
+ }
2203
+ interface InvoiceAction extends InvoiceActionActionTypeOneOf {
2204
+ payRecurring?: PayRecurringInvoice;
2205
+ }
2206
+ /** @oneof */
2207
+ interface InvoiceActionActionTypeOneOf {
2208
+ payRecurring?: PayRecurringInvoice;
2209
+ }
2210
+ interface PayRecurringInvoice {
2211
+ /** @format GUID */
2212
+ invoiceId?: string;
2213
+ }
2214
+ /**
2215
+ * Sent each time a subscription status has been set to Active
2216
+ * Active shows that a subscription is live and operational.
2217
+ * For example:
2218
+ * * For subscription with free trial, free trial start date is also the activation date.
2219
+ * * For a subscription with future start date, the start date is also the activation date.
2220
+ * * When a subscription is resumed from a pause status, the resume date is also the activation date.
2221
+ */
2222
+ interface SubscriptionActivated {
2223
+ subscription?: Subscription;
2224
+ }
2225
+ /**
2226
+ * Sent each time a subscription status has been set to Ended
2227
+ * Ended shows that a subscription reached its end date and ended its life cycle as a result of the agreement.
2228
+ * This is different from a Canceled subscription which ends the subscription before a designated end date.
2229
+ * Therefore, Ended and Canceled are mutually exclusive.
2230
+ */
2231
+ interface SubscriptionEnded {
2232
+ subscription?: Subscription;
2233
+ }
2234
+ interface SubscriptionInitialPurchaseCompleted {
1913
2235
  subscription?: Subscription;
1914
2236
  actionDetails?: ActionDetails;
2237
+ /** @format GUID */
2238
+ paymentTransactionId?: string | null;
1915
2239
  }
1916
- interface MarkLatestInvoiceAsPaidRequest {
2240
+ interface SubscriptionCycleReadyToPay {
2241
+ subscription?: Subscription;
2242
+ }
2243
+ interface SubscriptionRevived {
2244
+ subscription?: Subscription;
2245
+ }
2246
+ interface CreateSubscriptionResponse {
2247
+ subscription?: Subscription;
2248
+ /**
2249
+ * Payments order that should be paid (or authorize card) in order to activate subscription. Empty for free subscriptions.
2250
+ * @format GUID
2251
+ */
2252
+ paymentOrderId?: string | null;
2253
+ }
2254
+ interface UpdateSubscriptionRequest {
2255
+ /** Revision is validated if Subscription.revision is set */
2256
+ subscription?: Subscription;
2257
+ /**
2258
+ * Supported field: start_date
2259
+ * Can be updated only if Subscription is in Draft state
2260
+ */
2261
+ fieldMask?: string[];
2262
+ }
2263
+ interface UpdateSubscriptionResponse {
2264
+ subscription?: Subscription;
2265
+ }
2266
+ interface UpdateSubscriptionStartDateRequest {
2267
+ /**
2268
+ * Subscription ID
2269
+ * @format GUID
2270
+ */
2271
+ id?: string;
2272
+ /**
2273
+ * Can be updated only if Subscription is in Draft state
2274
+ * By setting start_date in the future, end_date will be recalculated for termed Subscriptions
2275
+ * cycles_to_pay_on_creation will be set to 1 if no free trial is set
2276
+ */
2277
+ startDate?: Date | null;
2278
+ }
2279
+ interface UpdateSubscriptionStartDateResponse {
2280
+ subscription?: Subscription;
2281
+ }
2282
+ interface BassToSapiPaypalMigrationRequest {
2283
+ /**
2284
+ * Subscription ID
2285
+ * @format GUID
2286
+ */
2287
+ id?: string;
2288
+ collectionMethod?: CollectionMethodEnumCollectionMethodWithLiterals;
2289
+ }
2290
+ interface BassToSapiPaypalMigrationResponse {
2291
+ subscription?: Subscription;
2292
+ }
2293
+ interface UpdateSubscriptionPoliciesRequest {
2294
+ /**
2295
+ * Subscription ID
2296
+ * @format GUID
2297
+ */
2298
+ id?: string;
2299
+ cancellableByCustomer?: boolean | null;
2300
+ }
2301
+ interface UpdateSubscriptionPoliciesResponse {
2302
+ /** Updated policies of the subscription */
2303
+ policies?: SubscriptionPolicies;
2304
+ }
2305
+ interface UpdateSubscriptionBillingDateRequest {
2306
+ /**
2307
+ * ID of the subscription to update the billing date for.
2308
+ * @format GUID
2309
+ */
2310
+ id: string;
2311
+ /** New billing date in `YYYY-MM-DDThh:mm:ss:sssZ` format. */
2312
+ billingDate: Date | null;
2313
+ /**
2314
+ * Information about how BASS adjusts the total of the next invoice. Extending
2315
+ * the current billing cycle results in a higher payment, while shortening it
2316
+ * leads to a lower payment. BASS offers automatic calculation of the proration
2317
+ * amount based on the number of days added to or removed from the current billing
2318
+ * cycle. Alternatively, you can use your own custom method to calculate the
2319
+ * proration amount. The custom proration amount can't exceed the total of the
2320
+ * current billing cycle.
2321
+ */
2322
+ proration?: Proration;
2323
+ }
2324
+ interface UpdateSubscriptionBillingDateResponse {
2325
+ /** Updated subscription. */
2326
+ subscription?: Subscription;
2327
+ }
2328
+ interface SubscriptionBillingDateUpdated {
2329
+ subscription?: Subscription;
2330
+ billingDate?: Date | null;
2331
+ proration?: Proration;
2332
+ }
2333
+ interface UpdateSubscriptionOriginRequest {
2334
+ /**
2335
+ * ID of the subscription to update origin.
2336
+ * @format GUID
2337
+ */
2338
+ id?: string;
2339
+ /**
2340
+ * Origin entity ID of the subscription to update.
2341
+ * @format GUID
2342
+ */
2343
+ entityId?: string;
2344
+ }
2345
+ interface UpdateSubscriptionOriginResponse {
2346
+ /** Updated subscription. */
2347
+ subscription?: Subscription;
2348
+ }
2349
+ interface ReviseSubscriptionRequest {
2350
+ /**
2351
+ * Subscription ID
2352
+ * @format GUID
2353
+ */
2354
+ id?: string;
2355
+ /**
2356
+ * 0 for no revision, maxSize is 100
2357
+ * @maxSize 100
2358
+ */
2359
+ items?: Item[];
2360
+ }
2361
+ interface ReviseSubscriptionResponse {
2362
+ subscription?: Subscription;
2363
+ }
2364
+ interface UpdateSubscriptionItemsRequest {
2365
+ /**
2366
+ * Subscription ID
2367
+ * @format GUID
2368
+ */
2369
+ id?: string;
2370
+ /** Update action. For RESET_PENDING_UPDATES, nothing but the subscription ID should be defined in the request. */
2371
+ updateAction?: UpdateActionWithLiterals;
2372
+ /** Updates execution date. Relevant only for UpdateAction.SPECIFIC_DATE. Only specific date is supported. */
2373
+ scheduleAdditionalInfo?: ScheduleAdditionalInfo;
2374
+ /**
2375
+ * Existing items to update
2376
+ * @maxSize 100
2377
+ */
2378
+ itemsToUpdate?: ItemChange[];
2379
+ /**
2380
+ * Items to add
2381
+ * @maxSize 99
2382
+ */
2383
+ itemsToAdd?: Item[];
2384
+ /**
2385
+ * Existing items to delete
2386
+ * @format GUID
2387
+ * @maxSize 99
2388
+ */
2389
+ itemsToDelete?: string[] | null;
2390
+ }
2391
+ declare enum UpdateAction {
2392
+ NONE = "NONE",
2393
+ /** Update subscription immediately, please note proration for updates changing price are not yet supported */
2394
+ IMMEDIATELY = "IMMEDIATELY",
2395
+ /** Request updates that will take affect only at the start of the next billing cycle. */
2396
+ NEXT_BILLING_CYCLE = "NEXT_BILLING_CYCLE",
2397
+ /** Reset all pending updates */
2398
+ RESET_PENDING_UPDATES = "RESET_PENDING_UPDATES",
2399
+ /** Request updates that will take affect only at a specific date. */
2400
+ SPECIFIC_DATE = "SPECIFIC_DATE"
2401
+ }
2402
+ /** @enumType */
2403
+ type UpdateActionWithLiterals = UpdateAction | 'NONE' | 'IMMEDIATELY' | 'NEXT_BILLING_CYCLE' | 'RESET_PENDING_UPDATES' | 'SPECIFIC_DATE';
2404
+ interface ScheduleAdditionalInfo extends ScheduleAdditionalInfoParamOneOf {
2405
+ /**
2406
+ * Future date when the update becomes effective in `YYYY-MM-DDThh:mm:ss.sssZ`
2407
+ * format. The use of this field may be restricted in various BASS endpoints.
2408
+ * For example, in _Bulk Update Subscription Items_ it's only available in
2409
+ * combination with `{"updateAction": "SPECIFIC_DATE"}`, in _Resume Subscription_
2410
+ * only in combination with `{"resumeAt": "SPECIFIC_DATE"}`, and in
2411
+ * _Pause Subscription_ only in combination with `{"pauseAt": "SPECIFIC_DATE"}`.
2412
+ */
2413
+ specificDate?: Date | null;
2414
+ /**
2415
+ * When the update becomes effective, as number of billing cycles from now.
2416
+ * The use of this field may be restricted in various BASS endpoints.
2417
+ * For example, in _Pause Subscription_ it's only available in
2418
+ * combination with `{"pauseAt": "NUMBER_OF_CYCLES_FROM_TODAY"}`.
2419
+ * __Note__: Currently not supported in _Bulk Update Subscription Items by Filter_.
2420
+ * @min 1
2421
+ */
2422
+ numberOfCycles?: number;
2423
+ }
2424
+ /** @oneof */
2425
+ interface ScheduleAdditionalInfoParamOneOf {
2426
+ /**
2427
+ * Future date when the update becomes effective in `YYYY-MM-DDThh:mm:ss.sssZ`
2428
+ * format. The use of this field may be restricted in various BASS endpoints.
2429
+ * For example, in _Bulk Update Subscription Items_ it's only available in
2430
+ * combination with `{"updateAction": "SPECIFIC_DATE"}`, in _Resume Subscription_
2431
+ * only in combination with `{"resumeAt": "SPECIFIC_DATE"}`, and in
2432
+ * _Pause Subscription_ only in combination with `{"pauseAt": "SPECIFIC_DATE"}`.
2433
+ */
2434
+ specificDate?: Date | null;
2435
+ /**
2436
+ * When the update becomes effective, as number of billing cycles from now.
2437
+ * The use of this field may be restricted in various BASS endpoints.
2438
+ * For example, in _Pause Subscription_ it's only available in
2439
+ * combination with `{"pauseAt": "NUMBER_OF_CYCLES_FROM_TODAY"}`.
2440
+ * __Note__: Currently not supported in _Bulk Update Subscription Items by Filter_.
2441
+ * @min 1
2442
+ */
2443
+ numberOfCycles?: number;
2444
+ }
2445
+ interface UpdateSubscriptionItemsResponse {
2446
+ subscription?: Subscription;
2447
+ }
2448
+ interface BulkUpdateSubscriptionItemsByFilterRequest {
2449
+ /**
2450
+ * Filter to identify the subscriptions for which items are updated. For
2451
+ * supported fields see
2452
+ * [Search and Query: Bulk Update Subscription Items By Filter](https://bo.wix.com/wix-docs/rest/drafts/subscriptions-by-billing-by-wix/search-and-query#drafts_subscriptions-by-billing-by-wix_search-and-query_bulk-update-subscription-items-by-filter).
2453
+ * Sending an empty subscription filter results in a validation error.
2454
+ * In case you pass `{"updateAction": "RESET_PENDING_UPDATES"}`, use only the
2455
+ * `subscriptionId` field inside this filter. Passing any other filter results
2456
+ * in a failed validation error.
2457
+ */
2458
+ subscriptionFilter?: Record<string, any> | null;
2459
+ /**
2460
+ * Filter to specify which subscription items are updated. Make sure to use
2461
+ * the catalog item ID and not the item's unique ID. All subscription items
2462
+ * with matching `items.catalogReference.catalogItemId` are updated.
2463
+ *
2464
+ * Max: `100` reference catalog item IDs
2465
+ * @format GUID
2466
+ * @maxSize 100
2467
+ */
2468
+ catalogReferenceIds?: string[] | null;
2469
+ /**
2470
+ * Information about the update timing and update type.
2471
+ *
2472
+ * + `"IMMEDIATELY"`: The updates become effective immediately.
2473
+ * + `"NEXT_BILLING_CYCLE"`: The updates are scheduled for the beginning of the next billing cycle.
2474
+ * + `"SPECIFIC_DATE"`: The updates are scheduled for the date specified in `scheduleAdditionalInfo.specificDate`.
2475
+ * + `"RESET_PENDING_UPDATES"`: All currently scheduled updates for the specified supcriptions are canceled. Use only the `subscriptionId` field inside `subscriptionFilter`, all other filters result in failed validation errors.
2476
+ */
2477
+ updateAction?: UpdateActionWithLiterals;
2478
+ /**
2479
+ * Additional information for updates. Currently, only supported for
2480
+ * `{"updateAction": "SPECIFIC_DATE"}`.
2481
+ */
2482
+ scheduleAdditionalInfo?: ScheduleAdditionalInfo;
2483
+ /**
2484
+ * Update details for the susbcription items that match the filtering.
2485
+ * Currently, you can update only the item price, quantity, and tax. Note
2486
+ * that all item properties are updated to the same values. In case you want set
2487
+ * different values for individual items, you must call
2488
+ * _Bulk Update Subscription Items By Filter_ multiple times, once per unique update.
2489
+ */
2490
+ bulkItemUpdateData?: BulkItemChange;
2491
+ /**
2492
+ * __Not implemented yet__. Items to add to the subscriptions matching the filtering.
2493
+ * @maxSize 99
2494
+ */
2495
+ itemsToAdd?: Item[];
2496
+ }
2497
+ interface BulkItemChange {
2498
+ /** Information about the new item price. */
2499
+ pricingModel?: PricingModel;
2500
+ /**
2501
+ * New item quantity.
2502
+ *
2503
+ * Min: `1`
2504
+ * @min 1
2505
+ */
2506
+ quantity?: number | null;
2507
+ /** Information about the new item tax. */
2508
+ tax?: Tax;
2509
+ }
2510
+ interface BulkUpdateSubscriptionItemsByFilterResponse {
2511
+ /**
2512
+ * ID of your bulk job. You can use
2513
+ * [this Async Infra call](https://pbo.wix.com/fire-console/?artifact=com.wixpress.asyncinfra.async-job-service&service=wix.infra.asyncjobs.v1.AsyncJobService&method=ListAsyncJobItems&body=eyJqb2JfaWQiOiIifQ%3D%3D)
2514
+ * to retrieve information about the job status.
2515
+ */
2516
+ jobId?: string;
2517
+ }
2518
+ interface DeleteSubscriptionRequest {
2519
+ /** @format GUID */
2520
+ id?: string;
2521
+ revision?: string;
2522
+ }
2523
+ interface DeleteSubscriptionResponse {
2524
+ }
2525
+ interface CancelSubscriptionRequest {
2526
+ /** @format GUID */
2527
+ id: string;
2528
+ actionContext: ActionContext;
2529
+ }
2530
+ interface ActionContext {
2531
+ initiator?: ActionInitiatorWithLiterals;
2532
+ /** Optional action reason message */
2533
+ reason?: string | null;
2534
+ }
2535
+ interface CancelSubscriptionResponse {
2536
+ subscription?: Subscription;
2537
+ }
2538
+ interface PauseSubscriptionRequest {
2539
+ /** @format GUID */
2540
+ id: string;
2541
+ pausePolicy?: PausePolicyWithLiterals;
2542
+ pauseAt?: PauseAtWithLiterals;
2543
+ /** contains additional scheduling information for certain pause_at options (for example: SPECIFIC_DATE & NUMBER_OF_CYCLES_FROM_TODAY) */
2544
+ pauseAtSchedule?: ScheduleAdditionalInfo;
2545
+ /** contains additional scheduling information for certain auto_resume_at either specific date */
2546
+ autoResumeAtSchedule?: ScheduleAdditionalInfo;
2547
+ actionContext: ActionContext;
2548
+ }
2549
+ interface PauseSubscriptionResponse {
2550
+ subscription?: Subscription;
2551
+ }
2552
+ interface SubscriptionPaused {
2553
+ subscription?: Subscription;
2554
+ pausePolicy?: PausePolicyWithLiterals;
2555
+ actionDetails?: ActionDetails;
2556
+ }
2557
+ interface PauseSubscriptionRequested {
2558
+ subscription?: Subscription;
2559
+ pauseAt?: PauseAtWithLiterals;
2560
+ pausePolicy?: PausePolicyWithLiterals;
2561
+ actionDetails?: ActionDetails;
2562
+ }
2563
+ interface ScheduledPauseCanceled {
2564
+ subscription?: Subscription;
2565
+ actionDetails?: ActionDetails;
2566
+ }
2567
+ interface ResumeSubscriptionRequest {
2568
+ /** @format GUID */
2569
+ id: string;
2570
+ resumeAt?: ResumeAtWithLiterals;
2571
+ /** contains additional scheduling information for certain resume_at options (for example: SPECIFIC_DATE) */
2572
+ resumeAtSchedule?: ScheduleAdditionalInfo;
2573
+ actionContext: ActionContext;
2574
+ }
2575
+ interface ResumeSubscriptionResponse {
2576
+ subscription?: Subscription;
2577
+ }
2578
+ interface SubscriptionResumed {
2579
+ subscription?: Subscription;
2580
+ actionDetails?: ActionDetails;
2581
+ }
2582
+ interface ResumeSubscriptionRequested {
2583
+ subscription?: Subscription;
2584
+ resumeAt?: ResumeAtWithLiterals;
2585
+ actionDetails?: ActionDetails;
2586
+ }
2587
+ interface ScheduledResumeCanceled {
2588
+ subscription?: Subscription;
2589
+ actionDetails?: ActionDetails;
2590
+ }
2591
+ interface SearchSubscriptionsRequest extends SearchSubscriptionsRequestPagingMethodOneOf {
2592
+ /** Limit number of results and enable to skip rows. The default limit is 25. */
2593
+ paging?: Paging;
2594
+ /** A Cursor option for efficient paging. Pass this field from the previous search response to continue to the next page. */
2595
+ cursor?: CursorPaging;
2596
+ /** A filter object */
2597
+ filter?: any;
2598
+ /** A Sorting option by field name and order. */
2599
+ sorting?: SortingClauses;
2600
+ }
2601
+ /** @oneof */
2602
+ interface SearchSubscriptionsRequestPagingMethodOneOf {
2603
+ /** Limit number of results and enable to skip rows. The default limit is 25. */
2604
+ paging?: Paging;
2605
+ /** A Cursor option for efficient paging. Pass this field from the previous search response to continue to the next page. */
2606
+ cursor?: CursorPaging;
2607
+ }
2608
+ interface SortingClauses {
2609
+ sorting?: Sorting[];
2610
+ }
2611
+ interface SearchSubscriptionsResponse {
2612
+ subscriptions?: Subscription[];
2613
+ cursor?: CursorPaging;
2614
+ pagingMetadata?: CursorPagingMetadata;
2615
+ }
2616
+ interface CursorPagingMetadata {
2617
+ /** Total number of items matching the filter. Available only on the first page of *Search* */
2618
+ total?: number | null;
2619
+ }
2620
+ interface TurnOnSubscriptionAutoRenewalRequest {
2621
+ /** @format GUID */
2622
+ id: string;
2623
+ actionContext: ActionContext;
2624
+ }
2625
+ interface TurnOnSubscriptionAutoRenewalResponse {
2626
+ subscription?: Subscription;
2627
+ }
2628
+ interface SubscriptionAutoRenewalTurnedOn {
2629
+ subscription?: Subscription;
2630
+ actionDetails?: ActionDetails;
2631
+ }
2632
+ interface TurnOffSubscriptionAutoRenewalRequest {
2633
+ /** @format GUID */
2634
+ id: string;
2635
+ actionContext: ActionContext;
2636
+ }
2637
+ interface TurnOffSubscriptionAutoRenewalResponse {
2638
+ subscription?: Subscription;
2639
+ }
2640
+ interface SubscriptionAutoRenewalTurnedOff {
2641
+ subscription?: Subscription;
2642
+ actionDetails?: ActionDetails;
2643
+ }
2644
+ interface MarkLatestInvoiceAsPaidRequest {
2645
+ /**
2646
+ * The ID of the offline subscription to mark as paid its latest invoice
2647
+ * @format GUID
2648
+ */
2649
+ subscriptionId: string;
2650
+ }
2651
+ interface MarkLatestInvoiceAsPaidResponse {
2652
+ subscription?: Subscription;
2653
+ }
2654
+ interface LatestInvoiceMarkedAsPaid {
2655
+ subscription?: Subscription;
2656
+ }
2657
+ interface MultipleSubscriptionsOnOrdersInvoice {
2658
+ /**
2659
+ * the invoice id of the affected subscription
2660
+ * @format GUID
2661
+ */
2662
+ invoiceId?: string;
2663
+ /**
2664
+ * the order id of the affected subscription
2665
+ * @format GUID
2666
+ */
2667
+ orderId?: string;
2668
+ }
2669
+ interface MarkBillingCycleAsPaidRequest {
2670
+ /**
2671
+ * The ID of the subscription to mark as paid its invoice.
2672
+ * @format GUID
2673
+ */
2674
+ subscriptionId: string;
2675
+ /**
2676
+ * The subscription cycle for which the invoice is to be marked as paid.
2677
+ * If left empty, the most recent cycle will be selected.
2678
+ * @min 1
2679
+ */
2680
+ paidCycle?: number | null;
2681
+ }
2682
+ interface MarkBillingCycleAsPaidResponse {
2683
+ subscription?: Subscription;
2684
+ }
2685
+ interface GetSubscriptionsStatsRequest {
2686
+ }
2687
+ interface GetSubscriptionsStatsResponse {
2688
+ amountByStatuses?: AmountByStatus[];
2689
+ total?: number;
2690
+ }
2691
+ interface AmountByStatus {
2692
+ status?: SubscriptionStatusEnumSubscriptionStatusWithLiterals;
2693
+ amount?: number;
2694
+ }
2695
+ interface ExtendSubscriptionRequest extends ExtendSubscriptionRequestExtendPolicyOneOf {
2696
+ /** User won't be charged for additional period added on top of subscription end date. */
2697
+ extensionPeriod?: Duration;
2698
+ /**
2699
+ * user will be charged for billing cycles added
2700
+ * @min 1
2701
+ */
2702
+ extensionBillingCycles?: number;
2703
+ /**
2704
+ * The ID of the subscription to be extended
2705
+ * @format GUID
2706
+ */
2707
+ id: string;
2708
+ actionContext: ActionContext;
2709
+ }
2710
+ /** @oneof */
2711
+ interface ExtendSubscriptionRequestExtendPolicyOneOf {
2712
+ /** User won't be charged for additional period added on top of subscription end date. */
2713
+ extensionPeriod?: Duration;
2714
+ /**
2715
+ * user will be charged for billing cycles added
2716
+ * @min 1
2717
+ */
2718
+ extensionBillingCycles?: number;
2719
+ }
2720
+ interface ExtendSubscriptionResponse {
2721
+ /** The now extended subscription */
2722
+ subscription?: Subscription;
2723
+ }
2724
+ interface AllowedActionsRequest {
2725
+ /** @format GUID */
2726
+ id: string;
2727
+ /**
2728
+ * List of additional fields to be included in the response.
2729
+ * @maxSize 1
2730
+ */
2731
+ fields?: RequestedFieldsWithLiterals[];
2732
+ }
2733
+ declare enum RequestedFields {
2734
+ UNKNOWN_REQUESTED_FIELD = "UNKNOWN_REQUESTED_FIELD",
2735
+ /** Include unsupported action list, including the reasons for the lack of support */
2736
+ UNSUPPORTED_ACTION = "UNSUPPORTED_ACTION"
2737
+ }
2738
+ /** @enumType */
2739
+ type RequestedFieldsWithLiterals = RequestedFields | 'UNKNOWN_REQUESTED_FIELD' | 'UNSUPPORTED_ACTION';
2740
+ interface AllowedActionsResponse {
2741
+ /** List of actions that are allowed. */
2742
+ actions?: Action[];
2743
+ /**
2744
+ * List of actions that are not supported, included only if requested. Provides reasons for each unsupported action.
2745
+ * @maxSize 20
2746
+ */
2747
+ unsupportedActions?: UnsupportedAction[];
2748
+ }
2749
+ interface UnsupportedAction {
2750
+ actionType?: ActionTypeWithLiterals;
2751
+ /**
2752
+ * Provides detailed reasons for the unsupported action. Each `UnsupportedReason` includes a code and a message explaining why the action is not allowed.
2753
+ * @maxSize 20
2754
+ */
2755
+ reasons?: UnsupportedReason[];
2756
+ }
2757
+ interface UnsupportedReason {
2758
+ code?: string;
2759
+ description?: string | null;
2760
+ }
2761
+ interface ListUpcomingChargesRequest {
2762
+ /**
2763
+ * Subscription id charges to be previewed for
2764
+ * @format GUID
2765
+ */
2766
+ subscriptionId: string;
2767
+ /** Period of time to provide charged for. If not provided,then only next charge will be returned. */
2768
+ customDuration?: Duration;
2769
+ /**
2770
+ * Date of the next billing cycle so that the upcoming charges will be calculated accordingly.
2771
+ * If not provided, the upcoming charges will be calculated according to the existing next billing date.
2772
+ */
2773
+ nextBillingDate?: Date | null;
2774
+ }
2775
+ interface ListUpcomingChargesResponse {
2776
+ upcomingCharges?: SubscriptionCharge[];
2777
+ }
2778
+ interface PreviewSubscriptionChargesRequest extends PreviewSubscriptionChargesRequestSubscriptionOneOf {
2779
+ /** Information about a non-existing subscription. */
2780
+ subscriptionInfo?: SubscriptionInfo;
2781
+ }
2782
+ /** @oneof */
2783
+ interface PreviewSubscriptionChargesRequestSubscriptionOneOf {
2784
+ /** Information about a non-existing subscription. */
2785
+ subscriptionInfo?: SubscriptionInfo;
2786
+ }
2787
+ /** Subscription information to use for calculating the preview of charges for a subscription. */
2788
+ interface SubscriptionInfo {
2789
+ billingSettings?: BillingSettings;
2790
+ items?: Item[];
2791
+ startDate?: Date | null;
2792
+ }
2793
+ interface PreviewSubscriptionChargesResponse {
2794
+ /** Charges for subscription. */
2795
+ charges?: Charge[];
2796
+ }
2797
+ /** Represents a charge applicable to a subscription. */
2798
+ interface Charge {
2799
+ /** The cycle number from which the charge starts. */
2800
+ cycleFrom?: number;
2801
+ /** The number of cycles for which the charge is applicable. */
2802
+ cycleCount?: number | null;
2803
+ /** The breakdown of the charge */
2804
+ totals?: Totals;
2805
+ /** The billing date from which the charge starts */
2806
+ cycleBillingDate?: Date | null;
2807
+ }
2808
+ interface PreviewSubscriptionsChargesRequest {
2809
+ /**
2810
+ * Information required to calculate the preview charges for the subscriptions, including an identifier.
2811
+ * @minSize 1
2812
+ * @maxSize 10
2813
+ */
2814
+ subscriptionsBillingDetails?: SubscriptionBillingDetails[];
2815
+ /**
2816
+ * Specifies the number of upcoming billing charges to preview for all subscriptions in the order.
2817
+ * For instance, if a subscription costs $10 for the first 3 cycles, $12 for cycles 4 through 7,
2818
+ * $15 for cycles 8 through 10, and $20 for cycle 11 onwards:
2819
+ * - Sending "1" will calculate and return charges for cycles 4 through 7 since it's the first charge in the future.
2820
+ * - Sending "2" will provide a response with charges for cycles 4 through 7 and cycles 8 through 10.
2821
+ * - Sending "3" or more will include totals for cycles 4 through 7, cycles 8 through 10, and from cycle 11 onwards.
2822
+ * If no value is provided, the response will include charges for all upcoming cycles, including the existing one,
2823
+ * in this case, charges for cycle 1 through 3.
2824
+ * If there is a single charge for a subscription, meaning that subscription price remains consistent across all cycles,
2825
+ * then even if future_charges_count is set, it will be ignored and the only charge this subscription has will be returned.
2826
+ * @min 1
2827
+ * @max 10
2828
+ */
2829
+ numberOfNextRecurringCharges?: number | null;
2830
+ }
2831
+ interface SubscriptionBillingDetails {
2832
+ /**
2833
+ * External identifier of the subscription
2834
+ * @format GUID
2835
+ */
2836
+ externalId?: string | null;
2837
+ /** Billing details parameters including schedule, currency, etc. */
2838
+ billingSettings?: BillingSettings;
2839
+ /**
2840
+ * Items, minSize is 1, maxSize is 100
2841
+ * @minSize 1
2842
+ * @maxSize 100
2843
+ */
2844
+ items?: Item[];
2845
+ /** Subscription start date, now if not set */
2846
+ startDate?: Date | null;
2847
+ /** Shipping address associated with subscription. At the moment used only for payments. Optional. */
2848
+ shippingAddress?: FullAddressDetails;
2849
+ }
2850
+ interface PreviewSubscriptionsChargesResponse {
2851
+ /** Charges for the subscriptions, including an identifier. */
2852
+ subscriptionsCharges?: SubscriptionCharges[];
2853
+ }
2854
+ interface SubscriptionCharges {
2855
+ /**
2856
+ * External identifier of the subscription
2857
+ * @format GUID
2858
+ */
2859
+ externalId?: string | null;
2860
+ /** Charges for subscription. */
2861
+ charges?: Charge[];
2862
+ }
2863
+ interface CreateSubscriptionForOrderRequest {
2864
+ /** Subscription needs to be created */
2865
+ subscription?: Subscription;
2866
+ /**
2867
+ * Optional unique identifier for this request in order to prevent subscription duplications
2868
+ * @format GUID
2869
+ */
2870
+ idempotencyKey?: string | null;
2871
+ }
2872
+ interface CreateSubscriptionForOrderResponse {
2873
+ /** Created subscription */
2874
+ subscription?: Subscription;
2875
+ /** Non-persistent invoice */
2876
+ invoice?: Invoice;
2877
+ }
2878
+ /** An invoice includes information about the subscription and the customer. */
2879
+ interface Invoice {
2880
+ /**
2881
+ * Invoice ID.
2882
+ * @format GUID
2883
+ * @readonly
2884
+ */
2885
+ id?: string | null;
2886
+ /**
2887
+ * Date and time the invoice was created.
2888
+ * @readonly
2889
+ */
2890
+ createdDate?: Date | null;
2891
+ /**
2892
+ * Date and time the invoice was last updated.
2893
+ * @readonly
2894
+ */
2895
+ updatedDate?: Date | null;
2896
+ /**
2897
+ * Revision number, which increments by 1 each time the invoice is updated.
2898
+ * To prevent conflicting changes,
2899
+ * the current revision must be passed when updating the invoice.
2900
+ *
2901
+ * Ignored when creating a invoice.
2902
+ * @readonly
2903
+ */
2904
+ revision?: string | null;
2905
+ /** Information about the invoice origin. */
2906
+ origin?: BusinessOriginData;
2907
+ /**
2908
+ * Invoice status.
2909
+ *
2910
+ * + `"UNKNOWN"`: There is no information about the invoice status.
2911
+ * + `"OPEN"`: BASS has created the invoice but hasn't initiated the payment process.
2912
+ * + `"PAID"`: The customer has successfully paid for the invoice.
2913
+ * + `"ATTEMPT_FAILED"`: The payment process has started and there has been at least one unsuccessful payment attempt.
2914
+ * + `"FAILED"`: The payment process has failed and there are no more retries.
2915
+ * + `"CANCELED"`: The payment process has been stopped because the related subscription has been canceled.
2916
+ * @readonly
2917
+ */
2918
+ status?: InvoiceStatusWithLiterals;
2919
+ /**
2920
+ * 3-letter currency code of the invoice in
2921
+ * [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format.
2922
+ * @format CURRENCY
2923
+ */
2924
+ currency?: string;
2925
+ /** Information about the customer. */
2926
+ customer?: Customer;
2927
+ /**
2928
+ * Whether the payment is processed through Wix and whether the customer must provide some input.
2929
+ *
2930
+ * + `"UNKNOWN"`: There is no information about the collection method.
2931
+ * + `"AUTO_CHARGE"`: The customer pays automatically through Wix.
2932
+ * + `"SEND_INVOICE"`: The customer pays through Wix, but some manual input is required.
2933
+ * + `"OFFLINE"`: The customer pays outside of Wix.
2934
+ */
2935
+ collectionMethod?: CollectionMethodWithLiterals;
2936
+ /**
2937
+ * ID of the
2938
+ * [payment method](https://bo.wix.com/wix-docs/rest/wix-cashier/settings/payment-method-type/payment-method-type-object).
2939
+ * Not available for the first payment of a subscription and all offline
2940
+ * payments.
2941
+ * @format GUID
2942
+ */
2943
+ paymentMethodId?: string | null;
2944
+ /**
2945
+ * Cashier [Order ID](https://dev.wix.com/docs/rest/payments/wix-cashier/pay/order#order-object)
2946
+ * for the corresponding payment.
2947
+ * @format GUID
2948
+ * @readonly
2949
+ */
2950
+ paymentOrderId?: string | null;
2951
+ /** Information about a discount. Available only for invoices that include a discount. */
2952
+ discount?: InvoiceDiscount;
2953
+ /** Billing address. */
2954
+ billingAddress?: FullAddressDetails;
2955
+ /** Shipping address. Available only for `"PHYSICAL"` line items. */
2956
+ shippingAddress?: FullAddressDetails;
2957
+ /**
2958
+ * Shipping fee in `0.00` format.
2959
+ * @format DECIMAL_VALUE
2960
+ */
2961
+ shippingFee?: string | null;
2962
+ /**
2963
+ * Information about the invoice's totals.
2964
+ * @readonly
2965
+ */
2966
+ totals?: Totals;
2967
+ /** Line items belonging to the invoice. */
2968
+ invoiceItems?: InvoiceItem[];
2969
+ /**
2970
+ * Whether the invoice is used to validate payment details.
2971
+ *
2972
+ * + `true`: BASS uses the invoice to test payment details. Relevant for free trials. Ensures that Wix can collect the payment of the first billing cycle.
2973
+ * + `false`: Standard invoice.
2974
+ */
2975
+ isAuthorization?: boolean | null;
2976
+ /** Whether the invoice's `totals.totalPrice` includes tax. */
2977
+ isTaxInclusive?: boolean | null;
2978
+ /** Details of the latest payment attempt. */
2979
+ latestPaymentAttempt?: LatestPaymentAttempt;
2980
+ /** List of charges and credits that adjust the invoice's `totals.totalPrice`. */
2981
+ adjustments?: PriceAdjustment[];
2982
+ /**
2983
+ * Invoice Number.
2984
+ * @maxLength 10
2985
+ * @readonly
2986
+ */
2987
+ invoiceNumber?: string | null;
2988
+ /**
2989
+ * Shipping charges for the invoice.
2990
+ * Supports only one discount without cycles.
2991
+ * Discounts with cycles (repeated discounts across different billing cycles) are not supported for shipping
2992
+ */
2993
+ shippingCharges?: InvoiceShippingCharges;
2994
+ /** Information about the invoice tax */
2995
+ taxData?: TaxData;
2996
+ /** Business address. */
2997
+ businessAddress?: Address;
2998
+ /**
2999
+ * ID of the billing order that created this invoice.
3000
+ * @format GUID
3001
+ */
3002
+ orderId?: string | null;
3003
+ /**
3004
+ * Platform origin the invoice is originated from.
3005
+ * @format GUID
3006
+ */
3007
+ platformOriginAppId?: string | null;
3008
+ /**
3009
+ * Refund information, provided that there are refunds for this invoice.
3010
+ * @readonly
3011
+ */
3012
+ refundInfo?: RefundInfo;
3013
+ }
3014
+ interface BusinessOriginData {
3015
+ /**
3016
+ * ID of the app for which BASS has created the invoice. For example,
3017
+ * `"1380b703-ce81-ff05-f115-39571d94dfcd"` for the Wix eCommerce app.
3018
+ * @format GUID
3019
+ */
3020
+ appId?: string;
3021
+ /**
3022
+ * [Instance ID](https://dev.wix.com/api/rest/app-management/apps/app-instance/get-app-instance)
3023
+ * of the app for which BASS has created the invoice.
3024
+ * @format GUID
3025
+ */
3026
+ instanceId?: string;
3027
+ /**
3028
+ * ID of the entity that triggered the invoice creation. For example, the ID of a
3029
+ * [pricing plan](https://dev.wix.com/docs/rest/payments/pricing-plans/pricing-plans/plan#plan-object).
3030
+ * @format GUID
3031
+ */
3032
+ entityId?: string;
3033
+ }
3034
+ declare enum InvoiceStatus {
3035
+ UNKNOWN = "UNKNOWN",
3036
+ OPEN = "OPEN",
3037
+ PAID = "PAID",
3038
+ FAILED = "FAILED",
3039
+ ATTEMPT_FAILED = "ATTEMPT_FAILED",
3040
+ CANCELED = "CANCELED",
3041
+ REFUNDED = "REFUNDED"
3042
+ }
3043
+ /** @enumType */
3044
+ type InvoiceStatusWithLiterals = InvoiceStatus | 'UNKNOWN' | 'OPEN' | 'PAID' | 'FAILED' | 'ATTEMPT_FAILED' | 'CANCELED' | 'REFUNDED';
3045
+ declare enum CollectionMethod {
3046
+ UNKNOWN = "UNKNOWN",
3047
+ AUTO_CHARGE = "AUTO_CHARGE",
3048
+ OFFLINE = "OFFLINE",
3049
+ SEND_INVOICE = "SEND_INVOICE"
3050
+ }
3051
+ /** @enumType */
3052
+ type CollectionMethodWithLiterals = CollectionMethod | 'UNKNOWN' | 'AUTO_CHARGE' | 'OFFLINE' | 'SEND_INVOICE';
3053
+ declare enum CreationMode {
3054
+ UNKNOWN = "UNKNOWN",
3055
+ SYSTEM = "SYSTEM",
3056
+ MANUAL = "MANUAL"
3057
+ }
3058
+ /** @enumType */
3059
+ type CreationModeWithLiterals = CreationMode | 'UNKNOWN' | 'SYSTEM' | 'MANUAL';
3060
+ interface LatestPaymentAttempt {
3061
+ /**
3062
+ * ID of the latest payment attempt.
3063
+ * @format GUID
3064
+ * @readonly
3065
+ */
3066
+ paymentAttemptId?: string;
3067
+ /**
3068
+ * Date and time of the latest payment attempt in `YYYY-MM-DDThh:mm.sssZ` format.
3069
+ * @readonly
3070
+ */
3071
+ dateAttempt?: Date | null;
3072
+ /** Number of the latest payment attempt. */
3073
+ attemptNumber?: number;
3074
+ /**
3075
+ * Status of the latest payment attempt.
3076
+ *
3077
+ * + `"UNKNOWN"`: There is no information about the status of the latest payment attempt.
3078
+ * + `"SCHEDULED"`: The latest payment attempt is scheduled but hasn't started yet.
3079
+ * + `"IN_PROGRESS"`: The latest payment attempt is in progress.
3080
+ * + `"PAID"`: The latest payment attempt resulted in a successful payment.
3081
+ * + `"DECLINED"`: The latest payment attempt has been declined.
3082
+ * + `"TECHNICAL_FAILURE"`: The latest payment attempt couldn't be process due to a technical failure.
3083
+ * + `"CANCELED"`: The latest payment attempt has been canceled by BASS.
3084
+ * @readonly
3085
+ */
3086
+ status?: PaymentAttemptStatusWithLiterals;
3087
+ /**
3088
+ * Whether BASS tries to collect the payment another time. Available only when
3089
+ * `latestPaymentAttempt.status` is set to `"DECLINED"`.
3090
+ */
3091
+ retryable?: boolean;
3092
+ }
3093
+ declare enum PaymentAttemptStatus {
3094
+ UNKNOWN = "UNKNOWN",
3095
+ SCHEDULED = "SCHEDULED",
3096
+ IN_PROGRESS = "IN_PROGRESS",
3097
+ PAID = "PAID",
3098
+ DECLINED = "DECLINED",
3099
+ TECHNICAL_FAILURE = "TECHNICAL_FAILURE",
3100
+ CANCELED = "CANCELED",
3101
+ PENDING = "PENDING"
3102
+ }
3103
+ /** @enumType */
3104
+ type PaymentAttemptStatusWithLiterals = PaymentAttemptStatus | 'UNKNOWN' | 'SCHEDULED' | 'IN_PROGRESS' | 'PAID' | 'DECLINED' | 'TECHNICAL_FAILURE' | 'CANCELED' | 'PENDING';
3105
+ interface PriceAdjustment extends PriceAdjustmentAdjustmentTypeOneOf {
3106
+ /** Adjustment that increases the price. */
3107
+ charge?: PriceAdjustmentValue;
3108
+ /** Adjustment that lowers the price. */
3109
+ credit?: PriceAdjustmentValue;
3110
+ }
3111
+ /** @oneof */
3112
+ interface PriceAdjustmentAdjustmentTypeOneOf {
3113
+ /** Adjustment that increases the price. */
3114
+ charge?: PriceAdjustmentValue;
3115
+ /** Adjustment that lowers the price. */
3116
+ credit?: PriceAdjustmentValue;
3117
+ }
3118
+ interface PriceAdjustmentValue extends PriceAdjustmentValueAdjustmentValueTypeOneOf {
3119
+ /**
3120
+ * Absolute amount that adjusts the price.
3121
+ *
3122
+ * Min: `0.01`
3123
+ * @decimalValue options { gt:0.00 }
3124
+ */
3125
+ amount?: string;
3126
+ /**
3127
+ * Relative factor that adjusts the price. For example, setting
3128
+ * `multiplier` to:
3129
+ * - `0.50` results in a price adjustment of 50% of the original value.
3130
+ * - `0.75` results in a price adjustment of 75% of the original value.
3131
+ * - `1.00` results in a price adjustment of 100% of the original value.
3132
+ *
3133
+ * Min: `0.01`
3134
+ * Max: `1.00`
3135
+ * @decimalValue options { gt:0.00, lte:1 }
3136
+ */
3137
+ multiplier?: string;
3138
+ }
3139
+ /** @oneof */
3140
+ interface PriceAdjustmentValueAdjustmentValueTypeOneOf {
3141
+ /**
3142
+ * Absolute amount that adjusts the price.
3143
+ *
3144
+ * Min: `0.01`
3145
+ * @decimalValue options { gt:0.00 }
3146
+ */
3147
+ amount?: string;
3148
+ /**
3149
+ * Relative factor that adjusts the price. For example, setting
3150
+ * `multiplier` to:
3151
+ * - `0.50` results in a price adjustment of 50% of the original value.
3152
+ * - `0.75` results in a price adjustment of 75% of the original value.
3153
+ * - `1.00` results in a price adjustment of 100% of the original value.
3154
+ *
3155
+ * Min: `0.01`
3156
+ * Max: `1.00`
3157
+ * @decimalValue options { gt:0.00, lte:1 }
3158
+ */
3159
+ multiplier?: string;
3160
+ }
3161
+ interface InvoiceShippingCharges {
3162
+ /**
3163
+ * Amount of the shipping fee in `0.00` format.
3164
+ *
3165
+ * Min: `0.01`
3166
+ * @decimalValue options { gte:0.00, maxScale:2 }
3167
+ */
3168
+ amount?: string;
3169
+ /** Tax of the shipping fee */
3170
+ tax?: Tax;
3171
+ /** Information about the shipping charges tax data */
3172
+ taxData?: ItemTaxData;
3173
+ discount?: Discount;
3174
+ }
3175
+ /** Tax data from all items */
3176
+ interface TaxData {
3177
+ /** Aggregated tax data from all items */
3178
+ taxSummary?: TaxSummary;
3179
+ }
3180
+ interface TaxSummary {
3181
+ /**
3182
+ * Aggregated from tax_breakdowns with exemptions excluded from amount
3183
+ * @format DECIMAL_VALUE
3184
+ */
3185
+ aggregatedTaxAmount?: string;
3186
+ /**
3187
+ * Array of each tax applied, grouped by `"jurisdiction"`, `"jurisdiction_type"`, `"tax_type"`, `"tax_name"` and `"tax_rate"`.
3188
+ * @maxSize 50
3189
+ */
3190
+ aggregatedTaxBreakdowns?: AggregatedTaxBreakdown[];
3191
+ }
3192
+ interface AggregatedTaxBreakdown {
3193
+ /**
3194
+ * Name of the tax that was calculated.
3195
+ * @maxLength 200
3196
+ */
3197
+ taxName?: string;
3198
+ /**
3199
+ * Type of tax that was calculated.
3200
+ * @maxLength 200
3201
+ */
3202
+ taxType?: string;
1917
3203
  /**
1918
- * The ID of the offline subscription to mark as paid its latest invoice
1919
- * @format GUID
3204
+ * Jurisdiction that taxes were calculated for.
3205
+ * @maxLength 200
1920
3206
  */
1921
- subscriptionId: string;
1922
- }
1923
- interface MarkLatestInvoiceAsPaidResponse {
1924
- subscription?: Subscription;
3207
+ jurisdiction?: string;
3208
+ /** Type of jurisdiction that taxes were calculated for. */
3209
+ jurisdictionType?: string;
3210
+ /**
3211
+ * Tax rate used for this jurisdiction, as a decimal. For example, 10% tax is `"0.1000"` and 200% tax is `"2.0000"`.
3212
+ * @decimalValue options { gte:0, maxScale:6 }
3213
+ */
3214
+ rate?: string;
3215
+ /**
3216
+ * Total amount of this tax for this jurisdiction.
3217
+ * @format DECIMAL_VALUE
3218
+ * @decimalValue options { maxScale:4 }
3219
+ */
3220
+ aggregatedTaxAmount?: string;
1925
3221
  }
1926
- interface LatestInvoiceMarkedAsPaid {
1927
- subscription?: Subscription;
3222
+ interface RefundInfo {
3223
+ /**
3224
+ * If refunds are present, this will include the total amount refunded.
3225
+ * @format DECIMAL_VALUE
3226
+ * @decimalValue options { gte:0.00, maxScale:2 }
3227
+ */
3228
+ totalRefundAmount?: string | null;
3229
+ /**
3230
+ * The refunds that have been applied to this invoice
3231
+ * @maxSize 20
3232
+ */
3233
+ refunds?: Refund[];
1928
3234
  }
1929
- interface MarkBillingCycleAsPaidRequest {
3235
+ interface Refund {
1930
3236
  /**
1931
- * The ID of the subscription to mark as paid its invoice.
3237
+ * refund amount
3238
+ * @format DECIMAL_VALUE
3239
+ * @decimalValue options { gt:0.00, maxScale:2 }
3240
+ */
3241
+ amount?: string;
3242
+ /** the date of the refund transaction */
3243
+ transactionDate?: Date | null;
3244
+ /**
3245
+ * the transaction id associated with this refund
1932
3246
  * @format GUID
1933
3247
  */
1934
- subscriptionId: string;
3248
+ transactionId?: string;
3249
+ /** a reason for the refund */
3250
+ reason?: RefundReasonWithLiterals;
1935
3251
  /**
1936
- * The subscription cycle for which the invoice is to be marked as paid.
1937
- * If left empty, the most recent cycle will be selected.
1938
- * @min 1
3252
+ * a description of the refund - this is a free text field for the initiator
3253
+ * @maxLength 255
1939
3254
  */
1940
- paidCycle?: number | null;
3255
+ description?: string | null;
1941
3256
  }
1942
- interface MarkBillingCycleAsPaidResponse {
1943
- subscription?: Subscription;
3257
+ declare enum RefundReason {
3258
+ UNKNOWN_REFUND_REASON = "UNKNOWN_REFUND_REASON",
3259
+ DUPLICATE_CHARGE = "DUPLICATE_CHARGE",
3260
+ FRAUDULENT = "FRAUDULENT",
3261
+ CUSTOMER_REQUEST = "CUSTOMER_REQUEST",
3262
+ PROVISION_FAILED = "PROVISION_FAILED",
3263
+ OTHER = "OTHER"
1944
3264
  }
1945
- interface GetSubscriptionsStatsRequest {
3265
+ /** @enumType */
3266
+ type RefundReasonWithLiterals = RefundReason | 'UNKNOWN_REFUND_REASON' | 'DUPLICATE_CHARGE' | 'FRAUDULENT' | 'CUSTOMER_REQUEST' | 'PROVISION_FAILED' | 'OTHER';
3267
+ interface Task {
3268
+ key?: TaskKey;
3269
+ executeAt?: Date | null;
3270
+ payload?: string | null;
1946
3271
  }
1947
- interface GetSubscriptionsStatsResponse {
1948
- amountByStatuses?: AmountByStatus[];
1949
- total?: number;
3272
+ interface TaskKey {
3273
+ appId?: string;
3274
+ instanceId?: string;
3275
+ subjectId?: string | null;
1950
3276
  }
1951
- interface AmountByStatus {
1952
- status?: SubscriptionStatusEnumSubscriptionStatusWithLiterals;
1953
- amount?: number;
3277
+ interface TaskAction extends TaskActionActionOneOf {
3278
+ complete?: Complete;
3279
+ cancel?: Cancel;
3280
+ reschedule?: Reschedule;
1954
3281
  }
1955
- interface ExtendSubscriptionRequest extends ExtendSubscriptionRequestExtendPolicyOneOf {
1956
- /** User won't be charged for additional period added on top of subscription end date. */
1957
- extensionPeriod?: Duration;
3282
+ /** @oneof */
3283
+ interface TaskActionActionOneOf {
3284
+ complete?: Complete;
3285
+ cancel?: Cancel;
3286
+ reschedule?: Reschedule;
3287
+ }
3288
+ interface Complete {
3289
+ }
3290
+ interface Cancel {
3291
+ }
3292
+ interface Reschedule {
3293
+ executeAt?: Date | null;
3294
+ payload?: string | null;
3295
+ }
3296
+ interface V1SubscriptionEvent extends V1SubscriptionEventEventOneOf {
3297
+ /** A subscriptions was created */
3298
+ created?: V1SubscriptionCreated;
3299
+ /** Subscription is considered active and will be visible to site owners and members */
3300
+ activated?: V1SubscriptionActivated;
3301
+ /**
3302
+ * Subscription was canceled either by cancellation request with requested expiration date NOW or by payment provider.
3303
+ * If cancelled by payment provider subscription will be valid until the date calculated depending on how many cycles it was already paid for.
3304
+ */
3305
+ canceled?: V1SubscriptionCanceled;
3306
+ /** Subscription was updated. Currently the only possible change is valid_until date */
3307
+ updated?: V1SubscriptionUpdated;
3308
+ /** Subscription cycle has started. Currently the cycle starts when a payment is received. */
3309
+ cycleTriggered?: SubscriptionCycleTriggered;
3310
+ /** Offline subscription was marked as paid */
3311
+ markedAsPaid?: SubscriptionMarkedAsPaid;
3312
+ /**
3313
+ * Subscription cancellation for the future date was requested.
3314
+ * Subscription will stay in pending cancellation status until the date calculated depending on free trial and the next payment date.
3315
+ */
3316
+ cancellationRequested?: SubscriptionCancellationRequested;
3317
+ /** Subscription and it's payment schedule (for recurring) was suspended */
3318
+ suspended?: SubscriptionSuspended;
3319
+ /** Previously suspended subscription and it's payment schedule (for recurring) was resumed */
3320
+ resumed?: V1SubscriptionResumed;
3321
+ /** Subscription expired according to valid_until expiration date. */
3322
+ expired?: SubscriptionExpired;
3323
+ /** Subscription initial purchase completed */
3324
+ initialPurchaseCompleted?: V1SubscriptionInitialPurchaseCompleted;
3325
+ }
3326
+ /** @oneof */
3327
+ interface V1SubscriptionEventEventOneOf {
3328
+ /** A subscriptions was created */
3329
+ created?: V1SubscriptionCreated;
3330
+ /** Subscription is considered active and will be visible to site owners and members */
3331
+ activated?: V1SubscriptionActivated;
3332
+ /**
3333
+ * Subscription was canceled either by cancellation request with requested expiration date NOW or by payment provider.
3334
+ * If cancelled by payment provider subscription will be valid until the date calculated depending on how many cycles it was already paid for.
3335
+ */
3336
+ canceled?: V1SubscriptionCanceled;
3337
+ /** Subscription was updated. Currently the only possible change is valid_until date */
3338
+ updated?: V1SubscriptionUpdated;
3339
+ /** Subscription cycle has started. Currently the cycle starts when a payment is received. */
3340
+ cycleTriggered?: SubscriptionCycleTriggered;
3341
+ /** Offline subscription was marked as paid */
3342
+ markedAsPaid?: SubscriptionMarkedAsPaid;
3343
+ /**
3344
+ * Subscription cancellation for the future date was requested.
3345
+ * Subscription will stay in pending cancellation status until the date calculated depending on free trial and the next payment date.
3346
+ */
3347
+ cancellationRequested?: SubscriptionCancellationRequested;
3348
+ /** Subscription and it's payment schedule (for recurring) was suspended */
3349
+ suspended?: SubscriptionSuspended;
3350
+ /** Previously suspended subscription and it's payment schedule (for recurring) was resumed */
3351
+ resumed?: V1SubscriptionResumed;
3352
+ /** Subscription expired according to valid_until expiration date. */
3353
+ expired?: SubscriptionExpired;
3354
+ /** Subscription initial purchase completed */
3355
+ initialPurchaseCompleted?: V1SubscriptionInitialPurchaseCompleted;
3356
+ }
3357
+ interface V1SubscriptionCreated {
3358
+ subscription?: V1Subscription;
3359
+ }
3360
+ interface V1Subscription {
3361
+ /**
3362
+ * ID of the subscription
3363
+ * @format GUID
3364
+ * @readonly
3365
+ */
3366
+ id?: string;
1958
3367
  /**
1959
- * user will be charged for billing cycles added
1960
- * @min 1
3368
+ * ID of the app which created the subscription
3369
+ * @format GUID
1961
3370
  */
1962
- extensionBillingCycles?: number;
3371
+ wixAppId?: string;
1963
3372
  /**
1964
- * The ID of the subscription to be extended
3373
+ * Instance ID of the Subscriptions app
1965
3374
  * @format GUID
1966
3375
  */
1967
- id: string;
1968
- actionContext: ActionContext;
1969
- }
1970
- /** @oneof */
1971
- interface ExtendSubscriptionRequestExtendPolicyOneOf {
1972
- /** User won't be charged for additional period added on top of subscription end date. */
1973
- extensionPeriod?: Duration;
3376
+ tenantId?: string;
1974
3377
  /**
1975
- * user will be charged for billing cycles added
1976
- * @min 1
3378
+ * ID of entity in app (e.g. a cart in stores/order in paid plans)
3379
+ * @format GUID
1977
3380
  */
1978
- extensionBillingCycles?: number;
1979
- }
1980
- interface ExtendSubscriptionResponse {
1981
- /** The now extended subscription */
1982
- subscription?: Subscription;
1983
- }
1984
- interface AllowedActionsRequest {
3381
+ originEntityId?: string;
3382
+ /** Site member or a contact who bought the subscription */
3383
+ subscriber?: Subscriber;
3384
+ /**
3385
+ * Wix Pay order ID, is empty for free subscriptions
3386
+ * @format GUID
3387
+ */
3388
+ wixPayOrderId?: string | null;
3389
+ /**
3390
+ * Subscription name (e.g. a product or subscription package name)
3391
+ * @maxLength 150
3392
+ */
3393
+ name?: string;
3394
+ /**
3395
+ * Optional additional subscription description
3396
+ * @maxLength 500
3397
+ */
3398
+ description?: string;
3399
+ /** Amount to be paid for a single scheduled payment */
3400
+ price?: Money;
3401
+ /** True if the subscription is recurring, false for a single payment subscription */
3402
+ recurring?: boolean;
3403
+ /** Online (paid by subscriber using wix pay) or offline (need to manually mark as paid) */
3404
+ subscriptionType?: SubscriptionTypeWithLiterals;
3405
+ /** Active, expired, canceled, etc. */
3406
+ subscriptionStatus?: V1SubscriptionStatusEnumSubscriptionStatusWithLiterals;
3407
+ /** Subscription start date (may differ from creation date) */
3408
+ validFrom?: Date | null;
3409
+ /** Subscription expiration date */
3410
+ validUntil?: Date | null;
3411
+ /** Status of last payment associated with this subscription */
3412
+ lastPaymentStatus?: PaymentStatusEnumPaymentStatusWithLiterals;
3413
+ /** Payment schedule in the wix pay format. Exists for recurring subscriptions only. */
3414
+ billingProfile?: V2Subscription;
3415
+ /** Owner, member, etc. - present if subscription is canceled */
3416
+ cancellationInitiator?: CancellationInitiatorWithLiterals;
3417
+ /** Optional, present if subscription is canceled */
3418
+ cancellationReason?: string | null;
3419
+ /** Can be used for arbitrary app-specific map<string, string> data */
3420
+ externalData?: Record<string, string>;
3421
+ /** Date when subscription was created (not related to payment dates) */
3422
+ dateCreated?: Date | null;
3423
+ /** Restrictions on possible subscription actions. Default policy has all restrictions enabled. */
3424
+ policy?: SubscriptionPolicy;
3425
+ /** List of subscription suspension periods */
3426
+ suspensions?: Suspension[];
3427
+ /** Initial subscription expiration date that was calculated on the subscription purchase plus duration of suspensions */
3428
+ validUntilDateWithSuspensions?: Date | null;
3429
+ /** Duration of single payment subscription (instead of billing_profile) */
3430
+ singlePaymentDuration?: V1Duration;
1985
3431
  /** @format GUID */
1986
- id: string;
3432
+ originInstanceId?: string | null;
3433
+ }
3434
+ interface Subscriber {
1987
3435
  /**
1988
- * List of additional fields to be included in the response.
1989
- * @maxSize 1
3436
+ * Member or contact ID
3437
+ * @format GUID
1990
3438
  */
1991
- fields?: RequestedFieldsWithLiterals[];
3439
+ id?: string;
3440
+ /** Member or contact */
3441
+ identityType?: IdentityTypeWithLiterals;
1992
3442
  }
1993
- declare enum RequestedFields {
1994
- UNKNOWN_REQUESTED_FIELD = "UNKNOWN_REQUESTED_FIELD",
1995
- /** Include unsupported action list, including the reasons for the lack of support */
1996
- UNSUPPORTED_ACTION = "UNSUPPORTED_ACTION"
3443
+ declare enum IdentityType {
3444
+ /** Identity type undefined */
3445
+ UNDEFINED = "UNDEFINED",
3446
+ /** Subscription is associated with a member ID */
3447
+ MEMBER = "MEMBER",
3448
+ /** Subscriptions is associated with a contact ID */
3449
+ CONTACT = "CONTACT"
1997
3450
  }
1998
3451
  /** @enumType */
1999
- type RequestedFieldsWithLiterals = RequestedFields | 'UNKNOWN_REQUESTED_FIELD' | 'UNSUPPORTED_ACTION';
2000
- interface AllowedActionsResponse {
2001
- /** List of actions that are allowed. */
2002
- actions?: Action[];
3452
+ type IdentityTypeWithLiterals = IdentityType | 'UNDEFINED' | 'MEMBER' | 'CONTACT';
3453
+ /** Price of a payment. Includes amount and currency. */
3454
+ interface Money {
2003
3455
  /**
2004
- * List of actions that are not supported, included only if requested. Provides reasons for each unsupported action.
2005
- * @maxSize 20
3456
+ * Monetary amount i.e. 3.99.
3457
+ * @format DECIMAL_VALUE
2006
3458
  */
2007
- unsupportedActions?: UnsupportedAction[];
2008
- }
2009
- interface UnsupportedAction {
2010
- actionType?: ActionTypeWithLiterals;
3459
+ amount?: string;
2011
3460
  /**
2012
- * Provides detailed reasons for the unsupported action. Each `UnsupportedReason` includes a code and a message explaining why the action is not allowed.
2013
- * @maxSize 20
3461
+ * Currency in ISO 4217 format i.e. USD.
3462
+ * @minLength 3
3463
+ * @maxLength 3
2014
3464
  */
2015
- reasons?: UnsupportedReason[];
3465
+ currency?: string;
2016
3466
  }
2017
- interface UnsupportedReason {
2018
- code?: string;
2019
- description?: string | null;
3467
+ declare enum SubscriptionType {
3468
+ UNDEFINED = "UNDEFINED",
3469
+ /** Payments made by the subscriber */
3470
+ ONLINE = "ONLINE",
3471
+ /** Payments managed manually by the site owner */
3472
+ OFFLINE = "OFFLINE"
2020
3473
  }
2021
- interface ListUpcomingChargesRequest {
3474
+ /** @enumType */
3475
+ type SubscriptionTypeWithLiterals = SubscriptionType | 'UNDEFINED' | 'ONLINE' | 'OFFLINE';
3476
+ declare enum V1SubscriptionStatusEnumSubscriptionStatus {
3477
+ /** Subscription status undefined */
3478
+ UNDEFINED = "UNDEFINED",
3479
+ /** Subscription created, but hasn't been paid for yet. This status if filtered out in ListSubscriptions response by default. */
3480
+ DRAFT = "DRAFT",
3481
+ /** Subscription has been paid for, but the start date is in the future */
3482
+ PENDING = "PENDING",
3483
+ /** Subscription is active */
3484
+ ACTIVE = "ACTIVE",
3485
+ /** Subscription has expired */
3486
+ EXPIRED = "EXPIRED",
3487
+ /** Subscription has been canceled */
3488
+ CANCELED = "CANCELED",
3489
+ /** Subscription has been set to be canceled at a future date */
3490
+ PENDING_CANCELLATION = "PENDING_CANCELLATION",
3491
+ /** Subscription is suspended */
3492
+ SUSPENDED = "SUSPENDED"
3493
+ }
3494
+ /** @enumType */
3495
+ type V1SubscriptionStatusEnumSubscriptionStatusWithLiterals = V1SubscriptionStatusEnumSubscriptionStatus | 'UNDEFINED' | 'DRAFT' | 'PENDING' | 'ACTIVE' | 'EXPIRED' | 'CANCELED' | 'PENDING_CANCELLATION' | 'SUSPENDED';
3496
+ declare enum PaymentStatusEnumPaymentStatus {
3497
+ /** Payment status undefined */
3498
+ UNDEFINED = "UNDEFINED",
3499
+ /** Payment has been paid */
3500
+ PAID = "PAID",
3501
+ /** Payment has been refunded */
3502
+ REFUNDED = "REFUNDED",
3503
+ /** Recurring payment has failed */
3504
+ FAILED = "FAILED",
3505
+ /** Payment has not been paid */
3506
+ UNPAID = "UNPAID",
3507
+ /** Billing has been initialized, but actual charge is yet to be made. Can happen for free trial and PayPal */
3508
+ PENDING = "PENDING"
3509
+ }
3510
+ /** @enumType */
3511
+ type PaymentStatusEnumPaymentStatusWithLiterals = PaymentStatusEnumPaymentStatus | 'UNDEFINED' | 'PAID' | 'REFUNDED' | 'FAILED' | 'UNPAID' | 'PENDING';
3512
+ /**
3513
+ * Recurring payment is described by `frequency` (day, week, month) and `interval`.
3514
+ *
3515
+ * For example, to create a recurring payment every 14 days, just set `interval` to 14 and frequency to `DAY`.
3516
+ *
3517
+ * In some cases there should be a trial period for the order, after which payments start to occur.
3518
+ * Trial period is also defined as `frequency` and `interval` pair.
3519
+ *
3520
+ * So one can define a monthly 'subscription' with a 14 days trial period.
3521
+ */
3522
+ interface V2Subscription {
3523
+ /** frequency of recurring payment (required) */
3524
+ frequency?: SubscriptionFrequencyWithLiterals;
3525
+ /** interval of recurring payment (required) */
3526
+ interval?: number;
3527
+ /** trial period for recurring payment (optional) */
3528
+ trial?: SubscriptionTrialPeriod;
2022
3529
  /**
2023
- * Subscription id charges to be previewed for
2024
- * @format GUID
3530
+ * how many billing cycles should be done before subscription finishes
3531
+ * (optional, 0 by default means endless subscription)
2025
3532
  */
2026
- subscriptionId: string;
2027
- /** Period of time to provide charged for. If not provided,then only next charge will be returned. */
2028
- customDuration?: Duration;
3533
+ billingCycles?: number;
2029
3534
  /**
2030
- * Date of the next billing cycle so that the upcoming charges will be calculated accordingly.
2031
- * If not provided, the upcoming charges will be calculated according to the existing next billing date.
3535
+ * date in the future or in the past when the first billing cycle begins
3536
+ * (the first off-session payment is performed when it ends)
2032
3537
  */
2033
- nextBillingDate?: Date | null;
3538
+ firstCycleStartDate?: Date | null;
2034
3539
  }
2035
- interface ListUpcomingChargesResponse {
2036
- upcomingCharges?: SubscriptionCharge[];
3540
+ /** Frequency unit of recurring payment */
3541
+ declare enum SubscriptionFrequency {
3542
+ UNDEFINED = "UNDEFINED",
3543
+ DAY = "DAY",
3544
+ WEEK = "WEEK",
3545
+ MONTH = "MONTH",
3546
+ YEAR = "YEAR"
2037
3547
  }
2038
- interface PreviewSubscriptionChargesRequest extends PreviewSubscriptionChargesRequestSubscriptionOneOf {
2039
- /** Information about a non-existing subscription. */
2040
- subscriptionInfo?: SubscriptionInfo;
3548
+ /** @enumType */
3549
+ type SubscriptionFrequencyWithLiterals = SubscriptionFrequency | 'UNDEFINED' | 'DAY' | 'WEEK' | 'MONTH' | 'YEAR';
3550
+ /** Trial period of subscription */
3551
+ interface SubscriptionTrialPeriod {
3552
+ /** trial period in units (required) */
3553
+ period?: number;
3554
+ /** units in which trial period is described (optional, default DAY) */
3555
+ unit?: SubscriptionFrequencyWithLiterals;
3556
+ }
3557
+ declare enum CancellationInitiator {
3558
+ /** Cancellation initiator undefined */
3559
+ UNDEFINED = "UNDEFINED",
3560
+ /** Subscription was canceled by site owner (default if canceled by user or service identity) */
3561
+ OWNER = "OWNER",
3562
+ /** Subscription was canceled by member (default if canceled by member identity) */
3563
+ MEMBER = "MEMBER",
3564
+ /** Subscription was canceled because of payment failure */
3565
+ PAYMENT_FAILURE = "PAYMENT_FAILURE",
3566
+ /** Subscription was canceled because of payment setup failure */
3567
+ SETUP_FAILURE = "SETUP_FAILURE"
2041
3568
  }
2042
- /** @oneof */
2043
- interface PreviewSubscriptionChargesRequestSubscriptionOneOf {
2044
- /** Information about a non-existing subscription. */
2045
- subscriptionInfo?: SubscriptionInfo;
3569
+ /** @enumType */
3570
+ type CancellationInitiatorWithLiterals = CancellationInitiator | 'UNDEFINED' | 'OWNER' | 'MEMBER' | 'PAYMENT_FAILURE' | 'SETUP_FAILURE';
3571
+ interface SubscriptionPolicy {
3572
+ /** Subscription expiration date can be updated */
3573
+ expiryDateChangeable?: boolean;
3574
+ /** Subscription can be cancelled by the member who bought it (when memberId == subscriberId) */
3575
+ cancellableByMember?: boolean;
3576
+ /** Subscription expiration date on cancellation can be set to next payment date */
3577
+ cancellableAtNextPaymentCycle?: boolean;
3578
+ }
3579
+ interface Suspension {
3580
+ status?: StatusWithLiterals;
3581
+ /** Beginning of the suspended period */
3582
+ startsAt?: Date | null;
3583
+ /** End of the suspended period */
3584
+ endsAt?: Date | null;
3585
+ }
3586
+ declare enum Status {
3587
+ UNDEFINED = "UNDEFINED",
3588
+ ACTIVE = "ACTIVE",
3589
+ ENDED = "ENDED"
2046
3590
  }
2047
- /** Subscription information to use for calculating the preview of charges for a subscription. */
2048
- interface SubscriptionInfo {
2049
- billingSettings?: BillingSettings;
2050
- items?: Item[];
2051
- startDate?: Date | null;
3591
+ /** @enumType */
3592
+ type StatusWithLiterals = Status | 'UNDEFINED' | 'ACTIVE' | 'ENDED';
3593
+ /** A duration expressed in amount of time units. */
3594
+ interface V1Duration {
3595
+ /** Amount of the unit */
3596
+ amount?: number;
3597
+ /** Day, Week, Month, Year. */
3598
+ unit?: SubscriptionFrequencyWithLiterals;
2052
3599
  }
2053
- interface PreviewSubscriptionChargesResponse {
2054
- /** Charges for subscription. */
2055
- charges?: Charge[];
3600
+ interface V1SubscriptionActivated {
3601
+ subscription?: V1Subscription;
2056
3602
  }
2057
- /** Represents a charge applicable to a subscription. */
2058
- interface Charge {
2059
- /** The cycle number from which the charge starts. */
2060
- cycleFrom?: number;
2061
- /** The number of cycles for which the charge is applicable. */
2062
- cycleCount?: number | null;
2063
- /** The breakdown of the charge */
2064
- totals?: Totals;
2065
- /** The billing date from which the charge starts */
2066
- cycleBillingDate?: Date | null;
3603
+ interface V1SubscriptionCanceled {
3604
+ subscription?: V1Subscription;
2067
3605
  }
2068
- interface PreviewSubscriptionsChargesRequest {
2069
- /**
2070
- * Information required to calculate the preview charges for the subscriptions, including an identifier.
2071
- * @minSize 1
2072
- * @maxSize 10
2073
- */
2074
- subscriptionsBillingDetails?: SubscriptionBillingDetails[];
2075
- /**
2076
- * Specifies the number of upcoming billing charges to preview for all subscriptions in the order.
2077
- * For instance, if a subscription costs $10 for the first 3 cycles, $12 for cycles 4 through 7,
2078
- * $15 for cycles 8 through 10, and $20 for cycle 11 onwards:
2079
- * - Sending "1" will calculate and return charges for cycles 4 through 7 since it's the first charge in the future.
2080
- * - Sending "2" will provide a response with charges for cycles 4 through 7 and cycles 8 through 10.
2081
- * - Sending "3" or more will include totals for cycles 4 through 7, cycles 8 through 10, and from cycle 11 onwards.
2082
- * If no value is provided, the response will include charges for all upcoming cycles, including the existing one,
2083
- * in this case, charges for cycle 1 through 3.
2084
- * If there is a single charge for a subscription, meaning that subscription price remains consistent across all cycles,
2085
- * then even if future_charges_count is set, it will be ignored and the only charge this subscription has will be returned.
2086
- * @min 1
2087
- * @max 10
2088
- */
2089
- numberOfNextRecurringCharges?: number | null;
3606
+ interface V1SubscriptionUpdated {
3607
+ subscription?: V1Subscription;
2090
3608
  }
2091
- interface SubscriptionBillingDetails {
3609
+ interface SubscriptionCycleTriggered {
3610
+ subscription?: V1Subscription;
3611
+ billingCycle?: number;
2092
3612
  /**
2093
- * External identifier of the subscription
3613
+ * Wix Pay transaction id, optional. Exists if event was triggered by a payment.
2094
3614
  * @format GUID
2095
3615
  */
2096
- externalId?: string | null;
2097
- /** Billing details parameters including schedule, currency, etc. */
2098
- billingSettings?: BillingSettings;
2099
- /**
2100
- * Items, minSize is 1, maxSize is 100
2101
- * @minSize 1
2102
- * @maxSize 100
2103
- */
2104
- items?: Item[];
2105
- /** Subscription start date, now if not set */
2106
- startDate?: Date | null;
2107
- /** Shipping address associated with subscription. At the moment used only for payments. Optional. */
2108
- shippingAddress?: FullAddressDetails;
3616
+ transactionId?: string | null;
2109
3617
  }
2110
- interface PreviewSubscriptionsChargesResponse {
2111
- /** Charges for the subscriptions, including an identifier. */
2112
- subscriptionsCharges?: SubscriptionCharges[];
3618
+ interface SubscriptionMarkedAsPaid {
3619
+ subscription?: V1Subscription;
3620
+ /** A number indicating which payment (cycle) was marked as paid. For recurring subscriptions only. */
3621
+ billingCycle?: number | null;
2113
3622
  }
2114
- interface SubscriptionCharges {
2115
- /**
2116
- * External identifier of the subscription
2117
- * @format GUID
2118
- */
2119
- externalId?: string | null;
2120
- /** Charges for subscription. */
2121
- charges?: Charge[];
3623
+ interface SubscriptionCancellationRequested {
3624
+ subscription?: V1Subscription;
3625
+ }
3626
+ interface SubscriptionSuspended {
3627
+ subscription?: V1Subscription;
3628
+ }
3629
+ interface V1SubscriptionResumed {
3630
+ subscription?: V1Subscription;
3631
+ }
3632
+ interface SubscriptionExpired {
3633
+ subscription?: V1Subscription;
3634
+ }
3635
+ interface V1SubscriptionInitialPurchaseCompleted {
3636
+ subscription?: V1Subscription;
2122
3637
  }
2123
3638
  interface ListSubscriptionHistoryRequest {
2124
3639
  /** @format GUID */
@@ -2307,6 +3822,100 @@ interface SubscriptionBackOfficeAction {
2307
3822
  interface UnknownSubscriptionEvent {
2308
3823
  subscriptionAsString?: string | null;
2309
3824
  }
3825
+ /** @docsIgnore */
3826
+ type CustomerCancelSubscriptionApplicationErrors = {
3827
+ code?: 'OPERATION_NOT_SUPPORTED_FOR_STATUS';
3828
+ description?: string;
3829
+ data?: Record<string, any>;
3830
+ };
3831
+ /** @docsIgnore */
3832
+ type CustomerTurnOnSubscriptionAutoRenewalApplicationErrors = {
3833
+ code?: 'OPERATION_NOT_SUPPORTED_FOR_STATUS';
3834
+ description?: string;
3835
+ data?: Record<string, any>;
3836
+ };
3837
+ /** @docsIgnore */
3838
+ type CustomerTurnOffSubscriptionAutoRenewalApplicationErrors = {
3839
+ code?: 'OPERATION_NOT_SUPPORTED_FOR_STATUS';
3840
+ description?: string;
3841
+ data?: Record<string, any>;
3842
+ };
3843
+ /** @docsIgnore */
3844
+ type CustomerExtendSubscriptionApplicationErrors = {
3845
+ code?: 'OPERATION_NOT_SUPPORTED_FOR_STATUS';
3846
+ description?: string;
3847
+ data?: Record<string, any>;
3848
+ };
3849
+ /** @docsIgnore */
3850
+ type UpdateSubscriptionBillingDateApplicationErrors = {
3851
+ code?: 'OPERATION_NOT_SUPPORTED_FOR_STATUS';
3852
+ description?: string;
3853
+ data?: Record<string, any>;
3854
+ };
3855
+ /** @docsIgnore */
3856
+ type CancelSubscriptionApplicationErrors = {
3857
+ code?: 'OPERATION_NOT_SUPPORTED_FOR_STATUS';
3858
+ description?: string;
3859
+ data?: Record<string, any>;
3860
+ };
3861
+ /** @docsIgnore */
3862
+ type PauseSubscriptionApplicationErrors = {
3863
+ code?: 'OPERATION_NOT_SUPPORTED_FOR_STATUS';
3864
+ description?: string;
3865
+ data?: Record<string, any>;
3866
+ };
3867
+ /** @docsIgnore */
3868
+ type ResumeSubscriptionApplicationErrors = {
3869
+ code?: 'OPERATION_NOT_SUPPORTED_FOR_STATUS';
3870
+ description?: string;
3871
+ data?: Record<string, any>;
3872
+ };
3873
+ /** @docsIgnore */
3874
+ type TurnOnSubscriptionAutoRenewalApplicationErrors = {
3875
+ code?: 'OPERATION_NOT_SUPPORTED_FOR_STATUS';
3876
+ description?: string;
3877
+ data?: Record<string, any>;
3878
+ };
3879
+ /** @docsIgnore */
3880
+ type TurnOffSubscriptionAutoRenewalApplicationErrors = {
3881
+ code?: 'OPERATION_NOT_SUPPORTED_FOR_STATUS';
3882
+ description?: string;
3883
+ data?: Record<string, any>;
3884
+ };
3885
+ /** @docsIgnore */
3886
+ type MarkLatestInvoiceAsPaidApplicationErrors = {
3887
+ code?: 'OPERATION_NOT_SUPPORTED_FOR_STATUS';
3888
+ description?: string;
3889
+ data?: Record<string, any>;
3890
+ } | {
3891
+ code?: 'SUBSCRIPTION_PART_OF_ORDER';
3892
+ description?: string;
3893
+ data?: MultipleSubscriptionsOnOrdersInvoice;
3894
+ };
3895
+ /** @docsIgnore */
3896
+ type MarkBillingCycleAsPaidApplicationErrors = {
3897
+ code?: 'OPERATION_NOT_SUPPORTED_FOR_STATUS';
3898
+ description?: string;
3899
+ data?: Record<string, any>;
3900
+ } | {
3901
+ code?: 'SUBSCRIPTION_PART_OF_ORDER';
3902
+ description?: string;
3903
+ data?: MultipleSubscriptionsOnOrdersInvoice;
3904
+ } | {
3905
+ code?: 'INVOICE_NOT_FOUND';
3906
+ description?: string;
3907
+ data?: Record<string, any>;
3908
+ } | {
3909
+ code?: 'OPERATION_NOT_SUPPORTED_FOR_COLLECTION_METHOD';
3910
+ description?: string;
3911
+ data?: Record<string, any>;
3912
+ };
3913
+ /** @docsIgnore */
3914
+ type ExtendSubscriptionApplicationErrors = {
3915
+ code?: 'OPERATION_NOT_SUPPORTED_FOR_STATUS';
3916
+ description?: string;
3917
+ data?: Record<string, any>;
3918
+ };
2310
3919
 
2311
3920
  type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
2312
3921
  getUrl: (context: any) => string;
@@ -2401,4 +4010,4 @@ declare function listSubscriptionHistory(): __PublicMethodMetaInfo<'GET', {
2401
4010
  subscriptionId: string;
2402
4011
  }, ListSubscriptionHistoryRequest$1, ListSubscriptionHistoryRequest, ListSubscriptionHistoryResponse$1, ListSubscriptionHistoryResponse>;
2403
4012
 
2404
- export { type __PublicMethodMetaInfo, allowedActions, cancelSubscription, countSubscriptions, customerAllowedActions, customerCancelSubscription, customerExtendSubscription, customerGetSubscription, customerInitiatePaymentMethodSetup, customerListUpcomingCharges, customerQuerySubscriptions, customerTurnOffSubscriptionAutoRenewal, customerTurnOnSubscriptionAutoRenewal, customerUpdateSubscriptionPaymentMethod, extendSubscription, getSubscription, getSubscriptionsStats, initiatePaymentMethodSetup, listSubscriptionHistory, listUpcomingCharges, markBillingCycleAsPaid, markLatestInvoiceAsPaid, pauseSubscription, payCycle, previewSubscriptionCharges, previewSubscriptionsCharges, querySubscriptions, resumeSubscription, searchSubscriptions, turnOffSubscriptionAutoRenewal, turnOnSubscriptionAutoRenewal, updateSubscriptionBillingDate, updateSubscriptionPaymentMethod };
4013
+ export { type ActionContext as ActionContextOriginal, type ActionDetails as ActionDetailsOriginal, type ActionEvent as ActionEventOriginal, ActionInitiator as ActionInitiatorOriginal, type ActionInitiatorWithLiterals as ActionInitiatorWithLiteralsOriginal, type Action as ActionOriginal, ActionType as ActionTypeOriginal, type ActionTypeWithLiterals as ActionTypeWithLiteralsOriginal, type AddPausePeriodRequest as AddPausePeriodRequestOriginal, type AddPausePeriodResponse as AddPausePeriodResponseOriginal, type AdditionalFee as AdditionalFeeOriginal, AdditionalFeeTrigger as AdditionalFeeTriggerOriginal, type AdditionalFeeTriggerWithLiterals as AdditionalFeeTriggerWithLiteralsOriginal, type Address as AddressOriginal, type AddressStreetOneOf as AddressStreetOneOfOriginal, type AggregatedTaxBreakdown as AggregatedTaxBreakdownOriginal, type AllowedActionsRequest as AllowedActionsRequestOriginal, type AllowedActionsResponse as AllowedActionsResponseOriginal, type AmountByStatus as AmountByStatusOriginal, type ApplicationFee as ApplicationFeeOriginal, type ApplicationFeeValueOneOf as ApplicationFeeValueOneOfOriginal, type AttachInvoice as AttachInvoiceOriginal, type AutomaticRetryData as AutomaticRetryDataOriginal, type BassToSapiPaypalMigrationRequest as BassToSapiPaypalMigrationRequestOriginal, type BassToSapiPaypalMigrationResponse as BassToSapiPaypalMigrationResponseOriginal, type BillingSettings as BillingSettingsOriginal, type BillingStatus as BillingStatusOriginal, type BulkItemChange as BulkItemChangeOriginal, type BulkUpdateSubscriptionItemsByFilterRequest as BulkUpdateSubscriptionItemsByFilterRequestOriginal, type BulkUpdateSubscriptionItemsByFilterResponse as BulkUpdateSubscriptionItemsByFilterResponseOriginal, type BusinessOriginData as BusinessOriginDataOriginal, type BusinessOrigin as BusinessOriginOriginal, type Cancel as CancelOriginal, type CancelSubscriptionApplicationErrors as CancelSubscriptionApplicationErrorsOriginal, type CancelSubscriptionBORequest as CancelSubscriptionBORequestOriginal, type CancelSubscriptionBOResponse as CancelSubscriptionBOResponseOriginal, type CancelSubscriptionRequest as CancelSubscriptionRequestOriginal, type CancelSubscriptionResponse as CancelSubscriptionResponseOriginal, type CancelTimeCapsuleTaskRequest as CancelTimeCapsuleTaskRequestOriginal, type CancellationInfo as CancellationInfoOriginal, CancellationInitiator as CancellationInitiatorOriginal, type CancellationInitiatorWithLiterals as CancellationInitiatorWithLiteralsOriginal, type CatalogReference as CatalogReferenceOriginal, type Charge as ChargeOriginal, CollectionMethodEnumCollectionMethod as CollectionMethodEnumCollectionMethodOriginal, type CollectionMethodEnumCollectionMethodWithLiterals as CollectionMethodEnumCollectionMethodWithLiteralsOriginal, CollectionMethod as CollectionMethodOriginal, type CollectionMethodWithLiterals as CollectionMethodWithLiteralsOriginal, type Complete as CompleteOriginal, type ConvertSapiRequest as ConvertSapiRequestOriginal, type ConvertSapiResponse as ConvertSapiResponseOriginal, type CountByStatus as CountByStatusOriginal, type CountSubscriptionFilter as CountSubscriptionFilterOriginal, type CountSubscriptionFilterStatusOneOf as CountSubscriptionFilterStatusOneOfOriginal, type CountSubscriptionsRequest as CountSubscriptionsRequestOriginal, type CountSubscriptionsResponse as CountSubscriptionsResponseOriginal, type CreateRecurringInvoiceBORequest as CreateRecurringInvoiceBORequestOriginal, type CreateRecurringInvoiceBOResponse as CreateRecurringInvoiceBOResponseOriginal, type CreateSubscriptionForOrderRequest as CreateSubscriptionForOrderRequestOriginal, type CreateSubscriptionForOrderResponse as CreateSubscriptionForOrderResponseOriginal, type CreateSubscriptionInStateRequestModeOneOf as CreateSubscriptionInStateRequestModeOneOfOriginal, type CreateSubscriptionInStateRequest as CreateSubscriptionInStateRequestOriginal, type CreateSubscriptionInStateResponse as CreateSubscriptionInStateResponseOriginal, type CreateSubscriptionRequest as CreateSubscriptionRequestOriginal, type CreateSubscriptionResponse as CreateSubscriptionResponseOriginal, CreationMode as CreationModeOriginal, type CreationModeWithLiterals as CreationModeWithLiteralsOriginal, type CursorPagingMetadata as CursorPagingMetadataOriginal, type CursorPaging as CursorPagingOriginal, type Cursors as CursorsOriginal, type CustomBillingSchedule as CustomBillingScheduleOriginal, type CustomProrationAmountOneOf as CustomProrationAmountOneOfOriginal, type CustomProration as CustomProrationOriginal, type CustomerAllowedActionsRequest as CustomerAllowedActionsRequestOriginal, type CustomerAllowedActionsResponse as CustomerAllowedActionsResponseOriginal, type CustomerCancelSubscriptionApplicationErrors as CustomerCancelSubscriptionApplicationErrorsOriginal, type CustomerCancelSubscriptionRequest as CustomerCancelSubscriptionRequestOriginal, type CustomerCancelSubscriptionResponse as CustomerCancelSubscriptionResponseOriginal, type CustomerExtendSubscriptionApplicationErrors as CustomerExtendSubscriptionApplicationErrorsOriginal, type CustomerExtendSubscriptionRequest as CustomerExtendSubscriptionRequestOriginal, type CustomerExtendSubscriptionResponse as CustomerExtendSubscriptionResponseOriginal, type CustomerIdOneOf as CustomerIdOneOfOriginal, type CustomerListUpcomingChargesRequest as CustomerListUpcomingChargesRequestOriginal, type CustomerListUpcomingChargesResponse as CustomerListUpcomingChargesResponseOriginal, type Customer as CustomerOriginal, type CustomerTurnOffAutoRenewalRequest as CustomerTurnOffAutoRenewalRequestOriginal, type CustomerTurnOffAutoRenewalResponse as CustomerTurnOffAutoRenewalResponseOriginal, type CustomerTurnOffSubscriptionAutoRenewalApplicationErrors as CustomerTurnOffSubscriptionAutoRenewalApplicationErrorsOriginal, type CustomerTurnOnAutoRenewalRequest as CustomerTurnOnAutoRenewalRequestOriginal, type CustomerTurnOnAutoRenewalResponse as CustomerTurnOnAutoRenewalResponseOriginal, type CustomerTurnOnSubscriptionAutoRenewalApplicationErrors as CustomerTurnOnSubscriptionAutoRenewalApplicationErrorsOriginal, type Cycles as CyclesOriginal, type DeleteDraftSubscriptionRequest as DeleteDraftSubscriptionRequestOriginal, type DeleteDraftSubscriptionResponse as DeleteDraftSubscriptionResponseOriginal, type DeleteSubscriptionBORequest as DeleteSubscriptionBORequestOriginal, type DeleteSubscriptionBOResponse as DeleteSubscriptionBOResponseOriginal, type DeleteSubscriptionRequest as DeleteSubscriptionRequestOriginal, type DeleteSubscriptionResponse as DeleteSubscriptionResponseOriginal, type DetachInvoice as DetachInvoiceOriginal, type DiscountCycles as DiscountCyclesOriginal, type DiscountOrigin as DiscountOriginOriginal, type Discount as DiscountOriginal, type DiscountValueOneOf as DiscountValueOneOfOriginal, type DomainEventBodyOneOf as DomainEventBodyOneOfOriginal, type DomainEvent as DomainEventOriginal, type Duration as DurationOriginal, DurationUnit as DurationUnitOriginal, type DurationUnitWithLiterals as DurationUnitWithLiteralsOriginal, type DynamicTax as DynamicTaxOriginal, type Empty as EmptyOriginal, type EntityCreatedEvent as EntityCreatedEventOriginal, type EntityDeletedEvent as EntityDeletedEventOriginal, type EntityUpdatedEvent as EntityUpdatedEventOriginal, ExtendPolicyType as ExtendPolicyTypeOriginal, type ExtendPolicyTypeWithLiterals as ExtendPolicyTypeWithLiteralsOriginal, type ExtendSubscriptionApplicationErrors as ExtendSubscriptionApplicationErrorsOriginal, type ExtendSubscriptionRequestExtendPolicyOneOf as ExtendSubscriptionRequestExtendPolicyOneOfOriginal, type ExtendSubscriptionRequest as ExtendSubscriptionRequestOriginal, type ExtendSubscriptionResponse as ExtendSubscriptionResponseOriginal, type ExternalCollectionDetails as ExternalCollectionDetailsOriginal, type FinishFreeTrialNowRequest as FinishFreeTrialNowRequestOriginal, type FinishFreeTrialNowResponse as FinishFreeTrialNowResponseOriginal, type FixSubscriptionInvoicesConsistencyRequest as FixSubscriptionInvoicesConsistencyRequestOriginal, type FixSubscriptionInvoicesConsistencyResponse as FixSubscriptionInvoicesConsistencyResponseOriginal, type FixSubscriptionInvoicesRequestModeOneOf as FixSubscriptionInvoicesRequestModeOneOfOriginal, type FixSubscriptionInvoicesRequest as FixSubscriptionInvoicesRequestOriginal, type FixSubscriptionInvoicesResponse as FixSubscriptionInvoicesResponseOriginal, type FixSubscriptionTimeCapsuleTasksRequest as FixSubscriptionTimeCapsuleTasksRequestOriginal, type FixSubscriptionTimeCapsuleTasksResponse as FixSubscriptionTimeCapsuleTasksResponseOriginal, type FixedPrice as FixedPriceOriginal, type FreeTrailEnded as FreeTrailEndedOriginal, type FreeTrailStarted as FreeTrailStartedOriginal, type FreeTrialData as FreeTrialDataOriginal, type FullAddressContactDetails as FullAddressContactDetailsOriginal, type FullAddressDetails as FullAddressDetailsOriginal, type FuturePriceUpdatesRequested as FuturePriceUpdatesRequestedOriginal, type FutureUpdatesRequested as FutureUpdatesRequestedOriginal, type GetFullSubscriptionDataRequest as GetFullSubscriptionDataRequestOriginal, type GetFullSubscriptionDataResponse as GetFullSubscriptionDataResponseOriginal, type GetSubscriptionAndInternalDataRequest as GetSubscriptionAndInternalDataRequestOriginal, type GetSubscriptionAndInternalDataResponse as GetSubscriptionAndInternalDataResponseOriginal, type GetSubscriptionInvoicesRequest as GetSubscriptionInvoicesRequestOriginal, type GetSubscriptionInvoicesResponse as GetSubscriptionInvoicesResponseOriginal, type GetSubscriptionRequest as GetSubscriptionRequestOriginal, type GetSubscriptionResponse as GetSubscriptionResponseOriginal, type GetSubscriptionsStatsRequest as GetSubscriptionsStatsRequestOriginal, type GetSubscriptionsStatsResponse as GetSubscriptionsStatsResponseOriginal, type GracePeriodData as GracePeriodDataOriginal, type GracePeriodEnded as GracePeriodEndedOriginal, type GracePeriodStarted as GracePeriodStartedOriginal, type HandleSubscriptionAfterInvoiceMarkedAsPaidRequest as HandleSubscriptionAfterInvoiceMarkedAsPaidRequestOriginal, HistoryActionInitiator as HistoryActionInitiatorOriginal, type HistoryActionInitiatorWithLiterals as HistoryActionInitiatorWithLiteralsOriginal, HistoryViewMode as HistoryViewModeOriginal, type HistoryViewModeWithLiterals as HistoryViewModeWithLiteralsOriginal, type IdentificationDataIdOneOf as IdentificationDataIdOneOfOriginal, type IdentificationData as IdentificationDataOriginal, IdentityType as IdentityTypeOriginal, type IdentityTypeWithLiterals as IdentityTypeWithLiteralsOriginal, type InitiatePaymentMethodSetupRequest as InitiatePaymentMethodSetupRequestOriginal, type InitiatePaymentMethodSetupResponse as InitiatePaymentMethodSetupResponseOriginal, type InitiatedPaymentMethodSetup as InitiatedPaymentMethodSetupOriginal, type InternalSubscriptionData as InternalSubscriptionDataOriginal, type InvoiceActionActionTypeOneOf as InvoiceActionActionTypeOneOfOriginal, type InvoiceAction as InvoiceActionOriginal, type InvoiceApplicationFee as InvoiceApplicationFeeOriginal, type InvoiceApplicationFeeValueOneOf as InvoiceApplicationFeeValueOneOfOriginal, type InvoiceDiscount as InvoiceDiscountOriginal, type InvoiceDiscountValueOneOf as InvoiceDiscountValueOneOfOriginal, type InvoiceItem as InvoiceItemOriginal, type InvoiceItemPaymentTypeOneOf as InvoiceItemPaymentTypeOneOfOriginal, type Invoice as InvoiceOriginal, type InvoiceShippingCharges as InvoiceShippingChargesOriginal, InvoiceStatus as InvoiceStatusOriginal, type InvoiceStatusWithLiterals as InvoiceStatusWithLiteralsOriginal, ItemCategory as ItemCategoryOriginal, type ItemCategoryWithLiterals as ItemCategoryWithLiteralsOriginal, type ItemChange as ItemChangeOriginal, type Item as ItemOriginal, type ItemTaxData as ItemTaxDataOriginal, type LatestInvoiceMarkedAsPaid as LatestInvoiceMarkedAsPaidOriginal, type LatestPaymentAttempt as LatestPaymentAttemptOriginal, type LineItemTaxSummary as LineItemTaxSummaryOriginal, type ListSubscriptionHistoryRequest as ListSubscriptionHistoryRequestOriginal, type ListSubscriptionHistoryResponse as ListSubscriptionHistoryResponseOriginal, type ListUpcomingChargesRequest as ListUpcomingChargesRequestOriginal, type ListUpcomingChargesResponse as ListUpcomingChargesResponseOriginal, type MarkBillingCycleAsPaidApplicationErrors as MarkBillingCycleAsPaidApplicationErrorsOriginal, type MarkBillingCycleAsPaidRequest as MarkBillingCycleAsPaidRequestOriginal, type MarkBillingCycleAsPaidResponse as MarkBillingCycleAsPaidResponseOriginal, type MarkLatestInvoiceAsPaidApplicationErrors as MarkLatestInvoiceAsPaidApplicationErrorsOriginal, type MarkLatestInvoiceAsPaidRequest as MarkLatestInvoiceAsPaidRequestOriginal, type MarkLatestInvoiceAsPaidResponse as MarkLatestInvoiceAsPaidResponseOriginal, type MessageEnvelope as MessageEnvelopeOriginal, type MigrationDetails as MigrationDetailsOriginal, type Money as MoneyOriginal, type MultipleSubscriptionsOnOrdersInvoice as MultipleSubscriptionsOnOrdersInvoiceOriginal, type OneTime as OneTimeOriginal, OrderMethod as OrderMethodOriginal, type OrderMethodWithLiterals as OrderMethodWithLiteralsOriginal, type Origin as OriginOriginal, type OriginOverride as OriginOverrideOriginal, type PagingMetadataV2 as PagingMetadataV2Original, type Paging as PagingOriginal, PauseAt as PauseAtOriginal, type PauseAtWithLiterals as PauseAtWithLiteralsOriginal, type PauseInfo as PauseInfoOriginal, type PausePeriod as PausePeriodOriginal, PausePolicy as PausePolicyOriginal, type PausePolicyWithLiterals as PausePolicyWithLiteralsOriginal, type PauseSubscriptionApplicationErrors as PauseSubscriptionApplicationErrorsOriginal, type PauseSubscriptionBORequest as PauseSubscriptionBORequestOriginal, type PauseSubscriptionBOResponse as PauseSubscriptionBOResponseOriginal, type PauseSubscriptionRequest as PauseSubscriptionRequestOriginal, type PauseSubscriptionRequested as PauseSubscriptionRequestedOriginal, type PauseSubscriptionResponse as PauseSubscriptionResponseOriginal, type PayCycleRequest as PayCycleRequestOriginal, type PayCycleResponse as PayCycleResponseOriginal, type PayRecurringInvoice as PayRecurringInvoiceOriginal, PaymentAttemptStatus as PaymentAttemptStatusOriginal, type PaymentAttemptStatusWithLiterals as PaymentAttemptStatusWithLiteralsOriginal, type PaymentData as PaymentDataOriginal, type PaymentMethod as PaymentMethodOriginal, type PaymentMethodUpdated as PaymentMethodUpdatedOriginal, PaymentMode as PaymentModeOriginal, type PaymentModeWithLiterals as PaymentModeWithLiteralsOriginal, type PaymentOrigin as PaymentOriginOriginal, type PaymentSettings as PaymentSettingsOriginal, PaymentSettlementMethod as PaymentSettlementMethodOriginal, type PaymentSettlementMethodWithLiterals as PaymentSettlementMethodWithLiteralsOriginal, PaymentStatusEnumPaymentStatus as PaymentStatusEnumPaymentStatusOriginal, type PaymentStatusEnumPaymentStatusWithLiterals as PaymentStatusEnumPaymentStatusWithLiteralsOriginal, PaymentStatus as PaymentStatusOriginal, type PaymentStatusWithLiterals as PaymentStatusWithLiteralsOriginal, type PaymentTaxData as PaymentTaxDataOriginal, PaymentTestMode as PaymentTestModeOriginal, type PaymentTestModeWithLiterals as PaymentTestModeWithLiteralsOriginal, type PlatformOrigin as PlatformOriginOriginal, type PreviewSubscriptionChargesRequest as PreviewSubscriptionChargesRequestOriginal, type PreviewSubscriptionChargesRequestSubscriptionOneOf as PreviewSubscriptionChargesRequestSubscriptionOneOfOriginal, type PreviewSubscriptionChargesResponse as PreviewSubscriptionChargesResponseOriginal, type PreviewSubscriptionsChargesRequest as PreviewSubscriptionsChargesRequestOriginal, type PreviewSubscriptionsChargesResponse as PreviewSubscriptionsChargesResponseOriginal, type PriceAdjustmentAdjustmentTypeOneOf as PriceAdjustmentAdjustmentTypeOneOfOriginal, type PriceAdjustment as PriceAdjustmentOriginal, type PriceAdjustmentValueAdjustmentValueTypeOneOf as PriceAdjustmentValueAdjustmentValueTypeOneOfOriginal, type PriceAdjustmentValue as PriceAdjustmentValueOriginal, type PriceDetails as PriceDetailsOriginal, type PricingModelModelOneOf as PricingModelModelOneOfOriginal, type PricingModel as PricingModelOriginal, type Proration as ProrationOriginal, type ProrationTypeOneOf as ProrationTypeOneOfOriginal, type QuerySubscriptionsRequest as QuerySubscriptionsRequestOriginal, type QuerySubscriptionsResponse as QuerySubscriptionsResponseOriginal, type QueryV2 as QueryV2Original, type QueryV2PagingMethodOneOf as QueryV2PagingMethodOneOfOriginal, type Recurring as RecurringOriginal, type RedirectUrls as RedirectUrlsOriginal, type RefundInfo as RefundInfoOriginal, type Refund as RefundOriginal, RefundReason as RefundReasonOriginal, type RefundReasonWithLiterals as RefundReasonWithLiteralsOriginal, RequestedFields as RequestedFieldsOriginal, type RequestedFieldsWithLiterals as RequestedFieldsWithLiteralsOriginal, type Reschedule as RescheduleOriginal, type ResetPendingUpdates as ResetPendingUpdatesOriginal, type RestoreDraftSubscriptionRequest as RestoreDraftSubscriptionRequestOriginal, type RestoreDraftSubscriptionResponse as RestoreDraftSubscriptionResponseOriginal, type RestoreInfo as RestoreInfoOriginal, ResumeAt as ResumeAtOriginal, type ResumeAtWithLiterals as ResumeAtWithLiteralsOriginal, type ResumeSubscriptionApplicationErrors as ResumeSubscriptionApplicationErrorsOriginal, type ResumeSubscriptionRequest as ResumeSubscriptionRequestOriginal, type ResumeSubscriptionRequested as ResumeSubscriptionRequestedOriginal, type ResumeSubscriptionResponse as ResumeSubscriptionResponseOriginal, type ReviseSubscriptionRequest as ReviseSubscriptionRequestOriginal, type ReviseSubscriptionResponse as ReviseSubscriptionResponseOriginal, RevivePolicy as RevivePolicyOriginal, type RevivePolicyWithLiterals as RevivePolicyWithLiteralsOriginal, type ReviveSubscriptionRequest as ReviveSubscriptionRequestOriginal, type ReviveSubscriptionResponse as ReviveSubscriptionResponseOriginal, type RunTimeCapsuleTaskNowRequest as RunTimeCapsuleTaskNowRequestOriginal, type ScheduleAdditionalInfo as ScheduleAdditionalInfoOriginal, type ScheduleAdditionalInfoParamOneOf as ScheduleAdditionalInfoParamOneOfOriginal, type ScheduleTimeCapsuleTaskRequest as ScheduleTimeCapsuleTaskRequestOriginal, type ScheduledPauseCanceled as ScheduledPauseCanceledOriginal, type ScheduledResumeCanceled as ScheduledResumeCanceledOriginal, type SearchSubscriptionRequest as SearchSubscriptionRequestOriginal, type SearchSubscriptionResponse as SearchSubscriptionResponseOriginal, type SearchSubscriptionsRequest as SearchSubscriptionsRequestOriginal, type SearchSubscriptionsRequestPagingMethodOneOf as SearchSubscriptionsRequestPagingMethodOneOfOriginal, type SearchSubscriptionsResponse as SearchSubscriptionsResponseOriginal, type SendSubscriptionActionEventBORequestEventOneOf as SendSubscriptionActionEventBORequestEventOneOfOriginal, type SendSubscriptionActionEventBORequest as SendSubscriptionActionEventBORequestOriginal, type SendSubscriptionActionEventResponse as SendSubscriptionActionEventResponseOriginal, type SendTimeCapsuleTaskCanceledBIRequest as SendTimeCapsuleTaskCanceledBIRequestOriginal, type SetIsMigratedEvent as SetIsMigratedEventOriginal, type SetShiftingDataRequest as SetShiftingDataRequestOriginal, type SetShiftingDataResponse as SetShiftingDataResponseOriginal, type ShippingCharges as ShippingChargesOriginal, SortOrder as SortOrderOriginal, type SortOrderWithLiterals as SortOrderWithLiteralsOriginal, type SortingClauses as SortingClausesOriginal, type Sorting as SortingOriginal, type SpecificDateSubscriptionUpdateData as SpecificDateSubscriptionUpdateDataOriginal, Status as StatusOriginal, type StatusWithLiterals as StatusWithLiteralsOriginal, type StreetAddress as StreetAddressOriginal, type Subscriber as SubscriberOriginal, type SubscriptionActivated as SubscriptionActivatedOriginal, type SubscriptionAutoRenewalTurnedOff as SubscriptionAutoRenewalTurnedOffOriginal, type SubscriptionAutoRenewalTurnedOn as SubscriptionAutoRenewalTurnedOnOriginal, type SubscriptionBackOfficeAction as SubscriptionBackOfficeActionOriginal, type SubscriptionBillingCyclePaid as SubscriptionBillingCyclePaidOriginal, type SubscriptionBillingCycleStarted as SubscriptionBillingCycleStartedOriginal, type SubscriptionBillingDateUpdated as SubscriptionBillingDateUpdatedOriginal, type SubscriptionBillingDetails as SubscriptionBillingDetailsOriginal, type SubscriptionCanceled as SubscriptionCanceledOriginal, type SubscriptionCancellationRequested as SubscriptionCancellationRequestedOriginal, type SubscriptionCharge as SubscriptionChargeOriginal, type SubscriptionCharges as SubscriptionChargesOriginal, type SubscriptionCollectionMethodUpdated as SubscriptionCollectionMethodUpdatedOriginal, type SubscriptionCreated as SubscriptionCreatedOriginal, type SubscriptionCycleReadyToPay as SubscriptionCycleReadyToPayOriginal, type SubscriptionCycleTriggered as SubscriptionCycleTriggeredOriginal, type SubscriptionDelayedSyncEvent as SubscriptionDelayedSyncEventOriginal, type SubscriptionDeleted as SubscriptionDeletedOriginal, type SubscriptionDiff as SubscriptionDiffOriginal, type SubscriptionEnded as SubscriptionEndedOriginal, type SubscriptionEvent as SubscriptionEventOriginal, type SubscriptionEventPayloadOneOf as SubscriptionEventPayloadOneOfOriginal, type SubscriptionExpired as SubscriptionExpiredOriginal, type SubscriptionExtendedExtendPolicyOneOf as SubscriptionExtendedExtendPolicyOneOfOriginal, type SubscriptionExtended as SubscriptionExtendedOriginal, SubscriptionFrequency as SubscriptionFrequencyOriginal, type SubscriptionFrequencyWithLiterals as SubscriptionFrequencyWithLiteralsOriginal, type SubscriptionHistoryEntry as SubscriptionHistoryEntryOriginal, type SubscriptionInfo as SubscriptionInfoOriginal, type SubscriptionInitialPurchaseCompleted as SubscriptionInitialPurchaseCompletedOriginal, type SubscriptionInvoice as SubscriptionInvoiceOriginal, type SubscriptionMarkedAsPaid as SubscriptionMarkedAsPaidOriginal, type Subscription as SubscriptionOriginal, type SubscriptionPaused as SubscriptionPausedOriginal, type SubscriptionPolicies as SubscriptionPoliciesOriginal, type SubscriptionPolicy as SubscriptionPolicyOriginal, type SubscriptionResumed as SubscriptionResumedOriginal, type SubscriptionRevived as SubscriptionRevivedOriginal, SubscriptionStatusEnumSubscriptionStatus as SubscriptionStatusEnumSubscriptionStatusOriginal, type SubscriptionStatusEnumSubscriptionStatusWithLiterals as SubscriptionStatusEnumSubscriptionStatusWithLiteralsOriginal, SubscriptionStatusGroup as SubscriptionStatusGroupOriginal, type SubscriptionStatusGroupWithLiterals as SubscriptionStatusGroupWithLiteralsOriginal, type SubscriptionStatus as SubscriptionStatusOriginal, type SubscriptionSuspended as SubscriptionSuspendedOriginal, type SubscriptionTrialPeriod as SubscriptionTrialPeriodOriginal, SubscriptionType as SubscriptionTypeOriginal, type SubscriptionTypeWithLiterals as SubscriptionTypeWithLiteralsOriginal, type SubscriptionUpdateData as SubscriptionUpdateDataOriginal, type SubscriptionUpdated as SubscriptionUpdatedOriginal, type Suspension as SuspensionOriginal, type TaskActionActionOneOf as TaskActionActionOneOfOriginal, type TaskAction as TaskActionOriginal, type TaskKey as TaskKeyOriginal, type Task as TaskOriginal, type TaxBreakdown as TaxBreakdownOriginal, type TaxData as TaxDataOriginal, type Tax as TaxOriginal, type TaxSettings as TaxSettingsOriginal, type TaxSummary as TaxSummaryOriginal, type TaxValueOneOf as TaxValueOneOfOriginal, TaxableAddressType as TaxableAddressTypeOriginal, type TaxableAddressTypeWithLiterals as TaxableAddressTypeWithLiteralsOriginal, type TimeBasedProration as TimeBasedProrationOriginal, type Totals as TotalsOriginal, type TurnOffSubscriptionAutoRenewalApplicationErrors as TurnOffSubscriptionAutoRenewalApplicationErrorsOriginal, type TurnOffSubscriptionAutoRenewalRequest as TurnOffSubscriptionAutoRenewalRequestOriginal, type TurnOffSubscriptionAutoRenewalResponse as TurnOffSubscriptionAutoRenewalResponseOriginal, type TurnOnSubscriptionAutoRenewalApplicationErrors as TurnOnSubscriptionAutoRenewalApplicationErrorsOriginal, type TurnOnSubscriptionAutoRenewalRequest as TurnOnSubscriptionAutoRenewalRequestOriginal, type TurnOnSubscriptionAutoRenewalResponse as TurnOnSubscriptionAutoRenewalResponseOriginal, type UnknownSubscriptionEvent as UnknownSubscriptionEventOriginal, type UnsupportedAction as UnsupportedActionOriginal, type UnsupportedReason as UnsupportedReasonOriginal, UpdateAction as UpdateActionOriginal, type UpdateActionWithLiterals as UpdateActionWithLiteralsOriginal, type UpdateBillingDateData as UpdateBillingDateDataOriginal, type UpdateFullSubscriptionRequest as UpdateFullSubscriptionRequestOriginal, type UpdateFullSubscriptionResponse as UpdateFullSubscriptionResponseOriginal, type UpdatePausePaidDurationRequest as UpdatePausePaidDurationRequestOriginal, type UpdatePausePaidDurationResponse as UpdatePausePaidDurationResponseOriginal, type UpdatePaymentMethodBORequest as UpdatePaymentMethodBORequestOriginal, type UpdatePaymentMethodBOResponse as UpdatePaymentMethodBOResponseOriginal, type UpdatePaymentStatusRequest as UpdatePaymentStatusRequestOriginal, type UpdatePaymentStatusResponse as UpdatePaymentStatusResponseOriginal, type UpdateStatusRequest as UpdateStatusRequestOriginal, type UpdateStatusResponse as UpdateStatusResponseOriginal, type UpdateSubscriptionBillingDateApplicationErrors as UpdateSubscriptionBillingDateApplicationErrorsOriginal, type UpdateSubscriptionBillingDateRequest as UpdateSubscriptionBillingDateRequestOriginal, type UpdateSubscriptionBillingDateResponse as UpdateSubscriptionBillingDateResponseOriginal, type UpdateSubscriptionInvoiceCycleRequest as UpdateSubscriptionInvoiceCycleRequestOriginal, type UpdateSubscriptionInvoiceCycleResponse as UpdateSubscriptionInvoiceCycleResponseOriginal, type UpdateSubscriptionItemsRequest as UpdateSubscriptionItemsRequestOriginal, type UpdateSubscriptionItemsResponse as UpdateSubscriptionItemsResponseOriginal, type UpdateSubscriptionOriginRequest as UpdateSubscriptionOriginRequestOriginal, type UpdateSubscriptionOriginResponse as UpdateSubscriptionOriginResponseOriginal, type UpdateSubscriptionPaymentMethodRequest as UpdateSubscriptionPaymentMethodRequestOriginal, type UpdateSubscriptionPaymentMethodResponse as UpdateSubscriptionPaymentMethodResponseOriginal, type UpdateSubscriptionPoliciesRequest as UpdateSubscriptionPoliciesRequestOriginal, type UpdateSubscriptionPoliciesResponse as UpdateSubscriptionPoliciesResponseOriginal, type UpdateSubscriptionRequest as UpdateSubscriptionRequestOriginal, type UpdateSubscriptionResponse as UpdateSubscriptionResponseOriginal, type UpdateSubscriptionStartDateRequest as UpdateSubscriptionStartDateRequestOriginal, type UpdateSubscriptionStartDateResponse as UpdateSubscriptionStartDateResponseOriginal, type UpdatesApplied as UpdatesAppliedOriginal, type V1Duration as V1DurationOriginal, type V1SubscriptionActivated as V1SubscriptionActivatedOriginal, type V1SubscriptionCanceled as V1SubscriptionCanceledOriginal, type V1SubscriptionCreated as V1SubscriptionCreatedOriginal, type V1SubscriptionEventEventOneOf as V1SubscriptionEventEventOneOfOriginal, type V1SubscriptionEvent as V1SubscriptionEventOriginal, type V1SubscriptionInitialPurchaseCompleted as V1SubscriptionInitialPurchaseCompletedOriginal, type V1Subscription as V1SubscriptionOriginal, type V1SubscriptionResumed as V1SubscriptionResumedOriginal, V1SubscriptionStatusEnumSubscriptionStatus as V1SubscriptionStatusEnumSubscriptionStatusOriginal, type V1SubscriptionStatusEnumSubscriptionStatusWithLiterals as V1SubscriptionStatusEnumSubscriptionStatusWithLiteralsOriginal, type V1SubscriptionUpdated as V1SubscriptionUpdatedOriginal, type V2Subscription as V2SubscriptionOriginal, WebhookIdentityType as WebhookIdentityTypeOriginal, type WebhookIdentityTypeWithLiterals as WebhookIdentityTypeWithLiteralsOriginal, type __PublicMethodMetaInfo, allowedActions, cancelSubscription, countSubscriptions, customerAllowedActions, customerCancelSubscription, customerExtendSubscription, customerGetSubscription, customerInitiatePaymentMethodSetup, customerListUpcomingCharges, customerQuerySubscriptions, customerTurnOffSubscriptionAutoRenewal, customerTurnOnSubscriptionAutoRenewal, customerUpdateSubscriptionPaymentMethod, extendSubscription, getSubscription, getSubscriptionsStats, initiatePaymentMethodSetup, listSubscriptionHistory, listUpcomingCharges, markBillingCycleAsPaid, markLatestInvoiceAsPaid, pauseSubscription, payCycle, previewSubscriptionCharges, previewSubscriptionsCharges, querySubscriptions, resumeSubscription, searchSubscriptions, turnOffSubscriptionAutoRenewal, turnOnSubscriptionAutoRenewal, updateSubscriptionBillingDate, updateSubscriptionPaymentMethod };