@wix/pricing-plans 1.0.107 → 1.0.109
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +4 -4
- package/type-bundles/context.bundle.d.ts +115 -86
- package/type-bundles/index.bundle.d.ts +115 -86
- package/type-bundles/meta.bundle.d.ts +136 -96
@@ -217,27 +217,35 @@ interface Tax$1 {
|
|
217
217
|
}
|
218
218
|
/** An object specifying how often and for how long payments recur (may be forever). */
|
219
219
|
interface Recurrence$3 {
|
220
|
-
/**
|
220
|
+
/**
|
221
|
+
* Number of payment cycles the subscription is valid for.
|
222
|
+
* `0` for unlimited plans or for plans that are valid until canceled.
|
223
|
+
*/
|
221
224
|
cycleDuration?: Duration$3;
|
222
225
|
/**
|
223
|
-
*
|
224
|
-
*
|
225
|
-
* `
|
226
|
+
* Length of a payment cycle. For example, 1 month to have monthly payments.
|
227
|
+
* Multiply `cycleDuration`'s `count` by `cycleCount` to get the subscription duration.
|
228
|
+
* Currently, only a value of `1` is supported.
|
226
229
|
*/
|
227
230
|
cycleCount?: number | null;
|
228
231
|
}
|
229
232
|
/** A duration expressed in number of time units. */
|
230
233
|
interface Duration$3 {
|
231
|
-
/**
|
234
|
+
/** Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`. */
|
232
235
|
count?: number | null;
|
233
236
|
/** Unit of time for the cycle duration. */
|
234
237
|
unit?: PeriodUnit$3;
|
235
238
|
}
|
236
239
|
declare enum PeriodUnit$3 {
|
240
|
+
/** Not defined. */
|
237
241
|
UNDEFINED = "UNDEFINED",
|
242
|
+
/** Time unit is a day. */
|
238
243
|
DAY = "DAY",
|
244
|
+
/** Time unit is a week. */
|
239
245
|
WEEK = "WEEK",
|
246
|
+
/** Time unit is a month. */
|
240
247
|
MONTH = "MONTH",
|
248
|
+
/** Time unit is a year. */
|
241
249
|
YEAR = "YEAR"
|
242
250
|
}
|
243
251
|
interface Coupon$1 {
|
@@ -1066,27 +1074,35 @@ interface Tax {
|
|
1066
1074
|
}
|
1067
1075
|
/** An object specifying how often and for how long payments recur (may be forever). */
|
1068
1076
|
interface Recurrence$2 {
|
1069
|
-
/**
|
1077
|
+
/**
|
1078
|
+
* Number of payment cycles the subscription is valid for.
|
1079
|
+
* `0` for unlimited plans or for plans that are valid until canceled.
|
1080
|
+
*/
|
1070
1081
|
cycleDuration?: Duration$2;
|
1071
1082
|
/**
|
1072
|
-
*
|
1073
|
-
*
|
1074
|
-
* `
|
1083
|
+
* Length of a payment cycle. For example, 1 month to have monthly payments.
|
1084
|
+
* Multiply `cycleDuration`'s `count` by `cycleCount` to get the subscription duration.
|
1085
|
+
* Currently, only a value of `1` is supported.
|
1075
1086
|
*/
|
1076
1087
|
cycleCount?: number | null;
|
1077
1088
|
}
|
1078
1089
|
/** A duration expressed in number of time units. */
|
1079
1090
|
interface Duration$2 {
|
1080
|
-
/**
|
1091
|
+
/** Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`. */
|
1081
1092
|
count?: number | null;
|
1082
1093
|
/** Unit of time for the cycle duration. */
|
1083
1094
|
unit?: PeriodUnit$2;
|
1084
1095
|
}
|
1085
1096
|
declare enum PeriodUnit$2 {
|
1097
|
+
/** Not defined. */
|
1086
1098
|
UNDEFINED = "UNDEFINED",
|
1099
|
+
/** Time unit is a day. */
|
1087
1100
|
DAY = "DAY",
|
1101
|
+
/** Time unit is a week. */
|
1088
1102
|
WEEK = "WEEK",
|
1103
|
+
/** Time unit is a month. */
|
1089
1104
|
MONTH = "MONTH",
|
1105
|
+
/** Time unit is a year. */
|
1090
1106
|
YEAR = "YEAR"
|
1091
1107
|
}
|
1092
1108
|
interface Coupon {
|
@@ -1763,7 +1779,7 @@ interface Plan$1 {
|
|
1763
1779
|
name?: string | null;
|
1764
1780
|
/** Plan description. */
|
1765
1781
|
description?: string | null;
|
1766
|
-
/**
|
1782
|
+
/** List of text strings that promote what is included with this plan. For example, "Plenty of parking" or "Free gift on your birthday." */
|
1767
1783
|
perks?: StringList$1;
|
1768
1784
|
/** Plan price, payment schedule, and expiration. */
|
1769
1785
|
pricing?: Pricing$1;
|
@@ -1802,14 +1818,17 @@ interface Plan$1 {
|
|
1802
1818
|
/**
|
1803
1819
|
* Number of times the same buyer can purchase the plan. Currently limited to support:
|
1804
1820
|
* - Empty value or a value of `0`, meaning no limitation.
|
1805
|
-
* - Value of `1`, meaning limited to
|
1821
|
+
* - Value of `1`, meaning limited to 1 purchase per buyer.
|
1806
1822
|
*/
|
1807
1823
|
maxPurchasesPerBuyer?: number | null;
|
1808
1824
|
/** Whether the buyer can start the plan at a later date. Defaults to false. */
|
1809
1825
|
allowFutureStartDate?: boolean | null;
|
1810
|
-
/**
|
1826
|
+
/**
|
1827
|
+
* Whether the buyer is allowed to cancel their plan. Defaults to false.
|
1828
|
+
* If false, calling Request Cancellation returns an error.
|
1829
|
+
*/
|
1811
1830
|
buyerCanCancel?: boolean | null;
|
1812
|
-
/** Any terms and conditions that apply to the plan. This information
|
1831
|
+
/** Any terms and conditions that apply to the plan. This information is displayed during checkout. */
|
1813
1832
|
termsAndConditions?: string | null;
|
1814
1833
|
/**
|
1815
1834
|
* ID of the form associated with the plan at checkout.
|
@@ -1818,80 +1837,88 @@ interface Plan$1 {
|
|
1818
1837
|
*/
|
1819
1838
|
formId?: string | null;
|
1820
1839
|
}
|
1821
|
-
/** This wrapper type
|
1840
|
+
/** This wrapper type exists to distinguish an empty string list from no list at all in update requests. */
|
1822
1841
|
interface StringList$1 {
|
1823
1842
|
values?: string[];
|
1824
1843
|
}
|
1825
1844
|
/** Plan pricing information. Includes the price of the plan and payment details. */
|
1826
1845
|
interface Pricing$1 extends PricingPricingModelOneOf$1 {
|
1827
|
-
/**
|
1846
|
+
/** Pricing model indicating that the plan has recurring payments. This type of subscription is not a "Wix subscription," which encompasses various types of subscriptions, such as Wix Stores subscriptions, Wix invoice subscriptions, and all pricing plan models. */
|
1828
1847
|
subscription?: Recurrence$1;
|
1829
|
-
/**
|
1848
|
+
/** Pricing model indicating a single payment per cycle and the length of the cycle. The cycle is the duration of the plan, not a payment cycle. */
|
1830
1849
|
singlePaymentForDuration?: Duration$1;
|
1831
|
-
/**
|
1850
|
+
/** Pricing model indicating the plan is paid in a single payment. The plan is valid until canceled. */
|
1832
1851
|
singlePaymentUnlimited?: boolean | null;
|
1833
|
-
/** Amount for a single payment
|
1852
|
+
/** Amount for a single payment. For subscriptions, this is the amount to pay each payment cycle and it is required. For plans that are not recurring plans, it is the single payment amount for the whole subscription. */
|
1834
1853
|
price?: Money$1;
|
1835
|
-
/** Free trial period for the plan in days.
|
1854
|
+
/** Free trial period for the plan in days. Available only for recurring plans, meaning plans whose pricing model is `subscription`. Set to `0` to remove the free trial. */
|
1836
1855
|
freeTrialDays?: number | null;
|
1837
1856
|
}
|
1838
1857
|
/** @oneof */
|
1839
1858
|
interface PricingPricingModelOneOf$1 {
|
1840
|
-
/**
|
1859
|
+
/** Pricing model indicating that the plan has recurring payments. This type of subscription is not a "Wix subscription," which encompasses various types of subscriptions, such as Wix Stores subscriptions, Wix invoice subscriptions, and all pricing plan models. */
|
1841
1860
|
subscription?: Recurrence$1;
|
1842
|
-
/**
|
1861
|
+
/** Pricing model indicating a single payment per cycle and the length of the cycle. The cycle is the duration of the plan, not a payment cycle. */
|
1843
1862
|
singlePaymentForDuration?: Duration$1;
|
1844
|
-
/**
|
1863
|
+
/** Pricing model indicating the plan is paid in a single payment. The plan is valid until canceled. */
|
1845
1864
|
singlePaymentUnlimited?: boolean | null;
|
1846
1865
|
}
|
1847
1866
|
/** An object specifying how often and for how long payments recur (may be forever). */
|
1848
1867
|
interface Recurrence$1 {
|
1849
|
-
/**
|
1868
|
+
/**
|
1869
|
+
* Number of payment cycles the subscription is valid for.
|
1870
|
+
* `0` for unlimited plans or for plans that are valid until canceled.
|
1871
|
+
*/
|
1850
1872
|
cycleDuration?: Duration$1;
|
1851
1873
|
/**
|
1852
|
-
*
|
1853
|
-
*
|
1854
|
-
* `
|
1874
|
+
* Length of a payment cycle. For example, 1 month to have monthly payments.
|
1875
|
+
* Multiply `cycleDuration`'s `count` by `cycleCount` to get the subscription duration.
|
1876
|
+
* Currently, only a value of `1` is supported.
|
1855
1877
|
*/
|
1856
1878
|
cycleCount?: number | null;
|
1857
1879
|
}
|
1858
1880
|
/** A duration expressed in number of time units. */
|
1859
1881
|
interface Duration$1 {
|
1860
|
-
/**
|
1882
|
+
/** Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`. */
|
1861
1883
|
count?: number | null;
|
1862
1884
|
/** Unit of time for the cycle duration. */
|
1863
1885
|
unit?: PeriodUnit$1;
|
1864
1886
|
}
|
1865
1887
|
declare enum PeriodUnit$1 {
|
1888
|
+
/** Not defined. */
|
1866
1889
|
UNDEFINED = "UNDEFINED",
|
1890
|
+
/** Time unit is a day. */
|
1867
1891
|
DAY = "DAY",
|
1892
|
+
/** Time unit is a week. */
|
1868
1893
|
WEEK = "WEEK",
|
1894
|
+
/** Time unit is a month. */
|
1869
1895
|
MONTH = "MONTH",
|
1896
|
+
/** Time unit is a year. */
|
1870
1897
|
YEAR = "YEAR"
|
1871
1898
|
}
|
1872
1899
|
interface Money$1 {
|
1873
|
-
/** Monetary amount. Decimal string with a period as a decimal separator
|
1900
|
+
/** Monetary amount. Decimal string with a period as a decimal separator. For example, `'3.99'`. Can't be negative. */
|
1874
1901
|
value?: string;
|
1875
|
-
/** Currency code.
|
1902
|
+
/** Currency code. Three-letter currency code in [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format. For example, `'USD'`. */
|
1876
1903
|
currency?: string;
|
1877
1904
|
}
|
1878
1905
|
declare enum AppliedAt$1 {
|
1879
1906
|
UNKNOWN_CHARGE_EVENT = "UNKNOWN_CHARGE_EVENT",
|
1880
|
-
/** Will charge the fee on first payment. If order has a free trial
|
1907
|
+
/** Will charge the fee on the first payment. If the order has a free trial, it will charge after the free trial. */
|
1881
1908
|
FIRST_PAYMENT = "FIRST_PAYMENT"
|
1882
1909
|
}
|
1883
1910
|
interface ListPublicPlansRequest$1 {
|
1884
|
-
/** Number of items to list. Defaults to 75
|
1911
|
+
/** Number of items to list. Defaults to `75`. See limits ([SDK](https://dev.wix.com/docs/sdk/backend-modules/pricing-plans/plans/list-public-plans) | [REST](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#paging)). */
|
1885
1912
|
limit?: number | null;
|
1886
|
-
/** Number of items to skip. Defaults to 0
|
1913
|
+
/** Number of items to skip. Defaults to `0`. See paging ([SDK](https://dev.wix.com/docs/sdk/backend-modules/pricing-plans/plans/list-public-plans) |[REST](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#paging)). */
|
1887
1914
|
offset?: number | null;
|
1888
|
-
/** IDs of plans to list. Non-existent IDs
|
1915
|
+
/** IDs of plans to list. Non-existent IDs are ignored and don't cause errors. You can specify a maximum of 100 IDs. */
|
1889
1916
|
planIds?: string[];
|
1890
1917
|
}
|
1891
1918
|
interface ListPublicPlansResponse$1 {
|
1892
1919
|
/** List of public pricing plans. */
|
1893
1920
|
plans?: PublicPlan$1[];
|
1894
|
-
/** Object containing paging-related data (number of plans returned, offset). */
|
1921
|
+
/** Object containing paging-related data (such as the number of plans returned, the offset, and so on). */
|
1895
1922
|
pagingMetadata?: PagingMetadataV2$1;
|
1896
1923
|
}
|
1897
1924
|
/** Public plan entity containing information about the pricing plan. Can be read by any site member or visitor. */
|
@@ -1902,7 +1929,7 @@ interface PublicPlan$1 {
|
|
1902
1929
|
name?: string | null;
|
1903
1930
|
/** Plan description. */
|
1904
1931
|
description?: string | null;
|
1905
|
-
/** What is included with this plan (
|
1932
|
+
/** What is included with this plan (for example, 1 weekly entrance to a specific class). */
|
1906
1933
|
perks?: StringList$1;
|
1907
1934
|
/** Plan price, payment schedule, and expiration. */
|
1908
1935
|
pricing?: Pricing$1;
|
@@ -1914,13 +1941,13 @@ interface PublicPlan$1 {
|
|
1914
1941
|
updatedDate?: Date | null;
|
1915
1942
|
/** URL-friendly version of plan name. Unique across all plans in the same site. */
|
1916
1943
|
slug?: string | null;
|
1917
|
-
/** Number of times the same buyer can purchase the plan. An empty value or a value of
|
1944
|
+
/** Number of times the same buyer can purchase the plan. An empty value or a value of 0 means no limitation. */
|
1918
1945
|
maxPurchasesPerBuyer?: number | null;
|
1919
1946
|
/** Whether the buyer can start the plan at a later date. Defaults to false. */
|
1920
1947
|
allowFutureStartDate?: boolean | null;
|
1921
1948
|
/** Whether the buyer is allowed to cancel their plan. Defaults to false. */
|
1922
1949
|
buyerCanCancel?: boolean | null;
|
1923
|
-
/** Any terms and conditions that apply to the plan. This information
|
1950
|
+
/** Any terms and conditions that apply to the plan. This information is displayed during checkout. */
|
1924
1951
|
termsAndConditions?: string | null;
|
1925
1952
|
/**
|
1926
1953
|
* ID of the form associated with the plan at checkout.
|
@@ -1948,15 +1975,15 @@ interface Cursors$1 {
|
|
1948
1975
|
prev?: string | null;
|
1949
1976
|
}
|
1950
1977
|
interface QueryPublicPlansRequest$1 {
|
1951
|
-
/** Query */
|
1978
|
+
/** Query options. */
|
1952
1979
|
query?: QueryV2$1;
|
1953
1980
|
}
|
1954
1981
|
interface QueryV2$1 {
|
1955
|
-
/** A filter object. See
|
1982
|
+
/** A filter object. See supported fields and operators ([SDK](https://dev.wix.com/docs/sdk/backend-modules/pricing-plans/plans/query-public-plans) | [REST](https://dev.wix.com/api/rest/wix-pricing-plans/pricing-plans/plans/filter-and-sort#wix-pricing-plans_pricing-plans_plans_filter-and-sort_query-public-plans)). */
|
1956
1983
|
filter?: Record<string, any> | null;
|
1957
|
-
/** Sort object in the form [{"fieldName":"sortField1"},{"fieldName":"sortField2","direction":"DESC"}] */
|
1984
|
+
/** Sort object in the form [{"fieldName":"sortField1"},{"fieldName":"sortField2","direction":"DESC"}]. */
|
1958
1985
|
sort?: Sorting$1[];
|
1959
|
-
/** Pointer to page of results using offset. Can
|
1986
|
+
/** Pointer to page of results using offset. Can't be used together with 'cursorPaging'. */
|
1960
1987
|
paging?: Paging$1;
|
1961
1988
|
}
|
1962
1989
|
interface Sorting$1 {
|
@@ -1978,7 +2005,7 @@ interface Paging$1 {
|
|
1978
2005
|
interface QueryPublicPlansResponse$1 {
|
1979
2006
|
/** List of public pricing plans that match the specified query. */
|
1980
2007
|
plans?: PublicPlan$1[];
|
1981
|
-
/** Object containing paging-related data (number of plans returned, offset). */
|
2008
|
+
/** Object containing paging-related data (such as the number of plans returned, the offset, and so on). */
|
1982
2009
|
pagingMetadata?: PagingMetadataV2$1;
|
1983
2010
|
}
|
1984
2011
|
interface GetPlanRequest$1 {
|
@@ -1990,15 +2017,15 @@ interface GetPlanResponse$1 {
|
|
1990
2017
|
plan?: Plan$1;
|
1991
2018
|
}
|
1992
2019
|
interface ListPlansRequest$1 {
|
1993
|
-
/** Archived filter. Defaults to ACTIVE (not archived) only. */
|
2020
|
+
/** Archived filter. Defaults to `ACTIVE` (not archived) only. */
|
1994
2021
|
archived?: ArchivedFilter$1;
|
1995
|
-
/** Visibility filter. Defaults to PUBLIC_AND_HIDDEN (meaning, both are listed). */
|
2022
|
+
/** Visibility filter. Defaults to `PUBLIC_AND_HIDDEN` (meaning, both are listed). */
|
1996
2023
|
public?: PublicFilter$1;
|
1997
|
-
/** Number of pricing plans to list. Defaults to 75
|
2024
|
+
/** Number of pricing plans to list. Defaults to `75`. */
|
1998
2025
|
limit?: number | null;
|
1999
|
-
/** Number of pricing plans to skip. Defaults to 0
|
2026
|
+
/** Number of pricing plans to skip. Defaults to `0`. */
|
2000
2027
|
offset?: number | null;
|
2001
|
-
/**
|
2028
|
+
/** IDs of plans to list. If non-existent IDs are specified, they are ignored and don't cause errors. If no IDs are specified, all public and hidden plans are listed according to the order displayed in a site's dashboard (which you can set with Arrange Plans). You can specify a maximum of 100 IDs. */
|
2002
2029
|
planIds?: string[];
|
2003
2030
|
}
|
2004
2031
|
declare enum ArchivedFilter$1 {
|
@@ -2020,7 +2047,7 @@ declare enum PublicFilter$1 {
|
|
2020
2047
|
interface ListPlansResponse$1 {
|
2021
2048
|
/** List of all public and hidden pricing plans. */
|
2022
2049
|
plans?: Plan$1[];
|
2023
|
-
/** Object containing paging-related data (number of plans returned, offset). */
|
2050
|
+
/** Object containing paging-related data (such as the number of plans returned, the offset, and so on). */
|
2024
2051
|
pagingMetadata?: PagingMetadataV2$1;
|
2025
2052
|
}
|
2026
2053
|
interface GetPlanStatsRequest$1 {
|
@@ -2030,7 +2057,7 @@ interface GetPlanStatsResponse$1 {
|
|
2030
2057
|
totalPlans?: number;
|
2031
2058
|
}
|
2032
2059
|
interface CreatePlanRequest$1 {
|
2033
|
-
/** Plan
|
2060
|
+
/** Plan details. */
|
2034
2061
|
plan: Plan$1;
|
2035
2062
|
}
|
2036
2063
|
interface CreatePlanResponse$1 {
|
@@ -2038,7 +2065,7 @@ interface CreatePlanResponse$1 {
|
|
2038
2065
|
plan?: Plan$1;
|
2039
2066
|
}
|
2040
2067
|
interface UpdatePlanRequest$1 {
|
2041
|
-
/**
|
2068
|
+
/** ID of the plan to update. */
|
2042
2069
|
plan: Plan$1;
|
2043
2070
|
}
|
2044
2071
|
interface UpdatePlanResponse$1 {
|
@@ -2046,7 +2073,7 @@ interface UpdatePlanResponse$1 {
|
|
2046
2073
|
plan?: Plan$1;
|
2047
2074
|
}
|
2048
2075
|
interface SetPlanVisibilityRequest$1 {
|
2049
|
-
/**
|
2076
|
+
/** The ID of the plan to either display or hide on a site page. */
|
2050
2077
|
id: string;
|
2051
2078
|
/** Whether a plan is visible to members and site visitors. Updates the `public` field. */
|
2052
2079
|
visible: boolean;
|
@@ -2056,6 +2083,7 @@ interface SetPlanVisibilityResponse$1 {
|
|
2056
2083
|
plan?: Plan$1;
|
2057
2084
|
}
|
2058
2085
|
interface MakePlanPrimaryRequest$1 {
|
2086
|
+
/** Pricing plan ID. */
|
2059
2087
|
id: string;
|
2060
2088
|
}
|
2061
2089
|
interface MakePlanPrimaryResponse$1 {
|
@@ -2067,7 +2095,7 @@ interface ClearPrimaryRequest$1 {
|
|
2067
2095
|
interface ClearPrimaryResponse$1 {
|
2068
2096
|
}
|
2069
2097
|
interface ArchivePlanRequest$1 {
|
2070
|
-
/** ID of the plan to archive. */
|
2098
|
+
/** ID of the active plan to archive. */
|
2071
2099
|
id: string;
|
2072
2100
|
}
|
2073
2101
|
interface ArchivePlanResponse$1 {
|
@@ -2157,7 +2185,7 @@ interface Plan {
|
|
2157
2185
|
name?: string | null;
|
2158
2186
|
/** Plan description. */
|
2159
2187
|
description?: string | null;
|
2160
|
-
/**
|
2188
|
+
/** List of text strings that promote what is included with this plan. For example, "Plenty of parking" or "Free gift on your birthday." */
|
2161
2189
|
perks?: StringList;
|
2162
2190
|
/** Plan price, payment schedule, and expiration. */
|
2163
2191
|
pricing?: Pricing;
|
@@ -2196,14 +2224,17 @@ interface Plan {
|
|
2196
2224
|
/**
|
2197
2225
|
* Number of times the same buyer can purchase the plan. Currently limited to support:
|
2198
2226
|
* - Empty value or a value of `0`, meaning no limitation.
|
2199
|
-
* - Value of `1`, meaning limited to
|
2227
|
+
* - Value of `1`, meaning limited to 1 purchase per buyer.
|
2200
2228
|
*/
|
2201
2229
|
maxPurchasesPerBuyer?: number | null;
|
2202
2230
|
/** Whether the buyer can start the plan at a later date. Defaults to false. */
|
2203
2231
|
allowFutureStartDate?: boolean | null;
|
2204
|
-
/**
|
2232
|
+
/**
|
2233
|
+
* Whether the buyer is allowed to cancel their plan. Defaults to false.
|
2234
|
+
* If false, calling Request Cancellation returns an error.
|
2235
|
+
*/
|
2205
2236
|
buyerCanCancel?: boolean | null;
|
2206
|
-
/** Any terms and conditions that apply to the plan. This information
|
2237
|
+
/** Any terms and conditions that apply to the plan. This information is displayed during checkout. */
|
2207
2238
|
termsAndConditions?: string | null;
|
2208
2239
|
/**
|
2209
2240
|
* ID of the form associated with the plan at checkout.
|
@@ -2212,80 +2243,88 @@ interface Plan {
|
|
2212
2243
|
*/
|
2213
2244
|
formId?: string | null;
|
2214
2245
|
}
|
2215
|
-
/** This wrapper type
|
2246
|
+
/** This wrapper type exists to distinguish an empty string list from no list at all in update requests. */
|
2216
2247
|
interface StringList {
|
2217
2248
|
values?: string[];
|
2218
2249
|
}
|
2219
2250
|
/** Plan pricing information. Includes the price of the plan and payment details. */
|
2220
2251
|
interface Pricing extends PricingPricingModelOneOf {
|
2221
|
-
/**
|
2252
|
+
/** Pricing model indicating that the plan has recurring payments. This type of subscription is not a "Wix subscription," which encompasses various types of subscriptions, such as Wix Stores subscriptions, Wix invoice subscriptions, and all pricing plan models. */
|
2222
2253
|
subscription?: Recurrence;
|
2223
|
-
/**
|
2254
|
+
/** Pricing model indicating a single payment per cycle and the length of the cycle. The cycle is the duration of the plan, not a payment cycle. */
|
2224
2255
|
singlePaymentForDuration?: Duration;
|
2225
|
-
/**
|
2256
|
+
/** Pricing model indicating the plan is paid in a single payment. The plan is valid until canceled. */
|
2226
2257
|
singlePaymentUnlimited?: boolean | null;
|
2227
|
-
/** Amount for a single payment
|
2258
|
+
/** Amount for a single payment. For subscriptions, this is the amount to pay each payment cycle and it is required. For plans that are not recurring plans, it is the single payment amount for the whole subscription. */
|
2228
2259
|
price?: Money;
|
2229
|
-
/** Free trial period for the plan in days.
|
2260
|
+
/** Free trial period for the plan in days. Available only for recurring plans, meaning plans whose pricing model is `subscription`. Set to `0` to remove the free trial. */
|
2230
2261
|
freeTrialDays?: number | null;
|
2231
2262
|
}
|
2232
2263
|
/** @oneof */
|
2233
2264
|
interface PricingPricingModelOneOf {
|
2234
|
-
/**
|
2265
|
+
/** Pricing model indicating that the plan has recurring payments. This type of subscription is not a "Wix subscription," which encompasses various types of subscriptions, such as Wix Stores subscriptions, Wix invoice subscriptions, and all pricing plan models. */
|
2235
2266
|
subscription?: Recurrence;
|
2236
|
-
/**
|
2267
|
+
/** Pricing model indicating a single payment per cycle and the length of the cycle. The cycle is the duration of the plan, not a payment cycle. */
|
2237
2268
|
singlePaymentForDuration?: Duration;
|
2238
|
-
/**
|
2269
|
+
/** Pricing model indicating the plan is paid in a single payment. The plan is valid until canceled. */
|
2239
2270
|
singlePaymentUnlimited?: boolean | null;
|
2240
2271
|
}
|
2241
2272
|
/** An object specifying how often and for how long payments recur (may be forever). */
|
2242
2273
|
interface Recurrence {
|
2243
|
-
/**
|
2274
|
+
/**
|
2275
|
+
* Number of payment cycles the subscription is valid for.
|
2276
|
+
* `0` for unlimited plans or for plans that are valid until canceled.
|
2277
|
+
*/
|
2244
2278
|
cycleDuration?: Duration;
|
2245
2279
|
/**
|
2246
|
-
*
|
2247
|
-
*
|
2248
|
-
* `
|
2280
|
+
* Length of a payment cycle. For example, 1 month to have monthly payments.
|
2281
|
+
* Multiply `cycleDuration`'s `count` by `cycleCount` to get the subscription duration.
|
2282
|
+
* Currently, only a value of `1` is supported.
|
2249
2283
|
*/
|
2250
2284
|
cycleCount?: number | null;
|
2251
2285
|
}
|
2252
2286
|
/** A duration expressed in number of time units. */
|
2253
2287
|
interface Duration {
|
2254
|
-
/**
|
2288
|
+
/** Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`. */
|
2255
2289
|
count?: number | null;
|
2256
2290
|
/** Unit of time for the cycle duration. */
|
2257
2291
|
unit?: PeriodUnit;
|
2258
2292
|
}
|
2259
2293
|
declare enum PeriodUnit {
|
2294
|
+
/** Not defined. */
|
2260
2295
|
UNDEFINED = "UNDEFINED",
|
2296
|
+
/** Time unit is a day. */
|
2261
2297
|
DAY = "DAY",
|
2298
|
+
/** Time unit is a week. */
|
2262
2299
|
WEEK = "WEEK",
|
2300
|
+
/** Time unit is a month. */
|
2263
2301
|
MONTH = "MONTH",
|
2302
|
+
/** Time unit is a year. */
|
2264
2303
|
YEAR = "YEAR"
|
2265
2304
|
}
|
2266
2305
|
interface Money {
|
2267
|
-
/** Monetary amount. Decimal string with a period as a decimal separator
|
2306
|
+
/** Monetary amount. Decimal string with a period as a decimal separator. For example, `'3.99'`. Can't be negative. */
|
2268
2307
|
value?: string;
|
2269
|
-
/** Currency code.
|
2308
|
+
/** Currency code. Three-letter currency code in [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format. For example, `'USD'`. */
|
2270
2309
|
currency?: string;
|
2271
2310
|
}
|
2272
2311
|
declare enum AppliedAt {
|
2273
2312
|
UNKNOWN_CHARGE_EVENT = "UNKNOWN_CHARGE_EVENT",
|
2274
|
-
/** Will charge the fee on first payment. If order has a free trial
|
2313
|
+
/** Will charge the fee on the first payment. If the order has a free trial, it will charge after the free trial. */
|
2275
2314
|
FIRST_PAYMENT = "FIRST_PAYMENT"
|
2276
2315
|
}
|
2277
2316
|
interface ListPublicPlansRequest {
|
2278
|
-
/** Number of items to list. Defaults to 75
|
2317
|
+
/** Number of items to list. Defaults to `75`. See limits ([SDK](https://dev.wix.com/docs/sdk/backend-modules/pricing-plans/plans/list-public-plans) | [REST](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#paging)). */
|
2279
2318
|
limit?: number | null;
|
2280
|
-
/** Number of items to skip. Defaults to 0
|
2319
|
+
/** Number of items to skip. Defaults to `0`. See paging ([SDK](https://dev.wix.com/docs/sdk/backend-modules/pricing-plans/plans/list-public-plans) |[REST](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#paging)). */
|
2281
2320
|
offset?: number | null;
|
2282
|
-
/** IDs of plans to list. Non-existent IDs
|
2321
|
+
/** IDs of plans to list. Non-existent IDs are ignored and don't cause errors. You can specify a maximum of 100 IDs. */
|
2283
2322
|
planIds?: string[];
|
2284
2323
|
}
|
2285
2324
|
interface ListPublicPlansResponse {
|
2286
2325
|
/** List of public pricing plans. */
|
2287
2326
|
plans?: PublicPlan[];
|
2288
|
-
/** Object containing paging-related data (number of plans returned, offset). */
|
2327
|
+
/** Object containing paging-related data (such as the number of plans returned, the offset, and so on). */
|
2289
2328
|
pagingMetadata?: PagingMetadataV2;
|
2290
2329
|
}
|
2291
2330
|
/** Public plan entity containing information about the pricing plan. Can be read by any site member or visitor. */
|
@@ -2296,7 +2335,7 @@ interface PublicPlan {
|
|
2296
2335
|
name?: string | null;
|
2297
2336
|
/** Plan description. */
|
2298
2337
|
description?: string | null;
|
2299
|
-
/** What is included with this plan (
|
2338
|
+
/** What is included with this plan (for example, 1 weekly entrance to a specific class). */
|
2300
2339
|
perks?: StringList;
|
2301
2340
|
/** Plan price, payment schedule, and expiration. */
|
2302
2341
|
pricing?: Pricing;
|
@@ -2308,13 +2347,13 @@ interface PublicPlan {
|
|
2308
2347
|
_updatedDate?: Date | null;
|
2309
2348
|
/** URL-friendly version of plan name. Unique across all plans in the same site. */
|
2310
2349
|
slug?: string | null;
|
2311
|
-
/** Number of times the same buyer can purchase the plan. An empty value or a value of
|
2350
|
+
/** Number of times the same buyer can purchase the plan. An empty value or a value of 0 means no limitation. */
|
2312
2351
|
maxPurchasesPerBuyer?: number | null;
|
2313
2352
|
/** Whether the buyer can start the plan at a later date. Defaults to false. */
|
2314
2353
|
allowFutureStartDate?: boolean | null;
|
2315
2354
|
/** Whether the buyer is allowed to cancel their plan. Defaults to false. */
|
2316
2355
|
buyerCanCancel?: boolean | null;
|
2317
|
-
/** Any terms and conditions that apply to the plan. This information
|
2356
|
+
/** Any terms and conditions that apply to the plan. This information is displayed during checkout. */
|
2318
2357
|
termsAndConditions?: string | null;
|
2319
2358
|
/**
|
2320
2359
|
* ID of the form associated with the plan at checkout.
|
@@ -2342,15 +2381,15 @@ interface Cursors {
|
|
2342
2381
|
prev?: string | null;
|
2343
2382
|
}
|
2344
2383
|
interface QueryPublicPlansRequest {
|
2345
|
-
/** Query */
|
2384
|
+
/** Query options. */
|
2346
2385
|
query?: QueryV2;
|
2347
2386
|
}
|
2348
2387
|
interface QueryV2 {
|
2349
|
-
/** A filter object. See
|
2388
|
+
/** A filter object. See supported fields and operators ([SDK](https://dev.wix.com/docs/sdk/backend-modules/pricing-plans/plans/query-public-plans) | [REST](https://dev.wix.com/api/rest/wix-pricing-plans/pricing-plans/plans/filter-and-sort#wix-pricing-plans_pricing-plans_plans_filter-and-sort_query-public-plans)). */
|
2350
2389
|
filter?: Record<string, any> | null;
|
2351
|
-
/** Sort object in the form [{"fieldName":"sortField1"},{"fieldName":"sortField2","direction":"DESC"}] */
|
2390
|
+
/** Sort object in the form [{"fieldName":"sortField1"},{"fieldName":"sortField2","direction":"DESC"}]. */
|
2352
2391
|
sort?: Sorting[];
|
2353
|
-
/** Pointer to page of results using offset. Can
|
2392
|
+
/** Pointer to page of results using offset. Can't be used together with 'cursorPaging'. */
|
2354
2393
|
paging?: Paging;
|
2355
2394
|
}
|
2356
2395
|
interface Sorting {
|
@@ -2372,7 +2411,7 @@ interface Paging {
|
|
2372
2411
|
interface QueryPublicPlansResponse {
|
2373
2412
|
/** List of public pricing plans that match the specified query. */
|
2374
2413
|
plans?: PublicPlan[];
|
2375
|
-
/** Object containing paging-related data (number of plans returned, offset). */
|
2414
|
+
/** Object containing paging-related data (such as the number of plans returned, the offset, and so on). */
|
2376
2415
|
pagingMetadata?: PagingMetadataV2;
|
2377
2416
|
}
|
2378
2417
|
interface GetPlanRequest {
|
@@ -2384,15 +2423,15 @@ interface GetPlanResponse {
|
|
2384
2423
|
plan?: Plan;
|
2385
2424
|
}
|
2386
2425
|
interface ListPlansRequest {
|
2387
|
-
/** Archived filter. Defaults to ACTIVE (not archived) only. */
|
2426
|
+
/** Archived filter. Defaults to `ACTIVE` (not archived) only. */
|
2388
2427
|
archived?: ArchivedFilter;
|
2389
|
-
/** Visibility filter. Defaults to PUBLIC_AND_HIDDEN (meaning, both are listed). */
|
2428
|
+
/** Visibility filter. Defaults to `PUBLIC_AND_HIDDEN` (meaning, both are listed). */
|
2390
2429
|
public?: PublicFilter;
|
2391
|
-
/** Number of pricing plans to list. Defaults to 75
|
2430
|
+
/** Number of pricing plans to list. Defaults to `75`. */
|
2392
2431
|
limit?: number | null;
|
2393
|
-
/** Number of pricing plans to skip. Defaults to 0
|
2432
|
+
/** Number of pricing plans to skip. Defaults to `0`. */
|
2394
2433
|
offset?: number | null;
|
2395
|
-
/**
|
2434
|
+
/** IDs of plans to list. If non-existent IDs are specified, they are ignored and don't cause errors. If no IDs are specified, all public and hidden plans are listed according to the order displayed in a site's dashboard (which you can set with Arrange Plans). You can specify a maximum of 100 IDs. */
|
2396
2435
|
planIds?: string[];
|
2397
2436
|
}
|
2398
2437
|
declare enum ArchivedFilter {
|
@@ -2414,7 +2453,7 @@ declare enum PublicFilter {
|
|
2414
2453
|
interface ListPlansResponse {
|
2415
2454
|
/** List of all public and hidden pricing plans. */
|
2416
2455
|
plans?: Plan[];
|
2417
|
-
/** Object containing paging-related data (number of plans returned, offset). */
|
2456
|
+
/** Object containing paging-related data (such as the number of plans returned, the offset, and so on). */
|
2418
2457
|
pagingMetadata?: PagingMetadataV2;
|
2419
2458
|
}
|
2420
2459
|
interface GetPlanStatsRequest {
|
@@ -2424,7 +2463,7 @@ interface GetPlanStatsResponse {
|
|
2424
2463
|
totalPlans?: number;
|
2425
2464
|
}
|
2426
2465
|
interface CreatePlanRequest {
|
2427
|
-
/** Plan
|
2466
|
+
/** Plan details. */
|
2428
2467
|
plan: Plan;
|
2429
2468
|
}
|
2430
2469
|
interface CreatePlanResponse {
|
@@ -2432,7 +2471,7 @@ interface CreatePlanResponse {
|
|
2432
2471
|
plan?: Plan;
|
2433
2472
|
}
|
2434
2473
|
interface UpdatePlanRequest {
|
2435
|
-
/**
|
2474
|
+
/** ID of the plan to update. */
|
2436
2475
|
plan: Plan;
|
2437
2476
|
}
|
2438
2477
|
interface UpdatePlanResponse {
|
@@ -2440,7 +2479,7 @@ interface UpdatePlanResponse {
|
|
2440
2479
|
plan?: Plan;
|
2441
2480
|
}
|
2442
2481
|
interface SetPlanVisibilityRequest {
|
2443
|
-
/**
|
2482
|
+
/** The ID of the plan to either display or hide on a site page. */
|
2444
2483
|
_id: string;
|
2445
2484
|
/** Whether a plan is visible to members and site visitors. Updates the `public` field. */
|
2446
2485
|
visible: boolean;
|
@@ -2450,6 +2489,7 @@ interface SetPlanVisibilityResponse {
|
|
2450
2489
|
plan?: Plan;
|
2451
2490
|
}
|
2452
2491
|
interface MakePlanPrimaryRequest {
|
2492
|
+
/** Pricing plan ID. */
|
2453
2493
|
_id: string;
|
2454
2494
|
}
|
2455
2495
|
interface MakePlanPrimaryResponse {
|
@@ -2461,7 +2501,7 @@ interface ClearPrimaryRequest {
|
|
2461
2501
|
interface ClearPrimaryResponse {
|
2462
2502
|
}
|
2463
2503
|
interface ArchivePlanRequest {
|
2464
|
-
/** ID of the plan to archive. */
|
2504
|
+
/** ID of the active plan to archive. */
|
2465
2505
|
_id: string;
|
2466
2506
|
}
|
2467
2507
|
interface ArchivePlanResponse {
|