@wix/auto_sdk_packages_packages 1.0.21 → 1.0.23

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.
@@ -0,0 +1,1539 @@
1
+ // src/premium-reseller-v1-packages-packages.schemas.ts
2
+ import * as z from "zod";
3
+ var CreatePackageRequest = z.object({
4
+ options: z.object({
5
+ idempotencyKey: z.string().describe("Idempotency key.").max(100).optional().nullable(),
6
+ externalId: z.string().describe(
7
+ "External reference. For example, an external subscription ID. **Note:** This field is not validated by Wix."
8
+ ).max(100).optional().nullable(),
9
+ products: z.array(
10
+ z.intersection(
11
+ z.object({
12
+ instanceId: z.string().describe(
13
+ "ID of the instance of the resold Wix service. **Note:** Differs from the\n`catalogProductId`. Allows you to identify different instances of the same\nproduct in a package."
14
+ ).regex(
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}$/,
16
+ "Must be a valid GUID"
17
+ ).optional(),
18
+ siteId: z.string().describe(
19
+ "ID of the Wix site that the product instance is assigned to.\nSee the [Query Sites API](https://dev.wix.com/api/rest/account-level-apis/sites/query-sites)\nfor more information."
20
+ ).regex(
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}$/,
22
+ "Must be a valid GUID"
23
+ ).optional().nullable(),
24
+ catalogProductId: z.string().describe(
25
+ "Product ID, as defined in the Wix Premium Product Catalog.\nContact the [Wix B2B sales team](mailto:bizdev@wix.com)\nfor more details about available Wix services."
26
+ ).regex(
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}$/,
28
+ "Must be a valid GUID"
29
+ ).optional(),
30
+ status: z.enum([
31
+ "PENDING",
32
+ "ENABLED",
33
+ "CANCELED",
34
+ "FAILED",
35
+ "AWAITING_ACTION"
36
+ ]).optional(),
37
+ failure: z.object({
38
+ code: z.enum(["DELIVERY_TIMEOUT", "EXTERNAL_FAILURE"]).optional(),
39
+ message: z.string().describe("Failure message.").optional()
40
+ }).describe(
41
+ "Failure object. Only present for status `FAILED`. Describes why the product instance `FAILED`."
42
+ ).optional(),
43
+ _createdDate: z.date().describe("Date and time the product instance was created.").optional().nullable(),
44
+ _updatedDate: z.date().describe("Date and time the product instance was last updated.").optional().nullable(),
45
+ countryCode: z.string().describe(
46
+ "Two-letter country code in\n[ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements)\nformat. Specifies where customers can claim vouchers that may come with the\nproduct. Contact the [Wix B2B sales team](mailto:bizdev@wix.com) to get more\ninformation about vouchers and supported locations."
47
+ ).optional().nullable(),
48
+ expirationDate: z.date().describe(
49
+ "Date and time the product instance expires in `YYYY-MM-DDThh:mm:ss.sssZ` format.\nUsed only for instances that don't auto renew at the end of the current billing cycle."
50
+ ).optional().nullable(),
51
+ discountCode: z.string().describe(
52
+ "Discount code indicating that the reseller provisioned the product instance\nduring a sale. Wix doesn't guarantee that a discount code reduces the\nprice between Wix and the reseller, even when it's valid. Contact the\n[Wix B2B sales team](mailto:bizdev@wix.com) for more information.\n\nMax: 25 characters"
53
+ ).max(25).optional().nullable(),
54
+ referenceProductInstanceId: z.string().describe(
55
+ 'ID of a different product instance that you can use to offer your customers\ntime-limited free access to an additional product or service. For example,\nWix offers a 1-year free domain registration to all customers who purchase a\nPremium plan. The referenced product instance must have either status `"PENDING"` or\n`"ACTIVE"`. You can use each product instance only a single time as reference\ninstance.'
56
+ ).regex(
57
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
58
+ "Must be a valid GUID"
59
+ ).optional().nullable()
60
+ }),
61
+ z.xor([
62
+ z.object({ billingInfo: z.never().optional() }),
63
+ z.object({
64
+ billingInfo: z.object({
65
+ type: z.enum(["ONE_TIME", "RECURRING"]).describe("Payment type.").optional(),
66
+ cycleDuration: z.object({
67
+ unit: z.enum(["DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of the billing cycle.").optional(),
68
+ count: z.number().int().describe(
69
+ "Count of units that make up the billing cycle."
70
+ ).min(1).optional()
71
+ }).describe(
72
+ "Duration of the billing cycle. Available only for `RECURRING` payments."
73
+ ).optional()
74
+ }).describe(
75
+ "Billing information for the contract between the reseller and Wix."
76
+ )
77
+ })
78
+ ])
79
+ )
80
+ ).max(1e3).min(1)
81
+ })
82
+ });
83
+ var CreatePackageResponse = z.object({
84
+ idempotencyKey: z.string().describe("Idempotency key.").max(100).optional().nullable(),
85
+ package: z.object({
86
+ _id: z.string().describe("Package ID.").regex(
87
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
88
+ "Must be a valid GUID"
89
+ ).optional(),
90
+ accountId: z.string().describe(
91
+ "Wix account ID. See\n[Account Level APIs](https://dev.wix.com/docs/rest/account-level/about-account-level-apis)\nfor more details."
92
+ ).regex(
93
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
94
+ "Must be a valid GUID"
95
+ ).optional(),
96
+ externalId: z.string().describe(
97
+ "External reference. For example, an external subscription ID.\nThis field isn't validated by Wix.\n\nMax: 100 characters"
98
+ ).max(100).optional().nullable(),
99
+ productInstances: z.array(
100
+ z.intersection(
101
+ z.object({
102
+ instanceId: z.string().describe(
103
+ "ID of the instance of the resold Wix service. **Note:** Differs from the\n`catalogProductId`. Allows you to identify different instances of the same\nproduct in a package."
104
+ ).regex(
105
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
106
+ "Must be a valid GUID"
107
+ ).optional(),
108
+ siteId: z.string().describe(
109
+ "ID of the Wix site that the product instance is assigned to.\nSee the [Query Sites API](https://dev.wix.com/api/rest/account-level-apis/sites/query-sites)\nfor more information."
110
+ ).regex(
111
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
112
+ "Must be a valid GUID"
113
+ ).optional().nullable(),
114
+ catalogProductId: z.string().describe(
115
+ "Product ID, as defined in the Wix Premium Product Catalog.\nContact the [Wix B2B sales team](mailto:bizdev@wix.com)\nfor more details about available Wix services."
116
+ ).regex(
117
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
118
+ "Must be a valid GUID"
119
+ ).optional(),
120
+ status: z.enum([
121
+ "PENDING",
122
+ "ENABLED",
123
+ "CANCELED",
124
+ "FAILED",
125
+ "AWAITING_ACTION"
126
+ ]).describe("Status of the product instance.").optional(),
127
+ failure: z.object({
128
+ code: z.enum(["DELIVERY_TIMEOUT", "EXTERNAL_FAILURE"]).describe("Failure code.").optional(),
129
+ message: z.string().describe("Failure message.").optional()
130
+ }).describe(
131
+ "Failure object. Only present for status `FAILED`. Describes why the product instance `FAILED`."
132
+ ).optional(),
133
+ _createdDate: z.date().describe("Date and time the product instance was created.").optional().nullable(),
134
+ _updatedDate: z.date().describe(
135
+ "Date and time the product instance was last updated."
136
+ ).optional().nullable(),
137
+ countryCode: z.string().describe(
138
+ "Two-letter country code in\n[ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements)\nformat. Specifies where customers can claim vouchers that may come with the\nproduct. Contact the [Wix B2B sales team](mailto:bizdev@wix.com) to get more\ninformation about vouchers and supported locations."
139
+ ).optional().nullable(),
140
+ expirationDate: z.date().describe(
141
+ "Date and time the product instance expires in `YYYY-MM-DDThh:mm:ss.sssZ` format.\nUsed only for instances that don't auto renew at the end of the current billing cycle."
142
+ ).optional().nullable(),
143
+ discountCode: z.string().describe(
144
+ "Discount code indicating that the reseller provisioned the product instance\nduring a sale. Wix doesn't guarantee that a discount code reduces the\nprice between Wix and the reseller, even when it's valid. Contact the\n[Wix B2B sales team](mailto:bizdev@wix.com) for more information.\n\nMax: 25 characters"
145
+ ).max(25).optional().nullable(),
146
+ referenceProductInstanceId: z.string().describe(
147
+ 'ID of a different product instance that you can use to offer your customers\ntime-limited free access to an additional product or service. For example,\nWix offers a 1-year free domain registration to all customers who purchase a\nPremium plan. The referenced product instance must have either status `"PENDING"` or\n`"ACTIVE"`. You can use each product instance only a single time as reference\ninstance.'
148
+ ).regex(
149
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
150
+ "Must be a valid GUID"
151
+ ).optional().nullable()
152
+ }),
153
+ z.xor([
154
+ z.object({ billingInfo: z.never().optional() }),
155
+ z.object({
156
+ billingInfo: z.object({
157
+ type: z.enum(["ONE_TIME", "RECURRING"]).describe("Payment type.").optional(),
158
+ cycleDuration: z.object({
159
+ unit: z.enum(["DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of the billing cycle.").optional(),
160
+ count: z.number().int().describe(
161
+ "Count of units that make up the billing cycle."
162
+ ).min(1).optional()
163
+ }).describe(
164
+ "Duration of the billing cycle. Available only for `RECURRING` payments."
165
+ ).optional()
166
+ }).describe(
167
+ "Billing information for the contract between the reseller and Wix."
168
+ )
169
+ })
170
+ ])
171
+ )
172
+ ).max(1e3).min(1).optional(),
173
+ _createdDate: z.date().describe("Date and time the package was created.").optional().nullable(),
174
+ _updatedDate: z.date().describe("Date and time the package was last updated.").optional().nullable()
175
+ }).describe("Created package.").optional()
176
+ });
177
+ var CreatePackageV2Request = z.object({
178
+ options: z.object({
179
+ idempotencyKey: z.string().describe("Idempotency key.").max(100).optional().nullable(),
180
+ externalId: z.string().describe(
181
+ "External reference. For example, an external subscription ID. **Note:** This field is not validated by Wix."
182
+ ).max(100).optional().nullable(),
183
+ products: z.array(
184
+ z.intersection(
185
+ z.object({
186
+ instanceId: z.string().describe(
187
+ "ID of the instance of the resold Wix service. **Note:** Differs from the\n`catalogProductId`. Allows you to identify different instances of the same\nproduct in a package."
188
+ ).regex(
189
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
190
+ "Must be a valid GUID"
191
+ ).optional(),
192
+ siteId: z.string().describe(
193
+ "ID of the Wix site that the product instance is assigned to.\nSee the [Query Sites API](https://dev.wix.com/api/rest/account-level-apis/sites/query-sites)\nfor more information."
194
+ ).regex(
195
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
196
+ "Must be a valid GUID"
197
+ ).optional().nullable(),
198
+ catalogProductId: z.string().describe(
199
+ "Product ID, as defined in the Wix Premium Product Catalog.\nContact the [Wix B2B sales team](mailto:bizdev@wix.com)\nfor more details about available Wix services."
200
+ ).regex(
201
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
202
+ "Must be a valid GUID"
203
+ ).optional(),
204
+ status: z.enum([
205
+ "PENDING",
206
+ "ENABLED",
207
+ "CANCELED",
208
+ "FAILED",
209
+ "AWAITING_ACTION"
210
+ ]).optional(),
211
+ failure: z.object({
212
+ code: z.enum(["DELIVERY_TIMEOUT", "EXTERNAL_FAILURE"]).optional(),
213
+ message: z.string().describe("Failure message.").optional()
214
+ }).describe(
215
+ "Failure object. Only present for status `FAILED`. Describes why the product instance `FAILED`."
216
+ ).optional(),
217
+ _createdDate: z.date().describe("Date and time the product instance was created.").optional().nullable(),
218
+ _updatedDate: z.date().describe("Date and time the product instance was last updated.").optional().nullable(),
219
+ countryCode: z.string().describe(
220
+ "Two-letter country code in\n[ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements)\nformat. Specifies where customers can claim vouchers that may come with the\nproduct. Contact the [Wix B2B sales team](mailto:bizdev@wix.com) to get more\ninformation about vouchers and supported locations."
221
+ ),
222
+ expirationDate: z.date().describe(
223
+ "Date and time the product instance expires in `YYYY-MM-DDThh:mm:ss.sssZ` format.\nUsed only for instances that don't auto renew at the end of the current billing cycle."
224
+ ).optional().nullable(),
225
+ discountCode: z.string().describe(
226
+ "Discount code indicating that the reseller provisioned the product instance\nduring a sale. Wix doesn't guarantee that a discount code reduces the\nprice between Wix and the reseller, even when it's valid. Contact the\n[Wix B2B sales team](mailto:bizdev@wix.com) for more information.\n\nMax: 25 characters"
227
+ ).max(25).optional().nullable(),
228
+ referenceProductInstanceId: z.string().describe(
229
+ 'ID of a different product instance that you can use to offer your customers\ntime-limited free access to an additional product or service. For example,\nWix offers a 1-year free domain registration to all customers who purchase a\nPremium plan. The referenced product instance must have either status `"PENDING"` or\n`"ACTIVE"`. You can use each product instance only a single time as reference\ninstance.'
230
+ ).regex(
231
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
232
+ "Must be a valid GUID"
233
+ ).optional().nullable()
234
+ }),
235
+ z.xor([
236
+ z.object({ billingInfo: z.never().optional() }),
237
+ z.object({
238
+ billingInfo: z.object({
239
+ type: z.enum(["ONE_TIME", "RECURRING"]).describe("Payment type.").optional(),
240
+ cycleDuration: z.object({
241
+ unit: z.enum(["DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of the billing cycle.").optional(),
242
+ count: z.number().int().describe(
243
+ "Count of units that make up the billing cycle."
244
+ ).min(1).optional()
245
+ }).describe(
246
+ "Duration of the billing cycle. Available only for `RECURRING` payments."
247
+ ).optional()
248
+ }).describe(
249
+ "Billing information for the contract between the reseller and Wix."
250
+ )
251
+ })
252
+ ])
253
+ )
254
+ ).max(1e3).min(1)
255
+ })
256
+ });
257
+ var CreatePackageV2Response = z.object({
258
+ idempotencyKey: z.string().describe("Idempotency key.").max(100).optional().nullable(),
259
+ package: z.object({
260
+ _id: z.string().describe("Package ID.").regex(
261
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
262
+ "Must be a valid GUID"
263
+ ).optional(),
264
+ accountId: z.string().describe(
265
+ "Wix account ID. See\n[Account Level APIs](https://dev.wix.com/docs/rest/account-level/about-account-level-apis)\nfor more details."
266
+ ).regex(
267
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
268
+ "Must be a valid GUID"
269
+ ).optional(),
270
+ externalId: z.string().describe(
271
+ "External reference. For example, an external subscription ID.\nThis field isn't validated by Wix.\n\nMax: 100 characters"
272
+ ).max(100).optional().nullable(),
273
+ productInstances: z.array(
274
+ z.intersection(
275
+ z.object({
276
+ instanceId: z.string().describe(
277
+ "ID of the instance of the resold Wix service. **Note:** Differs from the\n`catalogProductId`. Allows you to identify different instances of the same\nproduct in a package."
278
+ ).regex(
279
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
280
+ "Must be a valid GUID"
281
+ ).optional(),
282
+ siteId: z.string().describe(
283
+ "ID of the Wix site that the product instance is assigned to.\nSee the [Query Sites API](https://dev.wix.com/api/rest/account-level-apis/sites/query-sites)\nfor more information."
284
+ ).regex(
285
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
286
+ "Must be a valid GUID"
287
+ ).optional().nullable(),
288
+ catalogProductId: z.string().describe(
289
+ "Product ID, as defined in the Wix Premium Product Catalog.\nContact the [Wix B2B sales team](mailto:bizdev@wix.com)\nfor more details about available Wix services."
290
+ ).regex(
291
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
292
+ "Must be a valid GUID"
293
+ ).optional(),
294
+ status: z.enum([
295
+ "PENDING",
296
+ "ENABLED",
297
+ "CANCELED",
298
+ "FAILED",
299
+ "AWAITING_ACTION"
300
+ ]).describe("Status of the product instance.").optional(),
301
+ failure: z.object({
302
+ code: z.enum(["DELIVERY_TIMEOUT", "EXTERNAL_FAILURE"]).describe("Failure code.").optional(),
303
+ message: z.string().describe("Failure message.").optional()
304
+ }).describe(
305
+ "Failure object. Only present for status `FAILED`. Describes why the product instance `FAILED`."
306
+ ).optional(),
307
+ _createdDate: z.date().describe("Date and time the product instance was created.").optional().nullable(),
308
+ _updatedDate: z.date().describe(
309
+ "Date and time the product instance was last updated."
310
+ ).optional().nullable(),
311
+ countryCode: z.string().describe(
312
+ "Two-letter country code in\n[ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements)\nformat. Specifies where customers can claim vouchers that may come with the\nproduct. Contact the [Wix B2B sales team](mailto:bizdev@wix.com) to get more\ninformation about vouchers and supported locations."
313
+ ).optional().nullable(),
314
+ expirationDate: z.date().describe(
315
+ "Date and time the product instance expires in `YYYY-MM-DDThh:mm:ss.sssZ` format.\nUsed only for instances that don't auto renew at the end of the current billing cycle."
316
+ ).optional().nullable(),
317
+ discountCode: z.string().describe(
318
+ "Discount code indicating that the reseller provisioned the product instance\nduring a sale. Wix doesn't guarantee that a discount code reduces the\nprice between Wix and the reseller, even when it's valid. Contact the\n[Wix B2B sales team](mailto:bizdev@wix.com) for more information.\n\nMax: 25 characters"
319
+ ).max(25).optional().nullable(),
320
+ referenceProductInstanceId: z.string().describe(
321
+ 'ID of a different product instance that you can use to offer your customers\ntime-limited free access to an additional product or service. For example,\nWix offers a 1-year free domain registration to all customers who purchase a\nPremium plan. The referenced product instance must have either status `"PENDING"` or\n`"ACTIVE"`. You can use each product instance only a single time as reference\ninstance.'
322
+ ).regex(
323
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
324
+ "Must be a valid GUID"
325
+ ).optional().nullable()
326
+ }),
327
+ z.xor([
328
+ z.object({ billingInfo: z.never().optional() }),
329
+ z.object({
330
+ billingInfo: z.object({
331
+ type: z.enum(["ONE_TIME", "RECURRING"]).describe("Payment type.").optional(),
332
+ cycleDuration: z.object({
333
+ unit: z.enum(["DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of the billing cycle.").optional(),
334
+ count: z.number().int().describe(
335
+ "Count of units that make up the billing cycle."
336
+ ).min(1).optional()
337
+ }).describe(
338
+ "Duration of the billing cycle. Available only for `RECURRING` payments."
339
+ ).optional()
340
+ }).describe(
341
+ "Billing information for the contract between the reseller and Wix."
342
+ )
343
+ })
344
+ ])
345
+ )
346
+ ).max(1e3).min(1).optional(),
347
+ _createdDate: z.date().describe("Date and time the package was created.").optional().nullable(),
348
+ _updatedDate: z.date().describe("Date and time the package was last updated.").optional().nullable()
349
+ }).describe("Created package.").optional()
350
+ });
351
+ var CancelPackageRequest = z.object({
352
+ _id: z.string().describe("ID of the package to cancel.").regex(
353
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
354
+ "Must be a valid GUID"
355
+ ),
356
+ options: z.object({
357
+ idempotencyKey: z.string().describe("Idempotency key.").max(100).optional().nullable()
358
+ }).optional()
359
+ });
360
+ var CancelPackageResponse = z.object({
361
+ idempotencyKey: z.string().describe("Idempotency key.").max(100).optional().nullable(),
362
+ package: z.object({
363
+ _id: z.string().describe("Package ID.").regex(
364
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
365
+ "Must be a valid GUID"
366
+ ).optional(),
367
+ accountId: z.string().describe(
368
+ "Wix account ID. See\n[Account Level APIs](https://dev.wix.com/docs/rest/account-level/about-account-level-apis)\nfor more details."
369
+ ).regex(
370
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
371
+ "Must be a valid GUID"
372
+ ).optional(),
373
+ externalId: z.string().describe(
374
+ "External reference. For example, an external subscription ID.\nThis field isn't validated by Wix.\n\nMax: 100 characters"
375
+ ).max(100).optional().nullable(),
376
+ productInstances: z.array(
377
+ z.intersection(
378
+ z.object({
379
+ instanceId: z.string().describe(
380
+ "ID of the instance of the resold Wix service. **Note:** Differs from the\n`catalogProductId`. Allows you to identify different instances of the same\nproduct in a package."
381
+ ).regex(
382
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
383
+ "Must be a valid GUID"
384
+ ).optional(),
385
+ siteId: z.string().describe(
386
+ "ID of the Wix site that the product instance is assigned to.\nSee the [Query Sites API](https://dev.wix.com/api/rest/account-level-apis/sites/query-sites)\nfor more information."
387
+ ).regex(
388
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
389
+ "Must be a valid GUID"
390
+ ).optional().nullable(),
391
+ catalogProductId: z.string().describe(
392
+ "Product ID, as defined in the Wix Premium Product Catalog.\nContact the [Wix B2B sales team](mailto:bizdev@wix.com)\nfor more details about available Wix services."
393
+ ).regex(
394
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
395
+ "Must be a valid GUID"
396
+ ).optional(),
397
+ status: z.enum([
398
+ "PENDING",
399
+ "ENABLED",
400
+ "CANCELED",
401
+ "FAILED",
402
+ "AWAITING_ACTION"
403
+ ]).describe("Status of the product instance.").optional(),
404
+ failure: z.object({
405
+ code: z.enum(["DELIVERY_TIMEOUT", "EXTERNAL_FAILURE"]).describe("Failure code.").optional(),
406
+ message: z.string().describe("Failure message.").optional()
407
+ }).describe(
408
+ "Failure object. Only present for status `FAILED`. Describes why the product instance `FAILED`."
409
+ ).optional(),
410
+ _createdDate: z.date().describe("Date and time the product instance was created.").optional().nullable(),
411
+ _updatedDate: z.date().describe(
412
+ "Date and time the product instance was last updated."
413
+ ).optional().nullable(),
414
+ countryCode: z.string().describe(
415
+ "Two-letter country code in\n[ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements)\nformat. Specifies where customers can claim vouchers that may come with the\nproduct. Contact the [Wix B2B sales team](mailto:bizdev@wix.com) to get more\ninformation about vouchers and supported locations."
416
+ ).optional().nullable(),
417
+ expirationDate: z.date().describe(
418
+ "Date and time the product instance expires in `YYYY-MM-DDThh:mm:ss.sssZ` format.\nUsed only for instances that don't auto renew at the end of the current billing cycle."
419
+ ).optional().nullable(),
420
+ discountCode: z.string().describe(
421
+ "Discount code indicating that the reseller provisioned the product instance\nduring a sale. Wix doesn't guarantee that a discount code reduces the\nprice between Wix and the reseller, even when it's valid. Contact the\n[Wix B2B sales team](mailto:bizdev@wix.com) for more information.\n\nMax: 25 characters"
422
+ ).max(25).optional().nullable(),
423
+ referenceProductInstanceId: z.string().describe(
424
+ 'ID of a different product instance that you can use to offer your customers\ntime-limited free access to an additional product or service. For example,\nWix offers a 1-year free domain registration to all customers who purchase a\nPremium plan. The referenced product instance must have either status `"PENDING"` or\n`"ACTIVE"`. You can use each product instance only a single time as reference\ninstance.'
425
+ ).regex(
426
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
427
+ "Must be a valid GUID"
428
+ ).optional().nullable()
429
+ }),
430
+ z.xor([
431
+ z.object({ billingInfo: z.never().optional() }),
432
+ z.object({
433
+ billingInfo: z.object({
434
+ type: z.enum(["ONE_TIME", "RECURRING"]).describe("Payment type.").optional(),
435
+ cycleDuration: z.object({
436
+ unit: z.enum(["DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of the billing cycle.").optional(),
437
+ count: z.number().int().describe(
438
+ "Count of units that make up the billing cycle."
439
+ ).min(1).optional()
440
+ }).describe(
441
+ "Duration of the billing cycle. Available only for `RECURRING` payments."
442
+ ).optional()
443
+ }).describe(
444
+ "Billing information for the contract between the reseller and Wix."
445
+ )
446
+ })
447
+ ])
448
+ )
449
+ ).max(1e3).min(1).optional(),
450
+ _createdDate: z.date().describe("Date and time the package was created.").optional().nullable(),
451
+ _updatedDate: z.date().describe("Date and time the package was last updated.").optional().nullable()
452
+ }).describe("Canceled package.").optional()
453
+ });
454
+ var GetPackageRequest = z.object({
455
+ _id: z.string().describe("Package ID.").regex(
456
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
457
+ "Must be a valid GUID"
458
+ )
459
+ });
460
+ var GetPackageResponse = z.object({
461
+ _id: z.string().describe("Package ID.").regex(
462
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
463
+ "Must be a valid GUID"
464
+ ).optional(),
465
+ accountId: z.string().describe(
466
+ "Wix account ID. See\n[Account Level APIs](https://dev.wix.com/docs/rest/account-level/about-account-level-apis)\nfor more details."
467
+ ).regex(
468
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
469
+ "Must be a valid GUID"
470
+ ).optional(),
471
+ externalId: z.string().describe(
472
+ "External reference. For example, an external subscription ID.\nThis field isn't validated by Wix.\n\nMax: 100 characters"
473
+ ).max(100).optional().nullable(),
474
+ productInstances: z.array(
475
+ z.intersection(
476
+ z.object({
477
+ instanceId: z.string().describe(
478
+ "ID of the instance of the resold Wix service. **Note:** Differs from the\n`catalogProductId`. Allows you to identify different instances of the same\nproduct in a package."
479
+ ).regex(
480
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
481
+ "Must be a valid GUID"
482
+ ).optional(),
483
+ siteId: z.string().describe(
484
+ "ID of the Wix site that the product instance is assigned to.\nSee the [Query Sites API](https://dev.wix.com/api/rest/account-level-apis/sites/query-sites)\nfor more information."
485
+ ).regex(
486
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
487
+ "Must be a valid GUID"
488
+ ).optional().nullable(),
489
+ catalogProductId: z.string().describe(
490
+ "Product ID, as defined in the Wix Premium Product Catalog.\nContact the [Wix B2B sales team](mailto:bizdev@wix.com)\nfor more details about available Wix services."
491
+ ).regex(
492
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
493
+ "Must be a valid GUID"
494
+ ).optional(),
495
+ status: z.enum([
496
+ "PENDING",
497
+ "ENABLED",
498
+ "CANCELED",
499
+ "FAILED",
500
+ "AWAITING_ACTION"
501
+ ]).describe("Status of the product instance.").optional(),
502
+ failure: z.object({
503
+ code: z.enum(["DELIVERY_TIMEOUT", "EXTERNAL_FAILURE"]).describe("Failure code.").optional(),
504
+ message: z.string().describe("Failure message.").optional()
505
+ }).describe(
506
+ "Failure object. Only present for status `FAILED`. Describes why the product instance `FAILED`."
507
+ ).optional(),
508
+ _createdDate: z.date().describe("Date and time the product instance was created.").optional().nullable(),
509
+ _updatedDate: z.date().describe("Date and time the product instance was last updated.").optional().nullable(),
510
+ countryCode: z.string().describe(
511
+ "Two-letter country code in\n[ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements)\nformat. Specifies where customers can claim vouchers that may come with the\nproduct. Contact the [Wix B2B sales team](mailto:bizdev@wix.com) to get more\ninformation about vouchers and supported locations."
512
+ ).optional().nullable(),
513
+ expirationDate: z.date().describe(
514
+ "Date and time the product instance expires in `YYYY-MM-DDThh:mm:ss.sssZ` format.\nUsed only for instances that don't auto renew at the end of the current billing cycle."
515
+ ).optional().nullable(),
516
+ discountCode: z.string().describe(
517
+ "Discount code indicating that the reseller provisioned the product instance\nduring a sale. Wix doesn't guarantee that a discount code reduces the\nprice between Wix and the reseller, even when it's valid. Contact the\n[Wix B2B sales team](mailto:bizdev@wix.com) for more information.\n\nMax: 25 characters"
518
+ ).max(25).optional().nullable(),
519
+ referenceProductInstanceId: z.string().describe(
520
+ 'ID of a different product instance that you can use to offer your customers\ntime-limited free access to an additional product or service. For example,\nWix offers a 1-year free domain registration to all customers who purchase a\nPremium plan. The referenced product instance must have either status `"PENDING"` or\n`"ACTIVE"`. You can use each product instance only a single time as reference\ninstance.'
521
+ ).regex(
522
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
523
+ "Must be a valid GUID"
524
+ ).optional().nullable()
525
+ }),
526
+ z.xor([
527
+ z.object({ billingInfo: z.never().optional() }),
528
+ z.object({
529
+ billingInfo: z.object({
530
+ type: z.enum(["ONE_TIME", "RECURRING"]).describe("Payment type.").optional(),
531
+ cycleDuration: z.object({
532
+ unit: z.enum(["DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of the billing cycle.").optional(),
533
+ count: z.number().int().describe(
534
+ "Count of units that make up the billing cycle."
535
+ ).min(1).optional()
536
+ }).describe(
537
+ "Duration of the billing cycle. Available only for `RECURRING` payments."
538
+ ).optional()
539
+ }).describe(
540
+ "Billing information for the contract between the reseller and Wix."
541
+ )
542
+ })
543
+ ])
544
+ )
545
+ ).max(1e3).min(1).optional(),
546
+ _createdDate: z.date().describe("Date and time the package was created.").optional().nullable(),
547
+ _updatedDate: z.date().describe("Date and time the package was last updated.").optional().nullable()
548
+ });
549
+ var QueryPackagesRequest = z.object({
550
+ query: z.object({
551
+ filter: z.object({
552
+ _createdDate: z.object({
553
+ $eq: z.string(),
554
+ $exists: z.boolean(),
555
+ $gt: z.string(),
556
+ $gte: z.string(),
557
+ $hasAll: z.array(z.string()),
558
+ $hasSome: z.array(z.string()),
559
+ $in: z.array(z.string()),
560
+ $lt: z.string(),
561
+ $lte: z.string(),
562
+ $ne: z.string(),
563
+ $nin: z.array(z.string()),
564
+ $startsWith: z.string()
565
+ }).partial().strict().optional(),
566
+ _updatedDate: z.object({
567
+ $eq: z.string(),
568
+ $exists: z.boolean(),
569
+ $gt: z.string(),
570
+ $gte: z.string(),
571
+ $hasAll: z.array(z.string()),
572
+ $hasSome: z.array(z.string()),
573
+ $in: z.array(z.string()),
574
+ $lt: z.string(),
575
+ $lte: z.string(),
576
+ $ne: z.string(),
577
+ $nin: z.array(z.string()),
578
+ $startsWith: z.string()
579
+ }).partial().strict().optional(),
580
+ _id: z.object({
581
+ $eq: z.string(),
582
+ $exists: z.boolean(),
583
+ $gt: z.string(),
584
+ $gte: z.string(),
585
+ $hasAll: z.array(z.string()),
586
+ $hasSome: z.array(z.string()),
587
+ $in: z.array(z.string()),
588
+ $lt: z.string(),
589
+ $lte: z.string(),
590
+ $ne: z.string(),
591
+ $nin: z.array(z.string()),
592
+ $startsWith: z.string()
593
+ }).partial().strict().optional(),
594
+ accountId: z.object({
595
+ $eq: z.string(),
596
+ $exists: z.boolean(),
597
+ $gt: z.string(),
598
+ $gte: z.string(),
599
+ $hasAll: z.array(z.string()),
600
+ $hasSome: z.array(z.string()),
601
+ $in: z.array(z.string()),
602
+ $lt: z.string(),
603
+ $lte: z.string(),
604
+ $ne: z.string(),
605
+ $nin: z.array(z.string()),
606
+ $startsWith: z.string()
607
+ }).partial().strict().optional(),
608
+ externalId: z.object({
609
+ $eq: z.string(),
610
+ $exists: z.boolean(),
611
+ $gt: z.string(),
612
+ $gte: z.string(),
613
+ $hasAll: z.array(z.string()),
614
+ $hasSome: z.array(z.string()),
615
+ $in: z.array(z.string()),
616
+ $lt: z.string(),
617
+ $lte: z.string(),
618
+ $ne: z.string(),
619
+ $nin: z.array(z.string()),
620
+ $startsWith: z.string()
621
+ }).partial().strict().optional(),
622
+ productInstances: z.object({
623
+ $eq: z.any(),
624
+ $exists: z.boolean(),
625
+ $gt: z.any(),
626
+ $gte: z.any(),
627
+ $hasAll: z.array(z.any()),
628
+ $hasSome: z.array(z.any()),
629
+ $in: z.array(z.any()),
630
+ $lt: z.any(),
631
+ $lte: z.any(),
632
+ $ne: z.any(),
633
+ $nin: z.array(z.any()),
634
+ $startsWith: z.string()
635
+ }).partial().strict().optional(),
636
+ "productInstances.instanceId": z.object({
637
+ $eq: z.string(),
638
+ $exists: z.boolean(),
639
+ $gt: z.string(),
640
+ $gte: z.string(),
641
+ $hasAll: z.array(z.string()),
642
+ $hasSome: z.array(z.string()),
643
+ $in: z.array(z.string()),
644
+ $lt: z.string(),
645
+ $lte: z.string(),
646
+ $ne: z.string(),
647
+ $nin: z.array(z.string()),
648
+ $startsWith: z.string()
649
+ }).partial().strict().optional(),
650
+ "productInstances.siteId": z.object({
651
+ $eq: z.string(),
652
+ $exists: z.boolean(),
653
+ $gt: z.string(),
654
+ $gte: z.string(),
655
+ $hasAll: z.array(z.string()),
656
+ $hasSome: z.array(z.string()),
657
+ $in: z.array(z.string()),
658
+ $lt: z.string(),
659
+ $lte: z.string(),
660
+ $ne: z.string(),
661
+ $nin: z.array(z.string()),
662
+ $startsWith: z.string()
663
+ }).partial().strict().optional(),
664
+ "productInstances.catalogProductId": z.object({
665
+ $eq: z.string(),
666
+ $exists: z.boolean(),
667
+ $gt: z.string(),
668
+ $gte: z.string(),
669
+ $hasAll: z.array(z.string()),
670
+ $hasSome: z.array(z.string()),
671
+ $in: z.array(z.string()),
672
+ $lt: z.string(),
673
+ $lte: z.string(),
674
+ $ne: z.string(),
675
+ $nin: z.array(z.string()),
676
+ $startsWith: z.string()
677
+ }).partial().strict().optional(),
678
+ "productInstances.status": z.object({
679
+ $eq: z.string(),
680
+ $exists: z.boolean(),
681
+ $gt: z.string(),
682
+ $gte: z.string(),
683
+ $hasAll: z.array(z.string()),
684
+ $hasSome: z.array(z.string()),
685
+ $in: z.array(z.string()),
686
+ $lt: z.string(),
687
+ $lte: z.string(),
688
+ $ne: z.string(),
689
+ $nin: z.array(z.string()),
690
+ $startsWith: z.string()
691
+ }).partial().strict().optional(),
692
+ "productInstances.failure": z.object({
693
+ $eq: z.any(),
694
+ $exists: z.boolean(),
695
+ $gt: z.any(),
696
+ $gte: z.any(),
697
+ $hasAll: z.array(z.any()),
698
+ $hasSome: z.array(z.any()),
699
+ $in: z.array(z.any()),
700
+ $lt: z.any(),
701
+ $lte: z.any(),
702
+ $ne: z.any(),
703
+ $nin: z.array(z.any()),
704
+ $startsWith: z.string()
705
+ }).partial().strict().optional(),
706
+ "productInstances.failure.code": z.object({
707
+ $eq: z.string(),
708
+ $exists: z.boolean(),
709
+ $gt: z.string(),
710
+ $gte: z.string(),
711
+ $hasAll: z.array(z.string()),
712
+ $hasSome: z.array(z.string()),
713
+ $in: z.array(z.string()),
714
+ $lt: z.string(),
715
+ $lte: z.string(),
716
+ $ne: z.string(),
717
+ $nin: z.array(z.string()),
718
+ $startsWith: z.string()
719
+ }).partial().strict().optional(),
720
+ "productInstances.failure.message": z.object({
721
+ $eq: z.string(),
722
+ $exists: z.boolean(),
723
+ $gt: z.string(),
724
+ $gte: z.string(),
725
+ $hasAll: z.array(z.string()),
726
+ $hasSome: z.array(z.string()),
727
+ $in: z.array(z.string()),
728
+ $lt: z.string(),
729
+ $lte: z.string(),
730
+ $ne: z.string(),
731
+ $nin: z.array(z.string()),
732
+ $startsWith: z.string()
733
+ }).partial().strict().optional(),
734
+ "productInstances.billingInfo": z.object({
735
+ $eq: z.any(),
736
+ $exists: z.boolean(),
737
+ $gt: z.any(),
738
+ $gte: z.any(),
739
+ $hasAll: z.array(z.any()),
740
+ $hasSome: z.array(z.any()),
741
+ $in: z.array(z.any()),
742
+ $lt: z.any(),
743
+ $lte: z.any(),
744
+ $ne: z.any(),
745
+ $nin: z.array(z.any()),
746
+ $startsWith: z.string()
747
+ }).partial().strict().optional(),
748
+ "productInstances.billingInfo.type": z.object({
749
+ $eq: z.any(),
750
+ $exists: z.boolean(),
751
+ $gt: z.any(),
752
+ $gte: z.any(),
753
+ $hasAll: z.array(z.any()),
754
+ $hasSome: z.array(z.any()),
755
+ $in: z.array(z.any()),
756
+ $lt: z.any(),
757
+ $lte: z.any(),
758
+ $ne: z.any(),
759
+ $nin: z.array(z.any()),
760
+ $startsWith: z.string()
761
+ }).partial().strict().optional(),
762
+ "productInstances.billingInfo.cycleDuration": z.object({
763
+ $eq: z.any(),
764
+ $exists: z.boolean(),
765
+ $gt: z.any(),
766
+ $gte: z.any(),
767
+ $hasAll: z.array(z.any()),
768
+ $hasSome: z.array(z.any()),
769
+ $in: z.array(z.any()),
770
+ $lt: z.any(),
771
+ $lte: z.any(),
772
+ $ne: z.any(),
773
+ $nin: z.array(z.any()),
774
+ $startsWith: z.string()
775
+ }).partial().strict().optional(),
776
+ "productInstances.billingInfo.cycleDuration.unit": z.object({
777
+ $eq: z.any(),
778
+ $exists: z.boolean(),
779
+ $gt: z.any(),
780
+ $gte: z.any(),
781
+ $hasAll: z.array(z.any()),
782
+ $hasSome: z.array(z.any()),
783
+ $in: z.array(z.any()),
784
+ $lt: z.any(),
785
+ $lte: z.any(),
786
+ $ne: z.any(),
787
+ $nin: z.array(z.any()),
788
+ $startsWith: z.string()
789
+ }).partial().strict().optional(),
790
+ "productInstances.billingInfo.cycleDuration.count": z.object({
791
+ $eq: z.any(),
792
+ $exists: z.boolean(),
793
+ $gt: z.any(),
794
+ $gte: z.any(),
795
+ $hasAll: z.array(z.any()),
796
+ $hasSome: z.array(z.any()),
797
+ $in: z.array(z.any()),
798
+ $lt: z.any(),
799
+ $lte: z.any(),
800
+ $ne: z.any(),
801
+ $nin: z.array(z.any()),
802
+ $startsWith: z.string()
803
+ }).partial().strict().optional(),
804
+ "productInstances._createdDate": z.object({
805
+ $eq: z.string(),
806
+ $exists: z.boolean(),
807
+ $gt: z.string(),
808
+ $gte: z.string(),
809
+ $hasAll: z.array(z.string()),
810
+ $hasSome: z.array(z.string()),
811
+ $in: z.array(z.string()),
812
+ $lt: z.string(),
813
+ $lte: z.string(),
814
+ $ne: z.string(),
815
+ $nin: z.array(z.string()),
816
+ $startsWith: z.string()
817
+ }).partial().strict().optional(),
818
+ "productInstances._updatedDate": z.object({
819
+ $eq: z.string(),
820
+ $exists: z.boolean(),
821
+ $gt: z.string(),
822
+ $gte: z.string(),
823
+ $hasAll: z.array(z.string()),
824
+ $hasSome: z.array(z.string()),
825
+ $in: z.array(z.string()),
826
+ $lt: z.string(),
827
+ $lte: z.string(),
828
+ $ne: z.string(),
829
+ $nin: z.array(z.string()),
830
+ $startsWith: z.string()
831
+ }).partial().strict().optional(),
832
+ "productInstances.countryCode": z.object({
833
+ $eq: z.string(),
834
+ $exists: z.boolean(),
835
+ $gt: z.string(),
836
+ $gte: z.string(),
837
+ $hasAll: z.array(z.string()),
838
+ $hasSome: z.array(z.string()),
839
+ $in: z.array(z.string()),
840
+ $lt: z.string(),
841
+ $lte: z.string(),
842
+ $ne: z.string(),
843
+ $nin: z.array(z.string()),
844
+ $startsWith: z.string()
845
+ }).partial().strict().optional(),
846
+ $and: z.array(z.any()).optional(),
847
+ $or: z.array(z.any()).optional(),
848
+ $not: z.any().optional()
849
+ }).strict().optional(),
850
+ sort: z.array(
851
+ z.object({
852
+ fieldName: z.enum(["_createdDate", "_updatedDate"]).optional(),
853
+ order: z.enum(["ASC", "DESC"]).optional()
854
+ })
855
+ ).optional()
856
+ }).catchall(z.any()).describe(
857
+ "Query options. See [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language) for more details."
858
+ )
859
+ });
860
+ var QueryPackagesResponse = z.object({
861
+ metadata: z.object({
862
+ count: z.number().int().describe("Number of items returned in the response.").optional().nullable(),
863
+ offset: z.number().int().describe("Offset that was requested.").optional().nullable(),
864
+ total: z.number().int().describe(
865
+ "Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set."
866
+ ).optional().nullable(),
867
+ tooManyToCount: z.boolean().describe(
868
+ "Flag that indicates the server failed to calculate the `total` field."
869
+ ).optional().nullable(),
870
+ cursors: z.object({
871
+ next: z.string().describe(
872
+ "Cursor string pointing to the next page in the list of results."
873
+ ).max(16e3).optional().nullable(),
874
+ prev: z.string().describe(
875
+ "Cursor pointing to the previous page in the list of results."
876
+ ).max(16e3).optional().nullable()
877
+ }).describe(
878
+ "Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used."
879
+ ).optional()
880
+ }).describe("Paging metadata.").optional(),
881
+ packages: z.array(
882
+ z.object({
883
+ _id: z.string().describe("Package ID.").regex(
884
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
885
+ "Must be a valid GUID"
886
+ ).optional(),
887
+ accountId: z.string().describe(
888
+ "Wix account ID. See\n[Account Level APIs](https://dev.wix.com/docs/rest/account-level/about-account-level-apis)\nfor more details."
889
+ ).regex(
890
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
891
+ "Must be a valid GUID"
892
+ ).optional(),
893
+ externalId: z.string().describe(
894
+ "External reference. For example, an external subscription ID.\nThis field isn't validated by Wix.\n\nMax: 100 characters"
895
+ ).max(100).optional().nullable(),
896
+ productInstances: z.array(
897
+ z.intersection(
898
+ z.object({
899
+ instanceId: z.string().describe(
900
+ "ID of the instance of the resold Wix service. **Note:** Differs from the\n`catalogProductId`. Allows you to identify different instances of the same\nproduct in a package."
901
+ ).regex(
902
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
903
+ "Must be a valid GUID"
904
+ ).optional(),
905
+ siteId: z.string().describe(
906
+ "ID of the Wix site that the product instance is assigned to.\nSee the [Query Sites API](https://dev.wix.com/api/rest/account-level-apis/sites/query-sites)\nfor more information."
907
+ ).regex(
908
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
909
+ "Must be a valid GUID"
910
+ ).optional().nullable(),
911
+ catalogProductId: z.string().describe(
912
+ "Product ID, as defined in the Wix Premium Product Catalog.\nContact the [Wix B2B sales team](mailto:bizdev@wix.com)\nfor more details about available Wix services."
913
+ ).regex(
914
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
915
+ "Must be a valid GUID"
916
+ ).optional(),
917
+ status: z.enum([
918
+ "PENDING",
919
+ "ENABLED",
920
+ "CANCELED",
921
+ "FAILED",
922
+ "AWAITING_ACTION"
923
+ ]).describe("Status of the product instance.").optional(),
924
+ failure: z.object({
925
+ code: z.enum(["DELIVERY_TIMEOUT", "EXTERNAL_FAILURE"]).describe("Failure code.").optional(),
926
+ message: z.string().describe("Failure message.").optional()
927
+ }).describe(
928
+ "Failure object. Only present for status `FAILED`. Describes why the product instance `FAILED`."
929
+ ).optional(),
930
+ _createdDate: z.date().describe("Date and time the product instance was created.").optional().nullable(),
931
+ _updatedDate: z.date().describe(
932
+ "Date and time the product instance was last updated."
933
+ ).optional().nullable(),
934
+ countryCode: z.string().describe(
935
+ "Two-letter country code in\n[ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements)\nformat. Specifies where customers can claim vouchers that may come with the\nproduct. Contact the [Wix B2B sales team](mailto:bizdev@wix.com) to get more\ninformation about vouchers and supported locations."
936
+ ).optional().nullable(),
937
+ expirationDate: z.date().describe(
938
+ "Date and time the product instance expires in `YYYY-MM-DDThh:mm:ss.sssZ` format.\nUsed only for instances that don't auto renew at the end of the current billing cycle."
939
+ ).optional().nullable(),
940
+ discountCode: z.string().describe(
941
+ "Discount code indicating that the reseller provisioned the product instance\nduring a sale. Wix doesn't guarantee that a discount code reduces the\nprice between Wix and the reseller, even when it's valid. Contact the\n[Wix B2B sales team](mailto:bizdev@wix.com) for more information.\n\nMax: 25 characters"
942
+ ).max(25).optional().nullable(),
943
+ referenceProductInstanceId: z.string().describe(
944
+ 'ID of a different product instance that you can use to offer your customers\ntime-limited free access to an additional product or service. For example,\nWix offers a 1-year free domain registration to all customers who purchase a\nPremium plan. The referenced product instance must have either status `"PENDING"` or\n`"ACTIVE"`. You can use each product instance only a single time as reference\ninstance.'
945
+ ).regex(
946
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
947
+ "Must be a valid GUID"
948
+ ).optional().nullable()
949
+ }),
950
+ z.xor([
951
+ z.object({ billingInfo: z.never().optional() }),
952
+ z.object({
953
+ billingInfo: z.object({
954
+ type: z.enum(["ONE_TIME", "RECURRING"]).describe("Payment type.").optional(),
955
+ cycleDuration: z.object({
956
+ unit: z.enum(["DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of the billing cycle.").optional(),
957
+ count: z.number().int().describe(
958
+ "Count of units that make up the billing cycle."
959
+ ).min(1).optional()
960
+ }).describe(
961
+ "Duration of the billing cycle. Available only for `RECURRING` payments."
962
+ ).optional()
963
+ }).describe(
964
+ "Billing information for the contract between the reseller and Wix."
965
+ )
966
+ })
967
+ ])
968
+ )
969
+ ).max(1e3).min(1).optional(),
970
+ _createdDate: z.date().describe("Date and time the package was created.").optional().nullable(),
971
+ _updatedDate: z.date().describe("Date and time the package was last updated.").optional().nullable()
972
+ })
973
+ ).max(1e3).min(0).optional()
974
+ });
975
+ var AssignProductInstanceToSiteRequest = z.object({
976
+ identifiers: z.object({
977
+ instanceId: z.string().describe("ID of the product instance to assign to a site.").regex(
978
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
979
+ "Must be a valid GUID"
980
+ ),
981
+ siteId: z.string().describe("ID of the site to which the product instance is assigned.").regex(
982
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
983
+ "Must be a valid GUID"
984
+ )
985
+ }),
986
+ options: z.object({
987
+ idempotencyKey: z.string().describe("Idempotency key.").max(100).optional().nullable()
988
+ }).optional()
989
+ });
990
+ var AssignProductInstanceToSiteResponse = z.object({
991
+ idempotencyKey: z.string().describe("Idempotency key.").max(100).optional().nullable(),
992
+ package: z.object({
993
+ _id: z.string().describe("Package ID.").regex(
994
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
995
+ "Must be a valid GUID"
996
+ ).optional(),
997
+ accountId: z.string().describe(
998
+ "Wix account ID. See\n[Account Level APIs](https://dev.wix.com/docs/rest/account-level/about-account-level-apis)\nfor more details."
999
+ ).regex(
1000
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
1001
+ "Must be a valid GUID"
1002
+ ).optional(),
1003
+ externalId: z.string().describe(
1004
+ "External reference. For example, an external subscription ID.\nThis field isn't validated by Wix.\n\nMax: 100 characters"
1005
+ ).max(100).optional().nullable(),
1006
+ productInstances: z.array(
1007
+ z.intersection(
1008
+ z.object({
1009
+ instanceId: z.string().describe(
1010
+ "ID of the instance of the resold Wix service. **Note:** Differs from the\n`catalogProductId`. Allows you to identify different instances of the same\nproduct in a package."
1011
+ ).regex(
1012
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
1013
+ "Must be a valid GUID"
1014
+ ).optional(),
1015
+ siteId: z.string().describe(
1016
+ "ID of the Wix site that the product instance is assigned to.\nSee the [Query Sites API](https://dev.wix.com/api/rest/account-level-apis/sites/query-sites)\nfor more information."
1017
+ ).regex(
1018
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
1019
+ "Must be a valid GUID"
1020
+ ).optional().nullable(),
1021
+ catalogProductId: z.string().describe(
1022
+ "Product ID, as defined in the Wix Premium Product Catalog.\nContact the [Wix B2B sales team](mailto:bizdev@wix.com)\nfor more details about available Wix services."
1023
+ ).regex(
1024
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
1025
+ "Must be a valid GUID"
1026
+ ).optional(),
1027
+ status: z.enum([
1028
+ "PENDING",
1029
+ "ENABLED",
1030
+ "CANCELED",
1031
+ "FAILED",
1032
+ "AWAITING_ACTION"
1033
+ ]).describe("Status of the product instance.").optional(),
1034
+ failure: z.object({
1035
+ code: z.enum(["DELIVERY_TIMEOUT", "EXTERNAL_FAILURE"]).describe("Failure code.").optional(),
1036
+ message: z.string().describe("Failure message.").optional()
1037
+ }).describe(
1038
+ "Failure object. Only present for status `FAILED`. Describes why the product instance `FAILED`."
1039
+ ).optional(),
1040
+ _createdDate: z.date().describe("Date and time the product instance was created.").optional().nullable(),
1041
+ _updatedDate: z.date().describe(
1042
+ "Date and time the product instance was last updated."
1043
+ ).optional().nullable(),
1044
+ countryCode: z.string().describe(
1045
+ "Two-letter country code in\n[ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements)\nformat. Specifies where customers can claim vouchers that may come with the\nproduct. Contact the [Wix B2B sales team](mailto:bizdev@wix.com) to get more\ninformation about vouchers and supported locations."
1046
+ ).optional().nullable(),
1047
+ expirationDate: z.date().describe(
1048
+ "Date and time the product instance expires in `YYYY-MM-DDThh:mm:ss.sssZ` format.\nUsed only for instances that don't auto renew at the end of the current billing cycle."
1049
+ ).optional().nullable(),
1050
+ discountCode: z.string().describe(
1051
+ "Discount code indicating that the reseller provisioned the product instance\nduring a sale. Wix doesn't guarantee that a discount code reduces the\nprice between Wix and the reseller, even when it's valid. Contact the\n[Wix B2B sales team](mailto:bizdev@wix.com) for more information.\n\nMax: 25 characters"
1052
+ ).max(25).optional().nullable(),
1053
+ referenceProductInstanceId: z.string().describe(
1054
+ 'ID of a different product instance that you can use to offer your customers\ntime-limited free access to an additional product or service. For example,\nWix offers a 1-year free domain registration to all customers who purchase a\nPremium plan. The referenced product instance must have either status `"PENDING"` or\n`"ACTIVE"`. You can use each product instance only a single time as reference\ninstance.'
1055
+ ).regex(
1056
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
1057
+ "Must be a valid GUID"
1058
+ ).optional().nullable()
1059
+ }),
1060
+ z.xor([
1061
+ z.object({ billingInfo: z.never().optional() }),
1062
+ z.object({
1063
+ billingInfo: z.object({
1064
+ type: z.enum(["ONE_TIME", "RECURRING"]).describe("Payment type.").optional(),
1065
+ cycleDuration: z.object({
1066
+ unit: z.enum(["DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of the billing cycle.").optional(),
1067
+ count: z.number().int().describe(
1068
+ "Count of units that make up the billing cycle."
1069
+ ).min(1).optional()
1070
+ }).describe(
1071
+ "Duration of the billing cycle. Available only for `RECURRING` payments."
1072
+ ).optional()
1073
+ }).describe(
1074
+ "Billing information for the contract between the reseller and Wix."
1075
+ )
1076
+ })
1077
+ ])
1078
+ )
1079
+ ).max(1e3).min(1).optional(),
1080
+ _createdDate: z.date().describe("Date and time the package was created.").optional().nullable(),
1081
+ _updatedDate: z.date().describe("Date and time the package was last updated.").optional().nullable()
1082
+ }).describe("Updated package that includes the assigned product instance.").optional()
1083
+ });
1084
+ var UnassignProductInstanceFromSiteRequest = z.object({
1085
+ instanceId: z.string().describe("ID of the product instance to unassign from a site.").regex(
1086
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
1087
+ "Must be a valid GUID"
1088
+ ),
1089
+ options: z.object({
1090
+ idempotencyKey: z.string().describe("Idempotency key.").max(100).optional().nullable()
1091
+ }).optional()
1092
+ });
1093
+ var UnassignProductInstanceFromSiteResponse = z.object({
1094
+ idempotencyKey: z.string().describe("Idempotency key.").max(100).optional().nullable(),
1095
+ package: z.object({
1096
+ _id: z.string().describe("Package ID.").regex(
1097
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
1098
+ "Must be a valid GUID"
1099
+ ).optional(),
1100
+ accountId: z.string().describe(
1101
+ "Wix account ID. See\n[Account Level APIs](https://dev.wix.com/docs/rest/account-level/about-account-level-apis)\nfor more details."
1102
+ ).regex(
1103
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
1104
+ "Must be a valid GUID"
1105
+ ).optional(),
1106
+ externalId: z.string().describe(
1107
+ "External reference. For example, an external subscription ID.\nThis field isn't validated by Wix.\n\nMax: 100 characters"
1108
+ ).max(100).optional().nullable(),
1109
+ productInstances: z.array(
1110
+ z.intersection(
1111
+ z.object({
1112
+ instanceId: z.string().describe(
1113
+ "ID of the instance of the resold Wix service. **Note:** Differs from the\n`catalogProductId`. Allows you to identify different instances of the same\nproduct in a package."
1114
+ ).regex(
1115
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
1116
+ "Must be a valid GUID"
1117
+ ).optional(),
1118
+ siteId: z.string().describe(
1119
+ "ID of the Wix site that the product instance is assigned to.\nSee the [Query Sites API](https://dev.wix.com/api/rest/account-level-apis/sites/query-sites)\nfor more information."
1120
+ ).regex(
1121
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
1122
+ "Must be a valid GUID"
1123
+ ).optional().nullable(),
1124
+ catalogProductId: z.string().describe(
1125
+ "Product ID, as defined in the Wix Premium Product Catalog.\nContact the [Wix B2B sales team](mailto:bizdev@wix.com)\nfor more details about available Wix services."
1126
+ ).regex(
1127
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
1128
+ "Must be a valid GUID"
1129
+ ).optional(),
1130
+ status: z.enum([
1131
+ "PENDING",
1132
+ "ENABLED",
1133
+ "CANCELED",
1134
+ "FAILED",
1135
+ "AWAITING_ACTION"
1136
+ ]).describe("Status of the product instance.").optional(),
1137
+ failure: z.object({
1138
+ code: z.enum(["DELIVERY_TIMEOUT", "EXTERNAL_FAILURE"]).describe("Failure code.").optional(),
1139
+ message: z.string().describe("Failure message.").optional()
1140
+ }).describe(
1141
+ "Failure object. Only present for status `FAILED`. Describes why the product instance `FAILED`."
1142
+ ).optional(),
1143
+ _createdDate: z.date().describe("Date and time the product instance was created.").optional().nullable(),
1144
+ _updatedDate: z.date().describe(
1145
+ "Date and time the product instance was last updated."
1146
+ ).optional().nullable(),
1147
+ countryCode: z.string().describe(
1148
+ "Two-letter country code in\n[ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements)\nformat. Specifies where customers can claim vouchers that may come with the\nproduct. Contact the [Wix B2B sales team](mailto:bizdev@wix.com) to get more\ninformation about vouchers and supported locations."
1149
+ ).optional().nullable(),
1150
+ expirationDate: z.date().describe(
1151
+ "Date and time the product instance expires in `YYYY-MM-DDThh:mm:ss.sssZ` format.\nUsed only for instances that don't auto renew at the end of the current billing cycle."
1152
+ ).optional().nullable(),
1153
+ discountCode: z.string().describe(
1154
+ "Discount code indicating that the reseller provisioned the product instance\nduring a sale. Wix doesn't guarantee that a discount code reduces the\nprice between Wix and the reseller, even when it's valid. Contact the\n[Wix B2B sales team](mailto:bizdev@wix.com) for more information.\n\nMax: 25 characters"
1155
+ ).max(25).optional().nullable(),
1156
+ referenceProductInstanceId: z.string().describe(
1157
+ 'ID of a different product instance that you can use to offer your customers\ntime-limited free access to an additional product or service. For example,\nWix offers a 1-year free domain registration to all customers who purchase a\nPremium plan. The referenced product instance must have either status `"PENDING"` or\n`"ACTIVE"`. You can use each product instance only a single time as reference\ninstance.'
1158
+ ).regex(
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}$/,
1160
+ "Must be a valid GUID"
1161
+ ).optional().nullable()
1162
+ }),
1163
+ z.xor([
1164
+ z.object({ billingInfo: z.never().optional() }),
1165
+ z.object({
1166
+ billingInfo: z.object({
1167
+ type: z.enum(["ONE_TIME", "RECURRING"]).describe("Payment type.").optional(),
1168
+ cycleDuration: z.object({
1169
+ unit: z.enum(["DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of the billing cycle.").optional(),
1170
+ count: z.number().int().describe(
1171
+ "Count of units that make up the billing cycle."
1172
+ ).min(1).optional()
1173
+ }).describe(
1174
+ "Duration of the billing cycle. Available only for `RECURRING` payments."
1175
+ ).optional()
1176
+ }).describe(
1177
+ "Billing information for the contract between the reseller and Wix."
1178
+ )
1179
+ })
1180
+ ])
1181
+ )
1182
+ ).max(1e3).min(1).optional(),
1183
+ _createdDate: z.date().describe("Date and time the package was created.").optional().nullable(),
1184
+ _updatedDate: z.date().describe("Date and time the package was last updated.").optional().nullable()
1185
+ }).describe("Updated package that includes the unassigned product instance.").optional()
1186
+ });
1187
+ var CancelProductInstanceRequest = z.object({
1188
+ instanceId: z.string().describe("ID of the product instance to cancel.").regex(
1189
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
1190
+ "Must be a valid GUID"
1191
+ ),
1192
+ options: z.object({
1193
+ idempotencyKey: z.string().describe("Idempotency key.").max(100).optional().nullable()
1194
+ }).optional()
1195
+ });
1196
+ var CancelProductInstanceResponse = z.object({
1197
+ idempotencyKey: z.string().describe("Idempotency key.").max(100).optional().nullable(),
1198
+ package: z.object({
1199
+ _id: z.string().describe("Package ID.").regex(
1200
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
1201
+ "Must be a valid GUID"
1202
+ ).optional(),
1203
+ accountId: z.string().describe(
1204
+ "Wix account ID. See\n[Account Level APIs](https://dev.wix.com/docs/rest/account-level/about-account-level-apis)\nfor more details."
1205
+ ).regex(
1206
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
1207
+ "Must be a valid GUID"
1208
+ ).optional(),
1209
+ externalId: z.string().describe(
1210
+ "External reference. For example, an external subscription ID.\nThis field isn't validated by Wix.\n\nMax: 100 characters"
1211
+ ).max(100).optional().nullable(),
1212
+ productInstances: z.array(
1213
+ z.intersection(
1214
+ z.object({
1215
+ instanceId: z.string().describe(
1216
+ "ID of the instance of the resold Wix service. **Note:** Differs from the\n`catalogProductId`. Allows you to identify different instances of the same\nproduct in a package."
1217
+ ).regex(
1218
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
1219
+ "Must be a valid GUID"
1220
+ ).optional(),
1221
+ siteId: z.string().describe(
1222
+ "ID of the Wix site that the product instance is assigned to.\nSee the [Query Sites API](https://dev.wix.com/api/rest/account-level-apis/sites/query-sites)\nfor more information."
1223
+ ).regex(
1224
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
1225
+ "Must be a valid GUID"
1226
+ ).optional().nullable(),
1227
+ catalogProductId: z.string().describe(
1228
+ "Product ID, as defined in the Wix Premium Product Catalog.\nContact the [Wix B2B sales team](mailto:bizdev@wix.com)\nfor more details about available Wix services."
1229
+ ).regex(
1230
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
1231
+ "Must be a valid GUID"
1232
+ ).optional(),
1233
+ status: z.enum([
1234
+ "PENDING",
1235
+ "ENABLED",
1236
+ "CANCELED",
1237
+ "FAILED",
1238
+ "AWAITING_ACTION"
1239
+ ]).describe("Status of the product instance.").optional(),
1240
+ failure: z.object({
1241
+ code: z.enum(["DELIVERY_TIMEOUT", "EXTERNAL_FAILURE"]).describe("Failure code.").optional(),
1242
+ message: z.string().describe("Failure message.").optional()
1243
+ }).describe(
1244
+ "Failure object. Only present for status `FAILED`. Describes why the product instance `FAILED`."
1245
+ ).optional(),
1246
+ _createdDate: z.date().describe("Date and time the product instance was created.").optional().nullable(),
1247
+ _updatedDate: z.date().describe(
1248
+ "Date and time the product instance was last updated."
1249
+ ).optional().nullable(),
1250
+ countryCode: z.string().describe(
1251
+ "Two-letter country code in\n[ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements)\nformat. Specifies where customers can claim vouchers that may come with the\nproduct. Contact the [Wix B2B sales team](mailto:bizdev@wix.com) to get more\ninformation about vouchers and supported locations."
1252
+ ).optional().nullable(),
1253
+ expirationDate: z.date().describe(
1254
+ "Date and time the product instance expires in `YYYY-MM-DDThh:mm:ss.sssZ` format.\nUsed only for instances that don't auto renew at the end of the current billing cycle."
1255
+ ).optional().nullable(),
1256
+ discountCode: z.string().describe(
1257
+ "Discount code indicating that the reseller provisioned the product instance\nduring a sale. Wix doesn't guarantee that a discount code reduces the\nprice between Wix and the reseller, even when it's valid. Contact the\n[Wix B2B sales team](mailto:bizdev@wix.com) for more information.\n\nMax: 25 characters"
1258
+ ).max(25).optional().nullable(),
1259
+ referenceProductInstanceId: z.string().describe(
1260
+ 'ID of a different product instance that you can use to offer your customers\ntime-limited free access to an additional product or service. For example,\nWix offers a 1-year free domain registration to all customers who purchase a\nPremium plan. The referenced product instance must have either status `"PENDING"` or\n`"ACTIVE"`. You can use each product instance only a single time as reference\ninstance.'
1261
+ ).regex(
1262
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
1263
+ "Must be a valid GUID"
1264
+ ).optional().nullable()
1265
+ }),
1266
+ z.xor([
1267
+ z.object({ billingInfo: z.never().optional() }),
1268
+ z.object({
1269
+ billingInfo: z.object({
1270
+ type: z.enum(["ONE_TIME", "RECURRING"]).describe("Payment type.").optional(),
1271
+ cycleDuration: z.object({
1272
+ unit: z.enum(["DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of the billing cycle.").optional(),
1273
+ count: z.number().int().describe(
1274
+ "Count of units that make up the billing cycle."
1275
+ ).min(1).optional()
1276
+ }).describe(
1277
+ "Duration of the billing cycle. Available only for `RECURRING` payments."
1278
+ ).optional()
1279
+ }).describe(
1280
+ "Billing information for the contract between the reseller and Wix."
1281
+ )
1282
+ })
1283
+ ])
1284
+ )
1285
+ ).max(1e3).min(1).optional(),
1286
+ _createdDate: z.date().describe("Date and time the package was created.").optional().nullable(),
1287
+ _updatedDate: z.date().describe("Date and time the package was last updated.").optional().nullable()
1288
+ }).describe(
1289
+ "Updated package that includes the previously included the canceled product instance."
1290
+ ).optional()
1291
+ });
1292
+ var AdjustProductInstanceSpecificationsRequest = z.object({
1293
+ instanceId: z.string().describe("ID of the product instance to adjust.").regex(
1294
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
1295
+ "Must be a valid GUID"
1296
+ ),
1297
+ options: z.object({
1298
+ idempotencyKey: z.string().describe("Idempotency key.").max(100).optional().nullable(),
1299
+ catalogProductId: z.string().describe(
1300
+ "ID of the product to replace the original instance. Required in case you don't\nprovide a new `billingInfo` object."
1301
+ ).regex(
1302
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
1303
+ "Must be a valid GUID"
1304
+ ).optional().nullable(),
1305
+ billingInfo: z.object({
1306
+ type: z.enum(["ONE_TIME", "RECURRING"]).optional(),
1307
+ cycleDuration: z.object({
1308
+ unit: z.enum(["DAY", "WEEK", "MONTH", "YEAR"]).optional(),
1309
+ count: z.number().int().describe("Count of units that make up the billing cycle.").min(1).optional()
1310
+ }).describe(
1311
+ "Duration of the billing cycle. Available only for `RECURRING` payments."
1312
+ ).optional()
1313
+ }).describe(
1314
+ "Information about the billing cycle. Required in case you don't provide a new\n`catalogProductId`. The new billing cycle must be supported for the service.\nContact the [Wix B2B sales team](mailto:bizdev@wix.com) for\ninformation about a service's supported billing cycles. If\nyou adjust the billing cycle for a product instance with `RECURRING`\npayments, you must also provide `billingInfo.cycleDuration.unit`."
1315
+ ).optional(),
1316
+ discountCode: z.string().describe(
1317
+ "Discount code indicating that the reseller provisioned the product instance\nduring a sale. In case you pass a code that isn't valid, the call succeeds and\nno discount is applied to the product instance. Wix doesn't guarantee that a\ndiscount code reduces the price between Wix and the reseller, even when it's\nvalid. You can't add a discount code after you've created the\nproduct instance. Contact the [Wix B2B sales team](mailto:bizdev@wix.com) for\nmore information about supported codes.\n\nMax: 25 characters"
1318
+ ).max(25).optional().nullable()
1319
+ }).optional()
1320
+ });
1321
+ var AdjustProductInstanceSpecificationsResponse = z.object({
1322
+ idempotencyKey: z.string().describe("Idempotency key.").max(100).optional().nullable(),
1323
+ package: z.object({
1324
+ _id: z.string().describe("Package ID.").regex(
1325
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
1326
+ "Must be a valid GUID"
1327
+ ).optional(),
1328
+ accountId: z.string().describe(
1329
+ "Wix account ID. See\n[Account Level APIs](https://dev.wix.com/docs/rest/account-level/about-account-level-apis)\nfor more details."
1330
+ ).regex(
1331
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
1332
+ "Must be a valid GUID"
1333
+ ).optional(),
1334
+ externalId: z.string().describe(
1335
+ "External reference. For example, an external subscription ID.\nThis field isn't validated by Wix.\n\nMax: 100 characters"
1336
+ ).max(100).optional().nullable(),
1337
+ productInstances: z.array(
1338
+ z.intersection(
1339
+ z.object({
1340
+ instanceId: z.string().describe(
1341
+ "ID of the instance of the resold Wix service. **Note:** Differs from the\n`catalogProductId`. Allows you to identify different instances of the same\nproduct in a package."
1342
+ ).regex(
1343
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
1344
+ "Must be a valid GUID"
1345
+ ).optional(),
1346
+ siteId: z.string().describe(
1347
+ "ID of the Wix site that the product instance is assigned to.\nSee the [Query Sites API](https://dev.wix.com/api/rest/account-level-apis/sites/query-sites)\nfor more information."
1348
+ ).regex(
1349
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
1350
+ "Must be a valid GUID"
1351
+ ).optional().nullable(),
1352
+ catalogProductId: z.string().describe(
1353
+ "Product ID, as defined in the Wix Premium Product Catalog.\nContact the [Wix B2B sales team](mailto:bizdev@wix.com)\nfor more details about available Wix services."
1354
+ ).regex(
1355
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
1356
+ "Must be a valid GUID"
1357
+ ).optional(),
1358
+ status: z.enum([
1359
+ "PENDING",
1360
+ "ENABLED",
1361
+ "CANCELED",
1362
+ "FAILED",
1363
+ "AWAITING_ACTION"
1364
+ ]).describe("Status of the product instance.").optional(),
1365
+ failure: z.object({
1366
+ code: z.enum(["DELIVERY_TIMEOUT", "EXTERNAL_FAILURE"]).describe("Failure code.").optional(),
1367
+ message: z.string().describe("Failure message.").optional()
1368
+ }).describe(
1369
+ "Failure object. Only present for status `FAILED`. Describes why the product instance `FAILED`."
1370
+ ).optional(),
1371
+ _createdDate: z.date().describe("Date and time the product instance was created.").optional().nullable(),
1372
+ _updatedDate: z.date().describe(
1373
+ "Date and time the product instance was last updated."
1374
+ ).optional().nullable(),
1375
+ countryCode: z.string().describe(
1376
+ "Two-letter country code in\n[ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements)\nformat. Specifies where customers can claim vouchers that may come with the\nproduct. Contact the [Wix B2B sales team](mailto:bizdev@wix.com) to get more\ninformation about vouchers and supported locations."
1377
+ ).optional().nullable(),
1378
+ expirationDate: z.date().describe(
1379
+ "Date and time the product instance expires in `YYYY-MM-DDThh:mm:ss.sssZ` format.\nUsed only for instances that don't auto renew at the end of the current billing cycle."
1380
+ ).optional().nullable(),
1381
+ discountCode: z.string().describe(
1382
+ "Discount code indicating that the reseller provisioned the product instance\nduring a sale. Wix doesn't guarantee that a discount code reduces the\nprice between Wix and the reseller, even when it's valid. Contact the\n[Wix B2B sales team](mailto:bizdev@wix.com) for more information.\n\nMax: 25 characters"
1383
+ ).max(25).optional().nullable(),
1384
+ referenceProductInstanceId: z.string().describe(
1385
+ 'ID of a different product instance that you can use to offer your customers\ntime-limited free access to an additional product or service. For example,\nWix offers a 1-year free domain registration to all customers who purchase a\nPremium plan. The referenced product instance must have either status `"PENDING"` or\n`"ACTIVE"`. You can use each product instance only a single time as reference\ninstance.'
1386
+ ).regex(
1387
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
1388
+ "Must be a valid GUID"
1389
+ ).optional().nullable()
1390
+ }),
1391
+ z.xor([
1392
+ z.object({ billingInfo: z.never().optional() }),
1393
+ z.object({
1394
+ billingInfo: z.object({
1395
+ type: z.enum(["ONE_TIME", "RECURRING"]).describe("Payment type.").optional(),
1396
+ cycleDuration: z.object({
1397
+ unit: z.enum(["DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of the billing cycle.").optional(),
1398
+ count: z.number().int().describe(
1399
+ "Count of units that make up the billing cycle."
1400
+ ).min(1).optional()
1401
+ }).describe(
1402
+ "Duration of the billing cycle. Available only for `RECURRING` payments."
1403
+ ).optional()
1404
+ }).describe(
1405
+ "Billing information for the contract between the reseller and Wix."
1406
+ )
1407
+ })
1408
+ ])
1409
+ )
1410
+ ).max(1e3).min(1).optional(),
1411
+ _createdDate: z.date().describe("Date and time the package was created.").optional().nullable(),
1412
+ _updatedDate: z.date().describe("Date and time the package was last updated.").optional().nullable()
1413
+ }).describe("Updated package that includes the adjusted product instance.").optional()
1414
+ });
1415
+ var UpdatePackageExternalIdRequest = z.object({
1416
+ identifiers: z.object({
1417
+ packageId: z.string().describe("ID of the package to update.").regex(
1418
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
1419
+ "Must be a valid GUID"
1420
+ ),
1421
+ externalId: z.string().describe("External ID that will be assigned to the package.").max(100)
1422
+ })
1423
+ });
1424
+ var UpdatePackageExternalIdResponse = z.object({
1425
+ updatedPackage: z.object({
1426
+ _id: z.string().describe("Package ID.").regex(
1427
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
1428
+ "Must be a valid GUID"
1429
+ ).optional(),
1430
+ accountId: z.string().describe(
1431
+ "Wix account ID. See\n[Account Level APIs](https://dev.wix.com/docs/rest/account-level/about-account-level-apis)\nfor more details."
1432
+ ).regex(
1433
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
1434
+ "Must be a valid GUID"
1435
+ ).optional(),
1436
+ externalId: z.string().describe(
1437
+ "External reference. For example, an external subscription ID.\nThis field isn't validated by Wix.\n\nMax: 100 characters"
1438
+ ).max(100).optional().nullable(),
1439
+ productInstances: z.array(
1440
+ z.intersection(
1441
+ z.object({
1442
+ instanceId: z.string().describe(
1443
+ "ID of the instance of the resold Wix service. **Note:** Differs from the\n`catalogProductId`. Allows you to identify different instances of the same\nproduct in a package."
1444
+ ).regex(
1445
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
1446
+ "Must be a valid GUID"
1447
+ ).optional(),
1448
+ siteId: z.string().describe(
1449
+ "ID of the Wix site that the product instance is assigned to.\nSee the [Query Sites API](https://dev.wix.com/api/rest/account-level-apis/sites/query-sites)\nfor more information."
1450
+ ).regex(
1451
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
1452
+ "Must be a valid GUID"
1453
+ ).optional().nullable(),
1454
+ catalogProductId: z.string().describe(
1455
+ "Product ID, as defined in the Wix Premium Product Catalog.\nContact the [Wix B2B sales team](mailto:bizdev@wix.com)\nfor more details about available Wix services."
1456
+ ).regex(
1457
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
1458
+ "Must be a valid GUID"
1459
+ ).optional(),
1460
+ status: z.enum([
1461
+ "PENDING",
1462
+ "ENABLED",
1463
+ "CANCELED",
1464
+ "FAILED",
1465
+ "AWAITING_ACTION"
1466
+ ]).describe("Status of the product instance.").optional(),
1467
+ failure: z.object({
1468
+ code: z.enum(["DELIVERY_TIMEOUT", "EXTERNAL_FAILURE"]).describe("Failure code.").optional(),
1469
+ message: z.string().describe("Failure message.").optional()
1470
+ }).describe(
1471
+ "Failure object. Only present for status `FAILED`. Describes why the product instance `FAILED`."
1472
+ ).optional(),
1473
+ _createdDate: z.date().describe("Date and time the product instance was created.").optional().nullable(),
1474
+ _updatedDate: z.date().describe(
1475
+ "Date and time the product instance was last updated."
1476
+ ).optional().nullable(),
1477
+ countryCode: z.string().describe(
1478
+ "Two-letter country code in\n[ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements)\nformat. Specifies where customers can claim vouchers that may come with the\nproduct. Contact the [Wix B2B sales team](mailto:bizdev@wix.com) to get more\ninformation about vouchers and supported locations."
1479
+ ).optional().nullable(),
1480
+ expirationDate: z.date().describe(
1481
+ "Date and time the product instance expires in `YYYY-MM-DDThh:mm:ss.sssZ` format.\nUsed only for instances that don't auto renew at the end of the current billing cycle."
1482
+ ).optional().nullable(),
1483
+ discountCode: z.string().describe(
1484
+ "Discount code indicating that the reseller provisioned the product instance\nduring a sale. Wix doesn't guarantee that a discount code reduces the\nprice between Wix and the reseller, even when it's valid. Contact the\n[Wix B2B sales team](mailto:bizdev@wix.com) for more information.\n\nMax: 25 characters"
1485
+ ).max(25).optional().nullable(),
1486
+ referenceProductInstanceId: z.string().describe(
1487
+ 'ID of a different product instance that you can use to offer your customers\ntime-limited free access to an additional product or service. For example,\nWix offers a 1-year free domain registration to all customers who purchase a\nPremium plan. The referenced product instance must have either status `"PENDING"` or\n`"ACTIVE"`. You can use each product instance only a single time as reference\ninstance.'
1488
+ ).regex(
1489
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
1490
+ "Must be a valid GUID"
1491
+ ).optional().nullable()
1492
+ }),
1493
+ z.xor([
1494
+ z.object({ billingInfo: z.never().optional() }),
1495
+ z.object({
1496
+ billingInfo: z.object({
1497
+ type: z.enum(["ONE_TIME", "RECURRING"]).describe("Payment type.").optional(),
1498
+ cycleDuration: z.object({
1499
+ unit: z.enum(["DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of the billing cycle.").optional(),
1500
+ count: z.number().int().describe(
1501
+ "Count of units that make up the billing cycle."
1502
+ ).min(1).optional()
1503
+ }).describe(
1504
+ "Duration of the billing cycle. Available only for `RECURRING` payments."
1505
+ ).optional()
1506
+ }).describe(
1507
+ "Billing information for the contract between the reseller and Wix."
1508
+ )
1509
+ })
1510
+ ])
1511
+ )
1512
+ ).max(1e3).min(1).optional(),
1513
+ _createdDate: z.date().describe("Date and time the package was created.").optional().nullable(),
1514
+ _updatedDate: z.date().describe("Date and time the package was last updated.").optional().nullable()
1515
+ }).describe("Updated package.").optional()
1516
+ });
1517
+ export {
1518
+ AdjustProductInstanceSpecificationsRequest,
1519
+ AdjustProductInstanceSpecificationsResponse,
1520
+ AssignProductInstanceToSiteRequest,
1521
+ AssignProductInstanceToSiteResponse,
1522
+ CancelPackageRequest,
1523
+ CancelPackageResponse,
1524
+ CancelProductInstanceRequest,
1525
+ CancelProductInstanceResponse,
1526
+ CreatePackageRequest,
1527
+ CreatePackageResponse,
1528
+ CreatePackageV2Request,
1529
+ CreatePackageV2Response,
1530
+ GetPackageRequest,
1531
+ GetPackageResponse,
1532
+ QueryPackagesRequest,
1533
+ QueryPackagesResponse,
1534
+ UnassignProductInstanceFromSiteRequest,
1535
+ UnassignProductInstanceFromSiteResponse,
1536
+ UpdatePackageExternalIdRequest,
1537
+ UpdatePackageExternalIdResponse
1538
+ };
1539
+ //# sourceMappingURL=schemas.mjs.map