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