@wix/auto_sdk_pricing-plans_orders 1.0.123 → 1.0.125
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/index.d.ts +129 -129
- package/build/cjs/index.js +629 -629
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +787 -787
- package/build/cjs/index.typings.js +502 -502
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +484 -484
- package/build/cjs/meta.js +388 -388
- package/build/cjs/meta.js.map +1 -1
- package/build/cjs/schemas.d.ts +199 -199
- package/build/cjs/schemas.js +1711 -1699
- package/build/cjs/schemas.js.map +1 -1
- package/build/es/index.d.mts +129 -129
- package/build/es/index.mjs +629 -629
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +787 -787
- package/build/es/index.typings.mjs +502 -502
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +484 -484
- package/build/es/meta.mjs +388 -388
- package/build/es/meta.mjs.map +1 -1
- package/build/es/schemas.d.mts +199 -199
- package/build/es/schemas.mjs +1711 -1699
- package/build/es/schemas.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +129 -129
- package/build/internal/cjs/index.typings.d.ts +813 -813
- package/build/internal/cjs/meta.d.ts +500 -500
- package/build/internal/cjs/schemas.d.ts +199 -199
- package/build/internal/es/index.d.mts +129 -129
- package/build/internal/es/index.typings.d.mts +813 -813
- package/build/internal/es/meta.d.mts +500 -500
- package/build/internal/es/schemas.d.mts +199 -199
- package/package.json +2 -2
- package/build/internal/cjs/index.js +0 -2066
- package/build/internal/cjs/index.js.map +0 -1
- package/build/internal/cjs/index.typings.js +0 -1531
- package/build/internal/cjs/index.typings.js.map +0 -1
- package/build/internal/cjs/meta.js +0 -1357
- package/build/internal/cjs/meta.js.map +0 -1
- package/build/internal/cjs/schemas.js +0 -3112
- package/build/internal/cjs/schemas.js.map +0 -1
- package/build/internal/es/index.mjs +0 -2003
- package/build/internal/es/index.mjs.map +0 -1
- package/build/internal/es/index.typings.mjs +0 -1481
- package/build/internal/es/index.typings.mjs.map +0 -1
- package/build/internal/es/meta.mjs +0 -1304
- package/build/internal/es/meta.mjs.map +0 -1
- package/build/internal/es/schemas.mjs +0 -3046
- package/build/internal/es/schemas.mjs.map +0 -1
package/build/cjs/schemas.js
CHANGED
|
@@ -65,43 +65,59 @@ module.exports = __toCommonJS(schemas_exports);
|
|
|
65
65
|
|
|
66
66
|
// src/pricing-plans-v2-order-orders.schemas.ts
|
|
67
67
|
var z = __toESM(require("zod"));
|
|
68
|
-
var
|
|
69
|
-
|
|
68
|
+
var CreateOnlineOrderRequest = /* @__PURE__ */ z.object({
|
|
69
|
+
planId: /* @__PURE__ */ z.string().describe("Plan ID.").regex(
|
|
70
70
|
/^[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}$/,
|
|
71
71
|
"Must be a valid GUID"
|
|
72
72
|
),
|
|
73
|
-
options: z.object({
|
|
73
|
+
options: /* @__PURE__ */ z.object({
|
|
74
|
+
startDate: /* @__PURE__ */ z.date().describe(
|
|
75
|
+
"Start date and time for the plan of the online order in a `YYYY-MM-DDThh:mm[:ss][.sss]Z` format.\n\nDefault: Current date and time."
|
|
76
|
+
).optional().nullable(),
|
|
77
|
+
couponCode: /* @__PURE__ */ z.string().describe("Coupon code to apply.").min(1).max(20).optional().nullable(),
|
|
78
|
+
onBehalf: /* @__PURE__ */ z.object({
|
|
79
|
+
memberId: /* @__PURE__ */ z.string().describe("Member ID.").regex(
|
|
80
|
+
/^[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}$/,
|
|
81
|
+
"Must be a valid GUID"
|
|
82
|
+
),
|
|
83
|
+
orderMethod: /* @__PURE__ */ z.enum(["UNKNOWN", "MOTO", "POS"]).optional()
|
|
84
|
+
}).describe("Provided if checkout is initiated on buyer's behalf.").optional(),
|
|
85
|
+
submissionId: /* @__PURE__ */ z.string().describe("Submission ID of the form submitted with this order.").regex(
|
|
86
|
+
/^[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}$/,
|
|
87
|
+
"Must be a valid GUID"
|
|
88
|
+
).optional().nullable()
|
|
89
|
+
}).optional()
|
|
74
90
|
});
|
|
75
|
-
var
|
|
76
|
-
order: z.object({
|
|
77
|
-
_id: z.string().describe("Order ID.").regex(
|
|
91
|
+
var CreateOnlineOrderResponse = /* @__PURE__ */ z.object({
|
|
92
|
+
order: /* @__PURE__ */ z.object({
|
|
93
|
+
_id: /* @__PURE__ */ z.string().describe("Order ID.").regex(
|
|
78
94
|
/^[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}$/,
|
|
79
95
|
"Must be a valid GUID"
|
|
80
96
|
).optional(),
|
|
81
|
-
planId: z.string().describe(
|
|
97
|
+
planId: /* @__PURE__ */ z.string().describe(
|
|
82
98
|
"ID of the plan purchased with the order, from the Plans API."
|
|
83
99
|
).regex(
|
|
84
100
|
/^[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}$/,
|
|
85
101
|
"Must be a valid GUID"
|
|
86
102
|
).optional(),
|
|
87
|
-
subscriptionId: z.string().describe(
|
|
103
|
+
subscriptionId: /* @__PURE__ */ z.string().describe(
|
|
88
104
|
"ID of the related Wix subscription.\n\nEvery pricing plan order corresponds to a Wix subscription, including orders for single payment plans. Learn more in\na [Pricing Plans overview](https://support.wix.com/en/article/pricing-plans-an-overview#create-plans-to-suit-your-business)."
|
|
89
105
|
).regex(
|
|
90
106
|
/^[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}$/,
|
|
91
107
|
"Must be a valid GUID"
|
|
92
108
|
).optional(),
|
|
93
|
-
wixPayOrderId: z.string().describe(
|
|
109
|
+
wixPayOrderId: /* @__PURE__ */ z.string().describe(
|
|
94
110
|
"Wix Pay order ID.\n\nProvided by Wix whether the order is created online or offline. The field is omitted when the order is free."
|
|
95
111
|
).regex(
|
|
96
112
|
/^[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}$/,
|
|
97
113
|
"Must be a valid GUID"
|
|
98
114
|
).optional().nullable(),
|
|
99
|
-
buyer: z.object({
|
|
100
|
-
memberId: z.string().describe("Member ID for a Wix site member, from the Members API.").regex(
|
|
115
|
+
buyer: /* @__PURE__ */ z.object({
|
|
116
|
+
memberId: /* @__PURE__ */ z.string().describe("Member ID for a Wix site member, from the Members API.").regex(
|
|
101
117
|
/^[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}$/,
|
|
102
118
|
"Must be a valid GUID"
|
|
103
119
|
).optional(),
|
|
104
|
-
contactId: z.string().describe(
|
|
120
|
+
contactId: /* @__PURE__ */ z.string().describe(
|
|
105
121
|
"Contact ID for a Wix site contact, from the Contacts API."
|
|
106
122
|
).regex(
|
|
107
123
|
/^[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}$/,
|
|
@@ -110,40 +126,40 @@ var ManagementGetOrderResponse = /* @__PURE__ */ z.object({
|
|
|
110
126
|
}).describe(
|
|
111
127
|
"The buyer's IDs. Includes `memberId` and `contactId`.\n\nCurrently, Pricing Plan purchases are limited to members only. `contactId` is returned,\nbut a buyer will not be able to purchase a plan without a `memberId`."
|
|
112
128
|
).optional(),
|
|
113
|
-
priceDetails: z.intersection(
|
|
114
|
-
z.object({
|
|
115
|
-
subtotal: z.string().describe(
|
|
129
|
+
priceDetails: /* @__PURE__ */ z.intersection(
|
|
130
|
+
/* @__PURE__ */ z.object({
|
|
131
|
+
subtotal: /* @__PURE__ */ z.string().describe(
|
|
116
132
|
'Price of the order excluding tax, specified as a monetary amount. for example, `"9.99"`.'
|
|
117
133
|
).optional(),
|
|
118
|
-
discount: z.string().describe("Total discount applied.").optional(),
|
|
119
|
-
tax: z.object({
|
|
120
|
-
name: z.string().describe("Name of the tax. For example, VAT.").optional(),
|
|
121
|
-
includedInPrice: z.boolean().describe(
|
|
134
|
+
discount: /* @__PURE__ */ z.string().describe("Total discount applied.").optional(),
|
|
135
|
+
tax: /* @__PURE__ */ z.object({
|
|
136
|
+
name: /* @__PURE__ */ z.string().describe("Name of the tax. For example, VAT.").optional(),
|
|
137
|
+
includedInPrice: /* @__PURE__ */ z.boolean().describe(
|
|
122
138
|
"Whether tax is included in the original price. When `false`, tax is added at checkout."
|
|
123
139
|
).optional(),
|
|
124
|
-
rate: z.string().describe(
|
|
140
|
+
rate: /* @__PURE__ */ z.string().describe(
|
|
125
141
|
'Tax rate percentage, as a number between 0 and 100. For example, a 7% tax rate is `"7.00"`.'
|
|
126
142
|
).optional(),
|
|
127
|
-
amount: z.string().describe(
|
|
143
|
+
amount: /* @__PURE__ */ z.string().describe(
|
|
128
144
|
'Total tax, specified as a monetary amount. For example, `"3.99"`.'
|
|
129
145
|
).optional()
|
|
130
146
|
}).describe("Tax applied.").optional(),
|
|
131
|
-
total: z.string().describe(
|
|
147
|
+
total: /* @__PURE__ */ z.string().describe(
|
|
132
148
|
'Price after tax and discount is applied, specified as a monetary amount. For example, `"13.98"`.\n\nIf no tax is applied, the amount is the same as `subtotal`.'
|
|
133
149
|
).optional(),
|
|
134
|
-
planPrice: z.string().describe("Plan price as it was at the moment of order creation.").optional(),
|
|
135
|
-
currency: z.string().describe(
|
|
150
|
+
planPrice: /* @__PURE__ */ z.string().describe("Plan price as it was at the moment of order creation.").optional(),
|
|
151
|
+
currency: /* @__PURE__ */ z.string().describe(
|
|
136
152
|
"Currency code. Must be valid ISO 4217 currency code (e.g., USD)."
|
|
137
153
|
).optional(),
|
|
138
|
-
freeTrialDays: z.number().int().describe(
|
|
154
|
+
freeTrialDays: /* @__PURE__ */ z.number().int().describe(
|
|
139
155
|
"Free trial period for the order in days. Only available for recurring plans."
|
|
140
156
|
).min(1).max(999).optional().nullable(),
|
|
141
|
-
coupon: z.object({
|
|
142
|
-
code: z.string().describe("Code of the applied coupon.").min(1).max(20).optional(),
|
|
143
|
-
amount: z.string().describe(
|
|
157
|
+
coupon: /* @__PURE__ */ z.object({
|
|
158
|
+
code: /* @__PURE__ */ z.string().describe("Code of the applied coupon.").min(1).max(20).optional(),
|
|
159
|
+
amount: /* @__PURE__ */ z.string().describe(
|
|
144
160
|
"Total discount of the coupon, as a monetary amount."
|
|
145
161
|
).optional(),
|
|
146
|
-
_id: z.string().describe("Coupon ID.").regex(
|
|
162
|
+
_id: /* @__PURE__ */ z.string().describe("Coupon ID.").regex(
|
|
147
163
|
/^[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}$/,
|
|
148
164
|
"Must be a valid GUID"
|
|
149
165
|
).optional()
|
|
@@ -151,45 +167,45 @@ var ManagementGetOrderResponse = /* @__PURE__ */ z.object({
|
|
|
151
167
|
"Coupon applied to the order. Empty means no coupon was applied."
|
|
152
168
|
).optional()
|
|
153
169
|
}),
|
|
154
|
-
z.xor([
|
|
155
|
-
z.object({
|
|
156
|
-
subscription: z.never().optional(),
|
|
157
|
-
singlePaymentForDuration: z.never().optional(),
|
|
158
|
-
singlePaymentUnlimited: z.never().optional()
|
|
170
|
+
/* @__PURE__ */ z.xor([
|
|
171
|
+
/* @__PURE__ */ z.object({
|
|
172
|
+
subscription: /* @__PURE__ */ z.never().optional(),
|
|
173
|
+
singlePaymentForDuration: /* @__PURE__ */ z.never().optional(),
|
|
174
|
+
singlePaymentUnlimited: /* @__PURE__ */ z.never().optional()
|
|
159
175
|
}),
|
|
160
|
-
z.object({
|
|
161
|
-
singlePaymentForDuration: z.never().optional(),
|
|
162
|
-
singlePaymentUnlimited: z.never().optional(),
|
|
163
|
-
subscription: z.object({
|
|
164
|
-
cycleDuration: z.object({
|
|
165
|
-
count: z.number().int().describe(
|
|
176
|
+
/* @__PURE__ */ z.object({
|
|
177
|
+
singlePaymentForDuration: /* @__PURE__ */ z.never().optional(),
|
|
178
|
+
singlePaymentUnlimited: /* @__PURE__ */ z.never().optional(),
|
|
179
|
+
subscription: /* @__PURE__ */ z.object({
|
|
180
|
+
cycleDuration: /* @__PURE__ */ z.object({
|
|
181
|
+
count: /* @__PURE__ */ z.number().int().describe(
|
|
166
182
|
"Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`."
|
|
167
183
|
).min(1).optional().nullable(),
|
|
168
|
-
unit: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
|
|
184
|
+
unit: /* @__PURE__ */ z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
|
|
169
185
|
}).describe(
|
|
170
186
|
"Number of payment cycles the subscription is valid for.\n`0` for unlimited plans or for plans that are valid until canceled."
|
|
171
187
|
).optional(),
|
|
172
|
-
cycleCount: z.number().int().describe(
|
|
188
|
+
cycleCount: /* @__PURE__ */ z.number().int().describe(
|
|
173
189
|
"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."
|
|
174
190
|
).min(0).max(2e3).optional().nullable()
|
|
175
191
|
}).describe("Order has recurring payments.")
|
|
176
192
|
}),
|
|
177
|
-
z.object({
|
|
178
|
-
subscription: z.never().optional(),
|
|
179
|
-
singlePaymentUnlimited: z.never().optional(),
|
|
180
|
-
singlePaymentForDuration: z.object({
|
|
181
|
-
count: z.number().int().describe(
|
|
193
|
+
/* @__PURE__ */ z.object({
|
|
194
|
+
subscription: /* @__PURE__ */ z.never().optional(),
|
|
195
|
+
singlePaymentUnlimited: /* @__PURE__ */ z.never().optional(),
|
|
196
|
+
singlePaymentForDuration: /* @__PURE__ */ z.object({
|
|
197
|
+
count: /* @__PURE__ */ z.number().int().describe(
|
|
182
198
|
"Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`."
|
|
183
199
|
).min(1).optional().nullable(),
|
|
184
|
-
unit: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
|
|
200
|
+
unit: /* @__PURE__ */ z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
|
|
185
201
|
}).describe(
|
|
186
202
|
"One-time payment. Order is valid for a specified duration."
|
|
187
203
|
)
|
|
188
204
|
}),
|
|
189
|
-
z.object({
|
|
190
|
-
subscription: z.never().optional(),
|
|
191
|
-
singlePaymentForDuration: z.never().optional(),
|
|
192
|
-
singlePaymentUnlimited: z.boolean().describe(
|
|
205
|
+
/* @__PURE__ */ z.object({
|
|
206
|
+
subscription: /* @__PURE__ */ z.never().optional(),
|
|
207
|
+
singlePaymentForDuration: /* @__PURE__ */ z.never().optional(),
|
|
208
|
+
singlePaymentUnlimited: /* @__PURE__ */ z.boolean().describe(
|
|
193
209
|
"One-time payment. Order is valid until it is canceled."
|
|
194
210
|
)
|
|
195
211
|
})
|
|
@@ -197,105 +213,105 @@ var ManagementGetOrderResponse = /* @__PURE__ */ z.object({
|
|
|
197
213
|
).describe(
|
|
198
214
|
"__Deprecated.__ Use `pricing` instead. This property will be removed on September 30, 2022."
|
|
199
215
|
).optional(),
|
|
200
|
-
pricing: z.intersection(
|
|
201
|
-
z.object({
|
|
202
|
-
prices: z.array(
|
|
203
|
-
z.object({
|
|
204
|
-
duration: z.object({
|
|
205
|
-
cycleFrom: z.number().int().describe(
|
|
216
|
+
pricing: /* @__PURE__ */ z.intersection(
|
|
217
|
+
/* @__PURE__ */ z.object({
|
|
218
|
+
prices: /* @__PURE__ */ z.array(
|
|
219
|
+
/* @__PURE__ */ z.object({
|
|
220
|
+
duration: /* @__PURE__ */ z.object({
|
|
221
|
+
cycleFrom: /* @__PURE__ */ z.number().int().describe(
|
|
206
222
|
"Price starts to apply with this cycle.\n\n`1` is the first payment cycle for all pricing models."
|
|
207
223
|
).optional(),
|
|
208
|
-
numberOfCycles: z.number().int().describe(
|
|
224
|
+
numberOfCycles: /* @__PURE__ */ z.number().int().describe(
|
|
209
225
|
"Amount of cycles to apply price for.\n\nFor `subscription` pricing models with a finite number of cycles, the `numberOfCycles` is the same as `pricing.subscription.cycleCount`.\n\nFor `subscription` pricing models that are unlimited or until-canceled, the `numberOfCycles` is not returned.\n\nFor `singlePaymentForDuration` and `singlePaymentUnlimited` pricing models, the `numberOfCycles` is `1`."
|
|
210
226
|
).optional().nullable()
|
|
211
227
|
}).describe(
|
|
212
228
|
"Cycle duration to apply `price` for.\n\nUse with all pricing models.\nCan apply the same price to multiple payment cycles."
|
|
213
229
|
).optional(),
|
|
214
|
-
price: z.object({
|
|
215
|
-
subtotal: z.string().describe(
|
|
230
|
+
price: /* @__PURE__ */ z.object({
|
|
231
|
+
subtotal: /* @__PURE__ */ z.string().describe(
|
|
216
232
|
'Price of the order excluding tax, specified as a monetary amount. For example, `"9.99"`.'
|
|
217
233
|
).optional(),
|
|
218
|
-
coupon: z.object({
|
|
219
|
-
code: z.string().describe("Code of the applied coupon.").min(1).max(20).optional(),
|
|
220
|
-
amount: z.string().describe(
|
|
234
|
+
coupon: /* @__PURE__ */ z.object({
|
|
235
|
+
code: /* @__PURE__ */ z.string().describe("Code of the applied coupon.").min(1).max(20).optional(),
|
|
236
|
+
amount: /* @__PURE__ */ z.string().describe(
|
|
221
237
|
"Total discount of the coupon, as a monetary amount."
|
|
222
238
|
).optional(),
|
|
223
|
-
_id: z.string().describe("Coupon ID.").regex(
|
|
239
|
+
_id: /* @__PURE__ */ z.string().describe("Coupon ID.").regex(
|
|
224
240
|
/^[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}$/,
|
|
225
241
|
"Must be a valid GUID"
|
|
226
242
|
).optional()
|
|
227
243
|
}).describe(
|
|
228
244
|
"Coupon applied to the order, from the Coupons API."
|
|
229
245
|
).optional(),
|
|
230
|
-
discount: z.string().describe("Total discount applied to the order.").optional(),
|
|
231
|
-
tax: z.object({
|
|
232
|
-
name: z.string().describe("Name of the tax. For example, VAT.").optional(),
|
|
233
|
-
includedInPrice: z.boolean().describe(
|
|
246
|
+
discount: /* @__PURE__ */ z.string().describe("Total discount applied to the order.").optional(),
|
|
247
|
+
tax: /* @__PURE__ */ z.object({
|
|
248
|
+
name: /* @__PURE__ */ z.string().describe("Name of the tax. For example, VAT.").optional(),
|
|
249
|
+
includedInPrice: /* @__PURE__ */ z.boolean().describe(
|
|
234
250
|
"Whether tax is included in the original price. When `false`, tax is added at checkout."
|
|
235
251
|
).optional(),
|
|
236
|
-
rate: z.string().describe(
|
|
252
|
+
rate: /* @__PURE__ */ z.string().describe(
|
|
237
253
|
'Tax rate percentage, as a number between 0 and 100. For example, a 7% tax rate is `"7.00"`.'
|
|
238
254
|
).optional(),
|
|
239
|
-
amount: z.string().describe(
|
|
255
|
+
amount: /* @__PURE__ */ z.string().describe(
|
|
240
256
|
'Total tax, specified as a monetary amount. For example, `"3.99"`.'
|
|
241
257
|
).optional()
|
|
242
258
|
}).describe(
|
|
243
259
|
"Tax applied to the order.\n\nTax is only applied if the site [has it configured](https://support.wix.com/en/article/pricing-plans-setting-up-tax-collection)."
|
|
244
260
|
).optional(),
|
|
245
|
-
total: z.string().describe(
|
|
261
|
+
total: /* @__PURE__ */ z.string().describe(
|
|
246
262
|
'Price after tax and discount is applied. Specified as a monetary amount, for example, `"13.98"`.\n\nIf no tax is applied, the amount is the same as `subtotal`.'
|
|
247
263
|
).optional(),
|
|
248
|
-
currency: z.string().describe(
|
|
264
|
+
currency: /* @__PURE__ */ z.string().describe(
|
|
249
265
|
"Three-letter currency code in\n[ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format."
|
|
250
266
|
).optional(),
|
|
251
|
-
proration: z.string().describe(
|
|
267
|
+
proration: /* @__PURE__ */ z.string().describe(
|
|
252
268
|
"Price change after billing date was change and price was adjusted. Could be positive and negative values."
|
|
253
269
|
).optional()
|
|
254
270
|
}).describe("Order price.").optional()
|
|
255
271
|
})
|
|
256
272
|
).optional()
|
|
257
273
|
}),
|
|
258
|
-
z.xor([
|
|
259
|
-
z.object({
|
|
260
|
-
subscription: z.never().optional(),
|
|
261
|
-
singlePaymentForDuration: z.never().optional(),
|
|
262
|
-
singlePaymentUnlimited: z.never().optional()
|
|
274
|
+
/* @__PURE__ */ z.xor([
|
|
275
|
+
/* @__PURE__ */ z.object({
|
|
276
|
+
subscription: /* @__PURE__ */ z.never().optional(),
|
|
277
|
+
singlePaymentForDuration: /* @__PURE__ */ z.never().optional(),
|
|
278
|
+
singlePaymentUnlimited: /* @__PURE__ */ z.never().optional()
|
|
263
279
|
}),
|
|
264
|
-
z.object({
|
|
265
|
-
singlePaymentForDuration: z.never().optional(),
|
|
266
|
-
singlePaymentUnlimited: z.never().optional(),
|
|
267
|
-
subscription: z.object({
|
|
268
|
-
cycleDuration: z.object({
|
|
269
|
-
count: z.number().int().describe(
|
|
280
|
+
/* @__PURE__ */ z.object({
|
|
281
|
+
singlePaymentForDuration: /* @__PURE__ */ z.never().optional(),
|
|
282
|
+
singlePaymentUnlimited: /* @__PURE__ */ z.never().optional(),
|
|
283
|
+
subscription: /* @__PURE__ */ z.object({
|
|
284
|
+
cycleDuration: /* @__PURE__ */ z.object({
|
|
285
|
+
count: /* @__PURE__ */ z.number().int().describe(
|
|
270
286
|
"Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`."
|
|
271
287
|
).min(1).optional().nullable(),
|
|
272
|
-
unit: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
|
|
288
|
+
unit: /* @__PURE__ */ z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
|
|
273
289
|
}).describe(
|
|
274
290
|
"Number of payment cycles the subscription is valid for.\n`0` for unlimited plans or for plans that are valid until canceled."
|
|
275
291
|
).optional(),
|
|
276
|
-
cycleCount: z.number().int().describe(
|
|
292
|
+
cycleCount: /* @__PURE__ */ z.number().int().describe(
|
|
277
293
|
"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."
|
|
278
294
|
).min(0).max(2e3).optional().nullable()
|
|
279
295
|
}).describe(
|
|
280
296
|
"Pricing model for an order with recurring payment cycles."
|
|
281
297
|
)
|
|
282
298
|
}),
|
|
283
|
-
z.object({
|
|
284
|
-
subscription: z.never().optional(),
|
|
285
|
-
singlePaymentUnlimited: z.never().optional(),
|
|
286
|
-
singlePaymentForDuration: z.object({
|
|
287
|
-
count: z.number().int().describe(
|
|
299
|
+
/* @__PURE__ */ z.object({
|
|
300
|
+
subscription: /* @__PURE__ */ z.never().optional(),
|
|
301
|
+
singlePaymentUnlimited: /* @__PURE__ */ z.never().optional(),
|
|
302
|
+
singlePaymentForDuration: /* @__PURE__ */ z.object({
|
|
303
|
+
count: /* @__PURE__ */ z.number().int().describe(
|
|
288
304
|
"Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`."
|
|
289
305
|
).min(1).optional().nullable(),
|
|
290
|
-
unit: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
|
|
306
|
+
unit: /* @__PURE__ */ z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
|
|
291
307
|
}).describe(
|
|
292
308
|
"Pricing model for an order with a one-time payment and the order is valid for a specific amount of time."
|
|
293
309
|
)
|
|
294
310
|
}),
|
|
295
|
-
z.object({
|
|
296
|
-
subscription: z.never().optional(),
|
|
297
|
-
singlePaymentForDuration: z.never().optional(),
|
|
298
|
-
singlePaymentUnlimited: z.boolean().describe(
|
|
311
|
+
/* @__PURE__ */ z.object({
|
|
312
|
+
subscription: /* @__PURE__ */ z.never().optional(),
|
|
313
|
+
singlePaymentForDuration: /* @__PURE__ */ z.never().optional(),
|
|
314
|
+
singlePaymentUnlimited: /* @__PURE__ */ z.boolean().describe(
|
|
299
315
|
"Pricing model for an order with a one-time payment and the order is valid until canceled."
|
|
300
316
|
)
|
|
301
317
|
})
|
|
@@ -303,8 +319,8 @@ var ManagementGetOrderResponse = /* @__PURE__ */ z.object({
|
|
|
303
319
|
).describe(
|
|
304
320
|
"Order pricing model, price, and payment schedule.\n\nLearn more about [pricing models](https://dev.wix.com/api/rest/wix-pricing-plans/pricing-plans/introduction#wix-pricing-plans_pricing-plans_introduction_pricing-models)."
|
|
305
321
|
).optional(),
|
|
306
|
-
type: z.enum(["UNDEFINED", "ONLINE", "OFFLINE", "EXTERNAL"]).describe("How the order was processed.").optional(),
|
|
307
|
-
status: z.enum([
|
|
322
|
+
type: /* @__PURE__ */ z.enum(["UNDEFINED", "ONLINE", "OFFLINE", "EXTERNAL"]).describe("How the order was processed.").optional(),
|
|
323
|
+
status: /* @__PURE__ */ z.enum([
|
|
308
324
|
"UNDEFINED",
|
|
309
325
|
"DRAFT",
|
|
310
326
|
"PENDING",
|
|
@@ -313,12 +329,12 @@ var ManagementGetOrderResponse = /* @__PURE__ */ z.object({
|
|
|
313
329
|
"ENDED",
|
|
314
330
|
"CANCELED"
|
|
315
331
|
]).describe("Status of the order.").optional(),
|
|
316
|
-
autoRenewCanceled: z.boolean().describe(
|
|
332
|
+
autoRenewCanceled: /* @__PURE__ */ z.boolean().describe(
|
|
317
333
|
"Whether the order will be canceled at the next payment date.\n\nIf `true`, the order status will be `CANCELED` and the next payment won't be charged. Omitted for single payment orders."
|
|
318
334
|
).optional().nullable(),
|
|
319
|
-
cancellation: z.object({
|
|
320
|
-
requestedDate: z.date().describe("Date and time the cancellation was requested.").optional().nullable(),
|
|
321
|
-
cause: z.enum([
|
|
335
|
+
cancellation: /* @__PURE__ */ z.object({
|
|
336
|
+
requestedDate: /* @__PURE__ */ z.date().describe("Date and time the cancellation was requested.").optional().nullable(),
|
|
337
|
+
cause: /* @__PURE__ */ z.enum([
|
|
322
338
|
"UNDEFINED",
|
|
323
339
|
"OWNER_ACTION",
|
|
324
340
|
"MEMBER_ACTION",
|
|
@@ -326,13 +342,13 @@ var ManagementGetOrderResponse = /* @__PURE__ */ z.object({
|
|
|
326
342
|
"PAYMENT_SETUP_FAILURE",
|
|
327
343
|
"UNKNOWN"
|
|
328
344
|
]).describe("Reason for the cancellation.").optional(),
|
|
329
|
-
effectiveAt: z.enum(["UNDEFINED", "IMMEDIATELY", "NEXT_PAYMENT_DATE"]).describe(
|
|
345
|
+
effectiveAt: /* @__PURE__ */ z.enum(["UNDEFINED", "IMMEDIATELY", "NEXT_PAYMENT_DATE"]).describe(
|
|
330
346
|
"When the cancellation takes effect. Set when cancelling the order."
|
|
331
347
|
).optional()
|
|
332
348
|
}).describe(
|
|
333
349
|
"Details about the cancellation of an order.\n\nOnly present if the status is `CANCELED`."
|
|
334
350
|
).optional(),
|
|
335
|
-
lastPaymentStatus: z.enum([
|
|
351
|
+
lastPaymentStatus: /* @__PURE__ */ z.enum([
|
|
336
352
|
"UNDEFINED",
|
|
337
353
|
"PAID",
|
|
338
354
|
"REFUNDED",
|
|
@@ -343,549 +359,444 @@ var ManagementGetOrderResponse = /* @__PURE__ */ z.object({
|
|
|
343
359
|
]).describe(
|
|
344
360
|
"Status of the last payment for the order.\nUpdated automatically for online orders. Updated manually by the Wix user for offline orders."
|
|
345
361
|
).optional(),
|
|
346
|
-
startDate: z.date().describe("Start date and time for the ordered plan.").optional().nullable(),
|
|
347
|
-
endDate: z.date().describe(
|
|
362
|
+
startDate: /* @__PURE__ */ z.date().describe("Start date and time for the ordered plan.").optional().nullable(),
|
|
363
|
+
endDate: /* @__PURE__ */ z.date().describe(
|
|
348
364
|
"Current end date and time for the ordered plan.\n\n`endDate` may be updated over the course of an order.\nIf the order is paused, it will have a later `endDate` once it is resumed.\n`endDate` may also be postponed.\n\nOmitted if the order is valid until canceled and still `ACTIVE`."
|
|
349
365
|
).optional().nullable(),
|
|
350
|
-
pausePeriods: z.array(
|
|
351
|
-
z.object({
|
|
352
|
-
status: z.enum(["UNDEFINED", "ACTIVE", "ENDED"]).describe("Status of the pause period.").optional(),
|
|
353
|
-
pauseDate: z.date().describe("Start date and time of the pause period.").optional().nullable(),
|
|
354
|
-
resumeDate: z.date().describe(
|
|
366
|
+
pausePeriods: /* @__PURE__ */ z.array(
|
|
367
|
+
/* @__PURE__ */ z.object({
|
|
368
|
+
status: /* @__PURE__ */ z.enum(["UNDEFINED", "ACTIVE", "ENDED"]).describe("Status of the pause period.").optional(),
|
|
369
|
+
pauseDate: /* @__PURE__ */ z.date().describe("Start date and time of the pause period.").optional().nullable(),
|
|
370
|
+
resumeDate: /* @__PURE__ */ z.date().describe(
|
|
355
371
|
"End date and time of the pause period.\n\nOmitted while the pause period remains `ACTIVE`."
|
|
356
372
|
).optional().nullable()
|
|
357
373
|
})
|
|
358
374
|
).optional(),
|
|
359
|
-
freeTrialDays: z.number().int().describe(
|
|
375
|
+
freeTrialDays: /* @__PURE__ */ z.number().int().describe(
|
|
360
376
|
"Free trial period for the order, in days.\n\nOnly available for recurring plans."
|
|
361
377
|
).min(1).max(999).optional().nullable(),
|
|
362
|
-
earliestEndDate: z.date().describe(
|
|
378
|
+
earliestEndDate: /* @__PURE__ */ z.date().describe(
|
|
363
379
|
"Earliest end date and time that the plan for the order can expire.\n\nCalculated by using the original end date plus any pause periods. Omitted if the order is active until canceled. Reserved for future use."
|
|
364
380
|
).optional().nullable(),
|
|
365
|
-
currentCycle: z.object({
|
|
366
|
-
index: z.number().int().describe(
|
|
381
|
+
currentCycle: /* @__PURE__ */ z.object({
|
|
382
|
+
index: /* @__PURE__ */ z.number().int().describe(
|
|
367
383
|
"Index of the current payment cycle in the order.\n\n`0` when order is in a free trial period. In all other cases, the index starts with `1`."
|
|
368
384
|
).min(0).optional(),
|
|
369
|
-
startedDate: z.date().describe("Start date and time for the current payment cycle.").optional().nullable(),
|
|
370
|
-
endedDate: z.date().describe("End date and time for the current payment cycle.").optional().nullable()
|
|
385
|
+
startedDate: /* @__PURE__ */ z.date().describe("Start date and time for the current payment cycle.").optional().nullable(),
|
|
386
|
+
endedDate: /* @__PURE__ */ z.date().describe("End date and time for the current payment cycle.").optional().nullable()
|
|
371
387
|
}).describe(
|
|
372
388
|
"Current payment cycle for the order.\n\n`currentCycle` will be omitted if the order's status is `CANCELED` or `ENDED`, or if the `startDate` hasn't passed yet."
|
|
373
389
|
).optional(),
|
|
374
|
-
planName: z.string().describe("Plan name at the time of purchase.").optional(),
|
|
375
|
-
planDescription: z.string().describe("Plan description at the time of purchase").optional(),
|
|
376
|
-
planPrice: z.string().describe("Plan price as it was at the moment of order creation.").optional(),
|
|
377
|
-
_createdDate: z.date().describe("Date and time the order was created.").optional().nullable(),
|
|
378
|
-
_updatedDate: z.date().describe("Date and time the order was updated.").optional().nullable(),
|
|
379
|
-
formData: z.object({
|
|
380
|
-
formId: z.string().describe(
|
|
390
|
+
planName: /* @__PURE__ */ z.string().describe("Plan name at the time of purchase.").optional(),
|
|
391
|
+
planDescription: /* @__PURE__ */ z.string().describe("Plan description at the time of purchase").optional(),
|
|
392
|
+
planPrice: /* @__PURE__ */ z.string().describe("Plan price as it was at the moment of order creation.").optional(),
|
|
393
|
+
_createdDate: /* @__PURE__ */ z.date().describe("Date and time the order was created.").optional().nullable(),
|
|
394
|
+
_updatedDate: /* @__PURE__ */ z.date().describe("Date and time the order was updated.").optional().nullable(),
|
|
395
|
+
formData: /* @__PURE__ */ z.object({
|
|
396
|
+
formId: /* @__PURE__ */ z.string().describe(
|
|
381
397
|
"ID of the [order form](https://dev.wix.com/docs/rest/api-reference/wix-forms/form-submissions/introduction) associated with the plan at checkout."
|
|
382
398
|
).regex(
|
|
383
399
|
/^[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}$/,
|
|
384
400
|
"Must be a valid GUID"
|
|
385
401
|
).optional().nullable(),
|
|
386
|
-
submissionId: z.string().describe(
|
|
402
|
+
submissionId: /* @__PURE__ */ z.string().describe(
|
|
387
403
|
"ID of a submission to the plan's order form at checkout. Every time a visitor completes the checkout process for a plan, a new submission is created."
|
|
388
404
|
).regex(
|
|
389
405
|
/^[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}$/,
|
|
390
406
|
"Must be a valid GUID"
|
|
391
407
|
).optional().nullable(),
|
|
392
|
-
submissionData: z.record(z.string(), z.any()).describe("Data submitted to the plan's order form at checkout.").optional()
|
|
408
|
+
submissionData: /* @__PURE__ */ z.record(/* @__PURE__ */ z.string(), /* @__PURE__ */ z.any()).describe("Data submitted to the plan's order form at checkout.").optional()
|
|
393
409
|
}).describe(
|
|
394
410
|
"Information about the form submitted during the plan's checkout."
|
|
395
411
|
).optional()
|
|
396
|
-
}).describe("
|
|
412
|
+
}).describe("Created online order.").optional()
|
|
397
413
|
});
|
|
398
|
-
var
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
414
|
+
var CreateOfflineOrderRequest = /* @__PURE__ */ z.object({
|
|
415
|
+
planId: /* @__PURE__ */ z.string().describe("ID of the plan being ordered, from the Plans API.").regex(
|
|
416
|
+
/^[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}$/,
|
|
417
|
+
"Must be a valid GUID"
|
|
418
|
+
),
|
|
419
|
+
memberId: /* @__PURE__ */ z.string().describe("ID of the member ordering the plan, from the Members API.").regex(
|
|
420
|
+
/^[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}$/,
|
|
421
|
+
"Must be a valid GUID"
|
|
422
|
+
),
|
|
423
|
+
options: /* @__PURE__ */ z.object({
|
|
424
|
+
startDate: /* @__PURE__ */ z.date().describe(
|
|
425
|
+
"Start date and time for the ordered plan in a `YYYY-MM-DDThh:mm[:ss][.sss]Z` format.\n\nDefault: Current date and time."
|
|
404
426
|
).optional().nullable(),
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
427
|
+
paid: /* @__PURE__ */ z.boolean().describe("Whether the order is paid.\n\nDefault: `false`").optional().nullable(),
|
|
428
|
+
couponCode: /* @__PURE__ */ z.string().describe("Coupon code to apply, from the Coupons API.").min(1).max(20).optional().nullable(),
|
|
429
|
+
submissionId: /* @__PURE__ */ z.string().describe("Form submission ID that was submitted with the order.").regex(
|
|
430
|
+
/^[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}$/,
|
|
431
|
+
"Must be a valid GUID"
|
|
432
|
+
).optional().nullable()
|
|
433
|
+
}).describe("Options for creating an offline order. ").optional()
|
|
434
|
+
});
|
|
435
|
+
var CreateOfflineOrderResponse = /* @__PURE__ */ z.object({
|
|
436
|
+
order: /* @__PURE__ */ z.object({
|
|
437
|
+
_id: /* @__PURE__ */ z.string().describe("Order ID.").regex(
|
|
438
|
+
/^[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}$/,
|
|
439
|
+
"Must be a valid GUID"
|
|
415
440
|
).optional(),
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
"FAILED",
|
|
422
|
-
"UNPAID",
|
|
423
|
-
"PENDING",
|
|
424
|
-
"NOT_APPLICABLE"
|
|
425
|
-
])
|
|
441
|
+
planId: /* @__PURE__ */ z.string().describe(
|
|
442
|
+
"ID of the plan purchased with the order, from the Plans API."
|
|
443
|
+
).regex(
|
|
444
|
+
/^[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}$/,
|
|
445
|
+
"Must be a valid GUID"
|
|
426
446
|
).optional(),
|
|
427
|
-
|
|
428
|
-
"
|
|
429
|
-
).
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
fieldName: z.string().describe("Name of the field to sort by.").max(512).optional(),
|
|
433
|
-
order: z.enum(["ASC", "DESC"]).optional(),
|
|
434
|
-
origin: z.object({
|
|
435
|
-
latitude: z.number().describe("Address latitude.").optional().nullable(),
|
|
436
|
-
longitude: z.number().describe("Address longitude.").optional().nullable()
|
|
437
|
-
}).describe(
|
|
438
|
-
"Origin point for geo-distance sorting on a GEO field\nresults are ordered by distance from this point (ASC = nearest first, DESC = farthest first)."
|
|
439
|
-
).optional()
|
|
440
|
-
}).describe(
|
|
441
|
-
"Sort order.\n\nUse `ASC` for ascending order or `DESC` for descending order.\n\nDefault: `DESC`."
|
|
447
|
+
subscriptionId: /* @__PURE__ */ z.string().describe(
|
|
448
|
+
"ID of the related Wix subscription.\n\nEvery pricing plan order corresponds to a Wix subscription, including orders for single payment plans. Learn more in\na [Pricing Plans overview](https://support.wix.com/en/article/pricing-plans-an-overview#create-plans-to-suit-your-business)."
|
|
449
|
+
).regex(
|
|
450
|
+
/^[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}$/,
|
|
451
|
+
"Must be a valid GUID"
|
|
442
452
|
).optional(),
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
"Must be a valid GUID"
|
|
452
|
-
).optional(),
|
|
453
|
-
planId: z.string().describe(
|
|
454
|
-
"ID of the plan purchased with the order, from the Plans API."
|
|
455
|
-
).regex(
|
|
456
|
-
/^[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}$/,
|
|
457
|
-
"Must be a valid GUID"
|
|
458
|
-
).optional(),
|
|
459
|
-
subscriptionId: z.string().describe(
|
|
460
|
-
"ID of the related Wix subscription.\n\nEvery pricing plan order corresponds to a Wix subscription, including orders for single payment plans. Learn more in\na [Pricing Plans overview](https://support.wix.com/en/article/pricing-plans-an-overview#create-plans-to-suit-your-business)."
|
|
461
|
-
).regex(
|
|
453
|
+
wixPayOrderId: /* @__PURE__ */ z.string().describe(
|
|
454
|
+
"Wix Pay order ID.\n\nProvided by Wix whether the order is created online or offline. The field is omitted when the order is free."
|
|
455
|
+
).regex(
|
|
456
|
+
/^[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}$/,
|
|
457
|
+
"Must be a valid GUID"
|
|
458
|
+
).optional().nullable(),
|
|
459
|
+
buyer: /* @__PURE__ */ z.object({
|
|
460
|
+
memberId: /* @__PURE__ */ z.string().describe("Member ID for a Wix site member, from the Members API.").regex(
|
|
462
461
|
/^[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}$/,
|
|
463
462
|
"Must be a valid GUID"
|
|
464
463
|
).optional(),
|
|
465
|
-
|
|
466
|
-
"
|
|
464
|
+
contactId: /* @__PURE__ */ z.string().describe(
|
|
465
|
+
"Contact ID for a Wix site contact, from the Contacts API."
|
|
467
466
|
).regex(
|
|
468
467
|
/^[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}$/,
|
|
469
468
|
"Must be a valid GUID"
|
|
470
|
-
).optional()
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
469
|
+
).optional()
|
|
470
|
+
}).describe(
|
|
471
|
+
"The buyer's IDs. Includes `memberId` and `contactId`.\n\nCurrently, Pricing Plan purchases are limited to members only. `contactId` is returned,\nbut a buyer will not be able to purchase a plan without a `memberId`."
|
|
472
|
+
).optional(),
|
|
473
|
+
priceDetails: /* @__PURE__ */ z.intersection(
|
|
474
|
+
/* @__PURE__ */ z.object({
|
|
475
|
+
subtotal: /* @__PURE__ */ z.string().describe(
|
|
476
|
+
'Price of the order excluding tax, specified as a monetary amount. for example, `"9.99"`.'
|
|
477
477
|
).optional(),
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
).optional()
|
|
484
|
-
}).describe(
|
|
485
|
-
"The buyer's IDs. Includes `memberId` and `contactId`.\n\nCurrently, Pricing Plan purchases are limited to members only. `contactId` is returned,\nbut a buyer will not be able to purchase a plan without a `memberId`."
|
|
486
|
-
).optional(),
|
|
487
|
-
priceDetails: z.intersection(
|
|
488
|
-
z.object({
|
|
489
|
-
subtotal: z.string().describe(
|
|
490
|
-
'Price of the order excluding tax, specified as a monetary amount. for example, `"9.99"`.'
|
|
491
|
-
).optional(),
|
|
492
|
-
discount: z.string().describe("Total discount applied.").optional(),
|
|
493
|
-
tax: z.object({
|
|
494
|
-
name: z.string().describe("Name of the tax. For example, VAT.").optional(),
|
|
495
|
-
includedInPrice: z.boolean().describe(
|
|
496
|
-
"Whether tax is included in the original price. When `false`, tax is added at checkout."
|
|
497
|
-
).optional(),
|
|
498
|
-
rate: z.string().describe(
|
|
499
|
-
'Tax rate percentage, as a number between 0 and 100. For example, a 7% tax rate is `"7.00"`.'
|
|
500
|
-
).optional(),
|
|
501
|
-
amount: z.string().describe(
|
|
502
|
-
'Total tax, specified as a monetary amount. For example, `"3.99"`.'
|
|
503
|
-
).optional()
|
|
504
|
-
}).describe("Tax applied.").optional(),
|
|
505
|
-
total: z.string().describe(
|
|
506
|
-
'Price after tax and discount is applied, specified as a monetary amount. For example, `"13.98"`.\n\nIf no tax is applied, the amount is the same as `subtotal`.'
|
|
478
|
+
discount: /* @__PURE__ */ z.string().describe("Total discount applied.").optional(),
|
|
479
|
+
tax: /* @__PURE__ */ z.object({
|
|
480
|
+
name: /* @__PURE__ */ z.string().describe("Name of the tax. For example, VAT.").optional(),
|
|
481
|
+
includedInPrice: /* @__PURE__ */ z.boolean().describe(
|
|
482
|
+
"Whether tax is included in the original price. When `false`, tax is added at checkout."
|
|
507
483
|
).optional(),
|
|
508
|
-
|
|
509
|
-
|
|
484
|
+
rate: /* @__PURE__ */ z.string().describe(
|
|
485
|
+
'Tax rate percentage, as a number between 0 and 100. For example, a 7% tax rate is `"7.00"`.'
|
|
510
486
|
).optional(),
|
|
511
|
-
|
|
512
|
-
|
|
487
|
+
amount: /* @__PURE__ */ z.string().describe(
|
|
488
|
+
'Total tax, specified as a monetary amount. For example, `"3.99"`.'
|
|
489
|
+
).optional()
|
|
490
|
+
}).describe("Tax applied.").optional(),
|
|
491
|
+
total: /* @__PURE__ */ z.string().describe(
|
|
492
|
+
'Price after tax and discount is applied, specified as a monetary amount. For example, `"13.98"`.\n\nIf no tax is applied, the amount is the same as `subtotal`.'
|
|
493
|
+
).optional(),
|
|
494
|
+
planPrice: /* @__PURE__ */ z.string().describe("Plan price as it was at the moment of order creation.").optional(),
|
|
495
|
+
currency: /* @__PURE__ */ z.string().describe(
|
|
496
|
+
"Currency code. Must be valid ISO 4217 currency code (e.g., USD)."
|
|
497
|
+
).optional(),
|
|
498
|
+
freeTrialDays: /* @__PURE__ */ z.number().int().describe(
|
|
499
|
+
"Free trial period for the order in days. Only available for recurring plans."
|
|
500
|
+
).min(1).max(999).optional().nullable(),
|
|
501
|
+
coupon: /* @__PURE__ */ z.object({
|
|
502
|
+
code: /* @__PURE__ */ z.string().describe("Code of the applied coupon.").min(1).max(20).optional(),
|
|
503
|
+
amount: /* @__PURE__ */ z.string().describe(
|
|
504
|
+
"Total discount of the coupon, as a monetary amount."
|
|
513
505
|
).optional(),
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
coupon: z.object({
|
|
518
|
-
code: z.string().describe("Code of the applied coupon.").min(1).max(20).optional(),
|
|
519
|
-
amount: z.string().describe(
|
|
520
|
-
"Total discount of the coupon, as a monetary amount."
|
|
521
|
-
).optional(),
|
|
522
|
-
_id: z.string().describe("Coupon ID.").regex(
|
|
523
|
-
/^[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}$/,
|
|
524
|
-
"Must be a valid GUID"
|
|
525
|
-
).optional()
|
|
526
|
-
}).describe(
|
|
527
|
-
"Coupon applied to the order. Empty means no coupon was applied."
|
|
506
|
+
_id: /* @__PURE__ */ z.string().describe("Coupon ID.").regex(
|
|
507
|
+
/^[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}$/,
|
|
508
|
+
"Must be a valid GUID"
|
|
528
509
|
).optional()
|
|
510
|
+
}).describe(
|
|
511
|
+
"Coupon applied to the order. Empty means no coupon was applied."
|
|
512
|
+
).optional()
|
|
513
|
+
}),
|
|
514
|
+
/* @__PURE__ */ z.xor([
|
|
515
|
+
/* @__PURE__ */ z.object({
|
|
516
|
+
subscription: /* @__PURE__ */ z.never().optional(),
|
|
517
|
+
singlePaymentForDuration: /* @__PURE__ */ z.never().optional(),
|
|
518
|
+
singlePaymentUnlimited: /* @__PURE__ */ z.never().optional()
|
|
529
519
|
}),
|
|
530
|
-
z.
|
|
531
|
-
z.
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
z.object({
|
|
537
|
-
singlePaymentForDuration: z.never().optional(),
|
|
538
|
-
singlePaymentUnlimited: z.never().optional(),
|
|
539
|
-
subscription: z.object({
|
|
540
|
-
cycleDuration: z.object({
|
|
541
|
-
count: z.number().int().describe(
|
|
542
|
-
"Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`."
|
|
543
|
-
).min(1).optional().nullable(),
|
|
544
|
-
unit: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
|
|
545
|
-
}).describe(
|
|
546
|
-
"Number of payment cycles the subscription is valid for.\n`0` for unlimited plans or for plans that are valid until canceled."
|
|
547
|
-
).optional(),
|
|
548
|
-
cycleCount: z.number().int().describe(
|
|
549
|
-
"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."
|
|
550
|
-
).min(0).max(2e3).optional().nullable()
|
|
551
|
-
}).describe("Order has recurring payments.")
|
|
552
|
-
}),
|
|
553
|
-
z.object({
|
|
554
|
-
subscription: z.never().optional(),
|
|
555
|
-
singlePaymentUnlimited: z.never().optional(),
|
|
556
|
-
singlePaymentForDuration: z.object({
|
|
557
|
-
count: z.number().int().describe(
|
|
520
|
+
/* @__PURE__ */ z.object({
|
|
521
|
+
singlePaymentForDuration: /* @__PURE__ */ z.never().optional(),
|
|
522
|
+
singlePaymentUnlimited: /* @__PURE__ */ z.never().optional(),
|
|
523
|
+
subscription: /* @__PURE__ */ z.object({
|
|
524
|
+
cycleDuration: /* @__PURE__ */ z.object({
|
|
525
|
+
count: /* @__PURE__ */ z.number().int().describe(
|
|
558
526
|
"Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`."
|
|
559
527
|
).min(1).optional().nullable(),
|
|
560
|
-
unit: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
|
|
528
|
+
unit: /* @__PURE__ */ z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
|
|
561
529
|
}).describe(
|
|
562
|
-
"
|
|
563
|
-
)
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
530
|
+
"Number of payment cycles the subscription is valid for.\n`0` for unlimited plans or for plans that are valid until canceled."
|
|
531
|
+
).optional(),
|
|
532
|
+
cycleCount: /* @__PURE__ */ z.number().int().describe(
|
|
533
|
+
"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."
|
|
534
|
+
).min(0).max(2e3).optional().nullable()
|
|
535
|
+
}).describe("Order has recurring payments.")
|
|
536
|
+
}),
|
|
537
|
+
/* @__PURE__ */ z.object({
|
|
538
|
+
subscription: /* @__PURE__ */ z.never().optional(),
|
|
539
|
+
singlePaymentUnlimited: /* @__PURE__ */ z.never().optional(),
|
|
540
|
+
singlePaymentForDuration: /* @__PURE__ */ z.object({
|
|
541
|
+
count: /* @__PURE__ */ z.number().int().describe(
|
|
542
|
+
"Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`."
|
|
543
|
+
).min(1).optional().nullable(),
|
|
544
|
+
unit: /* @__PURE__ */ z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
|
|
545
|
+
}).describe(
|
|
546
|
+
"One-time payment. Order is valid for a specified duration."
|
|
547
|
+
)
|
|
548
|
+
}),
|
|
549
|
+
/* @__PURE__ */ z.object({
|
|
550
|
+
subscription: /* @__PURE__ */ z.never().optional(),
|
|
551
|
+
singlePaymentForDuration: /* @__PURE__ */ z.never().optional(),
|
|
552
|
+
singlePaymentUnlimited: /* @__PURE__ */ z.boolean().describe(
|
|
553
|
+
"One-time payment. Order is valid until it is canceled."
|
|
554
|
+
)
|
|
555
|
+
})
|
|
556
|
+
])
|
|
557
|
+
).describe(
|
|
558
|
+
"__Deprecated.__ Use `pricing` instead. This property will be removed on September 30, 2022."
|
|
559
|
+
).optional(),
|
|
560
|
+
pricing: /* @__PURE__ */ z.intersection(
|
|
561
|
+
/* @__PURE__ */ z.object({
|
|
562
|
+
prices: /* @__PURE__ */ z.array(
|
|
563
|
+
/* @__PURE__ */ z.object({
|
|
564
|
+
duration: /* @__PURE__ */ z.object({
|
|
565
|
+
cycleFrom: /* @__PURE__ */ z.number().int().describe(
|
|
566
|
+
"Price starts to apply with this cycle.\n\n`1` is the first payment cycle for all pricing models."
|
|
567
|
+
).optional(),
|
|
568
|
+
numberOfCycles: /* @__PURE__ */ z.number().int().describe(
|
|
569
|
+
"Amount of cycles to apply price for.\n\nFor `subscription` pricing models with a finite number of cycles, the `numberOfCycles` is the same as `pricing.subscription.cycleCount`.\n\nFor `subscription` pricing models that are unlimited or until-canceled, the `numberOfCycles` is not returned.\n\nFor `singlePaymentForDuration` and `singlePaymentUnlimited` pricing models, the `numberOfCycles` is `1`."
|
|
570
|
+
).optional().nullable()
|
|
571
|
+
}).describe(
|
|
572
|
+
"Cycle duration to apply `price` for.\n\nUse with all pricing models.\nCan apply the same price to multiple payment cycles."
|
|
573
|
+
).optional(),
|
|
574
|
+
price: /* @__PURE__ */ z.object({
|
|
575
|
+
subtotal: /* @__PURE__ */ z.string().describe(
|
|
576
|
+
'Price of the order excluding tax, specified as a monetary amount. For example, `"9.99"`.'
|
|
577
|
+
).optional(),
|
|
578
|
+
coupon: /* @__PURE__ */ z.object({
|
|
579
|
+
code: /* @__PURE__ */ z.string().describe("Code of the applied coupon.").min(1).max(20).optional(),
|
|
580
|
+
amount: /* @__PURE__ */ z.string().describe(
|
|
581
|
+
"Total discount of the coupon, as a monetary amount."
|
|
583
582
|
).optional(),
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
583
|
+
_id: /* @__PURE__ */ z.string().describe("Coupon ID.").regex(
|
|
584
|
+
/^[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}$/,
|
|
585
|
+
"Must be a valid GUID"
|
|
586
|
+
).optional()
|
|
587
587
|
}).describe(
|
|
588
|
-
"
|
|
588
|
+
"Coupon applied to the order, from the Coupons API."
|
|
589
589
|
).optional(),
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
).
|
|
594
|
-
|
|
595
|
-
code: z.string().describe("Code of the applied coupon.").min(1).max(20).optional(),
|
|
596
|
-
amount: z.string().describe(
|
|
597
|
-
"Total discount of the coupon, as a monetary amount."
|
|
598
|
-
).optional(),
|
|
599
|
-
_id: z.string().describe("Coupon ID.").regex(
|
|
600
|
-
/^[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}$/,
|
|
601
|
-
"Must be a valid GUID"
|
|
602
|
-
).optional()
|
|
603
|
-
}).describe(
|
|
604
|
-
"Coupon applied to the order, from the Coupons API."
|
|
605
|
-
).optional(),
|
|
606
|
-
discount: z.string().describe("Total discount applied to the order.").optional(),
|
|
607
|
-
tax: z.object({
|
|
608
|
-
name: z.string().describe("Name of the tax. For example, VAT.").optional(),
|
|
609
|
-
includedInPrice: z.boolean().describe(
|
|
610
|
-
"Whether tax is included in the original price. When `false`, tax is added at checkout."
|
|
611
|
-
).optional(),
|
|
612
|
-
rate: z.string().describe(
|
|
613
|
-
'Tax rate percentage, as a number between 0 and 100. For example, a 7% tax rate is `"7.00"`.'
|
|
614
|
-
).optional(),
|
|
615
|
-
amount: z.string().describe(
|
|
616
|
-
'Total tax, specified as a monetary amount. For example, `"3.99"`.'
|
|
617
|
-
).optional()
|
|
618
|
-
}).describe(
|
|
619
|
-
"Tax applied to the order.\n\nTax is only applied if the site [has it configured](https://support.wix.com/en/article/pricing-plans-setting-up-tax-collection)."
|
|
620
|
-
).optional(),
|
|
621
|
-
total: z.string().describe(
|
|
622
|
-
'Price after tax and discount is applied. Specified as a monetary amount, for example, `"13.98"`.\n\nIf no tax is applied, the amount is the same as `subtotal`.'
|
|
590
|
+
discount: /* @__PURE__ */ z.string().describe("Total discount applied to the order.").optional(),
|
|
591
|
+
tax: /* @__PURE__ */ z.object({
|
|
592
|
+
name: /* @__PURE__ */ z.string().describe("Name of the tax. For example, VAT.").optional(),
|
|
593
|
+
includedInPrice: /* @__PURE__ */ z.boolean().describe(
|
|
594
|
+
"Whether tax is included in the original price. When `false`, tax is added at checkout."
|
|
623
595
|
).optional(),
|
|
624
|
-
|
|
625
|
-
|
|
596
|
+
rate: /* @__PURE__ */ z.string().describe(
|
|
597
|
+
'Tax rate percentage, as a number between 0 and 100. For example, a 7% tax rate is `"7.00"`.'
|
|
626
598
|
).optional(),
|
|
627
|
-
|
|
628
|
-
|
|
599
|
+
amount: /* @__PURE__ */ z.string().describe(
|
|
600
|
+
'Total tax, specified as a monetary amount. For example, `"3.99"`.'
|
|
629
601
|
).optional()
|
|
630
|
-
}).describe("Order price.").optional()
|
|
631
|
-
})
|
|
632
|
-
).optional()
|
|
633
|
-
}),
|
|
634
|
-
z.xor([
|
|
635
|
-
z.object({
|
|
636
|
-
subscription: z.never().optional(),
|
|
637
|
-
singlePaymentForDuration: z.never().optional(),
|
|
638
|
-
singlePaymentUnlimited: z.never().optional()
|
|
639
|
-
}),
|
|
640
|
-
z.object({
|
|
641
|
-
singlePaymentForDuration: z.never().optional(),
|
|
642
|
-
singlePaymentUnlimited: z.never().optional(),
|
|
643
|
-
subscription: z.object({
|
|
644
|
-
cycleDuration: z.object({
|
|
645
|
-
count: z.number().int().describe(
|
|
646
|
-
"Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`."
|
|
647
|
-
).min(1).optional().nullable(),
|
|
648
|
-
unit: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
|
|
649
602
|
}).describe(
|
|
650
|
-
"
|
|
603
|
+
"Tax applied to the order.\n\nTax is only applied if the site [has it configured](https://support.wix.com/en/article/pricing-plans-setting-up-tax-collection)."
|
|
651
604
|
).optional(),
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
).
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
605
|
+
total: /* @__PURE__ */ z.string().describe(
|
|
606
|
+
'Price after tax and discount is applied. Specified as a monetary amount, for example, `"13.98"`.\n\nIf no tax is applied, the amount is the same as `subtotal`.'
|
|
607
|
+
).optional(),
|
|
608
|
+
currency: /* @__PURE__ */ z.string().describe(
|
|
609
|
+
"Three-letter currency code in\n[ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format."
|
|
610
|
+
).optional(),
|
|
611
|
+
proration: /* @__PURE__ */ z.string().describe(
|
|
612
|
+
"Price change after billing date was change and price was adjusted. Could be positive and negative values."
|
|
613
|
+
).optional()
|
|
614
|
+
}).describe("Order price.").optional()
|
|
615
|
+
})
|
|
616
|
+
).optional()
|
|
617
|
+
}),
|
|
618
|
+
/* @__PURE__ */ z.xor([
|
|
619
|
+
/* @__PURE__ */ z.object({
|
|
620
|
+
subscription: /* @__PURE__ */ z.never().optional(),
|
|
621
|
+
singlePaymentForDuration: /* @__PURE__ */ z.never().optional(),
|
|
622
|
+
singlePaymentUnlimited: /* @__PURE__ */ z.never().optional()
|
|
623
|
+
}),
|
|
624
|
+
/* @__PURE__ */ z.object({
|
|
625
|
+
singlePaymentForDuration: /* @__PURE__ */ z.never().optional(),
|
|
626
|
+
singlePaymentUnlimited: /* @__PURE__ */ z.never().optional(),
|
|
627
|
+
subscription: /* @__PURE__ */ z.object({
|
|
628
|
+
cycleDuration: /* @__PURE__ */ z.object({
|
|
629
|
+
count: /* @__PURE__ */ z.number().int().describe(
|
|
664
630
|
"Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`."
|
|
665
631
|
).min(1).optional().nullable(),
|
|
666
|
-
unit: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
|
|
632
|
+
unit: /* @__PURE__ */ z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
|
|
667
633
|
}).describe(
|
|
668
|
-
"
|
|
669
|
-
)
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
cancellation: z.object({
|
|
696
|
-
requestedDate: z.date().describe("Date and time the cancellation was requested.").optional().nullable(),
|
|
697
|
-
cause: z.enum([
|
|
698
|
-
"UNDEFINED",
|
|
699
|
-
"OWNER_ACTION",
|
|
700
|
-
"MEMBER_ACTION",
|
|
701
|
-
"PAYMENT_FAILURE",
|
|
702
|
-
"PAYMENT_SETUP_FAILURE",
|
|
703
|
-
"UNKNOWN"
|
|
704
|
-
]).describe("Reason for the cancellation.").optional(),
|
|
705
|
-
effectiveAt: z.enum(["UNDEFINED", "IMMEDIATELY", "NEXT_PAYMENT_DATE"]).describe(
|
|
706
|
-
"When the cancellation takes effect. Set when cancelling the order."
|
|
707
|
-
).optional()
|
|
708
|
-
}).describe(
|
|
709
|
-
"Details about the cancellation of an order.\n\nOnly present if the status is `CANCELED`."
|
|
710
|
-
).optional(),
|
|
711
|
-
lastPaymentStatus: z.enum([
|
|
712
|
-
"UNDEFINED",
|
|
713
|
-
"PAID",
|
|
714
|
-
"REFUNDED",
|
|
715
|
-
"FAILED",
|
|
716
|
-
"UNPAID",
|
|
717
|
-
"PENDING",
|
|
718
|
-
"NOT_APPLICABLE"
|
|
719
|
-
]).describe(
|
|
720
|
-
"Status of the last payment for the order.\nUpdated automatically for online orders. Updated manually by the Wix user for offline orders."
|
|
721
|
-
).optional(),
|
|
722
|
-
startDate: z.date().describe("Start date and time for the ordered plan.").optional().nullable(),
|
|
723
|
-
endDate: z.date().describe(
|
|
724
|
-
"Current end date and time for the ordered plan.\n\n`endDate` may be updated over the course of an order.\nIf the order is paused, it will have a later `endDate` once it is resumed.\n`endDate` may also be postponed.\n\nOmitted if the order is valid until canceled and still `ACTIVE`."
|
|
725
|
-
).optional().nullable(),
|
|
726
|
-
pausePeriods: z.array(
|
|
727
|
-
z.object({
|
|
728
|
-
status: z.enum(["UNDEFINED", "ACTIVE", "ENDED"]).describe("Status of the pause period.").optional(),
|
|
729
|
-
pauseDate: z.date().describe("Start date and time of the pause period.").optional().nullable(),
|
|
730
|
-
resumeDate: z.date().describe(
|
|
731
|
-
"End date and time of the pause period.\n\nOmitted while the pause period remains `ACTIVE`."
|
|
732
|
-
).optional().nullable()
|
|
634
|
+
"Number of payment cycles the subscription is valid for.\n`0` for unlimited plans or for plans that are valid until canceled."
|
|
635
|
+
).optional(),
|
|
636
|
+
cycleCount: /* @__PURE__ */ z.number().int().describe(
|
|
637
|
+
"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."
|
|
638
|
+
).min(0).max(2e3).optional().nullable()
|
|
639
|
+
}).describe(
|
|
640
|
+
"Pricing model for an order with recurring payment cycles."
|
|
641
|
+
)
|
|
642
|
+
}),
|
|
643
|
+
/* @__PURE__ */ z.object({
|
|
644
|
+
subscription: /* @__PURE__ */ z.never().optional(),
|
|
645
|
+
singlePaymentUnlimited: /* @__PURE__ */ z.never().optional(),
|
|
646
|
+
singlePaymentForDuration: /* @__PURE__ */ z.object({
|
|
647
|
+
count: /* @__PURE__ */ z.number().int().describe(
|
|
648
|
+
"Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`."
|
|
649
|
+
).min(1).optional().nullable(),
|
|
650
|
+
unit: /* @__PURE__ */ z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
|
|
651
|
+
}).describe(
|
|
652
|
+
"Pricing model for an order with a one-time payment and the order is valid for a specific amount of time."
|
|
653
|
+
)
|
|
654
|
+
}),
|
|
655
|
+
/* @__PURE__ */ z.object({
|
|
656
|
+
subscription: /* @__PURE__ */ z.never().optional(),
|
|
657
|
+
singlePaymentForDuration: /* @__PURE__ */ z.never().optional(),
|
|
658
|
+
singlePaymentUnlimited: /* @__PURE__ */ z.boolean().describe(
|
|
659
|
+
"Pricing model for an order with a one-time payment and the order is valid until canceled."
|
|
660
|
+
)
|
|
733
661
|
})
|
|
734
|
-
)
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
"ID of a submission to the plan's order form at checkout. Every time a visitor completes the checkout process for a plan, a new submission is created."
|
|
764
|
-
).regex(
|
|
765
|
-
/^[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}$/,
|
|
766
|
-
"Must be a valid GUID"
|
|
767
|
-
).optional().nullable(),
|
|
768
|
-
submissionData: z.record(z.string(), z.any()).describe("Data submitted to the plan's order form at checkout.").optional()
|
|
769
|
-
}).describe(
|
|
770
|
-
"Information about the form submitted during the plan's checkout."
|
|
662
|
+
])
|
|
663
|
+
).describe(
|
|
664
|
+
"Order pricing model, price, and payment schedule.\n\nLearn more about [pricing models](https://dev.wix.com/api/rest/wix-pricing-plans/pricing-plans/introduction#wix-pricing-plans_pricing-plans_introduction_pricing-models)."
|
|
665
|
+
).optional(),
|
|
666
|
+
type: /* @__PURE__ */ z.enum(["UNDEFINED", "ONLINE", "OFFLINE", "EXTERNAL"]).describe("How the order was processed.").optional(),
|
|
667
|
+
status: /* @__PURE__ */ z.enum([
|
|
668
|
+
"UNDEFINED",
|
|
669
|
+
"DRAFT",
|
|
670
|
+
"PENDING",
|
|
671
|
+
"ACTIVE",
|
|
672
|
+
"PAUSED",
|
|
673
|
+
"ENDED",
|
|
674
|
+
"CANCELED"
|
|
675
|
+
]).describe("Status of the order.").optional(),
|
|
676
|
+
autoRenewCanceled: /* @__PURE__ */ z.boolean().describe(
|
|
677
|
+
"Whether the order will be canceled at the next payment date.\n\nIf `true`, the order status will be `CANCELED` and the next payment won't be charged. Omitted for single payment orders."
|
|
678
|
+
).optional().nullable(),
|
|
679
|
+
cancellation: /* @__PURE__ */ z.object({
|
|
680
|
+
requestedDate: /* @__PURE__ */ z.date().describe("Date and time the cancellation was requested.").optional().nullable(),
|
|
681
|
+
cause: /* @__PURE__ */ z.enum([
|
|
682
|
+
"UNDEFINED",
|
|
683
|
+
"OWNER_ACTION",
|
|
684
|
+
"MEMBER_ACTION",
|
|
685
|
+
"PAYMENT_FAILURE",
|
|
686
|
+
"PAYMENT_SETUP_FAILURE",
|
|
687
|
+
"UNKNOWN"
|
|
688
|
+
]).describe("Reason for the cancellation.").optional(),
|
|
689
|
+
effectiveAt: /* @__PURE__ */ z.enum(["UNDEFINED", "IMMEDIATELY", "NEXT_PAYMENT_DATE"]).describe(
|
|
690
|
+
"When the cancellation takes effect. Set when cancelling the order."
|
|
771
691
|
).optional()
|
|
772
|
-
})
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
"
|
|
692
|
+
}).describe(
|
|
693
|
+
"Details about the cancellation of an order.\n\nOnly present if the status is `CANCELED`."
|
|
694
|
+
).optional(),
|
|
695
|
+
lastPaymentStatus: /* @__PURE__ */ z.enum([
|
|
696
|
+
"UNDEFINED",
|
|
697
|
+
"PAID",
|
|
698
|
+
"REFUNDED",
|
|
699
|
+
"FAILED",
|
|
700
|
+
"UNPAID",
|
|
701
|
+
"PENDING",
|
|
702
|
+
"NOT_APPLICABLE"
|
|
703
|
+
]).describe(
|
|
704
|
+
"Status of the last payment for the order.\nUpdated automatically for online orders. Updated manually by the Wix user for offline orders."
|
|
705
|
+
).optional(),
|
|
706
|
+
startDate: /* @__PURE__ */ z.date().describe("Start date and time for the ordered plan.").optional().nullable(),
|
|
707
|
+
endDate: /* @__PURE__ */ z.date().describe(
|
|
708
|
+
"Current end date and time for the ordered plan.\n\n`endDate` may be updated over the course of an order.\nIf the order is paused, it will have a later `endDate` once it is resumed.\n`endDate` may also be postponed.\n\nOmitted if the order is valid until canceled and still `ACTIVE`."
|
|
779
709
|
).optional().nullable(),
|
|
780
|
-
|
|
781
|
-
|
|
710
|
+
pausePeriods: /* @__PURE__ */ z.array(
|
|
711
|
+
/* @__PURE__ */ z.object({
|
|
712
|
+
status: /* @__PURE__ */ z.enum(["UNDEFINED", "ACTIVE", "ENDED"]).describe("Status of the pause period.").optional(),
|
|
713
|
+
pauseDate: /* @__PURE__ */ z.date().describe("Start date and time of the pause period.").optional().nullable(),
|
|
714
|
+
resumeDate: /* @__PURE__ */ z.date().describe(
|
|
715
|
+
"End date and time of the pause period.\n\nOmitted while the pause period remains `ACTIVE`."
|
|
716
|
+
).optional().nullable()
|
|
717
|
+
})
|
|
718
|
+
).optional(),
|
|
719
|
+
freeTrialDays: /* @__PURE__ */ z.number().int().describe(
|
|
720
|
+
"Free trial period for the order, in days.\n\nOnly available for recurring plans."
|
|
721
|
+
).min(1).max(999).optional().nullable(),
|
|
722
|
+
earliestEndDate: /* @__PURE__ */ z.date().describe(
|
|
723
|
+
"Earliest end date and time that the plan for the order can expire.\n\nCalculated by using the original end date plus any pause periods. Omitted if the order is active until canceled. Reserved for future use."
|
|
782
724
|
).optional().nullable(),
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
"
|
|
786
|
-
).
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
).max(16e3).optional().nullable()
|
|
725
|
+
currentCycle: /* @__PURE__ */ z.object({
|
|
726
|
+
index: /* @__PURE__ */ z.number().int().describe(
|
|
727
|
+
"Index of the current payment cycle in the order.\n\n`0` when order is in a free trial period. In all other cases, the index starts with `1`."
|
|
728
|
+
).min(0).optional(),
|
|
729
|
+
startedDate: /* @__PURE__ */ z.date().describe("Start date and time for the current payment cycle.").optional().nullable(),
|
|
730
|
+
endedDate: /* @__PURE__ */ z.date().describe("End date and time for the current payment cycle.").optional().nullable()
|
|
790
731
|
}).describe(
|
|
791
|
-
"
|
|
732
|
+
"Current payment cycle for the order.\n\n`currentCycle` will be omitted if the order's status is `CANCELED` or `ENDED`, or if the `startDate` hasn't passed yet."
|
|
733
|
+
).optional(),
|
|
734
|
+
planName: /* @__PURE__ */ z.string().describe("Plan name at the time of purchase.").optional(),
|
|
735
|
+
planDescription: /* @__PURE__ */ z.string().describe("Plan description at the time of purchase").optional(),
|
|
736
|
+
planPrice: /* @__PURE__ */ z.string().describe("Plan price as it was at the moment of order creation.").optional(),
|
|
737
|
+
_createdDate: /* @__PURE__ */ z.date().describe("Date and time the order was created.").optional().nullable(),
|
|
738
|
+
_updatedDate: /* @__PURE__ */ z.date().describe("Date and time the order was updated.").optional().nullable(),
|
|
739
|
+
formData: /* @__PURE__ */ z.object({
|
|
740
|
+
formId: /* @__PURE__ */ z.string().describe(
|
|
741
|
+
"ID of the [order form](https://dev.wix.com/docs/rest/api-reference/wix-forms/form-submissions/introduction) associated with the plan at checkout."
|
|
742
|
+
).regex(
|
|
743
|
+
/^[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}$/,
|
|
744
|
+
"Must be a valid GUID"
|
|
745
|
+
).optional().nullable(),
|
|
746
|
+
submissionId: /* @__PURE__ */ z.string().describe(
|
|
747
|
+
"ID of a submission to the plan's order form at checkout. Every time a visitor completes the checkout process for a plan, a new submission is created."
|
|
748
|
+
).regex(
|
|
749
|
+
/^[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}$/,
|
|
750
|
+
"Must be a valid GUID"
|
|
751
|
+
).optional().nullable(),
|
|
752
|
+
submissionData: /* @__PURE__ */ z.record(/* @__PURE__ */ z.string(), /* @__PURE__ */ z.any()).describe("Data submitted to the plan's order form at checkout.").optional()
|
|
753
|
+
}).describe(
|
|
754
|
+
"Information about the form submitted during the plan's checkout."
|
|
792
755
|
).optional()
|
|
793
|
-
}).describe(
|
|
794
|
-
"Object containing paging-related data (number of orders returned, offset)."
|
|
795
|
-
).optional()
|
|
796
|
-
});
|
|
797
|
-
var PostponeEndDateRequest = /* @__PURE__ */ z.object({
|
|
798
|
-
_id: z.string().describe("Order ID.").regex(
|
|
799
|
-
/^[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}$/,
|
|
800
|
-
"Must be a valid GUID"
|
|
801
|
-
),
|
|
802
|
-
endDate: z.date().describe(
|
|
803
|
-
"New end date and time.\n\nMust be later than the current end date and time."
|
|
804
|
-
)
|
|
805
|
-
});
|
|
806
|
-
var PostponeEndDateResponse = /* @__PURE__ */ z.object({});
|
|
807
|
-
var CancelOrderRequest = /* @__PURE__ */ z.object({
|
|
808
|
-
_id: z.string().describe("Order ID.").regex(
|
|
809
|
-
/^[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}$/,
|
|
810
|
-
"Must be a valid GUID"
|
|
811
|
-
),
|
|
812
|
-
effectiveAt: z.enum(["UNDEFINED", "IMMEDIATELY", "NEXT_PAYMENT_DATE"])
|
|
813
|
-
});
|
|
814
|
-
var CancelOrderResponse = /* @__PURE__ */ z.object({});
|
|
815
|
-
var MarkAsPaidRequest = /* @__PURE__ */ z.object({
|
|
816
|
-
_id: z.string().describe("Order ID.").regex(
|
|
817
|
-
/^[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}$/,
|
|
818
|
-
"Must be a valid GUID"
|
|
819
|
-
)
|
|
820
|
-
});
|
|
821
|
-
var MarkAsPaidResponse = /* @__PURE__ */ z.object({});
|
|
822
|
-
var PauseOrderRequest = /* @__PURE__ */ z.object({
|
|
823
|
-
_id: z.string().describe("Order ID.").regex(
|
|
824
|
-
/^[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}$/,
|
|
825
|
-
"Must be a valid GUID"
|
|
826
|
-
)
|
|
827
|
-
});
|
|
828
|
-
var PauseOrderResponse = /* @__PURE__ */ z.object({});
|
|
829
|
-
var ResumeOrderRequest = /* @__PURE__ */ z.object({
|
|
830
|
-
_id: z.string().describe("Order ID.").regex(
|
|
831
|
-
/^[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}$/,
|
|
832
|
-
"Must be a valid GUID"
|
|
833
|
-
)
|
|
756
|
+
}).describe("Order.").optional()
|
|
834
757
|
});
|
|
835
|
-
var
|
|
836
|
-
|
|
837
|
-
planId: z.string().describe("Plan ID.").regex(
|
|
758
|
+
var GetOnlineOrderPreviewRequest = /* @__PURE__ */ z.object({
|
|
759
|
+
planId: /* @__PURE__ */ z.string().describe("Plan ID.").regex(
|
|
838
760
|
/^[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}$/,
|
|
839
761
|
"Must be a valid GUID"
|
|
840
762
|
),
|
|
841
|
-
options: z.object({
|
|
842
|
-
startDate: z.date().describe(
|
|
843
|
-
"Start date and time for the plan of the
|
|
763
|
+
options: /* @__PURE__ */ z.object({
|
|
764
|
+
startDate: /* @__PURE__ */ z.date().describe(
|
|
765
|
+
"Start date and time for the plan of the order preview in a `YYYY-MM-DDThh:mm[:ss][.sss]Z` format.\n\nDefault: Current date and time."
|
|
844
766
|
).optional().nullable(),
|
|
845
|
-
couponCode: z.string().describe("Coupon code to apply.").min(1).max(20).optional().nullable()
|
|
846
|
-
onBehalf: z.object({
|
|
847
|
-
memberId: z.string().describe("Member ID.").regex(
|
|
848
|
-
/^[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}$/,
|
|
849
|
-
"Must be a valid GUID"
|
|
850
|
-
),
|
|
851
|
-
orderMethod: z.enum(["UNKNOWN", "MOTO", "POS"]).optional()
|
|
852
|
-
}).describe("Provided if checkout is initiated on buyer's behalf.").optional(),
|
|
853
|
-
submissionId: z.string().describe("Submission ID of the form submitted with this order.").regex(
|
|
854
|
-
/^[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}$/,
|
|
855
|
-
"Must be a valid GUID"
|
|
856
|
-
).optional().nullable()
|
|
767
|
+
couponCode: /* @__PURE__ */ z.string().describe("Coupon code to apply.").min(1).max(20).optional().nullable()
|
|
857
768
|
}).optional()
|
|
858
769
|
});
|
|
859
|
-
var
|
|
860
|
-
order: z.object({
|
|
861
|
-
_id: z.string().describe("Order ID.").regex(
|
|
770
|
+
var GetOnlineOrderPreviewResponse = /* @__PURE__ */ z.object({
|
|
771
|
+
order: /* @__PURE__ */ z.object({
|
|
772
|
+
_id: /* @__PURE__ */ z.string().describe("Order ID.").regex(
|
|
862
773
|
/^[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}$/,
|
|
863
774
|
"Must be a valid GUID"
|
|
864
775
|
).optional(),
|
|
865
|
-
planId: z.string().describe(
|
|
776
|
+
planId: /* @__PURE__ */ z.string().describe(
|
|
866
777
|
"ID of the plan purchased with the order, from the Plans API."
|
|
867
778
|
).regex(
|
|
868
779
|
/^[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}$/,
|
|
869
780
|
"Must be a valid GUID"
|
|
870
781
|
).optional(),
|
|
871
|
-
subscriptionId: z.string().describe(
|
|
782
|
+
subscriptionId: /* @__PURE__ */ z.string().describe(
|
|
872
783
|
"ID of the related Wix subscription.\n\nEvery pricing plan order corresponds to a Wix subscription, including orders for single payment plans. Learn more in\na [Pricing Plans overview](https://support.wix.com/en/article/pricing-plans-an-overview#create-plans-to-suit-your-business)."
|
|
873
784
|
).regex(
|
|
874
785
|
/^[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}$/,
|
|
875
786
|
"Must be a valid GUID"
|
|
876
787
|
).optional(),
|
|
877
|
-
wixPayOrderId: z.string().describe(
|
|
788
|
+
wixPayOrderId: /* @__PURE__ */ z.string().describe(
|
|
878
789
|
"Wix Pay order ID.\n\nProvided by Wix whether the order is created online or offline. The field is omitted when the order is free."
|
|
879
790
|
).regex(
|
|
880
791
|
/^[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}$/,
|
|
881
792
|
"Must be a valid GUID"
|
|
882
793
|
).optional().nullable(),
|
|
883
|
-
buyer: z.object({
|
|
884
|
-
memberId: z.string().describe("Member ID for a Wix site member, from the Members API.").regex(
|
|
794
|
+
buyer: /* @__PURE__ */ z.object({
|
|
795
|
+
memberId: /* @__PURE__ */ z.string().describe("Member ID for a Wix site member, from the Members API.").regex(
|
|
885
796
|
/^[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}$/,
|
|
886
797
|
"Must be a valid GUID"
|
|
887
798
|
).optional(),
|
|
888
|
-
contactId: z.string().describe(
|
|
799
|
+
contactId: /* @__PURE__ */ z.string().describe(
|
|
889
800
|
"Contact ID for a Wix site contact, from the Contacts API."
|
|
890
801
|
).regex(
|
|
891
802
|
/^[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}$/,
|
|
@@ -894,40 +805,40 @@ var CreateOnlineOrderResponse = /* @__PURE__ */ z.object({
|
|
|
894
805
|
}).describe(
|
|
895
806
|
"The buyer's IDs. Includes `memberId` and `contactId`.\n\nCurrently, Pricing Plan purchases are limited to members only. `contactId` is returned,\nbut a buyer will not be able to purchase a plan without a `memberId`."
|
|
896
807
|
).optional(),
|
|
897
|
-
priceDetails: z.intersection(
|
|
898
|
-
z.object({
|
|
899
|
-
subtotal: z.string().describe(
|
|
808
|
+
priceDetails: /* @__PURE__ */ z.intersection(
|
|
809
|
+
/* @__PURE__ */ z.object({
|
|
810
|
+
subtotal: /* @__PURE__ */ z.string().describe(
|
|
900
811
|
'Price of the order excluding tax, specified as a monetary amount. for example, `"9.99"`.'
|
|
901
812
|
).optional(),
|
|
902
|
-
discount: z.string().describe("Total discount applied.").optional(),
|
|
903
|
-
tax: z.object({
|
|
904
|
-
name: z.string().describe("Name of the tax. For example, VAT.").optional(),
|
|
905
|
-
includedInPrice: z.boolean().describe(
|
|
813
|
+
discount: /* @__PURE__ */ z.string().describe("Total discount applied.").optional(),
|
|
814
|
+
tax: /* @__PURE__ */ z.object({
|
|
815
|
+
name: /* @__PURE__ */ z.string().describe("Name of the tax. For example, VAT.").optional(),
|
|
816
|
+
includedInPrice: /* @__PURE__ */ z.boolean().describe(
|
|
906
817
|
"Whether tax is included in the original price. When `false`, tax is added at checkout."
|
|
907
818
|
).optional(),
|
|
908
|
-
rate: z.string().describe(
|
|
819
|
+
rate: /* @__PURE__ */ z.string().describe(
|
|
909
820
|
'Tax rate percentage, as a number between 0 and 100. For example, a 7% tax rate is `"7.00"`.'
|
|
910
821
|
).optional(),
|
|
911
|
-
amount: z.string().describe(
|
|
822
|
+
amount: /* @__PURE__ */ z.string().describe(
|
|
912
823
|
'Total tax, specified as a monetary amount. For example, `"3.99"`.'
|
|
913
824
|
).optional()
|
|
914
825
|
}).describe("Tax applied.").optional(),
|
|
915
|
-
total: z.string().describe(
|
|
826
|
+
total: /* @__PURE__ */ z.string().describe(
|
|
916
827
|
'Price after tax and discount is applied, specified as a monetary amount. For example, `"13.98"`.\n\nIf no tax is applied, the amount is the same as `subtotal`.'
|
|
917
828
|
).optional(),
|
|
918
|
-
planPrice: z.string().describe("Plan price as it was at the moment of order creation.").optional(),
|
|
919
|
-
currency: z.string().describe(
|
|
829
|
+
planPrice: /* @__PURE__ */ z.string().describe("Plan price as it was at the moment of order creation.").optional(),
|
|
830
|
+
currency: /* @__PURE__ */ z.string().describe(
|
|
920
831
|
"Currency code. Must be valid ISO 4217 currency code (e.g., USD)."
|
|
921
832
|
).optional(),
|
|
922
|
-
freeTrialDays: z.number().int().describe(
|
|
833
|
+
freeTrialDays: /* @__PURE__ */ z.number().int().describe(
|
|
923
834
|
"Free trial period for the order in days. Only available for recurring plans."
|
|
924
835
|
).min(1).max(999).optional().nullable(),
|
|
925
|
-
coupon: z.object({
|
|
926
|
-
code: z.string().describe("Code of the applied coupon.").min(1).max(20).optional(),
|
|
927
|
-
amount: z.string().describe(
|
|
836
|
+
coupon: /* @__PURE__ */ z.object({
|
|
837
|
+
code: /* @__PURE__ */ z.string().describe("Code of the applied coupon.").min(1).max(20).optional(),
|
|
838
|
+
amount: /* @__PURE__ */ z.string().describe(
|
|
928
839
|
"Total discount of the coupon, as a monetary amount."
|
|
929
840
|
).optional(),
|
|
930
|
-
_id: z.string().describe("Coupon ID.").regex(
|
|
841
|
+
_id: /* @__PURE__ */ z.string().describe("Coupon ID.").regex(
|
|
931
842
|
/^[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}$/,
|
|
932
843
|
"Must be a valid GUID"
|
|
933
844
|
).optional()
|
|
@@ -935,45 +846,45 @@ var CreateOnlineOrderResponse = /* @__PURE__ */ z.object({
|
|
|
935
846
|
"Coupon applied to the order. Empty means no coupon was applied."
|
|
936
847
|
).optional()
|
|
937
848
|
}),
|
|
938
|
-
z.xor([
|
|
939
|
-
z.object({
|
|
940
|
-
subscription: z.never().optional(),
|
|
941
|
-
singlePaymentForDuration: z.never().optional(),
|
|
942
|
-
singlePaymentUnlimited: z.never().optional()
|
|
849
|
+
/* @__PURE__ */ z.xor([
|
|
850
|
+
/* @__PURE__ */ z.object({
|
|
851
|
+
subscription: /* @__PURE__ */ z.never().optional(),
|
|
852
|
+
singlePaymentForDuration: /* @__PURE__ */ z.never().optional(),
|
|
853
|
+
singlePaymentUnlimited: /* @__PURE__ */ z.never().optional()
|
|
943
854
|
}),
|
|
944
|
-
z.object({
|
|
945
|
-
singlePaymentForDuration: z.never().optional(),
|
|
946
|
-
singlePaymentUnlimited: z.never().optional(),
|
|
947
|
-
subscription: z.object({
|
|
948
|
-
cycleDuration: z.object({
|
|
949
|
-
count: z.number().int().describe(
|
|
855
|
+
/* @__PURE__ */ z.object({
|
|
856
|
+
singlePaymentForDuration: /* @__PURE__ */ z.never().optional(),
|
|
857
|
+
singlePaymentUnlimited: /* @__PURE__ */ z.never().optional(),
|
|
858
|
+
subscription: /* @__PURE__ */ z.object({
|
|
859
|
+
cycleDuration: /* @__PURE__ */ z.object({
|
|
860
|
+
count: /* @__PURE__ */ z.number().int().describe(
|
|
950
861
|
"Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`."
|
|
951
862
|
).min(1).optional().nullable(),
|
|
952
|
-
unit: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
|
|
863
|
+
unit: /* @__PURE__ */ z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
|
|
953
864
|
}).describe(
|
|
954
865
|
"Number of payment cycles the subscription is valid for.\n`0` for unlimited plans or for plans that are valid until canceled."
|
|
955
866
|
).optional(),
|
|
956
|
-
cycleCount: z.number().int().describe(
|
|
867
|
+
cycleCount: /* @__PURE__ */ z.number().int().describe(
|
|
957
868
|
"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."
|
|
958
869
|
).min(0).max(2e3).optional().nullable()
|
|
959
870
|
}).describe("Order has recurring payments.")
|
|
960
871
|
}),
|
|
961
|
-
z.object({
|
|
962
|
-
subscription: z.never().optional(),
|
|
963
|
-
singlePaymentUnlimited: z.never().optional(),
|
|
964
|
-
singlePaymentForDuration: z.object({
|
|
965
|
-
count: z.number().int().describe(
|
|
872
|
+
/* @__PURE__ */ z.object({
|
|
873
|
+
subscription: /* @__PURE__ */ z.never().optional(),
|
|
874
|
+
singlePaymentUnlimited: /* @__PURE__ */ z.never().optional(),
|
|
875
|
+
singlePaymentForDuration: /* @__PURE__ */ z.object({
|
|
876
|
+
count: /* @__PURE__ */ z.number().int().describe(
|
|
966
877
|
"Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`."
|
|
967
878
|
).min(1).optional().nullable(),
|
|
968
|
-
unit: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
|
|
879
|
+
unit: /* @__PURE__ */ z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
|
|
969
880
|
}).describe(
|
|
970
881
|
"One-time payment. Order is valid for a specified duration."
|
|
971
882
|
)
|
|
972
883
|
}),
|
|
973
|
-
z.object({
|
|
974
|
-
subscription: z.never().optional(),
|
|
975
|
-
singlePaymentForDuration: z.never().optional(),
|
|
976
|
-
singlePaymentUnlimited: z.boolean().describe(
|
|
884
|
+
/* @__PURE__ */ z.object({
|
|
885
|
+
subscription: /* @__PURE__ */ z.never().optional(),
|
|
886
|
+
singlePaymentForDuration: /* @__PURE__ */ z.never().optional(),
|
|
887
|
+
singlePaymentUnlimited: /* @__PURE__ */ z.boolean().describe(
|
|
977
888
|
"One-time payment. Order is valid until it is canceled."
|
|
978
889
|
)
|
|
979
890
|
})
|
|
@@ -981,105 +892,105 @@ var CreateOnlineOrderResponse = /* @__PURE__ */ z.object({
|
|
|
981
892
|
).describe(
|
|
982
893
|
"__Deprecated.__ Use `pricing` instead. This property will be removed on September 30, 2022."
|
|
983
894
|
).optional(),
|
|
984
|
-
pricing: z.intersection(
|
|
985
|
-
z.object({
|
|
986
|
-
prices: z.array(
|
|
987
|
-
z.object({
|
|
988
|
-
duration: z.object({
|
|
989
|
-
cycleFrom: z.number().int().describe(
|
|
895
|
+
pricing: /* @__PURE__ */ z.intersection(
|
|
896
|
+
/* @__PURE__ */ z.object({
|
|
897
|
+
prices: /* @__PURE__ */ z.array(
|
|
898
|
+
/* @__PURE__ */ z.object({
|
|
899
|
+
duration: /* @__PURE__ */ z.object({
|
|
900
|
+
cycleFrom: /* @__PURE__ */ z.number().int().describe(
|
|
990
901
|
"Price starts to apply with this cycle.\n\n`1` is the first payment cycle for all pricing models."
|
|
991
902
|
).optional(),
|
|
992
|
-
numberOfCycles: z.number().int().describe(
|
|
903
|
+
numberOfCycles: /* @__PURE__ */ z.number().int().describe(
|
|
993
904
|
"Amount of cycles to apply price for.\n\nFor `subscription` pricing models with a finite number of cycles, the `numberOfCycles` is the same as `pricing.subscription.cycleCount`.\n\nFor `subscription` pricing models that are unlimited or until-canceled, the `numberOfCycles` is not returned.\n\nFor `singlePaymentForDuration` and `singlePaymentUnlimited` pricing models, the `numberOfCycles` is `1`."
|
|
994
905
|
).optional().nullable()
|
|
995
906
|
}).describe(
|
|
996
907
|
"Cycle duration to apply `price` for.\n\nUse with all pricing models.\nCan apply the same price to multiple payment cycles."
|
|
997
908
|
).optional(),
|
|
998
|
-
price: z.object({
|
|
999
|
-
subtotal: z.string().describe(
|
|
909
|
+
price: /* @__PURE__ */ z.object({
|
|
910
|
+
subtotal: /* @__PURE__ */ z.string().describe(
|
|
1000
911
|
'Price of the order excluding tax, specified as a monetary amount. For example, `"9.99"`.'
|
|
1001
912
|
).optional(),
|
|
1002
|
-
coupon: z.object({
|
|
1003
|
-
code: z.string().describe("Code of the applied coupon.").min(1).max(20).optional(),
|
|
1004
|
-
amount: z.string().describe(
|
|
913
|
+
coupon: /* @__PURE__ */ z.object({
|
|
914
|
+
code: /* @__PURE__ */ z.string().describe("Code of the applied coupon.").min(1).max(20).optional(),
|
|
915
|
+
amount: /* @__PURE__ */ z.string().describe(
|
|
1005
916
|
"Total discount of the coupon, as a monetary amount."
|
|
1006
917
|
).optional(),
|
|
1007
|
-
_id: z.string().describe("Coupon ID.").regex(
|
|
918
|
+
_id: /* @__PURE__ */ z.string().describe("Coupon ID.").regex(
|
|
1008
919
|
/^[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}$/,
|
|
1009
920
|
"Must be a valid GUID"
|
|
1010
921
|
).optional()
|
|
1011
922
|
}).describe(
|
|
1012
923
|
"Coupon applied to the order, from the Coupons API."
|
|
1013
924
|
).optional(),
|
|
1014
|
-
discount: z.string().describe("Total discount applied to the order.").optional(),
|
|
1015
|
-
tax: z.object({
|
|
1016
|
-
name: z.string().describe("Name of the tax. For example, VAT.").optional(),
|
|
1017
|
-
includedInPrice: z.boolean().describe(
|
|
925
|
+
discount: /* @__PURE__ */ z.string().describe("Total discount applied to the order.").optional(),
|
|
926
|
+
tax: /* @__PURE__ */ z.object({
|
|
927
|
+
name: /* @__PURE__ */ z.string().describe("Name of the tax. For example, VAT.").optional(),
|
|
928
|
+
includedInPrice: /* @__PURE__ */ z.boolean().describe(
|
|
1018
929
|
"Whether tax is included in the original price. When `false`, tax is added at checkout."
|
|
1019
930
|
).optional(),
|
|
1020
|
-
rate: z.string().describe(
|
|
931
|
+
rate: /* @__PURE__ */ z.string().describe(
|
|
1021
932
|
'Tax rate percentage, as a number between 0 and 100. For example, a 7% tax rate is `"7.00"`.'
|
|
1022
933
|
).optional(),
|
|
1023
|
-
amount: z.string().describe(
|
|
934
|
+
amount: /* @__PURE__ */ z.string().describe(
|
|
1024
935
|
'Total tax, specified as a monetary amount. For example, `"3.99"`.'
|
|
1025
936
|
).optional()
|
|
1026
937
|
}).describe(
|
|
1027
938
|
"Tax applied to the order.\n\nTax is only applied if the site [has it configured](https://support.wix.com/en/article/pricing-plans-setting-up-tax-collection)."
|
|
1028
939
|
).optional(),
|
|
1029
|
-
total: z.string().describe(
|
|
940
|
+
total: /* @__PURE__ */ z.string().describe(
|
|
1030
941
|
'Price after tax and discount is applied. Specified as a monetary amount, for example, `"13.98"`.\n\nIf no tax is applied, the amount is the same as `subtotal`.'
|
|
1031
942
|
).optional(),
|
|
1032
|
-
currency: z.string().describe(
|
|
943
|
+
currency: /* @__PURE__ */ z.string().describe(
|
|
1033
944
|
"Three-letter currency code in\n[ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format."
|
|
1034
945
|
).optional(),
|
|
1035
|
-
proration: z.string().describe(
|
|
946
|
+
proration: /* @__PURE__ */ z.string().describe(
|
|
1036
947
|
"Price change after billing date was change and price was adjusted. Could be positive and negative values."
|
|
1037
948
|
).optional()
|
|
1038
949
|
}).describe("Order price.").optional()
|
|
1039
950
|
})
|
|
1040
951
|
).optional()
|
|
1041
952
|
}),
|
|
1042
|
-
z.xor([
|
|
1043
|
-
z.object({
|
|
1044
|
-
subscription: z.never().optional(),
|
|
1045
|
-
singlePaymentForDuration: z.never().optional(),
|
|
1046
|
-
singlePaymentUnlimited: z.never().optional()
|
|
953
|
+
/* @__PURE__ */ z.xor([
|
|
954
|
+
/* @__PURE__ */ z.object({
|
|
955
|
+
subscription: /* @__PURE__ */ z.never().optional(),
|
|
956
|
+
singlePaymentForDuration: /* @__PURE__ */ z.never().optional(),
|
|
957
|
+
singlePaymentUnlimited: /* @__PURE__ */ z.never().optional()
|
|
1047
958
|
}),
|
|
1048
|
-
z.object({
|
|
1049
|
-
singlePaymentForDuration: z.never().optional(),
|
|
1050
|
-
singlePaymentUnlimited: z.never().optional(),
|
|
1051
|
-
subscription: z.object({
|
|
1052
|
-
cycleDuration: z.object({
|
|
1053
|
-
count: z.number().int().describe(
|
|
959
|
+
/* @__PURE__ */ z.object({
|
|
960
|
+
singlePaymentForDuration: /* @__PURE__ */ z.never().optional(),
|
|
961
|
+
singlePaymentUnlimited: /* @__PURE__ */ z.never().optional(),
|
|
962
|
+
subscription: /* @__PURE__ */ z.object({
|
|
963
|
+
cycleDuration: /* @__PURE__ */ z.object({
|
|
964
|
+
count: /* @__PURE__ */ z.number().int().describe(
|
|
1054
965
|
"Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`."
|
|
1055
966
|
).min(1).optional().nullable(),
|
|
1056
|
-
unit: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
|
|
967
|
+
unit: /* @__PURE__ */ z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
|
|
1057
968
|
}).describe(
|
|
1058
969
|
"Number of payment cycles the subscription is valid for.\n`0` for unlimited plans or for plans that are valid until canceled."
|
|
1059
970
|
).optional(),
|
|
1060
|
-
cycleCount: z.number().int().describe(
|
|
971
|
+
cycleCount: /* @__PURE__ */ z.number().int().describe(
|
|
1061
972
|
"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."
|
|
1062
973
|
).min(0).max(2e3).optional().nullable()
|
|
1063
974
|
}).describe(
|
|
1064
975
|
"Pricing model for an order with recurring payment cycles."
|
|
1065
976
|
)
|
|
1066
977
|
}),
|
|
1067
|
-
z.object({
|
|
1068
|
-
subscription: z.never().optional(),
|
|
1069
|
-
singlePaymentUnlimited: z.never().optional(),
|
|
1070
|
-
singlePaymentForDuration: z.object({
|
|
1071
|
-
count: z.number().int().describe(
|
|
978
|
+
/* @__PURE__ */ z.object({
|
|
979
|
+
subscription: /* @__PURE__ */ z.never().optional(),
|
|
980
|
+
singlePaymentUnlimited: /* @__PURE__ */ z.never().optional(),
|
|
981
|
+
singlePaymentForDuration: /* @__PURE__ */ z.object({
|
|
982
|
+
count: /* @__PURE__ */ z.number().int().describe(
|
|
1072
983
|
"Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`."
|
|
1073
984
|
).min(1).optional().nullable(),
|
|
1074
|
-
unit: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
|
|
985
|
+
unit: /* @__PURE__ */ z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
|
|
1075
986
|
}).describe(
|
|
1076
987
|
"Pricing model for an order with a one-time payment and the order is valid for a specific amount of time."
|
|
1077
988
|
)
|
|
1078
989
|
}),
|
|
1079
|
-
z.object({
|
|
1080
|
-
subscription: z.never().optional(),
|
|
1081
|
-
singlePaymentForDuration: z.never().optional(),
|
|
1082
|
-
singlePaymentUnlimited: z.boolean().describe(
|
|
990
|
+
/* @__PURE__ */ z.object({
|
|
991
|
+
subscription: /* @__PURE__ */ z.never().optional(),
|
|
992
|
+
singlePaymentForDuration: /* @__PURE__ */ z.never().optional(),
|
|
993
|
+
singlePaymentUnlimited: /* @__PURE__ */ z.boolean().describe(
|
|
1083
994
|
"Pricing model for an order with a one-time payment and the order is valid until canceled."
|
|
1084
995
|
)
|
|
1085
996
|
})
|
|
@@ -1087,8 +998,8 @@ var CreateOnlineOrderResponse = /* @__PURE__ */ z.object({
|
|
|
1087
998
|
).describe(
|
|
1088
999
|
"Order pricing model, price, and payment schedule.\n\nLearn more about [pricing models](https://dev.wix.com/api/rest/wix-pricing-plans/pricing-plans/introduction#wix-pricing-plans_pricing-plans_introduction_pricing-models)."
|
|
1089
1000
|
).optional(),
|
|
1090
|
-
type: z.enum(["UNDEFINED", "ONLINE", "OFFLINE", "EXTERNAL"]).describe("How the order was processed.").optional(),
|
|
1091
|
-
status: z.enum([
|
|
1001
|
+
type: /* @__PURE__ */ z.enum(["UNDEFINED", "ONLINE", "OFFLINE", "EXTERNAL"]).describe("How the order was processed.").optional(),
|
|
1002
|
+
status: /* @__PURE__ */ z.enum([
|
|
1092
1003
|
"UNDEFINED",
|
|
1093
1004
|
"DRAFT",
|
|
1094
1005
|
"PENDING",
|
|
@@ -1097,12 +1008,12 @@ var CreateOnlineOrderResponse = /* @__PURE__ */ z.object({
|
|
|
1097
1008
|
"ENDED",
|
|
1098
1009
|
"CANCELED"
|
|
1099
1010
|
]).describe("Status of the order.").optional(),
|
|
1100
|
-
autoRenewCanceled: z.boolean().describe(
|
|
1011
|
+
autoRenewCanceled: /* @__PURE__ */ z.boolean().describe(
|
|
1101
1012
|
"Whether the order will be canceled at the next payment date.\n\nIf `true`, the order status will be `CANCELED` and the next payment won't be charged. Omitted for single payment orders."
|
|
1102
1013
|
).optional().nullable(),
|
|
1103
|
-
cancellation: z.object({
|
|
1104
|
-
requestedDate: z.date().describe("Date and time the cancellation was requested.").optional().nullable(),
|
|
1105
|
-
cause: z.enum([
|
|
1014
|
+
cancellation: /* @__PURE__ */ z.object({
|
|
1015
|
+
requestedDate: /* @__PURE__ */ z.date().describe("Date and time the cancellation was requested.").optional().nullable(),
|
|
1016
|
+
cause: /* @__PURE__ */ z.enum([
|
|
1106
1017
|
"UNDEFINED",
|
|
1107
1018
|
"OWNER_ACTION",
|
|
1108
1019
|
"MEMBER_ACTION",
|
|
@@ -1110,13 +1021,13 @@ var CreateOnlineOrderResponse = /* @__PURE__ */ z.object({
|
|
|
1110
1021
|
"PAYMENT_SETUP_FAILURE",
|
|
1111
1022
|
"UNKNOWN"
|
|
1112
1023
|
]).describe("Reason for the cancellation.").optional(),
|
|
1113
|
-
effectiveAt: z.enum(["UNDEFINED", "IMMEDIATELY", "NEXT_PAYMENT_DATE"]).describe(
|
|
1024
|
+
effectiveAt: /* @__PURE__ */ z.enum(["UNDEFINED", "IMMEDIATELY", "NEXT_PAYMENT_DATE"]).describe(
|
|
1114
1025
|
"When the cancellation takes effect. Set when cancelling the order."
|
|
1115
1026
|
).optional()
|
|
1116
1027
|
}).describe(
|
|
1117
1028
|
"Details about the cancellation of an order.\n\nOnly present if the status is `CANCELED`."
|
|
1118
1029
|
).optional(),
|
|
1119
|
-
lastPaymentStatus: z.enum([
|
|
1030
|
+
lastPaymentStatus: /* @__PURE__ */ z.enum([
|
|
1120
1031
|
"UNDEFINED",
|
|
1121
1032
|
"PAID",
|
|
1122
1033
|
"REFUNDED",
|
|
@@ -1127,109 +1038,111 @@ var CreateOnlineOrderResponse = /* @__PURE__ */ z.object({
|
|
|
1127
1038
|
]).describe(
|
|
1128
1039
|
"Status of the last payment for the order.\nUpdated automatically for online orders. Updated manually by the Wix user for offline orders."
|
|
1129
1040
|
).optional(),
|
|
1130
|
-
startDate: z.date().describe("Start date and time for the ordered plan.").optional().nullable(),
|
|
1131
|
-
endDate: z.date().describe(
|
|
1041
|
+
startDate: /* @__PURE__ */ z.date().describe("Start date and time for the ordered plan.").optional().nullable(),
|
|
1042
|
+
endDate: /* @__PURE__ */ z.date().describe(
|
|
1132
1043
|
"Current end date and time for the ordered plan.\n\n`endDate` may be updated over the course of an order.\nIf the order is paused, it will have a later `endDate` once it is resumed.\n`endDate` may also be postponed.\n\nOmitted if the order is valid until canceled and still `ACTIVE`."
|
|
1133
1044
|
).optional().nullable(),
|
|
1134
|
-
pausePeriods: z.array(
|
|
1135
|
-
z.object({
|
|
1136
|
-
status: z.enum(["UNDEFINED", "ACTIVE", "ENDED"]).describe("Status of the pause period.").optional(),
|
|
1137
|
-
pauseDate: z.date().describe("Start date and time of the pause period.").optional().nullable(),
|
|
1138
|
-
resumeDate: z.date().describe(
|
|
1045
|
+
pausePeriods: /* @__PURE__ */ z.array(
|
|
1046
|
+
/* @__PURE__ */ z.object({
|
|
1047
|
+
status: /* @__PURE__ */ z.enum(["UNDEFINED", "ACTIVE", "ENDED"]).describe("Status of the pause period.").optional(),
|
|
1048
|
+
pauseDate: /* @__PURE__ */ z.date().describe("Start date and time of the pause period.").optional().nullable(),
|
|
1049
|
+
resumeDate: /* @__PURE__ */ z.date().describe(
|
|
1139
1050
|
"End date and time of the pause period.\n\nOmitted while the pause period remains `ACTIVE`."
|
|
1140
1051
|
).optional().nullable()
|
|
1141
1052
|
})
|
|
1142
1053
|
).optional(),
|
|
1143
|
-
freeTrialDays: z.number().int().describe(
|
|
1054
|
+
freeTrialDays: /* @__PURE__ */ z.number().int().describe(
|
|
1144
1055
|
"Free trial period for the order, in days.\n\nOnly available for recurring plans."
|
|
1145
1056
|
).min(1).max(999).optional().nullable(),
|
|
1146
|
-
earliestEndDate: z.date().describe(
|
|
1057
|
+
earliestEndDate: /* @__PURE__ */ z.date().describe(
|
|
1147
1058
|
"Earliest end date and time that the plan for the order can expire.\n\nCalculated by using the original end date plus any pause periods. Omitted if the order is active until canceled. Reserved for future use."
|
|
1148
1059
|
).optional().nullable(),
|
|
1149
|
-
currentCycle: z.object({
|
|
1150
|
-
index: z.number().int().describe(
|
|
1060
|
+
currentCycle: /* @__PURE__ */ z.object({
|
|
1061
|
+
index: /* @__PURE__ */ z.number().int().describe(
|
|
1151
1062
|
"Index of the current payment cycle in the order.\n\n`0` when order is in a free trial period. In all other cases, the index starts with `1`."
|
|
1152
1063
|
).min(0).optional(),
|
|
1153
|
-
startedDate: z.date().describe("Start date and time for the current payment cycle.").optional().nullable(),
|
|
1154
|
-
endedDate: z.date().describe("End date and time for the current payment cycle.").optional().nullable()
|
|
1064
|
+
startedDate: /* @__PURE__ */ z.date().describe("Start date and time for the current payment cycle.").optional().nullable(),
|
|
1065
|
+
endedDate: /* @__PURE__ */ z.date().describe("End date and time for the current payment cycle.").optional().nullable()
|
|
1155
1066
|
}).describe(
|
|
1156
1067
|
"Current payment cycle for the order.\n\n`currentCycle` will be omitted if the order's status is `CANCELED` or `ENDED`, or if the `startDate` hasn't passed yet."
|
|
1157
1068
|
).optional(),
|
|
1158
|
-
planName: z.string().describe("Plan name at the time of purchase.").optional(),
|
|
1159
|
-
planDescription: z.string().describe("Plan description at the time of purchase").optional(),
|
|
1160
|
-
planPrice: z.string().describe("Plan price as it was at the moment of order creation.").optional(),
|
|
1161
|
-
_createdDate: z.date().describe("Date and time the order was created.").optional().nullable(),
|
|
1162
|
-
_updatedDate: z.date().describe("Date and time the order was updated.").optional().nullable(),
|
|
1163
|
-
formData: z.object({
|
|
1164
|
-
formId: z.string().describe(
|
|
1069
|
+
planName: /* @__PURE__ */ z.string().describe("Plan name at the time of purchase.").optional(),
|
|
1070
|
+
planDescription: /* @__PURE__ */ z.string().describe("Plan description at the time of purchase").optional(),
|
|
1071
|
+
planPrice: /* @__PURE__ */ z.string().describe("Plan price as it was at the moment of order creation.").optional(),
|
|
1072
|
+
_createdDate: /* @__PURE__ */ z.date().describe("Date and time the order was created.").optional().nullable(),
|
|
1073
|
+
_updatedDate: /* @__PURE__ */ z.date().describe("Date and time the order was updated.").optional().nullable(),
|
|
1074
|
+
formData: /* @__PURE__ */ z.object({
|
|
1075
|
+
formId: /* @__PURE__ */ z.string().describe(
|
|
1165
1076
|
"ID of the [order form](https://dev.wix.com/docs/rest/api-reference/wix-forms/form-submissions/introduction) associated with the plan at checkout."
|
|
1166
1077
|
).regex(
|
|
1167
1078
|
/^[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}$/,
|
|
1168
1079
|
"Must be a valid GUID"
|
|
1169
1080
|
).optional().nullable(),
|
|
1170
|
-
submissionId: z.string().describe(
|
|
1081
|
+
submissionId: /* @__PURE__ */ z.string().describe(
|
|
1171
1082
|
"ID of a submission to the plan's order form at checkout. Every time a visitor completes the checkout process for a plan, a new submission is created."
|
|
1172
1083
|
).regex(
|
|
1173
1084
|
/^[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}$/,
|
|
1174
1085
|
"Must be a valid GUID"
|
|
1175
1086
|
).optional().nullable(),
|
|
1176
|
-
submissionData: z.record(z.string(), z.any()).describe("Data submitted to the plan's order form at checkout.").optional()
|
|
1087
|
+
submissionData: /* @__PURE__ */ z.record(/* @__PURE__ */ z.string(), /* @__PURE__ */ z.any()).describe("Data submitted to the plan's order form at checkout.").optional()
|
|
1177
1088
|
}).describe(
|
|
1178
1089
|
"Information about the form submitted during the plan's checkout."
|
|
1179
1090
|
).optional()
|
|
1180
|
-
}).describe(
|
|
1091
|
+
}).describe(
|
|
1092
|
+
"Order preview. This field is undefined if the member has already reached the purchase limit for the order's plan."
|
|
1093
|
+
).optional(),
|
|
1094
|
+
purchaseLimitExceeded: /* @__PURE__ */ z.boolean().describe(
|
|
1095
|
+
"Whether the member has already reached purchase limit for the order's plan."
|
|
1096
|
+
).optional()
|
|
1181
1097
|
});
|
|
1182
|
-
var
|
|
1183
|
-
planId: z.string().describe("ID of the plan
|
|
1098
|
+
var GetOfflineOrderPreviewRequest = /* @__PURE__ */ z.object({
|
|
1099
|
+
planId: /* @__PURE__ */ z.string().describe("ID of the plan of the previewed order.").regex(
|
|
1184
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}$/,
|
|
1185
1101
|
"Must be a valid GUID"
|
|
1186
1102
|
),
|
|
1187
|
-
memberId: z.string().describe(
|
|
1103
|
+
memberId: /* @__PURE__ */ z.string().describe(
|
|
1104
|
+
"Member ID of the buyer the previewed order is for, from the Members API."
|
|
1105
|
+
).regex(
|
|
1188
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}$/,
|
|
1189
1107
|
"Must be a valid GUID"
|
|
1190
1108
|
),
|
|
1191
|
-
options: z.object({
|
|
1192
|
-
startDate: z.date().describe(
|
|
1193
|
-
"Start date and time for the
|
|
1109
|
+
options: /* @__PURE__ */ z.object({
|
|
1110
|
+
startDate: /* @__PURE__ */ z.date().describe(
|
|
1111
|
+
"Start date and time for plan of the previewed order in a `YYYY-MM-DDThh:mm[:ss][.sss]Z` format.\n\nDefault: Current date and time."
|
|
1194
1112
|
).optional().nullable(),
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
submissionId: z.string().describe("Form submission ID that was submitted with the order.").regex(
|
|
1198
|
-
/^[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}$/,
|
|
1199
|
-
"Must be a valid GUID"
|
|
1200
|
-
).optional().nullable()
|
|
1201
|
-
}).describe("Options for creating an offline order. ").optional()
|
|
1113
|
+
couponCode: /* @__PURE__ */ z.string().describe("Coupon code to apply, from the Coupons API.").min(1).max(20).optional().nullable()
|
|
1114
|
+
}).describe("Options for previewing the offline order. ").optional()
|
|
1202
1115
|
});
|
|
1203
|
-
var
|
|
1204
|
-
order: z.object({
|
|
1205
|
-
_id: z.string().describe("Order ID.").regex(
|
|
1116
|
+
var GetOfflineOrderPreviewResponse = /* @__PURE__ */ z.object({
|
|
1117
|
+
order: /* @__PURE__ */ z.object({
|
|
1118
|
+
_id: /* @__PURE__ */ z.string().describe("Order ID.").regex(
|
|
1206
1119
|
/^[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}$/,
|
|
1207
1120
|
"Must be a valid GUID"
|
|
1208
1121
|
).optional(),
|
|
1209
|
-
planId: z.string().describe(
|
|
1122
|
+
planId: /* @__PURE__ */ z.string().describe(
|
|
1210
1123
|
"ID of the plan purchased with the order, from the Plans API."
|
|
1211
1124
|
).regex(
|
|
1212
1125
|
/^[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}$/,
|
|
1213
1126
|
"Must be a valid GUID"
|
|
1214
1127
|
).optional(),
|
|
1215
|
-
subscriptionId: z.string().describe(
|
|
1128
|
+
subscriptionId: /* @__PURE__ */ z.string().describe(
|
|
1216
1129
|
"ID of the related Wix subscription.\n\nEvery pricing plan order corresponds to a Wix subscription, including orders for single payment plans. Learn more in\na [Pricing Plans overview](https://support.wix.com/en/article/pricing-plans-an-overview#create-plans-to-suit-your-business)."
|
|
1217
1130
|
).regex(
|
|
1218
1131
|
/^[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}$/,
|
|
1219
1132
|
"Must be a valid GUID"
|
|
1220
1133
|
).optional(),
|
|
1221
|
-
wixPayOrderId: z.string().describe(
|
|
1134
|
+
wixPayOrderId: /* @__PURE__ */ z.string().describe(
|
|
1222
1135
|
"Wix Pay order ID.\n\nProvided by Wix whether the order is created online or offline. The field is omitted when the order is free."
|
|
1223
1136
|
).regex(
|
|
1224
1137
|
/^[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}$/,
|
|
1225
1138
|
"Must be a valid GUID"
|
|
1226
1139
|
).optional().nullable(),
|
|
1227
|
-
buyer: z.object({
|
|
1228
|
-
memberId: z.string().describe("Member ID for a Wix site member, from the Members API.").regex(
|
|
1140
|
+
buyer: /* @__PURE__ */ z.object({
|
|
1141
|
+
memberId: /* @__PURE__ */ z.string().describe("Member ID for a Wix site member, from the Members API.").regex(
|
|
1229
1142
|
/^[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}$/,
|
|
1230
1143
|
"Must be a valid GUID"
|
|
1231
1144
|
).optional(),
|
|
1232
|
-
contactId: z.string().describe(
|
|
1145
|
+
contactId: /* @__PURE__ */ z.string().describe(
|
|
1233
1146
|
"Contact ID for a Wix site contact, from the Contacts API."
|
|
1234
1147
|
).regex(
|
|
1235
1148
|
/^[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}$/,
|
|
@@ -1238,40 +1151,40 @@ var CreateOfflineOrderResponse = /* @__PURE__ */ z.object({
|
|
|
1238
1151
|
}).describe(
|
|
1239
1152
|
"The buyer's IDs. Includes `memberId` and `contactId`.\n\nCurrently, Pricing Plan purchases are limited to members only. `contactId` is returned,\nbut a buyer will not be able to purchase a plan without a `memberId`."
|
|
1240
1153
|
).optional(),
|
|
1241
|
-
priceDetails: z.intersection(
|
|
1242
|
-
z.object({
|
|
1243
|
-
subtotal: z.string().describe(
|
|
1154
|
+
priceDetails: /* @__PURE__ */ z.intersection(
|
|
1155
|
+
/* @__PURE__ */ z.object({
|
|
1156
|
+
subtotal: /* @__PURE__ */ z.string().describe(
|
|
1244
1157
|
'Price of the order excluding tax, specified as a monetary amount. for example, `"9.99"`.'
|
|
1245
1158
|
).optional(),
|
|
1246
|
-
discount: z.string().describe("Total discount applied.").optional(),
|
|
1247
|
-
tax: z.object({
|
|
1248
|
-
name: z.string().describe("Name of the tax. For example, VAT.").optional(),
|
|
1249
|
-
includedInPrice: z.boolean().describe(
|
|
1159
|
+
discount: /* @__PURE__ */ z.string().describe("Total discount applied.").optional(),
|
|
1160
|
+
tax: /* @__PURE__ */ z.object({
|
|
1161
|
+
name: /* @__PURE__ */ z.string().describe("Name of the tax. For example, VAT.").optional(),
|
|
1162
|
+
includedInPrice: /* @__PURE__ */ z.boolean().describe(
|
|
1250
1163
|
"Whether tax is included in the original price. When `false`, tax is added at checkout."
|
|
1251
1164
|
).optional(),
|
|
1252
|
-
rate: z.string().describe(
|
|
1165
|
+
rate: /* @__PURE__ */ z.string().describe(
|
|
1253
1166
|
'Tax rate percentage, as a number between 0 and 100. For example, a 7% tax rate is `"7.00"`.'
|
|
1254
1167
|
).optional(),
|
|
1255
|
-
amount: z.string().describe(
|
|
1168
|
+
amount: /* @__PURE__ */ z.string().describe(
|
|
1256
1169
|
'Total tax, specified as a monetary amount. For example, `"3.99"`.'
|
|
1257
1170
|
).optional()
|
|
1258
1171
|
}).describe("Tax applied.").optional(),
|
|
1259
|
-
total: z.string().describe(
|
|
1172
|
+
total: /* @__PURE__ */ z.string().describe(
|
|
1260
1173
|
'Price after tax and discount is applied, specified as a monetary amount. For example, `"13.98"`.\n\nIf no tax is applied, the amount is the same as `subtotal`.'
|
|
1261
1174
|
).optional(),
|
|
1262
|
-
planPrice: z.string().describe("Plan price as it was at the moment of order creation.").optional(),
|
|
1263
|
-
currency: z.string().describe(
|
|
1175
|
+
planPrice: /* @__PURE__ */ z.string().describe("Plan price as it was at the moment of order creation.").optional(),
|
|
1176
|
+
currency: /* @__PURE__ */ z.string().describe(
|
|
1264
1177
|
"Currency code. Must be valid ISO 4217 currency code (e.g., USD)."
|
|
1265
1178
|
).optional(),
|
|
1266
|
-
freeTrialDays: z.number().int().describe(
|
|
1179
|
+
freeTrialDays: /* @__PURE__ */ z.number().int().describe(
|
|
1267
1180
|
"Free trial period for the order in days. Only available for recurring plans."
|
|
1268
1181
|
).min(1).max(999).optional().nullable(),
|
|
1269
|
-
coupon: z.object({
|
|
1270
|
-
code: z.string().describe("Code of the applied coupon.").min(1).max(20).optional(),
|
|
1271
|
-
amount: z.string().describe(
|
|
1182
|
+
coupon: /* @__PURE__ */ z.object({
|
|
1183
|
+
code: /* @__PURE__ */ z.string().describe("Code of the applied coupon.").min(1).max(20).optional(),
|
|
1184
|
+
amount: /* @__PURE__ */ z.string().describe(
|
|
1272
1185
|
"Total discount of the coupon, as a monetary amount."
|
|
1273
1186
|
).optional(),
|
|
1274
|
-
_id: z.string().describe("Coupon ID.").regex(
|
|
1187
|
+
_id: /* @__PURE__ */ z.string().describe("Coupon ID.").regex(
|
|
1275
1188
|
/^[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}$/,
|
|
1276
1189
|
"Must be a valid GUID"
|
|
1277
1190
|
).optional()
|
|
@@ -1279,45 +1192,45 @@ var CreateOfflineOrderResponse = /* @__PURE__ */ z.object({
|
|
|
1279
1192
|
"Coupon applied to the order. Empty means no coupon was applied."
|
|
1280
1193
|
).optional()
|
|
1281
1194
|
}),
|
|
1282
|
-
z.xor([
|
|
1283
|
-
z.object({
|
|
1284
|
-
subscription: z.never().optional(),
|
|
1285
|
-
singlePaymentForDuration: z.never().optional(),
|
|
1286
|
-
singlePaymentUnlimited: z.never().optional()
|
|
1195
|
+
/* @__PURE__ */ z.xor([
|
|
1196
|
+
/* @__PURE__ */ z.object({
|
|
1197
|
+
subscription: /* @__PURE__ */ z.never().optional(),
|
|
1198
|
+
singlePaymentForDuration: /* @__PURE__ */ z.never().optional(),
|
|
1199
|
+
singlePaymentUnlimited: /* @__PURE__ */ z.never().optional()
|
|
1287
1200
|
}),
|
|
1288
|
-
z.object({
|
|
1289
|
-
singlePaymentForDuration: z.never().optional(),
|
|
1290
|
-
singlePaymentUnlimited: z.never().optional(),
|
|
1291
|
-
subscription: z.object({
|
|
1292
|
-
cycleDuration: z.object({
|
|
1293
|
-
count: z.number().int().describe(
|
|
1201
|
+
/* @__PURE__ */ z.object({
|
|
1202
|
+
singlePaymentForDuration: /* @__PURE__ */ z.never().optional(),
|
|
1203
|
+
singlePaymentUnlimited: /* @__PURE__ */ z.never().optional(),
|
|
1204
|
+
subscription: /* @__PURE__ */ z.object({
|
|
1205
|
+
cycleDuration: /* @__PURE__ */ z.object({
|
|
1206
|
+
count: /* @__PURE__ */ z.number().int().describe(
|
|
1294
1207
|
"Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`."
|
|
1295
1208
|
).min(1).optional().nullable(),
|
|
1296
|
-
unit: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
|
|
1209
|
+
unit: /* @__PURE__ */ z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
|
|
1297
1210
|
}).describe(
|
|
1298
1211
|
"Number of payment cycles the subscription is valid for.\n`0` for unlimited plans or for plans that are valid until canceled."
|
|
1299
1212
|
).optional(),
|
|
1300
|
-
cycleCount: z.number().int().describe(
|
|
1213
|
+
cycleCount: /* @__PURE__ */ z.number().int().describe(
|
|
1301
1214
|
"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."
|
|
1302
1215
|
).min(0).max(2e3).optional().nullable()
|
|
1303
1216
|
}).describe("Order has recurring payments.")
|
|
1304
1217
|
}),
|
|
1305
|
-
z.object({
|
|
1306
|
-
subscription: z.never().optional(),
|
|
1307
|
-
singlePaymentUnlimited: z.never().optional(),
|
|
1308
|
-
singlePaymentForDuration: z.object({
|
|
1309
|
-
count: z.number().int().describe(
|
|
1218
|
+
/* @__PURE__ */ z.object({
|
|
1219
|
+
subscription: /* @__PURE__ */ z.never().optional(),
|
|
1220
|
+
singlePaymentUnlimited: /* @__PURE__ */ z.never().optional(),
|
|
1221
|
+
singlePaymentForDuration: /* @__PURE__ */ z.object({
|
|
1222
|
+
count: /* @__PURE__ */ z.number().int().describe(
|
|
1310
1223
|
"Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`."
|
|
1311
1224
|
).min(1).optional().nullable(),
|
|
1312
|
-
unit: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
|
|
1225
|
+
unit: /* @__PURE__ */ z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
|
|
1313
1226
|
}).describe(
|
|
1314
1227
|
"One-time payment. Order is valid for a specified duration."
|
|
1315
1228
|
)
|
|
1316
1229
|
}),
|
|
1317
|
-
z.object({
|
|
1318
|
-
subscription: z.never().optional(),
|
|
1319
|
-
singlePaymentForDuration: z.never().optional(),
|
|
1320
|
-
singlePaymentUnlimited: z.boolean().describe(
|
|
1230
|
+
/* @__PURE__ */ z.object({
|
|
1231
|
+
subscription: /* @__PURE__ */ z.never().optional(),
|
|
1232
|
+
singlePaymentForDuration: /* @__PURE__ */ z.never().optional(),
|
|
1233
|
+
singlePaymentUnlimited: /* @__PURE__ */ z.boolean().describe(
|
|
1321
1234
|
"One-time payment. Order is valid until it is canceled."
|
|
1322
1235
|
)
|
|
1323
1236
|
})
|
|
@@ -1325,105 +1238,105 @@ var CreateOfflineOrderResponse = /* @__PURE__ */ z.object({
|
|
|
1325
1238
|
).describe(
|
|
1326
1239
|
"__Deprecated.__ Use `pricing` instead. This property will be removed on September 30, 2022."
|
|
1327
1240
|
).optional(),
|
|
1328
|
-
pricing: z.intersection(
|
|
1329
|
-
z.object({
|
|
1330
|
-
prices: z.array(
|
|
1331
|
-
z.object({
|
|
1332
|
-
duration: z.object({
|
|
1333
|
-
cycleFrom: z.number().int().describe(
|
|
1241
|
+
pricing: /* @__PURE__ */ z.intersection(
|
|
1242
|
+
/* @__PURE__ */ z.object({
|
|
1243
|
+
prices: /* @__PURE__ */ z.array(
|
|
1244
|
+
/* @__PURE__ */ z.object({
|
|
1245
|
+
duration: /* @__PURE__ */ z.object({
|
|
1246
|
+
cycleFrom: /* @__PURE__ */ z.number().int().describe(
|
|
1334
1247
|
"Price starts to apply with this cycle.\n\n`1` is the first payment cycle for all pricing models."
|
|
1335
1248
|
).optional(),
|
|
1336
|
-
numberOfCycles: z.number().int().describe(
|
|
1249
|
+
numberOfCycles: /* @__PURE__ */ z.number().int().describe(
|
|
1337
1250
|
"Amount of cycles to apply price for.\n\nFor `subscription` pricing models with a finite number of cycles, the `numberOfCycles` is the same as `pricing.subscription.cycleCount`.\n\nFor `subscription` pricing models that are unlimited or until-canceled, the `numberOfCycles` is not returned.\n\nFor `singlePaymentForDuration` and `singlePaymentUnlimited` pricing models, the `numberOfCycles` is `1`."
|
|
1338
1251
|
).optional().nullable()
|
|
1339
1252
|
}).describe(
|
|
1340
1253
|
"Cycle duration to apply `price` for.\n\nUse with all pricing models.\nCan apply the same price to multiple payment cycles."
|
|
1341
1254
|
).optional(),
|
|
1342
|
-
price: z.object({
|
|
1343
|
-
subtotal: z.string().describe(
|
|
1255
|
+
price: /* @__PURE__ */ z.object({
|
|
1256
|
+
subtotal: /* @__PURE__ */ z.string().describe(
|
|
1344
1257
|
'Price of the order excluding tax, specified as a monetary amount. For example, `"9.99"`.'
|
|
1345
1258
|
).optional(),
|
|
1346
|
-
coupon: z.object({
|
|
1347
|
-
code: z.string().describe("Code of the applied coupon.").min(1).max(20).optional(),
|
|
1348
|
-
amount: z.string().describe(
|
|
1259
|
+
coupon: /* @__PURE__ */ z.object({
|
|
1260
|
+
code: /* @__PURE__ */ z.string().describe("Code of the applied coupon.").min(1).max(20).optional(),
|
|
1261
|
+
amount: /* @__PURE__ */ z.string().describe(
|
|
1349
1262
|
"Total discount of the coupon, as a monetary amount."
|
|
1350
1263
|
).optional(),
|
|
1351
|
-
_id: z.string().describe("Coupon ID.").regex(
|
|
1264
|
+
_id: /* @__PURE__ */ z.string().describe("Coupon ID.").regex(
|
|
1352
1265
|
/^[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}$/,
|
|
1353
1266
|
"Must be a valid GUID"
|
|
1354
1267
|
).optional()
|
|
1355
1268
|
}).describe(
|
|
1356
1269
|
"Coupon applied to the order, from the Coupons API."
|
|
1357
1270
|
).optional(),
|
|
1358
|
-
discount: z.string().describe("Total discount applied to the order.").optional(),
|
|
1359
|
-
tax: z.object({
|
|
1360
|
-
name: z.string().describe("Name of the tax. For example, VAT.").optional(),
|
|
1361
|
-
includedInPrice: z.boolean().describe(
|
|
1271
|
+
discount: /* @__PURE__ */ z.string().describe("Total discount applied to the order.").optional(),
|
|
1272
|
+
tax: /* @__PURE__ */ z.object({
|
|
1273
|
+
name: /* @__PURE__ */ z.string().describe("Name of the tax. For example, VAT.").optional(),
|
|
1274
|
+
includedInPrice: /* @__PURE__ */ z.boolean().describe(
|
|
1362
1275
|
"Whether tax is included in the original price. When `false`, tax is added at checkout."
|
|
1363
1276
|
).optional(),
|
|
1364
|
-
rate: z.string().describe(
|
|
1277
|
+
rate: /* @__PURE__ */ z.string().describe(
|
|
1365
1278
|
'Tax rate percentage, as a number between 0 and 100. For example, a 7% tax rate is `"7.00"`.'
|
|
1366
1279
|
).optional(),
|
|
1367
|
-
amount: z.string().describe(
|
|
1280
|
+
amount: /* @__PURE__ */ z.string().describe(
|
|
1368
1281
|
'Total tax, specified as a monetary amount. For example, `"3.99"`.'
|
|
1369
1282
|
).optional()
|
|
1370
1283
|
}).describe(
|
|
1371
1284
|
"Tax applied to the order.\n\nTax is only applied if the site [has it configured](https://support.wix.com/en/article/pricing-plans-setting-up-tax-collection)."
|
|
1372
1285
|
).optional(),
|
|
1373
|
-
total: z.string().describe(
|
|
1286
|
+
total: /* @__PURE__ */ z.string().describe(
|
|
1374
1287
|
'Price after tax and discount is applied. Specified as a monetary amount, for example, `"13.98"`.\n\nIf no tax is applied, the amount is the same as `subtotal`.'
|
|
1375
1288
|
).optional(),
|
|
1376
|
-
currency: z.string().describe(
|
|
1289
|
+
currency: /* @__PURE__ */ z.string().describe(
|
|
1377
1290
|
"Three-letter currency code in\n[ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format."
|
|
1378
1291
|
).optional(),
|
|
1379
|
-
proration: z.string().describe(
|
|
1292
|
+
proration: /* @__PURE__ */ z.string().describe(
|
|
1380
1293
|
"Price change after billing date was change and price was adjusted. Could be positive and negative values."
|
|
1381
1294
|
).optional()
|
|
1382
1295
|
}).describe("Order price.").optional()
|
|
1383
1296
|
})
|
|
1384
1297
|
).optional()
|
|
1385
1298
|
}),
|
|
1386
|
-
z.xor([
|
|
1387
|
-
z.object({
|
|
1388
|
-
subscription: z.never().optional(),
|
|
1389
|
-
singlePaymentForDuration: z.never().optional(),
|
|
1390
|
-
singlePaymentUnlimited: z.never().optional()
|
|
1299
|
+
/* @__PURE__ */ z.xor([
|
|
1300
|
+
/* @__PURE__ */ z.object({
|
|
1301
|
+
subscription: /* @__PURE__ */ z.never().optional(),
|
|
1302
|
+
singlePaymentForDuration: /* @__PURE__ */ z.never().optional(),
|
|
1303
|
+
singlePaymentUnlimited: /* @__PURE__ */ z.never().optional()
|
|
1391
1304
|
}),
|
|
1392
|
-
z.object({
|
|
1393
|
-
singlePaymentForDuration: z.never().optional(),
|
|
1394
|
-
singlePaymentUnlimited: z.never().optional(),
|
|
1395
|
-
subscription: z.object({
|
|
1396
|
-
cycleDuration: z.object({
|
|
1397
|
-
count: z.number().int().describe(
|
|
1305
|
+
/* @__PURE__ */ z.object({
|
|
1306
|
+
singlePaymentForDuration: /* @__PURE__ */ z.never().optional(),
|
|
1307
|
+
singlePaymentUnlimited: /* @__PURE__ */ z.never().optional(),
|
|
1308
|
+
subscription: /* @__PURE__ */ z.object({
|
|
1309
|
+
cycleDuration: /* @__PURE__ */ z.object({
|
|
1310
|
+
count: /* @__PURE__ */ z.number().int().describe(
|
|
1398
1311
|
"Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`."
|
|
1399
1312
|
).min(1).optional().nullable(),
|
|
1400
|
-
unit: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
|
|
1313
|
+
unit: /* @__PURE__ */ z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
|
|
1401
1314
|
}).describe(
|
|
1402
1315
|
"Number of payment cycles the subscription is valid for.\n`0` for unlimited plans or for plans that are valid until canceled."
|
|
1403
1316
|
).optional(),
|
|
1404
|
-
cycleCount: z.number().int().describe(
|
|
1317
|
+
cycleCount: /* @__PURE__ */ z.number().int().describe(
|
|
1405
1318
|
"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."
|
|
1406
1319
|
).min(0).max(2e3).optional().nullable()
|
|
1407
1320
|
}).describe(
|
|
1408
1321
|
"Pricing model for an order with recurring payment cycles."
|
|
1409
1322
|
)
|
|
1410
1323
|
}),
|
|
1411
|
-
z.object({
|
|
1412
|
-
subscription: z.never().optional(),
|
|
1413
|
-
singlePaymentUnlimited: z.never().optional(),
|
|
1414
|
-
singlePaymentForDuration: z.object({
|
|
1415
|
-
count: z.number().int().describe(
|
|
1324
|
+
/* @__PURE__ */ z.object({
|
|
1325
|
+
subscription: /* @__PURE__ */ z.never().optional(),
|
|
1326
|
+
singlePaymentUnlimited: /* @__PURE__ */ z.never().optional(),
|
|
1327
|
+
singlePaymentForDuration: /* @__PURE__ */ z.object({
|
|
1328
|
+
count: /* @__PURE__ */ z.number().int().describe(
|
|
1416
1329
|
"Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`."
|
|
1417
1330
|
).min(1).optional().nullable(),
|
|
1418
|
-
unit: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
|
|
1331
|
+
unit: /* @__PURE__ */ z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
|
|
1419
1332
|
}).describe(
|
|
1420
1333
|
"Pricing model for an order with a one-time payment and the order is valid for a specific amount of time."
|
|
1421
1334
|
)
|
|
1422
1335
|
}),
|
|
1423
|
-
z.object({
|
|
1424
|
-
subscription: z.never().optional(),
|
|
1425
|
-
singlePaymentForDuration: z.never().optional(),
|
|
1426
|
-
singlePaymentUnlimited: z.boolean().describe(
|
|
1336
|
+
/* @__PURE__ */ z.object({
|
|
1337
|
+
subscription: /* @__PURE__ */ z.never().optional(),
|
|
1338
|
+
singlePaymentForDuration: /* @__PURE__ */ z.never().optional(),
|
|
1339
|
+
singlePaymentUnlimited: /* @__PURE__ */ z.boolean().describe(
|
|
1427
1340
|
"Pricing model for an order with a one-time payment and the order is valid until canceled."
|
|
1428
1341
|
)
|
|
1429
1342
|
})
|
|
@@ -1431,8 +1344,8 @@ var CreateOfflineOrderResponse = /* @__PURE__ */ z.object({
|
|
|
1431
1344
|
).describe(
|
|
1432
1345
|
"Order pricing model, price, and payment schedule.\n\nLearn more about [pricing models](https://dev.wix.com/api/rest/wix-pricing-plans/pricing-plans/introduction#wix-pricing-plans_pricing-plans_introduction_pricing-models)."
|
|
1433
1346
|
).optional(),
|
|
1434
|
-
type: z.enum(["UNDEFINED", "ONLINE", "OFFLINE", "EXTERNAL"]).describe("How the order was processed.").optional(),
|
|
1435
|
-
status: z.enum([
|
|
1347
|
+
type: /* @__PURE__ */ z.enum(["UNDEFINED", "ONLINE", "OFFLINE", "EXTERNAL"]).describe("How the order was processed.").optional(),
|
|
1348
|
+
status: /* @__PURE__ */ z.enum([
|
|
1436
1349
|
"UNDEFINED",
|
|
1437
1350
|
"DRAFT",
|
|
1438
1351
|
"PENDING",
|
|
@@ -1441,12 +1354,12 @@ var CreateOfflineOrderResponse = /* @__PURE__ */ z.object({
|
|
|
1441
1354
|
"ENDED",
|
|
1442
1355
|
"CANCELED"
|
|
1443
1356
|
]).describe("Status of the order.").optional(),
|
|
1444
|
-
autoRenewCanceled: z.boolean().describe(
|
|
1357
|
+
autoRenewCanceled: /* @__PURE__ */ z.boolean().describe(
|
|
1445
1358
|
"Whether the order will be canceled at the next payment date.\n\nIf `true`, the order status will be `CANCELED` and the next payment won't be charged. Omitted for single payment orders."
|
|
1446
1359
|
).optional().nullable(),
|
|
1447
|
-
cancellation: z.object({
|
|
1448
|
-
requestedDate: z.date().describe("Date and time the cancellation was requested.").optional().nullable(),
|
|
1449
|
-
cause: z.enum([
|
|
1360
|
+
cancellation: /* @__PURE__ */ z.object({
|
|
1361
|
+
requestedDate: /* @__PURE__ */ z.date().describe("Date and time the cancellation was requested.").optional().nullable(),
|
|
1362
|
+
cause: /* @__PURE__ */ z.enum([
|
|
1450
1363
|
"UNDEFINED",
|
|
1451
1364
|
"OWNER_ACTION",
|
|
1452
1365
|
"MEMBER_ACTION",
|
|
@@ -1454,13 +1367,13 @@ var CreateOfflineOrderResponse = /* @__PURE__ */ z.object({
|
|
|
1454
1367
|
"PAYMENT_SETUP_FAILURE",
|
|
1455
1368
|
"UNKNOWN"
|
|
1456
1369
|
]).describe("Reason for the cancellation.").optional(),
|
|
1457
|
-
effectiveAt: z.enum(["UNDEFINED", "IMMEDIATELY", "NEXT_PAYMENT_DATE"]).describe(
|
|
1370
|
+
effectiveAt: /* @__PURE__ */ z.enum(["UNDEFINED", "IMMEDIATELY", "NEXT_PAYMENT_DATE"]).describe(
|
|
1458
1371
|
"When the cancellation takes effect. Set when cancelling the order."
|
|
1459
1372
|
).optional()
|
|
1460
1373
|
}).describe(
|
|
1461
1374
|
"Details about the cancellation of an order.\n\nOnly present if the status is `CANCELED`."
|
|
1462
1375
|
).optional(),
|
|
1463
|
-
lastPaymentStatus: z.enum([
|
|
1376
|
+
lastPaymentStatus: /* @__PURE__ */ z.enum([
|
|
1464
1377
|
"UNDEFINED",
|
|
1465
1378
|
"PAID",
|
|
1466
1379
|
"REFUNDED",
|
|
@@ -1471,142 +1384,289 @@ var CreateOfflineOrderResponse = /* @__PURE__ */ z.object({
|
|
|
1471
1384
|
]).describe(
|
|
1472
1385
|
"Status of the last payment for the order.\nUpdated automatically for online orders. Updated manually by the Wix user for offline orders."
|
|
1473
1386
|
).optional(),
|
|
1474
|
-
startDate: z.date().describe("Start date and time for the ordered plan.").optional().nullable(),
|
|
1475
|
-
endDate: z.date().describe(
|
|
1387
|
+
startDate: /* @__PURE__ */ z.date().describe("Start date and time for the ordered plan.").optional().nullable(),
|
|
1388
|
+
endDate: /* @__PURE__ */ z.date().describe(
|
|
1476
1389
|
"Current end date and time for the ordered plan.\n\n`endDate` may be updated over the course of an order.\nIf the order is paused, it will have a later `endDate` once it is resumed.\n`endDate` may also be postponed.\n\nOmitted if the order is valid until canceled and still `ACTIVE`."
|
|
1477
1390
|
).optional().nullable(),
|
|
1478
|
-
pausePeriods: z.array(
|
|
1479
|
-
z.object({
|
|
1480
|
-
status: z.enum(["UNDEFINED", "ACTIVE", "ENDED"]).describe("Status of the pause period.").optional(),
|
|
1481
|
-
pauseDate: z.date().describe("Start date and time of the pause period.").optional().nullable(),
|
|
1482
|
-
resumeDate: z.date().describe(
|
|
1391
|
+
pausePeriods: /* @__PURE__ */ z.array(
|
|
1392
|
+
/* @__PURE__ */ z.object({
|
|
1393
|
+
status: /* @__PURE__ */ z.enum(["UNDEFINED", "ACTIVE", "ENDED"]).describe("Status of the pause period.").optional(),
|
|
1394
|
+
pauseDate: /* @__PURE__ */ z.date().describe("Start date and time of the pause period.").optional().nullable(),
|
|
1395
|
+
resumeDate: /* @__PURE__ */ z.date().describe(
|
|
1483
1396
|
"End date and time of the pause period.\n\nOmitted while the pause period remains `ACTIVE`."
|
|
1484
1397
|
).optional().nullable()
|
|
1485
1398
|
})
|
|
1486
1399
|
).optional(),
|
|
1487
|
-
freeTrialDays: z.number().int().describe(
|
|
1400
|
+
freeTrialDays: /* @__PURE__ */ z.number().int().describe(
|
|
1488
1401
|
"Free trial period for the order, in days.\n\nOnly available for recurring plans."
|
|
1489
1402
|
).min(1).max(999).optional().nullable(),
|
|
1490
|
-
earliestEndDate: z.date().describe(
|
|
1403
|
+
earliestEndDate: /* @__PURE__ */ z.date().describe(
|
|
1491
1404
|
"Earliest end date and time that the plan for the order can expire.\n\nCalculated by using the original end date plus any pause periods. Omitted if the order is active until canceled. Reserved for future use."
|
|
1492
1405
|
).optional().nullable(),
|
|
1493
|
-
currentCycle: z.object({
|
|
1494
|
-
index: z.number().int().describe(
|
|
1406
|
+
currentCycle: /* @__PURE__ */ z.object({
|
|
1407
|
+
index: /* @__PURE__ */ z.number().int().describe(
|
|
1495
1408
|
"Index of the current payment cycle in the order.\n\n`0` when order is in a free trial period. In all other cases, the index starts with `1`."
|
|
1496
1409
|
).min(0).optional(),
|
|
1497
|
-
startedDate: z.date().describe("Start date and time for the current payment cycle.").optional().nullable(),
|
|
1498
|
-
endedDate: z.date().describe("End date and time for the current payment cycle.").optional().nullable()
|
|
1410
|
+
startedDate: /* @__PURE__ */ z.date().describe("Start date and time for the current payment cycle.").optional().nullable(),
|
|
1411
|
+
endedDate: /* @__PURE__ */ z.date().describe("End date and time for the current payment cycle.").optional().nullable()
|
|
1499
1412
|
}).describe(
|
|
1500
1413
|
"Current payment cycle for the order.\n\n`currentCycle` will be omitted if the order's status is `CANCELED` or `ENDED`, or if the `startDate` hasn't passed yet."
|
|
1501
1414
|
).optional(),
|
|
1502
|
-
planName: z.string().describe("Plan name at the time of purchase.").optional(),
|
|
1503
|
-
planDescription: z.string().describe("Plan description at the time of purchase").optional(),
|
|
1504
|
-
planPrice: z.string().describe("Plan price as it was at the moment of order creation.").optional(),
|
|
1505
|
-
_createdDate: z.date().describe("Date and time the order was created.").optional().nullable(),
|
|
1506
|
-
_updatedDate: z.date().describe("Date and time the order was updated.").optional().nullable(),
|
|
1507
|
-
formData: z.object({
|
|
1508
|
-
formId: z.string().describe(
|
|
1415
|
+
planName: /* @__PURE__ */ z.string().describe("Plan name at the time of purchase.").optional(),
|
|
1416
|
+
planDescription: /* @__PURE__ */ z.string().describe("Plan description at the time of purchase").optional(),
|
|
1417
|
+
planPrice: /* @__PURE__ */ z.string().describe("Plan price as it was at the moment of order creation.").optional(),
|
|
1418
|
+
_createdDate: /* @__PURE__ */ z.date().describe("Date and time the order was created.").optional().nullable(),
|
|
1419
|
+
_updatedDate: /* @__PURE__ */ z.date().describe("Date and time the order was updated.").optional().nullable(),
|
|
1420
|
+
formData: /* @__PURE__ */ z.object({
|
|
1421
|
+
formId: /* @__PURE__ */ z.string().describe(
|
|
1509
1422
|
"ID of the [order form](https://dev.wix.com/docs/rest/api-reference/wix-forms/form-submissions/introduction) associated with the plan at checkout."
|
|
1510
1423
|
).regex(
|
|
1511
1424
|
/^[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}$/,
|
|
1512
1425
|
"Must be a valid GUID"
|
|
1513
1426
|
).optional().nullable(),
|
|
1514
|
-
submissionId: z.string().describe(
|
|
1427
|
+
submissionId: /* @__PURE__ */ z.string().describe(
|
|
1515
1428
|
"ID of a submission to the plan's order form at checkout. Every time a visitor completes the checkout process for a plan, a new submission is created."
|
|
1516
1429
|
).regex(
|
|
1517
1430
|
/^[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}$/,
|
|
1518
1431
|
"Must be a valid GUID"
|
|
1519
1432
|
).optional().nullable(),
|
|
1520
|
-
submissionData: z.record(z.string(), z.any()).describe("Data submitted to the plan's order form at checkout.").optional()
|
|
1433
|
+
submissionData: /* @__PURE__ */ z.record(/* @__PURE__ */ z.string(), /* @__PURE__ */ z.any()).describe("Data submitted to the plan's order form at checkout.").optional()
|
|
1521
1434
|
}).describe(
|
|
1522
1435
|
"Information about the form submitted during the plan's checkout."
|
|
1523
1436
|
).optional()
|
|
1524
|
-
}).describe("
|
|
1437
|
+
}).describe("The previewed order, as if the plan had been ordered.").optional(),
|
|
1438
|
+
purchaseLimitExceeded: /* @__PURE__ */ z.boolean().describe(
|
|
1439
|
+
"Whether this previewed order would exceed the permitted amount of purchases available\nfor this plan for this buyer.\n\nAlways `false` for plans that do not have purchase limits."
|
|
1440
|
+
).optional()
|
|
1525
1441
|
});
|
|
1526
|
-
var
|
|
1527
|
-
planId: z.string().describe("
|
|
1442
|
+
var GetPricePreviewRequest = /* @__PURE__ */ z.object({
|
|
1443
|
+
planId: /* @__PURE__ */ z.string().describe("ID of plan to preview.").regex(
|
|
1528
1444
|
/^[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}$/,
|
|
1529
1445
|
"Must be a valid GUID"
|
|
1530
1446
|
),
|
|
1531
|
-
options: z.object({
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
).optional().nullable(),
|
|
1535
|
-
couponCode: z.string().describe("Coupon code to apply.").min(1).max(20).optional().nullable()
|
|
1536
|
-
}).optional()
|
|
1447
|
+
options: /* @__PURE__ */ z.object({
|
|
1448
|
+
couponCode: /* @__PURE__ */ z.string().describe("Coupon code to apply, from the Coupons API.").min(1).max(20).optional().nullable()
|
|
1449
|
+
}).describe("Options for getting a price preview. ").optional()
|
|
1537
1450
|
});
|
|
1538
|
-
var
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
).optional(),
|
|
1544
|
-
planId: z.string().describe(
|
|
1545
|
-
"ID of the plan purchased with the order, from the Plans API."
|
|
1546
|
-
).regex(
|
|
1547
|
-
/^[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}$/,
|
|
1548
|
-
"Must be a valid GUID"
|
|
1549
|
-
).optional(),
|
|
1550
|
-
subscriptionId: z.string().describe(
|
|
1551
|
-
"ID of the related Wix subscription.\n\nEvery pricing plan order corresponds to a Wix subscription, including orders for single payment plans. Learn more in\na [Pricing Plans overview](https://support.wix.com/en/article/pricing-plans-an-overview#create-plans-to-suit-your-business)."
|
|
1552
|
-
).regex(
|
|
1553
|
-
/^[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}$/,
|
|
1554
|
-
"Must be a valid GUID"
|
|
1555
|
-
).optional(),
|
|
1556
|
-
wixPayOrderId: z.string().describe(
|
|
1557
|
-
"Wix Pay order ID.\n\nProvided by Wix whether the order is created online or offline. The field is omitted when the order is free."
|
|
1558
|
-
).regex(
|
|
1559
|
-
/^[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}$/,
|
|
1560
|
-
"Must be a valid GUID"
|
|
1561
|
-
).optional().nullable(),
|
|
1562
|
-
buyer: z.object({
|
|
1563
|
-
memberId: z.string().describe("Member ID for a Wix site member, from the Members API.").regex(
|
|
1564
|
-
/^[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}$/,
|
|
1565
|
-
"Must be a valid GUID"
|
|
1451
|
+
var GetPricePreviewResponse = /* @__PURE__ */ z.object({
|
|
1452
|
+
price: /* @__PURE__ */ z.intersection(
|
|
1453
|
+
/* @__PURE__ */ z.object({
|
|
1454
|
+
subtotal: /* @__PURE__ */ z.string().describe(
|
|
1455
|
+
'Price of the order excluding tax, specified as a monetary amount. for example, `"9.99"`.'
|
|
1566
1456
|
).optional(),
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1457
|
+
discount: /* @__PURE__ */ z.string().describe("Total discount applied.").optional(),
|
|
1458
|
+
tax: /* @__PURE__ */ z.object({
|
|
1459
|
+
name: /* @__PURE__ */ z.string().describe("Name of the tax. For example, VAT.").optional(),
|
|
1460
|
+
includedInPrice: /* @__PURE__ */ z.boolean().describe(
|
|
1461
|
+
"Whether tax is included in the original price. When `false`, tax is added at checkout."
|
|
1462
|
+
).optional(),
|
|
1463
|
+
rate: /* @__PURE__ */ z.string().describe(
|
|
1464
|
+
'Tax rate percentage, as a number between 0 and 100. For example, a 7% tax rate is `"7.00"`.'
|
|
1465
|
+
).optional(),
|
|
1466
|
+
amount: /* @__PURE__ */ z.string().describe(
|
|
1467
|
+
'Total tax, specified as a monetary amount. For example, `"3.99"`.'
|
|
1468
|
+
).optional()
|
|
1469
|
+
}).describe("Tax applied.").optional(),
|
|
1470
|
+
total: /* @__PURE__ */ z.string().describe(
|
|
1471
|
+
'Price after tax and discount is applied, specified as a monetary amount. For example, `"13.98"`.\n\nIf no tax is applied, the amount is the same as `subtotal`.'
|
|
1472
|
+
).optional(),
|
|
1473
|
+
planPrice: /* @__PURE__ */ z.string().describe("Plan price as it was at the moment of order creation.").optional(),
|
|
1474
|
+
currency: /* @__PURE__ */ z.string().describe(
|
|
1475
|
+
"Currency code. Must be valid ISO 4217 currency code (e.g., USD)."
|
|
1476
|
+
).optional(),
|
|
1477
|
+
freeTrialDays: /* @__PURE__ */ z.number().int().describe(
|
|
1478
|
+
"Free trial period for the order in days. Only available for recurring plans."
|
|
1479
|
+
).min(1).max(999).optional().nullable(),
|
|
1480
|
+
coupon: /* @__PURE__ */ z.object({
|
|
1481
|
+
code: /* @__PURE__ */ z.string().describe("Code of the applied coupon.").min(1).max(20).optional(),
|
|
1482
|
+
amount: /* @__PURE__ */ z.string().describe("Total discount of the coupon, as a monetary amount.").optional(),
|
|
1483
|
+
_id: /* @__PURE__ */ z.string().describe("Coupon ID.").regex(
|
|
1484
|
+
/^[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}$/,
|
|
1485
|
+
"Must be a valid GUID"
|
|
1486
|
+
).optional()
|
|
1487
|
+
}).describe(
|
|
1488
|
+
"Coupon applied to the order. Empty means no coupon was applied."
|
|
1489
|
+
).optional()
|
|
1490
|
+
}),
|
|
1491
|
+
/* @__PURE__ */ z.xor([
|
|
1492
|
+
/* @__PURE__ */ z.object({
|
|
1493
|
+
subscription: /* @__PURE__ */ z.never().optional(),
|
|
1494
|
+
singlePaymentForDuration: /* @__PURE__ */ z.never().optional(),
|
|
1495
|
+
singlePaymentUnlimited: /* @__PURE__ */ z.never().optional()
|
|
1496
|
+
}),
|
|
1497
|
+
/* @__PURE__ */ z.object({
|
|
1498
|
+
singlePaymentForDuration: /* @__PURE__ */ z.never().optional(),
|
|
1499
|
+
singlePaymentUnlimited: /* @__PURE__ */ z.never().optional(),
|
|
1500
|
+
subscription: /* @__PURE__ */ z.object({
|
|
1501
|
+
cycleDuration: /* @__PURE__ */ z.object({
|
|
1502
|
+
count: /* @__PURE__ */ z.number().int().describe(
|
|
1503
|
+
"Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`."
|
|
1504
|
+
).min(1).optional().nullable(),
|
|
1505
|
+
unit: /* @__PURE__ */ z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
|
|
1506
|
+
}).describe(
|
|
1507
|
+
"Number of payment cycles the subscription is valid for.\n`0` for unlimited plans or for plans that are valid until canceled."
|
|
1508
|
+
).optional(),
|
|
1509
|
+
cycleCount: /* @__PURE__ */ z.number().int().describe(
|
|
1510
|
+
"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."
|
|
1511
|
+
).min(0).max(2e3).optional().nullable()
|
|
1512
|
+
}).describe("Order has recurring payments.")
|
|
1513
|
+
}),
|
|
1514
|
+
/* @__PURE__ */ z.object({
|
|
1515
|
+
subscription: /* @__PURE__ */ z.never().optional(),
|
|
1516
|
+
singlePaymentUnlimited: /* @__PURE__ */ z.never().optional(),
|
|
1517
|
+
singlePaymentForDuration: /* @__PURE__ */ z.object({
|
|
1518
|
+
count: /* @__PURE__ */ z.number().int().describe(
|
|
1519
|
+
"Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`."
|
|
1520
|
+
).min(1).optional().nullable(),
|
|
1521
|
+
unit: /* @__PURE__ */ z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
|
|
1522
|
+
}).describe(
|
|
1523
|
+
"One-time payment. Order is valid for a specified duration."
|
|
1524
|
+
)
|
|
1525
|
+
}),
|
|
1526
|
+
/* @__PURE__ */ z.object({
|
|
1527
|
+
subscription: /* @__PURE__ */ z.never().optional(),
|
|
1528
|
+
singlePaymentForDuration: /* @__PURE__ */ z.never().optional(),
|
|
1529
|
+
singlePaymentUnlimited: /* @__PURE__ */ z.boolean().describe("One-time payment. Order is valid until it is canceled.")
|
|
1530
|
+
})
|
|
1531
|
+
])
|
|
1532
|
+
).describe(
|
|
1533
|
+
"__Deprecated.__ Use `prices` instead. This property will be removed on September 30, 2022."
|
|
1534
|
+
).optional(),
|
|
1535
|
+
prices: /* @__PURE__ */ z.array(
|
|
1536
|
+
/* @__PURE__ */ z.object({
|
|
1537
|
+
duration: /* @__PURE__ */ z.object({
|
|
1538
|
+
cycleFrom: /* @__PURE__ */ z.number().int().describe(
|
|
1539
|
+
"Price starts to apply with this cycle.\n\n`1` is the first payment cycle for all pricing models."
|
|
1540
|
+
).optional(),
|
|
1541
|
+
numberOfCycles: /* @__PURE__ */ z.number().int().describe(
|
|
1542
|
+
"Amount of cycles to apply price for.\n\nFor `subscription` pricing models with a finite number of cycles, the `numberOfCycles` is the same as `pricing.subscription.cycleCount`.\n\nFor `subscription` pricing models that are unlimited or until-canceled, the `numberOfCycles` is not returned.\n\nFor `singlePaymentForDuration` and `singlePaymentUnlimited` pricing models, the `numberOfCycles` is `1`."
|
|
1543
|
+
).optional().nullable()
|
|
1544
|
+
}).describe(
|
|
1545
|
+
"Cycle duration to apply `price` for.\n\nUse with all pricing models.\nCan apply the same price to multiple payment cycles."
|
|
1546
|
+
).optional(),
|
|
1547
|
+
price: /* @__PURE__ */ z.object({
|
|
1548
|
+
subtotal: /* @__PURE__ */ z.string().describe(
|
|
1549
|
+
'Price of the order excluding tax, specified as a monetary amount. For example, `"9.99"`.'
|
|
1550
|
+
).optional(),
|
|
1551
|
+
coupon: /* @__PURE__ */ z.object({
|
|
1552
|
+
code: /* @__PURE__ */ z.string().describe("Code of the applied coupon.").min(1).max(20).optional(),
|
|
1553
|
+
amount: /* @__PURE__ */ z.string().describe(
|
|
1554
|
+
"Total discount of the coupon, as a monetary amount."
|
|
1555
|
+
).optional(),
|
|
1556
|
+
_id: /* @__PURE__ */ z.string().describe("Coupon ID.").regex(
|
|
1557
|
+
/^[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}$/,
|
|
1558
|
+
"Must be a valid GUID"
|
|
1559
|
+
).optional()
|
|
1560
|
+
}).describe("Coupon applied to the order, from the Coupons API.").optional(),
|
|
1561
|
+
discount: /* @__PURE__ */ z.string().describe("Total discount applied to the order.").optional(),
|
|
1562
|
+
tax: /* @__PURE__ */ z.object({
|
|
1563
|
+
name: /* @__PURE__ */ z.string().describe("Name of the tax. For example, VAT.").optional(),
|
|
1564
|
+
includedInPrice: /* @__PURE__ */ z.boolean().describe(
|
|
1565
|
+
"Whether tax is included in the original price. When `false`, tax is added at checkout."
|
|
1566
|
+
).optional(),
|
|
1567
|
+
rate: /* @__PURE__ */ z.string().describe(
|
|
1568
|
+
'Tax rate percentage, as a number between 0 and 100. For example, a 7% tax rate is `"7.00"`.'
|
|
1569
|
+
).optional(),
|
|
1570
|
+
amount: /* @__PURE__ */ z.string().describe(
|
|
1571
|
+
'Total tax, specified as a monetary amount. For example, `"3.99"`.'
|
|
1572
|
+
).optional()
|
|
1573
|
+
}).describe(
|
|
1574
|
+
"Tax applied to the order.\n\nTax is only applied if the site [has it configured](https://support.wix.com/en/article/pricing-plans-setting-up-tax-collection)."
|
|
1575
|
+
).optional(),
|
|
1576
|
+
total: /* @__PURE__ */ z.string().describe(
|
|
1577
|
+
'Price after tax and discount is applied. Specified as a monetary amount, for example, `"13.98"`.\n\nIf no tax is applied, the amount is the same as `subtotal`.'
|
|
1578
|
+
).optional(),
|
|
1579
|
+
currency: /* @__PURE__ */ z.string().describe(
|
|
1580
|
+
"Three-letter currency code in\n[ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format."
|
|
1581
|
+
).optional(),
|
|
1582
|
+
proration: /* @__PURE__ */ z.string().describe(
|
|
1583
|
+
"Price change after billing date was change and price was adjusted. Could be positive and negative values."
|
|
1584
|
+
).optional()
|
|
1585
|
+
}).describe("Order price.").optional()
|
|
1586
|
+
})
|
|
1587
|
+
).optional()
|
|
1588
|
+
});
|
|
1589
|
+
var ManagementGetOrderRequest = /* @__PURE__ */ z.object({
|
|
1590
|
+
_id: /* @__PURE__ */ z.string().describe("Order ID.").regex(
|
|
1591
|
+
/^[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}$/,
|
|
1592
|
+
"Must be a valid GUID"
|
|
1593
|
+
),
|
|
1594
|
+
options: /* @__PURE__ */ z.object({
|
|
1595
|
+
fieldSet: /* @__PURE__ */ z.enum(["UNKNOWN_SET", "BASIC", "FULL"]).optional()
|
|
1596
|
+
}).describe("Options to use when getting an order. ").optional()
|
|
1597
|
+
});
|
|
1598
|
+
var ManagementGetOrderResponse = /* @__PURE__ */ z.object({
|
|
1599
|
+
order: /* @__PURE__ */ z.object({
|
|
1600
|
+
_id: /* @__PURE__ */ z.string().describe("Order ID.").regex(
|
|
1601
|
+
/^[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}$/,
|
|
1602
|
+
"Must be a valid GUID"
|
|
1603
|
+
).optional(),
|
|
1604
|
+
planId: /* @__PURE__ */ z.string().describe(
|
|
1605
|
+
"ID of the plan purchased with the order, from the Plans API."
|
|
1606
|
+
).regex(
|
|
1607
|
+
/^[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}$/,
|
|
1608
|
+
"Must be a valid GUID"
|
|
1609
|
+
).optional(),
|
|
1610
|
+
subscriptionId: /* @__PURE__ */ z.string().describe(
|
|
1611
|
+
"ID of the related Wix subscription.\n\nEvery pricing plan order corresponds to a Wix subscription, including orders for single payment plans. Learn more in\na [Pricing Plans overview](https://support.wix.com/en/article/pricing-plans-an-overview#create-plans-to-suit-your-business)."
|
|
1612
|
+
).regex(
|
|
1613
|
+
/^[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}$/,
|
|
1614
|
+
"Must be a valid GUID"
|
|
1615
|
+
).optional(),
|
|
1616
|
+
wixPayOrderId: /* @__PURE__ */ z.string().describe(
|
|
1617
|
+
"Wix Pay order ID.\n\nProvided by Wix whether the order is created online or offline. The field is omitted when the order is free."
|
|
1618
|
+
).regex(
|
|
1619
|
+
/^[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}$/,
|
|
1620
|
+
"Must be a valid GUID"
|
|
1621
|
+
).optional().nullable(),
|
|
1622
|
+
buyer: /* @__PURE__ */ z.object({
|
|
1623
|
+
memberId: /* @__PURE__ */ z.string().describe("Member ID for a Wix site member, from the Members API.").regex(
|
|
1624
|
+
/^[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}$/,
|
|
1625
|
+
"Must be a valid GUID"
|
|
1626
|
+
).optional(),
|
|
1627
|
+
contactId: /* @__PURE__ */ z.string().describe(
|
|
1628
|
+
"Contact ID for a Wix site contact, from the Contacts API."
|
|
1629
|
+
).regex(
|
|
1630
|
+
/^[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}$/,
|
|
1631
|
+
"Must be a valid GUID"
|
|
1632
|
+
).optional()
|
|
1633
|
+
}).describe(
|
|
1634
|
+
"The buyer's IDs. Includes `memberId` and `contactId`.\n\nCurrently, Pricing Plan purchases are limited to members only. `contactId` is returned,\nbut a buyer will not be able to purchase a plan without a `memberId`."
|
|
1635
|
+
).optional(),
|
|
1636
|
+
priceDetails: /* @__PURE__ */ z.intersection(
|
|
1637
|
+
/* @__PURE__ */ z.object({
|
|
1638
|
+
subtotal: /* @__PURE__ */ z.string().describe(
|
|
1639
|
+
'Price of the order excluding tax, specified as a monetary amount. for example, `"9.99"`.'
|
|
1580
1640
|
).optional(),
|
|
1581
|
-
discount: z.string().describe("Total discount applied.").optional(),
|
|
1582
|
-
tax: z.object({
|
|
1583
|
-
name: z.string().describe("Name of the tax. For example, VAT.").optional(),
|
|
1584
|
-
includedInPrice: z.boolean().describe(
|
|
1641
|
+
discount: /* @__PURE__ */ z.string().describe("Total discount applied.").optional(),
|
|
1642
|
+
tax: /* @__PURE__ */ z.object({
|
|
1643
|
+
name: /* @__PURE__ */ z.string().describe("Name of the tax. For example, VAT.").optional(),
|
|
1644
|
+
includedInPrice: /* @__PURE__ */ z.boolean().describe(
|
|
1585
1645
|
"Whether tax is included in the original price. When `false`, tax is added at checkout."
|
|
1586
1646
|
).optional(),
|
|
1587
|
-
rate: z.string().describe(
|
|
1647
|
+
rate: /* @__PURE__ */ z.string().describe(
|
|
1588
1648
|
'Tax rate percentage, as a number between 0 and 100. For example, a 7% tax rate is `"7.00"`.'
|
|
1589
1649
|
).optional(),
|
|
1590
|
-
amount: z.string().describe(
|
|
1650
|
+
amount: /* @__PURE__ */ z.string().describe(
|
|
1591
1651
|
'Total tax, specified as a monetary amount. For example, `"3.99"`.'
|
|
1592
1652
|
).optional()
|
|
1593
1653
|
}).describe("Tax applied.").optional(),
|
|
1594
|
-
total: z.string().describe(
|
|
1654
|
+
total: /* @__PURE__ */ z.string().describe(
|
|
1595
1655
|
'Price after tax and discount is applied, specified as a monetary amount. For example, `"13.98"`.\n\nIf no tax is applied, the amount is the same as `subtotal`.'
|
|
1596
1656
|
).optional(),
|
|
1597
|
-
planPrice: z.string().describe("Plan price as it was at the moment of order creation.").optional(),
|
|
1598
|
-
currency: z.string().describe(
|
|
1657
|
+
planPrice: /* @__PURE__ */ z.string().describe("Plan price as it was at the moment of order creation.").optional(),
|
|
1658
|
+
currency: /* @__PURE__ */ z.string().describe(
|
|
1599
1659
|
"Currency code. Must be valid ISO 4217 currency code (e.g., USD)."
|
|
1600
1660
|
).optional(),
|
|
1601
|
-
freeTrialDays: z.number().int().describe(
|
|
1661
|
+
freeTrialDays: /* @__PURE__ */ z.number().int().describe(
|
|
1602
1662
|
"Free trial period for the order in days. Only available for recurring plans."
|
|
1603
1663
|
).min(1).max(999).optional().nullable(),
|
|
1604
|
-
coupon: z.object({
|
|
1605
|
-
code: z.string().describe("Code of the applied coupon.").min(1).max(20).optional(),
|
|
1606
|
-
amount: z.string().describe(
|
|
1664
|
+
coupon: /* @__PURE__ */ z.object({
|
|
1665
|
+
code: /* @__PURE__ */ z.string().describe("Code of the applied coupon.").min(1).max(20).optional(),
|
|
1666
|
+
amount: /* @__PURE__ */ z.string().describe(
|
|
1607
1667
|
"Total discount of the coupon, as a monetary amount."
|
|
1608
1668
|
).optional(),
|
|
1609
|
-
_id: z.string().describe("Coupon ID.").regex(
|
|
1669
|
+
_id: /* @__PURE__ */ z.string().describe("Coupon ID.").regex(
|
|
1610
1670
|
/^[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}$/,
|
|
1611
1671
|
"Must be a valid GUID"
|
|
1612
1672
|
).optional()
|
|
@@ -1614,45 +1674,45 @@ var GetOnlineOrderPreviewResponse = /* @__PURE__ */ z.object({
|
|
|
1614
1674
|
"Coupon applied to the order. Empty means no coupon was applied."
|
|
1615
1675
|
).optional()
|
|
1616
1676
|
}),
|
|
1617
|
-
z.xor([
|
|
1618
|
-
z.object({
|
|
1619
|
-
subscription: z.never().optional(),
|
|
1620
|
-
singlePaymentForDuration: z.never().optional(),
|
|
1621
|
-
singlePaymentUnlimited: z.never().optional()
|
|
1677
|
+
/* @__PURE__ */ z.xor([
|
|
1678
|
+
/* @__PURE__ */ z.object({
|
|
1679
|
+
subscription: /* @__PURE__ */ z.never().optional(),
|
|
1680
|
+
singlePaymentForDuration: /* @__PURE__ */ z.never().optional(),
|
|
1681
|
+
singlePaymentUnlimited: /* @__PURE__ */ z.never().optional()
|
|
1622
1682
|
}),
|
|
1623
|
-
z.object({
|
|
1624
|
-
singlePaymentForDuration: z.never().optional(),
|
|
1625
|
-
singlePaymentUnlimited: z.never().optional(),
|
|
1626
|
-
subscription: z.object({
|
|
1627
|
-
cycleDuration: z.object({
|
|
1628
|
-
count: z.number().int().describe(
|
|
1683
|
+
/* @__PURE__ */ z.object({
|
|
1684
|
+
singlePaymentForDuration: /* @__PURE__ */ z.never().optional(),
|
|
1685
|
+
singlePaymentUnlimited: /* @__PURE__ */ z.never().optional(),
|
|
1686
|
+
subscription: /* @__PURE__ */ z.object({
|
|
1687
|
+
cycleDuration: /* @__PURE__ */ z.object({
|
|
1688
|
+
count: /* @__PURE__ */ z.number().int().describe(
|
|
1629
1689
|
"Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`."
|
|
1630
1690
|
).min(1).optional().nullable(),
|
|
1631
|
-
unit: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
|
|
1691
|
+
unit: /* @__PURE__ */ z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
|
|
1632
1692
|
}).describe(
|
|
1633
1693
|
"Number of payment cycles the subscription is valid for.\n`0` for unlimited plans or for plans that are valid until canceled."
|
|
1634
1694
|
).optional(),
|
|
1635
|
-
cycleCount: z.number().int().describe(
|
|
1695
|
+
cycleCount: /* @__PURE__ */ z.number().int().describe(
|
|
1636
1696
|
"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."
|
|
1637
1697
|
).min(0).max(2e3).optional().nullable()
|
|
1638
1698
|
}).describe("Order has recurring payments.")
|
|
1639
1699
|
}),
|
|
1640
|
-
z.object({
|
|
1641
|
-
subscription: z.never().optional(),
|
|
1642
|
-
singlePaymentUnlimited: z.never().optional(),
|
|
1643
|
-
singlePaymentForDuration: z.object({
|
|
1644
|
-
count: z.number().int().describe(
|
|
1700
|
+
/* @__PURE__ */ z.object({
|
|
1701
|
+
subscription: /* @__PURE__ */ z.never().optional(),
|
|
1702
|
+
singlePaymentUnlimited: /* @__PURE__ */ z.never().optional(),
|
|
1703
|
+
singlePaymentForDuration: /* @__PURE__ */ z.object({
|
|
1704
|
+
count: /* @__PURE__ */ z.number().int().describe(
|
|
1645
1705
|
"Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`."
|
|
1646
1706
|
).min(1).optional().nullable(),
|
|
1647
|
-
unit: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
|
|
1707
|
+
unit: /* @__PURE__ */ z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
|
|
1648
1708
|
}).describe(
|
|
1649
1709
|
"One-time payment. Order is valid for a specified duration."
|
|
1650
1710
|
)
|
|
1651
1711
|
}),
|
|
1652
|
-
z.object({
|
|
1653
|
-
subscription: z.never().optional(),
|
|
1654
|
-
singlePaymentForDuration: z.never().optional(),
|
|
1655
|
-
singlePaymentUnlimited: z.boolean().describe(
|
|
1712
|
+
/* @__PURE__ */ z.object({
|
|
1713
|
+
subscription: /* @__PURE__ */ z.never().optional(),
|
|
1714
|
+
singlePaymentForDuration: /* @__PURE__ */ z.never().optional(),
|
|
1715
|
+
singlePaymentUnlimited: /* @__PURE__ */ z.boolean().describe(
|
|
1656
1716
|
"One-time payment. Order is valid until it is canceled."
|
|
1657
1717
|
)
|
|
1658
1718
|
})
|
|
@@ -1660,105 +1720,105 @@ var GetOnlineOrderPreviewResponse = /* @__PURE__ */ z.object({
|
|
|
1660
1720
|
).describe(
|
|
1661
1721
|
"__Deprecated.__ Use `pricing` instead. This property will be removed on September 30, 2022."
|
|
1662
1722
|
).optional(),
|
|
1663
|
-
pricing: z.intersection(
|
|
1664
|
-
z.object({
|
|
1665
|
-
prices: z.array(
|
|
1666
|
-
z.object({
|
|
1667
|
-
duration: z.object({
|
|
1668
|
-
cycleFrom: z.number().int().describe(
|
|
1723
|
+
pricing: /* @__PURE__ */ z.intersection(
|
|
1724
|
+
/* @__PURE__ */ z.object({
|
|
1725
|
+
prices: /* @__PURE__ */ z.array(
|
|
1726
|
+
/* @__PURE__ */ z.object({
|
|
1727
|
+
duration: /* @__PURE__ */ z.object({
|
|
1728
|
+
cycleFrom: /* @__PURE__ */ z.number().int().describe(
|
|
1669
1729
|
"Price starts to apply with this cycle.\n\n`1` is the first payment cycle for all pricing models."
|
|
1670
1730
|
).optional(),
|
|
1671
|
-
numberOfCycles: z.number().int().describe(
|
|
1731
|
+
numberOfCycles: /* @__PURE__ */ z.number().int().describe(
|
|
1672
1732
|
"Amount of cycles to apply price for.\n\nFor `subscription` pricing models with a finite number of cycles, the `numberOfCycles` is the same as `pricing.subscription.cycleCount`.\n\nFor `subscription` pricing models that are unlimited or until-canceled, the `numberOfCycles` is not returned.\n\nFor `singlePaymentForDuration` and `singlePaymentUnlimited` pricing models, the `numberOfCycles` is `1`."
|
|
1673
1733
|
).optional().nullable()
|
|
1674
1734
|
}).describe(
|
|
1675
1735
|
"Cycle duration to apply `price` for.\n\nUse with all pricing models.\nCan apply the same price to multiple payment cycles."
|
|
1676
1736
|
).optional(),
|
|
1677
|
-
price: z.object({
|
|
1678
|
-
subtotal: z.string().describe(
|
|
1737
|
+
price: /* @__PURE__ */ z.object({
|
|
1738
|
+
subtotal: /* @__PURE__ */ z.string().describe(
|
|
1679
1739
|
'Price of the order excluding tax, specified as a monetary amount. For example, `"9.99"`.'
|
|
1680
1740
|
).optional(),
|
|
1681
|
-
coupon: z.object({
|
|
1682
|
-
code: z.string().describe("Code of the applied coupon.").min(1).max(20).optional(),
|
|
1683
|
-
amount: z.string().describe(
|
|
1741
|
+
coupon: /* @__PURE__ */ z.object({
|
|
1742
|
+
code: /* @__PURE__ */ z.string().describe("Code of the applied coupon.").min(1).max(20).optional(),
|
|
1743
|
+
amount: /* @__PURE__ */ z.string().describe(
|
|
1684
1744
|
"Total discount of the coupon, as a monetary amount."
|
|
1685
1745
|
).optional(),
|
|
1686
|
-
_id: z.string().describe("Coupon ID.").regex(
|
|
1746
|
+
_id: /* @__PURE__ */ z.string().describe("Coupon ID.").regex(
|
|
1687
1747
|
/^[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}$/,
|
|
1688
1748
|
"Must be a valid GUID"
|
|
1689
1749
|
).optional()
|
|
1690
1750
|
}).describe(
|
|
1691
1751
|
"Coupon applied to the order, from the Coupons API."
|
|
1692
1752
|
).optional(),
|
|
1693
|
-
discount: z.string().describe("Total discount applied to the order.").optional(),
|
|
1694
|
-
tax: z.object({
|
|
1695
|
-
name: z.string().describe("Name of the tax. For example, VAT.").optional(),
|
|
1696
|
-
includedInPrice: z.boolean().describe(
|
|
1753
|
+
discount: /* @__PURE__ */ z.string().describe("Total discount applied to the order.").optional(),
|
|
1754
|
+
tax: /* @__PURE__ */ z.object({
|
|
1755
|
+
name: /* @__PURE__ */ z.string().describe("Name of the tax. For example, VAT.").optional(),
|
|
1756
|
+
includedInPrice: /* @__PURE__ */ z.boolean().describe(
|
|
1697
1757
|
"Whether tax is included in the original price. When `false`, tax is added at checkout."
|
|
1698
1758
|
).optional(),
|
|
1699
|
-
rate: z.string().describe(
|
|
1759
|
+
rate: /* @__PURE__ */ z.string().describe(
|
|
1700
1760
|
'Tax rate percentage, as a number between 0 and 100. For example, a 7% tax rate is `"7.00"`.'
|
|
1701
1761
|
).optional(),
|
|
1702
|
-
amount: z.string().describe(
|
|
1762
|
+
amount: /* @__PURE__ */ z.string().describe(
|
|
1703
1763
|
'Total tax, specified as a monetary amount. For example, `"3.99"`.'
|
|
1704
1764
|
).optional()
|
|
1705
1765
|
}).describe(
|
|
1706
1766
|
"Tax applied to the order.\n\nTax is only applied if the site [has it configured](https://support.wix.com/en/article/pricing-plans-setting-up-tax-collection)."
|
|
1707
1767
|
).optional(),
|
|
1708
|
-
total: z.string().describe(
|
|
1768
|
+
total: /* @__PURE__ */ z.string().describe(
|
|
1709
1769
|
'Price after tax and discount is applied. Specified as a monetary amount, for example, `"13.98"`.\n\nIf no tax is applied, the amount is the same as `subtotal`.'
|
|
1710
1770
|
).optional(),
|
|
1711
|
-
currency: z.string().describe(
|
|
1771
|
+
currency: /* @__PURE__ */ z.string().describe(
|
|
1712
1772
|
"Three-letter currency code in\n[ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format."
|
|
1713
1773
|
).optional(),
|
|
1714
|
-
proration: z.string().describe(
|
|
1774
|
+
proration: /* @__PURE__ */ z.string().describe(
|
|
1715
1775
|
"Price change after billing date was change and price was adjusted. Could be positive and negative values."
|
|
1716
1776
|
).optional()
|
|
1717
1777
|
}).describe("Order price.").optional()
|
|
1718
1778
|
})
|
|
1719
1779
|
).optional()
|
|
1720
1780
|
}),
|
|
1721
|
-
z.xor([
|
|
1722
|
-
z.object({
|
|
1723
|
-
subscription: z.never().optional(),
|
|
1724
|
-
singlePaymentForDuration: z.never().optional(),
|
|
1725
|
-
singlePaymentUnlimited: z.never().optional()
|
|
1781
|
+
/* @__PURE__ */ z.xor([
|
|
1782
|
+
/* @__PURE__ */ z.object({
|
|
1783
|
+
subscription: /* @__PURE__ */ z.never().optional(),
|
|
1784
|
+
singlePaymentForDuration: /* @__PURE__ */ z.never().optional(),
|
|
1785
|
+
singlePaymentUnlimited: /* @__PURE__ */ z.never().optional()
|
|
1726
1786
|
}),
|
|
1727
|
-
z.object({
|
|
1728
|
-
singlePaymentForDuration: z.never().optional(),
|
|
1729
|
-
singlePaymentUnlimited: z.never().optional(),
|
|
1730
|
-
subscription: z.object({
|
|
1731
|
-
cycleDuration: z.object({
|
|
1732
|
-
count: z.number().int().describe(
|
|
1787
|
+
/* @__PURE__ */ z.object({
|
|
1788
|
+
singlePaymentForDuration: /* @__PURE__ */ z.never().optional(),
|
|
1789
|
+
singlePaymentUnlimited: /* @__PURE__ */ z.never().optional(),
|
|
1790
|
+
subscription: /* @__PURE__ */ z.object({
|
|
1791
|
+
cycleDuration: /* @__PURE__ */ z.object({
|
|
1792
|
+
count: /* @__PURE__ */ z.number().int().describe(
|
|
1733
1793
|
"Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`."
|
|
1734
1794
|
).min(1).optional().nullable(),
|
|
1735
|
-
unit: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
|
|
1795
|
+
unit: /* @__PURE__ */ z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
|
|
1736
1796
|
}).describe(
|
|
1737
1797
|
"Number of payment cycles the subscription is valid for.\n`0` for unlimited plans or for plans that are valid until canceled."
|
|
1738
1798
|
).optional(),
|
|
1739
|
-
cycleCount: z.number().int().describe(
|
|
1799
|
+
cycleCount: /* @__PURE__ */ z.number().int().describe(
|
|
1740
1800
|
"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."
|
|
1741
1801
|
).min(0).max(2e3).optional().nullable()
|
|
1742
1802
|
}).describe(
|
|
1743
1803
|
"Pricing model for an order with recurring payment cycles."
|
|
1744
1804
|
)
|
|
1745
1805
|
}),
|
|
1746
|
-
z.object({
|
|
1747
|
-
subscription: z.never().optional(),
|
|
1748
|
-
singlePaymentUnlimited: z.never().optional(),
|
|
1749
|
-
singlePaymentForDuration: z.object({
|
|
1750
|
-
count: z.number().int().describe(
|
|
1806
|
+
/* @__PURE__ */ z.object({
|
|
1807
|
+
subscription: /* @__PURE__ */ z.never().optional(),
|
|
1808
|
+
singlePaymentUnlimited: /* @__PURE__ */ z.never().optional(),
|
|
1809
|
+
singlePaymentForDuration: /* @__PURE__ */ z.object({
|
|
1810
|
+
count: /* @__PURE__ */ z.number().int().describe(
|
|
1751
1811
|
"Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`."
|
|
1752
1812
|
).min(1).optional().nullable(),
|
|
1753
|
-
unit: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
|
|
1813
|
+
unit: /* @__PURE__ */ z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
|
|
1754
1814
|
}).describe(
|
|
1755
1815
|
"Pricing model for an order with a one-time payment and the order is valid for a specific amount of time."
|
|
1756
1816
|
)
|
|
1757
1817
|
}),
|
|
1758
|
-
z.object({
|
|
1759
|
-
subscription: z.never().optional(),
|
|
1760
|
-
singlePaymentForDuration: z.never().optional(),
|
|
1761
|
-
singlePaymentUnlimited: z.boolean().describe(
|
|
1818
|
+
/* @__PURE__ */ z.object({
|
|
1819
|
+
subscription: /* @__PURE__ */ z.never().optional(),
|
|
1820
|
+
singlePaymentForDuration: /* @__PURE__ */ z.never().optional(),
|
|
1821
|
+
singlePaymentUnlimited: /* @__PURE__ */ z.boolean().describe(
|
|
1762
1822
|
"Pricing model for an order with a one-time payment and the order is valid until canceled."
|
|
1763
1823
|
)
|
|
1764
1824
|
})
|
|
@@ -1766,8 +1826,8 @@ var GetOnlineOrderPreviewResponse = /* @__PURE__ */ z.object({
|
|
|
1766
1826
|
).describe(
|
|
1767
1827
|
"Order pricing model, price, and payment schedule.\n\nLearn more about [pricing models](https://dev.wix.com/api/rest/wix-pricing-plans/pricing-plans/introduction#wix-pricing-plans_pricing-plans_introduction_pricing-models)."
|
|
1768
1828
|
).optional(),
|
|
1769
|
-
type: z.enum(["UNDEFINED", "ONLINE", "OFFLINE", "EXTERNAL"]).describe("How the order was processed.").optional(),
|
|
1770
|
-
status: z.enum([
|
|
1829
|
+
type: /* @__PURE__ */ z.enum(["UNDEFINED", "ONLINE", "OFFLINE", "EXTERNAL"]).describe("How the order was processed.").optional(),
|
|
1830
|
+
status: /* @__PURE__ */ z.enum([
|
|
1771
1831
|
"UNDEFINED",
|
|
1772
1832
|
"DRAFT",
|
|
1773
1833
|
"PENDING",
|
|
@@ -1776,12 +1836,12 @@ var GetOnlineOrderPreviewResponse = /* @__PURE__ */ z.object({
|
|
|
1776
1836
|
"ENDED",
|
|
1777
1837
|
"CANCELED"
|
|
1778
1838
|
]).describe("Status of the order.").optional(),
|
|
1779
|
-
autoRenewCanceled: z.boolean().describe(
|
|
1839
|
+
autoRenewCanceled: /* @__PURE__ */ z.boolean().describe(
|
|
1780
1840
|
"Whether the order will be canceled at the next payment date.\n\nIf `true`, the order status will be `CANCELED` and the next payment won't be charged. Omitted for single payment orders."
|
|
1781
1841
|
).optional().nullable(),
|
|
1782
|
-
cancellation: z.object({
|
|
1783
|
-
requestedDate: z.date().describe("Date and time the cancellation was requested.").optional().nullable(),
|
|
1784
|
-
cause: z.enum([
|
|
1842
|
+
cancellation: /* @__PURE__ */ z.object({
|
|
1843
|
+
requestedDate: /* @__PURE__ */ z.date().describe("Date and time the cancellation was requested.").optional().nullable(),
|
|
1844
|
+
cause: /* @__PURE__ */ z.enum([
|
|
1785
1845
|
"UNDEFINED",
|
|
1786
1846
|
"OWNER_ACTION",
|
|
1787
1847
|
"MEMBER_ACTION",
|
|
@@ -1789,13 +1849,13 @@ var GetOnlineOrderPreviewResponse = /* @__PURE__ */ z.object({
|
|
|
1789
1849
|
"PAYMENT_SETUP_FAILURE",
|
|
1790
1850
|
"UNKNOWN"
|
|
1791
1851
|
]).describe("Reason for the cancellation.").optional(),
|
|
1792
|
-
effectiveAt: z.enum(["UNDEFINED", "IMMEDIATELY", "NEXT_PAYMENT_DATE"]).describe(
|
|
1852
|
+
effectiveAt: /* @__PURE__ */ z.enum(["UNDEFINED", "IMMEDIATELY", "NEXT_PAYMENT_DATE"]).describe(
|
|
1793
1853
|
"When the cancellation takes effect. Set when cancelling the order."
|
|
1794
1854
|
).optional()
|
|
1795
1855
|
}).describe(
|
|
1796
1856
|
"Details about the cancellation of an order.\n\nOnly present if the status is `CANCELED`."
|
|
1797
1857
|
).optional(),
|
|
1798
|
-
lastPaymentStatus: z.enum([
|
|
1858
|
+
lastPaymentStatus: /* @__PURE__ */ z.enum([
|
|
1799
1859
|
"UNDEFINED",
|
|
1800
1860
|
"PAID",
|
|
1801
1861
|
"REFUNDED",
|
|
@@ -1806,626 +1866,574 @@ var GetOnlineOrderPreviewResponse = /* @__PURE__ */ z.object({
|
|
|
1806
1866
|
]).describe(
|
|
1807
1867
|
"Status of the last payment for the order.\nUpdated automatically for online orders. Updated manually by the Wix user for offline orders."
|
|
1808
1868
|
).optional(),
|
|
1809
|
-
startDate: z.date().describe("Start date and time for the ordered plan.").optional().nullable(),
|
|
1810
|
-
endDate: z.date().describe(
|
|
1869
|
+
startDate: /* @__PURE__ */ z.date().describe("Start date and time for the ordered plan.").optional().nullable(),
|
|
1870
|
+
endDate: /* @__PURE__ */ z.date().describe(
|
|
1811
1871
|
"Current end date and time for the ordered plan.\n\n`endDate` may be updated over the course of an order.\nIf the order is paused, it will have a later `endDate` once it is resumed.\n`endDate` may also be postponed.\n\nOmitted if the order is valid until canceled and still `ACTIVE`."
|
|
1812
1872
|
).optional().nullable(),
|
|
1813
|
-
pausePeriods: z.array(
|
|
1814
|
-
z.object({
|
|
1815
|
-
status: z.enum(["UNDEFINED", "ACTIVE", "ENDED"]).describe("Status of the pause period.").optional(),
|
|
1816
|
-
pauseDate: z.date().describe("Start date and time of the pause period.").optional().nullable(),
|
|
1817
|
-
resumeDate: z.date().describe(
|
|
1873
|
+
pausePeriods: /* @__PURE__ */ z.array(
|
|
1874
|
+
/* @__PURE__ */ z.object({
|
|
1875
|
+
status: /* @__PURE__ */ z.enum(["UNDEFINED", "ACTIVE", "ENDED"]).describe("Status of the pause period.").optional(),
|
|
1876
|
+
pauseDate: /* @__PURE__ */ z.date().describe("Start date and time of the pause period.").optional().nullable(),
|
|
1877
|
+
resumeDate: /* @__PURE__ */ z.date().describe(
|
|
1818
1878
|
"End date and time of the pause period.\n\nOmitted while the pause period remains `ACTIVE`."
|
|
1819
1879
|
).optional().nullable()
|
|
1820
1880
|
})
|
|
1821
1881
|
).optional(),
|
|
1822
|
-
freeTrialDays: z.number().int().describe(
|
|
1882
|
+
freeTrialDays: /* @__PURE__ */ z.number().int().describe(
|
|
1823
1883
|
"Free trial period for the order, in days.\n\nOnly available for recurring plans."
|
|
1824
1884
|
).min(1).max(999).optional().nullable(),
|
|
1825
|
-
earliestEndDate: z.date().describe(
|
|
1885
|
+
earliestEndDate: /* @__PURE__ */ z.date().describe(
|
|
1826
1886
|
"Earliest end date and time that the plan for the order can expire.\n\nCalculated by using the original end date plus any pause periods. Omitted if the order is active until canceled. Reserved for future use."
|
|
1827
1887
|
).optional().nullable(),
|
|
1828
|
-
currentCycle: z.object({
|
|
1829
|
-
index: z.number().int().describe(
|
|
1888
|
+
currentCycle: /* @__PURE__ */ z.object({
|
|
1889
|
+
index: /* @__PURE__ */ z.number().int().describe(
|
|
1830
1890
|
"Index of the current payment cycle in the order.\n\n`0` when order is in a free trial period. In all other cases, the index starts with `1`."
|
|
1831
1891
|
).min(0).optional(),
|
|
1832
|
-
startedDate: z.date().describe("Start date and time for the current payment cycle.").optional().nullable(),
|
|
1833
|
-
endedDate: z.date().describe("End date and time for the current payment cycle.").optional().nullable()
|
|
1892
|
+
startedDate: /* @__PURE__ */ z.date().describe("Start date and time for the current payment cycle.").optional().nullable(),
|
|
1893
|
+
endedDate: /* @__PURE__ */ z.date().describe("End date and time for the current payment cycle.").optional().nullable()
|
|
1834
1894
|
}).describe(
|
|
1835
1895
|
"Current payment cycle for the order.\n\n`currentCycle` will be omitted if the order's status is `CANCELED` or `ENDED`, or if the `startDate` hasn't passed yet."
|
|
1836
1896
|
).optional(),
|
|
1837
|
-
planName: z.string().describe("Plan name at the time of purchase.").optional(),
|
|
1838
|
-
planDescription: z.string().describe("Plan description at the time of purchase").optional(),
|
|
1839
|
-
planPrice: z.string().describe("Plan price as it was at the moment of order creation.").optional(),
|
|
1840
|
-
_createdDate: z.date().describe("Date and time the order was created.").optional().nullable(),
|
|
1841
|
-
_updatedDate: z.date().describe("Date and time the order was updated.").optional().nullable(),
|
|
1842
|
-
formData: z.object({
|
|
1843
|
-
formId: z.string().describe(
|
|
1897
|
+
planName: /* @__PURE__ */ z.string().describe("Plan name at the time of purchase.").optional(),
|
|
1898
|
+
planDescription: /* @__PURE__ */ z.string().describe("Plan description at the time of purchase").optional(),
|
|
1899
|
+
planPrice: /* @__PURE__ */ z.string().describe("Plan price as it was at the moment of order creation.").optional(),
|
|
1900
|
+
_createdDate: /* @__PURE__ */ z.date().describe("Date and time the order was created.").optional().nullable(),
|
|
1901
|
+
_updatedDate: /* @__PURE__ */ z.date().describe("Date and time the order was updated.").optional().nullable(),
|
|
1902
|
+
formData: /* @__PURE__ */ z.object({
|
|
1903
|
+
formId: /* @__PURE__ */ z.string().describe(
|
|
1844
1904
|
"ID of the [order form](https://dev.wix.com/docs/rest/api-reference/wix-forms/form-submissions/introduction) associated with the plan at checkout."
|
|
1845
1905
|
).regex(
|
|
1846
1906
|
/^[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}$/,
|
|
1847
1907
|
"Must be a valid GUID"
|
|
1848
1908
|
).optional().nullable(),
|
|
1849
|
-
submissionId: z.string().describe(
|
|
1909
|
+
submissionId: /* @__PURE__ */ z.string().describe(
|
|
1850
1910
|
"ID of a submission to the plan's order form at checkout. Every time a visitor completes the checkout process for a plan, a new submission is created."
|
|
1851
1911
|
).regex(
|
|
1852
1912
|
/^[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}$/,
|
|
1853
1913
|
"Must be a valid GUID"
|
|
1854
1914
|
).optional().nullable(),
|
|
1855
|
-
submissionData: z.record(z.string(), z.any()).describe("Data submitted to the plan's order form at checkout.").optional()
|
|
1915
|
+
submissionData: /* @__PURE__ */ z.record(/* @__PURE__ */ z.string(), /* @__PURE__ */ z.any()).describe("Data submitted to the plan's order form at checkout.").optional()
|
|
1856
1916
|
}).describe(
|
|
1857
1917
|
"Information about the form submitted during the plan's checkout."
|
|
1858
1918
|
).optional()
|
|
1859
|
-
}).describe(
|
|
1860
|
-
"Order preview. This field is undefined if the member has already reached the purchase limit for the order's plan."
|
|
1861
|
-
).optional(),
|
|
1862
|
-
purchaseLimitExceeded: z.boolean().describe(
|
|
1863
|
-
"Whether the member has already reached purchase limit for the order's plan."
|
|
1864
|
-
).optional()
|
|
1919
|
+
}).describe("Order.").optional()
|
|
1865
1920
|
});
|
|
1866
|
-
var
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
"Member ID of the buyer the previewed order is for, from the Members API."
|
|
1873
|
-
).regex(
|
|
1874
|
-
/^[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}$/,
|
|
1875
|
-
"Must be a valid GUID"
|
|
1876
|
-
),
|
|
1877
|
-
options: z.object({
|
|
1878
|
-
startDate: z.date().describe(
|
|
1879
|
-
"Start date and time for plan of the previewed order in a `YYYY-MM-DDThh:mm[:ss][.sss]Z` format.\n\nDefault: Current date and time."
|
|
1921
|
+
var ManagementListOrdersRequest = /* @__PURE__ */ z.object({
|
|
1922
|
+
options: /* @__PURE__ */ z.object({
|
|
1923
|
+
buyerIds: /* @__PURE__ */ z.array(/* @__PURE__ */ z.string()).optional(),
|
|
1924
|
+
planIds: /* @__PURE__ */ z.array(/* @__PURE__ */ z.string()).optional(),
|
|
1925
|
+
autoRenewCanceled: /* @__PURE__ */ z.boolean().describe(
|
|
1926
|
+
"Filter by whether or not the auto-renewal of recurring orders was canceled."
|
|
1880
1927
|
).optional().nullable(),
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1928
|
+
orderStatuses: /* @__PURE__ */ z.array(
|
|
1929
|
+
/* @__PURE__ */ z.enum([
|
|
1930
|
+
"UNDEFINED",
|
|
1931
|
+
"DRAFT",
|
|
1932
|
+
"PENDING",
|
|
1933
|
+
"ACTIVE",
|
|
1934
|
+
"PAUSED",
|
|
1935
|
+
"ENDED",
|
|
1936
|
+
"CANCELED"
|
|
1937
|
+
])
|
|
1889
1938
|
).optional(),
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1939
|
+
paymentStatuses: /* @__PURE__ */ z.array(
|
|
1940
|
+
/* @__PURE__ */ z.enum([
|
|
1941
|
+
"UNDEFINED",
|
|
1942
|
+
"PAID",
|
|
1943
|
+
"REFUNDED",
|
|
1944
|
+
"FAILED",
|
|
1945
|
+
"UNPAID",
|
|
1946
|
+
"PENDING",
|
|
1947
|
+
"NOT_APPLICABLE"
|
|
1948
|
+
])
|
|
1895
1949
|
).optional(),
|
|
1896
|
-
|
|
1897
|
-
"
|
|
1898
|
-
).
|
|
1899
|
-
|
|
1900
|
-
|
|
1950
|
+
limit: /* @__PURE__ */ z.number().int().describe(
|
|
1951
|
+
"Number of orders to return. See Sorting and Paging for more information.\n\nMax: `50`"
|
|
1952
|
+
).min(1).max(50).optional().nullable(),
|
|
1953
|
+
offset: /* @__PURE__ */ z.number().int().describe("Number of orders to skip in the current sort order.").min(0).optional().nullable(),
|
|
1954
|
+
sorting: /* @__PURE__ */ z.object({
|
|
1955
|
+
fieldName: /* @__PURE__ */ z.string().describe("Name of the field to sort by.").max(512).optional(),
|
|
1956
|
+
order: /* @__PURE__ */ z.enum(["ASC", "DESC"]).optional(),
|
|
1957
|
+
origin: /* @__PURE__ */ z.object({
|
|
1958
|
+
latitude: /* @__PURE__ */ z.number().describe("Address latitude.").optional().nullable(),
|
|
1959
|
+
longitude: /* @__PURE__ */ z.number().describe("Address longitude.").optional().nullable()
|
|
1960
|
+
}).describe(
|
|
1961
|
+
"Origin point for geo-distance sorting on a GEO field\nresults are ordered by distance from this point (ASC = nearest first, DESC = farthest first)."
|
|
1962
|
+
).optional()
|
|
1963
|
+
}).describe(
|
|
1964
|
+
"Sort order.\n\nUse `ASC` for ascending order or `DESC` for descending order.\n\nDefault: `DESC`."
|
|
1901
1965
|
).optional(),
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
memberId: z.string().describe("Member ID for a Wix site member, from the Members API.").regex(
|
|
1966
|
+
fieldSet: /* @__PURE__ */ z.enum(["UNKNOWN_SET", "BASIC", "FULL"]).optional()
|
|
1967
|
+
}).describe("Filtering, sorting, and pagination options. ").optional()
|
|
1968
|
+
});
|
|
1969
|
+
var ManagementListOrdersResponse = /* @__PURE__ */ z.object({
|
|
1970
|
+
orders: /* @__PURE__ */ z.array(
|
|
1971
|
+
/* @__PURE__ */ z.object({
|
|
1972
|
+
_id: /* @__PURE__ */ z.string().describe("Order ID.").regex(
|
|
1910
1973
|
/^[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}$/,
|
|
1911
1974
|
"Must be a valid GUID"
|
|
1912
1975
|
).optional(),
|
|
1913
|
-
|
|
1914
|
-
"
|
|
1976
|
+
planId: /* @__PURE__ */ z.string().describe(
|
|
1977
|
+
"ID of the plan purchased with the order, from the Plans API."
|
|
1915
1978
|
).regex(
|
|
1916
1979
|
/^[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}$/,
|
|
1917
1980
|
"Must be a valid GUID"
|
|
1918
|
-
).optional()
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1981
|
+
).optional(),
|
|
1982
|
+
subscriptionId: /* @__PURE__ */ z.string().describe(
|
|
1983
|
+
"ID of the related Wix subscription.\n\nEvery pricing plan order corresponds to a Wix subscription, including orders for single payment plans. Learn more in\na [Pricing Plans overview](https://support.wix.com/en/article/pricing-plans-an-overview#create-plans-to-suit-your-business)."
|
|
1984
|
+
).regex(
|
|
1985
|
+
/^[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}$/,
|
|
1986
|
+
"Must be a valid GUID"
|
|
1987
|
+
).optional(),
|
|
1988
|
+
wixPayOrderId: /* @__PURE__ */ z.string().describe(
|
|
1989
|
+
"Wix Pay order ID.\n\nProvided by Wix whether the order is created online or offline. The field is omitted when the order is free."
|
|
1990
|
+
).regex(
|
|
1991
|
+
/^[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}$/,
|
|
1992
|
+
"Must be a valid GUID"
|
|
1993
|
+
).optional().nullable(),
|
|
1994
|
+
buyer: /* @__PURE__ */ z.object({
|
|
1995
|
+
memberId: /* @__PURE__ */ z.string().describe(
|
|
1996
|
+
"Member ID for a Wix site member, from the Members API."
|
|
1997
|
+
).regex(
|
|
1998
|
+
/^[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}$/,
|
|
1999
|
+
"Must be a valid GUID"
|
|
1926
2000
|
).optional(),
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
2001
|
+
contactId: /* @__PURE__ */ z.string().describe(
|
|
2002
|
+
"Contact ID for a Wix site contact, from the Contacts API."
|
|
2003
|
+
).regex(
|
|
2004
|
+
/^[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}$/,
|
|
2005
|
+
"Must be a valid GUID"
|
|
2006
|
+
).optional()
|
|
2007
|
+
}).describe(
|
|
2008
|
+
"The buyer's IDs. Includes `memberId` and `contactId`.\n\nCurrently, Pricing Plan purchases are limited to members only. `contactId` is returned,\nbut a buyer will not be able to purchase a plan without a `memberId`."
|
|
2009
|
+
).optional(),
|
|
2010
|
+
priceDetails: /* @__PURE__ */ z.intersection(
|
|
2011
|
+
/* @__PURE__ */ z.object({
|
|
2012
|
+
subtotal: /* @__PURE__ */ z.string().describe(
|
|
2013
|
+
'Price of the order excluding tax, specified as a monetary amount. for example, `"9.99"`.'
|
|
1932
2014
|
).optional(),
|
|
1933
|
-
|
|
1934
|
-
|
|
2015
|
+
discount: /* @__PURE__ */ z.string().describe("Total discount applied.").optional(),
|
|
2016
|
+
tax: /* @__PURE__ */ z.object({
|
|
2017
|
+
name: /* @__PURE__ */ z.string().describe("Name of the tax. For example, VAT.").optional(),
|
|
2018
|
+
includedInPrice: /* @__PURE__ */ z.boolean().describe(
|
|
2019
|
+
"Whether tax is included in the original price. When `false`, tax is added at checkout."
|
|
2020
|
+
).optional(),
|
|
2021
|
+
rate: /* @__PURE__ */ z.string().describe(
|
|
2022
|
+
'Tax rate percentage, as a number between 0 and 100. For example, a 7% tax rate is `"7.00"`.'
|
|
2023
|
+
).optional(),
|
|
2024
|
+
amount: /* @__PURE__ */ z.string().describe(
|
|
2025
|
+
'Total tax, specified as a monetary amount. For example, `"3.99"`.'
|
|
2026
|
+
).optional()
|
|
2027
|
+
}).describe("Tax applied.").optional(),
|
|
2028
|
+
total: /* @__PURE__ */ z.string().describe(
|
|
2029
|
+
'Price after tax and discount is applied, specified as a monetary amount. For example, `"13.98"`.\n\nIf no tax is applied, the amount is the same as `subtotal`.'
|
|
1935
2030
|
).optional(),
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
).optional()
|
|
1939
|
-
}).describe("Tax applied.").optional(),
|
|
1940
|
-
total: z.string().describe(
|
|
1941
|
-
'Price after tax and discount is applied, specified as a monetary amount. For example, `"13.98"`.\n\nIf no tax is applied, the amount is the same as `subtotal`.'
|
|
1942
|
-
).optional(),
|
|
1943
|
-
planPrice: z.string().describe("Plan price as it was at the moment of order creation.").optional(),
|
|
1944
|
-
currency: z.string().describe(
|
|
1945
|
-
"Currency code. Must be valid ISO 4217 currency code (e.g., USD)."
|
|
1946
|
-
).optional(),
|
|
1947
|
-
freeTrialDays: z.number().int().describe(
|
|
1948
|
-
"Free trial period for the order in days. Only available for recurring plans."
|
|
1949
|
-
).min(1).max(999).optional().nullable(),
|
|
1950
|
-
coupon: z.object({
|
|
1951
|
-
code: z.string().describe("Code of the applied coupon.").min(1).max(20).optional(),
|
|
1952
|
-
amount: z.string().describe(
|
|
1953
|
-
"Total discount of the coupon, as a monetary amount."
|
|
2031
|
+
planPrice: /* @__PURE__ */ z.string().describe(
|
|
2032
|
+
"Plan price as it was at the moment of order creation."
|
|
1954
2033
|
).optional(),
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
).
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
subscription: z.never().optional(),
|
|
1966
|
-
singlePaymentForDuration: z.never().optional(),
|
|
1967
|
-
singlePaymentUnlimited: z.never().optional()
|
|
1968
|
-
}),
|
|
1969
|
-
z.object({
|
|
1970
|
-
singlePaymentForDuration: z.never().optional(),
|
|
1971
|
-
singlePaymentUnlimited: z.never().optional(),
|
|
1972
|
-
subscription: z.object({
|
|
1973
|
-
cycleDuration: z.object({
|
|
1974
|
-
count: z.number().int().describe(
|
|
1975
|
-
"Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`."
|
|
1976
|
-
).min(1).optional().nullable(),
|
|
1977
|
-
unit: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
|
|
1978
|
-
}).describe(
|
|
1979
|
-
"Number of payment cycles the subscription is valid for.\n`0` for unlimited plans or for plans that are valid until canceled."
|
|
2034
|
+
currency: /* @__PURE__ */ z.string().describe(
|
|
2035
|
+
"Currency code. Must be valid ISO 4217 currency code (e.g., USD)."
|
|
2036
|
+
).optional(),
|
|
2037
|
+
freeTrialDays: /* @__PURE__ */ z.number().int().describe(
|
|
2038
|
+
"Free trial period for the order in days. Only available for recurring plans."
|
|
2039
|
+
).min(1).max(999).optional().nullable(),
|
|
2040
|
+
coupon: /* @__PURE__ */ z.object({
|
|
2041
|
+
code: /* @__PURE__ */ z.string().describe("Code of the applied coupon.").min(1).max(20).optional(),
|
|
2042
|
+
amount: /* @__PURE__ */ z.string().describe(
|
|
2043
|
+
"Total discount of the coupon, as a monetary amount."
|
|
1980
2044
|
).optional(),
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
}),
|
|
1986
|
-
z.object({
|
|
1987
|
-
subscription: z.never().optional(),
|
|
1988
|
-
singlePaymentUnlimited: z.never().optional(),
|
|
1989
|
-
singlePaymentForDuration: z.object({
|
|
1990
|
-
count: z.number().int().describe(
|
|
1991
|
-
"Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`."
|
|
1992
|
-
).min(1).optional().nullable(),
|
|
1993
|
-
unit: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
|
|
2045
|
+
_id: /* @__PURE__ */ z.string().describe("Coupon ID.").regex(
|
|
2046
|
+
/^[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}$/,
|
|
2047
|
+
"Must be a valid GUID"
|
|
2048
|
+
).optional()
|
|
1994
2049
|
}).describe(
|
|
1995
|
-
"
|
|
1996
|
-
)
|
|
2050
|
+
"Coupon applied to the order. Empty means no coupon was applied."
|
|
2051
|
+
).optional()
|
|
1997
2052
|
}),
|
|
1998
|
-
z.
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
)
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
"Price starts to apply with this cycle.\n\n`1` is the first payment cycle for all pricing models."
|
|
2053
|
+
/* @__PURE__ */ z.xor([
|
|
2054
|
+
/* @__PURE__ */ z.object({
|
|
2055
|
+
subscription: /* @__PURE__ */ z.never().optional(),
|
|
2056
|
+
singlePaymentForDuration: /* @__PURE__ */ z.never().optional(),
|
|
2057
|
+
singlePaymentUnlimited: /* @__PURE__ */ z.never().optional()
|
|
2058
|
+
}),
|
|
2059
|
+
/* @__PURE__ */ z.object({
|
|
2060
|
+
singlePaymentForDuration: /* @__PURE__ */ z.never().optional(),
|
|
2061
|
+
singlePaymentUnlimited: /* @__PURE__ */ z.never().optional(),
|
|
2062
|
+
subscription: /* @__PURE__ */ z.object({
|
|
2063
|
+
cycleDuration: /* @__PURE__ */ z.object({
|
|
2064
|
+
count: /* @__PURE__ */ z.number().int().describe(
|
|
2065
|
+
"Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`."
|
|
2066
|
+
).min(1).optional().nullable(),
|
|
2067
|
+
unit: /* @__PURE__ */ z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
|
|
2068
|
+
}).describe(
|
|
2069
|
+
"Number of payment cycles the subscription is valid for.\n`0` for unlimited plans or for plans that are valid until canceled."
|
|
2016
2070
|
).optional(),
|
|
2017
|
-
|
|
2018
|
-
"
|
|
2019
|
-
).optional().nullable()
|
|
2071
|
+
cycleCount: /* @__PURE__ */ z.number().int().describe(
|
|
2072
|
+
"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."
|
|
2073
|
+
).min(0).max(2e3).optional().nullable()
|
|
2074
|
+
}).describe("Order has recurring payments.")
|
|
2075
|
+
}),
|
|
2076
|
+
/* @__PURE__ */ z.object({
|
|
2077
|
+
subscription: /* @__PURE__ */ z.never().optional(),
|
|
2078
|
+
singlePaymentUnlimited: /* @__PURE__ */ z.never().optional(),
|
|
2079
|
+
singlePaymentForDuration: /* @__PURE__ */ z.object({
|
|
2080
|
+
count: /* @__PURE__ */ z.number().int().describe(
|
|
2081
|
+
"Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`."
|
|
2082
|
+
).min(1).optional().nullable(),
|
|
2083
|
+
unit: /* @__PURE__ */ z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
|
|
2020
2084
|
}).describe(
|
|
2021
|
-
"
|
|
2022
|
-
)
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2085
|
+
"One-time payment. Order is valid for a specified duration."
|
|
2086
|
+
)
|
|
2087
|
+
}),
|
|
2088
|
+
/* @__PURE__ */ z.object({
|
|
2089
|
+
subscription: /* @__PURE__ */ z.never().optional(),
|
|
2090
|
+
singlePaymentForDuration: /* @__PURE__ */ z.never().optional(),
|
|
2091
|
+
singlePaymentUnlimited: /* @__PURE__ */ z.boolean().describe(
|
|
2092
|
+
"One-time payment. Order is valid until it is canceled."
|
|
2093
|
+
)
|
|
2094
|
+
})
|
|
2095
|
+
])
|
|
2096
|
+
).describe(
|
|
2097
|
+
"__Deprecated.__ Use `pricing` instead. This property will be removed on September 30, 2022."
|
|
2098
|
+
).optional(),
|
|
2099
|
+
pricing: /* @__PURE__ */ z.intersection(
|
|
2100
|
+
/* @__PURE__ */ z.object({
|
|
2101
|
+
prices: /* @__PURE__ */ z.array(
|
|
2102
|
+
/* @__PURE__ */ z.object({
|
|
2103
|
+
duration: /* @__PURE__ */ z.object({
|
|
2104
|
+
cycleFrom: /* @__PURE__ */ z.number().int().describe(
|
|
2105
|
+
"Price starts to apply with this cycle.\n\n`1` is the first payment cycle for all pricing models."
|
|
2031
2106
|
).optional(),
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
).optional()
|
|
2107
|
+
numberOfCycles: /* @__PURE__ */ z.number().int().describe(
|
|
2108
|
+
"Amount of cycles to apply price for.\n\nFor `subscription` pricing models with a finite number of cycles, the `numberOfCycles` is the same as `pricing.subscription.cycleCount`.\n\nFor `subscription` pricing models that are unlimited or until-canceled, the `numberOfCycles` is not returned.\n\nFor `singlePaymentForDuration` and `singlePaymentUnlimited` pricing models, the `numberOfCycles` is `1`."
|
|
2109
|
+
).optional().nullable()
|
|
2036
2110
|
}).describe(
|
|
2037
|
-
"
|
|
2111
|
+
"Cycle duration to apply `price` for.\n\nUse with all pricing models.\nCan apply the same price to multiple payment cycles."
|
|
2038
2112
|
).optional(),
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
includedInPrice: z.boolean().describe(
|
|
2043
|
-
"Whether tax is included in the original price. When `false`, tax is added at checkout."
|
|
2113
|
+
price: /* @__PURE__ */ z.object({
|
|
2114
|
+
subtotal: /* @__PURE__ */ z.string().describe(
|
|
2115
|
+
'Price of the order excluding tax, specified as a monetary amount. For example, `"9.99"`.'
|
|
2044
2116
|
).optional(),
|
|
2045
|
-
|
|
2046
|
-
|
|
2117
|
+
coupon: /* @__PURE__ */ z.object({
|
|
2118
|
+
code: /* @__PURE__ */ z.string().describe("Code of the applied coupon.").min(1).max(20).optional(),
|
|
2119
|
+
amount: /* @__PURE__ */ z.string().describe(
|
|
2120
|
+
"Total discount of the coupon, as a monetary amount."
|
|
2121
|
+
).optional(),
|
|
2122
|
+
_id: /* @__PURE__ */ z.string().describe("Coupon ID.").regex(
|
|
2123
|
+
/^[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}$/,
|
|
2124
|
+
"Must be a valid GUID"
|
|
2125
|
+
).optional()
|
|
2126
|
+
}).describe(
|
|
2127
|
+
"Coupon applied to the order, from the Coupons API."
|
|
2047
2128
|
).optional(),
|
|
2048
|
-
|
|
2049
|
-
|
|
2129
|
+
discount: /* @__PURE__ */ z.string().describe("Total discount applied to the order.").optional(),
|
|
2130
|
+
tax: /* @__PURE__ */ z.object({
|
|
2131
|
+
name: /* @__PURE__ */ z.string().describe("Name of the tax. For example, VAT.").optional(),
|
|
2132
|
+
includedInPrice: /* @__PURE__ */ z.boolean().describe(
|
|
2133
|
+
"Whether tax is included in the original price. When `false`, tax is added at checkout."
|
|
2134
|
+
).optional(),
|
|
2135
|
+
rate: /* @__PURE__ */ z.string().describe(
|
|
2136
|
+
'Tax rate percentage, as a number between 0 and 100. For example, a 7% tax rate is `"7.00"`.'
|
|
2137
|
+
).optional(),
|
|
2138
|
+
amount: /* @__PURE__ */ z.string().describe(
|
|
2139
|
+
'Total tax, specified as a monetary amount. For example, `"3.99"`.'
|
|
2140
|
+
).optional()
|
|
2141
|
+
}).describe(
|
|
2142
|
+
"Tax applied to the order.\n\nTax is only applied if the site [has it configured](https://support.wix.com/en/article/pricing-plans-setting-up-tax-collection)."
|
|
2143
|
+
).optional(),
|
|
2144
|
+
total: /* @__PURE__ */ z.string().describe(
|
|
2145
|
+
'Price after tax and discount is applied. Specified as a monetary amount, for example, `"13.98"`.\n\nIf no tax is applied, the amount is the same as `subtotal`.'
|
|
2146
|
+
).optional(),
|
|
2147
|
+
currency: /* @__PURE__ */ z.string().describe(
|
|
2148
|
+
"Three-letter currency code in\n[ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format."
|
|
2149
|
+
).optional(),
|
|
2150
|
+
proration: /* @__PURE__ */ z.string().describe(
|
|
2151
|
+
"Price change after billing date was change and price was adjusted. Could be positive and negative values."
|
|
2050
2152
|
).optional()
|
|
2153
|
+
}).describe("Order price.").optional()
|
|
2154
|
+
})
|
|
2155
|
+
).optional()
|
|
2156
|
+
}),
|
|
2157
|
+
/* @__PURE__ */ z.xor([
|
|
2158
|
+
/* @__PURE__ */ z.object({
|
|
2159
|
+
subscription: /* @__PURE__ */ z.never().optional(),
|
|
2160
|
+
singlePaymentForDuration: /* @__PURE__ */ z.never().optional(),
|
|
2161
|
+
singlePaymentUnlimited: /* @__PURE__ */ z.never().optional()
|
|
2162
|
+
}),
|
|
2163
|
+
/* @__PURE__ */ z.object({
|
|
2164
|
+
singlePaymentForDuration: /* @__PURE__ */ z.never().optional(),
|
|
2165
|
+
singlePaymentUnlimited: /* @__PURE__ */ z.never().optional(),
|
|
2166
|
+
subscription: /* @__PURE__ */ z.object({
|
|
2167
|
+
cycleDuration: /* @__PURE__ */ z.object({
|
|
2168
|
+
count: /* @__PURE__ */ z.number().int().describe(
|
|
2169
|
+
"Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`."
|
|
2170
|
+
).min(1).optional().nullable(),
|
|
2171
|
+
unit: /* @__PURE__ */ z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
|
|
2051
2172
|
}).describe(
|
|
2052
|
-
"
|
|
2053
|
-
).optional(),
|
|
2054
|
-
total: z.string().describe(
|
|
2055
|
-
'Price after tax and discount is applied. Specified as a monetary amount, for example, `"13.98"`.\n\nIf no tax is applied, the amount is the same as `subtotal`.'
|
|
2056
|
-
).optional(),
|
|
2057
|
-
currency: z.string().describe(
|
|
2058
|
-
"Three-letter currency code in\n[ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format."
|
|
2173
|
+
"Number of payment cycles the subscription is valid for.\n`0` for unlimited plans or for plans that are valid until canceled."
|
|
2059
2174
|
).optional(),
|
|
2060
|
-
|
|
2061
|
-
"
|
|
2062
|
-
).optional()
|
|
2063
|
-
}).describe(
|
|
2175
|
+
cycleCount: /* @__PURE__ */ z.number().int().describe(
|
|
2176
|
+
"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."
|
|
2177
|
+
).min(0).max(2e3).optional().nullable()
|
|
2178
|
+
}).describe(
|
|
2179
|
+
"Pricing model for an order with recurring payment cycles."
|
|
2180
|
+
)
|
|
2181
|
+
}),
|
|
2182
|
+
/* @__PURE__ */ z.object({
|
|
2183
|
+
subscription: /* @__PURE__ */ z.never().optional(),
|
|
2184
|
+
singlePaymentUnlimited: /* @__PURE__ */ z.never().optional(),
|
|
2185
|
+
singlePaymentForDuration: /* @__PURE__ */ z.object({
|
|
2186
|
+
count: /* @__PURE__ */ z.number().int().describe(
|
|
2187
|
+
"Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`."
|
|
2188
|
+
).min(1).optional().nullable(),
|
|
2189
|
+
unit: /* @__PURE__ */ z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
|
|
2190
|
+
}).describe(
|
|
2191
|
+
"Pricing model for an order with a one-time payment and the order is valid for a specific amount of time."
|
|
2192
|
+
)
|
|
2193
|
+
}),
|
|
2194
|
+
/* @__PURE__ */ z.object({
|
|
2195
|
+
subscription: /* @__PURE__ */ z.never().optional(),
|
|
2196
|
+
singlePaymentForDuration: /* @__PURE__ */ z.never().optional(),
|
|
2197
|
+
singlePaymentUnlimited: /* @__PURE__ */ z.boolean().describe(
|
|
2198
|
+
"Pricing model for an order with a one-time payment and the order is valid until canceled."
|
|
2199
|
+
)
|
|
2064
2200
|
})
|
|
2201
|
+
])
|
|
2202
|
+
).describe(
|
|
2203
|
+
"Order pricing model, price, and payment schedule.\n\nLearn more about [pricing models](https://dev.wix.com/api/rest/wix-pricing-plans/pricing-plans/introduction#wix-pricing-plans_pricing-plans_introduction_pricing-models)."
|
|
2204
|
+
).optional(),
|
|
2205
|
+
type: /* @__PURE__ */ z.enum(["UNDEFINED", "ONLINE", "OFFLINE", "EXTERNAL"]).describe("How the order was processed.").optional(),
|
|
2206
|
+
status: /* @__PURE__ */ z.enum([
|
|
2207
|
+
"UNDEFINED",
|
|
2208
|
+
"DRAFT",
|
|
2209
|
+
"PENDING",
|
|
2210
|
+
"ACTIVE",
|
|
2211
|
+
"PAUSED",
|
|
2212
|
+
"ENDED",
|
|
2213
|
+
"CANCELED"
|
|
2214
|
+
]).describe("Status of the order.").optional(),
|
|
2215
|
+
autoRenewCanceled: /* @__PURE__ */ z.boolean().describe(
|
|
2216
|
+
"Whether the order will be canceled at the next payment date.\n\nIf `true`, the order status will be `CANCELED` and the next payment won't be charged. Omitted for single payment orders."
|
|
2217
|
+
).optional().nullable(),
|
|
2218
|
+
cancellation: /* @__PURE__ */ z.object({
|
|
2219
|
+
requestedDate: /* @__PURE__ */ z.date().describe("Date and time the cancellation was requested.").optional().nullable(),
|
|
2220
|
+
cause: /* @__PURE__ */ z.enum([
|
|
2221
|
+
"UNDEFINED",
|
|
2222
|
+
"OWNER_ACTION",
|
|
2223
|
+
"MEMBER_ACTION",
|
|
2224
|
+
"PAYMENT_FAILURE",
|
|
2225
|
+
"PAYMENT_SETUP_FAILURE",
|
|
2226
|
+
"UNKNOWN"
|
|
2227
|
+
]).describe("Reason for the cancellation.").optional(),
|
|
2228
|
+
effectiveAt: /* @__PURE__ */ z.enum(["UNDEFINED", "IMMEDIATELY", "NEXT_PAYMENT_DATE"]).describe(
|
|
2229
|
+
"When the cancellation takes effect. Set when cancelling the order."
|
|
2065
2230
|
).optional()
|
|
2066
|
-
})
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
singlePaymentForDuration: z.never().optional(),
|
|
2071
|
-
singlePaymentUnlimited: z.never().optional()
|
|
2072
|
-
}),
|
|
2073
|
-
z.object({
|
|
2074
|
-
singlePaymentForDuration: z.never().optional(),
|
|
2075
|
-
singlePaymentUnlimited: z.never().optional(),
|
|
2076
|
-
subscription: z.object({
|
|
2077
|
-
cycleDuration: z.object({
|
|
2078
|
-
count: z.number().int().describe(
|
|
2079
|
-
"Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`."
|
|
2080
|
-
).min(1).optional().nullable(),
|
|
2081
|
-
unit: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
|
|
2082
|
-
}).describe(
|
|
2083
|
-
"Number of payment cycles the subscription is valid for.\n`0` for unlimited plans or for plans that are valid until canceled."
|
|
2084
|
-
).optional(),
|
|
2085
|
-
cycleCount: z.number().int().describe(
|
|
2086
|
-
"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."
|
|
2087
|
-
).min(0).max(2e3).optional().nullable()
|
|
2088
|
-
}).describe(
|
|
2089
|
-
"Pricing model for an order with recurring payment cycles."
|
|
2090
|
-
)
|
|
2091
|
-
}),
|
|
2092
|
-
z.object({
|
|
2093
|
-
subscription: z.never().optional(),
|
|
2094
|
-
singlePaymentUnlimited: z.never().optional(),
|
|
2095
|
-
singlePaymentForDuration: z.object({
|
|
2096
|
-
count: z.number().int().describe(
|
|
2097
|
-
"Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`."
|
|
2098
|
-
).min(1).optional().nullable(),
|
|
2099
|
-
unit: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
|
|
2100
|
-
}).describe(
|
|
2101
|
-
"Pricing model for an order with a one-time payment and the order is valid for a specific amount of time."
|
|
2102
|
-
)
|
|
2103
|
-
}),
|
|
2104
|
-
z.object({
|
|
2105
|
-
subscription: z.never().optional(),
|
|
2106
|
-
singlePaymentForDuration: z.never().optional(),
|
|
2107
|
-
singlePaymentUnlimited: z.boolean().describe(
|
|
2108
|
-
"Pricing model for an order with a one-time payment and the order is valid until canceled."
|
|
2109
|
-
)
|
|
2110
|
-
})
|
|
2111
|
-
])
|
|
2112
|
-
).describe(
|
|
2113
|
-
"Order pricing model, price, and payment schedule.\n\nLearn more about [pricing models](https://dev.wix.com/api/rest/wix-pricing-plans/pricing-plans/introduction#wix-pricing-plans_pricing-plans_introduction_pricing-models)."
|
|
2114
|
-
).optional(),
|
|
2115
|
-
type: z.enum(["UNDEFINED", "ONLINE", "OFFLINE", "EXTERNAL"]).describe("How the order was processed.").optional(),
|
|
2116
|
-
status: z.enum([
|
|
2117
|
-
"UNDEFINED",
|
|
2118
|
-
"DRAFT",
|
|
2119
|
-
"PENDING",
|
|
2120
|
-
"ACTIVE",
|
|
2121
|
-
"PAUSED",
|
|
2122
|
-
"ENDED",
|
|
2123
|
-
"CANCELED"
|
|
2124
|
-
]).describe("Status of the order.").optional(),
|
|
2125
|
-
autoRenewCanceled: z.boolean().describe(
|
|
2126
|
-
"Whether the order will be canceled at the next payment date.\n\nIf `true`, the order status will be `CANCELED` and the next payment won't be charged. Omitted for single payment orders."
|
|
2127
|
-
).optional().nullable(),
|
|
2128
|
-
cancellation: z.object({
|
|
2129
|
-
requestedDate: z.date().describe("Date and time the cancellation was requested.").optional().nullable(),
|
|
2130
|
-
cause: z.enum([
|
|
2231
|
+
}).describe(
|
|
2232
|
+
"Details about the cancellation of an order.\n\nOnly present if the status is `CANCELED`."
|
|
2233
|
+
).optional(),
|
|
2234
|
+
lastPaymentStatus: /* @__PURE__ */ z.enum([
|
|
2131
2235
|
"UNDEFINED",
|
|
2132
|
-
"
|
|
2133
|
-
"
|
|
2134
|
-
"
|
|
2135
|
-
"
|
|
2136
|
-
"
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
"
|
|
2236
|
+
"PAID",
|
|
2237
|
+
"REFUNDED",
|
|
2238
|
+
"FAILED",
|
|
2239
|
+
"UNPAID",
|
|
2240
|
+
"PENDING",
|
|
2241
|
+
"NOT_APPLICABLE"
|
|
2242
|
+
]).describe(
|
|
2243
|
+
"Status of the last payment for the order.\nUpdated automatically for online orders. Updated manually by the Wix user for offline orders."
|
|
2244
|
+
).optional(),
|
|
2245
|
+
startDate: /* @__PURE__ */ z.date().describe("Start date and time for the ordered plan.").optional().nullable(),
|
|
2246
|
+
endDate: /* @__PURE__ */ z.date().describe(
|
|
2247
|
+
"Current end date and time for the ordered plan.\n\n`endDate` may be updated over the course of an order.\nIf the order is paused, it will have a later `endDate` once it is resumed.\n`endDate` may also be postponed.\n\nOmitted if the order is valid until canceled and still `ACTIVE`."
|
|
2248
|
+
).optional().nullable(),
|
|
2249
|
+
pausePeriods: /* @__PURE__ */ z.array(
|
|
2250
|
+
/* @__PURE__ */ z.object({
|
|
2251
|
+
status: /* @__PURE__ */ z.enum(["UNDEFINED", "ACTIVE", "ENDED"]).describe("Status of the pause period.").optional(),
|
|
2252
|
+
pauseDate: /* @__PURE__ */ z.date().describe("Start date and time of the pause period.").optional().nullable(),
|
|
2253
|
+
resumeDate: /* @__PURE__ */ z.date().describe(
|
|
2254
|
+
"End date and time of the pause period.\n\nOmitted while the pause period remains `ACTIVE`."
|
|
2255
|
+
).optional().nullable()
|
|
2256
|
+
})
|
|
2257
|
+
).optional(),
|
|
2258
|
+
freeTrialDays: /* @__PURE__ */ z.number().int().describe(
|
|
2259
|
+
"Free trial period for the order, in days.\n\nOnly available for recurring plans."
|
|
2260
|
+
).min(1).max(999).optional().nullable(),
|
|
2261
|
+
earliestEndDate: /* @__PURE__ */ z.date().describe(
|
|
2262
|
+
"Earliest end date and time that the plan for the order can expire.\n\nCalculated by using the original end date plus any pause periods. Omitted if the order is active until canceled. Reserved for future use."
|
|
2263
|
+
).optional().nullable(),
|
|
2264
|
+
currentCycle: /* @__PURE__ */ z.object({
|
|
2265
|
+
index: /* @__PURE__ */ z.number().int().describe(
|
|
2266
|
+
"Index of the current payment cycle in the order.\n\n`0` when order is in a free trial period. In all other cases, the index starts with `1`."
|
|
2267
|
+
).min(0).optional(),
|
|
2268
|
+
startedDate: /* @__PURE__ */ z.date().describe("Start date and time for the current payment cycle.").optional().nullable(),
|
|
2269
|
+
endedDate: /* @__PURE__ */ z.date().describe("End date and time for the current payment cycle.").optional().nullable()
|
|
2270
|
+
}).describe(
|
|
2271
|
+
"Current payment cycle for the order.\n\n`currentCycle` will be omitted if the order's status is `CANCELED` or `ENDED`, or if the `startDate` hasn't passed yet."
|
|
2272
|
+
).optional(),
|
|
2273
|
+
planName: /* @__PURE__ */ z.string().describe("Plan name at the time of purchase.").optional(),
|
|
2274
|
+
planDescription: /* @__PURE__ */ z.string().describe("Plan description at the time of purchase").optional(),
|
|
2275
|
+
planPrice: /* @__PURE__ */ z.string().describe("Plan price as it was at the moment of order creation.").optional(),
|
|
2276
|
+
_createdDate: /* @__PURE__ */ z.date().describe("Date and time the order was created.").optional().nullable(),
|
|
2277
|
+
_updatedDate: /* @__PURE__ */ z.date().describe("Date and time the order was updated.").optional().nullable(),
|
|
2278
|
+
formData: /* @__PURE__ */ z.object({
|
|
2279
|
+
formId: /* @__PURE__ */ z.string().describe(
|
|
2280
|
+
"ID of the [order form](https://dev.wix.com/docs/rest/api-reference/wix-forms/form-submissions/introduction) associated with the plan at checkout."
|
|
2281
|
+
).regex(
|
|
2282
|
+
/^[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}$/,
|
|
2283
|
+
"Must be a valid GUID"
|
|
2284
|
+
).optional().nullable(),
|
|
2285
|
+
submissionId: /* @__PURE__ */ z.string().describe(
|
|
2286
|
+
"ID of a submission to the plan's order form at checkout. Every time a visitor completes the checkout process for a plan, a new submission is created."
|
|
2287
|
+
).regex(
|
|
2288
|
+
/^[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}$/,
|
|
2289
|
+
"Must be a valid GUID"
|
|
2290
|
+
).optional().nullable(),
|
|
2291
|
+
submissionData: /* @__PURE__ */ z.record(/* @__PURE__ */ z.string(), /* @__PURE__ */ z.any()).describe("Data submitted to the plan's order form at checkout.").optional()
|
|
2292
|
+
}).describe(
|
|
2293
|
+
"Information about the form submitted during the plan's checkout."
|
|
2140
2294
|
).optional()
|
|
2141
|
-
})
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
"
|
|
2148
|
-
"FAILED",
|
|
2149
|
-
"UNPAID",
|
|
2150
|
-
"PENDING",
|
|
2151
|
-
"NOT_APPLICABLE"
|
|
2152
|
-
]).describe(
|
|
2153
|
-
"Status of the last payment for the order.\nUpdated automatically for online orders. Updated manually by the Wix user for offline orders."
|
|
2154
|
-
).optional(),
|
|
2155
|
-
startDate: z.date().describe("Start date and time for the ordered plan.").optional().nullable(),
|
|
2156
|
-
endDate: z.date().describe(
|
|
2157
|
-
"Current end date and time for the ordered plan.\n\n`endDate` may be updated over the course of an order.\nIf the order is paused, it will have a later `endDate` once it is resumed.\n`endDate` may also be postponed.\n\nOmitted if the order is valid until canceled and still `ACTIVE`."
|
|
2295
|
+
})
|
|
2296
|
+
).optional(),
|
|
2297
|
+
pagingMetadata: /* @__PURE__ */ z.object({
|
|
2298
|
+
count: /* @__PURE__ */ z.number().int().describe("Number of items returned in the response.").optional().nullable(),
|
|
2299
|
+
offset: /* @__PURE__ */ z.number().int().describe("Offset that was requested.").optional().nullable(),
|
|
2300
|
+
total: /* @__PURE__ */ z.number().int().describe(
|
|
2301
|
+
"Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set."
|
|
2158
2302
|
).optional().nullable(),
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
status: z.enum(["UNDEFINED", "ACTIVE", "ENDED"]).describe("Status of the pause period.").optional(),
|
|
2162
|
-
pauseDate: z.date().describe("Start date and time of the pause period.").optional().nullable(),
|
|
2163
|
-
resumeDate: z.date().describe(
|
|
2164
|
-
"End date and time of the pause period.\n\nOmitted while the pause period remains `ACTIVE`."
|
|
2165
|
-
).optional().nullable()
|
|
2166
|
-
})
|
|
2167
|
-
).optional(),
|
|
2168
|
-
freeTrialDays: z.number().int().describe(
|
|
2169
|
-
"Free trial period for the order, in days.\n\nOnly available for recurring plans."
|
|
2170
|
-
).min(1).max(999).optional().nullable(),
|
|
2171
|
-
earliestEndDate: z.date().describe(
|
|
2172
|
-
"Earliest end date and time that the plan for the order can expire.\n\nCalculated by using the original end date plus any pause periods. Omitted if the order is active until canceled. Reserved for future use."
|
|
2303
|
+
tooManyToCount: /* @__PURE__ */ z.boolean().describe(
|
|
2304
|
+
"Flag that indicates the server failed to calculate the `total` field."
|
|
2173
2305
|
).optional().nullable(),
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
"
|
|
2177
|
-
).
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
"Current payment cycle for the order.\n\n`currentCycle` will be omitted if the order's status is `CANCELED` or `ENDED`, or if the `startDate` hasn't passed yet."
|
|
2182
|
-
).optional(),
|
|
2183
|
-
planName: z.string().describe("Plan name at the time of purchase.").optional(),
|
|
2184
|
-
planDescription: z.string().describe("Plan description at the time of purchase").optional(),
|
|
2185
|
-
planPrice: z.string().describe("Plan price as it was at the moment of order creation.").optional(),
|
|
2186
|
-
_createdDate: z.date().describe("Date and time the order was created.").optional().nullable(),
|
|
2187
|
-
_updatedDate: z.date().describe("Date and time the order was updated.").optional().nullable(),
|
|
2188
|
-
formData: z.object({
|
|
2189
|
-
formId: z.string().describe(
|
|
2190
|
-
"ID of the [order form](https://dev.wix.com/docs/rest/api-reference/wix-forms/form-submissions/introduction) associated with the plan at checkout."
|
|
2191
|
-
).regex(
|
|
2192
|
-
/^[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}$/,
|
|
2193
|
-
"Must be a valid GUID"
|
|
2194
|
-
).optional().nullable(),
|
|
2195
|
-
submissionId: z.string().describe(
|
|
2196
|
-
"ID of a submission to the plan's order form at checkout. Every time a visitor completes the checkout process for a plan, a new submission is created."
|
|
2197
|
-
).regex(
|
|
2198
|
-
/^[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}$/,
|
|
2199
|
-
"Must be a valid GUID"
|
|
2200
|
-
).optional().nullable(),
|
|
2201
|
-
submissionData: z.record(z.string(), z.any()).describe("Data submitted to the plan's order form at checkout.").optional()
|
|
2306
|
+
cursors: /* @__PURE__ */ z.object({
|
|
2307
|
+
next: /* @__PURE__ */ z.string().describe(
|
|
2308
|
+
"Cursor string pointing to the next page in the list of results."
|
|
2309
|
+
).max(16e3).optional().nullable(),
|
|
2310
|
+
prev: /* @__PURE__ */ z.string().describe(
|
|
2311
|
+
"Cursor pointing to the previous page in the list of results."
|
|
2312
|
+
).max(16e3).optional().nullable()
|
|
2202
2313
|
}).describe(
|
|
2203
|
-
"
|
|
2314
|
+
"Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used."
|
|
2204
2315
|
).optional()
|
|
2205
|
-
}).describe(
|
|
2206
|
-
|
|
2207
|
-
"Whether this previewed order would exceed the permitted amount of purchases available\nfor this plan for this buyer.\n\nAlways `false` for plans that do not have purchase limits."
|
|
2316
|
+
}).describe(
|
|
2317
|
+
"Object containing paging-related data (number of orders returned, offset)."
|
|
2208
2318
|
).optional()
|
|
2209
2319
|
});
|
|
2210
|
-
var
|
|
2211
|
-
|
|
2320
|
+
var PostponeEndDateRequest = /* @__PURE__ */ z.object({
|
|
2321
|
+
_id: /* @__PURE__ */ z.string().describe("Order ID.").regex(
|
|
2212
2322
|
/^[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}$/,
|
|
2213
2323
|
"Must be a valid GUID"
|
|
2214
2324
|
),
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
|
|
2325
|
+
endDate: /* @__PURE__ */ z.date().describe(
|
|
2326
|
+
"New end date and time.\n\nMust be later than the current end date and time."
|
|
2327
|
+
)
|
|
2218
2328
|
});
|
|
2219
|
-
var
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
).optional(),
|
|
2245
|
-
freeTrialDays: z.number().int().describe(
|
|
2246
|
-
"Free trial period for the order in days. Only available for recurring plans."
|
|
2247
|
-
).min(1).max(999).optional().nullable(),
|
|
2248
|
-
coupon: z.object({
|
|
2249
|
-
code: z.string().describe("Code of the applied coupon.").min(1).max(20).optional(),
|
|
2250
|
-
amount: z.string().describe("Total discount of the coupon, as a monetary amount.").optional(),
|
|
2251
|
-
_id: z.string().describe("Coupon ID.").regex(
|
|
2252
|
-
/^[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}$/,
|
|
2253
|
-
"Must be a valid GUID"
|
|
2254
|
-
).optional()
|
|
2255
|
-
}).describe(
|
|
2256
|
-
"Coupon applied to the order. Empty means no coupon was applied."
|
|
2257
|
-
).optional()
|
|
2258
|
-
}),
|
|
2259
|
-
z.xor([
|
|
2260
|
-
z.object({
|
|
2261
|
-
subscription: z.never().optional(),
|
|
2262
|
-
singlePaymentForDuration: z.never().optional(),
|
|
2263
|
-
singlePaymentUnlimited: z.never().optional()
|
|
2264
|
-
}),
|
|
2265
|
-
z.object({
|
|
2266
|
-
singlePaymentForDuration: z.never().optional(),
|
|
2267
|
-
singlePaymentUnlimited: z.never().optional(),
|
|
2268
|
-
subscription: z.object({
|
|
2269
|
-
cycleDuration: z.object({
|
|
2270
|
-
count: z.number().int().describe(
|
|
2271
|
-
"Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`."
|
|
2272
|
-
).min(1).optional().nullable(),
|
|
2273
|
-
unit: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
|
|
2274
|
-
}).describe(
|
|
2275
|
-
"Number of payment cycles the subscription is valid for.\n`0` for unlimited plans or for plans that are valid until canceled."
|
|
2276
|
-
).optional(),
|
|
2277
|
-
cycleCount: z.number().int().describe(
|
|
2278
|
-
"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."
|
|
2279
|
-
).min(0).max(2e3).optional().nullable()
|
|
2280
|
-
}).describe("Order has recurring payments.")
|
|
2281
|
-
}),
|
|
2282
|
-
z.object({
|
|
2283
|
-
subscription: z.never().optional(),
|
|
2284
|
-
singlePaymentUnlimited: z.never().optional(),
|
|
2285
|
-
singlePaymentForDuration: z.object({
|
|
2286
|
-
count: z.number().int().describe(
|
|
2287
|
-
"Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`."
|
|
2288
|
-
).min(1).optional().nullable(),
|
|
2289
|
-
unit: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
|
|
2290
|
-
}).describe(
|
|
2291
|
-
"One-time payment. Order is valid for a specified duration."
|
|
2292
|
-
)
|
|
2293
|
-
}),
|
|
2294
|
-
z.object({
|
|
2295
|
-
subscription: z.never().optional(),
|
|
2296
|
-
singlePaymentForDuration: z.never().optional(),
|
|
2297
|
-
singlePaymentUnlimited: z.boolean().describe("One-time payment. Order is valid until it is canceled.")
|
|
2298
|
-
})
|
|
2299
|
-
])
|
|
2300
|
-
).describe(
|
|
2301
|
-
"__Deprecated.__ Use `prices` instead. This property will be removed on September 30, 2022."
|
|
2302
|
-
).optional(),
|
|
2303
|
-
prices: z.array(
|
|
2304
|
-
z.object({
|
|
2305
|
-
duration: z.object({
|
|
2306
|
-
cycleFrom: z.number().int().describe(
|
|
2307
|
-
"Price starts to apply with this cycle.\n\n`1` is the first payment cycle for all pricing models."
|
|
2308
|
-
).optional(),
|
|
2309
|
-
numberOfCycles: z.number().int().describe(
|
|
2310
|
-
"Amount of cycles to apply price for.\n\nFor `subscription` pricing models with a finite number of cycles, the `numberOfCycles` is the same as `pricing.subscription.cycleCount`.\n\nFor `subscription` pricing models that are unlimited or until-canceled, the `numberOfCycles` is not returned.\n\nFor `singlePaymentForDuration` and `singlePaymentUnlimited` pricing models, the `numberOfCycles` is `1`."
|
|
2311
|
-
).optional().nullable()
|
|
2312
|
-
}).describe(
|
|
2313
|
-
"Cycle duration to apply `price` for.\n\nUse with all pricing models.\nCan apply the same price to multiple payment cycles."
|
|
2314
|
-
).optional(),
|
|
2315
|
-
price: z.object({
|
|
2316
|
-
subtotal: z.string().describe(
|
|
2317
|
-
'Price of the order excluding tax, specified as a monetary amount. For example, `"9.99"`.'
|
|
2318
|
-
).optional(),
|
|
2319
|
-
coupon: z.object({
|
|
2320
|
-
code: z.string().describe("Code of the applied coupon.").min(1).max(20).optional(),
|
|
2321
|
-
amount: z.string().describe(
|
|
2322
|
-
"Total discount of the coupon, as a monetary amount."
|
|
2323
|
-
).optional(),
|
|
2324
|
-
_id: z.string().describe("Coupon ID.").regex(
|
|
2325
|
-
/^[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}$/,
|
|
2326
|
-
"Must be a valid GUID"
|
|
2327
|
-
).optional()
|
|
2328
|
-
}).describe("Coupon applied to the order, from the Coupons API.").optional(),
|
|
2329
|
-
discount: z.string().describe("Total discount applied to the order.").optional(),
|
|
2330
|
-
tax: z.object({
|
|
2331
|
-
name: z.string().describe("Name of the tax. For example, VAT.").optional(),
|
|
2332
|
-
includedInPrice: z.boolean().describe(
|
|
2333
|
-
"Whether tax is included in the original price. When `false`, tax is added at checkout."
|
|
2334
|
-
).optional(),
|
|
2335
|
-
rate: z.string().describe(
|
|
2336
|
-
'Tax rate percentage, as a number between 0 and 100. For example, a 7% tax rate is `"7.00"`.'
|
|
2337
|
-
).optional(),
|
|
2338
|
-
amount: z.string().describe(
|
|
2339
|
-
'Total tax, specified as a monetary amount. For example, `"3.99"`.'
|
|
2340
|
-
).optional()
|
|
2341
|
-
}).describe(
|
|
2342
|
-
"Tax applied to the order.\n\nTax is only applied if the site [has it configured](https://support.wix.com/en/article/pricing-plans-setting-up-tax-collection)."
|
|
2343
|
-
).optional(),
|
|
2344
|
-
total: z.string().describe(
|
|
2345
|
-
'Price after tax and discount is applied. Specified as a monetary amount, for example, `"13.98"`.\n\nIf no tax is applied, the amount is the same as `subtotal`.'
|
|
2346
|
-
).optional(),
|
|
2347
|
-
currency: z.string().describe(
|
|
2348
|
-
"Three-letter currency code in\n[ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format."
|
|
2349
|
-
).optional(),
|
|
2350
|
-
proration: z.string().describe(
|
|
2351
|
-
"Price change after billing date was change and price was adjusted. Could be positive and negative values."
|
|
2352
|
-
).optional()
|
|
2353
|
-
}).describe("Order price.").optional()
|
|
2354
|
-
})
|
|
2355
|
-
).optional()
|
|
2329
|
+
var PostponeEndDateResponse = /* @__PURE__ */ z.object({});
|
|
2330
|
+
var CancelOrderRequest = /* @__PURE__ */ z.object({
|
|
2331
|
+
_id: /* @__PURE__ */ z.string().describe("Order ID.").regex(
|
|
2332
|
+
/^[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}$/,
|
|
2333
|
+
"Must be a valid GUID"
|
|
2334
|
+
),
|
|
2335
|
+
effectiveAt: /* @__PURE__ */ z.enum([
|
|
2336
|
+
"UNDEFINED",
|
|
2337
|
+
"IMMEDIATELY",
|
|
2338
|
+
"NEXT_PAYMENT_DATE"
|
|
2339
|
+
])
|
|
2340
|
+
});
|
|
2341
|
+
var CancelOrderResponse = /* @__PURE__ */ z.object({});
|
|
2342
|
+
var MarkAsPaidRequest = /* @__PURE__ */ z.object({
|
|
2343
|
+
_id: /* @__PURE__ */ z.string().describe("Order ID.").regex(
|
|
2344
|
+
/^[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}$/,
|
|
2345
|
+
"Must be a valid GUID"
|
|
2346
|
+
)
|
|
2347
|
+
});
|
|
2348
|
+
var MarkAsPaidResponse = /* @__PURE__ */ z.object({});
|
|
2349
|
+
var PauseOrderRequest = /* @__PURE__ */ z.object({
|
|
2350
|
+
_id: /* @__PURE__ */ z.string().describe("Order ID.").regex(
|
|
2351
|
+
/^[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}$/,
|
|
2352
|
+
"Must be a valid GUID"
|
|
2353
|
+
)
|
|
2356
2354
|
});
|
|
2355
|
+
var PauseOrderResponse = /* @__PURE__ */ z.object({});
|
|
2356
|
+
var ResumeOrderRequest = /* @__PURE__ */ z.object({
|
|
2357
|
+
_id: /* @__PURE__ */ z.string().describe("Order ID.").regex(
|
|
2358
|
+
/^[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}$/,
|
|
2359
|
+
"Must be a valid GUID"
|
|
2360
|
+
)
|
|
2361
|
+
});
|
|
2362
|
+
var ResumeOrderResponse = /* @__PURE__ */ z.object({});
|
|
2357
2363
|
var MemberGetOrderRequest = /* @__PURE__ */ z.object({
|
|
2358
|
-
_id: z.string().describe("Order ID.").regex(
|
|
2364
|
+
_id: /* @__PURE__ */ z.string().describe("Order ID.").regex(
|
|
2359
2365
|
/^[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}$/,
|
|
2360
2366
|
"Must be a valid GUID"
|
|
2361
2367
|
),
|
|
2362
|
-
options: z.object({
|
|
2368
|
+
options: /* @__PURE__ */ z.object({
|
|
2369
|
+
fieldSet: /* @__PURE__ */ z.enum(["UNKNOWN_SET", "BASIC", "FULL"]).optional()
|
|
2370
|
+
}).describe("Options for getting a logged-in member's order. ").optional()
|
|
2363
2371
|
});
|
|
2364
2372
|
var MemberGetOrderResponse = /* @__PURE__ */ z.object({
|
|
2365
|
-
_id: z.string().describe("Order ID.").regex(
|
|
2373
|
+
_id: /* @__PURE__ */ z.string().describe("Order ID.").regex(
|
|
2366
2374
|
/^[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}$/,
|
|
2367
2375
|
"Must be a valid GUID"
|
|
2368
2376
|
).optional(),
|
|
2369
|
-
planId: z.string().describe("ID of the plan purchased with the order, from the Plans API.").regex(
|
|
2377
|
+
planId: /* @__PURE__ */ z.string().describe("ID of the plan purchased with the order, from the Plans API.").regex(
|
|
2370
2378
|
/^[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}$/,
|
|
2371
2379
|
"Must be a valid GUID"
|
|
2372
2380
|
).optional(),
|
|
2373
|
-
subscriptionId: z.string().describe(
|
|
2381
|
+
subscriptionId: /* @__PURE__ */ z.string().describe(
|
|
2374
2382
|
"ID of the related Wix subscription.\n\nEvery pricing plan order corresponds to a Wix subscription, including orders for single payment plans. Learn more in\na [Pricing Plans overview](https://support.wix.com/en/article/pricing-plans-an-overview#create-plans-to-suit-your-business)."
|
|
2375
2383
|
).regex(
|
|
2376
2384
|
/^[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}$/,
|
|
2377
2385
|
"Must be a valid GUID"
|
|
2378
2386
|
).optional(),
|
|
2379
|
-
wixPayOrderId: z.string().describe(
|
|
2387
|
+
wixPayOrderId: /* @__PURE__ */ z.string().describe(
|
|
2380
2388
|
"Wix Pay order ID.\n\nProvided by Wix whether the order is created online or offline. The field is omitted when the order is free."
|
|
2381
2389
|
).regex(
|
|
2382
2390
|
/^[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}$/,
|
|
2383
2391
|
"Must be a valid GUID"
|
|
2384
2392
|
).optional().nullable(),
|
|
2385
|
-
buyer: z.object({
|
|
2386
|
-
memberId: z.string().describe("Member ID for a Wix site member, from the Members API.").regex(
|
|
2393
|
+
buyer: /* @__PURE__ */ z.object({
|
|
2394
|
+
memberId: /* @__PURE__ */ z.string().describe("Member ID for a Wix site member, from the Members API.").regex(
|
|
2387
2395
|
/^[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}$/,
|
|
2388
2396
|
"Must be a valid GUID"
|
|
2389
2397
|
).optional(),
|
|
2390
|
-
contactId: z.string().describe("Contact ID for a Wix site contact, from the Contacts API.").regex(
|
|
2398
|
+
contactId: /* @__PURE__ */ z.string().describe("Contact ID for a Wix site contact, from the Contacts API.").regex(
|
|
2391
2399
|
/^[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}$/,
|
|
2392
2400
|
"Must be a valid GUID"
|
|
2393
2401
|
).optional()
|
|
2394
2402
|
}).describe(
|
|
2395
2403
|
"The buyer's IDs. Includes `memberId` and `contactId`.\n\nCurrently, Pricing Plan purchases are limited to members only. `contactId` is returned,\nbut a buyer will not be able to purchase a plan without a `memberId`."
|
|
2396
2404
|
).optional(),
|
|
2397
|
-
priceDetails: z.intersection(
|
|
2398
|
-
z.object({
|
|
2399
|
-
subtotal: z.string().describe(
|
|
2405
|
+
priceDetails: /* @__PURE__ */ z.intersection(
|
|
2406
|
+
/* @__PURE__ */ z.object({
|
|
2407
|
+
subtotal: /* @__PURE__ */ z.string().describe(
|
|
2400
2408
|
'Price of the order excluding tax, specified as a monetary amount. for example, `"9.99"`.'
|
|
2401
2409
|
).optional(),
|
|
2402
|
-
discount: z.string().describe("Total discount applied.").optional(),
|
|
2403
|
-
tax: z.object({
|
|
2404
|
-
name: z.string().describe("Name of the tax. For example, VAT.").optional(),
|
|
2405
|
-
includedInPrice: z.boolean().describe(
|
|
2410
|
+
discount: /* @__PURE__ */ z.string().describe("Total discount applied.").optional(),
|
|
2411
|
+
tax: /* @__PURE__ */ z.object({
|
|
2412
|
+
name: /* @__PURE__ */ z.string().describe("Name of the tax. For example, VAT.").optional(),
|
|
2413
|
+
includedInPrice: /* @__PURE__ */ z.boolean().describe(
|
|
2406
2414
|
"Whether tax is included in the original price. When `false`, tax is added at checkout."
|
|
2407
2415
|
).optional(),
|
|
2408
|
-
rate: z.string().describe(
|
|
2416
|
+
rate: /* @__PURE__ */ z.string().describe(
|
|
2409
2417
|
'Tax rate percentage, as a number between 0 and 100. For example, a 7% tax rate is `"7.00"`.'
|
|
2410
2418
|
).optional(),
|
|
2411
|
-
amount: z.string().describe(
|
|
2419
|
+
amount: /* @__PURE__ */ z.string().describe(
|
|
2412
2420
|
'Total tax, specified as a monetary amount. For example, `"3.99"`.'
|
|
2413
2421
|
).optional()
|
|
2414
2422
|
}).describe("Tax applied.").optional(),
|
|
2415
|
-
total: z.string().describe(
|
|
2423
|
+
total: /* @__PURE__ */ z.string().describe(
|
|
2416
2424
|
'Price after tax and discount is applied, specified as a monetary amount. For example, `"13.98"`.\n\nIf no tax is applied, the amount is the same as `subtotal`.'
|
|
2417
2425
|
).optional(),
|
|
2418
|
-
planPrice: z.string().describe("Plan price as it was at the moment of order creation.").optional(),
|
|
2419
|
-
currency: z.string().describe(
|
|
2426
|
+
planPrice: /* @__PURE__ */ z.string().describe("Plan price as it was at the moment of order creation.").optional(),
|
|
2427
|
+
currency: /* @__PURE__ */ z.string().describe(
|
|
2420
2428
|
"Currency code. Must be valid ISO 4217 currency code (e.g., USD)."
|
|
2421
2429
|
).optional(),
|
|
2422
|
-
freeTrialDays: z.number().int().describe(
|
|
2430
|
+
freeTrialDays: /* @__PURE__ */ z.number().int().describe(
|
|
2423
2431
|
"Free trial period for the order in days. Only available for recurring plans."
|
|
2424
2432
|
).min(1).max(999).optional().nullable(),
|
|
2425
|
-
coupon: z.object({
|
|
2426
|
-
code: z.string().describe("Code of the applied coupon.").min(1).max(20).optional(),
|
|
2427
|
-
amount: z.string().describe("Total discount of the coupon, as a monetary amount.").optional(),
|
|
2428
|
-
_id: z.string().describe("Coupon ID.").regex(
|
|
2433
|
+
coupon: /* @__PURE__ */ z.object({
|
|
2434
|
+
code: /* @__PURE__ */ z.string().describe("Code of the applied coupon.").min(1).max(20).optional(),
|
|
2435
|
+
amount: /* @__PURE__ */ z.string().describe("Total discount of the coupon, as a monetary amount.").optional(),
|
|
2436
|
+
_id: /* @__PURE__ */ z.string().describe("Coupon ID.").regex(
|
|
2429
2437
|
/^[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}$/,
|
|
2430
2438
|
"Must be a valid GUID"
|
|
2431
2439
|
).optional()
|
|
@@ -2433,149 +2441,149 @@ var MemberGetOrderResponse = /* @__PURE__ */ z.object({
|
|
|
2433
2441
|
"Coupon applied to the order. Empty means no coupon was applied."
|
|
2434
2442
|
).optional()
|
|
2435
2443
|
}),
|
|
2436
|
-
z.xor([
|
|
2437
|
-
z.object({
|
|
2438
|
-
subscription: z.never().optional(),
|
|
2439
|
-
singlePaymentForDuration: z.never().optional(),
|
|
2440
|
-
singlePaymentUnlimited: z.never().optional()
|
|
2444
|
+
/* @__PURE__ */ z.xor([
|
|
2445
|
+
/* @__PURE__ */ z.object({
|
|
2446
|
+
subscription: /* @__PURE__ */ z.never().optional(),
|
|
2447
|
+
singlePaymentForDuration: /* @__PURE__ */ z.never().optional(),
|
|
2448
|
+
singlePaymentUnlimited: /* @__PURE__ */ z.never().optional()
|
|
2441
2449
|
}),
|
|
2442
|
-
z.object({
|
|
2443
|
-
singlePaymentForDuration: z.never().optional(),
|
|
2444
|
-
singlePaymentUnlimited: z.never().optional(),
|
|
2445
|
-
subscription: z.object({
|
|
2446
|
-
cycleDuration: z.object({
|
|
2447
|
-
count: z.number().int().describe(
|
|
2450
|
+
/* @__PURE__ */ z.object({
|
|
2451
|
+
singlePaymentForDuration: /* @__PURE__ */ z.never().optional(),
|
|
2452
|
+
singlePaymentUnlimited: /* @__PURE__ */ z.never().optional(),
|
|
2453
|
+
subscription: /* @__PURE__ */ z.object({
|
|
2454
|
+
cycleDuration: /* @__PURE__ */ z.object({
|
|
2455
|
+
count: /* @__PURE__ */ z.number().int().describe(
|
|
2448
2456
|
"Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`."
|
|
2449
2457
|
).min(1).optional().nullable(),
|
|
2450
|
-
unit: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
|
|
2458
|
+
unit: /* @__PURE__ */ z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
|
|
2451
2459
|
}).describe(
|
|
2452
2460
|
"Number of payment cycles the subscription is valid for.\n`0` for unlimited plans or for plans that are valid until canceled."
|
|
2453
2461
|
).optional(),
|
|
2454
|
-
cycleCount: z.number().int().describe(
|
|
2462
|
+
cycleCount: /* @__PURE__ */ z.number().int().describe(
|
|
2455
2463
|
"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."
|
|
2456
2464
|
).min(0).max(2e3).optional().nullable()
|
|
2457
2465
|
}).describe("Order has recurring payments.")
|
|
2458
2466
|
}),
|
|
2459
|
-
z.object({
|
|
2460
|
-
subscription: z.never().optional(),
|
|
2461
|
-
singlePaymentUnlimited: z.never().optional(),
|
|
2462
|
-
singlePaymentForDuration: z.object({
|
|
2463
|
-
count: z.number().int().describe(
|
|
2467
|
+
/* @__PURE__ */ z.object({
|
|
2468
|
+
subscription: /* @__PURE__ */ z.never().optional(),
|
|
2469
|
+
singlePaymentUnlimited: /* @__PURE__ */ z.never().optional(),
|
|
2470
|
+
singlePaymentForDuration: /* @__PURE__ */ z.object({
|
|
2471
|
+
count: /* @__PURE__ */ z.number().int().describe(
|
|
2464
2472
|
"Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`."
|
|
2465
2473
|
).min(1).optional().nullable(),
|
|
2466
|
-
unit: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
|
|
2474
|
+
unit: /* @__PURE__ */ z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
|
|
2467
2475
|
}).describe(
|
|
2468
2476
|
"One-time payment. Order is valid for a specified duration."
|
|
2469
2477
|
)
|
|
2470
2478
|
}),
|
|
2471
|
-
z.object({
|
|
2472
|
-
subscription: z.never().optional(),
|
|
2473
|
-
singlePaymentForDuration: z.never().optional(),
|
|
2474
|
-
singlePaymentUnlimited: z.boolean().describe("One-time payment. Order is valid until it is canceled.")
|
|
2479
|
+
/* @__PURE__ */ z.object({
|
|
2480
|
+
subscription: /* @__PURE__ */ z.never().optional(),
|
|
2481
|
+
singlePaymentForDuration: /* @__PURE__ */ z.never().optional(),
|
|
2482
|
+
singlePaymentUnlimited: /* @__PURE__ */ z.boolean().describe("One-time payment. Order is valid until it is canceled.")
|
|
2475
2483
|
})
|
|
2476
2484
|
])
|
|
2477
2485
|
).describe(
|
|
2478
2486
|
"__Deprecated.__ Use `pricing` instead. This property will be removed on September 30, 2022."
|
|
2479
2487
|
).optional(),
|
|
2480
|
-
pricing: z.intersection(
|
|
2481
|
-
z.object({
|
|
2482
|
-
prices: z.array(
|
|
2483
|
-
z.object({
|
|
2484
|
-
duration: z.object({
|
|
2485
|
-
cycleFrom: z.number().int().describe(
|
|
2488
|
+
pricing: /* @__PURE__ */ z.intersection(
|
|
2489
|
+
/* @__PURE__ */ z.object({
|
|
2490
|
+
prices: /* @__PURE__ */ z.array(
|
|
2491
|
+
/* @__PURE__ */ z.object({
|
|
2492
|
+
duration: /* @__PURE__ */ z.object({
|
|
2493
|
+
cycleFrom: /* @__PURE__ */ z.number().int().describe(
|
|
2486
2494
|
"Price starts to apply with this cycle.\n\n`1` is the first payment cycle for all pricing models."
|
|
2487
2495
|
).optional(),
|
|
2488
|
-
numberOfCycles: z.number().int().describe(
|
|
2496
|
+
numberOfCycles: /* @__PURE__ */ z.number().int().describe(
|
|
2489
2497
|
"Amount of cycles to apply price for.\n\nFor `subscription` pricing models with a finite number of cycles, the `numberOfCycles` is the same as `pricing.subscription.cycleCount`.\n\nFor `subscription` pricing models that are unlimited or until-canceled, the `numberOfCycles` is not returned.\n\nFor `singlePaymentForDuration` and `singlePaymentUnlimited` pricing models, the `numberOfCycles` is `1`."
|
|
2490
2498
|
).optional().nullable()
|
|
2491
2499
|
}).describe(
|
|
2492
2500
|
"Cycle duration to apply `price` for.\n\nUse with all pricing models.\nCan apply the same price to multiple payment cycles."
|
|
2493
2501
|
).optional(),
|
|
2494
|
-
price: z.object({
|
|
2495
|
-
subtotal: z.string().describe(
|
|
2502
|
+
price: /* @__PURE__ */ z.object({
|
|
2503
|
+
subtotal: /* @__PURE__ */ z.string().describe(
|
|
2496
2504
|
'Price of the order excluding tax, specified as a monetary amount. For example, `"9.99"`.'
|
|
2497
2505
|
).optional(),
|
|
2498
|
-
coupon: z.object({
|
|
2499
|
-
code: z.string().describe("Code of the applied coupon.").min(1).max(20).optional(),
|
|
2500
|
-
amount: z.string().describe(
|
|
2506
|
+
coupon: /* @__PURE__ */ z.object({
|
|
2507
|
+
code: /* @__PURE__ */ z.string().describe("Code of the applied coupon.").min(1).max(20).optional(),
|
|
2508
|
+
amount: /* @__PURE__ */ z.string().describe(
|
|
2501
2509
|
"Total discount of the coupon, as a monetary amount."
|
|
2502
2510
|
).optional(),
|
|
2503
|
-
_id: z.string().describe("Coupon ID.").regex(
|
|
2511
|
+
_id: /* @__PURE__ */ z.string().describe("Coupon ID.").regex(
|
|
2504
2512
|
/^[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}$/,
|
|
2505
2513
|
"Must be a valid GUID"
|
|
2506
2514
|
).optional()
|
|
2507
2515
|
}).describe(
|
|
2508
2516
|
"Coupon applied to the order, from the Coupons API."
|
|
2509
2517
|
).optional(),
|
|
2510
|
-
discount: z.string().describe("Total discount applied to the order.").optional(),
|
|
2511
|
-
tax: z.object({
|
|
2512
|
-
name: z.string().describe("Name of the tax. For example, VAT.").optional(),
|
|
2513
|
-
includedInPrice: z.boolean().describe(
|
|
2518
|
+
discount: /* @__PURE__ */ z.string().describe("Total discount applied to the order.").optional(),
|
|
2519
|
+
tax: /* @__PURE__ */ z.object({
|
|
2520
|
+
name: /* @__PURE__ */ z.string().describe("Name of the tax. For example, VAT.").optional(),
|
|
2521
|
+
includedInPrice: /* @__PURE__ */ z.boolean().describe(
|
|
2514
2522
|
"Whether tax is included in the original price. When `false`, tax is added at checkout."
|
|
2515
2523
|
).optional(),
|
|
2516
|
-
rate: z.string().describe(
|
|
2524
|
+
rate: /* @__PURE__ */ z.string().describe(
|
|
2517
2525
|
'Tax rate percentage, as a number between 0 and 100. For example, a 7% tax rate is `"7.00"`.'
|
|
2518
2526
|
).optional(),
|
|
2519
|
-
amount: z.string().describe(
|
|
2527
|
+
amount: /* @__PURE__ */ z.string().describe(
|
|
2520
2528
|
'Total tax, specified as a monetary amount. For example, `"3.99"`.'
|
|
2521
2529
|
).optional()
|
|
2522
2530
|
}).describe(
|
|
2523
2531
|
"Tax applied to the order.\n\nTax is only applied if the site [has it configured](https://support.wix.com/en/article/pricing-plans-setting-up-tax-collection)."
|
|
2524
2532
|
).optional(),
|
|
2525
|
-
total: z.string().describe(
|
|
2533
|
+
total: /* @__PURE__ */ z.string().describe(
|
|
2526
2534
|
'Price after tax and discount is applied. Specified as a monetary amount, for example, `"13.98"`.\n\nIf no tax is applied, the amount is the same as `subtotal`.'
|
|
2527
2535
|
).optional(),
|
|
2528
|
-
currency: z.string().describe(
|
|
2536
|
+
currency: /* @__PURE__ */ z.string().describe(
|
|
2529
2537
|
"Three-letter currency code in\n[ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format."
|
|
2530
2538
|
).optional(),
|
|
2531
|
-
proration: z.string().describe(
|
|
2539
|
+
proration: /* @__PURE__ */ z.string().describe(
|
|
2532
2540
|
"Price change after billing date was change and price was adjusted. Could be positive and negative values."
|
|
2533
2541
|
).optional()
|
|
2534
2542
|
}).describe("Order price.").optional()
|
|
2535
2543
|
})
|
|
2536
2544
|
).optional()
|
|
2537
2545
|
}),
|
|
2538
|
-
z.xor([
|
|
2539
|
-
z.object({
|
|
2540
|
-
subscription: z.never().optional(),
|
|
2541
|
-
singlePaymentForDuration: z.never().optional(),
|
|
2542
|
-
singlePaymentUnlimited: z.never().optional()
|
|
2546
|
+
/* @__PURE__ */ z.xor([
|
|
2547
|
+
/* @__PURE__ */ z.object({
|
|
2548
|
+
subscription: /* @__PURE__ */ z.never().optional(),
|
|
2549
|
+
singlePaymentForDuration: /* @__PURE__ */ z.never().optional(),
|
|
2550
|
+
singlePaymentUnlimited: /* @__PURE__ */ z.never().optional()
|
|
2543
2551
|
}),
|
|
2544
|
-
z.object({
|
|
2545
|
-
singlePaymentForDuration: z.never().optional(),
|
|
2546
|
-
singlePaymentUnlimited: z.never().optional(),
|
|
2547
|
-
subscription: z.object({
|
|
2548
|
-
cycleDuration: z.object({
|
|
2549
|
-
count: z.number().int().describe(
|
|
2552
|
+
/* @__PURE__ */ z.object({
|
|
2553
|
+
singlePaymentForDuration: /* @__PURE__ */ z.never().optional(),
|
|
2554
|
+
singlePaymentUnlimited: /* @__PURE__ */ z.never().optional(),
|
|
2555
|
+
subscription: /* @__PURE__ */ z.object({
|
|
2556
|
+
cycleDuration: /* @__PURE__ */ z.object({
|
|
2557
|
+
count: /* @__PURE__ */ z.number().int().describe(
|
|
2550
2558
|
"Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`."
|
|
2551
2559
|
).min(1).optional().nullable(),
|
|
2552
|
-
unit: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
|
|
2560
|
+
unit: /* @__PURE__ */ z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
|
|
2553
2561
|
}).describe(
|
|
2554
2562
|
"Number of payment cycles the subscription is valid for.\n`0` for unlimited plans or for plans that are valid until canceled."
|
|
2555
2563
|
).optional(),
|
|
2556
|
-
cycleCount: z.number().int().describe(
|
|
2564
|
+
cycleCount: /* @__PURE__ */ z.number().int().describe(
|
|
2557
2565
|
"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."
|
|
2558
2566
|
).min(0).max(2e3).optional().nullable()
|
|
2559
2567
|
}).describe(
|
|
2560
2568
|
"Pricing model for an order with recurring payment cycles."
|
|
2561
2569
|
)
|
|
2562
2570
|
}),
|
|
2563
|
-
z.object({
|
|
2564
|
-
subscription: z.never().optional(),
|
|
2565
|
-
singlePaymentUnlimited: z.never().optional(),
|
|
2566
|
-
singlePaymentForDuration: z.object({
|
|
2567
|
-
count: z.number().int().describe(
|
|
2571
|
+
/* @__PURE__ */ z.object({
|
|
2572
|
+
subscription: /* @__PURE__ */ z.never().optional(),
|
|
2573
|
+
singlePaymentUnlimited: /* @__PURE__ */ z.never().optional(),
|
|
2574
|
+
singlePaymentForDuration: /* @__PURE__ */ z.object({
|
|
2575
|
+
count: /* @__PURE__ */ z.number().int().describe(
|
|
2568
2576
|
"Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`."
|
|
2569
2577
|
).min(1).optional().nullable(),
|
|
2570
|
-
unit: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
|
|
2578
|
+
unit: /* @__PURE__ */ z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
|
|
2571
2579
|
}).describe(
|
|
2572
2580
|
"Pricing model for an order with a one-time payment and the order is valid for a specific amount of time."
|
|
2573
2581
|
)
|
|
2574
2582
|
}),
|
|
2575
|
-
z.object({
|
|
2576
|
-
subscription: z.never().optional(),
|
|
2577
|
-
singlePaymentForDuration: z.never().optional(),
|
|
2578
|
-
singlePaymentUnlimited: z.boolean().describe(
|
|
2583
|
+
/* @__PURE__ */ z.object({
|
|
2584
|
+
subscription: /* @__PURE__ */ z.never().optional(),
|
|
2585
|
+
singlePaymentForDuration: /* @__PURE__ */ z.never().optional(),
|
|
2586
|
+
singlePaymentUnlimited: /* @__PURE__ */ z.boolean().describe(
|
|
2579
2587
|
"Pricing model for an order with a one-time payment and the order is valid until canceled."
|
|
2580
2588
|
)
|
|
2581
2589
|
})
|
|
@@ -2583,8 +2591,8 @@ var MemberGetOrderResponse = /* @__PURE__ */ z.object({
|
|
|
2583
2591
|
).describe(
|
|
2584
2592
|
"Order pricing model, price, and payment schedule.\n\nLearn more about [pricing models](https://dev.wix.com/api/rest/wix-pricing-plans/pricing-plans/introduction#wix-pricing-plans_pricing-plans_introduction_pricing-models)."
|
|
2585
2593
|
).optional(),
|
|
2586
|
-
type: z.enum(["UNDEFINED", "ONLINE", "OFFLINE", "EXTERNAL"]).describe("How the order was processed.").optional(),
|
|
2587
|
-
status: z.enum([
|
|
2594
|
+
type: /* @__PURE__ */ z.enum(["UNDEFINED", "ONLINE", "OFFLINE", "EXTERNAL"]).describe("How the order was processed.").optional(),
|
|
2595
|
+
status: /* @__PURE__ */ z.enum([
|
|
2588
2596
|
"UNDEFINED",
|
|
2589
2597
|
"DRAFT",
|
|
2590
2598
|
"PENDING",
|
|
@@ -2593,12 +2601,12 @@ var MemberGetOrderResponse = /* @__PURE__ */ z.object({
|
|
|
2593
2601
|
"ENDED",
|
|
2594
2602
|
"CANCELED"
|
|
2595
2603
|
]).describe("Status of the order.").optional(),
|
|
2596
|
-
autoRenewCanceled: z.boolean().describe(
|
|
2604
|
+
autoRenewCanceled: /* @__PURE__ */ z.boolean().describe(
|
|
2597
2605
|
"Whether the order will be canceled at the next payment date.\n\nIf `true`, the order status will be `CANCELED` and the next payment won't be charged. Omitted for single payment orders."
|
|
2598
2606
|
).optional().nullable(),
|
|
2599
|
-
cancellation: z.object({
|
|
2600
|
-
requestedDate: z.date().describe("Date and time the cancellation was requested.").optional().nullable(),
|
|
2601
|
-
cause: z.enum([
|
|
2607
|
+
cancellation: /* @__PURE__ */ z.object({
|
|
2608
|
+
requestedDate: /* @__PURE__ */ z.date().describe("Date and time the cancellation was requested.").optional().nullable(),
|
|
2609
|
+
cause: /* @__PURE__ */ z.enum([
|
|
2602
2610
|
"UNDEFINED",
|
|
2603
2611
|
"OWNER_ACTION",
|
|
2604
2612
|
"MEMBER_ACTION",
|
|
@@ -2606,13 +2614,13 @@ var MemberGetOrderResponse = /* @__PURE__ */ z.object({
|
|
|
2606
2614
|
"PAYMENT_SETUP_FAILURE",
|
|
2607
2615
|
"UNKNOWN"
|
|
2608
2616
|
]).describe("Reason for the cancellation.").optional(),
|
|
2609
|
-
effectiveAt: z.enum(["UNDEFINED", "IMMEDIATELY", "NEXT_PAYMENT_DATE"]).describe(
|
|
2617
|
+
effectiveAt: /* @__PURE__ */ z.enum(["UNDEFINED", "IMMEDIATELY", "NEXT_PAYMENT_DATE"]).describe(
|
|
2610
2618
|
"When the cancellation takes effect. Set when cancelling the order."
|
|
2611
2619
|
).optional()
|
|
2612
2620
|
}).describe(
|
|
2613
2621
|
"Details about the cancellation of an order.\n\nOnly present if the status is `CANCELED`."
|
|
2614
2622
|
).optional(),
|
|
2615
|
-
lastPaymentStatus: z.enum([
|
|
2623
|
+
lastPaymentStatus: /* @__PURE__ */ z.enum([
|
|
2616
2624
|
"UNDEFINED",
|
|
2617
2625
|
"PAID",
|
|
2618
2626
|
"REFUNDED",
|
|
@@ -2623,63 +2631,63 @@ var MemberGetOrderResponse = /* @__PURE__ */ z.object({
|
|
|
2623
2631
|
]).describe(
|
|
2624
2632
|
"Status of the last payment for the order.\nUpdated automatically for online orders. Updated manually by the Wix user for offline orders."
|
|
2625
2633
|
).optional(),
|
|
2626
|
-
startDate: z.date().describe("Start date and time for the ordered plan.").optional().nullable(),
|
|
2627
|
-
endDate: z.date().describe(
|
|
2634
|
+
startDate: /* @__PURE__ */ z.date().describe("Start date and time for the ordered plan.").optional().nullable(),
|
|
2635
|
+
endDate: /* @__PURE__ */ z.date().describe(
|
|
2628
2636
|
"Current end date and time for the ordered plan.\n\n`endDate` may be updated over the course of an order.\nIf the order is paused, it will have a later `endDate` once it is resumed.\n`endDate` may also be postponed.\n\nOmitted if the order is valid until canceled and still `ACTIVE`."
|
|
2629
2637
|
).optional().nullable(),
|
|
2630
|
-
pausePeriods: z.array(
|
|
2631
|
-
z.object({
|
|
2632
|
-
status: z.enum(["UNDEFINED", "ACTIVE", "ENDED"]).describe("Status of the pause period.").optional(),
|
|
2633
|
-
pauseDate: z.date().describe("Start date and time of the pause period.").optional().nullable(),
|
|
2634
|
-
resumeDate: z.date().describe(
|
|
2638
|
+
pausePeriods: /* @__PURE__ */ z.array(
|
|
2639
|
+
/* @__PURE__ */ z.object({
|
|
2640
|
+
status: /* @__PURE__ */ z.enum(["UNDEFINED", "ACTIVE", "ENDED"]).describe("Status of the pause period.").optional(),
|
|
2641
|
+
pauseDate: /* @__PURE__ */ z.date().describe("Start date and time of the pause period.").optional().nullable(),
|
|
2642
|
+
resumeDate: /* @__PURE__ */ z.date().describe(
|
|
2635
2643
|
"End date and time of the pause period.\n\nOmitted while the pause period remains `ACTIVE`."
|
|
2636
2644
|
).optional().nullable()
|
|
2637
2645
|
})
|
|
2638
2646
|
).optional(),
|
|
2639
|
-
freeTrialDays: z.number().int().describe(
|
|
2647
|
+
freeTrialDays: /* @__PURE__ */ z.number().int().describe(
|
|
2640
2648
|
"Free trial period for the order, in days.\n\nOnly available for recurring plans."
|
|
2641
2649
|
).min(1).max(999).optional().nullable(),
|
|
2642
|
-
earliestEndDate: z.date().describe(
|
|
2650
|
+
earliestEndDate: /* @__PURE__ */ z.date().describe(
|
|
2643
2651
|
"Earliest end date and time that the plan for the order can expire.\n\nCalculated by using the original end date plus any pause periods. Omitted if the order is active until canceled. Reserved for future use."
|
|
2644
2652
|
).optional().nullable(),
|
|
2645
|
-
currentCycle: z.object({
|
|
2646
|
-
index: z.number().int().describe(
|
|
2653
|
+
currentCycle: /* @__PURE__ */ z.object({
|
|
2654
|
+
index: /* @__PURE__ */ z.number().int().describe(
|
|
2647
2655
|
"Index of the current payment cycle in the order.\n\n`0` when order is in a free trial period. In all other cases, the index starts with `1`."
|
|
2648
2656
|
).min(0).optional(),
|
|
2649
|
-
startedDate: z.date().describe("Start date and time for the current payment cycle.").optional().nullable(),
|
|
2650
|
-
endedDate: z.date().describe("End date and time for the current payment cycle.").optional().nullable()
|
|
2657
|
+
startedDate: /* @__PURE__ */ z.date().describe("Start date and time for the current payment cycle.").optional().nullable(),
|
|
2658
|
+
endedDate: /* @__PURE__ */ z.date().describe("End date and time for the current payment cycle.").optional().nullable()
|
|
2651
2659
|
}).describe(
|
|
2652
2660
|
"Current payment cycle for the order.\n\n`currentCycle` will be omitted if the order's status is `CANCELED` or `ENDED`, or if the `startDate` hasn't passed yet."
|
|
2653
2661
|
).optional(),
|
|
2654
|
-
planName: z.string().describe("Plan name at the time of purchase.").optional(),
|
|
2655
|
-
planDescription: z.string().describe("Plan description at the time of purchase").optional(),
|
|
2656
|
-
planPrice: z.string().describe("Plan price as it was at the moment of order creation.").optional(),
|
|
2657
|
-
_createdDate: z.date().describe("Date and time the order was created.").optional().nullable(),
|
|
2658
|
-
_updatedDate: z.date().describe("Date and time the order was updated.").optional().nullable(),
|
|
2659
|
-
formData: z.object({
|
|
2660
|
-
formId: z.string().describe(
|
|
2662
|
+
planName: /* @__PURE__ */ z.string().describe("Plan name at the time of purchase.").optional(),
|
|
2663
|
+
planDescription: /* @__PURE__ */ z.string().describe("Plan description at the time of purchase").optional(),
|
|
2664
|
+
planPrice: /* @__PURE__ */ z.string().describe("Plan price as it was at the moment of order creation.").optional(),
|
|
2665
|
+
_createdDate: /* @__PURE__ */ z.date().describe("Date and time the order was created.").optional().nullable(),
|
|
2666
|
+
_updatedDate: /* @__PURE__ */ z.date().describe("Date and time the order was updated.").optional().nullable(),
|
|
2667
|
+
formData: /* @__PURE__ */ z.object({
|
|
2668
|
+
formId: /* @__PURE__ */ z.string().describe(
|
|
2661
2669
|
"ID of the [order form](https://dev.wix.com/docs/rest/api-reference/wix-forms/form-submissions/introduction) associated with the plan at checkout."
|
|
2662
2670
|
).regex(
|
|
2663
2671
|
/^[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}$/,
|
|
2664
2672
|
"Must be a valid GUID"
|
|
2665
2673
|
).optional().nullable(),
|
|
2666
|
-
submissionId: z.string().describe(
|
|
2674
|
+
submissionId: /* @__PURE__ */ z.string().describe(
|
|
2667
2675
|
"ID of a submission to the plan's order form at checkout. Every time a visitor completes the checkout process for a plan, a new submission is created."
|
|
2668
2676
|
).regex(
|
|
2669
2677
|
/^[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}$/,
|
|
2670
2678
|
"Must be a valid GUID"
|
|
2671
2679
|
).optional().nullable(),
|
|
2672
|
-
submissionData: z.record(z.string(), z.any()).describe("Data submitted to the plan's order form at checkout.").optional()
|
|
2680
|
+
submissionData: /* @__PURE__ */ z.record(/* @__PURE__ */ z.string(), /* @__PURE__ */ z.any()).describe("Data submitted to the plan's order form at checkout.").optional()
|
|
2673
2681
|
}).describe(
|
|
2674
2682
|
"Information about the form submitted during the plan's checkout."
|
|
2675
2683
|
).optional()
|
|
2676
2684
|
});
|
|
2677
2685
|
var MemberListOrdersRequest = /* @__PURE__ */ z.object({
|
|
2678
|
-
options: z.object({
|
|
2679
|
-
planIds: z.array(z.string()).optional(),
|
|
2680
|
-
autoRenewCanceled: z.boolean().describe("Filter for orders where auto renewal was canceled.").optional().nullable(),
|
|
2681
|
-
orderStatuses: z.array(
|
|
2682
|
-
z.enum([
|
|
2686
|
+
options: /* @__PURE__ */ z.object({
|
|
2687
|
+
planIds: /* @__PURE__ */ z.array(/* @__PURE__ */ z.string()).optional(),
|
|
2688
|
+
autoRenewCanceled: /* @__PURE__ */ z.boolean().describe("Filter for orders where auto renewal was canceled.").optional().nullable(),
|
|
2689
|
+
orderStatuses: /* @__PURE__ */ z.array(
|
|
2690
|
+
/* @__PURE__ */ z.enum([
|
|
2683
2691
|
"UNDEFINED",
|
|
2684
2692
|
"DRAFT",
|
|
2685
2693
|
"PENDING",
|
|
@@ -2689,8 +2697,8 @@ var MemberListOrdersRequest = /* @__PURE__ */ z.object({
|
|
|
2689
2697
|
"CANCELED"
|
|
2690
2698
|
])
|
|
2691
2699
|
).optional(),
|
|
2692
|
-
paymentStatuses: z.array(
|
|
2693
|
-
z.enum([
|
|
2700
|
+
paymentStatuses: /* @__PURE__ */ z.array(
|
|
2701
|
+
/* @__PURE__ */ z.enum([
|
|
2694
2702
|
"UNDEFINED",
|
|
2695
2703
|
"PAID",
|
|
2696
2704
|
"REFUNDED",
|
|
@@ -2700,56 +2708,56 @@ var MemberListOrdersRequest = /* @__PURE__ */ z.object({
|
|
|
2700
2708
|
"NOT_APPLICABLE"
|
|
2701
2709
|
])
|
|
2702
2710
|
).optional(),
|
|
2703
|
-
limit: z.number().int().describe(
|
|
2711
|
+
limit: /* @__PURE__ */ z.number().int().describe(
|
|
2704
2712
|
"Limit the number of pricing plans returned. Default limit is 50."
|
|
2705
2713
|
).min(1).max(50).optional().nullable(),
|
|
2706
|
-
offset: z.number().int().describe("Number of entries to offset.").min(0).optional().nullable(),
|
|
2707
|
-
sorting: z.object({
|
|
2708
|
-
fieldName: z.string().describe("Name of the field to sort by.").max(512).optional(),
|
|
2709
|
-
order: z.enum(["ASC", "DESC"]).optional(),
|
|
2710
|
-
origin: z.object({
|
|
2711
|
-
latitude: z.number().describe("Address latitude.").optional().nullable(),
|
|
2712
|
-
longitude: z.number().describe("Address longitude.").optional().nullable()
|
|
2714
|
+
offset: /* @__PURE__ */ z.number().int().describe("Number of entries to offset.").min(0).optional().nullable(),
|
|
2715
|
+
sorting: /* @__PURE__ */ z.object({
|
|
2716
|
+
fieldName: /* @__PURE__ */ z.string().describe("Name of the field to sort by.").max(512).optional(),
|
|
2717
|
+
order: /* @__PURE__ */ z.enum(["ASC", "DESC"]).optional(),
|
|
2718
|
+
origin: /* @__PURE__ */ z.object({
|
|
2719
|
+
latitude: /* @__PURE__ */ z.number().describe("Address latitude.").optional().nullable(),
|
|
2720
|
+
longitude: /* @__PURE__ */ z.number().describe("Address longitude.").optional().nullable()
|
|
2713
2721
|
}).describe(
|
|
2714
2722
|
"Origin point for geo-distance sorting on a GEO field\nresults are ordered by distance from this point (ASC = nearest first, DESC = farthest first)."
|
|
2715
2723
|
).optional()
|
|
2716
2724
|
}).describe("Sorting direction (defaults to ASC) and field to sort by.").optional(),
|
|
2717
|
-
fieldSet: z.enum(["UNKNOWN_SET", "BASIC", "FULL"]).optional()
|
|
2725
|
+
fieldSet: /* @__PURE__ */ z.enum(["UNKNOWN_SET", "BASIC", "FULL"]).optional()
|
|
2718
2726
|
}).describe("Filtering, sorting, and pagination options. ").optional()
|
|
2719
2727
|
});
|
|
2720
2728
|
var MemberListOrdersResponse = /* @__PURE__ */ z.object({
|
|
2721
|
-
orders: z.array(
|
|
2722
|
-
z.object({
|
|
2723
|
-
_id: z.string().describe("Order ID.").regex(
|
|
2729
|
+
orders: /* @__PURE__ */ z.array(
|
|
2730
|
+
/* @__PURE__ */ z.object({
|
|
2731
|
+
_id: /* @__PURE__ */ z.string().describe("Order ID.").regex(
|
|
2724
2732
|
/^[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}$/,
|
|
2725
2733
|
"Must be a valid GUID"
|
|
2726
2734
|
).optional(),
|
|
2727
|
-
planId: z.string().describe(
|
|
2735
|
+
planId: /* @__PURE__ */ z.string().describe(
|
|
2728
2736
|
"ID of the plan purchased with the order, from the Plans API."
|
|
2729
2737
|
).regex(
|
|
2730
2738
|
/^[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}$/,
|
|
2731
2739
|
"Must be a valid GUID"
|
|
2732
2740
|
).optional(),
|
|
2733
|
-
subscriptionId: z.string().describe(
|
|
2741
|
+
subscriptionId: /* @__PURE__ */ z.string().describe(
|
|
2734
2742
|
"ID of the related Wix subscription.\n\nEvery pricing plan order corresponds to a Wix subscription, including orders for single payment plans. Learn more in\na [Pricing Plans overview](https://support.wix.com/en/article/pricing-plans-an-overview#create-plans-to-suit-your-business)."
|
|
2735
2743
|
).regex(
|
|
2736
2744
|
/^[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}$/,
|
|
2737
2745
|
"Must be a valid GUID"
|
|
2738
2746
|
).optional(),
|
|
2739
|
-
wixPayOrderId: z.string().describe(
|
|
2747
|
+
wixPayOrderId: /* @__PURE__ */ z.string().describe(
|
|
2740
2748
|
"Wix Pay order ID.\n\nProvided by Wix whether the order is created online or offline. The field is omitted when the order is free."
|
|
2741
2749
|
).regex(
|
|
2742
2750
|
/^[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}$/,
|
|
2743
2751
|
"Must be a valid GUID"
|
|
2744
2752
|
).optional().nullable(),
|
|
2745
|
-
buyer: z.object({
|
|
2746
|
-
memberId: z.string().describe(
|
|
2753
|
+
buyer: /* @__PURE__ */ z.object({
|
|
2754
|
+
memberId: /* @__PURE__ */ z.string().describe(
|
|
2747
2755
|
"Member ID for a Wix site member, from the Members API."
|
|
2748
2756
|
).regex(
|
|
2749
2757
|
/^[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}$/,
|
|
2750
2758
|
"Must be a valid GUID"
|
|
2751
2759
|
).optional(),
|
|
2752
|
-
contactId: z.string().describe(
|
|
2760
|
+
contactId: /* @__PURE__ */ z.string().describe(
|
|
2753
2761
|
"Contact ID for a Wix site contact, from the Contacts API."
|
|
2754
2762
|
).regex(
|
|
2755
2763
|
/^[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}$/,
|
|
@@ -2758,42 +2766,42 @@ var MemberListOrdersResponse = /* @__PURE__ */ z.object({
|
|
|
2758
2766
|
}).describe(
|
|
2759
2767
|
"The buyer's IDs. Includes `memberId` and `contactId`.\n\nCurrently, Pricing Plan purchases are limited to members only. `contactId` is returned,\nbut a buyer will not be able to purchase a plan without a `memberId`."
|
|
2760
2768
|
).optional(),
|
|
2761
|
-
priceDetails: z.intersection(
|
|
2762
|
-
z.object({
|
|
2763
|
-
subtotal: z.string().describe(
|
|
2769
|
+
priceDetails: /* @__PURE__ */ z.intersection(
|
|
2770
|
+
/* @__PURE__ */ z.object({
|
|
2771
|
+
subtotal: /* @__PURE__ */ z.string().describe(
|
|
2764
2772
|
'Price of the order excluding tax, specified as a monetary amount. for example, `"9.99"`.'
|
|
2765
2773
|
).optional(),
|
|
2766
|
-
discount: z.string().describe("Total discount applied.").optional(),
|
|
2767
|
-
tax: z.object({
|
|
2768
|
-
name: z.string().describe("Name of the tax. For example, VAT.").optional(),
|
|
2769
|
-
includedInPrice: z.boolean().describe(
|
|
2774
|
+
discount: /* @__PURE__ */ z.string().describe("Total discount applied.").optional(),
|
|
2775
|
+
tax: /* @__PURE__ */ z.object({
|
|
2776
|
+
name: /* @__PURE__ */ z.string().describe("Name of the tax. For example, VAT.").optional(),
|
|
2777
|
+
includedInPrice: /* @__PURE__ */ z.boolean().describe(
|
|
2770
2778
|
"Whether tax is included in the original price. When `false`, tax is added at checkout."
|
|
2771
2779
|
).optional(),
|
|
2772
|
-
rate: z.string().describe(
|
|
2780
|
+
rate: /* @__PURE__ */ z.string().describe(
|
|
2773
2781
|
'Tax rate percentage, as a number between 0 and 100. For example, a 7% tax rate is `"7.00"`.'
|
|
2774
2782
|
).optional(),
|
|
2775
|
-
amount: z.string().describe(
|
|
2783
|
+
amount: /* @__PURE__ */ z.string().describe(
|
|
2776
2784
|
'Total tax, specified as a monetary amount. For example, `"3.99"`.'
|
|
2777
2785
|
).optional()
|
|
2778
2786
|
}).describe("Tax applied.").optional(),
|
|
2779
|
-
total: z.string().describe(
|
|
2787
|
+
total: /* @__PURE__ */ z.string().describe(
|
|
2780
2788
|
'Price after tax and discount is applied, specified as a monetary amount. For example, `"13.98"`.\n\nIf no tax is applied, the amount is the same as `subtotal`.'
|
|
2781
2789
|
).optional(),
|
|
2782
|
-
planPrice: z.string().describe(
|
|
2790
|
+
planPrice: /* @__PURE__ */ z.string().describe(
|
|
2783
2791
|
"Plan price as it was at the moment of order creation."
|
|
2784
2792
|
).optional(),
|
|
2785
|
-
currency: z.string().describe(
|
|
2793
|
+
currency: /* @__PURE__ */ z.string().describe(
|
|
2786
2794
|
"Currency code. Must be valid ISO 4217 currency code (e.g., USD)."
|
|
2787
2795
|
).optional(),
|
|
2788
|
-
freeTrialDays: z.number().int().describe(
|
|
2796
|
+
freeTrialDays: /* @__PURE__ */ z.number().int().describe(
|
|
2789
2797
|
"Free trial period for the order in days. Only available for recurring plans."
|
|
2790
2798
|
).min(1).max(999).optional().nullable(),
|
|
2791
|
-
coupon: z.object({
|
|
2792
|
-
code: z.string().describe("Code of the applied coupon.").min(1).max(20).optional(),
|
|
2793
|
-
amount: z.string().describe(
|
|
2799
|
+
coupon: /* @__PURE__ */ z.object({
|
|
2800
|
+
code: /* @__PURE__ */ z.string().describe("Code of the applied coupon.").min(1).max(20).optional(),
|
|
2801
|
+
amount: /* @__PURE__ */ z.string().describe(
|
|
2794
2802
|
"Total discount of the coupon, as a monetary amount."
|
|
2795
2803
|
).optional(),
|
|
2796
|
-
_id: z.string().describe("Coupon ID.").regex(
|
|
2804
|
+
_id: /* @__PURE__ */ z.string().describe("Coupon ID.").regex(
|
|
2797
2805
|
/^[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}$/,
|
|
2798
2806
|
"Must be a valid GUID"
|
|
2799
2807
|
).optional()
|
|
@@ -2801,45 +2809,45 @@ var MemberListOrdersResponse = /* @__PURE__ */ z.object({
|
|
|
2801
2809
|
"Coupon applied to the order. Empty means no coupon was applied."
|
|
2802
2810
|
).optional()
|
|
2803
2811
|
}),
|
|
2804
|
-
z.xor([
|
|
2805
|
-
z.object({
|
|
2806
|
-
subscription: z.never().optional(),
|
|
2807
|
-
singlePaymentForDuration: z.never().optional(),
|
|
2808
|
-
singlePaymentUnlimited: z.never().optional()
|
|
2812
|
+
/* @__PURE__ */ z.xor([
|
|
2813
|
+
/* @__PURE__ */ z.object({
|
|
2814
|
+
subscription: /* @__PURE__ */ z.never().optional(),
|
|
2815
|
+
singlePaymentForDuration: /* @__PURE__ */ z.never().optional(),
|
|
2816
|
+
singlePaymentUnlimited: /* @__PURE__ */ z.never().optional()
|
|
2809
2817
|
}),
|
|
2810
|
-
z.object({
|
|
2811
|
-
singlePaymentForDuration: z.never().optional(),
|
|
2812
|
-
singlePaymentUnlimited: z.never().optional(),
|
|
2813
|
-
subscription: z.object({
|
|
2814
|
-
cycleDuration: z.object({
|
|
2815
|
-
count: z.number().int().describe(
|
|
2818
|
+
/* @__PURE__ */ z.object({
|
|
2819
|
+
singlePaymentForDuration: /* @__PURE__ */ z.never().optional(),
|
|
2820
|
+
singlePaymentUnlimited: /* @__PURE__ */ z.never().optional(),
|
|
2821
|
+
subscription: /* @__PURE__ */ z.object({
|
|
2822
|
+
cycleDuration: /* @__PURE__ */ z.object({
|
|
2823
|
+
count: /* @__PURE__ */ z.number().int().describe(
|
|
2816
2824
|
"Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`."
|
|
2817
2825
|
).min(1).optional().nullable(),
|
|
2818
|
-
unit: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
|
|
2826
|
+
unit: /* @__PURE__ */ z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
|
|
2819
2827
|
}).describe(
|
|
2820
2828
|
"Number of payment cycles the subscription is valid for.\n`0` for unlimited plans or for plans that are valid until canceled."
|
|
2821
2829
|
).optional(),
|
|
2822
|
-
cycleCount: z.number().int().describe(
|
|
2830
|
+
cycleCount: /* @__PURE__ */ z.number().int().describe(
|
|
2823
2831
|
"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."
|
|
2824
2832
|
).min(0).max(2e3).optional().nullable()
|
|
2825
2833
|
}).describe("Order has recurring payments.")
|
|
2826
2834
|
}),
|
|
2827
|
-
z.object({
|
|
2828
|
-
subscription: z.never().optional(),
|
|
2829
|
-
singlePaymentUnlimited: z.never().optional(),
|
|
2830
|
-
singlePaymentForDuration: z.object({
|
|
2831
|
-
count: z.number().int().describe(
|
|
2835
|
+
/* @__PURE__ */ z.object({
|
|
2836
|
+
subscription: /* @__PURE__ */ z.never().optional(),
|
|
2837
|
+
singlePaymentUnlimited: /* @__PURE__ */ z.never().optional(),
|
|
2838
|
+
singlePaymentForDuration: /* @__PURE__ */ z.object({
|
|
2839
|
+
count: /* @__PURE__ */ z.number().int().describe(
|
|
2832
2840
|
"Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`."
|
|
2833
2841
|
).min(1).optional().nullable(),
|
|
2834
|
-
unit: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
|
|
2842
|
+
unit: /* @__PURE__ */ z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
|
|
2835
2843
|
}).describe(
|
|
2836
2844
|
"One-time payment. Order is valid for a specified duration."
|
|
2837
2845
|
)
|
|
2838
2846
|
}),
|
|
2839
|
-
z.object({
|
|
2840
|
-
subscription: z.never().optional(),
|
|
2841
|
-
singlePaymentForDuration: z.never().optional(),
|
|
2842
|
-
singlePaymentUnlimited: z.boolean().describe(
|
|
2847
|
+
/* @__PURE__ */ z.object({
|
|
2848
|
+
subscription: /* @__PURE__ */ z.never().optional(),
|
|
2849
|
+
singlePaymentForDuration: /* @__PURE__ */ z.never().optional(),
|
|
2850
|
+
singlePaymentUnlimited: /* @__PURE__ */ z.boolean().describe(
|
|
2843
2851
|
"One-time payment. Order is valid until it is canceled."
|
|
2844
2852
|
)
|
|
2845
2853
|
})
|
|
@@ -2847,105 +2855,105 @@ var MemberListOrdersResponse = /* @__PURE__ */ z.object({
|
|
|
2847
2855
|
).describe(
|
|
2848
2856
|
"__Deprecated.__ Use `pricing` instead. This property will be removed on September 30, 2022."
|
|
2849
2857
|
).optional(),
|
|
2850
|
-
pricing: z.intersection(
|
|
2851
|
-
z.object({
|
|
2852
|
-
prices: z.array(
|
|
2853
|
-
z.object({
|
|
2854
|
-
duration: z.object({
|
|
2855
|
-
cycleFrom: z.number().int().describe(
|
|
2858
|
+
pricing: /* @__PURE__ */ z.intersection(
|
|
2859
|
+
/* @__PURE__ */ z.object({
|
|
2860
|
+
prices: /* @__PURE__ */ z.array(
|
|
2861
|
+
/* @__PURE__ */ z.object({
|
|
2862
|
+
duration: /* @__PURE__ */ z.object({
|
|
2863
|
+
cycleFrom: /* @__PURE__ */ z.number().int().describe(
|
|
2856
2864
|
"Price starts to apply with this cycle.\n\n`1` is the first payment cycle for all pricing models."
|
|
2857
2865
|
).optional(),
|
|
2858
|
-
numberOfCycles: z.number().int().describe(
|
|
2866
|
+
numberOfCycles: /* @__PURE__ */ z.number().int().describe(
|
|
2859
2867
|
"Amount of cycles to apply price for.\n\nFor `subscription` pricing models with a finite number of cycles, the `numberOfCycles` is the same as `pricing.subscription.cycleCount`.\n\nFor `subscription` pricing models that are unlimited or until-canceled, the `numberOfCycles` is not returned.\n\nFor `singlePaymentForDuration` and `singlePaymentUnlimited` pricing models, the `numberOfCycles` is `1`."
|
|
2860
2868
|
).optional().nullable()
|
|
2861
2869
|
}).describe(
|
|
2862
2870
|
"Cycle duration to apply `price` for.\n\nUse with all pricing models.\nCan apply the same price to multiple payment cycles."
|
|
2863
2871
|
).optional(),
|
|
2864
|
-
price: z.object({
|
|
2865
|
-
subtotal: z.string().describe(
|
|
2872
|
+
price: /* @__PURE__ */ z.object({
|
|
2873
|
+
subtotal: /* @__PURE__ */ z.string().describe(
|
|
2866
2874
|
'Price of the order excluding tax, specified as a monetary amount. For example, `"9.99"`.'
|
|
2867
2875
|
).optional(),
|
|
2868
|
-
coupon: z.object({
|
|
2869
|
-
code: z.string().describe("Code of the applied coupon.").min(1).max(20).optional(),
|
|
2870
|
-
amount: z.string().describe(
|
|
2876
|
+
coupon: /* @__PURE__ */ z.object({
|
|
2877
|
+
code: /* @__PURE__ */ z.string().describe("Code of the applied coupon.").min(1).max(20).optional(),
|
|
2878
|
+
amount: /* @__PURE__ */ z.string().describe(
|
|
2871
2879
|
"Total discount of the coupon, as a monetary amount."
|
|
2872
2880
|
).optional(),
|
|
2873
|
-
_id: z.string().describe("Coupon ID.").regex(
|
|
2881
|
+
_id: /* @__PURE__ */ z.string().describe("Coupon ID.").regex(
|
|
2874
2882
|
/^[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}$/,
|
|
2875
2883
|
"Must be a valid GUID"
|
|
2876
2884
|
).optional()
|
|
2877
2885
|
}).describe(
|
|
2878
2886
|
"Coupon applied to the order, from the Coupons API."
|
|
2879
2887
|
).optional(),
|
|
2880
|
-
discount: z.string().describe("Total discount applied to the order.").optional(),
|
|
2881
|
-
tax: z.object({
|
|
2882
|
-
name: z.string().describe("Name of the tax. For example, VAT.").optional(),
|
|
2883
|
-
includedInPrice: z.boolean().describe(
|
|
2888
|
+
discount: /* @__PURE__ */ z.string().describe("Total discount applied to the order.").optional(),
|
|
2889
|
+
tax: /* @__PURE__ */ z.object({
|
|
2890
|
+
name: /* @__PURE__ */ z.string().describe("Name of the tax. For example, VAT.").optional(),
|
|
2891
|
+
includedInPrice: /* @__PURE__ */ z.boolean().describe(
|
|
2884
2892
|
"Whether tax is included in the original price. When `false`, tax is added at checkout."
|
|
2885
2893
|
).optional(),
|
|
2886
|
-
rate: z.string().describe(
|
|
2894
|
+
rate: /* @__PURE__ */ z.string().describe(
|
|
2887
2895
|
'Tax rate percentage, as a number between 0 and 100. For example, a 7% tax rate is `"7.00"`.'
|
|
2888
2896
|
).optional(),
|
|
2889
|
-
amount: z.string().describe(
|
|
2897
|
+
amount: /* @__PURE__ */ z.string().describe(
|
|
2890
2898
|
'Total tax, specified as a monetary amount. For example, `"3.99"`.'
|
|
2891
2899
|
).optional()
|
|
2892
2900
|
}).describe(
|
|
2893
2901
|
"Tax applied to the order.\n\nTax is only applied if the site [has it configured](https://support.wix.com/en/article/pricing-plans-setting-up-tax-collection)."
|
|
2894
2902
|
).optional(),
|
|
2895
|
-
total: z.string().describe(
|
|
2903
|
+
total: /* @__PURE__ */ z.string().describe(
|
|
2896
2904
|
'Price after tax and discount is applied. Specified as a monetary amount, for example, `"13.98"`.\n\nIf no tax is applied, the amount is the same as `subtotal`.'
|
|
2897
2905
|
).optional(),
|
|
2898
|
-
currency: z.string().describe(
|
|
2906
|
+
currency: /* @__PURE__ */ z.string().describe(
|
|
2899
2907
|
"Three-letter currency code in\n[ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format."
|
|
2900
2908
|
).optional(),
|
|
2901
|
-
proration: z.string().describe(
|
|
2909
|
+
proration: /* @__PURE__ */ z.string().describe(
|
|
2902
2910
|
"Price change after billing date was change and price was adjusted. Could be positive and negative values."
|
|
2903
2911
|
).optional()
|
|
2904
2912
|
}).describe("Order price.").optional()
|
|
2905
2913
|
})
|
|
2906
2914
|
).optional()
|
|
2907
2915
|
}),
|
|
2908
|
-
z.xor([
|
|
2909
|
-
z.object({
|
|
2910
|
-
subscription: z.never().optional(),
|
|
2911
|
-
singlePaymentForDuration: z.never().optional(),
|
|
2912
|
-
singlePaymentUnlimited: z.never().optional()
|
|
2916
|
+
/* @__PURE__ */ z.xor([
|
|
2917
|
+
/* @__PURE__ */ z.object({
|
|
2918
|
+
subscription: /* @__PURE__ */ z.never().optional(),
|
|
2919
|
+
singlePaymentForDuration: /* @__PURE__ */ z.never().optional(),
|
|
2920
|
+
singlePaymentUnlimited: /* @__PURE__ */ z.never().optional()
|
|
2913
2921
|
}),
|
|
2914
|
-
z.object({
|
|
2915
|
-
singlePaymentForDuration: z.never().optional(),
|
|
2916
|
-
singlePaymentUnlimited: z.never().optional(),
|
|
2917
|
-
subscription: z.object({
|
|
2918
|
-
cycleDuration: z.object({
|
|
2919
|
-
count: z.number().int().describe(
|
|
2922
|
+
/* @__PURE__ */ z.object({
|
|
2923
|
+
singlePaymentForDuration: /* @__PURE__ */ z.never().optional(),
|
|
2924
|
+
singlePaymentUnlimited: /* @__PURE__ */ z.never().optional(),
|
|
2925
|
+
subscription: /* @__PURE__ */ z.object({
|
|
2926
|
+
cycleDuration: /* @__PURE__ */ z.object({
|
|
2927
|
+
count: /* @__PURE__ */ z.number().int().describe(
|
|
2920
2928
|
"Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`."
|
|
2921
2929
|
).min(1).optional().nullable(),
|
|
2922
|
-
unit: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
|
|
2930
|
+
unit: /* @__PURE__ */ z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
|
|
2923
2931
|
}).describe(
|
|
2924
2932
|
"Number of payment cycles the subscription is valid for.\n`0` for unlimited plans or for plans that are valid until canceled."
|
|
2925
2933
|
).optional(),
|
|
2926
|
-
cycleCount: z.number().int().describe(
|
|
2934
|
+
cycleCount: /* @__PURE__ */ z.number().int().describe(
|
|
2927
2935
|
"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."
|
|
2928
2936
|
).min(0).max(2e3).optional().nullable()
|
|
2929
2937
|
}).describe(
|
|
2930
2938
|
"Pricing model for an order with recurring payment cycles."
|
|
2931
2939
|
)
|
|
2932
2940
|
}),
|
|
2933
|
-
z.object({
|
|
2934
|
-
subscription: z.never().optional(),
|
|
2935
|
-
singlePaymentUnlimited: z.never().optional(),
|
|
2936
|
-
singlePaymentForDuration: z.object({
|
|
2937
|
-
count: z.number().int().describe(
|
|
2941
|
+
/* @__PURE__ */ z.object({
|
|
2942
|
+
subscription: /* @__PURE__ */ z.never().optional(),
|
|
2943
|
+
singlePaymentUnlimited: /* @__PURE__ */ z.never().optional(),
|
|
2944
|
+
singlePaymentForDuration: /* @__PURE__ */ z.object({
|
|
2945
|
+
count: /* @__PURE__ */ z.number().int().describe(
|
|
2938
2946
|
"Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`."
|
|
2939
2947
|
).min(1).optional().nullable(),
|
|
2940
|
-
unit: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
|
|
2948
|
+
unit: /* @__PURE__ */ z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
|
|
2941
2949
|
}).describe(
|
|
2942
2950
|
"Pricing model for an order with a one-time payment and the order is valid for a specific amount of time."
|
|
2943
2951
|
)
|
|
2944
2952
|
}),
|
|
2945
|
-
z.object({
|
|
2946
|
-
subscription: z.never().optional(),
|
|
2947
|
-
singlePaymentForDuration: z.never().optional(),
|
|
2948
|
-
singlePaymentUnlimited: z.boolean().describe(
|
|
2953
|
+
/* @__PURE__ */ z.object({
|
|
2954
|
+
subscription: /* @__PURE__ */ z.never().optional(),
|
|
2955
|
+
singlePaymentForDuration: /* @__PURE__ */ z.never().optional(),
|
|
2956
|
+
singlePaymentUnlimited: /* @__PURE__ */ z.boolean().describe(
|
|
2949
2957
|
"Pricing model for an order with a one-time payment and the order is valid until canceled."
|
|
2950
2958
|
)
|
|
2951
2959
|
})
|
|
@@ -2953,8 +2961,8 @@ var MemberListOrdersResponse = /* @__PURE__ */ z.object({
|
|
|
2953
2961
|
).describe(
|
|
2954
2962
|
"Order pricing model, price, and payment schedule.\n\nLearn more about [pricing models](https://dev.wix.com/api/rest/wix-pricing-plans/pricing-plans/introduction#wix-pricing-plans_pricing-plans_introduction_pricing-models)."
|
|
2955
2963
|
).optional(),
|
|
2956
|
-
type: z.enum(["UNDEFINED", "ONLINE", "OFFLINE", "EXTERNAL"]).describe("How the order was processed.").optional(),
|
|
2957
|
-
status: z.enum([
|
|
2964
|
+
type: /* @__PURE__ */ z.enum(["UNDEFINED", "ONLINE", "OFFLINE", "EXTERNAL"]).describe("How the order was processed.").optional(),
|
|
2965
|
+
status: /* @__PURE__ */ z.enum([
|
|
2958
2966
|
"UNDEFINED",
|
|
2959
2967
|
"DRAFT",
|
|
2960
2968
|
"PENDING",
|
|
@@ -2963,12 +2971,12 @@ var MemberListOrdersResponse = /* @__PURE__ */ z.object({
|
|
|
2963
2971
|
"ENDED",
|
|
2964
2972
|
"CANCELED"
|
|
2965
2973
|
]).describe("Status of the order.").optional(),
|
|
2966
|
-
autoRenewCanceled: z.boolean().describe(
|
|
2974
|
+
autoRenewCanceled: /* @__PURE__ */ z.boolean().describe(
|
|
2967
2975
|
"Whether the order will be canceled at the next payment date.\n\nIf `true`, the order status will be `CANCELED` and the next payment won't be charged. Omitted for single payment orders."
|
|
2968
2976
|
).optional().nullable(),
|
|
2969
|
-
cancellation: z.object({
|
|
2970
|
-
requestedDate: z.date().describe("Date and time the cancellation was requested.").optional().nullable(),
|
|
2971
|
-
cause: z.enum([
|
|
2977
|
+
cancellation: /* @__PURE__ */ z.object({
|
|
2978
|
+
requestedDate: /* @__PURE__ */ z.date().describe("Date and time the cancellation was requested.").optional().nullable(),
|
|
2979
|
+
cause: /* @__PURE__ */ z.enum([
|
|
2972
2980
|
"UNDEFINED",
|
|
2973
2981
|
"OWNER_ACTION",
|
|
2974
2982
|
"MEMBER_ACTION",
|
|
@@ -2976,13 +2984,13 @@ var MemberListOrdersResponse = /* @__PURE__ */ z.object({
|
|
|
2976
2984
|
"PAYMENT_SETUP_FAILURE",
|
|
2977
2985
|
"UNKNOWN"
|
|
2978
2986
|
]).describe("Reason for the cancellation.").optional(),
|
|
2979
|
-
effectiveAt: z.enum(["UNDEFINED", "IMMEDIATELY", "NEXT_PAYMENT_DATE"]).describe(
|
|
2987
|
+
effectiveAt: /* @__PURE__ */ z.enum(["UNDEFINED", "IMMEDIATELY", "NEXT_PAYMENT_DATE"]).describe(
|
|
2980
2988
|
"When the cancellation takes effect. Set when cancelling the order."
|
|
2981
2989
|
).optional()
|
|
2982
2990
|
}).describe(
|
|
2983
2991
|
"Details about the cancellation of an order.\n\nOnly present if the status is `CANCELED`."
|
|
2984
2992
|
).optional(),
|
|
2985
|
-
lastPaymentStatus: z.enum([
|
|
2993
|
+
lastPaymentStatus: /* @__PURE__ */ z.enum([
|
|
2986
2994
|
"UNDEFINED",
|
|
2987
2995
|
"PAID",
|
|
2988
2996
|
"REFUNDED",
|
|
@@ -2993,72 +3001,72 @@ var MemberListOrdersResponse = /* @__PURE__ */ z.object({
|
|
|
2993
3001
|
]).describe(
|
|
2994
3002
|
"Status of the last payment for the order.\nUpdated automatically for online orders. Updated manually by the Wix user for offline orders."
|
|
2995
3003
|
).optional(),
|
|
2996
|
-
startDate: z.date().describe("Start date and time for the ordered plan.").optional().nullable(),
|
|
2997
|
-
endDate: z.date().describe(
|
|
3004
|
+
startDate: /* @__PURE__ */ z.date().describe("Start date and time for the ordered plan.").optional().nullable(),
|
|
3005
|
+
endDate: /* @__PURE__ */ z.date().describe(
|
|
2998
3006
|
"Current end date and time for the ordered plan.\n\n`endDate` may be updated over the course of an order.\nIf the order is paused, it will have a later `endDate` once it is resumed.\n`endDate` may also be postponed.\n\nOmitted if the order is valid until canceled and still `ACTIVE`."
|
|
2999
3007
|
).optional().nullable(),
|
|
3000
|
-
pausePeriods: z.array(
|
|
3001
|
-
z.object({
|
|
3002
|
-
status: z.enum(["UNDEFINED", "ACTIVE", "ENDED"]).describe("Status of the pause period.").optional(),
|
|
3003
|
-
pauseDate: z.date().describe("Start date and time of the pause period.").optional().nullable(),
|
|
3004
|
-
resumeDate: z.date().describe(
|
|
3008
|
+
pausePeriods: /* @__PURE__ */ z.array(
|
|
3009
|
+
/* @__PURE__ */ z.object({
|
|
3010
|
+
status: /* @__PURE__ */ z.enum(["UNDEFINED", "ACTIVE", "ENDED"]).describe("Status of the pause period.").optional(),
|
|
3011
|
+
pauseDate: /* @__PURE__ */ z.date().describe("Start date and time of the pause period.").optional().nullable(),
|
|
3012
|
+
resumeDate: /* @__PURE__ */ z.date().describe(
|
|
3005
3013
|
"End date and time of the pause period.\n\nOmitted while the pause period remains `ACTIVE`."
|
|
3006
3014
|
).optional().nullable()
|
|
3007
3015
|
})
|
|
3008
3016
|
).optional(),
|
|
3009
|
-
freeTrialDays: z.number().int().describe(
|
|
3017
|
+
freeTrialDays: /* @__PURE__ */ z.number().int().describe(
|
|
3010
3018
|
"Free trial period for the order, in days.\n\nOnly available for recurring plans."
|
|
3011
3019
|
).min(1).max(999).optional().nullable(),
|
|
3012
|
-
earliestEndDate: z.date().describe(
|
|
3020
|
+
earliestEndDate: /* @__PURE__ */ z.date().describe(
|
|
3013
3021
|
"Earliest end date and time that the plan for the order can expire.\n\nCalculated by using the original end date plus any pause periods. Omitted if the order is active until canceled. Reserved for future use."
|
|
3014
3022
|
).optional().nullable(),
|
|
3015
|
-
currentCycle: z.object({
|
|
3016
|
-
index: z.number().int().describe(
|
|
3023
|
+
currentCycle: /* @__PURE__ */ z.object({
|
|
3024
|
+
index: /* @__PURE__ */ z.number().int().describe(
|
|
3017
3025
|
"Index of the current payment cycle in the order.\n\n`0` when order is in a free trial period. In all other cases, the index starts with `1`."
|
|
3018
3026
|
).min(0).optional(),
|
|
3019
|
-
startedDate: z.date().describe("Start date and time for the current payment cycle.").optional().nullable(),
|
|
3020
|
-
endedDate: z.date().describe("End date and time for the current payment cycle.").optional().nullable()
|
|
3027
|
+
startedDate: /* @__PURE__ */ z.date().describe("Start date and time for the current payment cycle.").optional().nullable(),
|
|
3028
|
+
endedDate: /* @__PURE__ */ z.date().describe("End date and time for the current payment cycle.").optional().nullable()
|
|
3021
3029
|
}).describe(
|
|
3022
3030
|
"Current payment cycle for the order.\n\n`currentCycle` will be omitted if the order's status is `CANCELED` or `ENDED`, or if the `startDate` hasn't passed yet."
|
|
3023
3031
|
).optional(),
|
|
3024
|
-
planName: z.string().describe("Plan name at the time of purchase.").optional(),
|
|
3025
|
-
planDescription: z.string().describe("Plan description at the time of purchase").optional(),
|
|
3026
|
-
planPrice: z.string().describe("Plan price as it was at the moment of order creation.").optional(),
|
|
3027
|
-
_createdDate: z.date().describe("Date and time the order was created.").optional().nullable(),
|
|
3028
|
-
_updatedDate: z.date().describe("Date and time the order was updated.").optional().nullable(),
|
|
3029
|
-
formData: z.object({
|
|
3030
|
-
formId: z.string().describe(
|
|
3032
|
+
planName: /* @__PURE__ */ z.string().describe("Plan name at the time of purchase.").optional(),
|
|
3033
|
+
planDescription: /* @__PURE__ */ z.string().describe("Plan description at the time of purchase").optional(),
|
|
3034
|
+
planPrice: /* @__PURE__ */ z.string().describe("Plan price as it was at the moment of order creation.").optional(),
|
|
3035
|
+
_createdDate: /* @__PURE__ */ z.date().describe("Date and time the order was created.").optional().nullable(),
|
|
3036
|
+
_updatedDate: /* @__PURE__ */ z.date().describe("Date and time the order was updated.").optional().nullable(),
|
|
3037
|
+
formData: /* @__PURE__ */ z.object({
|
|
3038
|
+
formId: /* @__PURE__ */ z.string().describe(
|
|
3031
3039
|
"ID of the [order form](https://dev.wix.com/docs/rest/api-reference/wix-forms/form-submissions/introduction) associated with the plan at checkout."
|
|
3032
3040
|
).regex(
|
|
3033
3041
|
/^[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}$/,
|
|
3034
3042
|
"Must be a valid GUID"
|
|
3035
3043
|
).optional().nullable(),
|
|
3036
|
-
submissionId: z.string().describe(
|
|
3044
|
+
submissionId: /* @__PURE__ */ z.string().describe(
|
|
3037
3045
|
"ID of a submission to the plan's order form at checkout. Every time a visitor completes the checkout process for a plan, a new submission is created."
|
|
3038
3046
|
).regex(
|
|
3039
3047
|
/^[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}$/,
|
|
3040
3048
|
"Must be a valid GUID"
|
|
3041
3049
|
).optional().nullable(),
|
|
3042
|
-
submissionData: z.record(z.string(), z.any()).describe("Data submitted to the plan's order form at checkout.").optional()
|
|
3050
|
+
submissionData: /* @__PURE__ */ z.record(/* @__PURE__ */ z.string(), /* @__PURE__ */ z.any()).describe("Data submitted to the plan's order form at checkout.").optional()
|
|
3043
3051
|
}).describe(
|
|
3044
3052
|
"Information about the form submitted during the plan's checkout."
|
|
3045
3053
|
).optional()
|
|
3046
3054
|
})
|
|
3047
3055
|
).optional(),
|
|
3048
|
-
pagingMetadata: z.object({
|
|
3049
|
-
count: z.number().int().describe("Number of items returned in the response.").optional().nullable(),
|
|
3050
|
-
offset: z.number().int().describe("Offset that was requested.").optional().nullable(),
|
|
3051
|
-
total: z.number().int().describe(
|
|
3056
|
+
pagingMetadata: /* @__PURE__ */ z.object({
|
|
3057
|
+
count: /* @__PURE__ */ z.number().int().describe("Number of items returned in the response.").optional().nullable(),
|
|
3058
|
+
offset: /* @__PURE__ */ z.number().int().describe("Offset that was requested.").optional().nullable(),
|
|
3059
|
+
total: /* @__PURE__ */ z.number().int().describe(
|
|
3052
3060
|
"Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set."
|
|
3053
3061
|
).optional().nullable(),
|
|
3054
|
-
tooManyToCount: z.boolean().describe(
|
|
3062
|
+
tooManyToCount: /* @__PURE__ */ z.boolean().describe(
|
|
3055
3063
|
"Flag that indicates the server failed to calculate the `total` field."
|
|
3056
3064
|
).optional().nullable(),
|
|
3057
|
-
cursors: z.object({
|
|
3058
|
-
next: z.string().describe(
|
|
3065
|
+
cursors: /* @__PURE__ */ z.object({
|
|
3066
|
+
next: /* @__PURE__ */ z.string().describe(
|
|
3059
3067
|
"Cursor string pointing to the next page in the list of results."
|
|
3060
3068
|
).max(16e3).optional().nullable(),
|
|
3061
|
-
prev: z.string().describe(
|
|
3069
|
+
prev: /* @__PURE__ */ z.string().describe(
|
|
3062
3070
|
"Cursor pointing to the previous page in the list of results."
|
|
3063
3071
|
).max(16e3).optional().nullable()
|
|
3064
3072
|
}).describe(
|
|
@@ -3069,11 +3077,15 @@ var MemberListOrdersResponse = /* @__PURE__ */ z.object({
|
|
|
3069
3077
|
).optional()
|
|
3070
3078
|
});
|
|
3071
3079
|
var RequestCancellationRequest = /* @__PURE__ */ z.object({
|
|
3072
|
-
_id: z.string().describe("Order ID.").regex(
|
|
3080
|
+
_id: /* @__PURE__ */ z.string().describe("Order ID.").regex(
|
|
3073
3081
|
/^[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}$/,
|
|
3074
3082
|
"Must be a valid GUID"
|
|
3075
3083
|
),
|
|
3076
|
-
effectiveAt: z.enum([
|
|
3084
|
+
effectiveAt: /* @__PURE__ */ z.enum([
|
|
3085
|
+
"UNDEFINED",
|
|
3086
|
+
"IMMEDIATELY",
|
|
3087
|
+
"NEXT_PAYMENT_DATE"
|
|
3088
|
+
])
|
|
3077
3089
|
});
|
|
3078
3090
|
var RequestCancellationResponse = /* @__PURE__ */ z.object({});
|
|
3079
3091
|
// Annotate the CommonJS export names for ESM import in node:
|