@wix/auto_sdk_pricing-plans_orders 1.0.121 → 1.0.122
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/index.d.ts +129 -129
- package/build/cjs/index.js +706 -588
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +766 -766
- package/build/cjs/index.typings.js +548 -434
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +484 -484
- package/build/cjs/meta.js +483 -369
- package/build/cjs/meta.js.map +1 -1
- package/build/cjs/schemas.d.ts +199 -199
- package/build/cjs/schemas.js +891 -891
- package/build/cjs/schemas.js.map +1 -1
- package/build/es/index.d.mts +129 -129
- package/build/es/index.mjs +706 -588
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +766 -766
- package/build/es/index.typings.mjs +548 -434
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +484 -484
- package/build/es/meta.mjs +483 -369
- package/build/es/meta.mjs.map +1 -1
- package/build/es/schemas.d.mts +199 -199
- package/build/es/schemas.mjs +891 -891
- package/build/es/schemas.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +129 -129
- package/build/internal/cjs/index.js +706 -588
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +794 -794
- package/build/internal/cjs/index.typings.js +548 -434
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +500 -500
- package/build/internal/cjs/meta.js +483 -369
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/cjs/schemas.d.ts +199 -199
- package/build/internal/cjs/schemas.js +891 -891
- package/build/internal/cjs/schemas.js.map +1 -1
- package/build/internal/es/index.d.mts +129 -129
- package/build/internal/es/index.mjs +706 -588
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +794 -794
- package/build/internal/es/index.typings.mjs +548 -434
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +500 -500
- package/build/internal/es/meta.mjs +483 -369
- package/build/internal/es/meta.mjs.map +1 -1
- package/build/internal/es/schemas.d.mts +199 -199
- package/build/internal/es/schemas.mjs +891 -891
- package/build/internal/es/schemas.mjs.map +1 -1
- package/package.json +2 -2
|
@@ -1,29 +1,13 @@
|
|
|
1
1
|
// src/pricing-plans-v2-order-orders.schemas.ts
|
|
2
2
|
import * as z from "zod";
|
|
3
|
-
var
|
|
4
|
-
|
|
3
|
+
var ManagementGetOrderRequest = /* @__PURE__ */ z.object({
|
|
4
|
+
_id: 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({
|
|
9
|
-
startDate: z.date().describe(
|
|
10
|
-
"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."
|
|
11
|
-
).optional().nullable(),
|
|
12
|
-
couponCode: z.string().describe("Coupon code to apply.").min(1).max(20).optional().nullable(),
|
|
13
|
-
onBehalf: z.object({
|
|
14
|
-
memberId: z.string().describe("Member ID.").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
|
-
),
|
|
18
|
-
orderMethod: z.enum(["UNKNOWN", "MOTO", "POS"]).optional()
|
|
19
|
-
}).describe("Provided if checkout is initiated on buyer's behalf.").optional(),
|
|
20
|
-
submissionId: z.string().describe("Submission ID of the form submitted with this order.").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
|
-
}).optional()
|
|
8
|
+
options: z.object({ fieldSet: z.enum(["UNKNOWN_SET", "BASIC", "FULL"]).optional() }).describe("Options to use when getting an order. ").optional()
|
|
25
9
|
});
|
|
26
|
-
var
|
|
10
|
+
var ManagementGetOrderResponse = /* @__PURE__ */ z.object({
|
|
27
11
|
order: z.object({
|
|
28
12
|
_id: z.string().describe("Order ID.").regex(
|
|
29
13
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
@@ -344,365 +328,470 @@ var CreateOnlineOrderResponse = z.object({
|
|
|
344
328
|
}).describe(
|
|
345
329
|
"Information about the form submitted during the plan's checkout."
|
|
346
330
|
).optional()
|
|
347
|
-
}).describe("
|
|
331
|
+
}).describe("Order.").optional()
|
|
348
332
|
});
|
|
349
|
-
var
|
|
350
|
-
planId: z.string().describe("ID of the plan being ordered, from the Plans API.").regex(
|
|
351
|
-
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
352
|
-
"Must be a valid GUID"
|
|
353
|
-
),
|
|
354
|
-
memberId: z.string().describe("ID of the member ordering the plan, from the Members API.").regex(
|
|
355
|
-
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
356
|
-
"Must be a valid GUID"
|
|
357
|
-
),
|
|
333
|
+
var ManagementListOrdersRequest = /* @__PURE__ */ z.object({
|
|
358
334
|
options: z.object({
|
|
359
|
-
|
|
360
|
-
|
|
335
|
+
buyerIds: z.array(z.string()).optional(),
|
|
336
|
+
planIds: z.array(z.string()).optional(),
|
|
337
|
+
autoRenewCanceled: z.boolean().describe(
|
|
338
|
+
"Filter by whether or not the auto-renewal of recurring orders was canceled."
|
|
361
339
|
).optional().nullable(),
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
_id: z.string().describe("Order ID.").regex(
|
|
373
|
-
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
374
|
-
"Must be a valid GUID"
|
|
340
|
+
orderStatuses: z.array(
|
|
341
|
+
z.enum([
|
|
342
|
+
"UNDEFINED",
|
|
343
|
+
"DRAFT",
|
|
344
|
+
"PENDING",
|
|
345
|
+
"ACTIVE",
|
|
346
|
+
"PAUSED",
|
|
347
|
+
"ENDED",
|
|
348
|
+
"CANCELED"
|
|
349
|
+
])
|
|
375
350
|
).optional(),
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
351
|
+
paymentStatuses: z.array(
|
|
352
|
+
z.enum([
|
|
353
|
+
"UNDEFINED",
|
|
354
|
+
"PAID",
|
|
355
|
+
"REFUNDED",
|
|
356
|
+
"FAILED",
|
|
357
|
+
"UNPAID",
|
|
358
|
+
"PENDING",
|
|
359
|
+
"NOT_APPLICABLE"
|
|
360
|
+
])
|
|
381
361
|
).optional(),
|
|
382
|
-
|
|
383
|
-
"
|
|
384
|
-
).
|
|
385
|
-
|
|
386
|
-
|
|
362
|
+
limit: z.number().int().describe(
|
|
363
|
+
"Number of orders to return. See Sorting and Paging for more information.\n\nMax: `50`"
|
|
364
|
+
).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()
|
|
372
|
+
}).describe(
|
|
373
|
+
"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
|
+
).optional()
|
|
375
|
+
}).describe(
|
|
376
|
+
"Sort order.\n\nUse `ASC` for ascending order or `DESC` for descending order.\n\nDefault: `DESC`."
|
|
387
377
|
).optional(),
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
memberId: z.string().describe("Member ID for a Wix site member, from the Members API.").regex(
|
|
378
|
+
fieldSet: z.enum(["UNKNOWN_SET", "BASIC", "FULL"]).optional()
|
|
379
|
+
}).describe("Filtering, sorting, and pagination options. ").optional()
|
|
380
|
+
});
|
|
381
|
+
var ManagementListOrdersResponse = /* @__PURE__ */ z.object({
|
|
382
|
+
orders: z.array(
|
|
383
|
+
z.object({
|
|
384
|
+
_id: z.string().describe("Order ID.").regex(
|
|
396
385
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
397
386
|
"Must be a valid GUID"
|
|
398
387
|
).optional(),
|
|
399
|
-
|
|
400
|
-
"
|
|
388
|
+
planId: z.string().describe(
|
|
389
|
+
"ID of the plan purchased with the order, from the Plans API."
|
|
401
390
|
).regex(
|
|
402
391
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
403
392
|
"Must be a valid GUID"
|
|
404
|
-
).optional()
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
393
|
+
).optional(),
|
|
394
|
+
subscriptionId: z.string().describe(
|
|
395
|
+
"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
|
+
).regex(
|
|
397
|
+
/^[0-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
|
+
"Must be a valid GUID"
|
|
399
|
+
).optional(),
|
|
400
|
+
wixPayOrderId: z.string().describe(
|
|
401
|
+
"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
|
+
).regex(
|
|
403
|
+
/^[0-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
|
+
"Must be a valid GUID"
|
|
405
|
+
).optional().nullable(),
|
|
406
|
+
buyer: z.object({
|
|
407
|
+
memberId: z.string().describe(
|
|
408
|
+
"Member ID for a Wix site member, from the Members API."
|
|
409
|
+
).regex(
|
|
410
|
+
/^[0-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
|
+
"Must be a valid GUID"
|
|
412
412
|
).optional(),
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
413
|
+
contactId: z.string().describe(
|
|
414
|
+
"Contact ID for a Wix site contact, from the Contacts API."
|
|
415
|
+
).regex(
|
|
416
|
+
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
417
|
+
"Must be a valid GUID"
|
|
418
|
+
).optional()
|
|
419
|
+
}).describe(
|
|
420
|
+
"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
|
+
).optional(),
|
|
422
|
+
priceDetails: z.intersection(
|
|
423
|
+
z.object({
|
|
424
|
+
subtotal: z.string().describe(
|
|
425
|
+
'Price of the order excluding tax, specified as a monetary amount. for example, `"9.99"`.'
|
|
418
426
|
).optional(),
|
|
419
|
-
|
|
420
|
-
|
|
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(
|
|
431
|
+
"Whether tax is included in the original price. When `false`, tax is added at checkout."
|
|
432
|
+
).optional(),
|
|
433
|
+
rate: z.string().describe(
|
|
434
|
+
'Tax rate percentage, as a number between 0 and 100. For example, a 7% tax rate is `"7.00"`.'
|
|
435
|
+
).optional(),
|
|
436
|
+
amount: z.string().describe(
|
|
437
|
+
'Total tax, specified as a monetary amount. For example, `"3.99"`.'
|
|
438
|
+
).optional()
|
|
439
|
+
}).describe("Tax applied.").optional(),
|
|
440
|
+
total: z.string().describe(
|
|
441
|
+
'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`.'
|
|
421
442
|
).optional(),
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
).optional()
|
|
425
|
-
}).describe("Tax applied.").optional(),
|
|
426
|
-
total: z.string().describe(
|
|
427
|
-
'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`.'
|
|
428
|
-
).optional(),
|
|
429
|
-
planPrice: z.string().describe("Plan price as it was at the moment of order creation.").optional(),
|
|
430
|
-
currency: z.string().describe(
|
|
431
|
-
"Currency code. Must be valid ISO 4217 currency code (e.g., USD)."
|
|
432
|
-
).optional(),
|
|
433
|
-
freeTrialDays: z.number().int().describe(
|
|
434
|
-
"Free trial period for the order in days. Only available for recurring plans."
|
|
435
|
-
).min(1).max(999).optional().nullable(),
|
|
436
|
-
coupon: z.object({
|
|
437
|
-
code: z.string().describe("Code of the applied coupon.").min(1).max(20).optional(),
|
|
438
|
-
amount: z.string().describe(
|
|
439
|
-
"Total discount of the coupon, as a monetary amount."
|
|
443
|
+
planPrice: z.string().describe(
|
|
444
|
+
"Plan price as it was at the moment of order creation."
|
|
440
445
|
).optional(),
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
446
|
+
currency: z.string().describe(
|
|
447
|
+
"Currency code. Must be valid ISO 4217 currency code (e.g., USD)."
|
|
448
|
+
).optional(),
|
|
449
|
+
freeTrialDays: z.number().int().describe(
|
|
450
|
+
"Free trial period for the order in days. Only available for recurring plans."
|
|
451
|
+
).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(
|
|
455
|
+
"Total discount of the coupon, as a monetary amount."
|
|
456
|
+
).optional(),
|
|
457
|
+
_id: z.string().describe("Coupon ID.").regex(
|
|
458
|
+
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
459
|
+
"Must be a valid GUID"
|
|
460
|
+
).optional()
|
|
461
|
+
}).describe(
|
|
462
|
+
"Coupon applied to the order. Empty means no coupon was applied."
|
|
444
463
|
).optional()
|
|
445
|
-
}).describe(
|
|
446
|
-
"Coupon applied to the order. Empty means no coupon was applied."
|
|
447
|
-
).optional()
|
|
448
|
-
}),
|
|
449
|
-
z.xor([
|
|
450
|
-
z.object({
|
|
451
|
-
subscription: z.never().optional(),
|
|
452
|
-
singlePaymentForDuration: z.never().optional(),
|
|
453
|
-
singlePaymentUnlimited: z.never().optional()
|
|
454
464
|
}),
|
|
455
|
-
z.
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
465
|
+
z.xor([
|
|
466
|
+
z.object({
|
|
467
|
+
subscription: z.never().optional(),
|
|
468
|
+
singlePaymentForDuration: z.never().optional(),
|
|
469
|
+
singlePaymentUnlimited: z.never().optional()
|
|
470
|
+
}),
|
|
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(
|
|
477
|
+
"Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`."
|
|
478
|
+
).min(1).optional().nullable(),
|
|
479
|
+
unit: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
|
|
480
|
+
}).describe(
|
|
481
|
+
"Number of payment cycles the subscription is valid for.\n`0` for unlimited plans or for plans that are valid until canceled."
|
|
482
|
+
).optional(),
|
|
483
|
+
cycleCount: z.number().int().describe(
|
|
484
|
+
"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
|
+
).min(0).max(2e3).optional().nullable()
|
|
486
|
+
}).describe("Order has recurring payments.")
|
|
487
|
+
}),
|
|
488
|
+
z.object({
|
|
489
|
+
subscription: z.never().optional(),
|
|
490
|
+
singlePaymentUnlimited: z.never().optional(),
|
|
491
|
+
singlePaymentForDuration: z.object({
|
|
460
492
|
count: z.number().int().describe(
|
|
461
493
|
"Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`."
|
|
462
494
|
).min(1).optional().nullable(),
|
|
463
495
|
unit: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
|
|
464
496
|
}).describe(
|
|
465
|
-
"
|
|
466
|
-
)
|
|
467
|
-
|
|
468
|
-
"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."
|
|
469
|
-
).min(0).max(2e3).optional().nullable()
|
|
470
|
-
}).describe("Order has recurring payments.")
|
|
471
|
-
}),
|
|
472
|
-
z.object({
|
|
473
|
-
subscription: z.never().optional(),
|
|
474
|
-
singlePaymentUnlimited: z.never().optional(),
|
|
475
|
-
singlePaymentForDuration: z.object({
|
|
476
|
-
count: z.number().int().describe(
|
|
477
|
-
"Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`."
|
|
478
|
-
).min(1).optional().nullable(),
|
|
479
|
-
unit: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
|
|
480
|
-
}).describe(
|
|
481
|
-
"One-time payment. Order is valid for a specified duration."
|
|
482
|
-
)
|
|
483
|
-
}),
|
|
484
|
-
z.object({
|
|
485
|
-
subscription: z.never().optional(),
|
|
486
|
-
singlePaymentForDuration: z.never().optional(),
|
|
487
|
-
singlePaymentUnlimited: z.boolean().describe(
|
|
488
|
-
"One-time payment. Order is valid until it is canceled."
|
|
489
|
-
)
|
|
490
|
-
})
|
|
491
|
-
])
|
|
492
|
-
).describe(
|
|
493
|
-
"__Deprecated.__ Use `pricing` instead. This property will be removed on September 30, 2022."
|
|
494
|
-
).optional(),
|
|
495
|
-
pricing: z.intersection(
|
|
496
|
-
z.object({
|
|
497
|
-
prices: z.array(
|
|
497
|
+
"One-time payment. Order is valid for a specified duration."
|
|
498
|
+
)
|
|
499
|
+
}),
|
|
498
500
|
z.object({
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
"Total discount of the coupon, as a monetary amount."
|
|
501
|
+
subscription: z.never().optional(),
|
|
502
|
+
singlePaymentForDuration: z.never().optional(),
|
|
503
|
+
singlePaymentUnlimited: z.boolean().describe(
|
|
504
|
+
"One-time payment. Order is valid until it is canceled."
|
|
505
|
+
)
|
|
506
|
+
})
|
|
507
|
+
])
|
|
508
|
+
).describe(
|
|
509
|
+
"__Deprecated.__ Use `pricing` instead. This property will be removed on September 30, 2022."
|
|
510
|
+
).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(
|
|
517
|
+
"Price starts to apply with this cycle.\n\n`1` is the first payment cycle for all pricing models."
|
|
517
518
|
).optional(),
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
).optional()
|
|
519
|
+
numberOfCycles: z.number().int().describe(
|
|
520
|
+
"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
|
+
).optional().nullable()
|
|
522
522
|
}).describe(
|
|
523
|
-
"
|
|
523
|
+
"Cycle duration to apply `price` for.\n\nUse with all pricing models.\nCan apply the same price to multiple payment cycles."
|
|
524
524
|
).optional(),
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
includedInPrice: z.boolean().describe(
|
|
529
|
-
"Whether tax is included in the original price. When `false`, tax is added at checkout."
|
|
525
|
+
price: z.object({
|
|
526
|
+
subtotal: z.string().describe(
|
|
527
|
+
'Price of the order excluding tax, specified as a monetary amount. For example, `"9.99"`.'
|
|
530
528
|
).optional(),
|
|
531
|
-
|
|
532
|
-
|
|
529
|
+
coupon: z.object({
|
|
530
|
+
code: z.string().describe("Code of the applied coupon.").min(1).max(20).optional(),
|
|
531
|
+
amount: z.string().describe(
|
|
532
|
+
"Total discount of the coupon, as a monetary amount."
|
|
533
|
+
).optional(),
|
|
534
|
+
_id: z.string().describe("Coupon ID.").regex(
|
|
535
|
+
/^[0-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
|
+
"Must be a valid GUID"
|
|
537
|
+
).optional()
|
|
538
|
+
}).describe(
|
|
539
|
+
"Coupon applied to the order, from the Coupons API."
|
|
533
540
|
).optional(),
|
|
534
|
-
|
|
535
|
-
|
|
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(
|
|
545
|
+
"Whether tax is included in the original price. When `false`, tax is added at checkout."
|
|
546
|
+
).optional(),
|
|
547
|
+
rate: z.string().describe(
|
|
548
|
+
'Tax rate percentage, as a number between 0 and 100. For example, a 7% tax rate is `"7.00"`.'
|
|
549
|
+
).optional(),
|
|
550
|
+
amount: z.string().describe(
|
|
551
|
+
'Total tax, specified as a monetary amount. For example, `"3.99"`.'
|
|
552
|
+
).optional()
|
|
553
|
+
}).describe(
|
|
554
|
+
"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
|
+
).optional(),
|
|
556
|
+
total: z.string().describe(
|
|
557
|
+
'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
|
+
).optional(),
|
|
559
|
+
currency: z.string().describe(
|
|
560
|
+
"Three-letter currency code in\n[ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format."
|
|
561
|
+
).optional(),
|
|
562
|
+
proration: z.string().describe(
|
|
563
|
+
"Price change after billing date was change and price was adjusted. Could be positive and negative values."
|
|
536
564
|
).optional()
|
|
565
|
+
}).describe("Order price.").optional()
|
|
566
|
+
})
|
|
567
|
+
).optional()
|
|
568
|
+
}),
|
|
569
|
+
z.xor([
|
|
570
|
+
z.object({
|
|
571
|
+
subscription: z.never().optional(),
|
|
572
|
+
singlePaymentForDuration: z.never().optional(),
|
|
573
|
+
singlePaymentUnlimited: z.never().optional()
|
|
574
|
+
}),
|
|
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(
|
|
581
|
+
"Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`."
|
|
582
|
+
).min(1).optional().nullable(),
|
|
583
|
+
unit: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
|
|
537
584
|
}).describe(
|
|
538
|
-
"
|
|
539
|
-
).optional(),
|
|
540
|
-
total: z.string().describe(
|
|
541
|
-
'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`.'
|
|
542
|
-
).optional(),
|
|
543
|
-
currency: z.string().describe(
|
|
544
|
-
"Three-letter currency code in\n[ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format."
|
|
585
|
+
"Number of payment cycles the subscription is valid for.\n`0` for unlimited plans or for plans that are valid until canceled."
|
|
545
586
|
).optional(),
|
|
546
|
-
|
|
547
|
-
"
|
|
548
|
-
).optional()
|
|
549
|
-
}).describe(
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
singlePaymentUnlimited: z.never().optional()
|
|
558
|
-
}),
|
|
559
|
-
z.object({
|
|
560
|
-
singlePaymentForDuration: z.never().optional(),
|
|
561
|
-
singlePaymentUnlimited: z.never().optional(),
|
|
562
|
-
subscription: z.object({
|
|
563
|
-
cycleDuration: z.object({
|
|
587
|
+
cycleCount: z.number().int().describe(
|
|
588
|
+
"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
|
+
).min(0).max(2e3).optional().nullable()
|
|
590
|
+
}).describe(
|
|
591
|
+
"Pricing model for an order with recurring payment cycles."
|
|
592
|
+
)
|
|
593
|
+
}),
|
|
594
|
+
z.object({
|
|
595
|
+
subscription: z.never().optional(),
|
|
596
|
+
singlePaymentUnlimited: z.never().optional(),
|
|
597
|
+
singlePaymentForDuration: z.object({
|
|
564
598
|
count: z.number().int().describe(
|
|
565
599
|
"Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`."
|
|
566
600
|
).min(1).optional().nullable(),
|
|
567
601
|
unit: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
|
|
568
602
|
}).describe(
|
|
569
|
-
"
|
|
570
|
-
)
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
unit: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
|
|
586
|
-
}).describe(
|
|
587
|
-
"Pricing model for an order with a one-time payment and the order is valid for a specific amount of time."
|
|
588
|
-
)
|
|
589
|
-
}),
|
|
590
|
-
z.object({
|
|
591
|
-
subscription: z.never().optional(),
|
|
592
|
-
singlePaymentForDuration: z.never().optional(),
|
|
593
|
-
singlePaymentUnlimited: z.boolean().describe(
|
|
594
|
-
"Pricing model for an order with a one-time payment and the order is valid until canceled."
|
|
595
|
-
)
|
|
596
|
-
})
|
|
597
|
-
])
|
|
598
|
-
).describe(
|
|
599
|
-
"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)."
|
|
600
|
-
).optional(),
|
|
601
|
-
type: z.enum(["UNDEFINED", "ONLINE", "OFFLINE", "EXTERNAL"]).describe("How the order was processed.").optional(),
|
|
602
|
-
status: z.enum([
|
|
603
|
-
"UNDEFINED",
|
|
604
|
-
"DRAFT",
|
|
605
|
-
"PENDING",
|
|
606
|
-
"ACTIVE",
|
|
607
|
-
"PAUSED",
|
|
608
|
-
"ENDED",
|
|
609
|
-
"CANCELED"
|
|
610
|
-
]).describe("Status of the order.").optional(),
|
|
611
|
-
autoRenewCanceled: z.boolean().describe(
|
|
612
|
-
"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."
|
|
613
|
-
).optional().nullable(),
|
|
614
|
-
cancellation: z.object({
|
|
615
|
-
requestedDate: z.date().describe("Date and time the cancellation was requested.").optional().nullable(),
|
|
616
|
-
cause: z.enum([
|
|
603
|
+
"Pricing model for an order with a one-time payment and the order is valid for a specific amount of time."
|
|
604
|
+
)
|
|
605
|
+
}),
|
|
606
|
+
z.object({
|
|
607
|
+
subscription: z.never().optional(),
|
|
608
|
+
singlePaymentForDuration: z.never().optional(),
|
|
609
|
+
singlePaymentUnlimited: z.boolean().describe(
|
|
610
|
+
"Pricing model for an order with a one-time payment and the order is valid until canceled."
|
|
611
|
+
)
|
|
612
|
+
})
|
|
613
|
+
])
|
|
614
|
+
).describe(
|
|
615
|
+
"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
|
+
).optional(),
|
|
617
|
+
type: z.enum(["UNDEFINED", "ONLINE", "OFFLINE", "EXTERNAL"]).describe("How the order was processed.").optional(),
|
|
618
|
+
status: z.enum([
|
|
617
619
|
"UNDEFINED",
|
|
618
|
-
"
|
|
619
|
-
"
|
|
620
|
-
"
|
|
621
|
-
"
|
|
622
|
-
"
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
}).describe(
|
|
628
|
-
"Details about the cancellation of an order.\n\nOnly present if the status is `CANCELED`."
|
|
629
|
-
).optional(),
|
|
630
|
-
lastPaymentStatus: z.enum([
|
|
631
|
-
"UNDEFINED",
|
|
632
|
-
"PAID",
|
|
633
|
-
"REFUNDED",
|
|
634
|
-
"FAILED",
|
|
635
|
-
"UNPAID",
|
|
636
|
-
"PENDING",
|
|
637
|
-
"NOT_APPLICABLE"
|
|
638
|
-
]).describe(
|
|
639
|
-
"Status of the last payment for the order.\nUpdated automatically for online orders. Updated manually by the Wix user for offline orders."
|
|
640
|
-
).optional(),
|
|
641
|
-
startDate: z.date().describe("Start date and time for the ordered plan.").optional().nullable(),
|
|
642
|
-
endDate: z.date().describe(
|
|
643
|
-
"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`."
|
|
644
|
-
).optional().nullable(),
|
|
645
|
-
pausePeriods: z.array(
|
|
646
|
-
z.object({
|
|
647
|
-
status: z.enum(["UNDEFINED", "ACTIVE", "ENDED"]).describe("Status of the pause period.").optional(),
|
|
648
|
-
pauseDate: z.date().describe("Start date and time of the pause period.").optional().nullable(),
|
|
649
|
-
resumeDate: z.date().describe(
|
|
650
|
-
"End date and time of the pause period.\n\nOmitted while the pause period remains `ACTIVE`."
|
|
651
|
-
).optional().nullable()
|
|
652
|
-
})
|
|
653
|
-
).optional(),
|
|
654
|
-
freeTrialDays: z.number().int().describe(
|
|
655
|
-
"Free trial period for the order, in days.\n\nOnly available for recurring plans."
|
|
656
|
-
).min(1).max(999).optional().nullable(),
|
|
657
|
-
earliestEndDate: z.date().describe(
|
|
658
|
-
"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."
|
|
659
|
-
).optional().nullable(),
|
|
660
|
-
currentCycle: z.object({
|
|
661
|
-
index: z.number().int().describe(
|
|
662
|
-
"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`."
|
|
663
|
-
).min(0).optional(),
|
|
664
|
-
startedDate: z.date().describe("Start date and time for the current payment cycle.").optional().nullable(),
|
|
665
|
-
endedDate: z.date().describe("End date and time for the current payment cycle.").optional().nullable()
|
|
666
|
-
}).describe(
|
|
667
|
-
"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."
|
|
668
|
-
).optional(),
|
|
669
|
-
planName: z.string().describe("Plan name at the time of purchase.").optional(),
|
|
670
|
-
planDescription: z.string().describe("Plan description at the time of purchase").optional(),
|
|
671
|
-
planPrice: z.string().describe("Plan price as it was at the moment of order creation.").optional(),
|
|
672
|
-
_createdDate: z.date().describe("Date and time the order was created.").optional().nullable(),
|
|
673
|
-
_updatedDate: z.date().describe("Date and time the order was updated.").optional().nullable(),
|
|
674
|
-
formData: z.object({
|
|
675
|
-
formId: z.string().describe(
|
|
676
|
-
"ID of the [order form](https://dev.wix.com/docs/rest/api-reference/wix-forms/form-submissions/introduction) associated with the plan at checkout."
|
|
677
|
-
).regex(
|
|
678
|
-
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
679
|
-
"Must be a valid GUID"
|
|
620
|
+
"DRAFT",
|
|
621
|
+
"PENDING",
|
|
622
|
+
"ACTIVE",
|
|
623
|
+
"PAUSED",
|
|
624
|
+
"ENDED",
|
|
625
|
+
"CANCELED"
|
|
626
|
+
]).describe("Status of the order.").optional(),
|
|
627
|
+
autoRenewCanceled: z.boolean().describe(
|
|
628
|
+
"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."
|
|
680
629
|
).optional().nullable(),
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
630
|
+
cancellation: z.object({
|
|
631
|
+
requestedDate: z.date().describe("Date and time the cancellation was requested.").optional().nullable(),
|
|
632
|
+
cause: z.enum([
|
|
633
|
+
"UNDEFINED",
|
|
634
|
+
"OWNER_ACTION",
|
|
635
|
+
"MEMBER_ACTION",
|
|
636
|
+
"PAYMENT_FAILURE",
|
|
637
|
+
"PAYMENT_SETUP_FAILURE",
|
|
638
|
+
"UNKNOWN"
|
|
639
|
+
]).describe("Reason for the cancellation.").optional(),
|
|
640
|
+
effectiveAt: z.enum(["UNDEFINED", "IMMEDIATELY", "NEXT_PAYMENT_DATE"]).describe(
|
|
641
|
+
"When the cancellation takes effect. Set when cancelling the order."
|
|
642
|
+
).optional()
|
|
643
|
+
}).describe(
|
|
644
|
+
"Details about the cancellation of an order.\n\nOnly present if the status is `CANCELED`."
|
|
645
|
+
).optional(),
|
|
646
|
+
lastPaymentStatus: z.enum([
|
|
647
|
+
"UNDEFINED",
|
|
648
|
+
"PAID",
|
|
649
|
+
"REFUNDED",
|
|
650
|
+
"FAILED",
|
|
651
|
+
"UNPAID",
|
|
652
|
+
"PENDING",
|
|
653
|
+
"NOT_APPLICABLE"
|
|
654
|
+
]).describe(
|
|
655
|
+
"Status of the last payment for the order.\nUpdated automatically for online orders. Updated manually by the Wix user for offline orders."
|
|
656
|
+
).optional(),
|
|
657
|
+
startDate: z.date().describe("Start date and time for the ordered plan.").optional().nullable(),
|
|
658
|
+
endDate: z.date().describe(
|
|
659
|
+
"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`."
|
|
686
660
|
).optional().nullable(),
|
|
687
|
-
|
|
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(
|
|
666
|
+
"End date and time of the pause period.\n\nOmitted while the pause period remains `ACTIVE`."
|
|
667
|
+
).optional().nullable()
|
|
668
|
+
})
|
|
669
|
+
).optional(),
|
|
670
|
+
freeTrialDays: z.number().int().describe(
|
|
671
|
+
"Free trial period for the order, in days.\n\nOnly available for recurring plans."
|
|
672
|
+
).min(1).max(999).optional().nullable(),
|
|
673
|
+
earliestEndDate: z.date().describe(
|
|
674
|
+
"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
|
+
).optional().nullable(),
|
|
676
|
+
currentCycle: z.object({
|
|
677
|
+
index: z.number().int().describe(
|
|
678
|
+
"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
|
+
).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
|
+
}).describe(
|
|
683
|
+
"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
|
+
).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(
|
|
692
|
+
"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
|
+
).regex(
|
|
694
|
+
/^[0-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
|
+
"Must be a valid GUID"
|
|
696
|
+
).optional().nullable(),
|
|
697
|
+
submissionId: z.string().describe(
|
|
698
|
+
"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
|
+
).regex(
|
|
700
|
+
/^[0-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
|
+
"Must be a valid GUID"
|
|
702
|
+
).optional().nullable(),
|
|
703
|
+
submissionData: z.record(z.string(), z.any()).describe("Data submitted to the plan's order form at checkout.").optional()
|
|
704
|
+
}).describe(
|
|
705
|
+
"Information about the form submitted during the plan's checkout."
|
|
706
|
+
).optional()
|
|
707
|
+
})
|
|
708
|
+
).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(
|
|
713
|
+
"Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set."
|
|
714
|
+
).optional().nullable(),
|
|
715
|
+
tooManyToCount: z.boolean().describe(
|
|
716
|
+
"Flag that indicates the server failed to calculate the `total` field."
|
|
717
|
+
).optional().nullable(),
|
|
718
|
+
cursors: z.object({
|
|
719
|
+
next: z.string().describe(
|
|
720
|
+
"Cursor string pointing to the next page in the list of results."
|
|
721
|
+
).max(16e3).optional().nullable(),
|
|
722
|
+
prev: z.string().describe(
|
|
723
|
+
"Cursor pointing to the previous page in the list of results."
|
|
724
|
+
).max(16e3).optional().nullable()
|
|
688
725
|
}).describe(
|
|
689
|
-
"
|
|
726
|
+
"Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used."
|
|
690
727
|
).optional()
|
|
691
|
-
}).describe(
|
|
728
|
+
}).describe(
|
|
729
|
+
"Object containing paging-related data (number of orders returned, offset)."
|
|
730
|
+
).optional()
|
|
731
|
+
});
|
|
732
|
+
var PostponeEndDateRequest = /* @__PURE__ */ z.object({
|
|
733
|
+
_id: z.string().describe("Order ID.").regex(
|
|
734
|
+
/^[0-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
|
+
"Must be a valid GUID"
|
|
736
|
+
),
|
|
737
|
+
endDate: z.date().describe(
|
|
738
|
+
"New end date and time.\n\nMust be later than the current end date and time."
|
|
739
|
+
)
|
|
740
|
+
});
|
|
741
|
+
var PostponeEndDateResponse = /* @__PURE__ */ z.object({});
|
|
742
|
+
var CancelOrderRequest = /* @__PURE__ */ z.object({
|
|
743
|
+
_id: z.string().describe("Order ID.").regex(
|
|
744
|
+
/^[0-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
|
+
"Must be a valid GUID"
|
|
746
|
+
),
|
|
747
|
+
effectiveAt: z.enum(["UNDEFINED", "IMMEDIATELY", "NEXT_PAYMENT_DATE"])
|
|
748
|
+
});
|
|
749
|
+
var CancelOrderResponse = /* @__PURE__ */ z.object({});
|
|
750
|
+
var MarkAsPaidRequest = /* @__PURE__ */ z.object({
|
|
751
|
+
_id: z.string().describe("Order ID.").regex(
|
|
752
|
+
/^[0-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
|
+
"Must be a valid GUID"
|
|
754
|
+
)
|
|
755
|
+
});
|
|
756
|
+
var MarkAsPaidResponse = /* @__PURE__ */ z.object({});
|
|
757
|
+
var PauseOrderRequest = /* @__PURE__ */ z.object({
|
|
758
|
+
_id: z.string().describe("Order ID.").regex(
|
|
759
|
+
/^[0-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
|
+
"Must be a valid GUID"
|
|
761
|
+
)
|
|
762
|
+
});
|
|
763
|
+
var PauseOrderResponse = /* @__PURE__ */ z.object({});
|
|
764
|
+
var ResumeOrderRequest = /* @__PURE__ */ z.object({
|
|
765
|
+
_id: z.string().describe("Order ID.").regex(
|
|
766
|
+
/^[0-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
|
+
"Must be a valid GUID"
|
|
768
|
+
)
|
|
692
769
|
});
|
|
693
|
-
var
|
|
770
|
+
var ResumeOrderResponse = /* @__PURE__ */ z.object({});
|
|
771
|
+
var CreateOnlineOrderRequest = /* @__PURE__ */ z.object({
|
|
694
772
|
planId: z.string().describe("Plan ID.").regex(
|
|
695
773
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
696
774
|
"Must be a valid GUID"
|
|
697
775
|
),
|
|
698
776
|
options: z.object({
|
|
699
777
|
startDate: z.date().describe(
|
|
700
|
-
"Start date and time for the plan of the order
|
|
778
|
+
"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."
|
|
701
779
|
).optional().nullable(),
|
|
702
|
-
couponCode: z.string().describe("Coupon code to apply.").min(1).max(20).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(
|
|
783
|
+
/^[0-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
|
+
"Must be a valid GUID"
|
|
785
|
+
),
|
|
786
|
+
orderMethod: z.enum(["UNKNOWN", "MOTO", "POS"]).optional()
|
|
787
|
+
}).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(
|
|
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}$/,
|
|
790
|
+
"Must be a valid GUID"
|
|
791
|
+
).optional().nullable()
|
|
703
792
|
}).optional()
|
|
704
793
|
});
|
|
705
|
-
var
|
|
794
|
+
var CreateOnlineOrderResponse = /* @__PURE__ */ z.object({
|
|
706
795
|
order: z.object({
|
|
707
796
|
_id: z.string().describe("Order ID.").regex(
|
|
708
797
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
@@ -1023,32 +1112,30 @@ var GetOnlineOrderPreviewResponse = z.object({
|
|
|
1023
1112
|
}).describe(
|
|
1024
1113
|
"Information about the form submitted during the plan's checkout."
|
|
1025
1114
|
).optional()
|
|
1026
|
-
}).describe(
|
|
1027
|
-
"Order preview. This field is undefined if the member has already reached the purchase limit for the order's plan."
|
|
1028
|
-
).optional(),
|
|
1029
|
-
purchaseLimitExceeded: z.boolean().describe(
|
|
1030
|
-
"Whether the member has already reached purchase limit for the order's plan."
|
|
1031
|
-
).optional()
|
|
1115
|
+
}).describe("Created online order.").optional()
|
|
1032
1116
|
});
|
|
1033
|
-
var
|
|
1034
|
-
planId: z.string().describe("ID of the plan
|
|
1117
|
+
var CreateOfflineOrderRequest = /* @__PURE__ */ z.object({
|
|
1118
|
+
planId: z.string().describe("ID of the plan being ordered, from the Plans API.").regex(
|
|
1035
1119
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
1036
1120
|
"Must be a valid GUID"
|
|
1037
1121
|
),
|
|
1038
|
-
memberId: z.string().describe(
|
|
1039
|
-
"Member ID of the buyer the previewed order is for, from the Members API."
|
|
1040
|
-
).regex(
|
|
1122
|
+
memberId: z.string().describe("ID of the member ordering the plan, from the Members API.").regex(
|
|
1041
1123
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
1042
1124
|
"Must be a valid GUID"
|
|
1043
1125
|
),
|
|
1044
1126
|
options: z.object({
|
|
1045
1127
|
startDate: z.date().describe(
|
|
1046
|
-
"Start date and time for
|
|
1128
|
+
"Start date and time for the ordered plan in a `YYYY-MM-DDThh:mm[:ss][.sss]Z` format.\n\nDefault: Current date and time."
|
|
1047
1129
|
).optional().nullable(),
|
|
1048
|
-
|
|
1049
|
-
|
|
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(
|
|
1133
|
+
/^[0-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
|
+
"Must be a valid GUID"
|
|
1135
|
+
).optional().nullable()
|
|
1136
|
+
}).describe("Options for creating an offline order. ").optional()
|
|
1050
1137
|
});
|
|
1051
|
-
var
|
|
1138
|
+
var CreateOfflineOrderResponse = /* @__PURE__ */ z.object({
|
|
1052
1139
|
order: z.object({
|
|
1053
1140
|
_id: z.string().describe("Order ID.").regex(
|
|
1054
1141
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
@@ -1369,166 +1456,21 @@ var GetOfflineOrderPreviewResponse = z.object({
|
|
|
1369
1456
|
}).describe(
|
|
1370
1457
|
"Information about the form submitted during the plan's checkout."
|
|
1371
1458
|
).optional()
|
|
1372
|
-
}).describe("
|
|
1373
|
-
purchaseLimitExceeded: z.boolean().describe(
|
|
1374
|
-
"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."
|
|
1375
|
-
).optional()
|
|
1459
|
+
}).describe("Order.").optional()
|
|
1376
1460
|
});
|
|
1377
|
-
var
|
|
1378
|
-
planId: z.string().describe("ID
|
|
1461
|
+
var GetOnlineOrderPreviewRequest = /* @__PURE__ */ z.object({
|
|
1462
|
+
planId: z.string().describe("Plan ID.").regex(
|
|
1379
1463
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
1380
1464
|
"Must be a valid GUID"
|
|
1381
1465
|
),
|
|
1382
1466
|
options: z.object({
|
|
1383
|
-
|
|
1384
|
-
|
|
1467
|
+
startDate: z.date().describe(
|
|
1468
|
+
"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
|
+
).optional().nullable(),
|
|
1470
|
+
couponCode: z.string().describe("Coupon code to apply.").min(1).max(20).optional().nullable()
|
|
1471
|
+
}).optional()
|
|
1385
1472
|
});
|
|
1386
|
-
var
|
|
1387
|
-
price: z.intersection(
|
|
1388
|
-
z.object({
|
|
1389
|
-
subtotal: z.string().describe(
|
|
1390
|
-
'Price of the order excluding tax, specified as a monetary amount. for example, `"9.99"`.'
|
|
1391
|
-
).optional(),
|
|
1392
|
-
discount: z.string().describe("Total discount applied.").optional(),
|
|
1393
|
-
tax: z.object({
|
|
1394
|
-
name: z.string().describe("Name of the tax. For example, VAT.").optional(),
|
|
1395
|
-
includedInPrice: z.boolean().describe(
|
|
1396
|
-
"Whether tax is included in the original price. When `false`, tax is added at checkout."
|
|
1397
|
-
).optional(),
|
|
1398
|
-
rate: z.string().describe(
|
|
1399
|
-
'Tax rate percentage, as a number between 0 and 100. For example, a 7% tax rate is `"7.00"`.'
|
|
1400
|
-
).optional(),
|
|
1401
|
-
amount: z.string().describe(
|
|
1402
|
-
'Total tax, specified as a monetary amount. For example, `"3.99"`.'
|
|
1403
|
-
).optional()
|
|
1404
|
-
}).describe("Tax applied.").optional(),
|
|
1405
|
-
total: z.string().describe(
|
|
1406
|
-
'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`.'
|
|
1407
|
-
).optional(),
|
|
1408
|
-
planPrice: z.string().describe("Plan price as it was at the moment of order creation.").optional(),
|
|
1409
|
-
currency: z.string().describe(
|
|
1410
|
-
"Currency code. Must be valid ISO 4217 currency code (e.g., USD)."
|
|
1411
|
-
).optional(),
|
|
1412
|
-
freeTrialDays: z.number().int().describe(
|
|
1413
|
-
"Free trial period for the order in days. Only available for recurring plans."
|
|
1414
|
-
).min(1).max(999).optional().nullable(),
|
|
1415
|
-
coupon: z.object({
|
|
1416
|
-
code: z.string().describe("Code of the applied coupon.").min(1).max(20).optional(),
|
|
1417
|
-
amount: z.string().describe("Total discount of the coupon, as a monetary amount.").optional(),
|
|
1418
|
-
_id: z.string().describe("Coupon ID.").regex(
|
|
1419
|
-
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
1420
|
-
"Must be a valid GUID"
|
|
1421
|
-
).optional()
|
|
1422
|
-
}).describe(
|
|
1423
|
-
"Coupon applied to the order. Empty means no coupon was applied."
|
|
1424
|
-
).optional()
|
|
1425
|
-
}),
|
|
1426
|
-
z.xor([
|
|
1427
|
-
z.object({
|
|
1428
|
-
subscription: z.never().optional(),
|
|
1429
|
-
singlePaymentForDuration: z.never().optional(),
|
|
1430
|
-
singlePaymentUnlimited: z.never().optional()
|
|
1431
|
-
}),
|
|
1432
|
-
z.object({
|
|
1433
|
-
singlePaymentForDuration: z.never().optional(),
|
|
1434
|
-
singlePaymentUnlimited: z.never().optional(),
|
|
1435
|
-
subscription: z.object({
|
|
1436
|
-
cycleDuration: z.object({
|
|
1437
|
-
count: z.number().int().describe(
|
|
1438
|
-
"Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`."
|
|
1439
|
-
).min(1).optional().nullable(),
|
|
1440
|
-
unit: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
|
|
1441
|
-
}).describe(
|
|
1442
|
-
"Number of payment cycles the subscription is valid for.\n`0` for unlimited plans or for plans that are valid until canceled."
|
|
1443
|
-
).optional(),
|
|
1444
|
-
cycleCount: z.number().int().describe(
|
|
1445
|
-
"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."
|
|
1446
|
-
).min(0).max(2e3).optional().nullable()
|
|
1447
|
-
}).describe("Order has recurring payments.")
|
|
1448
|
-
}),
|
|
1449
|
-
z.object({
|
|
1450
|
-
subscription: z.never().optional(),
|
|
1451
|
-
singlePaymentUnlimited: z.never().optional(),
|
|
1452
|
-
singlePaymentForDuration: z.object({
|
|
1453
|
-
count: z.number().int().describe(
|
|
1454
|
-
"Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`."
|
|
1455
|
-
).min(1).optional().nullable(),
|
|
1456
|
-
unit: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
|
|
1457
|
-
}).describe(
|
|
1458
|
-
"One-time payment. Order is valid for a specified duration."
|
|
1459
|
-
)
|
|
1460
|
-
}),
|
|
1461
|
-
z.object({
|
|
1462
|
-
subscription: z.never().optional(),
|
|
1463
|
-
singlePaymentForDuration: z.never().optional(),
|
|
1464
|
-
singlePaymentUnlimited: z.boolean().describe("One-time payment. Order is valid until it is canceled.")
|
|
1465
|
-
})
|
|
1466
|
-
])
|
|
1467
|
-
).describe(
|
|
1468
|
-
"__Deprecated.__ Use `prices` instead. This property will be removed on September 30, 2022."
|
|
1469
|
-
).optional(),
|
|
1470
|
-
prices: z.array(
|
|
1471
|
-
z.object({
|
|
1472
|
-
duration: z.object({
|
|
1473
|
-
cycleFrom: z.number().int().describe(
|
|
1474
|
-
"Price starts to apply with this cycle.\n\n`1` is the first payment cycle for all pricing models."
|
|
1475
|
-
).optional(),
|
|
1476
|
-
numberOfCycles: z.number().int().describe(
|
|
1477
|
-
"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`."
|
|
1478
|
-
).optional().nullable()
|
|
1479
|
-
}).describe(
|
|
1480
|
-
"Cycle duration to apply `price` for.\n\nUse with all pricing models.\nCan apply the same price to multiple payment cycles."
|
|
1481
|
-
).optional(),
|
|
1482
|
-
price: z.object({
|
|
1483
|
-
subtotal: z.string().describe(
|
|
1484
|
-
'Price of the order excluding tax, specified as a monetary amount. For example, `"9.99"`.'
|
|
1485
|
-
).optional(),
|
|
1486
|
-
coupon: z.object({
|
|
1487
|
-
code: z.string().describe("Code of the applied coupon.").min(1).max(20).optional(),
|
|
1488
|
-
amount: z.string().describe(
|
|
1489
|
-
"Total discount of the coupon, as a monetary amount."
|
|
1490
|
-
).optional(),
|
|
1491
|
-
_id: z.string().describe("Coupon ID.").regex(
|
|
1492
|
-
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
1493
|
-
"Must be a valid GUID"
|
|
1494
|
-
).optional()
|
|
1495
|
-
}).describe("Coupon applied to the order, from the Coupons API.").optional(),
|
|
1496
|
-
discount: z.string().describe("Total discount applied to the order.").optional(),
|
|
1497
|
-
tax: z.object({
|
|
1498
|
-
name: z.string().describe("Name of the tax. For example, VAT.").optional(),
|
|
1499
|
-
includedInPrice: z.boolean().describe(
|
|
1500
|
-
"Whether tax is included in the original price. When `false`, tax is added at checkout."
|
|
1501
|
-
).optional(),
|
|
1502
|
-
rate: z.string().describe(
|
|
1503
|
-
'Tax rate percentage, as a number between 0 and 100. For example, a 7% tax rate is `"7.00"`.'
|
|
1504
|
-
).optional(),
|
|
1505
|
-
amount: z.string().describe(
|
|
1506
|
-
'Total tax, specified as a monetary amount. For example, `"3.99"`.'
|
|
1507
|
-
).optional()
|
|
1508
|
-
}).describe(
|
|
1509
|
-
"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)."
|
|
1510
|
-
).optional(),
|
|
1511
|
-
total: z.string().describe(
|
|
1512
|
-
'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`.'
|
|
1513
|
-
).optional(),
|
|
1514
|
-
currency: z.string().describe(
|
|
1515
|
-
"Three-letter currency code in\n[ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format."
|
|
1516
|
-
).optional(),
|
|
1517
|
-
proration: z.string().describe(
|
|
1518
|
-
"Price change after billing date was change and price was adjusted. Could be positive and negative values."
|
|
1519
|
-
).optional()
|
|
1520
|
-
}).describe("Order price.").optional()
|
|
1521
|
-
})
|
|
1522
|
-
).optional()
|
|
1523
|
-
});
|
|
1524
|
-
var ManagementGetOrderRequest = z.object({
|
|
1525
|
-
_id: z.string().describe("Order ID.").regex(
|
|
1526
|
-
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
1527
|
-
"Must be a valid GUID"
|
|
1528
|
-
),
|
|
1529
|
-
options: z.object({ fieldSet: z.enum(["UNKNOWN_SET", "BASIC", "FULL"]).optional() }).describe("Options to use when getting an order. ").optional()
|
|
1530
|
-
});
|
|
1531
|
-
var ManagementGetOrderResponse = z.object({
|
|
1473
|
+
var GetOnlineOrderPreviewResponse = /* @__PURE__ */ z.object({
|
|
1532
1474
|
order: z.object({
|
|
1533
1475
|
_id: z.string().describe("Order ID.").regex(
|
|
1534
1476
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
@@ -1849,454 +1791,512 @@ var ManagementGetOrderResponse = z.object({
|
|
|
1849
1791
|
}).describe(
|
|
1850
1792
|
"Information about the form submitted during the plan's checkout."
|
|
1851
1793
|
).optional()
|
|
1852
|
-
}).describe(
|
|
1794
|
+
}).describe(
|
|
1795
|
+
"Order preview. This field is undefined if the member has already reached the purchase limit for the order's plan."
|
|
1796
|
+
).optional(),
|
|
1797
|
+
purchaseLimitExceeded: z.boolean().describe(
|
|
1798
|
+
"Whether the member has already reached purchase limit for the order's plan."
|
|
1799
|
+
).optional()
|
|
1853
1800
|
});
|
|
1854
|
-
var
|
|
1801
|
+
var GetOfflineOrderPreviewRequest = /* @__PURE__ */ z.object({
|
|
1802
|
+
planId: z.string().describe("ID of the plan of the previewed order.").regex(
|
|
1803
|
+
/^[0-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
|
+
"Must be a valid GUID"
|
|
1805
|
+
),
|
|
1806
|
+
memberId: z.string().describe(
|
|
1807
|
+
"Member ID of the buyer the previewed order is for, from the Members API."
|
|
1808
|
+
).regex(
|
|
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}$/,
|
|
1810
|
+
"Must be a valid GUID"
|
|
1811
|
+
),
|
|
1855
1812
|
options: z.object({
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
autoRenewCanceled: z.boolean().describe(
|
|
1859
|
-
"Filter by whether or not the auto-renewal of recurring orders was canceled."
|
|
1813
|
+
startDate: z.date().describe(
|
|
1814
|
+
"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."
|
|
1860
1815
|
).optional().nullable(),
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
"CANCELED"
|
|
1870
|
-
])
|
|
1816
|
+
couponCode: z.string().describe("Coupon code to apply, from the Coupons API.").min(1).max(20).optional().nullable()
|
|
1817
|
+
}).describe("Options for previewing the offline order. ").optional()
|
|
1818
|
+
});
|
|
1819
|
+
var GetOfflineOrderPreviewResponse = /* @__PURE__ */ z.object({
|
|
1820
|
+
order: z.object({
|
|
1821
|
+
_id: z.string().describe("Order ID.").regex(
|
|
1822
|
+
/^[0-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
|
+
"Must be a valid GUID"
|
|
1871
1824
|
).optional(),
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
"FAILED",
|
|
1878
|
-
"UNPAID",
|
|
1879
|
-
"PENDING",
|
|
1880
|
-
"NOT_APPLICABLE"
|
|
1881
|
-
])
|
|
1825
|
+
planId: z.string().describe(
|
|
1826
|
+
"ID of the plan purchased with the order, from the Plans API."
|
|
1827
|
+
).regex(
|
|
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}$/,
|
|
1829
|
+
"Must be a valid GUID"
|
|
1882
1830
|
).optional(),
|
|
1883
|
-
|
|
1884
|
-
"
|
|
1885
|
-
).
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
fieldName: z.string().describe("Name of the field to sort by.").max(512).optional(),
|
|
1889
|
-
order: z.enum(["ASC", "DESC"]).optional(),
|
|
1890
|
-
origin: z.object({
|
|
1891
|
-
latitude: z.number().describe("Address latitude.").optional().nullable(),
|
|
1892
|
-
longitude: z.number().describe("Address longitude.").optional().nullable()
|
|
1893
|
-
}).describe(
|
|
1894
|
-
"Origin point for geo-distance sorting on a GEO field\nresults are ordered by distance from this point (ASC = nearest first, DESC = farthest first)."
|
|
1895
|
-
).optional()
|
|
1896
|
-
}).describe(
|
|
1897
|
-
"Sort order.\n\nUse `ASC` for ascending order or `DESC` for descending order.\n\nDefault: `DESC`."
|
|
1831
|
+
subscriptionId: z.string().describe(
|
|
1832
|
+
"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
|
+
).regex(
|
|
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}$/,
|
|
1835
|
+
"Must be a valid GUID"
|
|
1898
1836
|
).optional(),
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
"Must be a valid GUID"
|
|
1908
|
-
).optional(),
|
|
1909
|
-
planId: z.string().describe(
|
|
1910
|
-
"ID of the plan purchased with the order, from the Plans API."
|
|
1911
|
-
).regex(
|
|
1912
|
-
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
1913
|
-
"Must be a valid GUID"
|
|
1914
|
-
).optional(),
|
|
1915
|
-
subscriptionId: z.string().describe(
|
|
1916
|
-
"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)."
|
|
1917
|
-
).regex(
|
|
1837
|
+
wixPayOrderId: z.string().describe(
|
|
1838
|
+
"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
|
+
).regex(
|
|
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}$/,
|
|
1841
|
+
"Must be a valid GUID"
|
|
1842
|
+
).optional().nullable(),
|
|
1843
|
+
buyer: z.object({
|
|
1844
|
+
memberId: z.string().describe("Member ID for a Wix site member, from the Members API.").regex(
|
|
1918
1845
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
1919
1846
|
"Must be a valid GUID"
|
|
1920
1847
|
).optional(),
|
|
1921
|
-
|
|
1922
|
-
"
|
|
1848
|
+
contactId: z.string().describe(
|
|
1849
|
+
"Contact ID for a Wix site contact, from the Contacts API."
|
|
1923
1850
|
).regex(
|
|
1924
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}$/,
|
|
1925
1852
|
"Must be a valid GUID"
|
|
1926
|
-
).optional()
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1853
|
+
).optional()
|
|
1854
|
+
}).describe(
|
|
1855
|
+
"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
|
+
).optional(),
|
|
1857
|
+
priceDetails: z.intersection(
|
|
1858
|
+
z.object({
|
|
1859
|
+
subtotal: z.string().describe(
|
|
1860
|
+
'Price of the order excluding tax, specified as a monetary amount. for example, `"9.99"`.'
|
|
1933
1861
|
).optional(),
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
).optional()
|
|
1940
|
-
}).describe(
|
|
1941
|
-
"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`."
|
|
1942
|
-
).optional(),
|
|
1943
|
-
priceDetails: z.intersection(
|
|
1944
|
-
z.object({
|
|
1945
|
-
subtotal: z.string().describe(
|
|
1946
|
-
'Price of the order excluding tax, specified as a monetary amount. for example, `"9.99"`.'
|
|
1947
|
-
).optional(),
|
|
1948
|
-
discount: z.string().describe("Total discount applied.").optional(),
|
|
1949
|
-
tax: z.object({
|
|
1950
|
-
name: z.string().describe("Name of the tax. For example, VAT.").optional(),
|
|
1951
|
-
includedInPrice: z.boolean().describe(
|
|
1952
|
-
"Whether tax is included in the original price. When `false`, tax is added at checkout."
|
|
1953
|
-
).optional(),
|
|
1954
|
-
rate: z.string().describe(
|
|
1955
|
-
'Tax rate percentage, as a number between 0 and 100. For example, a 7% tax rate is `"7.00"`.'
|
|
1956
|
-
).optional(),
|
|
1957
|
-
amount: z.string().describe(
|
|
1958
|
-
'Total tax, specified as a monetary amount. For example, `"3.99"`.'
|
|
1959
|
-
).optional()
|
|
1960
|
-
}).describe("Tax applied.").optional(),
|
|
1961
|
-
total: z.string().describe(
|
|
1962
|
-
'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`.'
|
|
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(
|
|
1866
|
+
"Whether tax is included in the original price. When `false`, tax is added at checkout."
|
|
1963
1867
|
).optional(),
|
|
1964
|
-
|
|
1965
|
-
|
|
1868
|
+
rate: z.string().describe(
|
|
1869
|
+
'Tax rate percentage, as a number between 0 and 100. For example, a 7% tax rate is `"7.00"`.'
|
|
1966
1870
|
).optional(),
|
|
1967
|
-
|
|
1968
|
-
|
|
1871
|
+
amount: z.string().describe(
|
|
1872
|
+
'Total tax, specified as a monetary amount. For example, `"3.99"`.'
|
|
1873
|
+
).optional()
|
|
1874
|
+
}).describe("Tax applied.").optional(),
|
|
1875
|
+
total: z.string().describe(
|
|
1876
|
+
'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
|
+
).optional(),
|
|
1878
|
+
planPrice: z.string().describe("Plan price as it was at the moment of order creation.").optional(),
|
|
1879
|
+
currency: z.string().describe(
|
|
1880
|
+
"Currency code. Must be valid ISO 4217 currency code (e.g., USD)."
|
|
1881
|
+
).optional(),
|
|
1882
|
+
freeTrialDays: z.number().int().describe(
|
|
1883
|
+
"Free trial period for the order in days. Only available for recurring plans."
|
|
1884
|
+
).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(
|
|
1888
|
+
"Total discount of the coupon, as a monetary amount."
|
|
1969
1889
|
).optional(),
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
coupon: z.object({
|
|
1974
|
-
code: z.string().describe("Code of the applied coupon.").min(1).max(20).optional(),
|
|
1975
|
-
amount: z.string().describe(
|
|
1976
|
-
"Total discount of the coupon, as a monetary amount."
|
|
1977
|
-
).optional(),
|
|
1978
|
-
_id: z.string().describe("Coupon ID.").regex(
|
|
1979
|
-
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
1980
|
-
"Must be a valid GUID"
|
|
1981
|
-
).optional()
|
|
1982
|
-
}).describe(
|
|
1983
|
-
"Coupon applied to the order. Empty means no coupon was applied."
|
|
1890
|
+
_id: z.string().describe("Coupon ID.").regex(
|
|
1891
|
+
/^[0-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
|
+
"Must be a valid GUID"
|
|
1984
1893
|
).optional()
|
|
1894
|
+
}).describe(
|
|
1895
|
+
"Coupon applied to the order. Empty means no coupon was applied."
|
|
1896
|
+
).optional()
|
|
1897
|
+
}),
|
|
1898
|
+
z.xor([
|
|
1899
|
+
z.object({
|
|
1900
|
+
subscription: z.never().optional(),
|
|
1901
|
+
singlePaymentForDuration: z.never().optional(),
|
|
1902
|
+
singlePaymentUnlimited: z.never().optional()
|
|
1985
1903
|
}),
|
|
1986
|
-
z.
|
|
1987
|
-
z.
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
}),
|
|
1992
|
-
z.object({
|
|
1993
|
-
singlePaymentForDuration: z.never().optional(),
|
|
1994
|
-
singlePaymentUnlimited: z.never().optional(),
|
|
1995
|
-
subscription: z.object({
|
|
1996
|
-
cycleDuration: z.object({
|
|
1997
|
-
count: z.number().int().describe(
|
|
1998
|
-
"Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`."
|
|
1999
|
-
).min(1).optional().nullable(),
|
|
2000
|
-
unit: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
|
|
2001
|
-
}).describe(
|
|
2002
|
-
"Number of payment cycles the subscription is valid for.\n`0` for unlimited plans or for plans that are valid until canceled."
|
|
2003
|
-
).optional(),
|
|
2004
|
-
cycleCount: z.number().int().describe(
|
|
2005
|
-
"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."
|
|
2006
|
-
).min(0).max(2e3).optional().nullable()
|
|
2007
|
-
}).describe("Order has recurring payments.")
|
|
2008
|
-
}),
|
|
2009
|
-
z.object({
|
|
2010
|
-
subscription: z.never().optional(),
|
|
2011
|
-
singlePaymentUnlimited: z.never().optional(),
|
|
2012
|
-
singlePaymentForDuration: z.object({
|
|
1904
|
+
z.object({
|
|
1905
|
+
singlePaymentForDuration: z.never().optional(),
|
|
1906
|
+
singlePaymentUnlimited: z.never().optional(),
|
|
1907
|
+
subscription: z.object({
|
|
1908
|
+
cycleDuration: z.object({
|
|
2013
1909
|
count: z.number().int().describe(
|
|
2014
1910
|
"Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`."
|
|
2015
1911
|
).min(1).optional().nullable(),
|
|
2016
1912
|
unit: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
|
|
2017
1913
|
}).describe(
|
|
2018
|
-
"
|
|
2019
|
-
)
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
"One-time payment. Order is valid until it is canceled."
|
|
2026
|
-
)
|
|
2027
|
-
})
|
|
2028
|
-
])
|
|
2029
|
-
).describe(
|
|
2030
|
-
"__Deprecated.__ Use `pricing` instead. This property will be removed on September 30, 2022."
|
|
2031
|
-
).optional(),
|
|
2032
|
-
pricing: z.intersection(
|
|
1914
|
+
"Number of payment cycles the subscription is valid for.\n`0` for unlimited plans or for plans that are valid until canceled."
|
|
1915
|
+
).optional(),
|
|
1916
|
+
cycleCount: z.number().int().describe(
|
|
1917
|
+
"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
|
+
).min(0).max(2e3).optional().nullable()
|
|
1919
|
+
}).describe("Order has recurring payments.")
|
|
1920
|
+
}),
|
|
2033
1921
|
z.object({
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
1922
|
+
subscription: z.never().optional(),
|
|
1923
|
+
singlePaymentUnlimited: z.never().optional(),
|
|
1924
|
+
singlePaymentForDuration: z.object({
|
|
1925
|
+
count: z.number().int().describe(
|
|
1926
|
+
"Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`."
|
|
1927
|
+
).min(1).optional().nullable(),
|
|
1928
|
+
unit: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
|
|
1929
|
+
}).describe(
|
|
1930
|
+
"One-time payment. Order is valid for a specified duration."
|
|
1931
|
+
)
|
|
1932
|
+
}),
|
|
1933
|
+
z.object({
|
|
1934
|
+
subscription: z.never().optional(),
|
|
1935
|
+
singlePaymentForDuration: z.never().optional(),
|
|
1936
|
+
singlePaymentUnlimited: z.boolean().describe(
|
|
1937
|
+
"One-time payment. Order is valid until it is canceled."
|
|
1938
|
+
)
|
|
1939
|
+
})
|
|
1940
|
+
])
|
|
1941
|
+
).describe(
|
|
1942
|
+
"__Deprecated.__ Use `pricing` instead. This property will be removed on September 30, 2022."
|
|
1943
|
+
).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
|
+
"Price starts to apply with this cycle.\n\n`1` is the first payment cycle for all pricing models."
|
|
1951
|
+
).optional(),
|
|
1952
|
+
numberOfCycles: z.number().int().describe(
|
|
1953
|
+
"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
|
+
).optional().nullable()
|
|
1955
|
+
}).describe(
|
|
1956
|
+
"Cycle duration to apply `price` for.\n\nUse with all pricing models.\nCan apply the same price to multiple payment cycles."
|
|
1957
|
+
).optional(),
|
|
1958
|
+
price: z.object({
|
|
1959
|
+
subtotal: z.string().describe(
|
|
1960
|
+
'Price of the order excluding tax, specified as a monetary amount. For example, `"9.99"`.'
|
|
1961
|
+
).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(
|
|
1965
|
+
"Total discount of the coupon, as a monetary amount."
|
|
2039
1966
|
).optional(),
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
1967
|
+
_id: z.string().describe("Coupon ID.").regex(
|
|
1968
|
+
/^[0-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
|
+
"Must be a valid GUID"
|
|
1970
|
+
).optional()
|
|
2043
1971
|
}).describe(
|
|
2044
|
-
"
|
|
1972
|
+
"Coupon applied to the order, from the Coupons API."
|
|
2045
1973
|
).optional(),
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
).
|
|
2050
|
-
|
|
2051
|
-
code: z.string().describe("Code of the applied coupon.").min(1).max(20).optional(),
|
|
2052
|
-
amount: z.string().describe(
|
|
2053
|
-
"Total discount of the coupon, as a monetary amount."
|
|
2054
|
-
).optional(),
|
|
2055
|
-
_id: z.string().describe("Coupon ID.").regex(
|
|
2056
|
-
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
2057
|
-
"Must be a valid GUID"
|
|
2058
|
-
).optional()
|
|
2059
|
-
}).describe(
|
|
2060
|
-
"Coupon applied to the order, from the Coupons API."
|
|
2061
|
-
).optional(),
|
|
2062
|
-
discount: z.string().describe("Total discount applied to the order.").optional(),
|
|
2063
|
-
tax: z.object({
|
|
2064
|
-
name: z.string().describe("Name of the tax. For example, VAT.").optional(),
|
|
2065
|
-
includedInPrice: z.boolean().describe(
|
|
2066
|
-
"Whether tax is included in the original price. When `false`, tax is added at checkout."
|
|
2067
|
-
).optional(),
|
|
2068
|
-
rate: z.string().describe(
|
|
2069
|
-
'Tax rate percentage, as a number between 0 and 100. For example, a 7% tax rate is `"7.00"`.'
|
|
2070
|
-
).optional(),
|
|
2071
|
-
amount: z.string().describe(
|
|
2072
|
-
'Total tax, specified as a monetary amount. For example, `"3.99"`.'
|
|
2073
|
-
).optional()
|
|
2074
|
-
}).describe(
|
|
2075
|
-
"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)."
|
|
2076
|
-
).optional(),
|
|
2077
|
-
total: z.string().describe(
|
|
2078
|
-
'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`.'
|
|
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(
|
|
1978
|
+
"Whether tax is included in the original price. When `false`, tax is added at checkout."
|
|
2079
1979
|
).optional(),
|
|
2080
|
-
|
|
2081
|
-
|
|
1980
|
+
rate: z.string().describe(
|
|
1981
|
+
'Tax rate percentage, as a number between 0 and 100. For example, a 7% tax rate is `"7.00"`.'
|
|
2082
1982
|
).optional(),
|
|
2083
|
-
|
|
2084
|
-
|
|
1983
|
+
amount: z.string().describe(
|
|
1984
|
+
'Total tax, specified as a monetary amount. For example, `"3.99"`.'
|
|
2085
1985
|
).optional()
|
|
2086
|
-
}).describe("Order price.").optional()
|
|
2087
|
-
})
|
|
2088
|
-
).optional()
|
|
2089
|
-
}),
|
|
2090
|
-
z.xor([
|
|
2091
|
-
z.object({
|
|
2092
|
-
subscription: z.never().optional(),
|
|
2093
|
-
singlePaymentForDuration: z.never().optional(),
|
|
2094
|
-
singlePaymentUnlimited: z.never().optional()
|
|
2095
|
-
}),
|
|
2096
|
-
z.object({
|
|
2097
|
-
singlePaymentForDuration: z.never().optional(),
|
|
2098
|
-
singlePaymentUnlimited: z.never().optional(),
|
|
2099
|
-
subscription: z.object({
|
|
2100
|
-
cycleDuration: z.object({
|
|
2101
|
-
count: z.number().int().describe(
|
|
2102
|
-
"Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`."
|
|
2103
|
-
).min(1).optional().nullable(),
|
|
2104
|
-
unit: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
|
|
2105
1986
|
}).describe(
|
|
2106
|
-
"
|
|
1987
|
+
"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)."
|
|
2107
1988
|
).optional(),
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
).
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
1989
|
+
total: z.string().describe(
|
|
1990
|
+
'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
|
+
).optional(),
|
|
1992
|
+
currency: z.string().describe(
|
|
1993
|
+
"Three-letter currency code in\n[ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format."
|
|
1994
|
+
).optional(),
|
|
1995
|
+
proration: z.string().describe(
|
|
1996
|
+
"Price change after billing date was change and price was adjusted. Could be positive and negative values."
|
|
1997
|
+
).optional()
|
|
1998
|
+
}).describe("Order price.").optional()
|
|
1999
|
+
})
|
|
2000
|
+
).optional()
|
|
2001
|
+
}),
|
|
2002
|
+
z.xor([
|
|
2003
|
+
z.object({
|
|
2004
|
+
subscription: z.never().optional(),
|
|
2005
|
+
singlePaymentForDuration: z.never().optional(),
|
|
2006
|
+
singlePaymentUnlimited: z.never().optional()
|
|
2007
|
+
}),
|
|
2008
|
+
z.object({
|
|
2009
|
+
singlePaymentForDuration: z.never().optional(),
|
|
2010
|
+
singlePaymentUnlimited: z.never().optional(),
|
|
2011
|
+
subscription: z.object({
|
|
2012
|
+
cycleDuration: z.object({
|
|
2119
2013
|
count: z.number().int().describe(
|
|
2120
2014
|
"Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`."
|
|
2121
2015
|
).min(1).optional().nullable(),
|
|
2122
2016
|
unit: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
|
|
2123
2017
|
}).describe(
|
|
2124
|
-
"
|
|
2125
|
-
)
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
})
|
|
2134
|
-
])
|
|
2135
|
-
).describe(
|
|
2136
|
-
"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)."
|
|
2137
|
-
).optional(),
|
|
2138
|
-
type: z.enum(["UNDEFINED", "ONLINE", "OFFLINE", "EXTERNAL"]).describe("How the order was processed.").optional(),
|
|
2139
|
-
status: z.enum([
|
|
2140
|
-
"UNDEFINED",
|
|
2141
|
-
"DRAFT",
|
|
2142
|
-
"PENDING",
|
|
2143
|
-
"ACTIVE",
|
|
2144
|
-
"PAUSED",
|
|
2145
|
-
"ENDED",
|
|
2146
|
-
"CANCELED"
|
|
2147
|
-
]).describe("Status of the order.").optional(),
|
|
2148
|
-
autoRenewCanceled: z.boolean().describe(
|
|
2149
|
-
"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."
|
|
2150
|
-
).optional().nullable(),
|
|
2151
|
-
cancellation: z.object({
|
|
2152
|
-
requestedDate: z.date().describe("Date and time the cancellation was requested.").optional().nullable(),
|
|
2153
|
-
cause: z.enum([
|
|
2154
|
-
"UNDEFINED",
|
|
2155
|
-
"OWNER_ACTION",
|
|
2156
|
-
"MEMBER_ACTION",
|
|
2157
|
-
"PAYMENT_FAILURE",
|
|
2158
|
-
"PAYMENT_SETUP_FAILURE",
|
|
2159
|
-
"UNKNOWN"
|
|
2160
|
-
]).describe("Reason for the cancellation.").optional(),
|
|
2161
|
-
effectiveAt: z.enum(["UNDEFINED", "IMMEDIATELY", "NEXT_PAYMENT_DATE"]).describe(
|
|
2162
|
-
"When the cancellation takes effect. Set when cancelling the order."
|
|
2163
|
-
).optional()
|
|
2164
|
-
}).describe(
|
|
2165
|
-
"Details about the cancellation of an order.\n\nOnly present if the status is `CANCELED`."
|
|
2166
|
-
).optional(),
|
|
2167
|
-
lastPaymentStatus: z.enum([
|
|
2168
|
-
"UNDEFINED",
|
|
2169
|
-
"PAID",
|
|
2170
|
-
"REFUNDED",
|
|
2171
|
-
"FAILED",
|
|
2172
|
-
"UNPAID",
|
|
2173
|
-
"PENDING",
|
|
2174
|
-
"NOT_APPLICABLE"
|
|
2175
|
-
]).describe(
|
|
2176
|
-
"Status of the last payment for the order.\nUpdated automatically for online orders. Updated manually by the Wix user for offline orders."
|
|
2177
|
-
).optional(),
|
|
2178
|
-
startDate: z.date().describe("Start date and time for the ordered plan.").optional().nullable(),
|
|
2179
|
-
endDate: z.date().describe(
|
|
2180
|
-
"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`."
|
|
2181
|
-
).optional().nullable(),
|
|
2182
|
-
pausePeriods: z.array(
|
|
2018
|
+
"Number of payment cycles the subscription is valid for.\n`0` for unlimited plans or for plans that are valid until canceled."
|
|
2019
|
+
).optional(),
|
|
2020
|
+
cycleCount: z.number().int().describe(
|
|
2021
|
+
"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
|
+
).min(0).max(2e3).optional().nullable()
|
|
2023
|
+
}).describe(
|
|
2024
|
+
"Pricing model for an order with recurring payment cycles."
|
|
2025
|
+
)
|
|
2026
|
+
}),
|
|
2183
2027
|
z.object({
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2028
|
+
subscription: z.never().optional(),
|
|
2029
|
+
singlePaymentUnlimited: z.never().optional(),
|
|
2030
|
+
singlePaymentForDuration: z.object({
|
|
2031
|
+
count: z.number().int().describe(
|
|
2032
|
+
"Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`."
|
|
2033
|
+
).min(1).optional().nullable(),
|
|
2034
|
+
unit: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
|
|
2035
|
+
}).describe(
|
|
2036
|
+
"Pricing model for an order with a one-time payment and the order is valid for a specific amount of time."
|
|
2037
|
+
)
|
|
2038
|
+
}),
|
|
2039
|
+
z.object({
|
|
2040
|
+
subscription: z.never().optional(),
|
|
2041
|
+
singlePaymentForDuration: z.never().optional(),
|
|
2042
|
+
singlePaymentUnlimited: z.boolean().describe(
|
|
2043
|
+
"Pricing model for an order with a one-time payment and the order is valid until canceled."
|
|
2044
|
+
)
|
|
2189
2045
|
})
|
|
2190
|
-
)
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
"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."
|
|
2220
|
-
).regex(
|
|
2221
|
-
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
2222
|
-
"Must be a valid GUID"
|
|
2223
|
-
).optional().nullable(),
|
|
2224
|
-
submissionData: z.record(z.string(), z.any()).describe("Data submitted to the plan's order form at checkout.").optional()
|
|
2225
|
-
}).describe(
|
|
2226
|
-
"Information about the form submitted during the plan's checkout."
|
|
2046
|
+
])
|
|
2047
|
+
).describe(
|
|
2048
|
+
"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
|
+
).optional(),
|
|
2050
|
+
type: z.enum(["UNDEFINED", "ONLINE", "OFFLINE", "EXTERNAL"]).describe("How the order was processed.").optional(),
|
|
2051
|
+
status: z.enum([
|
|
2052
|
+
"UNDEFINED",
|
|
2053
|
+
"DRAFT",
|
|
2054
|
+
"PENDING",
|
|
2055
|
+
"ACTIVE",
|
|
2056
|
+
"PAUSED",
|
|
2057
|
+
"ENDED",
|
|
2058
|
+
"CANCELED"
|
|
2059
|
+
]).describe("Status of the order.").optional(),
|
|
2060
|
+
autoRenewCanceled: z.boolean().describe(
|
|
2061
|
+
"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
|
+
).optional().nullable(),
|
|
2063
|
+
cancellation: z.object({
|
|
2064
|
+
requestedDate: z.date().describe("Date and time the cancellation was requested.").optional().nullable(),
|
|
2065
|
+
cause: z.enum([
|
|
2066
|
+
"UNDEFINED",
|
|
2067
|
+
"OWNER_ACTION",
|
|
2068
|
+
"MEMBER_ACTION",
|
|
2069
|
+
"PAYMENT_FAILURE",
|
|
2070
|
+
"PAYMENT_SETUP_FAILURE",
|
|
2071
|
+
"UNKNOWN"
|
|
2072
|
+
]).describe("Reason for the cancellation.").optional(),
|
|
2073
|
+
effectiveAt: z.enum(["UNDEFINED", "IMMEDIATELY", "NEXT_PAYMENT_DATE"]).describe(
|
|
2074
|
+
"When the cancellation takes effect. Set when cancelling the order."
|
|
2227
2075
|
).optional()
|
|
2228
|
-
})
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
"
|
|
2076
|
+
}).describe(
|
|
2077
|
+
"Details about the cancellation of an order.\n\nOnly present if the status is `CANCELED`."
|
|
2078
|
+
).optional(),
|
|
2079
|
+
lastPaymentStatus: z.enum([
|
|
2080
|
+
"UNDEFINED",
|
|
2081
|
+
"PAID",
|
|
2082
|
+
"REFUNDED",
|
|
2083
|
+
"FAILED",
|
|
2084
|
+
"UNPAID",
|
|
2085
|
+
"PENDING",
|
|
2086
|
+
"NOT_APPLICABLE"
|
|
2087
|
+
]).describe(
|
|
2088
|
+
"Status of the last payment for the order.\nUpdated automatically for online orders. Updated manually by the Wix user for offline orders."
|
|
2089
|
+
).optional(),
|
|
2090
|
+
startDate: z.date().describe("Start date and time for the ordered plan.").optional().nullable(),
|
|
2091
|
+
endDate: z.date().describe(
|
|
2092
|
+
"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`."
|
|
2235
2093
|
).optional().nullable(),
|
|
2236
|
-
|
|
2237
|
-
|
|
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(
|
|
2099
|
+
"End date and time of the pause period.\n\nOmitted while the pause period remains `ACTIVE`."
|
|
2100
|
+
).optional().nullable()
|
|
2101
|
+
})
|
|
2102
|
+
).optional(),
|
|
2103
|
+
freeTrialDays: z.number().int().describe(
|
|
2104
|
+
"Free trial period for the order, in days.\n\nOnly available for recurring plans."
|
|
2105
|
+
).min(1).max(999).optional().nullable(),
|
|
2106
|
+
earliestEndDate: z.date().describe(
|
|
2107
|
+
"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."
|
|
2238
2108
|
).optional().nullable(),
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
"
|
|
2242
|
-
).
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
).max(16e3).optional().nullable()
|
|
2109
|
+
currentCycle: z.object({
|
|
2110
|
+
index: z.number().int().describe(
|
|
2111
|
+
"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
|
+
).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()
|
|
2246
2115
|
}).describe(
|
|
2247
|
-
"
|
|
2116
|
+
"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
|
+
).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(
|
|
2125
|
+
"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
|
+
).regex(
|
|
2127
|
+
/^[0-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
|
+
"Must be a valid GUID"
|
|
2129
|
+
).optional().nullable(),
|
|
2130
|
+
submissionId: z.string().describe(
|
|
2131
|
+
"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
|
+
).regex(
|
|
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}$/,
|
|
2134
|
+
"Must be a valid GUID"
|
|
2135
|
+
).optional().nullable(),
|
|
2136
|
+
submissionData: z.record(z.string(), z.any()).describe("Data submitted to the plan's order form at checkout.").optional()
|
|
2137
|
+
}).describe(
|
|
2138
|
+
"Information about the form submitted during the plan's checkout."
|
|
2248
2139
|
).optional()
|
|
2249
|
-
}).describe(
|
|
2250
|
-
|
|
2140
|
+
}).describe("The previewed order, as if the plan had been ordered.").optional(),
|
|
2141
|
+
purchaseLimitExceeded: z.boolean().describe(
|
|
2142
|
+
"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."
|
|
2251
2143
|
).optional()
|
|
2252
2144
|
});
|
|
2253
|
-
var
|
|
2254
|
-
|
|
2255
|
-
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
2256
|
-
"Must be a valid GUID"
|
|
2257
|
-
),
|
|
2258
|
-
endDate: z.date().describe(
|
|
2259
|
-
"New end date and time.\n\nMust be later than the current end date and time."
|
|
2260
|
-
)
|
|
2261
|
-
});
|
|
2262
|
-
var PostponeEndDateResponse = z.object({});
|
|
2263
|
-
var CancelOrderRequest = z.object({
|
|
2264
|
-
_id: z.string().describe("Order ID.").regex(
|
|
2145
|
+
var GetPricePreviewRequest = /* @__PURE__ */ z.object({
|
|
2146
|
+
planId: z.string().describe("ID of plan to preview.").regex(
|
|
2265
2147
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
2266
2148
|
"Must be a valid GUID"
|
|
2267
2149
|
),
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
var MarkAsPaidRequest = z.object({
|
|
2272
|
-
_id: z.string().describe("Order ID.").regex(
|
|
2273
|
-
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
2274
|
-
"Must be a valid GUID"
|
|
2275
|
-
)
|
|
2276
|
-
});
|
|
2277
|
-
var MarkAsPaidResponse = z.object({});
|
|
2278
|
-
var PauseOrderRequest = z.object({
|
|
2279
|
-
_id: z.string().describe("Order ID.").regex(
|
|
2280
|
-
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
2281
|
-
"Must be a valid GUID"
|
|
2282
|
-
)
|
|
2150
|
+
options: z.object({
|
|
2151
|
+
couponCode: z.string().describe("Coupon code to apply, from the Coupons API.").min(1).max(20).optional().nullable()
|
|
2152
|
+
}).describe("Options for getting a price preview. ").optional()
|
|
2283
2153
|
});
|
|
2284
|
-
var
|
|
2285
|
-
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
|
|
2154
|
+
var GetPricePreviewResponse = /* @__PURE__ */ z.object({
|
|
2155
|
+
price: z.intersection(
|
|
2156
|
+
z.object({
|
|
2157
|
+
subtotal: z.string().describe(
|
|
2158
|
+
'Price of the order excluding tax, specified as a monetary amount. for example, `"9.99"`.'
|
|
2159
|
+
).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(
|
|
2164
|
+
"Whether tax is included in the original price. When `false`, tax is added at checkout."
|
|
2165
|
+
).optional(),
|
|
2166
|
+
rate: z.string().describe(
|
|
2167
|
+
'Tax rate percentage, as a number between 0 and 100. For example, a 7% tax rate is `"7.00"`.'
|
|
2168
|
+
).optional(),
|
|
2169
|
+
amount: z.string().describe(
|
|
2170
|
+
'Total tax, specified as a monetary amount. For example, `"3.99"`.'
|
|
2171
|
+
).optional()
|
|
2172
|
+
}).describe("Tax applied.").optional(),
|
|
2173
|
+
total: z.string().describe(
|
|
2174
|
+
'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
|
+
).optional(),
|
|
2176
|
+
planPrice: z.string().describe("Plan price as it was at the moment of order creation.").optional(),
|
|
2177
|
+
currency: z.string().describe(
|
|
2178
|
+
"Currency code. Must be valid ISO 4217 currency code (e.g., USD)."
|
|
2179
|
+
).optional(),
|
|
2180
|
+
freeTrialDays: z.number().int().describe(
|
|
2181
|
+
"Free trial period for the order in days. Only available for recurring plans."
|
|
2182
|
+
).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(
|
|
2187
|
+
/^[0-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
|
+
"Must be a valid GUID"
|
|
2189
|
+
).optional()
|
|
2190
|
+
}).describe(
|
|
2191
|
+
"Coupon applied to the order. Empty means no coupon was applied."
|
|
2192
|
+
).optional()
|
|
2193
|
+
}),
|
|
2194
|
+
z.xor([
|
|
2195
|
+
z.object({
|
|
2196
|
+
subscription: z.never().optional(),
|
|
2197
|
+
singlePaymentForDuration: z.never().optional(),
|
|
2198
|
+
singlePaymentUnlimited: z.never().optional()
|
|
2199
|
+
}),
|
|
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
|
+
"Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`."
|
|
2207
|
+
).min(1).optional().nullable(),
|
|
2208
|
+
unit: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
|
|
2209
|
+
}).describe(
|
|
2210
|
+
"Number of payment cycles the subscription is valid for.\n`0` for unlimited plans or for plans that are valid until canceled."
|
|
2211
|
+
).optional(),
|
|
2212
|
+
cycleCount: z.number().int().describe(
|
|
2213
|
+
"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
|
+
).min(0).max(2e3).optional().nullable()
|
|
2215
|
+
}).describe("Order has recurring payments.")
|
|
2216
|
+
}),
|
|
2217
|
+
z.object({
|
|
2218
|
+
subscription: z.never().optional(),
|
|
2219
|
+
singlePaymentUnlimited: z.never().optional(),
|
|
2220
|
+
singlePaymentForDuration: z.object({
|
|
2221
|
+
count: z.number().int().describe(
|
|
2222
|
+
"Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`."
|
|
2223
|
+
).min(1).optional().nullable(),
|
|
2224
|
+
unit: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
|
|
2225
|
+
}).describe(
|
|
2226
|
+
"One-time payment. Order is valid for a specified duration."
|
|
2227
|
+
)
|
|
2228
|
+
}),
|
|
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.")
|
|
2233
|
+
})
|
|
2234
|
+
])
|
|
2235
|
+
).describe(
|
|
2236
|
+
"__Deprecated.__ Use `prices` instead. This property will be removed on September 30, 2022."
|
|
2237
|
+
).optional(),
|
|
2238
|
+
prices: z.array(
|
|
2239
|
+
z.object({
|
|
2240
|
+
duration: z.object({
|
|
2241
|
+
cycleFrom: z.number().int().describe(
|
|
2242
|
+
"Price starts to apply with this cycle.\n\n`1` is the first payment cycle for all pricing models."
|
|
2243
|
+
).optional(),
|
|
2244
|
+
numberOfCycles: z.number().int().describe(
|
|
2245
|
+
"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
|
+
).optional().nullable()
|
|
2247
|
+
}).describe(
|
|
2248
|
+
"Cycle duration to apply `price` for.\n\nUse with all pricing models.\nCan apply the same price to multiple payment cycles."
|
|
2249
|
+
).optional(),
|
|
2250
|
+
price: z.object({
|
|
2251
|
+
subtotal: z.string().describe(
|
|
2252
|
+
'Price of the order excluding tax, specified as a monetary amount. For example, `"9.99"`.'
|
|
2253
|
+
).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(
|
|
2257
|
+
"Total discount of the coupon, as a monetary amount."
|
|
2258
|
+
).optional(),
|
|
2259
|
+
_id: z.string().describe("Coupon ID.").regex(
|
|
2260
|
+
/^[0-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
|
+
"Must be a valid GUID"
|
|
2262
|
+
).optional()
|
|
2263
|
+
}).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(
|
|
2268
|
+
"Whether tax is included in the original price. When `false`, tax is added at checkout."
|
|
2269
|
+
).optional(),
|
|
2270
|
+
rate: z.string().describe(
|
|
2271
|
+
'Tax rate percentage, as a number between 0 and 100. For example, a 7% tax rate is `"7.00"`.'
|
|
2272
|
+
).optional(),
|
|
2273
|
+
amount: z.string().describe(
|
|
2274
|
+
'Total tax, specified as a monetary amount. For example, `"3.99"`.'
|
|
2275
|
+
).optional()
|
|
2276
|
+
}).describe(
|
|
2277
|
+
"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
|
+
).optional(),
|
|
2279
|
+
total: z.string().describe(
|
|
2280
|
+
'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
|
+
).optional(),
|
|
2282
|
+
currency: z.string().describe(
|
|
2283
|
+
"Three-letter currency code in\n[ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format."
|
|
2284
|
+
).optional(),
|
|
2285
|
+
proration: z.string().describe(
|
|
2286
|
+
"Price change after billing date was change and price was adjusted. Could be positive and negative values."
|
|
2287
|
+
).optional()
|
|
2288
|
+
}).describe("Order price.").optional()
|
|
2289
|
+
})
|
|
2290
|
+
).optional()
|
|
2290
2291
|
});
|
|
2291
|
-
var
|
|
2292
|
-
var MemberGetOrderRequest = z.object({
|
|
2292
|
+
var MemberGetOrderRequest = /* @__PURE__ */ z.object({
|
|
2293
2293
|
_id: z.string().describe("Order ID.").regex(
|
|
2294
2294
|
/^[0-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
2295
|
"Must be a valid GUID"
|
|
2296
2296
|
),
|
|
2297
2297
|
options: z.object({ fieldSet: z.enum(["UNKNOWN_SET", "BASIC", "FULL"]).optional() }).describe("Options for getting a logged-in member's order. ").optional()
|
|
2298
2298
|
});
|
|
2299
|
-
var MemberGetOrderResponse = z.object({
|
|
2299
|
+
var MemberGetOrderResponse = /* @__PURE__ */ z.object({
|
|
2300
2300
|
_id: z.string().describe("Order ID.").regex(
|
|
2301
2301
|
/^[0-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
2302
|
"Must be a valid GUID"
|
|
@@ -2609,7 +2609,7 @@ var MemberGetOrderResponse = z.object({
|
|
|
2609
2609
|
"Information about the form submitted during the plan's checkout."
|
|
2610
2610
|
).optional()
|
|
2611
2611
|
});
|
|
2612
|
-
var MemberListOrdersRequest = z.object({
|
|
2612
|
+
var MemberListOrdersRequest = /* @__PURE__ */ z.object({
|
|
2613
2613
|
options: z.object({
|
|
2614
2614
|
planIds: z.array(z.string()).optional(),
|
|
2615
2615
|
autoRenewCanceled: z.boolean().describe("Filter for orders where auto renewal was canceled.").optional().nullable(),
|
|
@@ -2652,7 +2652,7 @@ var MemberListOrdersRequest = z.object({
|
|
|
2652
2652
|
fieldSet: z.enum(["UNKNOWN_SET", "BASIC", "FULL"]).optional()
|
|
2653
2653
|
}).describe("Filtering, sorting, and pagination options. ").optional()
|
|
2654
2654
|
});
|
|
2655
|
-
var MemberListOrdersResponse = z.object({
|
|
2655
|
+
var MemberListOrdersResponse = /* @__PURE__ */ z.object({
|
|
2656
2656
|
orders: z.array(
|
|
2657
2657
|
z.object({
|
|
2658
2658
|
_id: z.string().describe("Order ID.").regex(
|
|
@@ -3003,14 +3003,14 @@ var MemberListOrdersResponse = z.object({
|
|
|
3003
3003
|
"Object containing paging-related data (number of orders returned, offset)."
|
|
3004
3004
|
).optional()
|
|
3005
3005
|
});
|
|
3006
|
-
var RequestCancellationRequest = z.object({
|
|
3006
|
+
var RequestCancellationRequest = /* @__PURE__ */ z.object({
|
|
3007
3007
|
_id: z.string().describe("Order ID.").regex(
|
|
3008
3008
|
/^[0-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
3009
|
"Must be a valid GUID"
|
|
3010
3010
|
),
|
|
3011
3011
|
effectiveAt: z.enum(["UNDEFINED", "IMMEDIATELY", "NEXT_PAYMENT_DATE"])
|
|
3012
3012
|
});
|
|
3013
|
-
var RequestCancellationResponse = z.object({});
|
|
3013
|
+
var RequestCancellationResponse = /* @__PURE__ */ z.object({});
|
|
3014
3014
|
export {
|
|
3015
3015
|
CancelOrderRequest,
|
|
3016
3016
|
CancelOrderResponse,
|