@wix/auto_sdk_pricing-plans_orders 1.0.123 → 1.0.124

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.
@@ -66,42 +66,44 @@ module.exports = __toCommonJS(schemas_exports);
66
66
  // src/pricing-plans-v2-order-orders.schemas.ts
67
67
  var z = __toESM(require("zod"));
68
68
  var ManagementGetOrderRequest = /* @__PURE__ */ z.object({
69
- _id: z.string().describe("Order ID.").regex(
69
+ _id: /* @__PURE__ */ z.string().describe("Order 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({ fieldSet: z.enum(["UNKNOWN_SET", "BASIC", "FULL"]).optional() }).describe("Options to use when getting an order. ").optional()
73
+ options: /* @__PURE__ */ z.object({
74
+ fieldSet: /* @__PURE__ */ z.enum(["UNKNOWN_SET", "BASIC", "FULL"]).optional()
75
+ }).describe("Options to use when getting an order. ").optional()
74
76
  });
75
77
  var ManagementGetOrderResponse = /* @__PURE__ */ z.object({
76
- order: z.object({
77
- _id: z.string().describe("Order ID.").regex(
78
+ order: /* @__PURE__ */ z.object({
79
+ _id: /* @__PURE__ */ z.string().describe("Order ID.").regex(
78
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}$/,
79
81
  "Must be a valid GUID"
80
82
  ).optional(),
81
- planId: z.string().describe(
83
+ planId: /* @__PURE__ */ z.string().describe(
82
84
  "ID of the plan purchased with the order, from the Plans API."
83
85
  ).regex(
84
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}$/,
85
87
  "Must be a valid GUID"
86
88
  ).optional(),
87
- subscriptionId: z.string().describe(
89
+ subscriptionId: /* @__PURE__ */ z.string().describe(
88
90
  "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
91
  ).regex(
90
92
  /^[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
93
  "Must be a valid GUID"
92
94
  ).optional(),
93
- wixPayOrderId: z.string().describe(
95
+ wixPayOrderId: /* @__PURE__ */ z.string().describe(
94
96
  "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
97
  ).regex(
96
98
  /^[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
99
  "Must be a valid GUID"
98
100
  ).optional().nullable(),
99
- buyer: z.object({
100
- memberId: z.string().describe("Member ID for a Wix site member, from the Members API.").regex(
101
+ buyer: /* @__PURE__ */ z.object({
102
+ memberId: /* @__PURE__ */ z.string().describe("Member ID for a Wix site member, from the Members API.").regex(
101
103
  /^[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
104
  "Must be a valid GUID"
103
105
  ).optional(),
104
- contactId: z.string().describe(
106
+ contactId: /* @__PURE__ */ z.string().describe(
105
107
  "Contact ID for a Wix site contact, from the Contacts API."
106
108
  ).regex(
107
109
  /^[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 +112,40 @@ var ManagementGetOrderResponse = /* @__PURE__ */ z.object({
110
112
  }).describe(
111
113
  "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
114
  ).optional(),
113
- priceDetails: z.intersection(
114
- z.object({
115
- subtotal: z.string().describe(
115
+ priceDetails: /* @__PURE__ */ z.intersection(
116
+ /* @__PURE__ */ z.object({
117
+ subtotal: /* @__PURE__ */ z.string().describe(
116
118
  'Price of the order excluding tax, specified as a monetary amount. for example, `"9.99"`.'
117
119
  ).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(
120
+ discount: /* @__PURE__ */ z.string().describe("Total discount applied.").optional(),
121
+ tax: /* @__PURE__ */ z.object({
122
+ name: /* @__PURE__ */ z.string().describe("Name of the tax. For example, VAT.").optional(),
123
+ includedInPrice: /* @__PURE__ */ z.boolean().describe(
122
124
  "Whether tax is included in the original price. When `false`, tax is added at checkout."
123
125
  ).optional(),
124
- rate: z.string().describe(
126
+ rate: /* @__PURE__ */ z.string().describe(
125
127
  'Tax rate percentage, as a number between 0 and 100. For example, a 7% tax rate is `"7.00"`.'
126
128
  ).optional(),
127
- amount: z.string().describe(
129
+ amount: /* @__PURE__ */ z.string().describe(
128
130
  'Total tax, specified as a monetary amount. For example, `"3.99"`.'
129
131
  ).optional()
130
132
  }).describe("Tax applied.").optional(),
131
- total: z.string().describe(
133
+ total: /* @__PURE__ */ z.string().describe(
132
134
  '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
135
  ).optional(),
134
- planPrice: z.string().describe("Plan price as it was at the moment of order creation.").optional(),
135
- currency: z.string().describe(
136
+ planPrice: /* @__PURE__ */ z.string().describe("Plan price as it was at the moment of order creation.").optional(),
137
+ currency: /* @__PURE__ */ z.string().describe(
136
138
  "Currency code. Must be valid ISO 4217 currency code (e.g., USD)."
137
139
  ).optional(),
138
- freeTrialDays: z.number().int().describe(
140
+ freeTrialDays: /* @__PURE__ */ z.number().int().describe(
139
141
  "Free trial period for the order in days. Only available for recurring plans."
140
142
  ).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(
143
+ coupon: /* @__PURE__ */ z.object({
144
+ code: /* @__PURE__ */ z.string().describe("Code of the applied coupon.").min(1).max(20).optional(),
145
+ amount: /* @__PURE__ */ z.string().describe(
144
146
  "Total discount of the coupon, as a monetary amount."
145
147
  ).optional(),
146
- _id: z.string().describe("Coupon ID.").regex(
148
+ _id: /* @__PURE__ */ z.string().describe("Coupon ID.").regex(
147
149
  /^[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
150
  "Must be a valid GUID"
149
151
  ).optional()
@@ -151,45 +153,45 @@ var ManagementGetOrderResponse = /* @__PURE__ */ z.object({
151
153
  "Coupon applied to the order. Empty means no coupon was applied."
152
154
  ).optional()
153
155
  }),
154
- z.xor([
155
- z.object({
156
- subscription: z.never().optional(),
157
- singlePaymentForDuration: z.never().optional(),
158
- singlePaymentUnlimited: z.never().optional()
156
+ /* @__PURE__ */ z.xor([
157
+ /* @__PURE__ */ z.object({
158
+ subscription: /* @__PURE__ */ z.never().optional(),
159
+ singlePaymentForDuration: /* @__PURE__ */ z.never().optional(),
160
+ singlePaymentUnlimited: /* @__PURE__ */ z.never().optional()
159
161
  }),
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(
162
+ /* @__PURE__ */ z.object({
163
+ singlePaymentForDuration: /* @__PURE__ */ z.never().optional(),
164
+ singlePaymentUnlimited: /* @__PURE__ */ z.never().optional(),
165
+ subscription: /* @__PURE__ */ z.object({
166
+ cycleDuration: /* @__PURE__ */ z.object({
167
+ count: /* @__PURE__ */ z.number().int().describe(
166
168
  "Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`."
167
169
  ).min(1).optional().nullable(),
168
- unit: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
170
+ unit: /* @__PURE__ */ z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
169
171
  }).describe(
170
172
  "Number of payment cycles the subscription is valid for.\n`0` for unlimited plans or for plans that are valid until canceled."
171
173
  ).optional(),
172
- cycleCount: z.number().int().describe(
174
+ cycleCount: /* @__PURE__ */ z.number().int().describe(
173
175
  "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
176
  ).min(0).max(2e3).optional().nullable()
175
177
  }).describe("Order has recurring payments.")
176
178
  }),
177
- z.object({
178
- subscription: z.never().optional(),
179
- singlePaymentUnlimited: z.never().optional(),
180
- singlePaymentForDuration: z.object({
181
- count: z.number().int().describe(
179
+ /* @__PURE__ */ z.object({
180
+ subscription: /* @__PURE__ */ z.never().optional(),
181
+ singlePaymentUnlimited: /* @__PURE__ */ z.never().optional(),
182
+ singlePaymentForDuration: /* @__PURE__ */ z.object({
183
+ count: /* @__PURE__ */ z.number().int().describe(
182
184
  "Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`."
183
185
  ).min(1).optional().nullable(),
184
- unit: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
186
+ unit: /* @__PURE__ */ z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
185
187
  }).describe(
186
188
  "One-time payment. Order is valid for a specified duration."
187
189
  )
188
190
  }),
189
- z.object({
190
- subscription: z.never().optional(),
191
- singlePaymentForDuration: z.never().optional(),
192
- singlePaymentUnlimited: z.boolean().describe(
191
+ /* @__PURE__ */ z.object({
192
+ subscription: /* @__PURE__ */ z.never().optional(),
193
+ singlePaymentForDuration: /* @__PURE__ */ z.never().optional(),
194
+ singlePaymentUnlimited: /* @__PURE__ */ z.boolean().describe(
193
195
  "One-time payment. Order is valid until it is canceled."
194
196
  )
195
197
  })
@@ -197,105 +199,105 @@ var ManagementGetOrderResponse = /* @__PURE__ */ z.object({
197
199
  ).describe(
198
200
  "__Deprecated.__ Use `pricing` instead. This property will be removed on September 30, 2022."
199
201
  ).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(
202
+ pricing: /* @__PURE__ */ z.intersection(
203
+ /* @__PURE__ */ z.object({
204
+ prices: /* @__PURE__ */ z.array(
205
+ /* @__PURE__ */ z.object({
206
+ duration: /* @__PURE__ */ z.object({
207
+ cycleFrom: /* @__PURE__ */ z.number().int().describe(
206
208
  "Price starts to apply with this cycle.\n\n`1` is the first payment cycle for all pricing models."
207
209
  ).optional(),
208
- numberOfCycles: z.number().int().describe(
210
+ numberOfCycles: /* @__PURE__ */ z.number().int().describe(
209
211
  "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
212
  ).optional().nullable()
211
213
  }).describe(
212
214
  "Cycle duration to apply `price` for.\n\nUse with all pricing models.\nCan apply the same price to multiple payment cycles."
213
215
  ).optional(),
214
- price: z.object({
215
- subtotal: z.string().describe(
216
+ price: /* @__PURE__ */ z.object({
217
+ subtotal: /* @__PURE__ */ z.string().describe(
216
218
  'Price of the order excluding tax, specified as a monetary amount. For example, `"9.99"`.'
217
219
  ).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(
220
+ coupon: /* @__PURE__ */ z.object({
221
+ code: /* @__PURE__ */ z.string().describe("Code of the applied coupon.").min(1).max(20).optional(),
222
+ amount: /* @__PURE__ */ z.string().describe(
221
223
  "Total discount of the coupon, as a monetary amount."
222
224
  ).optional(),
223
- _id: z.string().describe("Coupon ID.").regex(
225
+ _id: /* @__PURE__ */ z.string().describe("Coupon ID.").regex(
224
226
  /^[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
227
  "Must be a valid GUID"
226
228
  ).optional()
227
229
  }).describe(
228
230
  "Coupon applied to the order, from the Coupons API."
229
231
  ).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(
232
+ discount: /* @__PURE__ */ z.string().describe("Total discount applied to the order.").optional(),
233
+ tax: /* @__PURE__ */ z.object({
234
+ name: /* @__PURE__ */ z.string().describe("Name of the tax. For example, VAT.").optional(),
235
+ includedInPrice: /* @__PURE__ */ z.boolean().describe(
234
236
  "Whether tax is included in the original price. When `false`, tax is added at checkout."
235
237
  ).optional(),
236
- rate: z.string().describe(
238
+ rate: /* @__PURE__ */ z.string().describe(
237
239
  'Tax rate percentage, as a number between 0 and 100. For example, a 7% tax rate is `"7.00"`.'
238
240
  ).optional(),
239
- amount: z.string().describe(
241
+ amount: /* @__PURE__ */ z.string().describe(
240
242
  'Total tax, specified as a monetary amount. For example, `"3.99"`.'
241
243
  ).optional()
242
244
  }).describe(
243
245
  "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
246
  ).optional(),
245
- total: z.string().describe(
247
+ total: /* @__PURE__ */ z.string().describe(
246
248
  '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
249
  ).optional(),
248
- currency: z.string().describe(
250
+ currency: /* @__PURE__ */ z.string().describe(
249
251
  "Three-letter currency code in\n[ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format."
250
252
  ).optional(),
251
- proration: z.string().describe(
253
+ proration: /* @__PURE__ */ z.string().describe(
252
254
  "Price change after billing date was change and price was adjusted. Could be positive and negative values."
253
255
  ).optional()
254
256
  }).describe("Order price.").optional()
255
257
  })
256
258
  ).optional()
257
259
  }),
258
- z.xor([
259
- z.object({
260
- subscription: z.never().optional(),
261
- singlePaymentForDuration: z.never().optional(),
262
- singlePaymentUnlimited: z.never().optional()
260
+ /* @__PURE__ */ z.xor([
261
+ /* @__PURE__ */ z.object({
262
+ subscription: /* @__PURE__ */ z.never().optional(),
263
+ singlePaymentForDuration: /* @__PURE__ */ z.never().optional(),
264
+ singlePaymentUnlimited: /* @__PURE__ */ z.never().optional()
263
265
  }),
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(
266
+ /* @__PURE__ */ z.object({
267
+ singlePaymentForDuration: /* @__PURE__ */ z.never().optional(),
268
+ singlePaymentUnlimited: /* @__PURE__ */ z.never().optional(),
269
+ subscription: /* @__PURE__ */ z.object({
270
+ cycleDuration: /* @__PURE__ */ z.object({
271
+ count: /* @__PURE__ */ z.number().int().describe(
270
272
  "Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`."
271
273
  ).min(1).optional().nullable(),
272
- unit: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
274
+ unit: /* @__PURE__ */ z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
273
275
  }).describe(
274
276
  "Number of payment cycles the subscription is valid for.\n`0` for unlimited plans or for plans that are valid until canceled."
275
277
  ).optional(),
276
- cycleCount: z.number().int().describe(
278
+ cycleCount: /* @__PURE__ */ z.number().int().describe(
277
279
  "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
280
  ).min(0).max(2e3).optional().nullable()
279
281
  }).describe(
280
282
  "Pricing model for an order with recurring payment cycles."
281
283
  )
282
284
  }),
283
- z.object({
284
- subscription: z.never().optional(),
285
- singlePaymentUnlimited: z.never().optional(),
286
- singlePaymentForDuration: z.object({
287
- count: z.number().int().describe(
285
+ /* @__PURE__ */ z.object({
286
+ subscription: /* @__PURE__ */ z.never().optional(),
287
+ singlePaymentUnlimited: /* @__PURE__ */ z.never().optional(),
288
+ singlePaymentForDuration: /* @__PURE__ */ z.object({
289
+ count: /* @__PURE__ */ z.number().int().describe(
288
290
  "Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`."
289
291
  ).min(1).optional().nullable(),
290
- unit: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
292
+ unit: /* @__PURE__ */ z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
291
293
  }).describe(
292
294
  "Pricing model for an order with a one-time payment and the order is valid for a specific amount of time."
293
295
  )
294
296
  }),
295
- z.object({
296
- subscription: z.never().optional(),
297
- singlePaymentForDuration: z.never().optional(),
298
- singlePaymentUnlimited: z.boolean().describe(
297
+ /* @__PURE__ */ z.object({
298
+ subscription: /* @__PURE__ */ z.never().optional(),
299
+ singlePaymentForDuration: /* @__PURE__ */ z.never().optional(),
300
+ singlePaymentUnlimited: /* @__PURE__ */ z.boolean().describe(
299
301
  "Pricing model for an order with a one-time payment and the order is valid until canceled."
300
302
  )
301
303
  })
@@ -303,8 +305,8 @@ var ManagementGetOrderResponse = /* @__PURE__ */ z.object({
303
305
  ).describe(
304
306
  "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
307
  ).optional(),
306
- type: z.enum(["UNDEFINED", "ONLINE", "OFFLINE", "EXTERNAL"]).describe("How the order was processed.").optional(),
307
- status: z.enum([
308
+ type: /* @__PURE__ */ z.enum(["UNDEFINED", "ONLINE", "OFFLINE", "EXTERNAL"]).describe("How the order was processed.").optional(),
309
+ status: /* @__PURE__ */ z.enum([
308
310
  "UNDEFINED",
309
311
  "DRAFT",
310
312
  "PENDING",
@@ -313,12 +315,12 @@ var ManagementGetOrderResponse = /* @__PURE__ */ z.object({
313
315
  "ENDED",
314
316
  "CANCELED"
315
317
  ]).describe("Status of the order.").optional(),
316
- autoRenewCanceled: z.boolean().describe(
318
+ autoRenewCanceled: /* @__PURE__ */ z.boolean().describe(
317
319
  "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
320
  ).optional().nullable(),
319
- cancellation: z.object({
320
- requestedDate: z.date().describe("Date and time the cancellation was requested.").optional().nullable(),
321
- cause: z.enum([
321
+ cancellation: /* @__PURE__ */ z.object({
322
+ requestedDate: /* @__PURE__ */ z.date().describe("Date and time the cancellation was requested.").optional().nullable(),
323
+ cause: /* @__PURE__ */ z.enum([
322
324
  "UNDEFINED",
323
325
  "OWNER_ACTION",
324
326
  "MEMBER_ACTION",
@@ -326,13 +328,13 @@ var ManagementGetOrderResponse = /* @__PURE__ */ z.object({
326
328
  "PAYMENT_SETUP_FAILURE",
327
329
  "UNKNOWN"
328
330
  ]).describe("Reason for the cancellation.").optional(),
329
- effectiveAt: z.enum(["UNDEFINED", "IMMEDIATELY", "NEXT_PAYMENT_DATE"]).describe(
331
+ effectiveAt: /* @__PURE__ */ z.enum(["UNDEFINED", "IMMEDIATELY", "NEXT_PAYMENT_DATE"]).describe(
330
332
  "When the cancellation takes effect. Set when cancelling the order."
331
333
  ).optional()
332
334
  }).describe(
333
335
  "Details about the cancellation of an order.\n\nOnly present if the status is `CANCELED`."
334
336
  ).optional(),
335
- lastPaymentStatus: z.enum([
337
+ lastPaymentStatus: /* @__PURE__ */ z.enum([
336
338
  "UNDEFINED",
337
339
  "PAID",
338
340
  "REFUNDED",
@@ -343,67 +345,67 @@ var ManagementGetOrderResponse = /* @__PURE__ */ z.object({
343
345
  ]).describe(
344
346
  "Status of the last payment for the order.\nUpdated automatically for online orders. Updated manually by the Wix user for offline orders."
345
347
  ).optional(),
346
- startDate: z.date().describe("Start date and time for the ordered plan.").optional().nullable(),
347
- endDate: z.date().describe(
348
+ startDate: /* @__PURE__ */ z.date().describe("Start date and time for the ordered plan.").optional().nullable(),
349
+ endDate: /* @__PURE__ */ z.date().describe(
348
350
  "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
351
  ).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(
352
+ pausePeriods: /* @__PURE__ */ z.array(
353
+ /* @__PURE__ */ z.object({
354
+ status: /* @__PURE__ */ z.enum(["UNDEFINED", "ACTIVE", "ENDED"]).describe("Status of the pause period.").optional(),
355
+ pauseDate: /* @__PURE__ */ z.date().describe("Start date and time of the pause period.").optional().nullable(),
356
+ resumeDate: /* @__PURE__ */ z.date().describe(
355
357
  "End date and time of the pause period.\n\nOmitted while the pause period remains `ACTIVE`."
356
358
  ).optional().nullable()
357
359
  })
358
360
  ).optional(),
359
- freeTrialDays: z.number().int().describe(
361
+ freeTrialDays: /* @__PURE__ */ z.number().int().describe(
360
362
  "Free trial period for the order, in days.\n\nOnly available for recurring plans."
361
363
  ).min(1).max(999).optional().nullable(),
362
- earliestEndDate: z.date().describe(
364
+ earliestEndDate: /* @__PURE__ */ z.date().describe(
363
365
  "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
366
  ).optional().nullable(),
365
- currentCycle: z.object({
366
- index: z.number().int().describe(
367
+ currentCycle: /* @__PURE__ */ z.object({
368
+ index: /* @__PURE__ */ z.number().int().describe(
367
369
  "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
370
  ).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()
371
+ startedDate: /* @__PURE__ */ z.date().describe("Start date and time for the current payment cycle.").optional().nullable(),
372
+ endedDate: /* @__PURE__ */ z.date().describe("End date and time for the current payment cycle.").optional().nullable()
371
373
  }).describe(
372
374
  "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
375
  ).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(
376
+ planName: /* @__PURE__ */ z.string().describe("Plan name at the time of purchase.").optional(),
377
+ planDescription: /* @__PURE__ */ z.string().describe("Plan description at the time of purchase").optional(),
378
+ planPrice: /* @__PURE__ */ z.string().describe("Plan price as it was at the moment of order creation.").optional(),
379
+ _createdDate: /* @__PURE__ */ z.date().describe("Date and time the order was created.").optional().nullable(),
380
+ _updatedDate: /* @__PURE__ */ z.date().describe("Date and time the order was updated.").optional().nullable(),
381
+ formData: /* @__PURE__ */ z.object({
382
+ formId: /* @__PURE__ */ z.string().describe(
381
383
  "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
384
  ).regex(
383
385
  /^[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
386
  "Must be a valid GUID"
385
387
  ).optional().nullable(),
386
- submissionId: z.string().describe(
388
+ submissionId: /* @__PURE__ */ z.string().describe(
387
389
  "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
390
  ).regex(
389
391
  /^[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
392
  "Must be a valid GUID"
391
393
  ).optional().nullable(),
392
- submissionData: z.record(z.string(), z.any()).describe("Data submitted to the plan's order form at checkout.").optional()
394
+ submissionData: /* @__PURE__ */ z.record(/* @__PURE__ */ z.string(), /* @__PURE__ */ z.any()).describe("Data submitted to the plan's order form at checkout.").optional()
393
395
  }).describe(
394
396
  "Information about the form submitted during the plan's checkout."
395
397
  ).optional()
396
398
  }).describe("Order.").optional()
397
399
  });
398
400
  var ManagementListOrdersRequest = /* @__PURE__ */ z.object({
399
- options: z.object({
400
- buyerIds: z.array(z.string()).optional(),
401
- planIds: z.array(z.string()).optional(),
402
- autoRenewCanceled: z.boolean().describe(
401
+ options: /* @__PURE__ */ z.object({
402
+ buyerIds: /* @__PURE__ */ z.array(/* @__PURE__ */ z.string()).optional(),
403
+ planIds: /* @__PURE__ */ z.array(/* @__PURE__ */ z.string()).optional(),
404
+ autoRenewCanceled: /* @__PURE__ */ z.boolean().describe(
403
405
  "Filter by whether or not the auto-renewal of recurring orders was canceled."
404
406
  ).optional().nullable(),
405
- orderStatuses: z.array(
406
- z.enum([
407
+ orderStatuses: /* @__PURE__ */ z.array(
408
+ /* @__PURE__ */ z.enum([
407
409
  "UNDEFINED",
408
410
  "DRAFT",
409
411
  "PENDING",
@@ -413,8 +415,8 @@ var ManagementListOrdersRequest = /* @__PURE__ */ z.object({
413
415
  "CANCELED"
414
416
  ])
415
417
  ).optional(),
416
- paymentStatuses: z.array(
417
- z.enum([
418
+ paymentStatuses: /* @__PURE__ */ z.array(
419
+ /* @__PURE__ */ z.enum([
418
420
  "UNDEFINED",
419
421
  "PAID",
420
422
  "REFUNDED",
@@ -424,58 +426,58 @@ var ManagementListOrdersRequest = /* @__PURE__ */ z.object({
424
426
  "NOT_APPLICABLE"
425
427
  ])
426
428
  ).optional(),
427
- limit: z.number().int().describe(
429
+ limit: /* @__PURE__ */ z.number().int().describe(
428
430
  "Number of orders to return. See Sorting and Paging for more information.\n\nMax: `50`"
429
431
  ).min(1).max(50).optional().nullable(),
430
- offset: z.number().int().describe("Number of orders to skip in the current sort order.").min(0).optional().nullable(),
431
- sorting: z.object({
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()
432
+ offset: /* @__PURE__ */ z.number().int().describe("Number of orders to skip in the current sort order.").min(0).optional().nullable(),
433
+ sorting: /* @__PURE__ */ z.object({
434
+ fieldName: /* @__PURE__ */ z.string().describe("Name of the field to sort by.").max(512).optional(),
435
+ order: /* @__PURE__ */ z.enum(["ASC", "DESC"]).optional(),
436
+ origin: /* @__PURE__ */ z.object({
437
+ latitude: /* @__PURE__ */ z.number().describe("Address latitude.").optional().nullable(),
438
+ longitude: /* @__PURE__ */ z.number().describe("Address longitude.").optional().nullable()
437
439
  }).describe(
438
440
  "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
441
  ).optional()
440
442
  }).describe(
441
443
  "Sort order.\n\nUse `ASC` for ascending order or `DESC` for descending order.\n\nDefault: `DESC`."
442
444
  ).optional(),
443
- fieldSet: z.enum(["UNKNOWN_SET", "BASIC", "FULL"]).optional()
445
+ fieldSet: /* @__PURE__ */ z.enum(["UNKNOWN_SET", "BASIC", "FULL"]).optional()
444
446
  }).describe("Filtering, sorting, and pagination options. ").optional()
445
447
  });
446
448
  var ManagementListOrdersResponse = /* @__PURE__ */ z.object({
447
- orders: z.array(
448
- z.object({
449
- _id: z.string().describe("Order ID.").regex(
449
+ orders: /* @__PURE__ */ z.array(
450
+ /* @__PURE__ */ z.object({
451
+ _id: /* @__PURE__ */ z.string().describe("Order ID.").regex(
450
452
  /^[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
453
  "Must be a valid GUID"
452
454
  ).optional(),
453
- planId: z.string().describe(
455
+ planId: /* @__PURE__ */ z.string().describe(
454
456
  "ID of the plan purchased with the order, from the Plans API."
455
457
  ).regex(
456
458
  /^[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
459
  "Must be a valid GUID"
458
460
  ).optional(),
459
- subscriptionId: z.string().describe(
461
+ subscriptionId: /* @__PURE__ */ z.string().describe(
460
462
  "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
463
  ).regex(
462
464
  /^[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
465
  "Must be a valid GUID"
464
466
  ).optional(),
465
- wixPayOrderId: z.string().describe(
467
+ wixPayOrderId: /* @__PURE__ */ z.string().describe(
466
468
  "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."
467
469
  ).regex(
468
470
  /^[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
471
  "Must be a valid GUID"
470
472
  ).optional().nullable(),
471
- buyer: z.object({
472
- memberId: z.string().describe(
473
+ buyer: /* @__PURE__ */ z.object({
474
+ memberId: /* @__PURE__ */ z.string().describe(
473
475
  "Member ID for a Wix site member, from the Members API."
474
476
  ).regex(
475
477
  /^[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}$/,
476
478
  "Must be a valid GUID"
477
479
  ).optional(),
478
- contactId: z.string().describe(
480
+ contactId: /* @__PURE__ */ z.string().describe(
479
481
  "Contact ID for a Wix site contact, from the Contacts API."
480
482
  ).regex(
481
483
  /^[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}$/,
@@ -484,42 +486,42 @@ var ManagementListOrdersResponse = /* @__PURE__ */ z.object({
484
486
  }).describe(
485
487
  "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
488
  ).optional(),
487
- priceDetails: z.intersection(
488
- z.object({
489
- subtotal: z.string().describe(
489
+ priceDetails: /* @__PURE__ */ z.intersection(
490
+ /* @__PURE__ */ z.object({
491
+ subtotal: /* @__PURE__ */ z.string().describe(
490
492
  'Price of the order excluding tax, specified as a monetary amount. for example, `"9.99"`.'
491
493
  ).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(
494
+ discount: /* @__PURE__ */ z.string().describe("Total discount applied.").optional(),
495
+ tax: /* @__PURE__ */ z.object({
496
+ name: /* @__PURE__ */ z.string().describe("Name of the tax. For example, VAT.").optional(),
497
+ includedInPrice: /* @__PURE__ */ z.boolean().describe(
496
498
  "Whether tax is included in the original price. When `false`, tax is added at checkout."
497
499
  ).optional(),
498
- rate: z.string().describe(
500
+ rate: /* @__PURE__ */ z.string().describe(
499
501
  'Tax rate percentage, as a number between 0 and 100. For example, a 7% tax rate is `"7.00"`.'
500
502
  ).optional(),
501
- amount: z.string().describe(
503
+ amount: /* @__PURE__ */ z.string().describe(
502
504
  'Total tax, specified as a monetary amount. For example, `"3.99"`.'
503
505
  ).optional()
504
506
  }).describe("Tax applied.").optional(),
505
- total: z.string().describe(
507
+ total: /* @__PURE__ */ z.string().describe(
506
508
  '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`.'
507
509
  ).optional(),
508
- planPrice: z.string().describe(
510
+ planPrice: /* @__PURE__ */ z.string().describe(
509
511
  "Plan price as it was at the moment of order creation."
510
512
  ).optional(),
511
- currency: z.string().describe(
513
+ currency: /* @__PURE__ */ z.string().describe(
512
514
  "Currency code. Must be valid ISO 4217 currency code (e.g., USD)."
513
515
  ).optional(),
514
- freeTrialDays: z.number().int().describe(
516
+ freeTrialDays: /* @__PURE__ */ z.number().int().describe(
515
517
  "Free trial period for the order in days. Only available for recurring plans."
516
518
  ).min(1).max(999).optional().nullable(),
517
- coupon: z.object({
518
- code: z.string().describe("Code of the applied coupon.").min(1).max(20).optional(),
519
- amount: z.string().describe(
519
+ coupon: /* @__PURE__ */ z.object({
520
+ code: /* @__PURE__ */ z.string().describe("Code of the applied coupon.").min(1).max(20).optional(),
521
+ amount: /* @__PURE__ */ z.string().describe(
520
522
  "Total discount of the coupon, as a monetary amount."
521
523
  ).optional(),
522
- _id: z.string().describe("Coupon ID.").regex(
524
+ _id: /* @__PURE__ */ z.string().describe("Coupon ID.").regex(
523
525
  /^[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
526
  "Must be a valid GUID"
525
527
  ).optional()
@@ -527,45 +529,45 @@ var ManagementListOrdersResponse = /* @__PURE__ */ z.object({
527
529
  "Coupon applied to the order. Empty means no coupon was applied."
528
530
  ).optional()
529
531
  }),
530
- z.xor([
531
- z.object({
532
- subscription: z.never().optional(),
533
- singlePaymentForDuration: z.never().optional(),
534
- singlePaymentUnlimited: z.never().optional()
532
+ /* @__PURE__ */ z.xor([
533
+ /* @__PURE__ */ z.object({
534
+ subscription: /* @__PURE__ */ z.never().optional(),
535
+ singlePaymentForDuration: /* @__PURE__ */ z.never().optional(),
536
+ singlePaymentUnlimited: /* @__PURE__ */ z.never().optional()
535
537
  }),
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(
538
+ /* @__PURE__ */ z.object({
539
+ singlePaymentForDuration: /* @__PURE__ */ z.never().optional(),
540
+ singlePaymentUnlimited: /* @__PURE__ */ z.never().optional(),
541
+ subscription: /* @__PURE__ */ z.object({
542
+ cycleDuration: /* @__PURE__ */ z.object({
543
+ count: /* @__PURE__ */ z.number().int().describe(
542
544
  "Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`."
543
545
  ).min(1).optional().nullable(),
544
- unit: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
546
+ unit: /* @__PURE__ */ z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
545
547
  }).describe(
546
548
  "Number of payment cycles the subscription is valid for.\n`0` for unlimited plans or for plans that are valid until canceled."
547
549
  ).optional(),
548
- cycleCount: z.number().int().describe(
550
+ cycleCount: /* @__PURE__ */ z.number().int().describe(
549
551
  "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
552
  ).min(0).max(2e3).optional().nullable()
551
553
  }).describe("Order has recurring payments.")
552
554
  }),
553
- z.object({
554
- subscription: z.never().optional(),
555
- singlePaymentUnlimited: z.never().optional(),
556
- singlePaymentForDuration: z.object({
557
- count: z.number().int().describe(
555
+ /* @__PURE__ */ z.object({
556
+ subscription: /* @__PURE__ */ z.never().optional(),
557
+ singlePaymentUnlimited: /* @__PURE__ */ z.never().optional(),
558
+ singlePaymentForDuration: /* @__PURE__ */ z.object({
559
+ count: /* @__PURE__ */ z.number().int().describe(
558
560
  "Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`."
559
561
  ).min(1).optional().nullable(),
560
- unit: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
562
+ unit: /* @__PURE__ */ z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
561
563
  }).describe(
562
564
  "One-time payment. Order is valid for a specified duration."
563
565
  )
564
566
  }),
565
- z.object({
566
- subscription: z.never().optional(),
567
- singlePaymentForDuration: z.never().optional(),
568
- singlePaymentUnlimited: z.boolean().describe(
567
+ /* @__PURE__ */ z.object({
568
+ subscription: /* @__PURE__ */ z.never().optional(),
569
+ singlePaymentForDuration: /* @__PURE__ */ z.never().optional(),
570
+ singlePaymentUnlimited: /* @__PURE__ */ z.boolean().describe(
569
571
  "One-time payment. Order is valid until it is canceled."
570
572
  )
571
573
  })
@@ -573,105 +575,105 @@ var ManagementListOrdersResponse = /* @__PURE__ */ z.object({
573
575
  ).describe(
574
576
  "__Deprecated.__ Use `pricing` instead. This property will be removed on September 30, 2022."
575
577
  ).optional(),
576
- pricing: z.intersection(
577
- z.object({
578
- prices: z.array(
579
- z.object({
580
- duration: z.object({
581
- cycleFrom: z.number().int().describe(
578
+ pricing: /* @__PURE__ */ z.intersection(
579
+ /* @__PURE__ */ z.object({
580
+ prices: /* @__PURE__ */ z.array(
581
+ /* @__PURE__ */ z.object({
582
+ duration: /* @__PURE__ */ z.object({
583
+ cycleFrom: /* @__PURE__ */ z.number().int().describe(
582
584
  "Price starts to apply with this cycle.\n\n`1` is the first payment cycle for all pricing models."
583
585
  ).optional(),
584
- numberOfCycles: z.number().int().describe(
586
+ numberOfCycles: /* @__PURE__ */ z.number().int().describe(
585
587
  "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`."
586
588
  ).optional().nullable()
587
589
  }).describe(
588
590
  "Cycle duration to apply `price` for.\n\nUse with all pricing models.\nCan apply the same price to multiple payment cycles."
589
591
  ).optional(),
590
- price: z.object({
591
- subtotal: z.string().describe(
592
+ price: /* @__PURE__ */ z.object({
593
+ subtotal: /* @__PURE__ */ z.string().describe(
592
594
  'Price of the order excluding tax, specified as a monetary amount. For example, `"9.99"`.'
593
595
  ).optional(),
594
- coupon: z.object({
595
- code: z.string().describe("Code of the applied coupon.").min(1).max(20).optional(),
596
- amount: z.string().describe(
596
+ coupon: /* @__PURE__ */ z.object({
597
+ code: /* @__PURE__ */ z.string().describe("Code of the applied coupon.").min(1).max(20).optional(),
598
+ amount: /* @__PURE__ */ z.string().describe(
597
599
  "Total discount of the coupon, as a monetary amount."
598
600
  ).optional(),
599
- _id: z.string().describe("Coupon ID.").regex(
601
+ _id: /* @__PURE__ */ z.string().describe("Coupon ID.").regex(
600
602
  /^[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
603
  "Must be a valid GUID"
602
604
  ).optional()
603
605
  }).describe(
604
606
  "Coupon applied to the order, from the Coupons API."
605
607
  ).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(
608
+ discount: /* @__PURE__ */ z.string().describe("Total discount applied to the order.").optional(),
609
+ tax: /* @__PURE__ */ z.object({
610
+ name: /* @__PURE__ */ z.string().describe("Name of the tax. For example, VAT.").optional(),
611
+ includedInPrice: /* @__PURE__ */ z.boolean().describe(
610
612
  "Whether tax is included in the original price. When `false`, tax is added at checkout."
611
613
  ).optional(),
612
- rate: z.string().describe(
614
+ rate: /* @__PURE__ */ z.string().describe(
613
615
  'Tax rate percentage, as a number between 0 and 100. For example, a 7% tax rate is `"7.00"`.'
614
616
  ).optional(),
615
- amount: z.string().describe(
617
+ amount: /* @__PURE__ */ z.string().describe(
616
618
  'Total tax, specified as a monetary amount. For example, `"3.99"`.'
617
619
  ).optional()
618
620
  }).describe(
619
621
  "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
622
  ).optional(),
621
- total: z.string().describe(
623
+ total: /* @__PURE__ */ z.string().describe(
622
624
  '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`.'
623
625
  ).optional(),
624
- currency: z.string().describe(
626
+ currency: /* @__PURE__ */ z.string().describe(
625
627
  "Three-letter currency code in\n[ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format."
626
628
  ).optional(),
627
- proration: z.string().describe(
629
+ proration: /* @__PURE__ */ z.string().describe(
628
630
  "Price change after billing date was change and price was adjusted. Could be positive and negative values."
629
631
  ).optional()
630
632
  }).describe("Order price.").optional()
631
633
  })
632
634
  ).optional()
633
635
  }),
634
- z.xor([
635
- z.object({
636
- subscription: z.never().optional(),
637
- singlePaymentForDuration: z.never().optional(),
638
- singlePaymentUnlimited: z.never().optional()
636
+ /* @__PURE__ */ z.xor([
637
+ /* @__PURE__ */ z.object({
638
+ subscription: /* @__PURE__ */ z.never().optional(),
639
+ singlePaymentForDuration: /* @__PURE__ */ z.never().optional(),
640
+ singlePaymentUnlimited: /* @__PURE__ */ z.never().optional()
639
641
  }),
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(
642
+ /* @__PURE__ */ z.object({
643
+ singlePaymentForDuration: /* @__PURE__ */ z.never().optional(),
644
+ singlePaymentUnlimited: /* @__PURE__ */ z.never().optional(),
645
+ subscription: /* @__PURE__ */ z.object({
646
+ cycleDuration: /* @__PURE__ */ z.object({
647
+ count: /* @__PURE__ */ z.number().int().describe(
646
648
  "Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`."
647
649
  ).min(1).optional().nullable(),
648
- unit: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
650
+ unit: /* @__PURE__ */ z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
649
651
  }).describe(
650
652
  "Number of payment cycles the subscription is valid for.\n`0` for unlimited plans or for plans that are valid until canceled."
651
653
  ).optional(),
652
- cycleCount: z.number().int().describe(
654
+ cycleCount: /* @__PURE__ */ z.number().int().describe(
653
655
  "Length of a payment cycle. For example, 1 month to have monthly payments.\nMultiply `cycleDuration`'s `count` by `cycleCount` to get the subscription duration.\nCurrently, only a value of `1` is supported."
654
656
  ).min(0).max(2e3).optional().nullable()
655
657
  }).describe(
656
658
  "Pricing model for an order with recurring payment cycles."
657
659
  )
658
660
  }),
659
- z.object({
660
- subscription: z.never().optional(),
661
- singlePaymentUnlimited: z.never().optional(),
662
- singlePaymentForDuration: z.object({
663
- count: z.number().int().describe(
661
+ /* @__PURE__ */ z.object({
662
+ subscription: /* @__PURE__ */ z.never().optional(),
663
+ singlePaymentUnlimited: /* @__PURE__ */ z.never().optional(),
664
+ singlePaymentForDuration: /* @__PURE__ */ z.object({
665
+ count: /* @__PURE__ */ z.number().int().describe(
664
666
  "Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`."
665
667
  ).min(1).optional().nullable(),
666
- unit: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
668
+ unit: /* @__PURE__ */ z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
667
669
  }).describe(
668
670
  "Pricing model for an order with a one-time payment and the order is valid for a specific amount of time."
669
671
  )
670
672
  }),
671
- z.object({
672
- subscription: z.never().optional(),
673
- singlePaymentForDuration: z.never().optional(),
674
- singlePaymentUnlimited: z.boolean().describe(
673
+ /* @__PURE__ */ z.object({
674
+ subscription: /* @__PURE__ */ z.never().optional(),
675
+ singlePaymentForDuration: /* @__PURE__ */ z.never().optional(),
676
+ singlePaymentUnlimited: /* @__PURE__ */ z.boolean().describe(
675
677
  "Pricing model for an order with a one-time payment and the order is valid until canceled."
676
678
  )
677
679
  })
@@ -679,8 +681,8 @@ var ManagementListOrdersResponse = /* @__PURE__ */ z.object({
679
681
  ).describe(
680
682
  "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)."
681
683
  ).optional(),
682
- type: z.enum(["UNDEFINED", "ONLINE", "OFFLINE", "EXTERNAL"]).describe("How the order was processed.").optional(),
683
- status: z.enum([
684
+ type: /* @__PURE__ */ z.enum(["UNDEFINED", "ONLINE", "OFFLINE", "EXTERNAL"]).describe("How the order was processed.").optional(),
685
+ status: /* @__PURE__ */ z.enum([
684
686
  "UNDEFINED",
685
687
  "DRAFT",
686
688
  "PENDING",
@@ -689,12 +691,12 @@ var ManagementListOrdersResponse = /* @__PURE__ */ z.object({
689
691
  "ENDED",
690
692
  "CANCELED"
691
693
  ]).describe("Status of the order.").optional(),
692
- autoRenewCanceled: z.boolean().describe(
694
+ autoRenewCanceled: /* @__PURE__ */ z.boolean().describe(
693
695
  "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."
694
696
  ).optional().nullable(),
695
- cancellation: z.object({
696
- requestedDate: z.date().describe("Date and time the cancellation was requested.").optional().nullable(),
697
- cause: z.enum([
697
+ cancellation: /* @__PURE__ */ z.object({
698
+ requestedDate: /* @__PURE__ */ z.date().describe("Date and time the cancellation was requested.").optional().nullable(),
699
+ cause: /* @__PURE__ */ z.enum([
698
700
  "UNDEFINED",
699
701
  "OWNER_ACTION",
700
702
  "MEMBER_ACTION",
@@ -702,13 +704,13 @@ var ManagementListOrdersResponse = /* @__PURE__ */ z.object({
702
704
  "PAYMENT_SETUP_FAILURE",
703
705
  "UNKNOWN"
704
706
  ]).describe("Reason for the cancellation.").optional(),
705
- effectiveAt: z.enum(["UNDEFINED", "IMMEDIATELY", "NEXT_PAYMENT_DATE"]).describe(
707
+ effectiveAt: /* @__PURE__ */ z.enum(["UNDEFINED", "IMMEDIATELY", "NEXT_PAYMENT_DATE"]).describe(
706
708
  "When the cancellation takes effect. Set when cancelling the order."
707
709
  ).optional()
708
710
  }).describe(
709
711
  "Details about the cancellation of an order.\n\nOnly present if the status is `CANCELED`."
710
712
  ).optional(),
711
- lastPaymentStatus: z.enum([
713
+ lastPaymentStatus: /* @__PURE__ */ z.enum([
712
714
  "UNDEFINED",
713
715
  "PAID",
714
716
  "REFUNDED",
@@ -719,72 +721,72 @@ var ManagementListOrdersResponse = /* @__PURE__ */ z.object({
719
721
  ]).describe(
720
722
  "Status of the last payment for the order.\nUpdated automatically for online orders. Updated manually by the Wix user for offline orders."
721
723
  ).optional(),
722
- startDate: z.date().describe("Start date and time for the ordered plan.").optional().nullable(),
723
- endDate: z.date().describe(
724
+ startDate: /* @__PURE__ */ z.date().describe("Start date and time for the ordered plan.").optional().nullable(),
725
+ endDate: /* @__PURE__ */ z.date().describe(
724
726
  "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
727
  ).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(
728
+ pausePeriods: /* @__PURE__ */ z.array(
729
+ /* @__PURE__ */ z.object({
730
+ status: /* @__PURE__ */ z.enum(["UNDEFINED", "ACTIVE", "ENDED"]).describe("Status of the pause period.").optional(),
731
+ pauseDate: /* @__PURE__ */ z.date().describe("Start date and time of the pause period.").optional().nullable(),
732
+ resumeDate: /* @__PURE__ */ z.date().describe(
731
733
  "End date and time of the pause period.\n\nOmitted while the pause period remains `ACTIVE`."
732
734
  ).optional().nullable()
733
735
  })
734
736
  ).optional(),
735
- freeTrialDays: z.number().int().describe(
737
+ freeTrialDays: /* @__PURE__ */ z.number().int().describe(
736
738
  "Free trial period for the order, in days.\n\nOnly available for recurring plans."
737
739
  ).min(1).max(999).optional().nullable(),
738
- earliestEndDate: z.date().describe(
740
+ earliestEndDate: /* @__PURE__ */ z.date().describe(
739
741
  "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."
740
742
  ).optional().nullable(),
741
- currentCycle: z.object({
742
- index: z.number().int().describe(
743
+ currentCycle: /* @__PURE__ */ z.object({
744
+ index: /* @__PURE__ */ z.number().int().describe(
743
745
  "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`."
744
746
  ).min(0).optional(),
745
- startedDate: z.date().describe("Start date and time for the current payment cycle.").optional().nullable(),
746
- endedDate: z.date().describe("End date and time for the current payment cycle.").optional().nullable()
747
+ startedDate: /* @__PURE__ */ z.date().describe("Start date and time for the current payment cycle.").optional().nullable(),
748
+ endedDate: /* @__PURE__ */ z.date().describe("End date and time for the current payment cycle.").optional().nullable()
747
749
  }).describe(
748
750
  "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."
749
751
  ).optional(),
750
- planName: z.string().describe("Plan name at the time of purchase.").optional(),
751
- planDescription: z.string().describe("Plan description at the time of purchase").optional(),
752
- planPrice: z.string().describe("Plan price as it was at the moment of order creation.").optional(),
753
- _createdDate: z.date().describe("Date and time the order was created.").optional().nullable(),
754
- _updatedDate: z.date().describe("Date and time the order was updated.").optional().nullable(),
755
- formData: z.object({
756
- formId: z.string().describe(
752
+ planName: /* @__PURE__ */ z.string().describe("Plan name at the time of purchase.").optional(),
753
+ planDescription: /* @__PURE__ */ z.string().describe("Plan description at the time of purchase").optional(),
754
+ planPrice: /* @__PURE__ */ z.string().describe("Plan price as it was at the moment of order creation.").optional(),
755
+ _createdDate: /* @__PURE__ */ z.date().describe("Date and time the order was created.").optional().nullable(),
756
+ _updatedDate: /* @__PURE__ */ z.date().describe("Date and time the order was updated.").optional().nullable(),
757
+ formData: /* @__PURE__ */ z.object({
758
+ formId: /* @__PURE__ */ z.string().describe(
757
759
  "ID of the [order form](https://dev.wix.com/docs/rest/api-reference/wix-forms/form-submissions/introduction) associated with the plan at checkout."
758
760
  ).regex(
759
761
  /^[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}$/,
760
762
  "Must be a valid GUID"
761
763
  ).optional().nullable(),
762
- submissionId: z.string().describe(
764
+ submissionId: /* @__PURE__ */ z.string().describe(
763
765
  "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
766
  ).regex(
765
767
  /^[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
768
  "Must be a valid GUID"
767
769
  ).optional().nullable(),
768
- submissionData: z.record(z.string(), z.any()).describe("Data submitted to the plan's order form at checkout.").optional()
770
+ submissionData: /* @__PURE__ */ z.record(/* @__PURE__ */ z.string(), /* @__PURE__ */ z.any()).describe("Data submitted to the plan's order form at checkout.").optional()
769
771
  }).describe(
770
772
  "Information about the form submitted during the plan's checkout."
771
773
  ).optional()
772
774
  })
773
775
  ).optional(),
774
- pagingMetadata: z.object({
775
- count: z.number().int().describe("Number of items returned in the response.").optional().nullable(),
776
- offset: z.number().int().describe("Offset that was requested.").optional().nullable(),
777
- total: z.number().int().describe(
776
+ pagingMetadata: /* @__PURE__ */ z.object({
777
+ count: /* @__PURE__ */ z.number().int().describe("Number of items returned in the response.").optional().nullable(),
778
+ offset: /* @__PURE__ */ z.number().int().describe("Offset that was requested.").optional().nullable(),
779
+ total: /* @__PURE__ */ z.number().int().describe(
778
780
  "Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set."
779
781
  ).optional().nullable(),
780
- tooManyToCount: z.boolean().describe(
782
+ tooManyToCount: /* @__PURE__ */ z.boolean().describe(
781
783
  "Flag that indicates the server failed to calculate the `total` field."
782
784
  ).optional().nullable(),
783
- cursors: z.object({
784
- next: z.string().describe(
785
+ cursors: /* @__PURE__ */ z.object({
786
+ next: /* @__PURE__ */ z.string().describe(
785
787
  "Cursor string pointing to the next page in the list of results."
786
788
  ).max(16e3).optional().nullable(),
787
- prev: z.string().describe(
789
+ prev: /* @__PURE__ */ z.string().describe(
788
790
  "Cursor pointing to the previous page in the list of results."
789
791
  ).max(16e3).optional().nullable()
790
792
  }).describe(
@@ -795,97 +797,101 @@ var ManagementListOrdersResponse = /* @__PURE__ */ z.object({
795
797
  ).optional()
796
798
  });
797
799
  var PostponeEndDateRequest = /* @__PURE__ */ z.object({
798
- _id: z.string().describe("Order ID.").regex(
800
+ _id: /* @__PURE__ */ z.string().describe("Order ID.").regex(
799
801
  /^[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
802
  "Must be a valid GUID"
801
803
  ),
802
- endDate: z.date().describe(
804
+ endDate: /* @__PURE__ */ z.date().describe(
803
805
  "New end date and time.\n\nMust be later than the current end date and time."
804
806
  )
805
807
  });
806
808
  var PostponeEndDateResponse = /* @__PURE__ */ z.object({});
807
809
  var CancelOrderRequest = /* @__PURE__ */ z.object({
808
- _id: z.string().describe("Order ID.").regex(
810
+ _id: /* @__PURE__ */ z.string().describe("Order ID.").regex(
809
811
  /^[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
812
  "Must be a valid GUID"
811
813
  ),
812
- effectiveAt: z.enum(["UNDEFINED", "IMMEDIATELY", "NEXT_PAYMENT_DATE"])
814
+ effectiveAt: /* @__PURE__ */ z.enum([
815
+ "UNDEFINED",
816
+ "IMMEDIATELY",
817
+ "NEXT_PAYMENT_DATE"
818
+ ])
813
819
  });
814
820
  var CancelOrderResponse = /* @__PURE__ */ z.object({});
815
821
  var MarkAsPaidRequest = /* @__PURE__ */ z.object({
816
- _id: z.string().describe("Order ID.").regex(
822
+ _id: /* @__PURE__ */ z.string().describe("Order ID.").regex(
817
823
  /^[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
824
  "Must be a valid GUID"
819
825
  )
820
826
  });
821
827
  var MarkAsPaidResponse = /* @__PURE__ */ z.object({});
822
828
  var PauseOrderRequest = /* @__PURE__ */ z.object({
823
- _id: z.string().describe("Order ID.").regex(
829
+ _id: /* @__PURE__ */ z.string().describe("Order ID.").regex(
824
830
  /^[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
831
  "Must be a valid GUID"
826
832
  )
827
833
  });
828
834
  var PauseOrderResponse = /* @__PURE__ */ z.object({});
829
835
  var ResumeOrderRequest = /* @__PURE__ */ z.object({
830
- _id: z.string().describe("Order ID.").regex(
836
+ _id: /* @__PURE__ */ z.string().describe("Order ID.").regex(
831
837
  /^[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
838
  "Must be a valid GUID"
833
839
  )
834
840
  });
835
841
  var ResumeOrderResponse = /* @__PURE__ */ z.object({});
836
842
  var CreateOnlineOrderRequest = /* @__PURE__ */ z.object({
837
- planId: z.string().describe("Plan ID.").regex(
843
+ planId: /* @__PURE__ */ z.string().describe("Plan ID.").regex(
838
844
  /^[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
845
  "Must be a valid GUID"
840
846
  ),
841
- options: z.object({
842
- startDate: z.date().describe(
847
+ options: /* @__PURE__ */ z.object({
848
+ startDate: /* @__PURE__ */ z.date().describe(
843
849
  "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."
844
850
  ).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(
851
+ couponCode: /* @__PURE__ */ z.string().describe("Coupon code to apply.").min(1).max(20).optional().nullable(),
852
+ onBehalf: /* @__PURE__ */ z.object({
853
+ memberId: /* @__PURE__ */ z.string().describe("Member ID.").regex(
848
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}$/,
849
855
  "Must be a valid GUID"
850
856
  ),
851
- orderMethod: z.enum(["UNKNOWN", "MOTO", "POS"]).optional()
857
+ orderMethod: /* @__PURE__ */ z.enum(["UNKNOWN", "MOTO", "POS"]).optional()
852
858
  }).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(
859
+ submissionId: /* @__PURE__ */ z.string().describe("Submission ID of the form submitted with this order.").regex(
854
860
  /^[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
861
  "Must be a valid GUID"
856
862
  ).optional().nullable()
857
863
  }).optional()
858
864
  });
859
865
  var CreateOnlineOrderResponse = /* @__PURE__ */ z.object({
860
- order: z.object({
861
- _id: z.string().describe("Order ID.").regex(
866
+ order: /* @__PURE__ */ z.object({
867
+ _id: /* @__PURE__ */ z.string().describe("Order ID.").regex(
862
868
  /^[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
869
  "Must be a valid GUID"
864
870
  ).optional(),
865
- planId: z.string().describe(
871
+ planId: /* @__PURE__ */ z.string().describe(
866
872
  "ID of the plan purchased with the order, from the Plans API."
867
873
  ).regex(
868
874
  /^[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
875
  "Must be a valid GUID"
870
876
  ).optional(),
871
- subscriptionId: z.string().describe(
877
+ subscriptionId: /* @__PURE__ */ z.string().describe(
872
878
  "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
879
  ).regex(
874
880
  /^[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
881
  "Must be a valid GUID"
876
882
  ).optional(),
877
- wixPayOrderId: z.string().describe(
883
+ wixPayOrderId: /* @__PURE__ */ z.string().describe(
878
884
  "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
885
  ).regex(
880
886
  /^[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
887
  "Must be a valid GUID"
882
888
  ).optional().nullable(),
883
- buyer: z.object({
884
- memberId: z.string().describe("Member ID for a Wix site member, from the Members API.").regex(
889
+ buyer: /* @__PURE__ */ z.object({
890
+ memberId: /* @__PURE__ */ z.string().describe("Member ID for a Wix site member, from the Members API.").regex(
885
891
  /^[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
892
  "Must be a valid GUID"
887
893
  ).optional(),
888
- contactId: z.string().describe(
894
+ contactId: /* @__PURE__ */ z.string().describe(
889
895
  "Contact ID for a Wix site contact, from the Contacts API."
890
896
  ).regex(
891
897
  /^[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 +900,40 @@ var CreateOnlineOrderResponse = /* @__PURE__ */ z.object({
894
900
  }).describe(
895
901
  "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
902
  ).optional(),
897
- priceDetails: z.intersection(
898
- z.object({
899
- subtotal: z.string().describe(
903
+ priceDetails: /* @__PURE__ */ z.intersection(
904
+ /* @__PURE__ */ z.object({
905
+ subtotal: /* @__PURE__ */ z.string().describe(
900
906
  'Price of the order excluding tax, specified as a monetary amount. for example, `"9.99"`.'
901
907
  ).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(
908
+ discount: /* @__PURE__ */ z.string().describe("Total discount applied.").optional(),
909
+ tax: /* @__PURE__ */ z.object({
910
+ name: /* @__PURE__ */ z.string().describe("Name of the tax. For example, VAT.").optional(),
911
+ includedInPrice: /* @__PURE__ */ z.boolean().describe(
906
912
  "Whether tax is included in the original price. When `false`, tax is added at checkout."
907
913
  ).optional(),
908
- rate: z.string().describe(
914
+ rate: /* @__PURE__ */ z.string().describe(
909
915
  'Tax rate percentage, as a number between 0 and 100. For example, a 7% tax rate is `"7.00"`.'
910
916
  ).optional(),
911
- amount: z.string().describe(
917
+ amount: /* @__PURE__ */ z.string().describe(
912
918
  'Total tax, specified as a monetary amount. For example, `"3.99"`.'
913
919
  ).optional()
914
920
  }).describe("Tax applied.").optional(),
915
- total: z.string().describe(
921
+ total: /* @__PURE__ */ z.string().describe(
916
922
  '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
923
  ).optional(),
918
- planPrice: z.string().describe("Plan price as it was at the moment of order creation.").optional(),
919
- currency: z.string().describe(
924
+ planPrice: /* @__PURE__ */ z.string().describe("Plan price as it was at the moment of order creation.").optional(),
925
+ currency: /* @__PURE__ */ z.string().describe(
920
926
  "Currency code. Must be valid ISO 4217 currency code (e.g., USD)."
921
927
  ).optional(),
922
- freeTrialDays: z.number().int().describe(
928
+ freeTrialDays: /* @__PURE__ */ z.number().int().describe(
923
929
  "Free trial period for the order in days. Only available for recurring plans."
924
930
  ).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(
931
+ coupon: /* @__PURE__ */ z.object({
932
+ code: /* @__PURE__ */ z.string().describe("Code of the applied coupon.").min(1).max(20).optional(),
933
+ amount: /* @__PURE__ */ z.string().describe(
928
934
  "Total discount of the coupon, as a monetary amount."
929
935
  ).optional(),
930
- _id: z.string().describe("Coupon ID.").regex(
936
+ _id: /* @__PURE__ */ z.string().describe("Coupon ID.").regex(
931
937
  /^[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
938
  "Must be a valid GUID"
933
939
  ).optional()
@@ -935,45 +941,45 @@ var CreateOnlineOrderResponse = /* @__PURE__ */ z.object({
935
941
  "Coupon applied to the order. Empty means no coupon was applied."
936
942
  ).optional()
937
943
  }),
938
- z.xor([
939
- z.object({
940
- subscription: z.never().optional(),
941
- singlePaymentForDuration: z.never().optional(),
942
- singlePaymentUnlimited: z.never().optional()
944
+ /* @__PURE__ */ z.xor([
945
+ /* @__PURE__ */ z.object({
946
+ subscription: /* @__PURE__ */ z.never().optional(),
947
+ singlePaymentForDuration: /* @__PURE__ */ z.never().optional(),
948
+ singlePaymentUnlimited: /* @__PURE__ */ z.never().optional()
943
949
  }),
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(
950
+ /* @__PURE__ */ z.object({
951
+ singlePaymentForDuration: /* @__PURE__ */ z.never().optional(),
952
+ singlePaymentUnlimited: /* @__PURE__ */ z.never().optional(),
953
+ subscription: /* @__PURE__ */ z.object({
954
+ cycleDuration: /* @__PURE__ */ z.object({
955
+ count: /* @__PURE__ */ z.number().int().describe(
950
956
  "Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`."
951
957
  ).min(1).optional().nullable(),
952
- unit: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
958
+ unit: /* @__PURE__ */ z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
953
959
  }).describe(
954
960
  "Number of payment cycles the subscription is valid for.\n`0` for unlimited plans or for plans that are valid until canceled."
955
961
  ).optional(),
956
- cycleCount: z.number().int().describe(
962
+ cycleCount: /* @__PURE__ */ z.number().int().describe(
957
963
  "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
964
  ).min(0).max(2e3).optional().nullable()
959
965
  }).describe("Order has recurring payments.")
960
966
  }),
961
- z.object({
962
- subscription: z.never().optional(),
963
- singlePaymentUnlimited: z.never().optional(),
964
- singlePaymentForDuration: z.object({
965
- count: z.number().int().describe(
967
+ /* @__PURE__ */ z.object({
968
+ subscription: /* @__PURE__ */ z.never().optional(),
969
+ singlePaymentUnlimited: /* @__PURE__ */ z.never().optional(),
970
+ singlePaymentForDuration: /* @__PURE__ */ z.object({
971
+ count: /* @__PURE__ */ z.number().int().describe(
966
972
  "Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`."
967
973
  ).min(1).optional().nullable(),
968
- unit: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
974
+ unit: /* @__PURE__ */ z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
969
975
  }).describe(
970
976
  "One-time payment. Order is valid for a specified duration."
971
977
  )
972
978
  }),
973
- z.object({
974
- subscription: z.never().optional(),
975
- singlePaymentForDuration: z.never().optional(),
976
- singlePaymentUnlimited: z.boolean().describe(
979
+ /* @__PURE__ */ z.object({
980
+ subscription: /* @__PURE__ */ z.never().optional(),
981
+ singlePaymentForDuration: /* @__PURE__ */ z.never().optional(),
982
+ singlePaymentUnlimited: /* @__PURE__ */ z.boolean().describe(
977
983
  "One-time payment. Order is valid until it is canceled."
978
984
  )
979
985
  })
@@ -981,105 +987,105 @@ var CreateOnlineOrderResponse = /* @__PURE__ */ z.object({
981
987
  ).describe(
982
988
  "__Deprecated.__ Use `pricing` instead. This property will be removed on September 30, 2022."
983
989
  ).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(
990
+ pricing: /* @__PURE__ */ z.intersection(
991
+ /* @__PURE__ */ z.object({
992
+ prices: /* @__PURE__ */ z.array(
993
+ /* @__PURE__ */ z.object({
994
+ duration: /* @__PURE__ */ z.object({
995
+ cycleFrom: /* @__PURE__ */ z.number().int().describe(
990
996
  "Price starts to apply with this cycle.\n\n`1` is the first payment cycle for all pricing models."
991
997
  ).optional(),
992
- numberOfCycles: z.number().int().describe(
998
+ numberOfCycles: /* @__PURE__ */ z.number().int().describe(
993
999
  "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
1000
  ).optional().nullable()
995
1001
  }).describe(
996
1002
  "Cycle duration to apply `price` for.\n\nUse with all pricing models.\nCan apply the same price to multiple payment cycles."
997
1003
  ).optional(),
998
- price: z.object({
999
- subtotal: z.string().describe(
1004
+ price: /* @__PURE__ */ z.object({
1005
+ subtotal: /* @__PURE__ */ z.string().describe(
1000
1006
  'Price of the order excluding tax, specified as a monetary amount. For example, `"9.99"`.'
1001
1007
  ).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(
1008
+ coupon: /* @__PURE__ */ z.object({
1009
+ code: /* @__PURE__ */ z.string().describe("Code of the applied coupon.").min(1).max(20).optional(),
1010
+ amount: /* @__PURE__ */ z.string().describe(
1005
1011
  "Total discount of the coupon, as a monetary amount."
1006
1012
  ).optional(),
1007
- _id: z.string().describe("Coupon ID.").regex(
1013
+ _id: /* @__PURE__ */ z.string().describe("Coupon ID.").regex(
1008
1014
  /^[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
1015
  "Must be a valid GUID"
1010
1016
  ).optional()
1011
1017
  }).describe(
1012
1018
  "Coupon applied to the order, from the Coupons API."
1013
1019
  ).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(
1020
+ discount: /* @__PURE__ */ z.string().describe("Total discount applied to the order.").optional(),
1021
+ tax: /* @__PURE__ */ z.object({
1022
+ name: /* @__PURE__ */ z.string().describe("Name of the tax. For example, VAT.").optional(),
1023
+ includedInPrice: /* @__PURE__ */ z.boolean().describe(
1018
1024
  "Whether tax is included in the original price. When `false`, tax is added at checkout."
1019
1025
  ).optional(),
1020
- rate: z.string().describe(
1026
+ rate: /* @__PURE__ */ z.string().describe(
1021
1027
  'Tax rate percentage, as a number between 0 and 100. For example, a 7% tax rate is `"7.00"`.'
1022
1028
  ).optional(),
1023
- amount: z.string().describe(
1029
+ amount: /* @__PURE__ */ z.string().describe(
1024
1030
  'Total tax, specified as a monetary amount. For example, `"3.99"`.'
1025
1031
  ).optional()
1026
1032
  }).describe(
1027
1033
  "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
1034
  ).optional(),
1029
- total: z.string().describe(
1035
+ total: /* @__PURE__ */ z.string().describe(
1030
1036
  '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
1037
  ).optional(),
1032
- currency: z.string().describe(
1038
+ currency: /* @__PURE__ */ z.string().describe(
1033
1039
  "Three-letter currency code in\n[ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format."
1034
1040
  ).optional(),
1035
- proration: z.string().describe(
1041
+ proration: /* @__PURE__ */ z.string().describe(
1036
1042
  "Price change after billing date was change and price was adjusted. Could be positive and negative values."
1037
1043
  ).optional()
1038
1044
  }).describe("Order price.").optional()
1039
1045
  })
1040
1046
  ).optional()
1041
1047
  }),
1042
- z.xor([
1043
- z.object({
1044
- subscription: z.never().optional(),
1045
- singlePaymentForDuration: z.never().optional(),
1046
- singlePaymentUnlimited: z.never().optional()
1048
+ /* @__PURE__ */ z.xor([
1049
+ /* @__PURE__ */ z.object({
1050
+ subscription: /* @__PURE__ */ z.never().optional(),
1051
+ singlePaymentForDuration: /* @__PURE__ */ z.never().optional(),
1052
+ singlePaymentUnlimited: /* @__PURE__ */ z.never().optional()
1047
1053
  }),
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(
1054
+ /* @__PURE__ */ z.object({
1055
+ singlePaymentForDuration: /* @__PURE__ */ z.never().optional(),
1056
+ singlePaymentUnlimited: /* @__PURE__ */ z.never().optional(),
1057
+ subscription: /* @__PURE__ */ z.object({
1058
+ cycleDuration: /* @__PURE__ */ z.object({
1059
+ count: /* @__PURE__ */ z.number().int().describe(
1054
1060
  "Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`."
1055
1061
  ).min(1).optional().nullable(),
1056
- unit: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
1062
+ unit: /* @__PURE__ */ z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
1057
1063
  }).describe(
1058
1064
  "Number of payment cycles the subscription is valid for.\n`0` for unlimited plans or for plans that are valid until canceled."
1059
1065
  ).optional(),
1060
- cycleCount: z.number().int().describe(
1066
+ cycleCount: /* @__PURE__ */ z.number().int().describe(
1061
1067
  "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
1068
  ).min(0).max(2e3).optional().nullable()
1063
1069
  }).describe(
1064
1070
  "Pricing model for an order with recurring payment cycles."
1065
1071
  )
1066
1072
  }),
1067
- z.object({
1068
- subscription: z.never().optional(),
1069
- singlePaymentUnlimited: z.never().optional(),
1070
- singlePaymentForDuration: z.object({
1071
- count: z.number().int().describe(
1073
+ /* @__PURE__ */ z.object({
1074
+ subscription: /* @__PURE__ */ z.never().optional(),
1075
+ singlePaymentUnlimited: /* @__PURE__ */ z.never().optional(),
1076
+ singlePaymentForDuration: /* @__PURE__ */ z.object({
1077
+ count: /* @__PURE__ */ z.number().int().describe(
1072
1078
  "Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`."
1073
1079
  ).min(1).optional().nullable(),
1074
- unit: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
1080
+ unit: /* @__PURE__ */ z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
1075
1081
  }).describe(
1076
1082
  "Pricing model for an order with a one-time payment and the order is valid for a specific amount of time."
1077
1083
  )
1078
1084
  }),
1079
- z.object({
1080
- subscription: z.never().optional(),
1081
- singlePaymentForDuration: z.never().optional(),
1082
- singlePaymentUnlimited: z.boolean().describe(
1085
+ /* @__PURE__ */ z.object({
1086
+ subscription: /* @__PURE__ */ z.never().optional(),
1087
+ singlePaymentForDuration: /* @__PURE__ */ z.never().optional(),
1088
+ singlePaymentUnlimited: /* @__PURE__ */ z.boolean().describe(
1083
1089
  "Pricing model for an order with a one-time payment and the order is valid until canceled."
1084
1090
  )
1085
1091
  })
@@ -1087,8 +1093,8 @@ var CreateOnlineOrderResponse = /* @__PURE__ */ z.object({
1087
1093
  ).describe(
1088
1094
  "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
1095
  ).optional(),
1090
- type: z.enum(["UNDEFINED", "ONLINE", "OFFLINE", "EXTERNAL"]).describe("How the order was processed.").optional(),
1091
- status: z.enum([
1096
+ type: /* @__PURE__ */ z.enum(["UNDEFINED", "ONLINE", "OFFLINE", "EXTERNAL"]).describe("How the order was processed.").optional(),
1097
+ status: /* @__PURE__ */ z.enum([
1092
1098
  "UNDEFINED",
1093
1099
  "DRAFT",
1094
1100
  "PENDING",
@@ -1097,12 +1103,12 @@ var CreateOnlineOrderResponse = /* @__PURE__ */ z.object({
1097
1103
  "ENDED",
1098
1104
  "CANCELED"
1099
1105
  ]).describe("Status of the order.").optional(),
1100
- autoRenewCanceled: z.boolean().describe(
1106
+ autoRenewCanceled: /* @__PURE__ */ z.boolean().describe(
1101
1107
  "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
1108
  ).optional().nullable(),
1103
- cancellation: z.object({
1104
- requestedDate: z.date().describe("Date and time the cancellation was requested.").optional().nullable(),
1105
- cause: z.enum([
1109
+ cancellation: /* @__PURE__ */ z.object({
1110
+ requestedDate: /* @__PURE__ */ z.date().describe("Date and time the cancellation was requested.").optional().nullable(),
1111
+ cause: /* @__PURE__ */ z.enum([
1106
1112
  "UNDEFINED",
1107
1113
  "OWNER_ACTION",
1108
1114
  "MEMBER_ACTION",
@@ -1110,13 +1116,13 @@ var CreateOnlineOrderResponse = /* @__PURE__ */ z.object({
1110
1116
  "PAYMENT_SETUP_FAILURE",
1111
1117
  "UNKNOWN"
1112
1118
  ]).describe("Reason for the cancellation.").optional(),
1113
- effectiveAt: z.enum(["UNDEFINED", "IMMEDIATELY", "NEXT_PAYMENT_DATE"]).describe(
1119
+ effectiveAt: /* @__PURE__ */ z.enum(["UNDEFINED", "IMMEDIATELY", "NEXT_PAYMENT_DATE"]).describe(
1114
1120
  "When the cancellation takes effect. Set when cancelling the order."
1115
1121
  ).optional()
1116
1122
  }).describe(
1117
1123
  "Details about the cancellation of an order.\n\nOnly present if the status is `CANCELED`."
1118
1124
  ).optional(),
1119
- lastPaymentStatus: z.enum([
1125
+ lastPaymentStatus: /* @__PURE__ */ z.enum([
1120
1126
  "UNDEFINED",
1121
1127
  "PAID",
1122
1128
  "REFUNDED",
@@ -1127,109 +1133,109 @@ var CreateOnlineOrderResponse = /* @__PURE__ */ z.object({
1127
1133
  ]).describe(
1128
1134
  "Status of the last payment for the order.\nUpdated automatically for online orders. Updated manually by the Wix user for offline orders."
1129
1135
  ).optional(),
1130
- startDate: z.date().describe("Start date and time for the ordered plan.").optional().nullable(),
1131
- endDate: z.date().describe(
1136
+ startDate: /* @__PURE__ */ z.date().describe("Start date and time for the ordered plan.").optional().nullable(),
1137
+ endDate: /* @__PURE__ */ z.date().describe(
1132
1138
  "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
1139
  ).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(
1140
+ pausePeriods: /* @__PURE__ */ z.array(
1141
+ /* @__PURE__ */ z.object({
1142
+ status: /* @__PURE__ */ z.enum(["UNDEFINED", "ACTIVE", "ENDED"]).describe("Status of the pause period.").optional(),
1143
+ pauseDate: /* @__PURE__ */ z.date().describe("Start date and time of the pause period.").optional().nullable(),
1144
+ resumeDate: /* @__PURE__ */ z.date().describe(
1139
1145
  "End date and time of the pause period.\n\nOmitted while the pause period remains `ACTIVE`."
1140
1146
  ).optional().nullable()
1141
1147
  })
1142
1148
  ).optional(),
1143
- freeTrialDays: z.number().int().describe(
1149
+ freeTrialDays: /* @__PURE__ */ z.number().int().describe(
1144
1150
  "Free trial period for the order, in days.\n\nOnly available for recurring plans."
1145
1151
  ).min(1).max(999).optional().nullable(),
1146
- earliestEndDate: z.date().describe(
1152
+ earliestEndDate: /* @__PURE__ */ z.date().describe(
1147
1153
  "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
1154
  ).optional().nullable(),
1149
- currentCycle: z.object({
1150
- index: z.number().int().describe(
1155
+ currentCycle: /* @__PURE__ */ z.object({
1156
+ index: /* @__PURE__ */ z.number().int().describe(
1151
1157
  "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
1158
  ).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()
1159
+ startedDate: /* @__PURE__ */ z.date().describe("Start date and time for the current payment cycle.").optional().nullable(),
1160
+ endedDate: /* @__PURE__ */ z.date().describe("End date and time for the current payment cycle.").optional().nullable()
1155
1161
  }).describe(
1156
1162
  "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
1163
  ).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(
1164
+ planName: /* @__PURE__ */ z.string().describe("Plan name at the time of purchase.").optional(),
1165
+ planDescription: /* @__PURE__ */ z.string().describe("Plan description at the time of purchase").optional(),
1166
+ planPrice: /* @__PURE__ */ z.string().describe("Plan price as it was at the moment of order creation.").optional(),
1167
+ _createdDate: /* @__PURE__ */ z.date().describe("Date and time the order was created.").optional().nullable(),
1168
+ _updatedDate: /* @__PURE__ */ z.date().describe("Date and time the order was updated.").optional().nullable(),
1169
+ formData: /* @__PURE__ */ z.object({
1170
+ formId: /* @__PURE__ */ z.string().describe(
1165
1171
  "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
1172
  ).regex(
1167
1173
  /^[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
1174
  "Must be a valid GUID"
1169
1175
  ).optional().nullable(),
1170
- submissionId: z.string().describe(
1176
+ submissionId: /* @__PURE__ */ z.string().describe(
1171
1177
  "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
1178
  ).regex(
1173
1179
  /^[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
1180
  "Must be a valid GUID"
1175
1181
  ).optional().nullable(),
1176
- submissionData: z.record(z.string(), z.any()).describe("Data submitted to the plan's order form at checkout.").optional()
1182
+ submissionData: /* @__PURE__ */ z.record(/* @__PURE__ */ z.string(), /* @__PURE__ */ z.any()).describe("Data submitted to the plan's order form at checkout.").optional()
1177
1183
  }).describe(
1178
1184
  "Information about the form submitted during the plan's checkout."
1179
1185
  ).optional()
1180
1186
  }).describe("Created online order.").optional()
1181
1187
  });
1182
1188
  var CreateOfflineOrderRequest = /* @__PURE__ */ z.object({
1183
- planId: z.string().describe("ID of the plan being ordered, from the Plans API.").regex(
1189
+ planId: /* @__PURE__ */ z.string().describe("ID of the plan being ordered, from the Plans API.").regex(
1184
1190
  /^[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
1191
  "Must be a valid GUID"
1186
1192
  ),
1187
- memberId: z.string().describe("ID of the member ordering the plan, from the Members API.").regex(
1193
+ memberId: /* @__PURE__ */ z.string().describe("ID of the member ordering the plan, from the Members API.").regex(
1188
1194
  /^[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
1195
  "Must be a valid GUID"
1190
1196
  ),
1191
- options: z.object({
1192
- startDate: z.date().describe(
1197
+ options: /* @__PURE__ */ z.object({
1198
+ startDate: /* @__PURE__ */ z.date().describe(
1193
1199
  "Start date and time for the ordered plan in a `YYYY-MM-DDThh:mm[:ss][.sss]Z` format.\n\nDefault: Current date and time."
1194
1200
  ).optional().nullable(),
1195
- paid: z.boolean().describe("Whether the order is paid.\n\nDefault: `false`").optional().nullable(),
1196
- couponCode: z.string().describe("Coupon code to apply, from the Coupons API.").min(1).max(20).optional().nullable(),
1197
- submissionId: z.string().describe("Form submission ID that was submitted with the order.").regex(
1201
+ paid: /* @__PURE__ */ z.boolean().describe("Whether the order is paid.\n\nDefault: `false`").optional().nullable(),
1202
+ couponCode: /* @__PURE__ */ z.string().describe("Coupon code to apply, from the Coupons API.").min(1).max(20).optional().nullable(),
1203
+ submissionId: /* @__PURE__ */ z.string().describe("Form submission ID that was submitted with the order.").regex(
1198
1204
  /^[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
1205
  "Must be a valid GUID"
1200
1206
  ).optional().nullable()
1201
1207
  }).describe("Options for creating an offline order. ").optional()
1202
1208
  });
1203
1209
  var CreateOfflineOrderResponse = /* @__PURE__ */ z.object({
1204
- order: z.object({
1205
- _id: z.string().describe("Order ID.").regex(
1210
+ order: /* @__PURE__ */ z.object({
1211
+ _id: /* @__PURE__ */ z.string().describe("Order ID.").regex(
1206
1212
  /^[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
1213
  "Must be a valid GUID"
1208
1214
  ).optional(),
1209
- planId: z.string().describe(
1215
+ planId: /* @__PURE__ */ z.string().describe(
1210
1216
  "ID of the plan purchased with the order, from the Plans API."
1211
1217
  ).regex(
1212
1218
  /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
1213
1219
  "Must be a valid GUID"
1214
1220
  ).optional(),
1215
- subscriptionId: z.string().describe(
1221
+ subscriptionId: /* @__PURE__ */ z.string().describe(
1216
1222
  "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
1223
  ).regex(
1218
1224
  /^[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
1225
  "Must be a valid GUID"
1220
1226
  ).optional(),
1221
- wixPayOrderId: z.string().describe(
1227
+ wixPayOrderId: /* @__PURE__ */ z.string().describe(
1222
1228
  "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
1229
  ).regex(
1224
1230
  /^[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
1231
  "Must be a valid GUID"
1226
1232
  ).optional().nullable(),
1227
- buyer: z.object({
1228
- memberId: z.string().describe("Member ID for a Wix site member, from the Members API.").regex(
1233
+ buyer: /* @__PURE__ */ z.object({
1234
+ memberId: /* @__PURE__ */ z.string().describe("Member ID for a Wix site member, from the Members API.").regex(
1229
1235
  /^[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
1236
  "Must be a valid GUID"
1231
1237
  ).optional(),
1232
- contactId: z.string().describe(
1238
+ contactId: /* @__PURE__ */ z.string().describe(
1233
1239
  "Contact ID for a Wix site contact, from the Contacts API."
1234
1240
  ).regex(
1235
1241
  /^[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 +1244,40 @@ var CreateOfflineOrderResponse = /* @__PURE__ */ z.object({
1238
1244
  }).describe(
1239
1245
  "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
1246
  ).optional(),
1241
- priceDetails: z.intersection(
1242
- z.object({
1243
- subtotal: z.string().describe(
1247
+ priceDetails: /* @__PURE__ */ z.intersection(
1248
+ /* @__PURE__ */ z.object({
1249
+ subtotal: /* @__PURE__ */ z.string().describe(
1244
1250
  'Price of the order excluding tax, specified as a monetary amount. for example, `"9.99"`.'
1245
1251
  ).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(
1252
+ discount: /* @__PURE__ */ z.string().describe("Total discount applied.").optional(),
1253
+ tax: /* @__PURE__ */ z.object({
1254
+ name: /* @__PURE__ */ z.string().describe("Name of the tax. For example, VAT.").optional(),
1255
+ includedInPrice: /* @__PURE__ */ z.boolean().describe(
1250
1256
  "Whether tax is included in the original price. When `false`, tax is added at checkout."
1251
1257
  ).optional(),
1252
- rate: z.string().describe(
1258
+ rate: /* @__PURE__ */ z.string().describe(
1253
1259
  'Tax rate percentage, as a number between 0 and 100. For example, a 7% tax rate is `"7.00"`.'
1254
1260
  ).optional(),
1255
- amount: z.string().describe(
1261
+ amount: /* @__PURE__ */ z.string().describe(
1256
1262
  'Total tax, specified as a monetary amount. For example, `"3.99"`.'
1257
1263
  ).optional()
1258
1264
  }).describe("Tax applied.").optional(),
1259
- total: z.string().describe(
1265
+ total: /* @__PURE__ */ z.string().describe(
1260
1266
  '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
1267
  ).optional(),
1262
- planPrice: z.string().describe("Plan price as it was at the moment of order creation.").optional(),
1263
- currency: z.string().describe(
1268
+ planPrice: /* @__PURE__ */ z.string().describe("Plan price as it was at the moment of order creation.").optional(),
1269
+ currency: /* @__PURE__ */ z.string().describe(
1264
1270
  "Currency code. Must be valid ISO 4217 currency code (e.g., USD)."
1265
1271
  ).optional(),
1266
- freeTrialDays: z.number().int().describe(
1272
+ freeTrialDays: /* @__PURE__ */ z.number().int().describe(
1267
1273
  "Free trial period for the order in days. Only available for recurring plans."
1268
1274
  ).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(
1275
+ coupon: /* @__PURE__ */ z.object({
1276
+ code: /* @__PURE__ */ z.string().describe("Code of the applied coupon.").min(1).max(20).optional(),
1277
+ amount: /* @__PURE__ */ z.string().describe(
1272
1278
  "Total discount of the coupon, as a monetary amount."
1273
1279
  ).optional(),
1274
- _id: z.string().describe("Coupon ID.").regex(
1280
+ _id: /* @__PURE__ */ z.string().describe("Coupon ID.").regex(
1275
1281
  /^[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
1282
  "Must be a valid GUID"
1277
1283
  ).optional()
@@ -1279,45 +1285,45 @@ var CreateOfflineOrderResponse = /* @__PURE__ */ z.object({
1279
1285
  "Coupon applied to the order. Empty means no coupon was applied."
1280
1286
  ).optional()
1281
1287
  }),
1282
- z.xor([
1283
- z.object({
1284
- subscription: z.never().optional(),
1285
- singlePaymentForDuration: z.never().optional(),
1286
- singlePaymentUnlimited: z.never().optional()
1288
+ /* @__PURE__ */ z.xor([
1289
+ /* @__PURE__ */ z.object({
1290
+ subscription: /* @__PURE__ */ z.never().optional(),
1291
+ singlePaymentForDuration: /* @__PURE__ */ z.never().optional(),
1292
+ singlePaymentUnlimited: /* @__PURE__ */ z.never().optional()
1287
1293
  }),
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(
1294
+ /* @__PURE__ */ z.object({
1295
+ singlePaymentForDuration: /* @__PURE__ */ z.never().optional(),
1296
+ singlePaymentUnlimited: /* @__PURE__ */ z.never().optional(),
1297
+ subscription: /* @__PURE__ */ z.object({
1298
+ cycleDuration: /* @__PURE__ */ z.object({
1299
+ count: /* @__PURE__ */ z.number().int().describe(
1294
1300
  "Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`."
1295
1301
  ).min(1).optional().nullable(),
1296
- unit: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
1302
+ unit: /* @__PURE__ */ z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
1297
1303
  }).describe(
1298
1304
  "Number of payment cycles the subscription is valid for.\n`0` for unlimited plans or for plans that are valid until canceled."
1299
1305
  ).optional(),
1300
- cycleCount: z.number().int().describe(
1306
+ cycleCount: /* @__PURE__ */ z.number().int().describe(
1301
1307
  "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
1308
  ).min(0).max(2e3).optional().nullable()
1303
1309
  }).describe("Order has recurring payments.")
1304
1310
  }),
1305
- z.object({
1306
- subscription: z.never().optional(),
1307
- singlePaymentUnlimited: z.never().optional(),
1308
- singlePaymentForDuration: z.object({
1309
- count: z.number().int().describe(
1311
+ /* @__PURE__ */ z.object({
1312
+ subscription: /* @__PURE__ */ z.never().optional(),
1313
+ singlePaymentUnlimited: /* @__PURE__ */ z.never().optional(),
1314
+ singlePaymentForDuration: /* @__PURE__ */ z.object({
1315
+ count: /* @__PURE__ */ z.number().int().describe(
1310
1316
  "Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`."
1311
1317
  ).min(1).optional().nullable(),
1312
- unit: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
1318
+ unit: /* @__PURE__ */ z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
1313
1319
  }).describe(
1314
1320
  "One-time payment. Order is valid for a specified duration."
1315
1321
  )
1316
1322
  }),
1317
- z.object({
1318
- subscription: z.never().optional(),
1319
- singlePaymentForDuration: z.never().optional(),
1320
- singlePaymentUnlimited: z.boolean().describe(
1323
+ /* @__PURE__ */ z.object({
1324
+ subscription: /* @__PURE__ */ z.never().optional(),
1325
+ singlePaymentForDuration: /* @__PURE__ */ z.never().optional(),
1326
+ singlePaymentUnlimited: /* @__PURE__ */ z.boolean().describe(
1321
1327
  "One-time payment. Order is valid until it is canceled."
1322
1328
  )
1323
1329
  })
@@ -1325,105 +1331,105 @@ var CreateOfflineOrderResponse = /* @__PURE__ */ z.object({
1325
1331
  ).describe(
1326
1332
  "__Deprecated.__ Use `pricing` instead. This property will be removed on September 30, 2022."
1327
1333
  ).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(
1334
+ pricing: /* @__PURE__ */ z.intersection(
1335
+ /* @__PURE__ */ z.object({
1336
+ prices: /* @__PURE__ */ z.array(
1337
+ /* @__PURE__ */ z.object({
1338
+ duration: /* @__PURE__ */ z.object({
1339
+ cycleFrom: /* @__PURE__ */ z.number().int().describe(
1334
1340
  "Price starts to apply with this cycle.\n\n`1` is the first payment cycle for all pricing models."
1335
1341
  ).optional(),
1336
- numberOfCycles: z.number().int().describe(
1342
+ numberOfCycles: /* @__PURE__ */ z.number().int().describe(
1337
1343
  "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
1344
  ).optional().nullable()
1339
1345
  }).describe(
1340
1346
  "Cycle duration to apply `price` for.\n\nUse with all pricing models.\nCan apply the same price to multiple payment cycles."
1341
1347
  ).optional(),
1342
- price: z.object({
1343
- subtotal: z.string().describe(
1348
+ price: /* @__PURE__ */ z.object({
1349
+ subtotal: /* @__PURE__ */ z.string().describe(
1344
1350
  'Price of the order excluding tax, specified as a monetary amount. For example, `"9.99"`.'
1345
1351
  ).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(
1352
+ coupon: /* @__PURE__ */ z.object({
1353
+ code: /* @__PURE__ */ z.string().describe("Code of the applied coupon.").min(1).max(20).optional(),
1354
+ amount: /* @__PURE__ */ z.string().describe(
1349
1355
  "Total discount of the coupon, as a monetary amount."
1350
1356
  ).optional(),
1351
- _id: z.string().describe("Coupon ID.").regex(
1357
+ _id: /* @__PURE__ */ z.string().describe("Coupon ID.").regex(
1352
1358
  /^[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
1359
  "Must be a valid GUID"
1354
1360
  ).optional()
1355
1361
  }).describe(
1356
1362
  "Coupon applied to the order, from the Coupons API."
1357
1363
  ).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(
1364
+ discount: /* @__PURE__ */ z.string().describe("Total discount applied to the order.").optional(),
1365
+ tax: /* @__PURE__ */ z.object({
1366
+ name: /* @__PURE__ */ z.string().describe("Name of the tax. For example, VAT.").optional(),
1367
+ includedInPrice: /* @__PURE__ */ z.boolean().describe(
1362
1368
  "Whether tax is included in the original price. When `false`, tax is added at checkout."
1363
1369
  ).optional(),
1364
- rate: z.string().describe(
1370
+ rate: /* @__PURE__ */ z.string().describe(
1365
1371
  'Tax rate percentage, as a number between 0 and 100. For example, a 7% tax rate is `"7.00"`.'
1366
1372
  ).optional(),
1367
- amount: z.string().describe(
1373
+ amount: /* @__PURE__ */ z.string().describe(
1368
1374
  'Total tax, specified as a monetary amount. For example, `"3.99"`.'
1369
1375
  ).optional()
1370
1376
  }).describe(
1371
1377
  "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
1378
  ).optional(),
1373
- total: z.string().describe(
1379
+ total: /* @__PURE__ */ z.string().describe(
1374
1380
  '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
1381
  ).optional(),
1376
- currency: z.string().describe(
1382
+ currency: /* @__PURE__ */ z.string().describe(
1377
1383
  "Three-letter currency code in\n[ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format."
1378
1384
  ).optional(),
1379
- proration: z.string().describe(
1385
+ proration: /* @__PURE__ */ z.string().describe(
1380
1386
  "Price change after billing date was change and price was adjusted. Could be positive and negative values."
1381
1387
  ).optional()
1382
1388
  }).describe("Order price.").optional()
1383
1389
  })
1384
1390
  ).optional()
1385
1391
  }),
1386
- z.xor([
1387
- z.object({
1388
- subscription: z.never().optional(),
1389
- singlePaymentForDuration: z.never().optional(),
1390
- singlePaymentUnlimited: z.never().optional()
1392
+ /* @__PURE__ */ z.xor([
1393
+ /* @__PURE__ */ z.object({
1394
+ subscription: /* @__PURE__ */ z.never().optional(),
1395
+ singlePaymentForDuration: /* @__PURE__ */ z.never().optional(),
1396
+ singlePaymentUnlimited: /* @__PURE__ */ z.never().optional()
1391
1397
  }),
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(
1398
+ /* @__PURE__ */ z.object({
1399
+ singlePaymentForDuration: /* @__PURE__ */ z.never().optional(),
1400
+ singlePaymentUnlimited: /* @__PURE__ */ z.never().optional(),
1401
+ subscription: /* @__PURE__ */ z.object({
1402
+ cycleDuration: /* @__PURE__ */ z.object({
1403
+ count: /* @__PURE__ */ z.number().int().describe(
1398
1404
  "Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`."
1399
1405
  ).min(1).optional().nullable(),
1400
- unit: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
1406
+ unit: /* @__PURE__ */ z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
1401
1407
  }).describe(
1402
1408
  "Number of payment cycles the subscription is valid for.\n`0` for unlimited plans or for plans that are valid until canceled."
1403
1409
  ).optional(),
1404
- cycleCount: z.number().int().describe(
1410
+ cycleCount: /* @__PURE__ */ z.number().int().describe(
1405
1411
  "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
1412
  ).min(0).max(2e3).optional().nullable()
1407
1413
  }).describe(
1408
1414
  "Pricing model for an order with recurring payment cycles."
1409
1415
  )
1410
1416
  }),
1411
- z.object({
1412
- subscription: z.never().optional(),
1413
- singlePaymentUnlimited: z.never().optional(),
1414
- singlePaymentForDuration: z.object({
1415
- count: z.number().int().describe(
1417
+ /* @__PURE__ */ z.object({
1418
+ subscription: /* @__PURE__ */ z.never().optional(),
1419
+ singlePaymentUnlimited: /* @__PURE__ */ z.never().optional(),
1420
+ singlePaymentForDuration: /* @__PURE__ */ z.object({
1421
+ count: /* @__PURE__ */ z.number().int().describe(
1416
1422
  "Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`."
1417
1423
  ).min(1).optional().nullable(),
1418
- unit: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
1424
+ unit: /* @__PURE__ */ z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
1419
1425
  }).describe(
1420
1426
  "Pricing model for an order with a one-time payment and the order is valid for a specific amount of time."
1421
1427
  )
1422
1428
  }),
1423
- z.object({
1424
- subscription: z.never().optional(),
1425
- singlePaymentForDuration: z.never().optional(),
1426
- singlePaymentUnlimited: z.boolean().describe(
1429
+ /* @__PURE__ */ z.object({
1430
+ subscription: /* @__PURE__ */ z.never().optional(),
1431
+ singlePaymentForDuration: /* @__PURE__ */ z.never().optional(),
1432
+ singlePaymentUnlimited: /* @__PURE__ */ z.boolean().describe(
1427
1433
  "Pricing model for an order with a one-time payment and the order is valid until canceled."
1428
1434
  )
1429
1435
  })
@@ -1431,8 +1437,8 @@ var CreateOfflineOrderResponse = /* @__PURE__ */ z.object({
1431
1437
  ).describe(
1432
1438
  "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
1439
  ).optional(),
1434
- type: z.enum(["UNDEFINED", "ONLINE", "OFFLINE", "EXTERNAL"]).describe("How the order was processed.").optional(),
1435
- status: z.enum([
1440
+ type: /* @__PURE__ */ z.enum(["UNDEFINED", "ONLINE", "OFFLINE", "EXTERNAL"]).describe("How the order was processed.").optional(),
1441
+ status: /* @__PURE__ */ z.enum([
1436
1442
  "UNDEFINED",
1437
1443
  "DRAFT",
1438
1444
  "PENDING",
@@ -1441,12 +1447,12 @@ var CreateOfflineOrderResponse = /* @__PURE__ */ z.object({
1441
1447
  "ENDED",
1442
1448
  "CANCELED"
1443
1449
  ]).describe("Status of the order.").optional(),
1444
- autoRenewCanceled: z.boolean().describe(
1450
+ autoRenewCanceled: /* @__PURE__ */ z.boolean().describe(
1445
1451
  "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
1452
  ).optional().nullable(),
1447
- cancellation: z.object({
1448
- requestedDate: z.date().describe("Date and time the cancellation was requested.").optional().nullable(),
1449
- cause: z.enum([
1453
+ cancellation: /* @__PURE__ */ z.object({
1454
+ requestedDate: /* @__PURE__ */ z.date().describe("Date and time the cancellation was requested.").optional().nullable(),
1455
+ cause: /* @__PURE__ */ z.enum([
1450
1456
  "UNDEFINED",
1451
1457
  "OWNER_ACTION",
1452
1458
  "MEMBER_ACTION",
@@ -1454,13 +1460,13 @@ var CreateOfflineOrderResponse = /* @__PURE__ */ z.object({
1454
1460
  "PAYMENT_SETUP_FAILURE",
1455
1461
  "UNKNOWN"
1456
1462
  ]).describe("Reason for the cancellation.").optional(),
1457
- effectiveAt: z.enum(["UNDEFINED", "IMMEDIATELY", "NEXT_PAYMENT_DATE"]).describe(
1463
+ effectiveAt: /* @__PURE__ */ z.enum(["UNDEFINED", "IMMEDIATELY", "NEXT_PAYMENT_DATE"]).describe(
1458
1464
  "When the cancellation takes effect. Set when cancelling the order."
1459
1465
  ).optional()
1460
1466
  }).describe(
1461
1467
  "Details about the cancellation of an order.\n\nOnly present if the status is `CANCELED`."
1462
1468
  ).optional(),
1463
- lastPaymentStatus: z.enum([
1469
+ lastPaymentStatus: /* @__PURE__ */ z.enum([
1464
1470
  "UNDEFINED",
1465
1471
  "PAID",
1466
1472
  "REFUNDED",
@@ -1471,100 +1477,100 @@ var CreateOfflineOrderResponse = /* @__PURE__ */ z.object({
1471
1477
  ]).describe(
1472
1478
  "Status of the last payment for the order.\nUpdated automatically for online orders. Updated manually by the Wix user for offline orders."
1473
1479
  ).optional(),
1474
- startDate: z.date().describe("Start date and time for the ordered plan.").optional().nullable(),
1475
- endDate: z.date().describe(
1480
+ startDate: /* @__PURE__ */ z.date().describe("Start date and time for the ordered plan.").optional().nullable(),
1481
+ endDate: /* @__PURE__ */ z.date().describe(
1476
1482
  "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
1483
  ).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(
1484
+ pausePeriods: /* @__PURE__ */ z.array(
1485
+ /* @__PURE__ */ z.object({
1486
+ status: /* @__PURE__ */ z.enum(["UNDEFINED", "ACTIVE", "ENDED"]).describe("Status of the pause period.").optional(),
1487
+ pauseDate: /* @__PURE__ */ z.date().describe("Start date and time of the pause period.").optional().nullable(),
1488
+ resumeDate: /* @__PURE__ */ z.date().describe(
1483
1489
  "End date and time of the pause period.\n\nOmitted while the pause period remains `ACTIVE`."
1484
1490
  ).optional().nullable()
1485
1491
  })
1486
1492
  ).optional(),
1487
- freeTrialDays: z.number().int().describe(
1493
+ freeTrialDays: /* @__PURE__ */ z.number().int().describe(
1488
1494
  "Free trial period for the order, in days.\n\nOnly available for recurring plans."
1489
1495
  ).min(1).max(999).optional().nullable(),
1490
- earliestEndDate: z.date().describe(
1496
+ earliestEndDate: /* @__PURE__ */ z.date().describe(
1491
1497
  "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
1498
  ).optional().nullable(),
1493
- currentCycle: z.object({
1494
- index: z.number().int().describe(
1499
+ currentCycle: /* @__PURE__ */ z.object({
1500
+ index: /* @__PURE__ */ z.number().int().describe(
1495
1501
  "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
1502
  ).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()
1503
+ startedDate: /* @__PURE__ */ z.date().describe("Start date and time for the current payment cycle.").optional().nullable(),
1504
+ endedDate: /* @__PURE__ */ z.date().describe("End date and time for the current payment cycle.").optional().nullable()
1499
1505
  }).describe(
1500
1506
  "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
1507
  ).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(
1508
+ planName: /* @__PURE__ */ z.string().describe("Plan name at the time of purchase.").optional(),
1509
+ planDescription: /* @__PURE__ */ z.string().describe("Plan description at the time of purchase").optional(),
1510
+ planPrice: /* @__PURE__ */ z.string().describe("Plan price as it was at the moment of order creation.").optional(),
1511
+ _createdDate: /* @__PURE__ */ z.date().describe("Date and time the order was created.").optional().nullable(),
1512
+ _updatedDate: /* @__PURE__ */ z.date().describe("Date and time the order was updated.").optional().nullable(),
1513
+ formData: /* @__PURE__ */ z.object({
1514
+ formId: /* @__PURE__ */ z.string().describe(
1509
1515
  "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
1516
  ).regex(
1511
1517
  /^[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
1518
  "Must be a valid GUID"
1513
1519
  ).optional().nullable(),
1514
- submissionId: z.string().describe(
1520
+ submissionId: /* @__PURE__ */ z.string().describe(
1515
1521
  "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
1522
  ).regex(
1517
1523
  /^[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
1524
  "Must be a valid GUID"
1519
1525
  ).optional().nullable(),
1520
- submissionData: z.record(z.string(), z.any()).describe("Data submitted to the plan's order form at checkout.").optional()
1526
+ submissionData: /* @__PURE__ */ z.record(/* @__PURE__ */ z.string(), /* @__PURE__ */ z.any()).describe("Data submitted to the plan's order form at checkout.").optional()
1521
1527
  }).describe(
1522
1528
  "Information about the form submitted during the plan's checkout."
1523
1529
  ).optional()
1524
1530
  }).describe("Order.").optional()
1525
1531
  });
1526
1532
  var GetOnlineOrderPreviewRequest = /* @__PURE__ */ z.object({
1527
- planId: z.string().describe("Plan ID.").regex(
1533
+ planId: /* @__PURE__ */ z.string().describe("Plan ID.").regex(
1528
1534
  /^[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
1535
  "Must be a valid GUID"
1530
1536
  ),
1531
- options: z.object({
1532
- startDate: z.date().describe(
1537
+ options: /* @__PURE__ */ z.object({
1538
+ startDate: /* @__PURE__ */ z.date().describe(
1533
1539
  "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."
1534
1540
  ).optional().nullable(),
1535
- couponCode: z.string().describe("Coupon code to apply.").min(1).max(20).optional().nullable()
1541
+ couponCode: /* @__PURE__ */ z.string().describe("Coupon code to apply.").min(1).max(20).optional().nullable()
1536
1542
  }).optional()
1537
1543
  });
1538
1544
  var GetOnlineOrderPreviewResponse = /* @__PURE__ */ z.object({
1539
- order: z.object({
1540
- _id: z.string().describe("Order ID.").regex(
1545
+ order: /* @__PURE__ */ z.object({
1546
+ _id: /* @__PURE__ */ z.string().describe("Order ID.").regex(
1541
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}$/,
1542
1548
  "Must be a valid GUID"
1543
1549
  ).optional(),
1544
- planId: z.string().describe(
1550
+ planId: /* @__PURE__ */ z.string().describe(
1545
1551
  "ID of the plan purchased with the order, from the Plans API."
1546
1552
  ).regex(
1547
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}$/,
1548
1554
  "Must be a valid GUID"
1549
1555
  ).optional(),
1550
- subscriptionId: z.string().describe(
1556
+ subscriptionId: /* @__PURE__ */ z.string().describe(
1551
1557
  "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
1558
  ).regex(
1553
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}$/,
1554
1560
  "Must be a valid GUID"
1555
1561
  ).optional(),
1556
- wixPayOrderId: z.string().describe(
1562
+ wixPayOrderId: /* @__PURE__ */ z.string().describe(
1557
1563
  "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
1564
  ).regex(
1559
1565
  /^[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
1566
  "Must be a valid GUID"
1561
1567
  ).optional().nullable(),
1562
- buyer: z.object({
1563
- memberId: z.string().describe("Member ID for a Wix site member, from the Members API.").regex(
1568
+ buyer: /* @__PURE__ */ z.object({
1569
+ memberId: /* @__PURE__ */ z.string().describe("Member ID for a Wix site member, from the Members API.").regex(
1564
1570
  /^[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
1571
  "Must be a valid GUID"
1566
1572
  ).optional(),
1567
- contactId: z.string().describe(
1573
+ contactId: /* @__PURE__ */ z.string().describe(
1568
1574
  "Contact ID for a Wix site contact, from the Contacts API."
1569
1575
  ).regex(
1570
1576
  /^[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}$/,
@@ -1573,40 +1579,40 @@ var GetOnlineOrderPreviewResponse = /* @__PURE__ */ z.object({
1573
1579
  }).describe(
1574
1580
  "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`."
1575
1581
  ).optional(),
1576
- priceDetails: z.intersection(
1577
- z.object({
1578
- subtotal: z.string().describe(
1582
+ priceDetails: /* @__PURE__ */ z.intersection(
1583
+ /* @__PURE__ */ z.object({
1584
+ subtotal: /* @__PURE__ */ z.string().describe(
1579
1585
  'Price of the order excluding tax, specified as a monetary amount. for example, `"9.99"`.'
1580
1586
  ).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(
1587
+ discount: /* @__PURE__ */ z.string().describe("Total discount applied.").optional(),
1588
+ tax: /* @__PURE__ */ z.object({
1589
+ name: /* @__PURE__ */ z.string().describe("Name of the tax. For example, VAT.").optional(),
1590
+ includedInPrice: /* @__PURE__ */ z.boolean().describe(
1585
1591
  "Whether tax is included in the original price. When `false`, tax is added at checkout."
1586
1592
  ).optional(),
1587
- rate: z.string().describe(
1593
+ rate: /* @__PURE__ */ z.string().describe(
1588
1594
  'Tax rate percentage, as a number between 0 and 100. For example, a 7% tax rate is `"7.00"`.'
1589
1595
  ).optional(),
1590
- amount: z.string().describe(
1596
+ amount: /* @__PURE__ */ z.string().describe(
1591
1597
  'Total tax, specified as a monetary amount. For example, `"3.99"`.'
1592
1598
  ).optional()
1593
1599
  }).describe("Tax applied.").optional(),
1594
- total: z.string().describe(
1600
+ total: /* @__PURE__ */ z.string().describe(
1595
1601
  '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
1602
  ).optional(),
1597
- planPrice: z.string().describe("Plan price as it was at the moment of order creation.").optional(),
1598
- currency: z.string().describe(
1603
+ planPrice: /* @__PURE__ */ z.string().describe("Plan price as it was at the moment of order creation.").optional(),
1604
+ currency: /* @__PURE__ */ z.string().describe(
1599
1605
  "Currency code. Must be valid ISO 4217 currency code (e.g., USD)."
1600
1606
  ).optional(),
1601
- freeTrialDays: z.number().int().describe(
1607
+ freeTrialDays: /* @__PURE__ */ z.number().int().describe(
1602
1608
  "Free trial period for the order in days. Only available for recurring plans."
1603
1609
  ).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(
1610
+ coupon: /* @__PURE__ */ z.object({
1611
+ code: /* @__PURE__ */ z.string().describe("Code of the applied coupon.").min(1).max(20).optional(),
1612
+ amount: /* @__PURE__ */ z.string().describe(
1607
1613
  "Total discount of the coupon, as a monetary amount."
1608
1614
  ).optional(),
1609
- _id: z.string().describe("Coupon ID.").regex(
1615
+ _id: /* @__PURE__ */ z.string().describe("Coupon ID.").regex(
1610
1616
  /^[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
1617
  "Must be a valid GUID"
1612
1618
  ).optional()
@@ -1614,45 +1620,45 @@ var GetOnlineOrderPreviewResponse = /* @__PURE__ */ z.object({
1614
1620
  "Coupon applied to the order. Empty means no coupon was applied."
1615
1621
  ).optional()
1616
1622
  }),
1617
- z.xor([
1618
- z.object({
1619
- subscription: z.never().optional(),
1620
- singlePaymentForDuration: z.never().optional(),
1621
- singlePaymentUnlimited: z.never().optional()
1623
+ /* @__PURE__ */ z.xor([
1624
+ /* @__PURE__ */ z.object({
1625
+ subscription: /* @__PURE__ */ z.never().optional(),
1626
+ singlePaymentForDuration: /* @__PURE__ */ z.never().optional(),
1627
+ singlePaymentUnlimited: /* @__PURE__ */ z.never().optional()
1622
1628
  }),
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(
1629
+ /* @__PURE__ */ z.object({
1630
+ singlePaymentForDuration: /* @__PURE__ */ z.never().optional(),
1631
+ singlePaymentUnlimited: /* @__PURE__ */ z.never().optional(),
1632
+ subscription: /* @__PURE__ */ z.object({
1633
+ cycleDuration: /* @__PURE__ */ z.object({
1634
+ count: /* @__PURE__ */ z.number().int().describe(
1629
1635
  "Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`."
1630
1636
  ).min(1).optional().nullable(),
1631
- unit: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
1637
+ unit: /* @__PURE__ */ z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
1632
1638
  }).describe(
1633
1639
  "Number of payment cycles the subscription is valid for.\n`0` for unlimited plans or for plans that are valid until canceled."
1634
1640
  ).optional(),
1635
- cycleCount: z.number().int().describe(
1641
+ cycleCount: /* @__PURE__ */ z.number().int().describe(
1636
1642
  "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
1643
  ).min(0).max(2e3).optional().nullable()
1638
1644
  }).describe("Order has recurring payments.")
1639
1645
  }),
1640
- z.object({
1641
- subscription: z.never().optional(),
1642
- singlePaymentUnlimited: z.never().optional(),
1643
- singlePaymentForDuration: z.object({
1644
- count: z.number().int().describe(
1646
+ /* @__PURE__ */ z.object({
1647
+ subscription: /* @__PURE__ */ z.never().optional(),
1648
+ singlePaymentUnlimited: /* @__PURE__ */ z.never().optional(),
1649
+ singlePaymentForDuration: /* @__PURE__ */ z.object({
1650
+ count: /* @__PURE__ */ z.number().int().describe(
1645
1651
  "Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`."
1646
1652
  ).min(1).optional().nullable(),
1647
- unit: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
1653
+ unit: /* @__PURE__ */ z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
1648
1654
  }).describe(
1649
1655
  "One-time payment. Order is valid for a specified duration."
1650
1656
  )
1651
1657
  }),
1652
- z.object({
1653
- subscription: z.never().optional(),
1654
- singlePaymentForDuration: z.never().optional(),
1655
- singlePaymentUnlimited: z.boolean().describe(
1658
+ /* @__PURE__ */ z.object({
1659
+ subscription: /* @__PURE__ */ z.never().optional(),
1660
+ singlePaymentForDuration: /* @__PURE__ */ z.never().optional(),
1661
+ singlePaymentUnlimited: /* @__PURE__ */ z.boolean().describe(
1656
1662
  "One-time payment. Order is valid until it is canceled."
1657
1663
  )
1658
1664
  })
@@ -1660,105 +1666,105 @@ var GetOnlineOrderPreviewResponse = /* @__PURE__ */ z.object({
1660
1666
  ).describe(
1661
1667
  "__Deprecated.__ Use `pricing` instead. This property will be removed on September 30, 2022."
1662
1668
  ).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(
1669
+ pricing: /* @__PURE__ */ z.intersection(
1670
+ /* @__PURE__ */ z.object({
1671
+ prices: /* @__PURE__ */ z.array(
1672
+ /* @__PURE__ */ z.object({
1673
+ duration: /* @__PURE__ */ z.object({
1674
+ cycleFrom: /* @__PURE__ */ z.number().int().describe(
1669
1675
  "Price starts to apply with this cycle.\n\n`1` is the first payment cycle for all pricing models."
1670
1676
  ).optional(),
1671
- numberOfCycles: z.number().int().describe(
1677
+ numberOfCycles: /* @__PURE__ */ z.number().int().describe(
1672
1678
  "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
1679
  ).optional().nullable()
1674
1680
  }).describe(
1675
1681
  "Cycle duration to apply `price` for.\n\nUse with all pricing models.\nCan apply the same price to multiple payment cycles."
1676
1682
  ).optional(),
1677
- price: z.object({
1678
- subtotal: z.string().describe(
1683
+ price: /* @__PURE__ */ z.object({
1684
+ subtotal: /* @__PURE__ */ z.string().describe(
1679
1685
  'Price of the order excluding tax, specified as a monetary amount. For example, `"9.99"`.'
1680
1686
  ).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(
1687
+ coupon: /* @__PURE__ */ z.object({
1688
+ code: /* @__PURE__ */ z.string().describe("Code of the applied coupon.").min(1).max(20).optional(),
1689
+ amount: /* @__PURE__ */ z.string().describe(
1684
1690
  "Total discount of the coupon, as a monetary amount."
1685
1691
  ).optional(),
1686
- _id: z.string().describe("Coupon ID.").regex(
1692
+ _id: /* @__PURE__ */ z.string().describe("Coupon ID.").regex(
1687
1693
  /^[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
1694
  "Must be a valid GUID"
1689
1695
  ).optional()
1690
1696
  }).describe(
1691
1697
  "Coupon applied to the order, from the Coupons API."
1692
1698
  ).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(
1699
+ discount: /* @__PURE__ */ z.string().describe("Total discount applied to the order.").optional(),
1700
+ tax: /* @__PURE__ */ z.object({
1701
+ name: /* @__PURE__ */ z.string().describe("Name of the tax. For example, VAT.").optional(),
1702
+ includedInPrice: /* @__PURE__ */ z.boolean().describe(
1697
1703
  "Whether tax is included in the original price. When `false`, tax is added at checkout."
1698
1704
  ).optional(),
1699
- rate: z.string().describe(
1705
+ rate: /* @__PURE__ */ z.string().describe(
1700
1706
  'Tax rate percentage, as a number between 0 and 100. For example, a 7% tax rate is `"7.00"`.'
1701
1707
  ).optional(),
1702
- amount: z.string().describe(
1708
+ amount: /* @__PURE__ */ z.string().describe(
1703
1709
  'Total tax, specified as a monetary amount. For example, `"3.99"`.'
1704
1710
  ).optional()
1705
1711
  }).describe(
1706
1712
  "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
1713
  ).optional(),
1708
- total: z.string().describe(
1714
+ total: /* @__PURE__ */ z.string().describe(
1709
1715
  '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
1716
  ).optional(),
1711
- currency: z.string().describe(
1717
+ currency: /* @__PURE__ */ z.string().describe(
1712
1718
  "Three-letter currency code in\n[ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format."
1713
1719
  ).optional(),
1714
- proration: z.string().describe(
1720
+ proration: /* @__PURE__ */ z.string().describe(
1715
1721
  "Price change after billing date was change and price was adjusted. Could be positive and negative values."
1716
1722
  ).optional()
1717
1723
  }).describe("Order price.").optional()
1718
1724
  })
1719
1725
  ).optional()
1720
1726
  }),
1721
- z.xor([
1722
- z.object({
1723
- subscription: z.never().optional(),
1724
- singlePaymentForDuration: z.never().optional(),
1725
- singlePaymentUnlimited: z.never().optional()
1727
+ /* @__PURE__ */ z.xor([
1728
+ /* @__PURE__ */ z.object({
1729
+ subscription: /* @__PURE__ */ z.never().optional(),
1730
+ singlePaymentForDuration: /* @__PURE__ */ z.never().optional(),
1731
+ singlePaymentUnlimited: /* @__PURE__ */ z.never().optional()
1726
1732
  }),
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(
1733
+ /* @__PURE__ */ z.object({
1734
+ singlePaymentForDuration: /* @__PURE__ */ z.never().optional(),
1735
+ singlePaymentUnlimited: /* @__PURE__ */ z.never().optional(),
1736
+ subscription: /* @__PURE__ */ z.object({
1737
+ cycleDuration: /* @__PURE__ */ z.object({
1738
+ count: /* @__PURE__ */ z.number().int().describe(
1733
1739
  "Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`."
1734
1740
  ).min(1).optional().nullable(),
1735
- unit: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
1741
+ unit: /* @__PURE__ */ z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
1736
1742
  }).describe(
1737
1743
  "Number of payment cycles the subscription is valid for.\n`0` for unlimited plans or for plans that are valid until canceled."
1738
1744
  ).optional(),
1739
- cycleCount: z.number().int().describe(
1745
+ cycleCount: /* @__PURE__ */ z.number().int().describe(
1740
1746
  "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
1747
  ).min(0).max(2e3).optional().nullable()
1742
1748
  }).describe(
1743
1749
  "Pricing model for an order with recurring payment cycles."
1744
1750
  )
1745
1751
  }),
1746
- z.object({
1747
- subscription: z.never().optional(),
1748
- singlePaymentUnlimited: z.never().optional(),
1749
- singlePaymentForDuration: z.object({
1750
- count: z.number().int().describe(
1752
+ /* @__PURE__ */ z.object({
1753
+ subscription: /* @__PURE__ */ z.never().optional(),
1754
+ singlePaymentUnlimited: /* @__PURE__ */ z.never().optional(),
1755
+ singlePaymentForDuration: /* @__PURE__ */ z.object({
1756
+ count: /* @__PURE__ */ z.number().int().describe(
1751
1757
  "Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`."
1752
1758
  ).min(1).optional().nullable(),
1753
- unit: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
1759
+ unit: /* @__PURE__ */ z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
1754
1760
  }).describe(
1755
1761
  "Pricing model for an order with a one-time payment and the order is valid for a specific amount of time."
1756
1762
  )
1757
1763
  }),
1758
- z.object({
1759
- subscription: z.never().optional(),
1760
- singlePaymentForDuration: z.never().optional(),
1761
- singlePaymentUnlimited: z.boolean().describe(
1764
+ /* @__PURE__ */ z.object({
1765
+ subscription: /* @__PURE__ */ z.never().optional(),
1766
+ singlePaymentForDuration: /* @__PURE__ */ z.never().optional(),
1767
+ singlePaymentUnlimited: /* @__PURE__ */ z.boolean().describe(
1762
1768
  "Pricing model for an order with a one-time payment and the order is valid until canceled."
1763
1769
  )
1764
1770
  })
@@ -1766,8 +1772,8 @@ var GetOnlineOrderPreviewResponse = /* @__PURE__ */ z.object({
1766
1772
  ).describe(
1767
1773
  "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
1774
  ).optional(),
1769
- type: z.enum(["UNDEFINED", "ONLINE", "OFFLINE", "EXTERNAL"]).describe("How the order was processed.").optional(),
1770
- status: z.enum([
1775
+ type: /* @__PURE__ */ z.enum(["UNDEFINED", "ONLINE", "OFFLINE", "EXTERNAL"]).describe("How the order was processed.").optional(),
1776
+ status: /* @__PURE__ */ z.enum([
1771
1777
  "UNDEFINED",
1772
1778
  "DRAFT",
1773
1779
  "PENDING",
@@ -1776,12 +1782,12 @@ var GetOnlineOrderPreviewResponse = /* @__PURE__ */ z.object({
1776
1782
  "ENDED",
1777
1783
  "CANCELED"
1778
1784
  ]).describe("Status of the order.").optional(),
1779
- autoRenewCanceled: z.boolean().describe(
1785
+ autoRenewCanceled: /* @__PURE__ */ z.boolean().describe(
1780
1786
  "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
1787
  ).optional().nullable(),
1782
- cancellation: z.object({
1783
- requestedDate: z.date().describe("Date and time the cancellation was requested.").optional().nullable(),
1784
- cause: z.enum([
1788
+ cancellation: /* @__PURE__ */ z.object({
1789
+ requestedDate: /* @__PURE__ */ z.date().describe("Date and time the cancellation was requested.").optional().nullable(),
1790
+ cause: /* @__PURE__ */ z.enum([
1785
1791
  "UNDEFINED",
1786
1792
  "OWNER_ACTION",
1787
1793
  "MEMBER_ACTION",
@@ -1789,13 +1795,13 @@ var GetOnlineOrderPreviewResponse = /* @__PURE__ */ z.object({
1789
1795
  "PAYMENT_SETUP_FAILURE",
1790
1796
  "UNKNOWN"
1791
1797
  ]).describe("Reason for the cancellation.").optional(),
1792
- effectiveAt: z.enum(["UNDEFINED", "IMMEDIATELY", "NEXT_PAYMENT_DATE"]).describe(
1798
+ effectiveAt: /* @__PURE__ */ z.enum(["UNDEFINED", "IMMEDIATELY", "NEXT_PAYMENT_DATE"]).describe(
1793
1799
  "When the cancellation takes effect. Set when cancelling the order."
1794
1800
  ).optional()
1795
1801
  }).describe(
1796
1802
  "Details about the cancellation of an order.\n\nOnly present if the status is `CANCELED`."
1797
1803
  ).optional(),
1798
- lastPaymentStatus: z.enum([
1804
+ lastPaymentStatus: /* @__PURE__ */ z.enum([
1799
1805
  "UNDEFINED",
1800
1806
  "PAID",
1801
1807
  "REFUNDED",
@@ -1806,111 +1812,111 @@ var GetOnlineOrderPreviewResponse = /* @__PURE__ */ z.object({
1806
1812
  ]).describe(
1807
1813
  "Status of the last payment for the order.\nUpdated automatically for online orders. Updated manually by the Wix user for offline orders."
1808
1814
  ).optional(),
1809
- startDate: z.date().describe("Start date and time for the ordered plan.").optional().nullable(),
1810
- endDate: z.date().describe(
1815
+ startDate: /* @__PURE__ */ z.date().describe("Start date and time for the ordered plan.").optional().nullable(),
1816
+ endDate: /* @__PURE__ */ z.date().describe(
1811
1817
  "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
1818
  ).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(
1819
+ pausePeriods: /* @__PURE__ */ z.array(
1820
+ /* @__PURE__ */ z.object({
1821
+ status: /* @__PURE__ */ z.enum(["UNDEFINED", "ACTIVE", "ENDED"]).describe("Status of the pause period.").optional(),
1822
+ pauseDate: /* @__PURE__ */ z.date().describe("Start date and time of the pause period.").optional().nullable(),
1823
+ resumeDate: /* @__PURE__ */ z.date().describe(
1818
1824
  "End date and time of the pause period.\n\nOmitted while the pause period remains `ACTIVE`."
1819
1825
  ).optional().nullable()
1820
1826
  })
1821
1827
  ).optional(),
1822
- freeTrialDays: z.number().int().describe(
1828
+ freeTrialDays: /* @__PURE__ */ z.number().int().describe(
1823
1829
  "Free trial period for the order, in days.\n\nOnly available for recurring plans."
1824
1830
  ).min(1).max(999).optional().nullable(),
1825
- earliestEndDate: z.date().describe(
1831
+ earliestEndDate: /* @__PURE__ */ z.date().describe(
1826
1832
  "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
1833
  ).optional().nullable(),
1828
- currentCycle: z.object({
1829
- index: z.number().int().describe(
1834
+ currentCycle: /* @__PURE__ */ z.object({
1835
+ index: /* @__PURE__ */ z.number().int().describe(
1830
1836
  "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
1837
  ).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()
1838
+ startedDate: /* @__PURE__ */ z.date().describe("Start date and time for the current payment cycle.").optional().nullable(),
1839
+ endedDate: /* @__PURE__ */ z.date().describe("End date and time for the current payment cycle.").optional().nullable()
1834
1840
  }).describe(
1835
1841
  "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
1842
  ).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(
1843
+ planName: /* @__PURE__ */ z.string().describe("Plan name at the time of purchase.").optional(),
1844
+ planDescription: /* @__PURE__ */ z.string().describe("Plan description at the time of purchase").optional(),
1845
+ planPrice: /* @__PURE__ */ z.string().describe("Plan price as it was at the moment of order creation.").optional(),
1846
+ _createdDate: /* @__PURE__ */ z.date().describe("Date and time the order was created.").optional().nullable(),
1847
+ _updatedDate: /* @__PURE__ */ z.date().describe("Date and time the order was updated.").optional().nullable(),
1848
+ formData: /* @__PURE__ */ z.object({
1849
+ formId: /* @__PURE__ */ z.string().describe(
1844
1850
  "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
1851
  ).regex(
1846
1852
  /^[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
1853
  "Must be a valid GUID"
1848
1854
  ).optional().nullable(),
1849
- submissionId: z.string().describe(
1855
+ submissionId: /* @__PURE__ */ z.string().describe(
1850
1856
  "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
1857
  ).regex(
1852
1858
  /^[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
1859
  "Must be a valid GUID"
1854
1860
  ).optional().nullable(),
1855
- submissionData: z.record(z.string(), z.any()).describe("Data submitted to the plan's order form at checkout.").optional()
1861
+ submissionData: /* @__PURE__ */ z.record(/* @__PURE__ */ z.string(), /* @__PURE__ */ z.any()).describe("Data submitted to the plan's order form at checkout.").optional()
1856
1862
  }).describe(
1857
1863
  "Information about the form submitted during the plan's checkout."
1858
1864
  ).optional()
1859
1865
  }).describe(
1860
1866
  "Order preview. This field is undefined if the member has already reached the purchase limit for the order's plan."
1861
1867
  ).optional(),
1862
- purchaseLimitExceeded: z.boolean().describe(
1868
+ purchaseLimitExceeded: /* @__PURE__ */ z.boolean().describe(
1863
1869
  "Whether the member has already reached purchase limit for the order's plan."
1864
1870
  ).optional()
1865
1871
  });
1866
1872
  var GetOfflineOrderPreviewRequest = /* @__PURE__ */ z.object({
1867
- planId: z.string().describe("ID of the plan of the previewed order.").regex(
1873
+ planId: /* @__PURE__ */ z.string().describe("ID of the plan of the previewed order.").regex(
1868
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}$/,
1869
1875
  "Must be a valid GUID"
1870
1876
  ),
1871
- memberId: z.string().describe(
1877
+ memberId: /* @__PURE__ */ z.string().describe(
1872
1878
  "Member ID of the buyer the previewed order is for, from the Members API."
1873
1879
  ).regex(
1874
1880
  /^[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
1881
  "Must be a valid GUID"
1876
1882
  ),
1877
- options: z.object({
1878
- startDate: z.date().describe(
1883
+ options: /* @__PURE__ */ z.object({
1884
+ startDate: /* @__PURE__ */ z.date().describe(
1879
1885
  "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."
1880
1886
  ).optional().nullable(),
1881
- couponCode: z.string().describe("Coupon code to apply, from the Coupons API.").min(1).max(20).optional().nullable()
1887
+ couponCode: /* @__PURE__ */ z.string().describe("Coupon code to apply, from the Coupons API.").min(1).max(20).optional().nullable()
1882
1888
  }).describe("Options for previewing the offline order. ").optional()
1883
1889
  });
1884
1890
  var GetOfflineOrderPreviewResponse = /* @__PURE__ */ z.object({
1885
- order: z.object({
1886
- _id: z.string().describe("Order ID.").regex(
1891
+ order: /* @__PURE__ */ z.object({
1892
+ _id: /* @__PURE__ */ z.string().describe("Order ID.").regex(
1887
1893
  /^[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}$/,
1888
1894
  "Must be a valid GUID"
1889
1895
  ).optional(),
1890
- planId: z.string().describe(
1896
+ planId: /* @__PURE__ */ z.string().describe(
1891
1897
  "ID of the plan purchased with the order, from the Plans API."
1892
1898
  ).regex(
1893
1899
  /^[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}$/,
1894
1900
  "Must be a valid GUID"
1895
1901
  ).optional(),
1896
- subscriptionId: z.string().describe(
1902
+ subscriptionId: /* @__PURE__ */ z.string().describe(
1897
1903
  "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)."
1898
1904
  ).regex(
1899
1905
  /^[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}$/,
1900
1906
  "Must be a valid GUID"
1901
1907
  ).optional(),
1902
- wixPayOrderId: z.string().describe(
1908
+ wixPayOrderId: /* @__PURE__ */ z.string().describe(
1903
1909
  "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."
1904
1910
  ).regex(
1905
1911
  /^[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}$/,
1906
1912
  "Must be a valid GUID"
1907
1913
  ).optional().nullable(),
1908
- buyer: z.object({
1909
- memberId: z.string().describe("Member ID for a Wix site member, from the Members API.").regex(
1914
+ buyer: /* @__PURE__ */ z.object({
1915
+ memberId: /* @__PURE__ */ z.string().describe("Member ID for a Wix site member, from the Members API.").regex(
1910
1916
  /^[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
1917
  "Must be a valid GUID"
1912
1918
  ).optional(),
1913
- contactId: z.string().describe(
1919
+ contactId: /* @__PURE__ */ z.string().describe(
1914
1920
  "Contact ID for a Wix site contact, from the Contacts API."
1915
1921
  ).regex(
1916
1922
  /^[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}$/,
@@ -1919,40 +1925,40 @@ var GetOfflineOrderPreviewResponse = /* @__PURE__ */ z.object({
1919
1925
  }).describe(
1920
1926
  "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`."
1921
1927
  ).optional(),
1922
- priceDetails: z.intersection(
1923
- z.object({
1924
- subtotal: z.string().describe(
1928
+ priceDetails: /* @__PURE__ */ z.intersection(
1929
+ /* @__PURE__ */ z.object({
1930
+ subtotal: /* @__PURE__ */ z.string().describe(
1925
1931
  'Price of the order excluding tax, specified as a monetary amount. for example, `"9.99"`.'
1926
1932
  ).optional(),
1927
- discount: z.string().describe("Total discount applied.").optional(),
1928
- tax: z.object({
1929
- name: z.string().describe("Name of the tax. For example, VAT.").optional(),
1930
- includedInPrice: z.boolean().describe(
1933
+ discount: /* @__PURE__ */ z.string().describe("Total discount applied.").optional(),
1934
+ tax: /* @__PURE__ */ z.object({
1935
+ name: /* @__PURE__ */ z.string().describe("Name of the tax. For example, VAT.").optional(),
1936
+ includedInPrice: /* @__PURE__ */ z.boolean().describe(
1931
1937
  "Whether tax is included in the original price. When `false`, tax is added at checkout."
1932
1938
  ).optional(),
1933
- rate: z.string().describe(
1939
+ rate: /* @__PURE__ */ z.string().describe(
1934
1940
  'Tax rate percentage, as a number between 0 and 100. For example, a 7% tax rate is `"7.00"`.'
1935
1941
  ).optional(),
1936
- amount: z.string().describe(
1942
+ amount: /* @__PURE__ */ z.string().describe(
1937
1943
  'Total tax, specified as a monetary amount. For example, `"3.99"`.'
1938
1944
  ).optional()
1939
1945
  }).describe("Tax applied.").optional(),
1940
- total: z.string().describe(
1946
+ total: /* @__PURE__ */ z.string().describe(
1941
1947
  '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
1948
  ).optional(),
1943
- planPrice: z.string().describe("Plan price as it was at the moment of order creation.").optional(),
1944
- currency: z.string().describe(
1949
+ planPrice: /* @__PURE__ */ z.string().describe("Plan price as it was at the moment of order creation.").optional(),
1950
+ currency: /* @__PURE__ */ z.string().describe(
1945
1951
  "Currency code. Must be valid ISO 4217 currency code (e.g., USD)."
1946
1952
  ).optional(),
1947
- freeTrialDays: z.number().int().describe(
1953
+ freeTrialDays: /* @__PURE__ */ z.number().int().describe(
1948
1954
  "Free trial period for the order in days. Only available for recurring plans."
1949
1955
  ).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(
1956
+ coupon: /* @__PURE__ */ z.object({
1957
+ code: /* @__PURE__ */ z.string().describe("Code of the applied coupon.").min(1).max(20).optional(),
1958
+ amount: /* @__PURE__ */ z.string().describe(
1953
1959
  "Total discount of the coupon, as a monetary amount."
1954
1960
  ).optional(),
1955
- _id: z.string().describe("Coupon ID.").regex(
1961
+ _id: /* @__PURE__ */ z.string().describe("Coupon ID.").regex(
1956
1962
  /^[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}$/,
1957
1963
  "Must be a valid GUID"
1958
1964
  ).optional()
@@ -1960,45 +1966,45 @@ var GetOfflineOrderPreviewResponse = /* @__PURE__ */ z.object({
1960
1966
  "Coupon applied to the order. Empty means no coupon was applied."
1961
1967
  ).optional()
1962
1968
  }),
1963
- z.xor([
1964
- z.object({
1965
- subscription: z.never().optional(),
1966
- singlePaymentForDuration: z.never().optional(),
1967
- singlePaymentUnlimited: z.never().optional()
1969
+ /* @__PURE__ */ z.xor([
1970
+ /* @__PURE__ */ z.object({
1971
+ subscription: /* @__PURE__ */ z.never().optional(),
1972
+ singlePaymentForDuration: /* @__PURE__ */ z.never().optional(),
1973
+ singlePaymentUnlimited: /* @__PURE__ */ z.never().optional()
1968
1974
  }),
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
+ /* @__PURE__ */ z.object({
1976
+ singlePaymentForDuration: /* @__PURE__ */ z.never().optional(),
1977
+ singlePaymentUnlimited: /* @__PURE__ */ z.never().optional(),
1978
+ subscription: /* @__PURE__ */ z.object({
1979
+ cycleDuration: /* @__PURE__ */ z.object({
1980
+ count: /* @__PURE__ */ z.number().int().describe(
1975
1981
  "Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`."
1976
1982
  ).min(1).optional().nullable(),
1977
- unit: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
1983
+ unit: /* @__PURE__ */ z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
1978
1984
  }).describe(
1979
1985
  "Number of payment cycles the subscription is valid for.\n`0` for unlimited plans or for plans that are valid until canceled."
1980
1986
  ).optional(),
1981
- cycleCount: z.number().int().describe(
1987
+ cycleCount: /* @__PURE__ */ z.number().int().describe(
1982
1988
  "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."
1983
1989
  ).min(0).max(2e3).optional().nullable()
1984
1990
  }).describe("Order has recurring payments.")
1985
1991
  }),
1986
- z.object({
1987
- subscription: z.never().optional(),
1988
- singlePaymentUnlimited: z.never().optional(),
1989
- singlePaymentForDuration: z.object({
1990
- count: z.number().int().describe(
1992
+ /* @__PURE__ */ z.object({
1993
+ subscription: /* @__PURE__ */ z.never().optional(),
1994
+ singlePaymentUnlimited: /* @__PURE__ */ z.never().optional(),
1995
+ singlePaymentForDuration: /* @__PURE__ */ z.object({
1996
+ count: /* @__PURE__ */ z.number().int().describe(
1991
1997
  "Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`."
1992
1998
  ).min(1).optional().nullable(),
1993
- unit: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
1999
+ unit: /* @__PURE__ */ z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
1994
2000
  }).describe(
1995
2001
  "One-time payment. Order is valid for a specified duration."
1996
2002
  )
1997
2003
  }),
1998
- z.object({
1999
- subscription: z.never().optional(),
2000
- singlePaymentForDuration: z.never().optional(),
2001
- singlePaymentUnlimited: z.boolean().describe(
2004
+ /* @__PURE__ */ z.object({
2005
+ subscription: /* @__PURE__ */ z.never().optional(),
2006
+ singlePaymentForDuration: /* @__PURE__ */ z.never().optional(),
2007
+ singlePaymentUnlimited: /* @__PURE__ */ z.boolean().describe(
2002
2008
  "One-time payment. Order is valid until it is canceled."
2003
2009
  )
2004
2010
  })
@@ -2006,105 +2012,105 @@ var GetOfflineOrderPreviewResponse = /* @__PURE__ */ z.object({
2006
2012
  ).describe(
2007
2013
  "__Deprecated.__ Use `pricing` instead. This property will be removed on September 30, 2022."
2008
2014
  ).optional(),
2009
- pricing: z.intersection(
2010
- z.object({
2011
- prices: z.array(
2012
- z.object({
2013
- duration: z.object({
2014
- cycleFrom: z.number().int().describe(
2015
+ pricing: /* @__PURE__ */ z.intersection(
2016
+ /* @__PURE__ */ z.object({
2017
+ prices: /* @__PURE__ */ z.array(
2018
+ /* @__PURE__ */ z.object({
2019
+ duration: /* @__PURE__ */ z.object({
2020
+ cycleFrom: /* @__PURE__ */ z.number().int().describe(
2015
2021
  "Price starts to apply with this cycle.\n\n`1` is the first payment cycle for all pricing models."
2016
2022
  ).optional(),
2017
- numberOfCycles: z.number().int().describe(
2023
+ numberOfCycles: /* @__PURE__ */ z.number().int().describe(
2018
2024
  "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`."
2019
2025
  ).optional().nullable()
2020
2026
  }).describe(
2021
2027
  "Cycle duration to apply `price` for.\n\nUse with all pricing models.\nCan apply the same price to multiple payment cycles."
2022
2028
  ).optional(),
2023
- price: z.object({
2024
- subtotal: z.string().describe(
2029
+ price: /* @__PURE__ */ z.object({
2030
+ subtotal: /* @__PURE__ */ z.string().describe(
2025
2031
  'Price of the order excluding tax, specified as a monetary amount. For example, `"9.99"`.'
2026
2032
  ).optional(),
2027
- coupon: z.object({
2028
- code: z.string().describe("Code of the applied coupon.").min(1).max(20).optional(),
2029
- amount: z.string().describe(
2033
+ coupon: /* @__PURE__ */ z.object({
2034
+ code: /* @__PURE__ */ z.string().describe("Code of the applied coupon.").min(1).max(20).optional(),
2035
+ amount: /* @__PURE__ */ z.string().describe(
2030
2036
  "Total discount of the coupon, as a monetary amount."
2031
2037
  ).optional(),
2032
- _id: z.string().describe("Coupon ID.").regex(
2038
+ _id: /* @__PURE__ */ z.string().describe("Coupon ID.").regex(
2033
2039
  /^[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}$/,
2034
2040
  "Must be a valid GUID"
2035
2041
  ).optional()
2036
2042
  }).describe(
2037
2043
  "Coupon applied to the order, from the Coupons API."
2038
2044
  ).optional(),
2039
- discount: z.string().describe("Total discount applied to the order.").optional(),
2040
- tax: z.object({
2041
- name: z.string().describe("Name of the tax. For example, VAT.").optional(),
2042
- includedInPrice: z.boolean().describe(
2045
+ discount: /* @__PURE__ */ z.string().describe("Total discount applied to the order.").optional(),
2046
+ tax: /* @__PURE__ */ z.object({
2047
+ name: /* @__PURE__ */ z.string().describe("Name of the tax. For example, VAT.").optional(),
2048
+ includedInPrice: /* @__PURE__ */ z.boolean().describe(
2043
2049
  "Whether tax is included in the original price. When `false`, tax is added at checkout."
2044
2050
  ).optional(),
2045
- rate: z.string().describe(
2051
+ rate: /* @__PURE__ */ z.string().describe(
2046
2052
  'Tax rate percentage, as a number between 0 and 100. For example, a 7% tax rate is `"7.00"`.'
2047
2053
  ).optional(),
2048
- amount: z.string().describe(
2054
+ amount: /* @__PURE__ */ z.string().describe(
2049
2055
  'Total tax, specified as a monetary amount. For example, `"3.99"`.'
2050
2056
  ).optional()
2051
2057
  }).describe(
2052
2058
  "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)."
2053
2059
  ).optional(),
2054
- total: z.string().describe(
2060
+ total: /* @__PURE__ */ z.string().describe(
2055
2061
  '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
2062
  ).optional(),
2057
- currency: z.string().describe(
2063
+ currency: /* @__PURE__ */ z.string().describe(
2058
2064
  "Three-letter currency code in\n[ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format."
2059
2065
  ).optional(),
2060
- proration: z.string().describe(
2066
+ proration: /* @__PURE__ */ z.string().describe(
2061
2067
  "Price change after billing date was change and price was adjusted. Could be positive and negative values."
2062
2068
  ).optional()
2063
2069
  }).describe("Order price.").optional()
2064
2070
  })
2065
2071
  ).optional()
2066
2072
  }),
2067
- z.xor([
2068
- z.object({
2069
- subscription: z.never().optional(),
2070
- singlePaymentForDuration: z.never().optional(),
2071
- singlePaymentUnlimited: z.never().optional()
2073
+ /* @__PURE__ */ z.xor([
2074
+ /* @__PURE__ */ z.object({
2075
+ subscription: /* @__PURE__ */ z.never().optional(),
2076
+ singlePaymentForDuration: /* @__PURE__ */ z.never().optional(),
2077
+ singlePaymentUnlimited: /* @__PURE__ */ z.never().optional()
2072
2078
  }),
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
+ /* @__PURE__ */ z.object({
2080
+ singlePaymentForDuration: /* @__PURE__ */ z.never().optional(),
2081
+ singlePaymentUnlimited: /* @__PURE__ */ z.never().optional(),
2082
+ subscription: /* @__PURE__ */ z.object({
2083
+ cycleDuration: /* @__PURE__ */ z.object({
2084
+ count: /* @__PURE__ */ z.number().int().describe(
2079
2085
  "Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`."
2080
2086
  ).min(1).optional().nullable(),
2081
- unit: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
2087
+ unit: /* @__PURE__ */ z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
2082
2088
  }).describe(
2083
2089
  "Number of payment cycles the subscription is valid for.\n`0` for unlimited plans or for plans that are valid until canceled."
2084
2090
  ).optional(),
2085
- cycleCount: z.number().int().describe(
2091
+ cycleCount: /* @__PURE__ */ z.number().int().describe(
2086
2092
  "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
2093
  ).min(0).max(2e3).optional().nullable()
2088
2094
  }).describe(
2089
2095
  "Pricing model for an order with recurring payment cycles."
2090
2096
  )
2091
2097
  }),
2092
- z.object({
2093
- subscription: z.never().optional(),
2094
- singlePaymentUnlimited: z.never().optional(),
2095
- singlePaymentForDuration: z.object({
2096
- count: z.number().int().describe(
2098
+ /* @__PURE__ */ z.object({
2099
+ subscription: /* @__PURE__ */ z.never().optional(),
2100
+ singlePaymentUnlimited: /* @__PURE__ */ z.never().optional(),
2101
+ singlePaymentForDuration: /* @__PURE__ */ z.object({
2102
+ count: /* @__PURE__ */ z.number().int().describe(
2097
2103
  "Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`."
2098
2104
  ).min(1).optional().nullable(),
2099
- unit: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
2105
+ unit: /* @__PURE__ */ z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
2100
2106
  }).describe(
2101
2107
  "Pricing model for an order with a one-time payment and the order is valid for a specific amount of time."
2102
2108
  )
2103
2109
  }),
2104
- z.object({
2105
- subscription: z.never().optional(),
2106
- singlePaymentForDuration: z.never().optional(),
2107
- singlePaymentUnlimited: z.boolean().describe(
2110
+ /* @__PURE__ */ z.object({
2111
+ subscription: /* @__PURE__ */ z.never().optional(),
2112
+ singlePaymentForDuration: /* @__PURE__ */ z.never().optional(),
2113
+ singlePaymentUnlimited: /* @__PURE__ */ z.boolean().describe(
2108
2114
  "Pricing model for an order with a one-time payment and the order is valid until canceled."
2109
2115
  )
2110
2116
  })
@@ -2112,8 +2118,8 @@ var GetOfflineOrderPreviewResponse = /* @__PURE__ */ z.object({
2112
2118
  ).describe(
2113
2119
  "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
2120
  ).optional(),
2115
- type: z.enum(["UNDEFINED", "ONLINE", "OFFLINE", "EXTERNAL"]).describe("How the order was processed.").optional(),
2116
- status: z.enum([
2121
+ type: /* @__PURE__ */ z.enum(["UNDEFINED", "ONLINE", "OFFLINE", "EXTERNAL"]).describe("How the order was processed.").optional(),
2122
+ status: /* @__PURE__ */ z.enum([
2117
2123
  "UNDEFINED",
2118
2124
  "DRAFT",
2119
2125
  "PENDING",
@@ -2122,12 +2128,12 @@ var GetOfflineOrderPreviewResponse = /* @__PURE__ */ z.object({
2122
2128
  "ENDED",
2123
2129
  "CANCELED"
2124
2130
  ]).describe("Status of the order.").optional(),
2125
- autoRenewCanceled: z.boolean().describe(
2131
+ autoRenewCanceled: /* @__PURE__ */ z.boolean().describe(
2126
2132
  "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
2133
  ).optional().nullable(),
2128
- cancellation: z.object({
2129
- requestedDate: z.date().describe("Date and time the cancellation was requested.").optional().nullable(),
2130
- cause: z.enum([
2134
+ cancellation: /* @__PURE__ */ z.object({
2135
+ requestedDate: /* @__PURE__ */ z.date().describe("Date and time the cancellation was requested.").optional().nullable(),
2136
+ cause: /* @__PURE__ */ z.enum([
2131
2137
  "UNDEFINED",
2132
2138
  "OWNER_ACTION",
2133
2139
  "MEMBER_ACTION",
@@ -2135,13 +2141,13 @@ var GetOfflineOrderPreviewResponse = /* @__PURE__ */ z.object({
2135
2141
  "PAYMENT_SETUP_FAILURE",
2136
2142
  "UNKNOWN"
2137
2143
  ]).describe("Reason for the cancellation.").optional(),
2138
- effectiveAt: z.enum(["UNDEFINED", "IMMEDIATELY", "NEXT_PAYMENT_DATE"]).describe(
2144
+ effectiveAt: /* @__PURE__ */ z.enum(["UNDEFINED", "IMMEDIATELY", "NEXT_PAYMENT_DATE"]).describe(
2139
2145
  "When the cancellation takes effect. Set when cancelling the order."
2140
2146
  ).optional()
2141
2147
  }).describe(
2142
2148
  "Details about the cancellation of an order.\n\nOnly present if the status is `CANCELED`."
2143
2149
  ).optional(),
2144
- lastPaymentStatus: z.enum([
2150
+ lastPaymentStatus: /* @__PURE__ */ z.enum([
2145
2151
  "UNDEFINED",
2146
2152
  "PAID",
2147
2153
  "REFUNDED",
@@ -2152,103 +2158,103 @@ var GetOfflineOrderPreviewResponse = /* @__PURE__ */ z.object({
2152
2158
  ]).describe(
2153
2159
  "Status of the last payment for the order.\nUpdated automatically for online orders. Updated manually by the Wix user for offline orders."
2154
2160
  ).optional(),
2155
- startDate: z.date().describe("Start date and time for the ordered plan.").optional().nullable(),
2156
- endDate: z.date().describe(
2161
+ startDate: /* @__PURE__ */ z.date().describe("Start date and time for the ordered plan.").optional().nullable(),
2162
+ endDate: /* @__PURE__ */ z.date().describe(
2157
2163
  "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`."
2158
2164
  ).optional().nullable(),
2159
- pausePeriods: z.array(
2160
- z.object({
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(
2165
+ pausePeriods: /* @__PURE__ */ z.array(
2166
+ /* @__PURE__ */ z.object({
2167
+ status: /* @__PURE__ */ z.enum(["UNDEFINED", "ACTIVE", "ENDED"]).describe("Status of the pause period.").optional(),
2168
+ pauseDate: /* @__PURE__ */ z.date().describe("Start date and time of the pause period.").optional().nullable(),
2169
+ resumeDate: /* @__PURE__ */ z.date().describe(
2164
2170
  "End date and time of the pause period.\n\nOmitted while the pause period remains `ACTIVE`."
2165
2171
  ).optional().nullable()
2166
2172
  })
2167
2173
  ).optional(),
2168
- freeTrialDays: z.number().int().describe(
2174
+ freeTrialDays: /* @__PURE__ */ z.number().int().describe(
2169
2175
  "Free trial period for the order, in days.\n\nOnly available for recurring plans."
2170
2176
  ).min(1).max(999).optional().nullable(),
2171
- earliestEndDate: z.date().describe(
2177
+ earliestEndDate: /* @__PURE__ */ z.date().describe(
2172
2178
  "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."
2173
2179
  ).optional().nullable(),
2174
- currentCycle: z.object({
2175
- index: z.number().int().describe(
2180
+ currentCycle: /* @__PURE__ */ z.object({
2181
+ index: /* @__PURE__ */ z.number().int().describe(
2176
2182
  "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`."
2177
2183
  ).min(0).optional(),
2178
- startedDate: z.date().describe("Start date and time for the current payment cycle.").optional().nullable(),
2179
- endedDate: z.date().describe("End date and time for the current payment cycle.").optional().nullable()
2184
+ startedDate: /* @__PURE__ */ z.date().describe("Start date and time for the current payment cycle.").optional().nullable(),
2185
+ endedDate: /* @__PURE__ */ z.date().describe("End date and time for the current payment cycle.").optional().nullable()
2180
2186
  }).describe(
2181
2187
  "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
2188
  ).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(
2189
+ planName: /* @__PURE__ */ z.string().describe("Plan name at the time of purchase.").optional(),
2190
+ planDescription: /* @__PURE__ */ z.string().describe("Plan description at the time of purchase").optional(),
2191
+ planPrice: /* @__PURE__ */ z.string().describe("Plan price as it was at the moment of order creation.").optional(),
2192
+ _createdDate: /* @__PURE__ */ z.date().describe("Date and time the order was created.").optional().nullable(),
2193
+ _updatedDate: /* @__PURE__ */ z.date().describe("Date and time the order was updated.").optional().nullable(),
2194
+ formData: /* @__PURE__ */ z.object({
2195
+ formId: /* @__PURE__ */ z.string().describe(
2190
2196
  "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
2197
  ).regex(
2192
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}$/,
2193
2199
  "Must be a valid GUID"
2194
2200
  ).optional().nullable(),
2195
- submissionId: z.string().describe(
2201
+ submissionId: /* @__PURE__ */ z.string().describe(
2196
2202
  "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
2203
  ).regex(
2198
2204
  /^[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
2205
  "Must be a valid GUID"
2200
2206
  ).optional().nullable(),
2201
- submissionData: z.record(z.string(), z.any()).describe("Data submitted to the plan's order form at checkout.").optional()
2207
+ submissionData: /* @__PURE__ */ z.record(/* @__PURE__ */ z.string(), /* @__PURE__ */ z.any()).describe("Data submitted to the plan's order form at checkout.").optional()
2202
2208
  }).describe(
2203
2209
  "Information about the form submitted during the plan's checkout."
2204
2210
  ).optional()
2205
2211
  }).describe("The previewed order, as if the plan had been ordered.").optional(),
2206
- purchaseLimitExceeded: z.boolean().describe(
2212
+ purchaseLimitExceeded: /* @__PURE__ */ z.boolean().describe(
2207
2213
  "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."
2208
2214
  ).optional()
2209
2215
  });
2210
2216
  var GetPricePreviewRequest = /* @__PURE__ */ z.object({
2211
- planId: z.string().describe("ID of plan to preview.").regex(
2217
+ planId: /* @__PURE__ */ z.string().describe("ID of plan to preview.").regex(
2212
2218
  /^[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
2219
  "Must be a valid GUID"
2214
2220
  ),
2215
- options: z.object({
2216
- couponCode: z.string().describe("Coupon code to apply, from the Coupons API.").min(1).max(20).optional().nullable()
2221
+ options: /* @__PURE__ */ z.object({
2222
+ couponCode: /* @__PURE__ */ z.string().describe("Coupon code to apply, from the Coupons API.").min(1).max(20).optional().nullable()
2217
2223
  }).describe("Options for getting a price preview. ").optional()
2218
2224
  });
2219
2225
  var GetPricePreviewResponse = /* @__PURE__ */ z.object({
2220
- price: z.intersection(
2221
- z.object({
2222
- subtotal: z.string().describe(
2226
+ price: /* @__PURE__ */ z.intersection(
2227
+ /* @__PURE__ */ z.object({
2228
+ subtotal: /* @__PURE__ */ z.string().describe(
2223
2229
  'Price of the order excluding tax, specified as a monetary amount. for example, `"9.99"`.'
2224
2230
  ).optional(),
2225
- discount: z.string().describe("Total discount applied.").optional(),
2226
- tax: z.object({
2227
- name: z.string().describe("Name of the tax. For example, VAT.").optional(),
2228
- includedInPrice: z.boolean().describe(
2231
+ discount: /* @__PURE__ */ z.string().describe("Total discount applied.").optional(),
2232
+ tax: /* @__PURE__ */ z.object({
2233
+ name: /* @__PURE__ */ z.string().describe("Name of the tax. For example, VAT.").optional(),
2234
+ includedInPrice: /* @__PURE__ */ z.boolean().describe(
2229
2235
  "Whether tax is included in the original price. When `false`, tax is added at checkout."
2230
2236
  ).optional(),
2231
- rate: z.string().describe(
2237
+ rate: /* @__PURE__ */ z.string().describe(
2232
2238
  'Tax rate percentage, as a number between 0 and 100. For example, a 7% tax rate is `"7.00"`.'
2233
2239
  ).optional(),
2234
- amount: z.string().describe(
2240
+ amount: /* @__PURE__ */ z.string().describe(
2235
2241
  'Total tax, specified as a monetary amount. For example, `"3.99"`.'
2236
2242
  ).optional()
2237
2243
  }).describe("Tax applied.").optional(),
2238
- total: z.string().describe(
2244
+ total: /* @__PURE__ */ z.string().describe(
2239
2245
  '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`.'
2240
2246
  ).optional(),
2241
- planPrice: z.string().describe("Plan price as it was at the moment of order creation.").optional(),
2242
- currency: z.string().describe(
2247
+ planPrice: /* @__PURE__ */ z.string().describe("Plan price as it was at the moment of order creation.").optional(),
2248
+ currency: /* @__PURE__ */ z.string().describe(
2243
2249
  "Currency code. Must be valid ISO 4217 currency code (e.g., USD)."
2244
2250
  ).optional(),
2245
- freeTrialDays: z.number().int().describe(
2251
+ freeTrialDays: /* @__PURE__ */ z.number().int().describe(
2246
2252
  "Free trial period for the order in days. Only available for recurring plans."
2247
2253
  ).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(
2254
+ coupon: /* @__PURE__ */ z.object({
2255
+ code: /* @__PURE__ */ z.string().describe("Code of the applied coupon.").min(1).max(20).optional(),
2256
+ amount: /* @__PURE__ */ z.string().describe("Total discount of the coupon, as a monetary amount.").optional(),
2257
+ _id: /* @__PURE__ */ z.string().describe("Coupon ID.").regex(
2252
2258
  /^[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
2259
  "Must be a valid GUID"
2254
2260
  ).optional()
@@ -2256,98 +2262,98 @@ var GetPricePreviewResponse = /* @__PURE__ */ z.object({
2256
2262
  "Coupon applied to the order. Empty means no coupon was applied."
2257
2263
  ).optional()
2258
2264
  }),
2259
- z.xor([
2260
- z.object({
2261
- subscription: z.never().optional(),
2262
- singlePaymentForDuration: z.never().optional(),
2263
- singlePaymentUnlimited: z.never().optional()
2265
+ /* @__PURE__ */ z.xor([
2266
+ /* @__PURE__ */ z.object({
2267
+ subscription: /* @__PURE__ */ z.never().optional(),
2268
+ singlePaymentForDuration: /* @__PURE__ */ z.never().optional(),
2269
+ singlePaymentUnlimited: /* @__PURE__ */ z.never().optional()
2264
2270
  }),
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
+ /* @__PURE__ */ z.object({
2272
+ singlePaymentForDuration: /* @__PURE__ */ z.never().optional(),
2273
+ singlePaymentUnlimited: /* @__PURE__ */ z.never().optional(),
2274
+ subscription: /* @__PURE__ */ z.object({
2275
+ cycleDuration: /* @__PURE__ */ z.object({
2276
+ count: /* @__PURE__ */ z.number().int().describe(
2271
2277
  "Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`."
2272
2278
  ).min(1).optional().nullable(),
2273
- unit: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
2279
+ unit: /* @__PURE__ */ z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
2274
2280
  }).describe(
2275
2281
  "Number of payment cycles the subscription is valid for.\n`0` for unlimited plans or for plans that are valid until canceled."
2276
2282
  ).optional(),
2277
- cycleCount: z.number().int().describe(
2283
+ cycleCount: /* @__PURE__ */ z.number().int().describe(
2278
2284
  "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
2285
  ).min(0).max(2e3).optional().nullable()
2280
2286
  }).describe("Order has recurring payments.")
2281
2287
  }),
2282
- z.object({
2283
- subscription: z.never().optional(),
2284
- singlePaymentUnlimited: z.never().optional(),
2285
- singlePaymentForDuration: z.object({
2286
- count: z.number().int().describe(
2288
+ /* @__PURE__ */ z.object({
2289
+ subscription: /* @__PURE__ */ z.never().optional(),
2290
+ singlePaymentUnlimited: /* @__PURE__ */ z.never().optional(),
2291
+ singlePaymentForDuration: /* @__PURE__ */ z.object({
2292
+ count: /* @__PURE__ */ z.number().int().describe(
2287
2293
  "Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`."
2288
2294
  ).min(1).optional().nullable(),
2289
- unit: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
2295
+ unit: /* @__PURE__ */ z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
2290
2296
  }).describe(
2291
2297
  "One-time payment. Order is valid for a specified duration."
2292
2298
  )
2293
2299
  }),
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.")
2300
+ /* @__PURE__ */ z.object({
2301
+ subscription: /* @__PURE__ */ z.never().optional(),
2302
+ singlePaymentForDuration: /* @__PURE__ */ z.never().optional(),
2303
+ singlePaymentUnlimited: /* @__PURE__ */ z.boolean().describe("One-time payment. Order is valid until it is canceled.")
2298
2304
  })
2299
2305
  ])
2300
2306
  ).describe(
2301
2307
  "__Deprecated.__ Use `prices` instead. This property will be removed on September 30, 2022."
2302
2308
  ).optional(),
2303
- prices: z.array(
2304
- z.object({
2305
- duration: z.object({
2306
- cycleFrom: z.number().int().describe(
2309
+ prices: /* @__PURE__ */ z.array(
2310
+ /* @__PURE__ */ z.object({
2311
+ duration: /* @__PURE__ */ z.object({
2312
+ cycleFrom: /* @__PURE__ */ z.number().int().describe(
2307
2313
  "Price starts to apply with this cycle.\n\n`1` is the first payment cycle for all pricing models."
2308
2314
  ).optional(),
2309
- numberOfCycles: z.number().int().describe(
2315
+ numberOfCycles: /* @__PURE__ */ z.number().int().describe(
2310
2316
  "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
2317
  ).optional().nullable()
2312
2318
  }).describe(
2313
2319
  "Cycle duration to apply `price` for.\n\nUse with all pricing models.\nCan apply the same price to multiple payment cycles."
2314
2320
  ).optional(),
2315
- price: z.object({
2316
- subtotal: z.string().describe(
2321
+ price: /* @__PURE__ */ z.object({
2322
+ subtotal: /* @__PURE__ */ z.string().describe(
2317
2323
  'Price of the order excluding tax, specified as a monetary amount. For example, `"9.99"`.'
2318
2324
  ).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(
2325
+ coupon: /* @__PURE__ */ z.object({
2326
+ code: /* @__PURE__ */ z.string().describe("Code of the applied coupon.").min(1).max(20).optional(),
2327
+ amount: /* @__PURE__ */ z.string().describe(
2322
2328
  "Total discount of the coupon, as a monetary amount."
2323
2329
  ).optional(),
2324
- _id: z.string().describe("Coupon ID.").regex(
2330
+ _id: /* @__PURE__ */ z.string().describe("Coupon ID.").regex(
2325
2331
  /^[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
2332
  "Must be a valid GUID"
2327
2333
  ).optional()
2328
2334
  }).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(
2335
+ discount: /* @__PURE__ */ z.string().describe("Total discount applied to the order.").optional(),
2336
+ tax: /* @__PURE__ */ z.object({
2337
+ name: /* @__PURE__ */ z.string().describe("Name of the tax. For example, VAT.").optional(),
2338
+ includedInPrice: /* @__PURE__ */ z.boolean().describe(
2333
2339
  "Whether tax is included in the original price. When `false`, tax is added at checkout."
2334
2340
  ).optional(),
2335
- rate: z.string().describe(
2341
+ rate: /* @__PURE__ */ z.string().describe(
2336
2342
  'Tax rate percentage, as a number between 0 and 100. For example, a 7% tax rate is `"7.00"`.'
2337
2343
  ).optional(),
2338
- amount: z.string().describe(
2344
+ amount: /* @__PURE__ */ z.string().describe(
2339
2345
  'Total tax, specified as a monetary amount. For example, `"3.99"`.'
2340
2346
  ).optional()
2341
2347
  }).describe(
2342
2348
  "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
2349
  ).optional(),
2344
- total: z.string().describe(
2350
+ total: /* @__PURE__ */ z.string().describe(
2345
2351
  '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
2352
  ).optional(),
2347
- currency: z.string().describe(
2353
+ currency: /* @__PURE__ */ z.string().describe(
2348
2354
  "Three-letter currency code in\n[ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format."
2349
2355
  ).optional(),
2350
- proration: z.string().describe(
2356
+ proration: /* @__PURE__ */ z.string().describe(
2351
2357
  "Price change after billing date was change and price was adjusted. Could be positive and negative values."
2352
2358
  ).optional()
2353
2359
  }).describe("Order price.").optional()
@@ -2355,77 +2361,79 @@ var GetPricePreviewResponse = /* @__PURE__ */ z.object({
2355
2361
  ).optional()
2356
2362
  });
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({ fieldSet: z.enum(["UNKNOWN_SET", "BASIC", "FULL"]).optional() }).describe("Options for getting a logged-in member's order. ").optional()
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(["UNDEFINED", "IMMEDIATELY", "NEXT_PAYMENT_DATE"])
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: