@wix/auto_sdk_pricing-plans_plans 1.0.113 → 1.0.115
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/index.js +10 -10
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.js +10 -10
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.js +10 -10
- package/build/cjs/meta.js.map +1 -1
- package/build/cjs/schemas.js +634 -612
- package/build/cjs/schemas.js.map +1 -1
- package/build/es/index.mjs +10 -10
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.mjs +10 -10
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.mjs +10 -10
- package/build/es/meta.mjs.map +1 -1
- package/build/es/schemas.mjs +634 -612
- package/build/es/schemas.mjs.map +1 -1
- package/package.json +3 -3
- package/build/internal/cjs/index.js +0 -1102
- package/build/internal/cjs/index.js.map +0 -1
- package/build/internal/cjs/index.typings.js +0 -908
- package/build/internal/cjs/index.typings.js.map +0 -1
- package/build/internal/cjs/meta.js +0 -773
- package/build/internal/cjs/meta.js.map +0 -1
- package/build/internal/cjs/schemas.js +0 -1460
- package/build/internal/cjs/schemas.js.map +0 -1
- package/build/internal/es/index.mjs +0 -1057
- package/build/internal/es/index.mjs.map +0 -1
- package/build/internal/es/index.typings.mjs +0 -866
- package/build/internal/es/index.typings.mjs.map +0 -1
- package/build/internal/es/meta.mjs +0 -730
- package/build/internal/es/meta.mjs.map +0 -1
- package/build/internal/es/schemas.mjs +0 -1402
- package/build/internal/es/schemas.mjs.map +0 -1
package/build/es/schemas.mjs
CHANGED
|
@@ -1,109 +1,111 @@
|
|
|
1
1
|
// src/pricing-plans-v2-plan-plans.schemas.ts
|
|
2
2
|
import * as z from "zod";
|
|
3
3
|
var ListPublicPlansRequest = /* @__PURE__ */ z.object({
|
|
4
|
-
options: z.object({
|
|
5
|
-
limit: z.number().int().describe(
|
|
4
|
+
options: /* @__PURE__ */ z.object({
|
|
5
|
+
limit: /* @__PURE__ */ z.number().int().describe(
|
|
6
6
|
"Number of items to list. Defaults to `75`. See [limits](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-the-wix-api-query-language#paging)."
|
|
7
7
|
).min(1).max(100).optional().nullable(),
|
|
8
|
-
offset: z.number().int().describe(
|
|
8
|
+
offset: /* @__PURE__ */ z.number().int().describe(
|
|
9
9
|
"Number of items to skip. Defaults to `0`. See [paging](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-the-wix-api-query-language#paging)."
|
|
10
10
|
).min(0).optional().nullable(),
|
|
11
|
-
planIds: z.array(z.string()).max(100).optional()
|
|
11
|
+
planIds: /* @__PURE__ */ z.array(/* @__PURE__ */ z.string()).max(100).optional()
|
|
12
12
|
}).describe("Options for filtering and paging the list of public plans. ").optional()
|
|
13
13
|
});
|
|
14
14
|
var ListPublicPlansResponse = /* @__PURE__ */ z.object({
|
|
15
|
-
plans: z.array(
|
|
16
|
-
z.object({
|
|
17
|
-
_id: z.string().describe("Plan ID.").regex(
|
|
15
|
+
plans: /* @__PURE__ */ z.array(
|
|
16
|
+
/* @__PURE__ */ z.object({
|
|
17
|
+
_id: /* @__PURE__ */ z.string().describe("Plan ID.").regex(
|
|
18
18
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
19
19
|
"Must be a valid GUID"
|
|
20
20
|
).optional(),
|
|
21
|
-
name: z.string().describe("Plan name.").min(1).max(50).optional().nullable(),
|
|
22
|
-
description: z.string().describe("Plan description.").max(450).optional().nullable(),
|
|
23
|
-
perks: z.object({
|
|
21
|
+
name: /* @__PURE__ */ z.string().describe("Plan name.").min(1).max(50).optional().nullable(),
|
|
22
|
+
description: /* @__PURE__ */ z.string().describe("Plan description.").max(450).optional().nullable(),
|
|
23
|
+
perks: /* @__PURE__ */ z.object({
|
|
24
|
+
values: /* @__PURE__ */ z.array(/* @__PURE__ */ z.string()).max(500).optional()
|
|
25
|
+
}).describe(
|
|
24
26
|
"What is included with this plan (for example, 1 weekly entrance to a specific class)."
|
|
25
27
|
).optional(),
|
|
26
|
-
pricing: z.intersection(
|
|
27
|
-
z.object({
|
|
28
|
-
price: z.object({
|
|
29
|
-
value: z.string().describe(
|
|
28
|
+
pricing: /* @__PURE__ */ z.intersection(
|
|
29
|
+
/* @__PURE__ */ z.object({
|
|
30
|
+
price: /* @__PURE__ */ z.object({
|
|
31
|
+
value: /* @__PURE__ */ z.string().describe(
|
|
30
32
|
"Monetary amount. Decimal string with a period as a decimal separator. For example, `'3.99'`. Can't be negative."
|
|
31
33
|
).optional(),
|
|
32
|
-
currency: z.string().describe(
|
|
34
|
+
currency: /* @__PURE__ */ z.string().describe(
|
|
33
35
|
"Currency code. Three-letter currency code in [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format. For example, `'USD'`."
|
|
34
36
|
).optional()
|
|
35
37
|
}).describe(
|
|
36
38
|
"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."
|
|
37
39
|
).optional(),
|
|
38
|
-
freeTrialDays: z.number().int().describe(
|
|
40
|
+
freeTrialDays: /* @__PURE__ */ z.number().int().describe(
|
|
39
41
|
"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."
|
|
40
42
|
).min(0).max(999).optional().nullable()
|
|
41
43
|
}),
|
|
42
|
-
z.xor([
|
|
43
|
-
z.object({
|
|
44
|
-
subscription: z.never().optional(),
|
|
45
|
-
singlePaymentForDuration: z.never().optional(),
|
|
46
|
-
singlePaymentUnlimited: z.never().optional()
|
|
44
|
+
/* @__PURE__ */ z.xor([
|
|
45
|
+
/* @__PURE__ */ z.object({
|
|
46
|
+
subscription: /* @__PURE__ */ z.never().optional(),
|
|
47
|
+
singlePaymentForDuration: /* @__PURE__ */ z.never().optional(),
|
|
48
|
+
singlePaymentUnlimited: /* @__PURE__ */ z.never().optional()
|
|
47
49
|
}),
|
|
48
|
-
z.object({
|
|
49
|
-
singlePaymentForDuration: z.never().optional(),
|
|
50
|
-
singlePaymentUnlimited: z.never().optional(),
|
|
51
|
-
subscription: z.object({
|
|
52
|
-
cycleDuration: z.object({
|
|
53
|
-
count: z.number().int().describe(
|
|
50
|
+
/* @__PURE__ */ z.object({
|
|
51
|
+
singlePaymentForDuration: /* @__PURE__ */ z.never().optional(),
|
|
52
|
+
singlePaymentUnlimited: /* @__PURE__ */ z.never().optional(),
|
|
53
|
+
subscription: /* @__PURE__ */ z.object({
|
|
54
|
+
cycleDuration: /* @__PURE__ */ z.object({
|
|
55
|
+
count: /* @__PURE__ */ z.number().int().describe(
|
|
54
56
|
"Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`."
|
|
55
57
|
).min(1).optional().nullable(),
|
|
56
|
-
unit: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
|
|
58
|
+
unit: /* @__PURE__ */ z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
|
|
57
59
|
}).describe(
|
|
58
60
|
"Number of payment cycles the subscription is valid for.\n`0` for unlimited plans or for plans that are valid until canceled."
|
|
59
61
|
).optional(),
|
|
60
|
-
cycleCount: z.number().int().describe(
|
|
62
|
+
cycleCount: /* @__PURE__ */ z.number().int().describe(
|
|
61
63
|
"Length of a payment cycle. For example, 1 month to have monthly payments.\nMultiply `cycleDuration`'s `count` by `cycleCount` to get the subscription duration.\nCurrently, only a value of `1` is supported."
|
|
62
64
|
).min(0).max(2e3).optional().nullable()
|
|
63
65
|
}).describe(
|
|
64
66
|
'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.'
|
|
65
67
|
)
|
|
66
68
|
}),
|
|
67
|
-
z.object({
|
|
68
|
-
subscription: z.never().optional(),
|
|
69
|
-
singlePaymentUnlimited: z.never().optional(),
|
|
70
|
-
singlePaymentForDuration: z.object({
|
|
71
|
-
count: z.number().int().describe(
|
|
69
|
+
/* @__PURE__ */ z.object({
|
|
70
|
+
subscription: /* @__PURE__ */ z.never().optional(),
|
|
71
|
+
singlePaymentUnlimited: /* @__PURE__ */ z.never().optional(),
|
|
72
|
+
singlePaymentForDuration: /* @__PURE__ */ z.object({
|
|
73
|
+
count: /* @__PURE__ */ z.number().int().describe(
|
|
72
74
|
"Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`."
|
|
73
75
|
).min(1).optional().nullable(),
|
|
74
|
-
unit: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
|
|
76
|
+
unit: /* @__PURE__ */ z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
|
|
75
77
|
}).describe(
|
|
76
78
|
"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."
|
|
77
79
|
)
|
|
78
80
|
}),
|
|
79
|
-
z.object({
|
|
80
|
-
subscription: z.never().optional(),
|
|
81
|
-
singlePaymentForDuration: z.never().optional(),
|
|
82
|
-
singlePaymentUnlimited: z.boolean().describe(
|
|
81
|
+
/* @__PURE__ */ z.object({
|
|
82
|
+
subscription: /* @__PURE__ */ z.never().optional(),
|
|
83
|
+
singlePaymentForDuration: /* @__PURE__ */ z.never().optional(),
|
|
84
|
+
singlePaymentUnlimited: /* @__PURE__ */ z.boolean().describe(
|
|
83
85
|
"Pricing model indicating the plan is paid in a single payment. The plan is valid until canceled."
|
|
84
86
|
)
|
|
85
87
|
})
|
|
86
88
|
])
|
|
87
89
|
).describe("Plan price, payment schedule, and expiration.").optional(),
|
|
88
|
-
primary: z.boolean().describe("Whether the plan is marked as primary.").optional(),
|
|
89
|
-
_createdDate: z.date().describe("Date plan was created.").optional().nullable(),
|
|
90
|
-
_updatedDate: z.date().describe("Date plan was last updated.").optional().nullable(),
|
|
91
|
-
slug: z.string().describe(
|
|
90
|
+
primary: /* @__PURE__ */ z.boolean().describe("Whether the plan is marked as primary.").optional(),
|
|
91
|
+
_createdDate: /* @__PURE__ */ z.date().describe("Date plan was created.").optional().nullable(),
|
|
92
|
+
_updatedDate: /* @__PURE__ */ z.date().describe("Date plan was last updated.").optional().nullable(),
|
|
93
|
+
slug: /* @__PURE__ */ z.string().describe(
|
|
92
94
|
"URL-friendly version of plan name. Unique across all plans in the same site."
|
|
93
95
|
).min(1).optional().nullable(),
|
|
94
|
-
maxPurchasesPerBuyer: z.number().int().describe(
|
|
96
|
+
maxPurchasesPerBuyer: /* @__PURE__ */ z.number().int().describe(
|
|
95
97
|
"Number of times the same buyer can purchase the plan. An empty value or a value of 0 means no limitation."
|
|
96
98
|
).min(0).optional().nullable(),
|
|
97
|
-
allowFutureStartDate: z.boolean().describe(
|
|
99
|
+
allowFutureStartDate: /* @__PURE__ */ z.boolean().describe(
|
|
98
100
|
"Whether the buyer can start the plan at a later date. Defaults to false."
|
|
99
101
|
).optional().nullable(),
|
|
100
|
-
buyerCanCancel: z.boolean().describe(
|
|
102
|
+
buyerCanCancel: /* @__PURE__ */ z.boolean().describe(
|
|
101
103
|
"Whether the buyer is allowed to cancel their plan. Defaults to false."
|
|
102
104
|
).optional().nullable(),
|
|
103
|
-
termsAndConditions: z.string().describe(
|
|
105
|
+
termsAndConditions: /* @__PURE__ */ z.string().describe(
|
|
104
106
|
"Any terms and conditions that apply to the plan. This information is displayed during checkout."
|
|
105
107
|
).optional().nullable(),
|
|
106
|
-
formId: z.string().describe(
|
|
108
|
+
formId: /* @__PURE__ */ z.string().describe(
|
|
107
109
|
"ID of the form associated with the plan at checkout.\n\nLearn more about [forms](https://support.wix.com/en/article/wix-forms-an-overview)."
|
|
108
110
|
).regex(
|
|
109
111
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
@@ -111,20 +113,20 @@ var ListPublicPlansResponse = /* @__PURE__ */ z.object({
|
|
|
111
113
|
).optional().nullable()
|
|
112
114
|
})
|
|
113
115
|
).optional(),
|
|
114
|
-
pagingMetadata: z.object({
|
|
115
|
-
count: z.number().int().describe("Number of items returned in the response.").optional().nullable(),
|
|
116
|
-
offset: z.number().int().describe("Offset that was requested.").optional().nullable(),
|
|
117
|
-
total: z.number().int().describe(
|
|
116
|
+
pagingMetadata: /* @__PURE__ */ z.object({
|
|
117
|
+
count: /* @__PURE__ */ z.number().int().describe("Number of items returned in the response.").optional().nullable(),
|
|
118
|
+
offset: /* @__PURE__ */ z.number().int().describe("Offset that was requested.").optional().nullable(),
|
|
119
|
+
total: /* @__PURE__ */ z.number().int().describe(
|
|
118
120
|
"Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set."
|
|
119
121
|
).optional().nullable(),
|
|
120
|
-
tooManyToCount: z.boolean().describe(
|
|
122
|
+
tooManyToCount: /* @__PURE__ */ z.boolean().describe(
|
|
121
123
|
"Flag that indicates the server failed to calculate the `total` field."
|
|
122
124
|
).optional().nullable(),
|
|
123
|
-
cursors: z.object({
|
|
124
|
-
next: z.string().describe(
|
|
125
|
+
cursors: /* @__PURE__ */ z.object({
|
|
126
|
+
next: /* @__PURE__ */ z.string().describe(
|
|
125
127
|
"Cursor string pointing to the next page in the list of results."
|
|
126
128
|
).max(16e3).optional().nullable(),
|
|
127
|
-
prev: z.string().describe(
|
|
129
|
+
prev: /* @__PURE__ */ z.string().describe(
|
|
128
130
|
"Cursor pointing to the previous page in the list of results."
|
|
129
131
|
).max(16e3).optional().nullable()
|
|
130
132
|
}).describe(
|
|
@@ -135,183 +137,185 @@ var ListPublicPlansResponse = /* @__PURE__ */ z.object({
|
|
|
135
137
|
).optional()
|
|
136
138
|
});
|
|
137
139
|
var QueryPublicPlansRequest = /* @__PURE__ */ z.object({
|
|
138
|
-
query: z.object({
|
|
139
|
-
filter: z.object({
|
|
140
|
-
_id: z.object({
|
|
141
|
-
$eq: z.string(),
|
|
142
|
-
$exists: z.boolean(),
|
|
143
|
-
$gt: z.string(),
|
|
144
|
-
$gte: z.string(),
|
|
145
|
-
$hasAll: z.array(z.string()),
|
|
146
|
-
$hasSome: z.array(z.string()),
|
|
147
|
-
$in: z.array(z.string()),
|
|
148
|
-
$lt: z.string(),
|
|
149
|
-
$lte: z.string(),
|
|
150
|
-
$ne: z.string(),
|
|
151
|
-
$nin: z.array(z.string()),
|
|
152
|
-
$startsWith: z.string()
|
|
140
|
+
query: /* @__PURE__ */ z.object({
|
|
141
|
+
filter: /* @__PURE__ */ z.object({
|
|
142
|
+
_id: /* @__PURE__ */ z.object({
|
|
143
|
+
$eq: /* @__PURE__ */ z.string(),
|
|
144
|
+
$exists: /* @__PURE__ */ z.boolean(),
|
|
145
|
+
$gt: /* @__PURE__ */ z.string(),
|
|
146
|
+
$gte: /* @__PURE__ */ z.string(),
|
|
147
|
+
$hasAll: /* @__PURE__ */ z.array(/* @__PURE__ */ z.string()),
|
|
148
|
+
$hasSome: /* @__PURE__ */ z.array(/* @__PURE__ */ z.string()),
|
|
149
|
+
$in: /* @__PURE__ */ z.array(/* @__PURE__ */ z.string()),
|
|
150
|
+
$lt: /* @__PURE__ */ z.string(),
|
|
151
|
+
$lte: /* @__PURE__ */ z.string(),
|
|
152
|
+
$ne: /* @__PURE__ */ z.string(),
|
|
153
|
+
$nin: /* @__PURE__ */ z.array(/* @__PURE__ */ z.string()),
|
|
154
|
+
$startsWith: /* @__PURE__ */ z.string()
|
|
153
155
|
}).partial().strict().optional(),
|
|
154
|
-
slug: z.object({
|
|
155
|
-
$eq: z.string(),
|
|
156
|
-
$exists: z.boolean(),
|
|
157
|
-
$gt: z.string(),
|
|
158
|
-
$gte: z.string(),
|
|
159
|
-
$hasAll: z.array(z.string()),
|
|
160
|
-
$hasSome: z.array(z.string()),
|
|
161
|
-
$in: z.array(z.string()),
|
|
162
|
-
$lt: z.string(),
|
|
163
|
-
$lte: z.string(),
|
|
164
|
-
$ne: z.string(),
|
|
165
|
-
$nin: z.array(z.string()),
|
|
166
|
-
$startsWith: z.string()
|
|
156
|
+
slug: /* @__PURE__ */ z.object({
|
|
157
|
+
$eq: /* @__PURE__ */ z.string(),
|
|
158
|
+
$exists: /* @__PURE__ */ z.boolean(),
|
|
159
|
+
$gt: /* @__PURE__ */ z.string(),
|
|
160
|
+
$gte: /* @__PURE__ */ z.string(),
|
|
161
|
+
$hasAll: /* @__PURE__ */ z.array(/* @__PURE__ */ z.string()),
|
|
162
|
+
$hasSome: /* @__PURE__ */ z.array(/* @__PURE__ */ z.string()),
|
|
163
|
+
$in: /* @__PURE__ */ z.array(/* @__PURE__ */ z.string()),
|
|
164
|
+
$lt: /* @__PURE__ */ z.string(),
|
|
165
|
+
$lte: /* @__PURE__ */ z.string(),
|
|
166
|
+
$ne: /* @__PURE__ */ z.string(),
|
|
167
|
+
$nin: /* @__PURE__ */ z.array(/* @__PURE__ */ z.string()),
|
|
168
|
+
$startsWith: /* @__PURE__ */ z.string()
|
|
167
169
|
}).partial().strict().optional(),
|
|
168
|
-
_createdDate: z.object({
|
|
169
|
-
$eq: z.string(),
|
|
170
|
-
$exists: z.boolean(),
|
|
171
|
-
$gt: z.string(),
|
|
172
|
-
$gte: z.string(),
|
|
173
|
-
$hasAll: z.array(z.string()),
|
|
174
|
-
$hasSome: z.array(z.string()),
|
|
175
|
-
$in: z.array(z.string()),
|
|
176
|
-
$lt: z.string(),
|
|
177
|
-
$lte: z.string(),
|
|
178
|
-
$ne: z.string(),
|
|
179
|
-
$nin: z.array(z.string()),
|
|
180
|
-
$startsWith: z.string()
|
|
170
|
+
_createdDate: /* @__PURE__ */ z.object({
|
|
171
|
+
$eq: /* @__PURE__ */ z.string(),
|
|
172
|
+
$exists: /* @__PURE__ */ z.boolean(),
|
|
173
|
+
$gt: /* @__PURE__ */ z.string(),
|
|
174
|
+
$gte: /* @__PURE__ */ z.string(),
|
|
175
|
+
$hasAll: /* @__PURE__ */ z.array(/* @__PURE__ */ z.string()),
|
|
176
|
+
$hasSome: /* @__PURE__ */ z.array(/* @__PURE__ */ z.string()),
|
|
177
|
+
$in: /* @__PURE__ */ z.array(/* @__PURE__ */ z.string()),
|
|
178
|
+
$lt: /* @__PURE__ */ z.string(),
|
|
179
|
+
$lte: /* @__PURE__ */ z.string(),
|
|
180
|
+
$ne: /* @__PURE__ */ z.string(),
|
|
181
|
+
$nin: /* @__PURE__ */ z.array(/* @__PURE__ */ z.string()),
|
|
182
|
+
$startsWith: /* @__PURE__ */ z.string()
|
|
181
183
|
}).partial().strict().optional(),
|
|
182
|
-
_updatedDate: z.object({
|
|
183
|
-
$eq: z.string(),
|
|
184
|
-
$exists: z.boolean(),
|
|
185
|
-
$gt: z.string(),
|
|
186
|
-
$gte: z.string(),
|
|
187
|
-
$hasAll: z.array(z.string()),
|
|
188
|
-
$hasSome: z.array(z.string()),
|
|
189
|
-
$in: z.array(z.string()),
|
|
190
|
-
$lt: z.string(),
|
|
191
|
-
$lte: z.string(),
|
|
192
|
-
$ne: z.string(),
|
|
193
|
-
$nin: z.array(z.string()),
|
|
194
|
-
$startsWith: z.string()
|
|
184
|
+
_updatedDate: /* @__PURE__ */ z.object({
|
|
185
|
+
$eq: /* @__PURE__ */ z.string(),
|
|
186
|
+
$exists: /* @__PURE__ */ z.boolean(),
|
|
187
|
+
$gt: /* @__PURE__ */ z.string(),
|
|
188
|
+
$gte: /* @__PURE__ */ z.string(),
|
|
189
|
+
$hasAll: /* @__PURE__ */ z.array(/* @__PURE__ */ z.string()),
|
|
190
|
+
$hasSome: /* @__PURE__ */ z.array(/* @__PURE__ */ z.string()),
|
|
191
|
+
$in: /* @__PURE__ */ z.array(/* @__PURE__ */ z.string()),
|
|
192
|
+
$lt: /* @__PURE__ */ z.string(),
|
|
193
|
+
$lte: /* @__PURE__ */ z.string(),
|
|
194
|
+
$ne: /* @__PURE__ */ z.string(),
|
|
195
|
+
$nin: /* @__PURE__ */ z.array(/* @__PURE__ */ z.string()),
|
|
196
|
+
$startsWith: /* @__PURE__ */ z.string()
|
|
195
197
|
}).partial().strict().optional(),
|
|
196
|
-
primary: z.object({
|
|
197
|
-
$eq: z.boolean(),
|
|
198
|
-
$exists: z.boolean(),
|
|
199
|
-
$gt: z.boolean(),
|
|
200
|
-
$gte: z.boolean(),
|
|
201
|
-
$hasAll: z.array(z.boolean()),
|
|
202
|
-
$hasSome: z.array(z.boolean()),
|
|
203
|
-
$in: z.array(z.boolean()),
|
|
204
|
-
$lt: z.boolean(),
|
|
205
|
-
$lte: z.boolean(),
|
|
206
|
-
$ne: z.boolean(),
|
|
207
|
-
$nin: z.array(z.boolean()),
|
|
208
|
-
$startsWith: z.string()
|
|
198
|
+
primary: /* @__PURE__ */ z.object({
|
|
199
|
+
$eq: /* @__PURE__ */ z.boolean(),
|
|
200
|
+
$exists: /* @__PURE__ */ z.boolean(),
|
|
201
|
+
$gt: /* @__PURE__ */ z.boolean(),
|
|
202
|
+
$gte: /* @__PURE__ */ z.boolean(),
|
|
203
|
+
$hasAll: /* @__PURE__ */ z.array(/* @__PURE__ */ z.boolean()),
|
|
204
|
+
$hasSome: /* @__PURE__ */ z.array(/* @__PURE__ */ z.boolean()),
|
|
205
|
+
$in: /* @__PURE__ */ z.array(/* @__PURE__ */ z.boolean()),
|
|
206
|
+
$lt: /* @__PURE__ */ z.boolean(),
|
|
207
|
+
$lte: /* @__PURE__ */ z.boolean(),
|
|
208
|
+
$ne: /* @__PURE__ */ z.boolean(),
|
|
209
|
+
$nin: /* @__PURE__ */ z.array(/* @__PURE__ */ z.boolean()),
|
|
210
|
+
$startsWith: /* @__PURE__ */ z.string()
|
|
209
211
|
}).partial().strict().optional(),
|
|
210
|
-
$and: z.array(z.any()).optional(),
|
|
211
|
-
$or: z.array(z.any()).optional(),
|
|
212
|
-
$not: z.any().optional()
|
|
212
|
+
$and: /* @__PURE__ */ z.array(/* @__PURE__ */ z.any()).optional(),
|
|
213
|
+
$or: /* @__PURE__ */ z.array(/* @__PURE__ */ z.any()).optional(),
|
|
214
|
+
$not: /* @__PURE__ */ z.any().optional()
|
|
213
215
|
}).strict().optional(),
|
|
214
|
-
sort: z.array(
|
|
215
|
-
z.object({
|
|
216
|
-
fieldName: z.enum(["_id", "slug", "_createdDate", "_updatedDate", "primary"]).optional(),
|
|
217
|
-
order: z.enum(["ASC", "DESC"]).optional()
|
|
216
|
+
sort: /* @__PURE__ */ z.array(
|
|
217
|
+
/* @__PURE__ */ z.object({
|
|
218
|
+
fieldName: /* @__PURE__ */ z.enum(["_id", "slug", "_createdDate", "_updatedDate", "primary"]).optional(),
|
|
219
|
+
order: /* @__PURE__ */ z.enum(["ASC", "DESC"]).optional()
|
|
218
220
|
})
|
|
219
221
|
).optional()
|
|
220
|
-
}).catchall(z.any()).describe("Query options.")
|
|
222
|
+
}).catchall(/* @__PURE__ */ z.any()).describe("Query options.")
|
|
221
223
|
});
|
|
222
224
|
var QueryPublicPlansResponse = /* @__PURE__ */ z.object({
|
|
223
|
-
plans: z.array(
|
|
224
|
-
z.object({
|
|
225
|
-
_id: z.string().describe("Plan ID.").regex(
|
|
225
|
+
plans: /* @__PURE__ */ z.array(
|
|
226
|
+
/* @__PURE__ */ z.object({
|
|
227
|
+
_id: /* @__PURE__ */ z.string().describe("Plan ID.").regex(
|
|
226
228
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
227
229
|
"Must be a valid GUID"
|
|
228
230
|
).optional(),
|
|
229
|
-
name: z.string().describe("Plan name.").min(1).max(50).optional().nullable(),
|
|
230
|
-
description: z.string().describe("Plan description.").max(450).optional().nullable(),
|
|
231
|
-
perks: z.object({
|
|
231
|
+
name: /* @__PURE__ */ z.string().describe("Plan name.").min(1).max(50).optional().nullable(),
|
|
232
|
+
description: /* @__PURE__ */ z.string().describe("Plan description.").max(450).optional().nullable(),
|
|
233
|
+
perks: /* @__PURE__ */ z.object({
|
|
234
|
+
values: /* @__PURE__ */ z.array(/* @__PURE__ */ z.string()).max(500).optional()
|
|
235
|
+
}).describe(
|
|
232
236
|
"What is included with this plan (for example, 1 weekly entrance to a specific class)."
|
|
233
237
|
).optional(),
|
|
234
|
-
pricing: z.intersection(
|
|
235
|
-
z.object({
|
|
236
|
-
price: z.object({
|
|
237
|
-
value: z.string().describe(
|
|
238
|
+
pricing: /* @__PURE__ */ z.intersection(
|
|
239
|
+
/* @__PURE__ */ z.object({
|
|
240
|
+
price: /* @__PURE__ */ z.object({
|
|
241
|
+
value: /* @__PURE__ */ z.string().describe(
|
|
238
242
|
"Monetary amount. Decimal string with a period as a decimal separator. For example, `'3.99'`. Can't be negative."
|
|
239
243
|
).optional(),
|
|
240
|
-
currency: z.string().describe(
|
|
244
|
+
currency: /* @__PURE__ */ z.string().describe(
|
|
241
245
|
"Currency code. Three-letter currency code in [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format. For example, `'USD'`."
|
|
242
246
|
).optional()
|
|
243
247
|
}).describe(
|
|
244
248
|
"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."
|
|
245
249
|
).optional(),
|
|
246
|
-
freeTrialDays: z.number().int().describe(
|
|
250
|
+
freeTrialDays: /* @__PURE__ */ z.number().int().describe(
|
|
247
251
|
"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."
|
|
248
252
|
).min(0).max(999).optional().nullable()
|
|
249
253
|
}),
|
|
250
|
-
z.xor([
|
|
251
|
-
z.object({
|
|
252
|
-
subscription: z.never().optional(),
|
|
253
|
-
singlePaymentForDuration: z.never().optional(),
|
|
254
|
-
singlePaymentUnlimited: z.never().optional()
|
|
254
|
+
/* @__PURE__ */ z.xor([
|
|
255
|
+
/* @__PURE__ */ z.object({
|
|
256
|
+
subscription: /* @__PURE__ */ z.never().optional(),
|
|
257
|
+
singlePaymentForDuration: /* @__PURE__ */ z.never().optional(),
|
|
258
|
+
singlePaymentUnlimited: /* @__PURE__ */ z.never().optional()
|
|
255
259
|
}),
|
|
256
|
-
z.object({
|
|
257
|
-
singlePaymentForDuration: z.never().optional(),
|
|
258
|
-
singlePaymentUnlimited: z.never().optional(),
|
|
259
|
-
subscription: z.object({
|
|
260
|
-
cycleDuration: z.object({
|
|
261
|
-
count: z.number().int().describe(
|
|
260
|
+
/* @__PURE__ */ z.object({
|
|
261
|
+
singlePaymentForDuration: /* @__PURE__ */ z.never().optional(),
|
|
262
|
+
singlePaymentUnlimited: /* @__PURE__ */ z.never().optional(),
|
|
263
|
+
subscription: /* @__PURE__ */ z.object({
|
|
264
|
+
cycleDuration: /* @__PURE__ */ z.object({
|
|
265
|
+
count: /* @__PURE__ */ z.number().int().describe(
|
|
262
266
|
"Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`."
|
|
263
267
|
).min(1).optional().nullable(),
|
|
264
|
-
unit: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
|
|
268
|
+
unit: /* @__PURE__ */ z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
|
|
265
269
|
}).describe(
|
|
266
270
|
"Number of payment cycles the subscription is valid for.\n`0` for unlimited plans or for plans that are valid until canceled."
|
|
267
271
|
).optional(),
|
|
268
|
-
cycleCount: z.number().int().describe(
|
|
272
|
+
cycleCount: /* @__PURE__ */ z.number().int().describe(
|
|
269
273
|
"Length of a payment cycle. For example, 1 month to have monthly payments.\nMultiply `cycleDuration`'s `count` by `cycleCount` to get the subscription duration.\nCurrently, only a value of `1` is supported."
|
|
270
274
|
).min(0).max(2e3).optional().nullable()
|
|
271
275
|
}).describe(
|
|
272
276
|
'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.'
|
|
273
277
|
)
|
|
274
278
|
}),
|
|
275
|
-
z.object({
|
|
276
|
-
subscription: z.never().optional(),
|
|
277
|
-
singlePaymentUnlimited: z.never().optional(),
|
|
278
|
-
singlePaymentForDuration: z.object({
|
|
279
|
-
count: z.number().int().describe(
|
|
279
|
+
/* @__PURE__ */ z.object({
|
|
280
|
+
subscription: /* @__PURE__ */ z.never().optional(),
|
|
281
|
+
singlePaymentUnlimited: /* @__PURE__ */ z.never().optional(),
|
|
282
|
+
singlePaymentForDuration: /* @__PURE__ */ z.object({
|
|
283
|
+
count: /* @__PURE__ */ z.number().int().describe(
|
|
280
284
|
"Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`."
|
|
281
285
|
).min(1).optional().nullable(),
|
|
282
|
-
unit: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
|
|
286
|
+
unit: /* @__PURE__ */ z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
|
|
283
287
|
}).describe(
|
|
284
288
|
"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."
|
|
285
289
|
)
|
|
286
290
|
}),
|
|
287
|
-
z.object({
|
|
288
|
-
subscription: z.never().optional(),
|
|
289
|
-
singlePaymentForDuration: z.never().optional(),
|
|
290
|
-
singlePaymentUnlimited: z.boolean().describe(
|
|
291
|
+
/* @__PURE__ */ z.object({
|
|
292
|
+
subscription: /* @__PURE__ */ z.never().optional(),
|
|
293
|
+
singlePaymentForDuration: /* @__PURE__ */ z.never().optional(),
|
|
294
|
+
singlePaymentUnlimited: /* @__PURE__ */ z.boolean().describe(
|
|
291
295
|
"Pricing model indicating the plan is paid in a single payment. The plan is valid until canceled."
|
|
292
296
|
)
|
|
293
297
|
})
|
|
294
298
|
])
|
|
295
299
|
).describe("Plan price, payment schedule, and expiration.").optional(),
|
|
296
|
-
primary: z.boolean().describe("Whether the plan is marked as primary.").optional(),
|
|
297
|
-
_createdDate: z.date().describe("Date plan was created.").optional().nullable(),
|
|
298
|
-
_updatedDate: z.date().describe("Date plan was last updated.").optional().nullable(),
|
|
299
|
-
slug: z.string().describe(
|
|
300
|
+
primary: /* @__PURE__ */ z.boolean().describe("Whether the plan is marked as primary.").optional(),
|
|
301
|
+
_createdDate: /* @__PURE__ */ z.date().describe("Date plan was created.").optional().nullable(),
|
|
302
|
+
_updatedDate: /* @__PURE__ */ z.date().describe("Date plan was last updated.").optional().nullable(),
|
|
303
|
+
slug: /* @__PURE__ */ z.string().describe(
|
|
300
304
|
"URL-friendly version of plan name. Unique across all plans in the same site."
|
|
301
305
|
).min(1).optional().nullable(),
|
|
302
|
-
maxPurchasesPerBuyer: z.number().int().describe(
|
|
306
|
+
maxPurchasesPerBuyer: /* @__PURE__ */ z.number().int().describe(
|
|
303
307
|
"Number of times the same buyer can purchase the plan. An empty value or a value of 0 means no limitation."
|
|
304
308
|
).min(0).optional().nullable(),
|
|
305
|
-
allowFutureStartDate: z.boolean().describe(
|
|
309
|
+
allowFutureStartDate: /* @__PURE__ */ z.boolean().describe(
|
|
306
310
|
"Whether the buyer can start the plan at a later date. Defaults to false."
|
|
307
311
|
).optional().nullable(),
|
|
308
|
-
buyerCanCancel: z.boolean().describe(
|
|
312
|
+
buyerCanCancel: /* @__PURE__ */ z.boolean().describe(
|
|
309
313
|
"Whether the buyer is allowed to cancel their plan. Defaults to false."
|
|
310
314
|
).optional().nullable(),
|
|
311
|
-
termsAndConditions: z.string().describe(
|
|
315
|
+
termsAndConditions: /* @__PURE__ */ z.string().describe(
|
|
312
316
|
"Any terms and conditions that apply to the plan. This information is displayed during checkout."
|
|
313
317
|
).optional().nullable(),
|
|
314
|
-
formId: z.string().describe(
|
|
318
|
+
formId: /* @__PURE__ */ z.string().describe(
|
|
315
319
|
"ID of the form associated with the plan at checkout.\n\nLearn more about [forms](https://support.wix.com/en/article/wix-forms-an-overview)."
|
|
316
320
|
).regex(
|
|
317
321
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
@@ -319,20 +323,20 @@ var QueryPublicPlansResponse = /* @__PURE__ */ z.object({
|
|
|
319
323
|
).optional().nullable()
|
|
320
324
|
})
|
|
321
325
|
).optional(),
|
|
322
|
-
pagingMetadata: z.object({
|
|
323
|
-
count: z.number().int().describe("Number of items returned in the response.").optional().nullable(),
|
|
324
|
-
offset: z.number().int().describe("Offset that was requested.").optional().nullable(),
|
|
325
|
-
total: z.number().int().describe(
|
|
326
|
+
pagingMetadata: /* @__PURE__ */ z.object({
|
|
327
|
+
count: /* @__PURE__ */ z.number().int().describe("Number of items returned in the response.").optional().nullable(),
|
|
328
|
+
offset: /* @__PURE__ */ z.number().int().describe("Offset that was requested.").optional().nullable(),
|
|
329
|
+
total: /* @__PURE__ */ z.number().int().describe(
|
|
326
330
|
"Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set."
|
|
327
331
|
).optional().nullable(),
|
|
328
|
-
tooManyToCount: z.boolean().describe(
|
|
332
|
+
tooManyToCount: /* @__PURE__ */ z.boolean().describe(
|
|
329
333
|
"Flag that indicates the server failed to calculate the `total` field."
|
|
330
334
|
).optional().nullable(),
|
|
331
|
-
cursors: z.object({
|
|
332
|
-
next: z.string().describe(
|
|
335
|
+
cursors: /* @__PURE__ */ z.object({
|
|
336
|
+
next: /* @__PURE__ */ z.string().describe(
|
|
333
337
|
"Cursor string pointing to the next page in the list of results."
|
|
334
338
|
).max(16e3).optional().nullable(),
|
|
335
|
-
prev: z.string().describe(
|
|
339
|
+
prev: /* @__PURE__ */ z.string().describe(
|
|
336
340
|
"Cursor pointing to the previous page in the list of results."
|
|
337
341
|
).max(16e3).optional().nullable()
|
|
338
342
|
}).describe(
|
|
@@ -343,111 +347,113 @@ var QueryPublicPlansResponse = /* @__PURE__ */ z.object({
|
|
|
343
347
|
).optional()
|
|
344
348
|
});
|
|
345
349
|
var GetPlanRequest = /* @__PURE__ */ z.object({
|
|
346
|
-
_id: z.string().describe("Plan ID.").regex(
|
|
350
|
+
_id: /* @__PURE__ */ z.string().describe("Plan ID.").regex(
|
|
347
351
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
348
352
|
"Must be a valid GUID"
|
|
349
353
|
)
|
|
350
354
|
});
|
|
351
355
|
var GetPlanResponse = /* @__PURE__ */ z.object({
|
|
352
|
-
_id: z.string().describe("Plan ID.").regex(
|
|
356
|
+
_id: /* @__PURE__ */ z.string().describe("Plan ID.").regex(
|
|
353
357
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
354
358
|
"Must be a valid GUID"
|
|
355
359
|
).optional(),
|
|
356
|
-
name: z.string().describe("Plan name.").min(1).max(50).optional().nullable(),
|
|
357
|
-
description: z.string().describe("Plan description.").max(450).optional().nullable(),
|
|
358
|
-
perks: z.object({
|
|
360
|
+
name: /* @__PURE__ */ z.string().describe("Plan name.").min(1).max(50).optional().nullable(),
|
|
361
|
+
description: /* @__PURE__ */ z.string().describe("Plan description.").max(450).optional().nullable(),
|
|
362
|
+
perks: /* @__PURE__ */ z.object({
|
|
363
|
+
values: /* @__PURE__ */ z.array(/* @__PURE__ */ z.string()).max(500).optional()
|
|
364
|
+
}).describe(
|
|
359
365
|
'List of text strings that promote what is included with this plan. For example, "Plenty of parking" or "Free gift on your birthday."'
|
|
360
366
|
).optional(),
|
|
361
|
-
pricing: z.intersection(
|
|
362
|
-
z.object({
|
|
363
|
-
price: z.object({
|
|
364
|
-
value: z.string().describe(
|
|
367
|
+
pricing: /* @__PURE__ */ z.intersection(
|
|
368
|
+
/* @__PURE__ */ z.object({
|
|
369
|
+
price: /* @__PURE__ */ z.object({
|
|
370
|
+
value: /* @__PURE__ */ z.string().describe(
|
|
365
371
|
"Monetary amount. Decimal string with a period as a decimal separator. For example, `'3.99'`. Can't be negative."
|
|
366
372
|
).optional(),
|
|
367
|
-
currency: z.string().describe(
|
|
373
|
+
currency: /* @__PURE__ */ z.string().describe(
|
|
368
374
|
"Currency code. Three-letter currency code in [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format. For example, `'USD'`."
|
|
369
375
|
).optional()
|
|
370
376
|
}).describe(
|
|
371
377
|
"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."
|
|
372
378
|
).optional(),
|
|
373
|
-
freeTrialDays: z.number().int().describe(
|
|
379
|
+
freeTrialDays: /* @__PURE__ */ z.number().int().describe(
|
|
374
380
|
"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."
|
|
375
381
|
).min(0).max(999).optional().nullable()
|
|
376
382
|
}),
|
|
377
|
-
z.xor([
|
|
378
|
-
z.object({
|
|
379
|
-
subscription: z.never().optional(),
|
|
380
|
-
singlePaymentForDuration: z.never().optional(),
|
|
381
|
-
singlePaymentUnlimited: z.never().optional()
|
|
383
|
+
/* @__PURE__ */ z.xor([
|
|
384
|
+
/* @__PURE__ */ z.object({
|
|
385
|
+
subscription: /* @__PURE__ */ z.never().optional(),
|
|
386
|
+
singlePaymentForDuration: /* @__PURE__ */ z.never().optional(),
|
|
387
|
+
singlePaymentUnlimited: /* @__PURE__ */ z.never().optional()
|
|
382
388
|
}),
|
|
383
|
-
z.object({
|
|
384
|
-
singlePaymentForDuration: z.never().optional(),
|
|
385
|
-
singlePaymentUnlimited: z.never().optional(),
|
|
386
|
-
subscription: z.object({
|
|
387
|
-
cycleDuration: z.object({
|
|
388
|
-
count: z.number().int().describe(
|
|
389
|
+
/* @__PURE__ */ z.object({
|
|
390
|
+
singlePaymentForDuration: /* @__PURE__ */ z.never().optional(),
|
|
391
|
+
singlePaymentUnlimited: /* @__PURE__ */ z.never().optional(),
|
|
392
|
+
subscription: /* @__PURE__ */ z.object({
|
|
393
|
+
cycleDuration: /* @__PURE__ */ z.object({
|
|
394
|
+
count: /* @__PURE__ */ z.number().int().describe(
|
|
389
395
|
"Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`."
|
|
390
396
|
).min(1).optional().nullable(),
|
|
391
|
-
unit: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
|
|
397
|
+
unit: /* @__PURE__ */ z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
|
|
392
398
|
}).describe(
|
|
393
399
|
"Number of payment cycles the subscription is valid for.\n`0` for unlimited plans or for plans that are valid until canceled."
|
|
394
400
|
).optional(),
|
|
395
|
-
cycleCount: z.number().int().describe(
|
|
401
|
+
cycleCount: /* @__PURE__ */ z.number().int().describe(
|
|
396
402
|
"Length of a payment cycle. For example, 1 month to have monthly payments.\nMultiply `cycleDuration`'s `count` by `cycleCount` to get the subscription duration.\nCurrently, only a value of `1` is supported."
|
|
397
403
|
).min(0).max(2e3).optional().nullable()
|
|
398
404
|
}).describe(
|
|
399
405
|
'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.'
|
|
400
406
|
)
|
|
401
407
|
}),
|
|
402
|
-
z.object({
|
|
403
|
-
subscription: z.never().optional(),
|
|
404
|
-
singlePaymentUnlimited: z.never().optional(),
|
|
405
|
-
singlePaymentForDuration: z.object({
|
|
406
|
-
count: z.number().int().describe(
|
|
408
|
+
/* @__PURE__ */ z.object({
|
|
409
|
+
subscription: /* @__PURE__ */ z.never().optional(),
|
|
410
|
+
singlePaymentUnlimited: /* @__PURE__ */ z.never().optional(),
|
|
411
|
+
singlePaymentForDuration: /* @__PURE__ */ z.object({
|
|
412
|
+
count: /* @__PURE__ */ z.number().int().describe(
|
|
407
413
|
"Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`."
|
|
408
414
|
).min(1).optional().nullable(),
|
|
409
|
-
unit: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
|
|
415
|
+
unit: /* @__PURE__ */ z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
|
|
410
416
|
}).describe(
|
|
411
417
|
"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."
|
|
412
418
|
)
|
|
413
419
|
}),
|
|
414
|
-
z.object({
|
|
415
|
-
subscription: z.never().optional(),
|
|
416
|
-
singlePaymentForDuration: z.never().optional(),
|
|
417
|
-
singlePaymentUnlimited: z.boolean().describe(
|
|
420
|
+
/* @__PURE__ */ z.object({
|
|
421
|
+
subscription: /* @__PURE__ */ z.never().optional(),
|
|
422
|
+
singlePaymentForDuration: /* @__PURE__ */ z.never().optional(),
|
|
423
|
+
singlePaymentUnlimited: /* @__PURE__ */ z.boolean().describe(
|
|
418
424
|
"Pricing model indicating the plan is paid in a single payment. The plan is valid until canceled."
|
|
419
425
|
)
|
|
420
426
|
})
|
|
421
427
|
])
|
|
422
428
|
).describe("Plan price, payment schedule, and expiration.").optional(),
|
|
423
|
-
public: z.boolean().describe(
|
|
429
|
+
public: /* @__PURE__ */ z.boolean().describe(
|
|
424
430
|
"Whether the plan is public (visible to site visitors and members)."
|
|
425
431
|
).optional().nullable(),
|
|
426
|
-
archived: z.boolean().describe(
|
|
432
|
+
archived: /* @__PURE__ */ z.boolean().describe(
|
|
427
433
|
"Whether the plan is archived. Archived plans are not visible and can't be purchased anymore, but existing purchases remain in effect."
|
|
428
434
|
).optional(),
|
|
429
|
-
primary: z.boolean().describe("Whether the plan is marked as primary.").optional(),
|
|
430
|
-
hasOrders: z.boolean().describe(
|
|
435
|
+
primary: /* @__PURE__ */ z.boolean().describe("Whether the plan is marked as primary.").optional(),
|
|
436
|
+
hasOrders: /* @__PURE__ */ z.boolean().describe(
|
|
431
437
|
"Whether the plan has any orders (including pending and unpaid orders)."
|
|
432
438
|
).optional(),
|
|
433
|
-
_createdDate: z.date().describe("Date plan was created.").optional().nullable(),
|
|
434
|
-
_updatedDate: z.date().describe("Date plan was last updated.").optional().nullable(),
|
|
435
|
-
slug: z.string().describe(
|
|
439
|
+
_createdDate: /* @__PURE__ */ z.date().describe("Date plan was created.").optional().nullable(),
|
|
440
|
+
_updatedDate: /* @__PURE__ */ z.date().describe("Date plan was last updated.").optional().nullable(),
|
|
441
|
+
slug: /* @__PURE__ */ z.string().describe(
|
|
436
442
|
"URL-friendly version of plan name. Unique across all plans in the same site."
|
|
437
443
|
).min(1).optional().nullable(),
|
|
438
|
-
maxPurchasesPerBuyer: z.number().int().describe(
|
|
444
|
+
maxPurchasesPerBuyer: /* @__PURE__ */ z.number().int().describe(
|
|
439
445
|
"Number of times the same buyer can purchase the plan. Currently limited to support:\n- Empty value or a value of `0`, meaning no limitation.\n- Value of `1`, meaning limited to 1 purchase per buyer."
|
|
440
446
|
).min(0).max(1).optional().nullable(),
|
|
441
|
-
allowFutureStartDate: z.boolean().describe(
|
|
447
|
+
allowFutureStartDate: /* @__PURE__ */ z.boolean().describe(
|
|
442
448
|
"Whether the buyer can start the plan at a later date. Defaults to false."
|
|
443
449
|
).optional().nullable(),
|
|
444
|
-
buyerCanCancel: z.boolean().describe(
|
|
450
|
+
buyerCanCancel: /* @__PURE__ */ z.boolean().describe(
|
|
445
451
|
"Whether the buyer is allowed to cancel their plan. Defaults to false.\nIf false, calling Request Cancellation returns an error."
|
|
446
452
|
).optional().nullable(),
|
|
447
|
-
termsAndConditions: z.string().describe(
|
|
453
|
+
termsAndConditions: /* @__PURE__ */ z.string().describe(
|
|
448
454
|
"Any terms and conditions that apply to the plan. This information is displayed during checkout."
|
|
449
455
|
).max(3e3).optional().nullable(),
|
|
450
|
-
formId: z.string().describe(
|
|
456
|
+
formId: /* @__PURE__ */ z.string().describe(
|
|
451
457
|
"ID of the form associated with the plan at checkout.\n\nLearn more about [forms](https://support.wix.com/en/article/wix-forms-an-overview)."
|
|
452
458
|
).regex(
|
|
453
459
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
@@ -455,116 +461,118 @@ var GetPlanResponse = /* @__PURE__ */ z.object({
|
|
|
455
461
|
).optional().nullable()
|
|
456
462
|
});
|
|
457
463
|
var ListPlansRequest = /* @__PURE__ */ z.object({
|
|
458
|
-
options: z.object({
|
|
459
|
-
archived: z.enum(["ACTIVE", "ARCHIVED", "ARCHIVED_AND_ACTIVE"]).optional(),
|
|
460
|
-
public: z.enum(["PUBLIC_AND_HIDDEN", "PUBLIC", "HIDDEN"]).optional(),
|
|
461
|
-
limit: z.number().int().describe("Number of pricing plans to list. Defaults to `75`.").min(1).max(100).optional().nullable(),
|
|
462
|
-
offset: z.number().int().describe("Number of pricing plans to skip. Defaults to `0`.").min(0).optional().nullable(),
|
|
463
|
-
planIds: z.array(z.string()).max(100).optional()
|
|
464
|
+
options: /* @__PURE__ */ z.object({
|
|
465
|
+
archived: /* @__PURE__ */ z.enum(["ACTIVE", "ARCHIVED", "ARCHIVED_AND_ACTIVE"]).optional(),
|
|
466
|
+
public: /* @__PURE__ */ z.enum(["PUBLIC_AND_HIDDEN", "PUBLIC", "HIDDEN"]).optional(),
|
|
467
|
+
limit: /* @__PURE__ */ z.number().int().describe("Number of pricing plans to list. Defaults to `75`.").min(1).max(100).optional().nullable(),
|
|
468
|
+
offset: /* @__PURE__ */ z.number().int().describe("Number of pricing plans to skip. Defaults to `0`.").min(0).optional().nullable(),
|
|
469
|
+
planIds: /* @__PURE__ */ z.array(/* @__PURE__ */ z.string()).max(100).optional()
|
|
464
470
|
}).describe("Options for filtering and paging the list of plans. ").optional()
|
|
465
471
|
});
|
|
466
472
|
var ListPlansResponse = /* @__PURE__ */ z.object({
|
|
467
|
-
plans: z.array(
|
|
468
|
-
z.object({
|
|
469
|
-
_id: z.string().describe("Plan ID.").regex(
|
|
473
|
+
plans: /* @__PURE__ */ z.array(
|
|
474
|
+
/* @__PURE__ */ z.object({
|
|
475
|
+
_id: /* @__PURE__ */ z.string().describe("Plan ID.").regex(
|
|
470
476
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
471
477
|
"Must be a valid GUID"
|
|
472
478
|
).optional(),
|
|
473
|
-
name: z.string().describe("Plan name.").min(1).max(50).optional().nullable(),
|
|
474
|
-
description: z.string().describe("Plan description.").max(450).optional().nullable(),
|
|
475
|
-
perks: z.object({
|
|
479
|
+
name: /* @__PURE__ */ z.string().describe("Plan name.").min(1).max(50).optional().nullable(),
|
|
480
|
+
description: /* @__PURE__ */ z.string().describe("Plan description.").max(450).optional().nullable(),
|
|
481
|
+
perks: /* @__PURE__ */ z.object({
|
|
482
|
+
values: /* @__PURE__ */ z.array(/* @__PURE__ */ z.string()).max(500).optional()
|
|
483
|
+
}).describe(
|
|
476
484
|
'List of text strings that promote what is included with this plan. For example, "Plenty of parking" or "Free gift on your birthday."'
|
|
477
485
|
).optional(),
|
|
478
|
-
pricing: z.intersection(
|
|
479
|
-
z.object({
|
|
480
|
-
price: z.object({
|
|
481
|
-
value: z.string().describe(
|
|
486
|
+
pricing: /* @__PURE__ */ z.intersection(
|
|
487
|
+
/* @__PURE__ */ z.object({
|
|
488
|
+
price: /* @__PURE__ */ z.object({
|
|
489
|
+
value: /* @__PURE__ */ z.string().describe(
|
|
482
490
|
"Monetary amount. Decimal string with a period as a decimal separator. For example, `'3.99'`. Can't be negative."
|
|
483
491
|
).optional(),
|
|
484
|
-
currency: z.string().describe(
|
|
492
|
+
currency: /* @__PURE__ */ z.string().describe(
|
|
485
493
|
"Currency code. Three-letter currency code in [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format. For example, `'USD'`."
|
|
486
494
|
).optional()
|
|
487
495
|
}).describe(
|
|
488
496
|
"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."
|
|
489
497
|
).optional(),
|
|
490
|
-
freeTrialDays: z.number().int().describe(
|
|
498
|
+
freeTrialDays: /* @__PURE__ */ z.number().int().describe(
|
|
491
499
|
"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."
|
|
492
500
|
).min(0).max(999).optional().nullable()
|
|
493
501
|
}),
|
|
494
|
-
z.xor([
|
|
495
|
-
z.object({
|
|
496
|
-
subscription: z.never().optional(),
|
|
497
|
-
singlePaymentForDuration: z.never().optional(),
|
|
498
|
-
singlePaymentUnlimited: z.never().optional()
|
|
502
|
+
/* @__PURE__ */ z.xor([
|
|
503
|
+
/* @__PURE__ */ z.object({
|
|
504
|
+
subscription: /* @__PURE__ */ z.never().optional(),
|
|
505
|
+
singlePaymentForDuration: /* @__PURE__ */ z.never().optional(),
|
|
506
|
+
singlePaymentUnlimited: /* @__PURE__ */ z.never().optional()
|
|
499
507
|
}),
|
|
500
|
-
z.object({
|
|
501
|
-
singlePaymentForDuration: z.never().optional(),
|
|
502
|
-
singlePaymentUnlimited: z.never().optional(),
|
|
503
|
-
subscription: z.object({
|
|
504
|
-
cycleDuration: z.object({
|
|
505
|
-
count: z.number().int().describe(
|
|
508
|
+
/* @__PURE__ */ z.object({
|
|
509
|
+
singlePaymentForDuration: /* @__PURE__ */ z.never().optional(),
|
|
510
|
+
singlePaymentUnlimited: /* @__PURE__ */ z.never().optional(),
|
|
511
|
+
subscription: /* @__PURE__ */ z.object({
|
|
512
|
+
cycleDuration: /* @__PURE__ */ z.object({
|
|
513
|
+
count: /* @__PURE__ */ z.number().int().describe(
|
|
506
514
|
"Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`."
|
|
507
515
|
).min(1).optional().nullable(),
|
|
508
|
-
unit: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
|
|
516
|
+
unit: /* @__PURE__ */ z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
|
|
509
517
|
}).describe(
|
|
510
518
|
"Number of payment cycles the subscription is valid for.\n`0` for unlimited plans or for plans that are valid until canceled."
|
|
511
519
|
).optional(),
|
|
512
|
-
cycleCount: z.number().int().describe(
|
|
520
|
+
cycleCount: /* @__PURE__ */ z.number().int().describe(
|
|
513
521
|
"Length of a payment cycle. For example, 1 month to have monthly payments.\nMultiply `cycleDuration`'s `count` by `cycleCount` to get the subscription duration.\nCurrently, only a value of `1` is supported."
|
|
514
522
|
).min(0).max(2e3).optional().nullable()
|
|
515
523
|
}).describe(
|
|
516
524
|
'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.'
|
|
517
525
|
)
|
|
518
526
|
}),
|
|
519
|
-
z.object({
|
|
520
|
-
subscription: z.never().optional(),
|
|
521
|
-
singlePaymentUnlimited: z.never().optional(),
|
|
522
|
-
singlePaymentForDuration: z.object({
|
|
523
|
-
count: z.number().int().describe(
|
|
527
|
+
/* @__PURE__ */ z.object({
|
|
528
|
+
subscription: /* @__PURE__ */ z.never().optional(),
|
|
529
|
+
singlePaymentUnlimited: /* @__PURE__ */ z.never().optional(),
|
|
530
|
+
singlePaymentForDuration: /* @__PURE__ */ z.object({
|
|
531
|
+
count: /* @__PURE__ */ z.number().int().describe(
|
|
524
532
|
"Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`."
|
|
525
533
|
).min(1).optional().nullable(),
|
|
526
|
-
unit: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
|
|
534
|
+
unit: /* @__PURE__ */ z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
|
|
527
535
|
}).describe(
|
|
528
536
|
"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."
|
|
529
537
|
)
|
|
530
538
|
}),
|
|
531
|
-
z.object({
|
|
532
|
-
subscription: z.never().optional(),
|
|
533
|
-
singlePaymentForDuration: z.never().optional(),
|
|
534
|
-
singlePaymentUnlimited: z.boolean().describe(
|
|
539
|
+
/* @__PURE__ */ z.object({
|
|
540
|
+
subscription: /* @__PURE__ */ z.never().optional(),
|
|
541
|
+
singlePaymentForDuration: /* @__PURE__ */ z.never().optional(),
|
|
542
|
+
singlePaymentUnlimited: /* @__PURE__ */ z.boolean().describe(
|
|
535
543
|
"Pricing model indicating the plan is paid in a single payment. The plan is valid until canceled."
|
|
536
544
|
)
|
|
537
545
|
})
|
|
538
546
|
])
|
|
539
547
|
).describe("Plan price, payment schedule, and expiration.").optional(),
|
|
540
|
-
public: z.boolean().describe(
|
|
548
|
+
public: /* @__PURE__ */ z.boolean().describe(
|
|
541
549
|
"Whether the plan is public (visible to site visitors and members)."
|
|
542
550
|
).optional().nullable(),
|
|
543
|
-
archived: z.boolean().describe(
|
|
551
|
+
archived: /* @__PURE__ */ z.boolean().describe(
|
|
544
552
|
"Whether the plan is archived. Archived plans are not visible and can't be purchased anymore, but existing purchases remain in effect."
|
|
545
553
|
).optional(),
|
|
546
|
-
primary: z.boolean().describe("Whether the plan is marked as primary.").optional(),
|
|
547
|
-
hasOrders: z.boolean().describe(
|
|
554
|
+
primary: /* @__PURE__ */ z.boolean().describe("Whether the plan is marked as primary.").optional(),
|
|
555
|
+
hasOrders: /* @__PURE__ */ z.boolean().describe(
|
|
548
556
|
"Whether the plan has any orders (including pending and unpaid orders)."
|
|
549
557
|
).optional(),
|
|
550
|
-
_createdDate: z.date().describe("Date plan was created.").optional().nullable(),
|
|
551
|
-
_updatedDate: z.date().describe("Date plan was last updated.").optional().nullable(),
|
|
552
|
-
slug: z.string().describe(
|
|
558
|
+
_createdDate: /* @__PURE__ */ z.date().describe("Date plan was created.").optional().nullable(),
|
|
559
|
+
_updatedDate: /* @__PURE__ */ z.date().describe("Date plan was last updated.").optional().nullable(),
|
|
560
|
+
slug: /* @__PURE__ */ z.string().describe(
|
|
553
561
|
"URL-friendly version of plan name. Unique across all plans in the same site."
|
|
554
562
|
).min(1).optional().nullable(),
|
|
555
|
-
maxPurchasesPerBuyer: z.number().int().describe(
|
|
563
|
+
maxPurchasesPerBuyer: /* @__PURE__ */ z.number().int().describe(
|
|
556
564
|
"Number of times the same buyer can purchase the plan. Currently limited to support:\n- Empty value or a value of `0`, meaning no limitation.\n- Value of `1`, meaning limited to 1 purchase per buyer."
|
|
557
565
|
).min(0).max(1).optional().nullable(),
|
|
558
|
-
allowFutureStartDate: z.boolean().describe(
|
|
566
|
+
allowFutureStartDate: /* @__PURE__ */ z.boolean().describe(
|
|
559
567
|
"Whether the buyer can start the plan at a later date. Defaults to false."
|
|
560
568
|
).optional().nullable(),
|
|
561
|
-
buyerCanCancel: z.boolean().describe(
|
|
569
|
+
buyerCanCancel: /* @__PURE__ */ z.boolean().describe(
|
|
562
570
|
"Whether the buyer is allowed to cancel their plan. Defaults to false.\nIf false, calling Request Cancellation returns an error."
|
|
563
571
|
).optional().nullable(),
|
|
564
|
-
termsAndConditions: z.string().describe(
|
|
572
|
+
termsAndConditions: /* @__PURE__ */ z.string().describe(
|
|
565
573
|
"Any terms and conditions that apply to the plan. This information is displayed during checkout."
|
|
566
574
|
).max(3e3).optional().nullable(),
|
|
567
|
-
formId: z.string().describe(
|
|
575
|
+
formId: /* @__PURE__ */ z.string().describe(
|
|
568
576
|
"ID of the form associated with the plan at checkout.\n\nLearn more about [forms](https://support.wix.com/en/article/wix-forms-an-overview)."
|
|
569
577
|
).regex(
|
|
570
578
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
@@ -572,20 +580,20 @@ var ListPlansResponse = /* @__PURE__ */ z.object({
|
|
|
572
580
|
).optional().nullable()
|
|
573
581
|
})
|
|
574
582
|
).optional(),
|
|
575
|
-
pagingMetadata: z.object({
|
|
576
|
-
count: z.number().int().describe("Number of items returned in the response.").optional().nullable(),
|
|
577
|
-
offset: z.number().int().describe("Offset that was requested.").optional().nullable(),
|
|
578
|
-
total: z.number().int().describe(
|
|
583
|
+
pagingMetadata: /* @__PURE__ */ z.object({
|
|
584
|
+
count: /* @__PURE__ */ z.number().int().describe("Number of items returned in the response.").optional().nullable(),
|
|
585
|
+
offset: /* @__PURE__ */ z.number().int().describe("Offset that was requested.").optional().nullable(),
|
|
586
|
+
total: /* @__PURE__ */ z.number().int().describe(
|
|
579
587
|
"Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set."
|
|
580
588
|
).optional().nullable(),
|
|
581
|
-
tooManyToCount: z.boolean().describe(
|
|
589
|
+
tooManyToCount: /* @__PURE__ */ z.boolean().describe(
|
|
582
590
|
"Flag that indicates the server failed to calculate the `total` field."
|
|
583
591
|
).optional().nullable(),
|
|
584
|
-
cursors: z.object({
|
|
585
|
-
next: z.string().describe(
|
|
592
|
+
cursors: /* @__PURE__ */ z.object({
|
|
593
|
+
next: /* @__PURE__ */ z.string().describe(
|
|
586
594
|
"Cursor string pointing to the next page in the list of results."
|
|
587
595
|
).max(16e3).optional().nullable(),
|
|
588
|
-
prev: z.string().describe(
|
|
596
|
+
prev: /* @__PURE__ */ z.string().describe(
|
|
589
597
|
"Cursor pointing to the previous page in the list of results."
|
|
590
598
|
).max(16e3).optional().nullable()
|
|
591
599
|
}).describe(
|
|
@@ -597,106 +605,108 @@ var ListPlansResponse = /* @__PURE__ */ z.object({
|
|
|
597
605
|
});
|
|
598
606
|
var GetPlanStatsRequest = /* @__PURE__ */ z.object({});
|
|
599
607
|
var GetPlanStatsResponse = /* @__PURE__ */ z.object({
|
|
600
|
-
totalPlans: z.number().int().describe(
|
|
608
|
+
totalPlans: /* @__PURE__ */ z.number().int().describe(
|
|
601
609
|
"Total number of plans created, including active plans (both public and hidden) and archived plans."
|
|
602
610
|
).optional()
|
|
603
611
|
});
|
|
604
612
|
var CreatePlanRequest = /* @__PURE__ */ z.object({
|
|
605
|
-
plan: z.object({
|
|
606
|
-
_id: z.string().describe("Plan ID.").regex(
|
|
613
|
+
plan: /* @__PURE__ */ z.object({
|
|
614
|
+
_id: /* @__PURE__ */ z.string().describe("Plan ID.").regex(
|
|
607
615
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
608
616
|
"Must be a valid GUID"
|
|
609
617
|
).optional(),
|
|
610
|
-
name: z.string().describe("Plan name.").min(1).max(50),
|
|
611
|
-
description: z.string().describe("Plan description.").max(450).optional().nullable(),
|
|
612
|
-
perks: z.object({
|
|
618
|
+
name: /* @__PURE__ */ z.string().describe("Plan name.").min(1).max(50),
|
|
619
|
+
description: /* @__PURE__ */ z.string().describe("Plan description.").max(450).optional().nullable(),
|
|
620
|
+
perks: /* @__PURE__ */ z.object({
|
|
621
|
+
values: /* @__PURE__ */ z.array(/* @__PURE__ */ z.string()).max(500).optional()
|
|
622
|
+
}).describe(
|
|
613
623
|
'List of text strings that promote what is included with this plan. For example, "Plenty of parking" or "Free gift on your birthday."'
|
|
614
624
|
).optional(),
|
|
615
|
-
pricing: z.intersection(
|
|
616
|
-
z.object({
|
|
617
|
-
price: z.object({
|
|
618
|
-
value: z.string().describe(
|
|
625
|
+
pricing: /* @__PURE__ */ z.intersection(
|
|
626
|
+
/* @__PURE__ */ z.object({
|
|
627
|
+
price: /* @__PURE__ */ z.object({
|
|
628
|
+
value: /* @__PURE__ */ z.string().describe(
|
|
619
629
|
"Monetary amount. Decimal string with a period as a decimal separator. For example, `'3.99'`. Can't be negative."
|
|
620
630
|
).optional(),
|
|
621
|
-
currency: z.string().describe(
|
|
631
|
+
currency: /* @__PURE__ */ z.string().describe(
|
|
622
632
|
"Currency code. Three-letter currency code in [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format. For example, `'USD'`."
|
|
623
633
|
).optional()
|
|
624
634
|
}).describe(
|
|
625
635
|
"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."
|
|
626
636
|
).optional(),
|
|
627
|
-
freeTrialDays: z.number().int().describe(
|
|
637
|
+
freeTrialDays: /* @__PURE__ */ z.number().int().describe(
|
|
628
638
|
"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."
|
|
629
639
|
).min(0).max(999).optional().nullable()
|
|
630
640
|
}),
|
|
631
|
-
z.xor([
|
|
632
|
-
z.object({
|
|
633
|
-
singlePaymentForDuration: z.never().optional(),
|
|
634
|
-
singlePaymentUnlimited: z.never().optional(),
|
|
635
|
-
subscription: z.object({
|
|
636
|
-
cycleDuration: z.object({
|
|
637
|
-
count: z.number().int().describe(
|
|
641
|
+
/* @__PURE__ */ z.xor([
|
|
642
|
+
/* @__PURE__ */ z.object({
|
|
643
|
+
singlePaymentForDuration: /* @__PURE__ */ z.never().optional(),
|
|
644
|
+
singlePaymentUnlimited: /* @__PURE__ */ z.never().optional(),
|
|
645
|
+
subscription: /* @__PURE__ */ z.object({
|
|
646
|
+
cycleDuration: /* @__PURE__ */ z.object({
|
|
647
|
+
count: /* @__PURE__ */ z.number().int().describe(
|
|
638
648
|
"Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`."
|
|
639
649
|
).min(1).optional().nullable(),
|
|
640
|
-
unit: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).optional()
|
|
650
|
+
unit: /* @__PURE__ */ z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).optional()
|
|
641
651
|
}).describe(
|
|
642
652
|
"Number of payment cycles the subscription is valid for.\n`0` for unlimited plans or for plans that are valid until canceled."
|
|
643
653
|
).optional(),
|
|
644
|
-
cycleCount: z.number().int().describe(
|
|
654
|
+
cycleCount: /* @__PURE__ */ z.number().int().describe(
|
|
645
655
|
"Length of a payment cycle. For example, 1 month to have monthly payments.\nMultiply `cycleDuration`'s `count` by `cycleCount` to get the subscription duration.\nCurrently, only a value of `1` is supported."
|
|
646
656
|
).min(0).max(2e3).optional().nullable()
|
|
647
657
|
}).describe(
|
|
648
658
|
'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.'
|
|
649
659
|
)
|
|
650
660
|
}),
|
|
651
|
-
z.object({
|
|
652
|
-
subscription: z.never().optional(),
|
|
653
|
-
singlePaymentUnlimited: z.never().optional(),
|
|
654
|
-
singlePaymentForDuration: z.object({
|
|
655
|
-
count: z.number().int().describe(
|
|
661
|
+
/* @__PURE__ */ z.object({
|
|
662
|
+
subscription: /* @__PURE__ */ z.never().optional(),
|
|
663
|
+
singlePaymentUnlimited: /* @__PURE__ */ z.never().optional(),
|
|
664
|
+
singlePaymentForDuration: /* @__PURE__ */ z.object({
|
|
665
|
+
count: /* @__PURE__ */ z.number().int().describe(
|
|
656
666
|
"Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`."
|
|
657
667
|
).min(1).optional().nullable(),
|
|
658
|
-
unit: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).optional()
|
|
668
|
+
unit: /* @__PURE__ */ z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).optional()
|
|
659
669
|
}).describe(
|
|
660
670
|
"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."
|
|
661
671
|
)
|
|
662
672
|
}),
|
|
663
|
-
z.object({
|
|
664
|
-
subscription: z.never().optional(),
|
|
665
|
-
singlePaymentForDuration: z.never().optional(),
|
|
666
|
-
singlePaymentUnlimited: z.boolean().describe(
|
|
673
|
+
/* @__PURE__ */ z.object({
|
|
674
|
+
subscription: /* @__PURE__ */ z.never().optional(),
|
|
675
|
+
singlePaymentForDuration: /* @__PURE__ */ z.never().optional(),
|
|
676
|
+
singlePaymentUnlimited: /* @__PURE__ */ z.boolean().describe(
|
|
667
677
|
"Pricing model indicating the plan is paid in a single payment. The plan is valid until canceled."
|
|
668
678
|
)
|
|
669
679
|
})
|
|
670
680
|
])
|
|
671
681
|
).describe("Plan price, payment schedule, and expiration."),
|
|
672
|
-
public: z.boolean().describe(
|
|
682
|
+
public: /* @__PURE__ */ z.boolean().describe(
|
|
673
683
|
"Whether the plan is public (visible to site visitors and members)."
|
|
674
684
|
).optional().nullable(),
|
|
675
|
-
archived: z.boolean().describe(
|
|
685
|
+
archived: /* @__PURE__ */ z.boolean().describe(
|
|
676
686
|
"Whether the plan is archived. Archived plans are not visible and can't be purchased anymore, but existing purchases remain in effect."
|
|
677
687
|
).optional(),
|
|
678
|
-
primary: z.boolean().describe("Whether the plan is marked as primary.").optional(),
|
|
679
|
-
hasOrders: z.boolean().describe(
|
|
688
|
+
primary: /* @__PURE__ */ z.boolean().describe("Whether the plan is marked as primary.").optional(),
|
|
689
|
+
hasOrders: /* @__PURE__ */ z.boolean().describe(
|
|
680
690
|
"Whether the plan has any orders (including pending and unpaid orders)."
|
|
681
691
|
).optional(),
|
|
682
|
-
_createdDate: z.date().describe("Date plan was created.").optional().nullable(),
|
|
683
|
-
_updatedDate: z.date().describe("Date plan was last updated.").optional().nullable(),
|
|
684
|
-
slug: z.string().describe(
|
|
692
|
+
_createdDate: /* @__PURE__ */ z.date().describe("Date plan was created.").optional().nullable(),
|
|
693
|
+
_updatedDate: /* @__PURE__ */ z.date().describe("Date plan was last updated.").optional().nullable(),
|
|
694
|
+
slug: /* @__PURE__ */ z.string().describe(
|
|
685
695
|
"URL-friendly version of plan name. Unique across all plans in the same site."
|
|
686
696
|
).min(1).optional().nullable(),
|
|
687
|
-
maxPurchasesPerBuyer: z.number().int().describe(
|
|
697
|
+
maxPurchasesPerBuyer: /* @__PURE__ */ z.number().int().describe(
|
|
688
698
|
"Number of times the same buyer can purchase the plan. Currently limited to support:\n- Empty value or a value of `0`, meaning no limitation.\n- Value of `1`, meaning limited to 1 purchase per buyer."
|
|
689
699
|
).min(0).max(1).optional().nullable(),
|
|
690
|
-
allowFutureStartDate: z.boolean().describe(
|
|
700
|
+
allowFutureStartDate: /* @__PURE__ */ z.boolean().describe(
|
|
691
701
|
"Whether the buyer can start the plan at a later date. Defaults to false."
|
|
692
702
|
).optional().nullable(),
|
|
693
|
-
buyerCanCancel: z.boolean().describe(
|
|
703
|
+
buyerCanCancel: /* @__PURE__ */ z.boolean().describe(
|
|
694
704
|
"Whether the buyer is allowed to cancel their plan. Defaults to false.\nIf false, calling Request Cancellation returns an error."
|
|
695
705
|
).optional().nullable(),
|
|
696
|
-
termsAndConditions: z.string().describe(
|
|
706
|
+
termsAndConditions: /* @__PURE__ */ z.string().describe(
|
|
697
707
|
"Any terms and conditions that apply to the plan. This information is displayed during checkout."
|
|
698
708
|
).max(3e3).optional().nullable(),
|
|
699
|
-
formId: z.string().describe(
|
|
709
|
+
formId: /* @__PURE__ */ z.string().describe(
|
|
700
710
|
"ID of the form associated with the plan at checkout.\n\nLearn more about [forms](https://support.wix.com/en/article/wix-forms-an-overview)."
|
|
701
711
|
).regex(
|
|
702
712
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
@@ -705,105 +715,107 @@ var CreatePlanRequest = /* @__PURE__ */ z.object({
|
|
|
705
715
|
}).describe("Information for the plan being created. ")
|
|
706
716
|
});
|
|
707
717
|
var CreatePlanResponse = /* @__PURE__ */ z.object({
|
|
708
|
-
_id: z.string().describe("Plan ID.").regex(
|
|
718
|
+
_id: /* @__PURE__ */ z.string().describe("Plan ID.").regex(
|
|
709
719
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
710
720
|
"Must be a valid GUID"
|
|
711
721
|
).optional(),
|
|
712
|
-
name: z.string().describe("Plan name.").min(1).max(50).optional().nullable(),
|
|
713
|
-
description: z.string().describe("Plan description.").max(450).optional().nullable(),
|
|
714
|
-
perks: z.object({
|
|
722
|
+
name: /* @__PURE__ */ z.string().describe("Plan name.").min(1).max(50).optional().nullable(),
|
|
723
|
+
description: /* @__PURE__ */ z.string().describe("Plan description.").max(450).optional().nullable(),
|
|
724
|
+
perks: /* @__PURE__ */ z.object({
|
|
725
|
+
values: /* @__PURE__ */ z.array(/* @__PURE__ */ z.string()).max(500).optional()
|
|
726
|
+
}).describe(
|
|
715
727
|
'List of text strings that promote what is included with this plan. For example, "Plenty of parking" or "Free gift on your birthday."'
|
|
716
728
|
).optional(),
|
|
717
|
-
pricing: z.intersection(
|
|
718
|
-
z.object({
|
|
719
|
-
price: z.object({
|
|
720
|
-
value: z.string().describe(
|
|
729
|
+
pricing: /* @__PURE__ */ z.intersection(
|
|
730
|
+
/* @__PURE__ */ z.object({
|
|
731
|
+
price: /* @__PURE__ */ z.object({
|
|
732
|
+
value: /* @__PURE__ */ z.string().describe(
|
|
721
733
|
"Monetary amount. Decimal string with a period as a decimal separator. For example, `'3.99'`. Can't be negative."
|
|
722
734
|
).optional(),
|
|
723
|
-
currency: z.string().describe(
|
|
735
|
+
currency: /* @__PURE__ */ z.string().describe(
|
|
724
736
|
"Currency code. Three-letter currency code in [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format. For example, `'USD'`."
|
|
725
737
|
).optional()
|
|
726
738
|
}).describe(
|
|
727
739
|
"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."
|
|
728
740
|
).optional(),
|
|
729
|
-
freeTrialDays: z.number().int().describe(
|
|
741
|
+
freeTrialDays: /* @__PURE__ */ z.number().int().describe(
|
|
730
742
|
"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."
|
|
731
743
|
).min(0).max(999).optional().nullable()
|
|
732
744
|
}),
|
|
733
|
-
z.xor([
|
|
734
|
-
z.object({
|
|
735
|
-
subscription: z.never().optional(),
|
|
736
|
-
singlePaymentForDuration: z.never().optional(),
|
|
737
|
-
singlePaymentUnlimited: z.never().optional()
|
|
745
|
+
/* @__PURE__ */ z.xor([
|
|
746
|
+
/* @__PURE__ */ z.object({
|
|
747
|
+
subscription: /* @__PURE__ */ z.never().optional(),
|
|
748
|
+
singlePaymentForDuration: /* @__PURE__ */ z.never().optional(),
|
|
749
|
+
singlePaymentUnlimited: /* @__PURE__ */ z.never().optional()
|
|
738
750
|
}),
|
|
739
|
-
z.object({
|
|
740
|
-
singlePaymentForDuration: z.never().optional(),
|
|
741
|
-
singlePaymentUnlimited: z.never().optional(),
|
|
742
|
-
subscription: z.object({
|
|
743
|
-
cycleDuration: z.object({
|
|
744
|
-
count: z.number().int().describe(
|
|
751
|
+
/* @__PURE__ */ z.object({
|
|
752
|
+
singlePaymentForDuration: /* @__PURE__ */ z.never().optional(),
|
|
753
|
+
singlePaymentUnlimited: /* @__PURE__ */ z.never().optional(),
|
|
754
|
+
subscription: /* @__PURE__ */ z.object({
|
|
755
|
+
cycleDuration: /* @__PURE__ */ z.object({
|
|
756
|
+
count: /* @__PURE__ */ z.number().int().describe(
|
|
745
757
|
"Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`."
|
|
746
758
|
).min(1).optional().nullable(),
|
|
747
|
-
unit: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
|
|
759
|
+
unit: /* @__PURE__ */ z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
|
|
748
760
|
}).describe(
|
|
749
761
|
"Number of payment cycles the subscription is valid for.\n`0` for unlimited plans or for plans that are valid until canceled."
|
|
750
762
|
).optional(),
|
|
751
|
-
cycleCount: z.number().int().describe(
|
|
763
|
+
cycleCount: /* @__PURE__ */ z.number().int().describe(
|
|
752
764
|
"Length of a payment cycle. For example, 1 month to have monthly payments.\nMultiply `cycleDuration`'s `count` by `cycleCount` to get the subscription duration.\nCurrently, only a value of `1` is supported."
|
|
753
765
|
).min(0).max(2e3).optional().nullable()
|
|
754
766
|
}).describe(
|
|
755
767
|
'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.'
|
|
756
768
|
)
|
|
757
769
|
}),
|
|
758
|
-
z.object({
|
|
759
|
-
subscription: z.never().optional(),
|
|
760
|
-
singlePaymentUnlimited: z.never().optional(),
|
|
761
|
-
singlePaymentForDuration: z.object({
|
|
762
|
-
count: z.number().int().describe(
|
|
770
|
+
/* @__PURE__ */ z.object({
|
|
771
|
+
subscription: /* @__PURE__ */ z.never().optional(),
|
|
772
|
+
singlePaymentUnlimited: /* @__PURE__ */ z.never().optional(),
|
|
773
|
+
singlePaymentForDuration: /* @__PURE__ */ z.object({
|
|
774
|
+
count: /* @__PURE__ */ z.number().int().describe(
|
|
763
775
|
"Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`."
|
|
764
776
|
).min(1).optional().nullable(),
|
|
765
|
-
unit: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
|
|
777
|
+
unit: /* @__PURE__ */ z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
|
|
766
778
|
}).describe(
|
|
767
779
|
"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."
|
|
768
780
|
)
|
|
769
781
|
}),
|
|
770
|
-
z.object({
|
|
771
|
-
subscription: z.never().optional(),
|
|
772
|
-
singlePaymentForDuration: z.never().optional(),
|
|
773
|
-
singlePaymentUnlimited: z.boolean().describe(
|
|
782
|
+
/* @__PURE__ */ z.object({
|
|
783
|
+
subscription: /* @__PURE__ */ z.never().optional(),
|
|
784
|
+
singlePaymentForDuration: /* @__PURE__ */ z.never().optional(),
|
|
785
|
+
singlePaymentUnlimited: /* @__PURE__ */ z.boolean().describe(
|
|
774
786
|
"Pricing model indicating the plan is paid in a single payment. The plan is valid until canceled."
|
|
775
787
|
)
|
|
776
788
|
})
|
|
777
789
|
])
|
|
778
790
|
).describe("Plan price, payment schedule, and expiration.").optional(),
|
|
779
|
-
public: z.boolean().describe(
|
|
791
|
+
public: /* @__PURE__ */ z.boolean().describe(
|
|
780
792
|
"Whether the plan is public (visible to site visitors and members)."
|
|
781
793
|
).optional().nullable(),
|
|
782
|
-
archived: z.boolean().describe(
|
|
794
|
+
archived: /* @__PURE__ */ z.boolean().describe(
|
|
783
795
|
"Whether the plan is archived. Archived plans are not visible and can't be purchased anymore, but existing purchases remain in effect."
|
|
784
796
|
).optional(),
|
|
785
|
-
primary: z.boolean().describe("Whether the plan is marked as primary.").optional(),
|
|
786
|
-
hasOrders: z.boolean().describe(
|
|
797
|
+
primary: /* @__PURE__ */ z.boolean().describe("Whether the plan is marked as primary.").optional(),
|
|
798
|
+
hasOrders: /* @__PURE__ */ z.boolean().describe(
|
|
787
799
|
"Whether the plan has any orders (including pending and unpaid orders)."
|
|
788
800
|
).optional(),
|
|
789
|
-
_createdDate: z.date().describe("Date plan was created.").optional().nullable(),
|
|
790
|
-
_updatedDate: z.date().describe("Date plan was last updated.").optional().nullable(),
|
|
791
|
-
slug: z.string().describe(
|
|
801
|
+
_createdDate: /* @__PURE__ */ z.date().describe("Date plan was created.").optional().nullable(),
|
|
802
|
+
_updatedDate: /* @__PURE__ */ z.date().describe("Date plan was last updated.").optional().nullable(),
|
|
803
|
+
slug: /* @__PURE__ */ z.string().describe(
|
|
792
804
|
"URL-friendly version of plan name. Unique across all plans in the same site."
|
|
793
805
|
).min(1).optional().nullable(),
|
|
794
|
-
maxPurchasesPerBuyer: z.number().int().describe(
|
|
806
|
+
maxPurchasesPerBuyer: /* @__PURE__ */ z.number().int().describe(
|
|
795
807
|
"Number of times the same buyer can purchase the plan. Currently limited to support:\n- Empty value or a value of `0`, meaning no limitation.\n- Value of `1`, meaning limited to 1 purchase per buyer."
|
|
796
808
|
).min(0).max(1).optional().nullable(),
|
|
797
|
-
allowFutureStartDate: z.boolean().describe(
|
|
809
|
+
allowFutureStartDate: /* @__PURE__ */ z.boolean().describe(
|
|
798
810
|
"Whether the buyer can start the plan at a later date. Defaults to false."
|
|
799
811
|
).optional().nullable(),
|
|
800
|
-
buyerCanCancel: z.boolean().describe(
|
|
812
|
+
buyerCanCancel: /* @__PURE__ */ z.boolean().describe(
|
|
801
813
|
"Whether the buyer is allowed to cancel their plan. Defaults to false.\nIf false, calling Request Cancellation returns an error."
|
|
802
814
|
).optional().nullable(),
|
|
803
|
-
termsAndConditions: z.string().describe(
|
|
815
|
+
termsAndConditions: /* @__PURE__ */ z.string().describe(
|
|
804
816
|
"Any terms and conditions that apply to the plan. This information is displayed during checkout."
|
|
805
817
|
).max(3e3).optional().nullable(),
|
|
806
|
-
formId: z.string().describe(
|
|
818
|
+
formId: /* @__PURE__ */ z.string().describe(
|
|
807
819
|
"ID of the form associated with the plan at checkout.\n\nLearn more about [forms](https://support.wix.com/en/article/wix-forms-an-overview)."
|
|
808
820
|
).regex(
|
|
809
821
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
@@ -811,110 +823,112 @@ var CreatePlanResponse = /* @__PURE__ */ z.object({
|
|
|
811
823
|
).optional().nullable()
|
|
812
824
|
});
|
|
813
825
|
var UpdatePlanRequest = /* @__PURE__ */ z.object({
|
|
814
|
-
_id: z.string().describe("ID of the plan to update.").regex(
|
|
826
|
+
_id: /* @__PURE__ */ z.string().describe("ID of the plan to update.").regex(
|
|
815
827
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
816
828
|
"Must be a valid GUID"
|
|
817
829
|
),
|
|
818
|
-
plan: z.object({
|
|
819
|
-
_id: z.string().describe("Plan ID.").regex(
|
|
830
|
+
plan: /* @__PURE__ */ z.object({
|
|
831
|
+
_id: /* @__PURE__ */ z.string().describe("Plan ID.").regex(
|
|
820
832
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
821
833
|
"Must be a valid GUID"
|
|
822
834
|
).optional(),
|
|
823
|
-
name: z.string().describe("Plan name.").min(1).max(50).optional().nullable(),
|
|
824
|
-
description: z.string().describe("Plan description.").max(450).optional().nullable(),
|
|
825
|
-
perks: z.object({
|
|
835
|
+
name: /* @__PURE__ */ z.string().describe("Plan name.").min(1).max(50).optional().nullable(),
|
|
836
|
+
description: /* @__PURE__ */ z.string().describe("Plan description.").max(450).optional().nullable(),
|
|
837
|
+
perks: /* @__PURE__ */ z.object({
|
|
838
|
+
values: /* @__PURE__ */ z.array(/* @__PURE__ */ z.string()).max(500).optional()
|
|
839
|
+
}).describe(
|
|
826
840
|
'List of text strings that promote what is included with this plan. For example, "Plenty of parking" or "Free gift on your birthday."'
|
|
827
841
|
).optional(),
|
|
828
|
-
pricing: z.intersection(
|
|
829
|
-
z.object({
|
|
830
|
-
price: z.object({
|
|
831
|
-
value: z.string().describe(
|
|
842
|
+
pricing: /* @__PURE__ */ z.intersection(
|
|
843
|
+
/* @__PURE__ */ z.object({
|
|
844
|
+
price: /* @__PURE__ */ z.object({
|
|
845
|
+
value: /* @__PURE__ */ z.string().describe(
|
|
832
846
|
"Monetary amount. Decimal string with a period as a decimal separator. For example, `'3.99'`. Can't be negative."
|
|
833
847
|
).optional(),
|
|
834
|
-
currency: z.string().describe(
|
|
848
|
+
currency: /* @__PURE__ */ z.string().describe(
|
|
835
849
|
"Currency code. Three-letter currency code in [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format. For example, `'USD'`."
|
|
836
850
|
).optional()
|
|
837
851
|
}).describe(
|
|
838
852
|
"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."
|
|
839
853
|
).optional(),
|
|
840
|
-
freeTrialDays: z.number().int().describe(
|
|
854
|
+
freeTrialDays: /* @__PURE__ */ z.number().int().describe(
|
|
841
855
|
"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."
|
|
842
856
|
).min(0).max(999).optional().nullable()
|
|
843
857
|
}),
|
|
844
|
-
z.xor([
|
|
845
|
-
z.object({
|
|
846
|
-
subscription: z.never().optional(),
|
|
847
|
-
singlePaymentForDuration: z.never().optional(),
|
|
848
|
-
singlePaymentUnlimited: z.never().optional()
|
|
858
|
+
/* @__PURE__ */ z.xor([
|
|
859
|
+
/* @__PURE__ */ z.object({
|
|
860
|
+
subscription: /* @__PURE__ */ z.never().optional(),
|
|
861
|
+
singlePaymentForDuration: /* @__PURE__ */ z.never().optional(),
|
|
862
|
+
singlePaymentUnlimited: /* @__PURE__ */ z.never().optional()
|
|
849
863
|
}),
|
|
850
|
-
z.object({
|
|
851
|
-
singlePaymentForDuration: z.never().optional(),
|
|
852
|
-
singlePaymentUnlimited: z.never().optional(),
|
|
853
|
-
subscription: z.object({
|
|
854
|
-
cycleDuration: z.object({
|
|
855
|
-
count: z.number().int().describe(
|
|
864
|
+
/* @__PURE__ */ z.object({
|
|
865
|
+
singlePaymentForDuration: /* @__PURE__ */ z.never().optional(),
|
|
866
|
+
singlePaymentUnlimited: /* @__PURE__ */ z.never().optional(),
|
|
867
|
+
subscription: /* @__PURE__ */ z.object({
|
|
868
|
+
cycleDuration: /* @__PURE__ */ z.object({
|
|
869
|
+
count: /* @__PURE__ */ z.number().int().describe(
|
|
856
870
|
"Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`."
|
|
857
871
|
).min(1).optional().nullable(),
|
|
858
|
-
unit: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
|
|
872
|
+
unit: /* @__PURE__ */ z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
|
|
859
873
|
}).describe(
|
|
860
874
|
"Number of payment cycles the subscription is valid for.\n`0` for unlimited plans or for plans that are valid until canceled."
|
|
861
875
|
).optional(),
|
|
862
|
-
cycleCount: z.number().int().describe(
|
|
876
|
+
cycleCount: /* @__PURE__ */ z.number().int().describe(
|
|
863
877
|
"Length of a payment cycle. For example, 1 month to have monthly payments.\nMultiply `cycleDuration`'s `count` by `cycleCount` to get the subscription duration.\nCurrently, only a value of `1` is supported."
|
|
864
878
|
).min(0).max(2e3).optional().nullable()
|
|
865
879
|
}).describe(
|
|
866
880
|
'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.'
|
|
867
881
|
)
|
|
868
882
|
}),
|
|
869
|
-
z.object({
|
|
870
|
-
subscription: z.never().optional(),
|
|
871
|
-
singlePaymentUnlimited: z.never().optional(),
|
|
872
|
-
singlePaymentForDuration: z.object({
|
|
873
|
-
count: z.number().int().describe(
|
|
883
|
+
/* @__PURE__ */ z.object({
|
|
884
|
+
subscription: /* @__PURE__ */ z.never().optional(),
|
|
885
|
+
singlePaymentUnlimited: /* @__PURE__ */ z.never().optional(),
|
|
886
|
+
singlePaymentForDuration: /* @__PURE__ */ z.object({
|
|
887
|
+
count: /* @__PURE__ */ z.number().int().describe(
|
|
874
888
|
"Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`."
|
|
875
889
|
).min(1).optional().nullable(),
|
|
876
|
-
unit: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
|
|
890
|
+
unit: /* @__PURE__ */ z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
|
|
877
891
|
}).describe(
|
|
878
892
|
"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."
|
|
879
893
|
)
|
|
880
894
|
}),
|
|
881
|
-
z.object({
|
|
882
|
-
subscription: z.never().optional(),
|
|
883
|
-
singlePaymentForDuration: z.never().optional(),
|
|
884
|
-
singlePaymentUnlimited: z.boolean().describe(
|
|
895
|
+
/* @__PURE__ */ z.object({
|
|
896
|
+
subscription: /* @__PURE__ */ z.never().optional(),
|
|
897
|
+
singlePaymentForDuration: /* @__PURE__ */ z.never().optional(),
|
|
898
|
+
singlePaymentUnlimited: /* @__PURE__ */ z.boolean().describe(
|
|
885
899
|
"Pricing model indicating the plan is paid in a single payment. The plan is valid until canceled."
|
|
886
900
|
)
|
|
887
901
|
})
|
|
888
902
|
])
|
|
889
903
|
).describe("Plan price, payment schedule, and expiration.").optional(),
|
|
890
|
-
public: z.boolean().describe(
|
|
904
|
+
public: /* @__PURE__ */ z.boolean().describe(
|
|
891
905
|
"Whether the plan is public (visible to site visitors and members)."
|
|
892
906
|
).optional().nullable(),
|
|
893
|
-
archived: z.boolean().describe(
|
|
907
|
+
archived: /* @__PURE__ */ z.boolean().describe(
|
|
894
908
|
"Whether the plan is archived. Archived plans are not visible and can't be purchased anymore, but existing purchases remain in effect."
|
|
895
909
|
).optional(),
|
|
896
|
-
primary: z.boolean().describe("Whether the plan is marked as primary.").optional(),
|
|
897
|
-
hasOrders: z.boolean().describe(
|
|
910
|
+
primary: /* @__PURE__ */ z.boolean().describe("Whether the plan is marked as primary.").optional(),
|
|
911
|
+
hasOrders: /* @__PURE__ */ z.boolean().describe(
|
|
898
912
|
"Whether the plan has any orders (including pending and unpaid orders)."
|
|
899
913
|
).optional(),
|
|
900
|
-
_createdDate: z.date().describe("Date plan was created.").optional().nullable(),
|
|
901
|
-
_updatedDate: z.date().describe("Date plan was last updated.").optional().nullable(),
|
|
902
|
-
slug: z.string().describe(
|
|
914
|
+
_createdDate: /* @__PURE__ */ z.date().describe("Date plan was created.").optional().nullable(),
|
|
915
|
+
_updatedDate: /* @__PURE__ */ z.date().describe("Date plan was last updated.").optional().nullable(),
|
|
916
|
+
slug: /* @__PURE__ */ z.string().describe(
|
|
903
917
|
"URL-friendly version of plan name. Unique across all plans in the same site."
|
|
904
918
|
).min(1).optional().nullable(),
|
|
905
|
-
maxPurchasesPerBuyer: z.number().int().describe(
|
|
919
|
+
maxPurchasesPerBuyer: /* @__PURE__ */ z.number().int().describe(
|
|
906
920
|
"Number of times the same buyer can purchase the plan. Currently limited to support:\n- Empty value or a value of `0`, meaning no limitation.\n- Value of `1`, meaning limited to 1 purchase per buyer."
|
|
907
921
|
).min(0).max(1).optional().nullable(),
|
|
908
|
-
allowFutureStartDate: z.boolean().describe(
|
|
922
|
+
allowFutureStartDate: /* @__PURE__ */ z.boolean().describe(
|
|
909
923
|
"Whether the buyer can start the plan at a later date. Defaults to false."
|
|
910
924
|
).optional().nullable(),
|
|
911
|
-
buyerCanCancel: z.boolean().describe(
|
|
925
|
+
buyerCanCancel: /* @__PURE__ */ z.boolean().describe(
|
|
912
926
|
"Whether the buyer is allowed to cancel their plan. Defaults to false.\nIf false, calling Request Cancellation returns an error."
|
|
913
927
|
).optional().nullable(),
|
|
914
|
-
termsAndConditions: z.string().describe(
|
|
928
|
+
termsAndConditions: /* @__PURE__ */ z.string().describe(
|
|
915
929
|
"Any terms and conditions that apply to the plan. This information is displayed during checkout."
|
|
916
930
|
).max(3e3).optional().nullable(),
|
|
917
|
-
formId: z.string().describe(
|
|
931
|
+
formId: /* @__PURE__ */ z.string().describe(
|
|
918
932
|
"ID of the form associated with the plan at checkout.\n\nLearn more about [forms](https://support.wix.com/en/article/wix-forms-an-overview)."
|
|
919
933
|
).regex(
|
|
920
934
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
@@ -923,105 +937,107 @@ var UpdatePlanRequest = /* @__PURE__ */ z.object({
|
|
|
923
937
|
}).describe("ID of the plan to update.")
|
|
924
938
|
});
|
|
925
939
|
var UpdatePlanResponse = /* @__PURE__ */ z.object({
|
|
926
|
-
_id: z.string().describe("Plan ID.").regex(
|
|
940
|
+
_id: /* @__PURE__ */ z.string().describe("Plan ID.").regex(
|
|
927
941
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
928
942
|
"Must be a valid GUID"
|
|
929
943
|
).optional(),
|
|
930
|
-
name: z.string().describe("Plan name.").min(1).max(50).optional().nullable(),
|
|
931
|
-
description: z.string().describe("Plan description.").max(450).optional().nullable(),
|
|
932
|
-
perks: z.object({
|
|
944
|
+
name: /* @__PURE__ */ z.string().describe("Plan name.").min(1).max(50).optional().nullable(),
|
|
945
|
+
description: /* @__PURE__ */ z.string().describe("Plan description.").max(450).optional().nullable(),
|
|
946
|
+
perks: /* @__PURE__ */ z.object({
|
|
947
|
+
values: /* @__PURE__ */ z.array(/* @__PURE__ */ z.string()).max(500).optional()
|
|
948
|
+
}).describe(
|
|
933
949
|
'List of text strings that promote what is included with this plan. For example, "Plenty of parking" or "Free gift on your birthday."'
|
|
934
950
|
).optional(),
|
|
935
|
-
pricing: z.intersection(
|
|
936
|
-
z.object({
|
|
937
|
-
price: z.object({
|
|
938
|
-
value: z.string().describe(
|
|
951
|
+
pricing: /* @__PURE__ */ z.intersection(
|
|
952
|
+
/* @__PURE__ */ z.object({
|
|
953
|
+
price: /* @__PURE__ */ z.object({
|
|
954
|
+
value: /* @__PURE__ */ z.string().describe(
|
|
939
955
|
"Monetary amount. Decimal string with a period as a decimal separator. For example, `'3.99'`. Can't be negative."
|
|
940
956
|
).optional(),
|
|
941
|
-
currency: z.string().describe(
|
|
957
|
+
currency: /* @__PURE__ */ z.string().describe(
|
|
942
958
|
"Currency code. Three-letter currency code in [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format. For example, `'USD'`."
|
|
943
959
|
).optional()
|
|
944
960
|
}).describe(
|
|
945
961
|
"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."
|
|
946
962
|
).optional(),
|
|
947
|
-
freeTrialDays: z.number().int().describe(
|
|
963
|
+
freeTrialDays: /* @__PURE__ */ z.number().int().describe(
|
|
948
964
|
"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."
|
|
949
965
|
).min(0).max(999).optional().nullable()
|
|
950
966
|
}),
|
|
951
|
-
z.xor([
|
|
952
|
-
z.object({
|
|
953
|
-
subscription: z.never().optional(),
|
|
954
|
-
singlePaymentForDuration: z.never().optional(),
|
|
955
|
-
singlePaymentUnlimited: z.never().optional()
|
|
967
|
+
/* @__PURE__ */ z.xor([
|
|
968
|
+
/* @__PURE__ */ z.object({
|
|
969
|
+
subscription: /* @__PURE__ */ z.never().optional(),
|
|
970
|
+
singlePaymentForDuration: /* @__PURE__ */ z.never().optional(),
|
|
971
|
+
singlePaymentUnlimited: /* @__PURE__ */ z.never().optional()
|
|
956
972
|
}),
|
|
957
|
-
z.object({
|
|
958
|
-
singlePaymentForDuration: z.never().optional(),
|
|
959
|
-
singlePaymentUnlimited: z.never().optional(),
|
|
960
|
-
subscription: z.object({
|
|
961
|
-
cycleDuration: z.object({
|
|
962
|
-
count: z.number().int().describe(
|
|
973
|
+
/* @__PURE__ */ z.object({
|
|
974
|
+
singlePaymentForDuration: /* @__PURE__ */ z.never().optional(),
|
|
975
|
+
singlePaymentUnlimited: /* @__PURE__ */ z.never().optional(),
|
|
976
|
+
subscription: /* @__PURE__ */ z.object({
|
|
977
|
+
cycleDuration: /* @__PURE__ */ z.object({
|
|
978
|
+
count: /* @__PURE__ */ z.number().int().describe(
|
|
963
979
|
"Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`."
|
|
964
980
|
).min(1).optional().nullable(),
|
|
965
|
-
unit: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
|
|
981
|
+
unit: /* @__PURE__ */ z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
|
|
966
982
|
}).describe(
|
|
967
983
|
"Number of payment cycles the subscription is valid for.\n`0` for unlimited plans or for plans that are valid until canceled."
|
|
968
984
|
).optional(),
|
|
969
|
-
cycleCount: z.number().int().describe(
|
|
985
|
+
cycleCount: /* @__PURE__ */ z.number().int().describe(
|
|
970
986
|
"Length of a payment cycle. For example, 1 month to have monthly payments.\nMultiply `cycleDuration`'s `count` by `cycleCount` to get the subscription duration.\nCurrently, only a value of `1` is supported."
|
|
971
987
|
).min(0).max(2e3).optional().nullable()
|
|
972
988
|
}).describe(
|
|
973
989
|
'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.'
|
|
974
990
|
)
|
|
975
991
|
}),
|
|
976
|
-
z.object({
|
|
977
|
-
subscription: z.never().optional(),
|
|
978
|
-
singlePaymentUnlimited: z.never().optional(),
|
|
979
|
-
singlePaymentForDuration: z.object({
|
|
980
|
-
count: z.number().int().describe(
|
|
992
|
+
/* @__PURE__ */ z.object({
|
|
993
|
+
subscription: /* @__PURE__ */ z.never().optional(),
|
|
994
|
+
singlePaymentUnlimited: /* @__PURE__ */ z.never().optional(),
|
|
995
|
+
singlePaymentForDuration: /* @__PURE__ */ z.object({
|
|
996
|
+
count: /* @__PURE__ */ z.number().int().describe(
|
|
981
997
|
"Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`."
|
|
982
998
|
).min(1).optional().nullable(),
|
|
983
|
-
unit: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
|
|
999
|
+
unit: /* @__PURE__ */ z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
|
|
984
1000
|
}).describe(
|
|
985
1001
|
"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."
|
|
986
1002
|
)
|
|
987
1003
|
}),
|
|
988
|
-
z.object({
|
|
989
|
-
subscription: z.never().optional(),
|
|
990
|
-
singlePaymentForDuration: z.never().optional(),
|
|
991
|
-
singlePaymentUnlimited: z.boolean().describe(
|
|
1004
|
+
/* @__PURE__ */ z.object({
|
|
1005
|
+
subscription: /* @__PURE__ */ z.never().optional(),
|
|
1006
|
+
singlePaymentForDuration: /* @__PURE__ */ z.never().optional(),
|
|
1007
|
+
singlePaymentUnlimited: /* @__PURE__ */ z.boolean().describe(
|
|
992
1008
|
"Pricing model indicating the plan is paid in a single payment. The plan is valid until canceled."
|
|
993
1009
|
)
|
|
994
1010
|
})
|
|
995
1011
|
])
|
|
996
1012
|
).describe("Plan price, payment schedule, and expiration.").optional(),
|
|
997
|
-
public: z.boolean().describe(
|
|
1013
|
+
public: /* @__PURE__ */ z.boolean().describe(
|
|
998
1014
|
"Whether the plan is public (visible to site visitors and members)."
|
|
999
1015
|
).optional().nullable(),
|
|
1000
|
-
archived: z.boolean().describe(
|
|
1016
|
+
archived: /* @__PURE__ */ z.boolean().describe(
|
|
1001
1017
|
"Whether the plan is archived. Archived plans are not visible and can't be purchased anymore, but existing purchases remain in effect."
|
|
1002
1018
|
).optional(),
|
|
1003
|
-
primary: z.boolean().describe("Whether the plan is marked as primary.").optional(),
|
|
1004
|
-
hasOrders: z.boolean().describe(
|
|
1019
|
+
primary: /* @__PURE__ */ z.boolean().describe("Whether the plan is marked as primary.").optional(),
|
|
1020
|
+
hasOrders: /* @__PURE__ */ z.boolean().describe(
|
|
1005
1021
|
"Whether the plan has any orders (including pending and unpaid orders)."
|
|
1006
1022
|
).optional(),
|
|
1007
|
-
_createdDate: z.date().describe("Date plan was created.").optional().nullable(),
|
|
1008
|
-
_updatedDate: z.date().describe("Date plan was last updated.").optional().nullable(),
|
|
1009
|
-
slug: z.string().describe(
|
|
1023
|
+
_createdDate: /* @__PURE__ */ z.date().describe("Date plan was created.").optional().nullable(),
|
|
1024
|
+
_updatedDate: /* @__PURE__ */ z.date().describe("Date plan was last updated.").optional().nullable(),
|
|
1025
|
+
slug: /* @__PURE__ */ z.string().describe(
|
|
1010
1026
|
"URL-friendly version of plan name. Unique across all plans in the same site."
|
|
1011
1027
|
).min(1).optional().nullable(),
|
|
1012
|
-
maxPurchasesPerBuyer: z.number().int().describe(
|
|
1028
|
+
maxPurchasesPerBuyer: /* @__PURE__ */ z.number().int().describe(
|
|
1013
1029
|
"Number of times the same buyer can purchase the plan. Currently limited to support:\n- Empty value or a value of `0`, meaning no limitation.\n- Value of `1`, meaning limited to 1 purchase per buyer."
|
|
1014
1030
|
).min(0).max(1).optional().nullable(),
|
|
1015
|
-
allowFutureStartDate: z.boolean().describe(
|
|
1031
|
+
allowFutureStartDate: /* @__PURE__ */ z.boolean().describe(
|
|
1016
1032
|
"Whether the buyer can start the plan at a later date. Defaults to false."
|
|
1017
1033
|
).optional().nullable(),
|
|
1018
|
-
buyerCanCancel: z.boolean().describe(
|
|
1034
|
+
buyerCanCancel: /* @__PURE__ */ z.boolean().describe(
|
|
1019
1035
|
"Whether the buyer is allowed to cancel their plan. Defaults to false.\nIf false, calling Request Cancellation returns an error."
|
|
1020
1036
|
).optional().nullable(),
|
|
1021
|
-
termsAndConditions: z.string().describe(
|
|
1037
|
+
termsAndConditions: /* @__PURE__ */ z.string().describe(
|
|
1022
1038
|
"Any terms and conditions that apply to the plan. This information is displayed during checkout."
|
|
1023
1039
|
).max(3e3).optional().nullable(),
|
|
1024
|
-
formId: z.string().describe(
|
|
1040
|
+
formId: /* @__PURE__ */ z.string().describe(
|
|
1025
1041
|
"ID of the form associated with the plan at checkout.\n\nLearn more about [forms](https://support.wix.com/en/article/wix-forms-an-overview)."
|
|
1026
1042
|
).regex(
|
|
1027
1043
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
@@ -1029,115 +1045,117 @@ var UpdatePlanResponse = /* @__PURE__ */ z.object({
|
|
|
1029
1045
|
).optional().nullable()
|
|
1030
1046
|
});
|
|
1031
1047
|
var SetPlanVisibilityRequest = /* @__PURE__ */ z.object({
|
|
1032
|
-
_id: z.string().describe("The ID of the plan to either display or hide on the site page. ").regex(
|
|
1048
|
+
_id: /* @__PURE__ */ z.string().describe("The ID of the plan to either display or hide on the site page. ").regex(
|
|
1033
1049
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
1034
1050
|
"Must be a valid GUID"
|
|
1035
1051
|
),
|
|
1036
|
-
visible: z.boolean().describe(
|
|
1052
|
+
visible: /* @__PURE__ */ z.boolean().describe(
|
|
1037
1053
|
"Whether a plan is visible to members and site visitors. Updates the `public` field."
|
|
1038
1054
|
)
|
|
1039
1055
|
});
|
|
1040
1056
|
var SetPlanVisibilityResponse = /* @__PURE__ */ z.object({
|
|
1041
|
-
plan: z.object({
|
|
1042
|
-
_id: z.string().describe("Plan ID.").regex(
|
|
1057
|
+
plan: /* @__PURE__ */ z.object({
|
|
1058
|
+
_id: /* @__PURE__ */ z.string().describe("Plan ID.").regex(
|
|
1043
1059
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
1044
1060
|
"Must be a valid GUID"
|
|
1045
1061
|
).optional(),
|
|
1046
|
-
name: z.string().describe("Plan name.").min(1).max(50).optional().nullable(),
|
|
1047
|
-
description: z.string().describe("Plan description.").max(450).optional().nullable(),
|
|
1048
|
-
perks: z.object({
|
|
1062
|
+
name: /* @__PURE__ */ z.string().describe("Plan name.").min(1).max(50).optional().nullable(),
|
|
1063
|
+
description: /* @__PURE__ */ z.string().describe("Plan description.").max(450).optional().nullable(),
|
|
1064
|
+
perks: /* @__PURE__ */ z.object({
|
|
1065
|
+
values: /* @__PURE__ */ z.array(/* @__PURE__ */ z.string()).max(500).optional()
|
|
1066
|
+
}).describe(
|
|
1049
1067
|
'List of text strings that promote what is included with this plan. For example, "Plenty of parking" or "Free gift on your birthday."'
|
|
1050
1068
|
).optional(),
|
|
1051
|
-
pricing: z.intersection(
|
|
1052
|
-
z.object({
|
|
1053
|
-
price: z.object({
|
|
1054
|
-
value: z.string().describe(
|
|
1069
|
+
pricing: /* @__PURE__ */ z.intersection(
|
|
1070
|
+
/* @__PURE__ */ z.object({
|
|
1071
|
+
price: /* @__PURE__ */ z.object({
|
|
1072
|
+
value: /* @__PURE__ */ z.string().describe(
|
|
1055
1073
|
"Monetary amount. Decimal string with a period as a decimal separator. For example, `'3.99'`. Can't be negative."
|
|
1056
1074
|
).optional(),
|
|
1057
|
-
currency: z.string().describe(
|
|
1075
|
+
currency: /* @__PURE__ */ z.string().describe(
|
|
1058
1076
|
"Currency code. Three-letter currency code in [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format. For example, `'USD'`."
|
|
1059
1077
|
).optional()
|
|
1060
1078
|
}).describe(
|
|
1061
1079
|
"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."
|
|
1062
1080
|
).optional(),
|
|
1063
|
-
freeTrialDays: z.number().int().describe(
|
|
1081
|
+
freeTrialDays: /* @__PURE__ */ z.number().int().describe(
|
|
1064
1082
|
"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."
|
|
1065
1083
|
).min(0).max(999).optional().nullable()
|
|
1066
1084
|
}),
|
|
1067
|
-
z.xor([
|
|
1068
|
-
z.object({
|
|
1069
|
-
subscription: z.never().optional(),
|
|
1070
|
-
singlePaymentForDuration: z.never().optional(),
|
|
1071
|
-
singlePaymentUnlimited: z.never().optional()
|
|
1085
|
+
/* @__PURE__ */ z.xor([
|
|
1086
|
+
/* @__PURE__ */ z.object({
|
|
1087
|
+
subscription: /* @__PURE__ */ z.never().optional(),
|
|
1088
|
+
singlePaymentForDuration: /* @__PURE__ */ z.never().optional(),
|
|
1089
|
+
singlePaymentUnlimited: /* @__PURE__ */ z.never().optional()
|
|
1072
1090
|
}),
|
|
1073
|
-
z.object({
|
|
1074
|
-
singlePaymentForDuration: z.never().optional(),
|
|
1075
|
-
singlePaymentUnlimited: z.never().optional(),
|
|
1076
|
-
subscription: z.object({
|
|
1077
|
-
cycleDuration: z.object({
|
|
1078
|
-
count: z.number().int().describe(
|
|
1091
|
+
/* @__PURE__ */ z.object({
|
|
1092
|
+
singlePaymentForDuration: /* @__PURE__ */ z.never().optional(),
|
|
1093
|
+
singlePaymentUnlimited: /* @__PURE__ */ z.never().optional(),
|
|
1094
|
+
subscription: /* @__PURE__ */ z.object({
|
|
1095
|
+
cycleDuration: /* @__PURE__ */ z.object({
|
|
1096
|
+
count: /* @__PURE__ */ z.number().int().describe(
|
|
1079
1097
|
"Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`."
|
|
1080
1098
|
).min(1).optional().nullable(),
|
|
1081
|
-
unit: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
|
|
1099
|
+
unit: /* @__PURE__ */ z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
|
|
1082
1100
|
}).describe(
|
|
1083
1101
|
"Number of payment cycles the subscription is valid for.\n`0` for unlimited plans or for plans that are valid until canceled."
|
|
1084
1102
|
).optional(),
|
|
1085
|
-
cycleCount: z.number().int().describe(
|
|
1103
|
+
cycleCount: /* @__PURE__ */ z.number().int().describe(
|
|
1086
1104
|
"Length of a payment cycle. For example, 1 month to have monthly payments.\nMultiply `cycleDuration`'s `count` by `cycleCount` to get the subscription duration.\nCurrently, only a value of `1` is supported."
|
|
1087
1105
|
).min(0).max(2e3).optional().nullable()
|
|
1088
1106
|
}).describe(
|
|
1089
1107
|
'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.'
|
|
1090
1108
|
)
|
|
1091
1109
|
}),
|
|
1092
|
-
z.object({
|
|
1093
|
-
subscription: z.never().optional(),
|
|
1094
|
-
singlePaymentUnlimited: z.never().optional(),
|
|
1095
|
-
singlePaymentForDuration: z.object({
|
|
1096
|
-
count: z.number().int().describe(
|
|
1110
|
+
/* @__PURE__ */ z.object({
|
|
1111
|
+
subscription: /* @__PURE__ */ z.never().optional(),
|
|
1112
|
+
singlePaymentUnlimited: /* @__PURE__ */ z.never().optional(),
|
|
1113
|
+
singlePaymentForDuration: /* @__PURE__ */ z.object({
|
|
1114
|
+
count: /* @__PURE__ */ z.number().int().describe(
|
|
1097
1115
|
"Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`."
|
|
1098
1116
|
).min(1).optional().nullable(),
|
|
1099
|
-
unit: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
|
|
1117
|
+
unit: /* @__PURE__ */ z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
|
|
1100
1118
|
}).describe(
|
|
1101
1119
|
"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."
|
|
1102
1120
|
)
|
|
1103
1121
|
}),
|
|
1104
|
-
z.object({
|
|
1105
|
-
subscription: z.never().optional(),
|
|
1106
|
-
singlePaymentForDuration: z.never().optional(),
|
|
1107
|
-
singlePaymentUnlimited: z.boolean().describe(
|
|
1122
|
+
/* @__PURE__ */ z.object({
|
|
1123
|
+
subscription: /* @__PURE__ */ z.never().optional(),
|
|
1124
|
+
singlePaymentForDuration: /* @__PURE__ */ z.never().optional(),
|
|
1125
|
+
singlePaymentUnlimited: /* @__PURE__ */ z.boolean().describe(
|
|
1108
1126
|
"Pricing model indicating the plan is paid in a single payment. The plan is valid until canceled."
|
|
1109
1127
|
)
|
|
1110
1128
|
})
|
|
1111
1129
|
])
|
|
1112
1130
|
).describe("Plan price, payment schedule, and expiration.").optional(),
|
|
1113
|
-
public: z.boolean().describe(
|
|
1131
|
+
public: /* @__PURE__ */ z.boolean().describe(
|
|
1114
1132
|
"Whether the plan is public (visible to site visitors and members)."
|
|
1115
1133
|
).optional().nullable(),
|
|
1116
|
-
archived: z.boolean().describe(
|
|
1134
|
+
archived: /* @__PURE__ */ z.boolean().describe(
|
|
1117
1135
|
"Whether the plan is archived. Archived plans are not visible and can't be purchased anymore, but existing purchases remain in effect."
|
|
1118
1136
|
).optional(),
|
|
1119
|
-
primary: z.boolean().describe("Whether the plan is marked as primary.").optional(),
|
|
1120
|
-
hasOrders: z.boolean().describe(
|
|
1137
|
+
primary: /* @__PURE__ */ z.boolean().describe("Whether the plan is marked as primary.").optional(),
|
|
1138
|
+
hasOrders: /* @__PURE__ */ z.boolean().describe(
|
|
1121
1139
|
"Whether the plan has any orders (including pending and unpaid orders)."
|
|
1122
1140
|
).optional(),
|
|
1123
|
-
_createdDate: z.date().describe("Date plan was created.").optional().nullable(),
|
|
1124
|
-
_updatedDate: z.date().describe("Date plan was last updated.").optional().nullable(),
|
|
1125
|
-
slug: z.string().describe(
|
|
1141
|
+
_createdDate: /* @__PURE__ */ z.date().describe("Date plan was created.").optional().nullable(),
|
|
1142
|
+
_updatedDate: /* @__PURE__ */ z.date().describe("Date plan was last updated.").optional().nullable(),
|
|
1143
|
+
slug: /* @__PURE__ */ z.string().describe(
|
|
1126
1144
|
"URL-friendly version of plan name. Unique across all plans in the same site."
|
|
1127
1145
|
).min(1).optional().nullable(),
|
|
1128
|
-
maxPurchasesPerBuyer: z.number().int().describe(
|
|
1146
|
+
maxPurchasesPerBuyer: /* @__PURE__ */ z.number().int().describe(
|
|
1129
1147
|
"Number of times the same buyer can purchase the plan. Currently limited to support:\n- Empty value or a value of `0`, meaning no limitation.\n- Value of `1`, meaning limited to 1 purchase per buyer."
|
|
1130
1148
|
).min(0).max(1).optional().nullable(),
|
|
1131
|
-
allowFutureStartDate: z.boolean().describe(
|
|
1149
|
+
allowFutureStartDate: /* @__PURE__ */ z.boolean().describe(
|
|
1132
1150
|
"Whether the buyer can start the plan at a later date. Defaults to false."
|
|
1133
1151
|
).optional().nullable(),
|
|
1134
|
-
buyerCanCancel: z.boolean().describe(
|
|
1152
|
+
buyerCanCancel: /* @__PURE__ */ z.boolean().describe(
|
|
1135
1153
|
"Whether the buyer is allowed to cancel their plan. Defaults to false.\nIf false, calling Request Cancellation returns an error."
|
|
1136
1154
|
).optional().nullable(),
|
|
1137
|
-
termsAndConditions: z.string().describe(
|
|
1155
|
+
termsAndConditions: /* @__PURE__ */ z.string().describe(
|
|
1138
1156
|
"Any terms and conditions that apply to the plan. This information is displayed during checkout."
|
|
1139
1157
|
).max(3e3).optional().nullable(),
|
|
1140
|
-
formId: z.string().describe(
|
|
1158
|
+
formId: /* @__PURE__ */ z.string().describe(
|
|
1141
1159
|
"ID of the form associated with the plan at checkout.\n\nLearn more about [forms](https://support.wix.com/en/article/wix-forms-an-overview)."
|
|
1142
1160
|
).regex(
|
|
1143
1161
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
@@ -1146,112 +1164,114 @@ var SetPlanVisibilityResponse = /* @__PURE__ */ z.object({
|
|
|
1146
1164
|
}).describe("Pricing plan.").optional()
|
|
1147
1165
|
});
|
|
1148
1166
|
var MakePlanPrimaryRequest = /* @__PURE__ */ z.object({
|
|
1149
|
-
_id: z.string().describe("ID of the pricing plan to set as the primary plan.").regex(
|
|
1167
|
+
_id: /* @__PURE__ */ z.string().describe("ID of the pricing plan to set as the primary plan.").regex(
|
|
1150
1168
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
1151
1169
|
"Must be a valid GUID"
|
|
1152
1170
|
)
|
|
1153
1171
|
});
|
|
1154
1172
|
var MakePlanPrimaryResponse = /* @__PURE__ */ z.object({
|
|
1155
|
-
plan: z.object({
|
|
1156
|
-
_id: z.string().describe("Plan ID.").regex(
|
|
1173
|
+
plan: /* @__PURE__ */ z.object({
|
|
1174
|
+
_id: /* @__PURE__ */ z.string().describe("Plan ID.").regex(
|
|
1157
1175
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
1158
1176
|
"Must be a valid GUID"
|
|
1159
1177
|
).optional(),
|
|
1160
|
-
name: z.string().describe("Plan name.").min(1).max(50).optional().nullable(),
|
|
1161
|
-
description: z.string().describe("Plan description.").max(450).optional().nullable(),
|
|
1162
|
-
perks: z.object({
|
|
1178
|
+
name: /* @__PURE__ */ z.string().describe("Plan name.").min(1).max(50).optional().nullable(),
|
|
1179
|
+
description: /* @__PURE__ */ z.string().describe("Plan description.").max(450).optional().nullable(),
|
|
1180
|
+
perks: /* @__PURE__ */ z.object({
|
|
1181
|
+
values: /* @__PURE__ */ z.array(/* @__PURE__ */ z.string()).max(500).optional()
|
|
1182
|
+
}).describe(
|
|
1163
1183
|
'List of text strings that promote what is included with this plan. For example, "Plenty of parking" or "Free gift on your birthday."'
|
|
1164
1184
|
).optional(),
|
|
1165
|
-
pricing: z.intersection(
|
|
1166
|
-
z.object({
|
|
1167
|
-
price: z.object({
|
|
1168
|
-
value: z.string().describe(
|
|
1185
|
+
pricing: /* @__PURE__ */ z.intersection(
|
|
1186
|
+
/* @__PURE__ */ z.object({
|
|
1187
|
+
price: /* @__PURE__ */ z.object({
|
|
1188
|
+
value: /* @__PURE__ */ z.string().describe(
|
|
1169
1189
|
"Monetary amount. Decimal string with a period as a decimal separator. For example, `'3.99'`. Can't be negative."
|
|
1170
1190
|
).optional(),
|
|
1171
|
-
currency: z.string().describe(
|
|
1191
|
+
currency: /* @__PURE__ */ z.string().describe(
|
|
1172
1192
|
"Currency code. Three-letter currency code in [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format. For example, `'USD'`."
|
|
1173
1193
|
).optional()
|
|
1174
1194
|
}).describe(
|
|
1175
1195
|
"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."
|
|
1176
1196
|
).optional(),
|
|
1177
|
-
freeTrialDays: z.number().int().describe(
|
|
1197
|
+
freeTrialDays: /* @__PURE__ */ z.number().int().describe(
|
|
1178
1198
|
"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."
|
|
1179
1199
|
).min(0).max(999).optional().nullable()
|
|
1180
1200
|
}),
|
|
1181
|
-
z.xor([
|
|
1182
|
-
z.object({
|
|
1183
|
-
subscription: z.never().optional(),
|
|
1184
|
-
singlePaymentForDuration: z.never().optional(),
|
|
1185
|
-
singlePaymentUnlimited: z.never().optional()
|
|
1201
|
+
/* @__PURE__ */ z.xor([
|
|
1202
|
+
/* @__PURE__ */ z.object({
|
|
1203
|
+
subscription: /* @__PURE__ */ z.never().optional(),
|
|
1204
|
+
singlePaymentForDuration: /* @__PURE__ */ z.never().optional(),
|
|
1205
|
+
singlePaymentUnlimited: /* @__PURE__ */ z.never().optional()
|
|
1186
1206
|
}),
|
|
1187
|
-
z.object({
|
|
1188
|
-
singlePaymentForDuration: z.never().optional(),
|
|
1189
|
-
singlePaymentUnlimited: z.never().optional(),
|
|
1190
|
-
subscription: z.object({
|
|
1191
|
-
cycleDuration: z.object({
|
|
1192
|
-
count: z.number().int().describe(
|
|
1207
|
+
/* @__PURE__ */ z.object({
|
|
1208
|
+
singlePaymentForDuration: /* @__PURE__ */ z.never().optional(),
|
|
1209
|
+
singlePaymentUnlimited: /* @__PURE__ */ z.never().optional(),
|
|
1210
|
+
subscription: /* @__PURE__ */ z.object({
|
|
1211
|
+
cycleDuration: /* @__PURE__ */ z.object({
|
|
1212
|
+
count: /* @__PURE__ */ z.number().int().describe(
|
|
1193
1213
|
"Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`."
|
|
1194
1214
|
).min(1).optional().nullable(),
|
|
1195
|
-
unit: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
|
|
1215
|
+
unit: /* @__PURE__ */ z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
|
|
1196
1216
|
}).describe(
|
|
1197
1217
|
"Number of payment cycles the subscription is valid for.\n`0` for unlimited plans or for plans that are valid until canceled."
|
|
1198
1218
|
).optional(),
|
|
1199
|
-
cycleCount: z.number().int().describe(
|
|
1219
|
+
cycleCount: /* @__PURE__ */ z.number().int().describe(
|
|
1200
1220
|
"Length of a payment cycle. For example, 1 month to have monthly payments.\nMultiply `cycleDuration`'s `count` by `cycleCount` to get the subscription duration.\nCurrently, only a value of `1` is supported."
|
|
1201
1221
|
).min(0).max(2e3).optional().nullable()
|
|
1202
1222
|
}).describe(
|
|
1203
1223
|
'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.'
|
|
1204
1224
|
)
|
|
1205
1225
|
}),
|
|
1206
|
-
z.object({
|
|
1207
|
-
subscription: z.never().optional(),
|
|
1208
|
-
singlePaymentUnlimited: z.never().optional(),
|
|
1209
|
-
singlePaymentForDuration: z.object({
|
|
1210
|
-
count: z.number().int().describe(
|
|
1226
|
+
/* @__PURE__ */ z.object({
|
|
1227
|
+
subscription: /* @__PURE__ */ z.never().optional(),
|
|
1228
|
+
singlePaymentUnlimited: /* @__PURE__ */ z.never().optional(),
|
|
1229
|
+
singlePaymentForDuration: /* @__PURE__ */ z.object({
|
|
1230
|
+
count: /* @__PURE__ */ z.number().int().describe(
|
|
1211
1231
|
"Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`."
|
|
1212
1232
|
).min(1).optional().nullable(),
|
|
1213
|
-
unit: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
|
|
1233
|
+
unit: /* @__PURE__ */ z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
|
|
1214
1234
|
}).describe(
|
|
1215
1235
|
"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."
|
|
1216
1236
|
)
|
|
1217
1237
|
}),
|
|
1218
|
-
z.object({
|
|
1219
|
-
subscription: z.never().optional(),
|
|
1220
|
-
singlePaymentForDuration: z.never().optional(),
|
|
1221
|
-
singlePaymentUnlimited: z.boolean().describe(
|
|
1238
|
+
/* @__PURE__ */ z.object({
|
|
1239
|
+
subscription: /* @__PURE__ */ z.never().optional(),
|
|
1240
|
+
singlePaymentForDuration: /* @__PURE__ */ z.never().optional(),
|
|
1241
|
+
singlePaymentUnlimited: /* @__PURE__ */ z.boolean().describe(
|
|
1222
1242
|
"Pricing model indicating the plan is paid in a single payment. The plan is valid until canceled."
|
|
1223
1243
|
)
|
|
1224
1244
|
})
|
|
1225
1245
|
])
|
|
1226
1246
|
).describe("Plan price, payment schedule, and expiration.").optional(),
|
|
1227
|
-
public: z.boolean().describe(
|
|
1247
|
+
public: /* @__PURE__ */ z.boolean().describe(
|
|
1228
1248
|
"Whether the plan is public (visible to site visitors and members)."
|
|
1229
1249
|
).optional().nullable(),
|
|
1230
|
-
archived: z.boolean().describe(
|
|
1250
|
+
archived: /* @__PURE__ */ z.boolean().describe(
|
|
1231
1251
|
"Whether the plan is archived. Archived plans are not visible and can't be purchased anymore, but existing purchases remain in effect."
|
|
1232
1252
|
).optional(),
|
|
1233
|
-
primary: z.boolean().describe("Whether the plan is marked as primary.").optional(),
|
|
1234
|
-
hasOrders: z.boolean().describe(
|
|
1253
|
+
primary: /* @__PURE__ */ z.boolean().describe("Whether the plan is marked as primary.").optional(),
|
|
1254
|
+
hasOrders: /* @__PURE__ */ z.boolean().describe(
|
|
1235
1255
|
"Whether the plan has any orders (including pending and unpaid orders)."
|
|
1236
1256
|
).optional(),
|
|
1237
|
-
_createdDate: z.date().describe("Date plan was created.").optional().nullable(),
|
|
1238
|
-
_updatedDate: z.date().describe("Date plan was last updated.").optional().nullable(),
|
|
1239
|
-
slug: z.string().describe(
|
|
1257
|
+
_createdDate: /* @__PURE__ */ z.date().describe("Date plan was created.").optional().nullable(),
|
|
1258
|
+
_updatedDate: /* @__PURE__ */ z.date().describe("Date plan was last updated.").optional().nullable(),
|
|
1259
|
+
slug: /* @__PURE__ */ z.string().describe(
|
|
1240
1260
|
"URL-friendly version of plan name. Unique across all plans in the same site."
|
|
1241
1261
|
).min(1).optional().nullable(),
|
|
1242
|
-
maxPurchasesPerBuyer: z.number().int().describe(
|
|
1262
|
+
maxPurchasesPerBuyer: /* @__PURE__ */ z.number().int().describe(
|
|
1243
1263
|
"Number of times the same buyer can purchase the plan. Currently limited to support:\n- Empty value or a value of `0`, meaning no limitation.\n- Value of `1`, meaning limited to 1 purchase per buyer."
|
|
1244
1264
|
).min(0).max(1).optional().nullable(),
|
|
1245
|
-
allowFutureStartDate: z.boolean().describe(
|
|
1265
|
+
allowFutureStartDate: /* @__PURE__ */ z.boolean().describe(
|
|
1246
1266
|
"Whether the buyer can start the plan at a later date. Defaults to false."
|
|
1247
1267
|
).optional().nullable(),
|
|
1248
|
-
buyerCanCancel: z.boolean().describe(
|
|
1268
|
+
buyerCanCancel: /* @__PURE__ */ z.boolean().describe(
|
|
1249
1269
|
"Whether the buyer is allowed to cancel their plan. Defaults to false.\nIf false, calling Request Cancellation returns an error."
|
|
1250
1270
|
).optional().nullable(),
|
|
1251
|
-
termsAndConditions: z.string().describe(
|
|
1271
|
+
termsAndConditions: /* @__PURE__ */ z.string().describe(
|
|
1252
1272
|
"Any terms and conditions that apply to the plan. This information is displayed during checkout."
|
|
1253
1273
|
).max(3e3).optional().nullable(),
|
|
1254
|
-
formId: z.string().describe(
|
|
1274
|
+
formId: /* @__PURE__ */ z.string().describe(
|
|
1255
1275
|
"ID of the form associated with the plan at checkout.\n\nLearn more about [forms](https://support.wix.com/en/article/wix-forms-an-overview)."
|
|
1256
1276
|
).regex(
|
|
1257
1277
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
@@ -1262,112 +1282,114 @@ var MakePlanPrimaryResponse = /* @__PURE__ */ z.object({
|
|
|
1262
1282
|
var ClearPrimaryRequest = /* @__PURE__ */ z.object({});
|
|
1263
1283
|
var ClearPrimaryResponse = /* @__PURE__ */ z.object({});
|
|
1264
1284
|
var ArchivePlanRequest = /* @__PURE__ */ z.object({
|
|
1265
|
-
_id: z.string().describe("ID of the active plan to archive. ").regex(
|
|
1285
|
+
_id: /* @__PURE__ */ z.string().describe("ID of the active plan to archive. ").regex(
|
|
1266
1286
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
1267
1287
|
"Must be a valid GUID"
|
|
1268
1288
|
)
|
|
1269
1289
|
});
|
|
1270
1290
|
var ArchivePlanResponse = /* @__PURE__ */ z.object({
|
|
1271
|
-
plan: z.object({
|
|
1272
|
-
_id: z.string().describe("Plan ID.").regex(
|
|
1291
|
+
plan: /* @__PURE__ */ z.object({
|
|
1292
|
+
_id: /* @__PURE__ */ z.string().describe("Plan ID.").regex(
|
|
1273
1293
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
1274
1294
|
"Must be a valid GUID"
|
|
1275
1295
|
).optional(),
|
|
1276
|
-
name: z.string().describe("Plan name.").min(1).max(50).optional().nullable(),
|
|
1277
|
-
description: z.string().describe("Plan description.").max(450).optional().nullable(),
|
|
1278
|
-
perks: z.object({
|
|
1296
|
+
name: /* @__PURE__ */ z.string().describe("Plan name.").min(1).max(50).optional().nullable(),
|
|
1297
|
+
description: /* @__PURE__ */ z.string().describe("Plan description.").max(450).optional().nullable(),
|
|
1298
|
+
perks: /* @__PURE__ */ z.object({
|
|
1299
|
+
values: /* @__PURE__ */ z.array(/* @__PURE__ */ z.string()).max(500).optional()
|
|
1300
|
+
}).describe(
|
|
1279
1301
|
'List of text strings that promote what is included with this plan. For example, "Plenty of parking" or "Free gift on your birthday."'
|
|
1280
1302
|
).optional(),
|
|
1281
|
-
pricing: z.intersection(
|
|
1282
|
-
z.object({
|
|
1283
|
-
price: z.object({
|
|
1284
|
-
value: z.string().describe(
|
|
1303
|
+
pricing: /* @__PURE__ */ z.intersection(
|
|
1304
|
+
/* @__PURE__ */ z.object({
|
|
1305
|
+
price: /* @__PURE__ */ z.object({
|
|
1306
|
+
value: /* @__PURE__ */ z.string().describe(
|
|
1285
1307
|
"Monetary amount. Decimal string with a period as a decimal separator. For example, `'3.99'`. Can't be negative."
|
|
1286
1308
|
).optional(),
|
|
1287
|
-
currency: z.string().describe(
|
|
1309
|
+
currency: /* @__PURE__ */ z.string().describe(
|
|
1288
1310
|
"Currency code. Three-letter currency code in [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format. For example, `'USD'`."
|
|
1289
1311
|
).optional()
|
|
1290
1312
|
}).describe(
|
|
1291
1313
|
"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."
|
|
1292
1314
|
).optional(),
|
|
1293
|
-
freeTrialDays: z.number().int().describe(
|
|
1315
|
+
freeTrialDays: /* @__PURE__ */ z.number().int().describe(
|
|
1294
1316
|
"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."
|
|
1295
1317
|
).min(0).max(999).optional().nullable()
|
|
1296
1318
|
}),
|
|
1297
|
-
z.xor([
|
|
1298
|
-
z.object({
|
|
1299
|
-
subscription: z.never().optional(),
|
|
1300
|
-
singlePaymentForDuration: z.never().optional(),
|
|
1301
|
-
singlePaymentUnlimited: z.never().optional()
|
|
1319
|
+
/* @__PURE__ */ z.xor([
|
|
1320
|
+
/* @__PURE__ */ z.object({
|
|
1321
|
+
subscription: /* @__PURE__ */ z.never().optional(),
|
|
1322
|
+
singlePaymentForDuration: /* @__PURE__ */ z.never().optional(),
|
|
1323
|
+
singlePaymentUnlimited: /* @__PURE__ */ z.never().optional()
|
|
1302
1324
|
}),
|
|
1303
|
-
z.object({
|
|
1304
|
-
singlePaymentForDuration: z.never().optional(),
|
|
1305
|
-
singlePaymentUnlimited: z.never().optional(),
|
|
1306
|
-
subscription: z.object({
|
|
1307
|
-
cycleDuration: z.object({
|
|
1308
|
-
count: z.number().int().describe(
|
|
1325
|
+
/* @__PURE__ */ z.object({
|
|
1326
|
+
singlePaymentForDuration: /* @__PURE__ */ z.never().optional(),
|
|
1327
|
+
singlePaymentUnlimited: /* @__PURE__ */ z.never().optional(),
|
|
1328
|
+
subscription: /* @__PURE__ */ z.object({
|
|
1329
|
+
cycleDuration: /* @__PURE__ */ z.object({
|
|
1330
|
+
count: /* @__PURE__ */ z.number().int().describe(
|
|
1309
1331
|
"Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`."
|
|
1310
1332
|
).min(1).optional().nullable(),
|
|
1311
|
-
unit: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
|
|
1333
|
+
unit: /* @__PURE__ */ z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
|
|
1312
1334
|
}).describe(
|
|
1313
1335
|
"Number of payment cycles the subscription is valid for.\n`0` for unlimited plans or for plans that are valid until canceled."
|
|
1314
1336
|
).optional(),
|
|
1315
|
-
cycleCount: z.number().int().describe(
|
|
1337
|
+
cycleCount: /* @__PURE__ */ z.number().int().describe(
|
|
1316
1338
|
"Length of a payment cycle. For example, 1 month to have monthly payments.\nMultiply `cycleDuration`'s `count` by `cycleCount` to get the subscription duration.\nCurrently, only a value of `1` is supported."
|
|
1317
1339
|
).min(0).max(2e3).optional().nullable()
|
|
1318
1340
|
}).describe(
|
|
1319
1341
|
'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.'
|
|
1320
1342
|
)
|
|
1321
1343
|
}),
|
|
1322
|
-
z.object({
|
|
1323
|
-
subscription: z.never().optional(),
|
|
1324
|
-
singlePaymentUnlimited: z.never().optional(),
|
|
1325
|
-
singlePaymentForDuration: z.object({
|
|
1326
|
-
count: z.number().int().describe(
|
|
1344
|
+
/* @__PURE__ */ z.object({
|
|
1345
|
+
subscription: /* @__PURE__ */ z.never().optional(),
|
|
1346
|
+
singlePaymentUnlimited: /* @__PURE__ */ z.never().optional(),
|
|
1347
|
+
singlePaymentForDuration: /* @__PURE__ */ z.object({
|
|
1348
|
+
count: /* @__PURE__ */ z.number().int().describe(
|
|
1327
1349
|
"Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`."
|
|
1328
1350
|
).min(1).optional().nullable(),
|
|
1329
|
-
unit: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
|
|
1351
|
+
unit: /* @__PURE__ */ z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
|
|
1330
1352
|
}).describe(
|
|
1331
1353
|
"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."
|
|
1332
1354
|
)
|
|
1333
1355
|
}),
|
|
1334
|
-
z.object({
|
|
1335
|
-
subscription: z.never().optional(),
|
|
1336
|
-
singlePaymentForDuration: z.never().optional(),
|
|
1337
|
-
singlePaymentUnlimited: z.boolean().describe(
|
|
1356
|
+
/* @__PURE__ */ z.object({
|
|
1357
|
+
subscription: /* @__PURE__ */ z.never().optional(),
|
|
1358
|
+
singlePaymentForDuration: /* @__PURE__ */ z.never().optional(),
|
|
1359
|
+
singlePaymentUnlimited: /* @__PURE__ */ z.boolean().describe(
|
|
1338
1360
|
"Pricing model indicating the plan is paid in a single payment. The plan is valid until canceled."
|
|
1339
1361
|
)
|
|
1340
1362
|
})
|
|
1341
1363
|
])
|
|
1342
1364
|
).describe("Plan price, payment schedule, and expiration.").optional(),
|
|
1343
|
-
public: z.boolean().describe(
|
|
1365
|
+
public: /* @__PURE__ */ z.boolean().describe(
|
|
1344
1366
|
"Whether the plan is public (visible to site visitors and members)."
|
|
1345
1367
|
).optional().nullable(),
|
|
1346
|
-
archived: z.boolean().describe(
|
|
1368
|
+
archived: /* @__PURE__ */ z.boolean().describe(
|
|
1347
1369
|
"Whether the plan is archived. Archived plans are not visible and can't be purchased anymore, but existing purchases remain in effect."
|
|
1348
1370
|
).optional(),
|
|
1349
|
-
primary: z.boolean().describe("Whether the plan is marked as primary.").optional(),
|
|
1350
|
-
hasOrders: z.boolean().describe(
|
|
1371
|
+
primary: /* @__PURE__ */ z.boolean().describe("Whether the plan is marked as primary.").optional(),
|
|
1372
|
+
hasOrders: /* @__PURE__ */ z.boolean().describe(
|
|
1351
1373
|
"Whether the plan has any orders (including pending and unpaid orders)."
|
|
1352
1374
|
).optional(),
|
|
1353
|
-
_createdDate: z.date().describe("Date plan was created.").optional().nullable(),
|
|
1354
|
-
_updatedDate: z.date().describe("Date plan was last updated.").optional().nullable(),
|
|
1355
|
-
slug: z.string().describe(
|
|
1375
|
+
_createdDate: /* @__PURE__ */ z.date().describe("Date plan was created.").optional().nullable(),
|
|
1376
|
+
_updatedDate: /* @__PURE__ */ z.date().describe("Date plan was last updated.").optional().nullable(),
|
|
1377
|
+
slug: /* @__PURE__ */ z.string().describe(
|
|
1356
1378
|
"URL-friendly version of plan name. Unique across all plans in the same site."
|
|
1357
1379
|
).min(1).optional().nullable(),
|
|
1358
|
-
maxPurchasesPerBuyer: z.number().int().describe(
|
|
1380
|
+
maxPurchasesPerBuyer: /* @__PURE__ */ z.number().int().describe(
|
|
1359
1381
|
"Number of times the same buyer can purchase the plan. Currently limited to support:\n- Empty value or a value of `0`, meaning no limitation.\n- Value of `1`, meaning limited to 1 purchase per buyer."
|
|
1360
1382
|
).min(0).max(1).optional().nullable(),
|
|
1361
|
-
allowFutureStartDate: z.boolean().describe(
|
|
1383
|
+
allowFutureStartDate: /* @__PURE__ */ z.boolean().describe(
|
|
1362
1384
|
"Whether the buyer can start the plan at a later date. Defaults to false."
|
|
1363
1385
|
).optional().nullable(),
|
|
1364
|
-
buyerCanCancel: z.boolean().describe(
|
|
1386
|
+
buyerCanCancel: /* @__PURE__ */ z.boolean().describe(
|
|
1365
1387
|
"Whether the buyer is allowed to cancel their plan. Defaults to false.\nIf false, calling Request Cancellation returns an error."
|
|
1366
1388
|
).optional().nullable(),
|
|
1367
|
-
termsAndConditions: z.string().describe(
|
|
1389
|
+
termsAndConditions: /* @__PURE__ */ z.string().describe(
|
|
1368
1390
|
"Any terms and conditions that apply to the plan. This information is displayed during checkout."
|
|
1369
1391
|
).max(3e3).optional().nullable(),
|
|
1370
|
-
formId: z.string().describe(
|
|
1392
|
+
formId: /* @__PURE__ */ z.string().describe(
|
|
1371
1393
|
"ID of the form associated with the plan at checkout.\n\nLearn more about [forms](https://support.wix.com/en/article/wix-forms-an-overview)."
|
|
1372
1394
|
).regex(
|
|
1373
1395
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|