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