@wix/auto_sdk_pricing-plans_orders 1.0.121 → 1.0.123

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.
Files changed (49) hide show
  1. package/build/cjs/index.d.ts +129 -129
  2. package/build/cjs/index.js +706 -588
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/index.typings.d.ts +766 -766
  5. package/build/cjs/index.typings.js +548 -434
  6. package/build/cjs/index.typings.js.map +1 -1
  7. package/build/cjs/meta.d.ts +484 -484
  8. package/build/cjs/meta.js +483 -369
  9. package/build/cjs/meta.js.map +1 -1
  10. package/build/cjs/schemas.d.ts +199 -199
  11. package/build/cjs/schemas.js +891 -891
  12. package/build/cjs/schemas.js.map +1 -1
  13. package/build/es/index.d.mts +129 -129
  14. package/build/es/index.mjs +706 -588
  15. package/build/es/index.mjs.map +1 -1
  16. package/build/es/index.typings.d.mts +766 -766
  17. package/build/es/index.typings.mjs +548 -434
  18. package/build/es/index.typings.mjs.map +1 -1
  19. package/build/es/meta.d.mts +484 -484
  20. package/build/es/meta.mjs +483 -369
  21. package/build/es/meta.mjs.map +1 -1
  22. package/build/es/schemas.d.mts +199 -199
  23. package/build/es/schemas.mjs +891 -891
  24. package/build/es/schemas.mjs.map +1 -1
  25. package/build/internal/cjs/index.d.ts +129 -129
  26. package/build/internal/cjs/index.js +706 -588
  27. package/build/internal/cjs/index.js.map +1 -1
  28. package/build/internal/cjs/index.typings.d.ts +794 -794
  29. package/build/internal/cjs/index.typings.js +548 -434
  30. package/build/internal/cjs/index.typings.js.map +1 -1
  31. package/build/internal/cjs/meta.d.ts +500 -500
  32. package/build/internal/cjs/meta.js +483 -369
  33. package/build/internal/cjs/meta.js.map +1 -1
  34. package/build/internal/cjs/schemas.d.ts +199 -199
  35. package/build/internal/cjs/schemas.js +891 -891
  36. package/build/internal/cjs/schemas.js.map +1 -1
  37. package/build/internal/es/index.d.mts +129 -129
  38. package/build/internal/es/index.mjs +706 -588
  39. package/build/internal/es/index.mjs.map +1 -1
  40. package/build/internal/es/index.typings.d.mts +794 -794
  41. package/build/internal/es/index.typings.mjs +548 -434
  42. package/build/internal/es/index.typings.mjs.map +1 -1
  43. package/build/internal/es/meta.d.mts +500 -500
  44. package/build/internal/es/meta.mjs +483 -369
  45. package/build/internal/es/meta.mjs.map +1 -1
  46. package/build/internal/es/schemas.d.mts +199 -199
  47. package/build/internal/es/schemas.mjs +891 -891
  48. package/build/internal/es/schemas.mjs.map +1 -1
  49. package/package.json +3 -3
@@ -65,30 +65,14 @@ module.exports = __toCommonJS(schemas_exports);
65
65
 
66
66
  // src/pricing-plans-v2-order-orders.schemas.ts
67
67
  var z = __toESM(require("zod"));
68
- var CreateOnlineOrderRequest = z.object({
69
- planId: z.string().describe("Plan ID.").regex(
68
+ var ManagementGetOrderRequest = /* @__PURE__ */ z.object({
69
+ _id: z.string().describe("Order ID.").regex(
70
70
  /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
71
71
  "Must be a valid GUID"
72
72
  ),
73
- options: z.object({
74
- startDate: z.date().describe(
75
- "Start date and time for the plan of the online order in a `YYYY-MM-DDThh:mm[:ss][.sss]Z` format.\n\nDefault: Current date and time."
76
- ).optional().nullable(),
77
- couponCode: z.string().describe("Coupon code to apply.").min(1).max(20).optional().nullable(),
78
- onBehalf: z.object({
79
- memberId: z.string().describe("Member ID.").regex(
80
- /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
81
- "Must be a valid GUID"
82
- ),
83
- orderMethod: z.enum(["UNKNOWN", "MOTO", "POS"]).optional()
84
- }).describe("Provided if checkout is initiated on buyer's behalf.").optional(),
85
- submissionId: z.string().describe("Submission ID of the form submitted with this order.").regex(
86
- /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
87
- "Must be a valid GUID"
88
- ).optional().nullable()
89
- }).optional()
73
+ options: z.object({ fieldSet: z.enum(["UNKNOWN_SET", "BASIC", "FULL"]).optional() }).describe("Options to use when getting an order. ").optional()
90
74
  });
91
- var CreateOnlineOrderResponse = z.object({
75
+ var ManagementGetOrderResponse = /* @__PURE__ */ z.object({
92
76
  order: z.object({
93
77
  _id: z.string().describe("Order ID.").regex(
94
78
  /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
@@ -409,365 +393,470 @@ var CreateOnlineOrderResponse = z.object({
409
393
  }).describe(
410
394
  "Information about the form submitted during the plan's checkout."
411
395
  ).optional()
412
- }).describe("Created online order.").optional()
396
+ }).describe("Order.").optional()
413
397
  });
414
- var CreateOfflineOrderRequest = z.object({
415
- planId: z.string().describe("ID of the plan being ordered, from the Plans API.").regex(
416
- /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
417
- "Must be a valid GUID"
418
- ),
419
- memberId: z.string().describe("ID of the member ordering the plan, from the Members API.").regex(
420
- /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
421
- "Must be a valid GUID"
422
- ),
398
+ var ManagementListOrdersRequest = /* @__PURE__ */ z.object({
423
399
  options: z.object({
424
- startDate: z.date().describe(
425
- "Start date and time for the ordered plan in a `YYYY-MM-DDThh:mm[:ss][.sss]Z` format.\n\nDefault: Current date and time."
400
+ buyerIds: z.array(z.string()).optional(),
401
+ planIds: z.array(z.string()).optional(),
402
+ autoRenewCanceled: z.boolean().describe(
403
+ "Filter by whether or not the auto-renewal of recurring orders was canceled."
426
404
  ).optional().nullable(),
427
- paid: z.boolean().describe("Whether the order is paid.\n\nDefault: `false`").optional().nullable(),
428
- couponCode: z.string().describe("Coupon code to apply, from the Coupons API.").min(1).max(20).optional().nullable(),
429
- submissionId: z.string().describe("Form submission ID that was submitted with the order.").regex(
430
- /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
431
- "Must be a valid GUID"
432
- ).optional().nullable()
433
- }).describe("Options for creating an offline order. ").optional()
434
- });
435
- var CreateOfflineOrderResponse = z.object({
436
- order: z.object({
437
- _id: z.string().describe("Order ID.").regex(
438
- /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
439
- "Must be a valid GUID"
405
+ orderStatuses: z.array(
406
+ z.enum([
407
+ "UNDEFINED",
408
+ "DRAFT",
409
+ "PENDING",
410
+ "ACTIVE",
411
+ "PAUSED",
412
+ "ENDED",
413
+ "CANCELED"
414
+ ])
440
415
  ).optional(),
441
- planId: z.string().describe(
442
- "ID of the plan purchased with the order, from the Plans API."
443
- ).regex(
444
- /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
445
- "Must be a valid GUID"
416
+ paymentStatuses: z.array(
417
+ z.enum([
418
+ "UNDEFINED",
419
+ "PAID",
420
+ "REFUNDED",
421
+ "FAILED",
422
+ "UNPAID",
423
+ "PENDING",
424
+ "NOT_APPLICABLE"
425
+ ])
446
426
  ).optional(),
447
- subscriptionId: z.string().describe(
448
- "ID of the related Wix subscription.\n\nEvery pricing plan order corresponds to a Wix subscription, including orders for single payment plans. Learn more in\na [Pricing Plans overview](https://support.wix.com/en/article/pricing-plans-an-overview#create-plans-to-suit-your-business)."
449
- ).regex(
450
- /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
451
- "Must be a valid GUID"
427
+ limit: z.number().int().describe(
428
+ "Number of orders to return. See Sorting and Paging for more information.\n\nMax: `50`"
429
+ ).min(1).max(50).optional().nullable(),
430
+ offset: z.number().int().describe("Number of orders to skip in the current sort order.").min(0).optional().nullable(),
431
+ sorting: z.object({
432
+ fieldName: z.string().describe("Name of the field to sort by.").max(512).optional(),
433
+ order: z.enum(["ASC", "DESC"]).optional(),
434
+ origin: z.object({
435
+ latitude: z.number().describe("Address latitude.").optional().nullable(),
436
+ longitude: z.number().describe("Address longitude.").optional().nullable()
437
+ }).describe(
438
+ "Origin point for geo-distance sorting on a GEO field\nresults are ordered by distance from this point (ASC = nearest first, DESC = farthest first)."
439
+ ).optional()
440
+ }).describe(
441
+ "Sort order.\n\nUse `ASC` for ascending order or `DESC` for descending order.\n\nDefault: `DESC`."
452
442
  ).optional(),
453
- wixPayOrderId: z.string().describe(
454
- "Wix Pay order ID.\n\nProvided by Wix whether the order is created online or offline. The field is omitted when the order is free."
455
- ).regex(
456
- /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
457
- "Must be a valid GUID"
458
- ).optional().nullable(),
459
- buyer: z.object({
460
- memberId: z.string().describe("Member ID for a Wix site member, from the Members API.").regex(
443
+ fieldSet: z.enum(["UNKNOWN_SET", "BASIC", "FULL"]).optional()
444
+ }).describe("Filtering, sorting, and pagination options. ").optional()
445
+ });
446
+ var ManagementListOrdersResponse = /* @__PURE__ */ z.object({
447
+ orders: z.array(
448
+ z.object({
449
+ _id: z.string().describe("Order ID.").regex(
461
450
  /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
462
451
  "Must be a valid GUID"
463
452
  ).optional(),
464
- contactId: z.string().describe(
465
- "Contact ID for a Wix site contact, from the Contacts API."
453
+ planId: z.string().describe(
454
+ "ID of the plan purchased with the order, from the Plans API."
466
455
  ).regex(
467
456
  /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
468
457
  "Must be a valid GUID"
469
- ).optional()
470
- }).describe(
471
- "The buyer's IDs. Includes `memberId` and `contactId`.\n\nCurrently, Pricing Plan purchases are limited to members only. `contactId` is returned,\nbut a buyer will not be able to purchase a plan without a `memberId`."
472
- ).optional(),
473
- priceDetails: z.intersection(
474
- z.object({
475
- subtotal: z.string().describe(
476
- 'Price of the order excluding tax, specified as a monetary amount. for example, `"9.99"`.'
458
+ ).optional(),
459
+ subscriptionId: z.string().describe(
460
+ "ID of the related Wix subscription.\n\nEvery pricing plan order corresponds to a Wix subscription, including orders for single payment plans. Learn more in\na [Pricing Plans overview](https://support.wix.com/en/article/pricing-plans-an-overview#create-plans-to-suit-your-business)."
461
+ ).regex(
462
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
463
+ "Must be a valid GUID"
464
+ ).optional(),
465
+ wixPayOrderId: z.string().describe(
466
+ "Wix Pay order ID.\n\nProvided by Wix whether the order is created online or offline. The field is omitted when the order is free."
467
+ ).regex(
468
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
469
+ "Must be a valid GUID"
470
+ ).optional().nullable(),
471
+ buyer: z.object({
472
+ memberId: z.string().describe(
473
+ "Member ID for a Wix site member, from the Members API."
474
+ ).regex(
475
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
476
+ "Must be a valid GUID"
477
477
  ).optional(),
478
- discount: z.string().describe("Total discount applied.").optional(),
479
- tax: z.object({
480
- name: z.string().describe("Name of the tax. For example, VAT.").optional(),
481
- includedInPrice: z.boolean().describe(
482
- "Whether tax is included in the original price. When `false`, tax is added at checkout."
478
+ contactId: z.string().describe(
479
+ "Contact ID for a Wix site contact, from the Contacts API."
480
+ ).regex(
481
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
482
+ "Must be a valid GUID"
483
+ ).optional()
484
+ }).describe(
485
+ "The buyer's IDs. Includes `memberId` and `contactId`.\n\nCurrently, Pricing Plan purchases are limited to members only. `contactId` is returned,\nbut a buyer will not be able to purchase a plan without a `memberId`."
486
+ ).optional(),
487
+ priceDetails: z.intersection(
488
+ z.object({
489
+ subtotal: z.string().describe(
490
+ 'Price of the order excluding tax, specified as a monetary amount. for example, `"9.99"`.'
483
491
  ).optional(),
484
- rate: z.string().describe(
485
- 'Tax rate percentage, as a number between 0 and 100. For example, a 7% tax rate is `"7.00"`.'
492
+ discount: z.string().describe("Total discount applied.").optional(),
493
+ tax: z.object({
494
+ name: z.string().describe("Name of the tax. For example, VAT.").optional(),
495
+ includedInPrice: z.boolean().describe(
496
+ "Whether tax is included in the original price. When `false`, tax is added at checkout."
497
+ ).optional(),
498
+ rate: z.string().describe(
499
+ 'Tax rate percentage, as a number between 0 and 100. For example, a 7% tax rate is `"7.00"`.'
500
+ ).optional(),
501
+ amount: z.string().describe(
502
+ 'Total tax, specified as a monetary amount. For example, `"3.99"`.'
503
+ ).optional()
504
+ }).describe("Tax applied.").optional(),
505
+ total: z.string().describe(
506
+ 'Price after tax and discount is applied, specified as a monetary amount. For example, `"13.98"`.\n\nIf no tax is applied, the amount is the same as `subtotal`.'
486
507
  ).optional(),
487
- amount: z.string().describe(
488
- 'Total tax, specified as a monetary amount. For example, `"3.99"`.'
489
- ).optional()
490
- }).describe("Tax applied.").optional(),
491
- total: z.string().describe(
492
- 'Price after tax and discount is applied, specified as a monetary amount. For example, `"13.98"`.\n\nIf no tax is applied, the amount is the same as `subtotal`.'
493
- ).optional(),
494
- planPrice: z.string().describe("Plan price as it was at the moment of order creation.").optional(),
495
- currency: z.string().describe(
496
- "Currency code. Must be valid ISO 4217 currency code (e.g., USD)."
497
- ).optional(),
498
- freeTrialDays: z.number().int().describe(
499
- "Free trial period for the order in days. Only available for recurring plans."
500
- ).min(1).max(999).optional().nullable(),
501
- coupon: z.object({
502
- code: z.string().describe("Code of the applied coupon.").min(1).max(20).optional(),
503
- amount: z.string().describe(
504
- "Total discount of the coupon, as a monetary amount."
508
+ planPrice: z.string().describe(
509
+ "Plan price as it was at the moment of order creation."
505
510
  ).optional(),
506
- _id: z.string().describe("Coupon ID.").regex(
507
- /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
508
- "Must be a valid GUID"
511
+ currency: z.string().describe(
512
+ "Currency code. Must be valid ISO 4217 currency code (e.g., USD)."
513
+ ).optional(),
514
+ freeTrialDays: z.number().int().describe(
515
+ "Free trial period for the order in days. Only available for recurring plans."
516
+ ).min(1).max(999).optional().nullable(),
517
+ coupon: z.object({
518
+ code: z.string().describe("Code of the applied coupon.").min(1).max(20).optional(),
519
+ amount: z.string().describe(
520
+ "Total discount of the coupon, as a monetary amount."
521
+ ).optional(),
522
+ _id: z.string().describe("Coupon ID.").regex(
523
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
524
+ "Must be a valid GUID"
525
+ ).optional()
526
+ }).describe(
527
+ "Coupon applied to the order. Empty means no coupon was applied."
509
528
  ).optional()
510
- }).describe(
511
- "Coupon applied to the order. Empty means no coupon was applied."
512
- ).optional()
513
- }),
514
- z.xor([
515
- z.object({
516
- subscription: z.never().optional(),
517
- singlePaymentForDuration: z.never().optional(),
518
- singlePaymentUnlimited: z.never().optional()
519
529
  }),
520
- z.object({
521
- singlePaymentForDuration: z.never().optional(),
522
- singlePaymentUnlimited: z.never().optional(),
523
- subscription: z.object({
524
- cycleDuration: z.object({
530
+ z.xor([
531
+ z.object({
532
+ subscription: z.never().optional(),
533
+ singlePaymentForDuration: z.never().optional(),
534
+ singlePaymentUnlimited: z.never().optional()
535
+ }),
536
+ z.object({
537
+ singlePaymentForDuration: z.never().optional(),
538
+ singlePaymentUnlimited: z.never().optional(),
539
+ subscription: z.object({
540
+ cycleDuration: z.object({
541
+ count: z.number().int().describe(
542
+ "Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`."
543
+ ).min(1).optional().nullable(),
544
+ unit: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
545
+ }).describe(
546
+ "Number of payment cycles the subscription is valid for.\n`0` for unlimited plans or for plans that are valid until canceled."
547
+ ).optional(),
548
+ cycleCount: z.number().int().describe(
549
+ "Length of a payment cycle. For example, 1 month to have monthly payments.\nMultiply `cycleDuration`'s `count` by `cycleCount` to get the subscription duration.\nCurrently, only a value of `1` is supported."
550
+ ).min(0).max(2e3).optional().nullable()
551
+ }).describe("Order has recurring payments.")
552
+ }),
553
+ z.object({
554
+ subscription: z.never().optional(),
555
+ singlePaymentUnlimited: z.never().optional(),
556
+ singlePaymentForDuration: z.object({
525
557
  count: z.number().int().describe(
526
558
  "Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`."
527
559
  ).min(1).optional().nullable(),
528
560
  unit: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
529
561
  }).describe(
530
- "Number of payment cycles the subscription is valid for.\n`0` for unlimited plans or for plans that are valid until canceled."
531
- ).optional(),
532
- cycleCount: z.number().int().describe(
533
- "Length of a payment cycle. For example, 1 month to have monthly payments.\nMultiply `cycleDuration`'s `count` by `cycleCount` to get the subscription duration.\nCurrently, only a value of `1` is supported."
534
- ).min(0).max(2e3).optional().nullable()
535
- }).describe("Order has recurring payments.")
536
- }),
537
- z.object({
538
- subscription: z.never().optional(),
539
- singlePaymentUnlimited: z.never().optional(),
540
- singlePaymentForDuration: z.object({
541
- count: z.number().int().describe(
542
- "Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`."
543
- ).min(1).optional().nullable(),
544
- unit: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
545
- }).describe(
546
- "One-time payment. Order is valid for a specified duration."
547
- )
548
- }),
549
- z.object({
550
- subscription: z.never().optional(),
551
- singlePaymentForDuration: z.never().optional(),
552
- singlePaymentUnlimited: z.boolean().describe(
553
- "One-time payment. Order is valid until it is canceled."
554
- )
555
- })
556
- ])
557
- ).describe(
558
- "__Deprecated.__ Use `pricing` instead. This property will be removed on September 30, 2022."
559
- ).optional(),
560
- pricing: z.intersection(
561
- z.object({
562
- prices: z.array(
562
+ "One-time payment. Order is valid for a specified duration."
563
+ )
564
+ }),
563
565
  z.object({
564
- duration: z.object({
565
- cycleFrom: z.number().int().describe(
566
- "Price starts to apply with this cycle.\n\n`1` is the first payment cycle for all pricing models."
567
- ).optional(),
568
- numberOfCycles: z.number().int().describe(
569
- "Amount of cycles to apply price for.\n\nFor `subscription` pricing models with a finite number of cycles, the `numberOfCycles` is the same as `pricing.subscription.cycleCount`.\n\nFor `subscription` pricing models that are unlimited or until-canceled, the `numberOfCycles` is not returned.\n\nFor `singlePaymentForDuration` and `singlePaymentUnlimited` pricing models, the `numberOfCycles` is `1`."
570
- ).optional().nullable()
571
- }).describe(
572
- "Cycle duration to apply `price` for.\n\nUse with all pricing models.\nCan apply the same price to multiple payment cycles."
573
- ).optional(),
574
- price: z.object({
575
- subtotal: z.string().describe(
576
- 'Price of the order excluding tax, specified as a monetary amount. For example, `"9.99"`.'
577
- ).optional(),
578
- coupon: z.object({
579
- code: z.string().describe("Code of the applied coupon.").min(1).max(20).optional(),
580
- amount: z.string().describe(
581
- "Total discount of the coupon, as a monetary amount."
566
+ subscription: z.never().optional(),
567
+ singlePaymentForDuration: z.never().optional(),
568
+ singlePaymentUnlimited: z.boolean().describe(
569
+ "One-time payment. Order is valid until it is canceled."
570
+ )
571
+ })
572
+ ])
573
+ ).describe(
574
+ "__Deprecated.__ Use `pricing` instead. This property will be removed on September 30, 2022."
575
+ ).optional(),
576
+ pricing: z.intersection(
577
+ z.object({
578
+ prices: z.array(
579
+ z.object({
580
+ duration: z.object({
581
+ cycleFrom: z.number().int().describe(
582
+ "Price starts to apply with this cycle.\n\n`1` is the first payment cycle for all pricing models."
582
583
  ).optional(),
583
- _id: z.string().describe("Coupon ID.").regex(
584
- /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
585
- "Must be a valid GUID"
586
- ).optional()
584
+ numberOfCycles: z.number().int().describe(
585
+ "Amount of cycles to apply price for.\n\nFor `subscription` pricing models with a finite number of cycles, the `numberOfCycles` is the same as `pricing.subscription.cycleCount`.\n\nFor `subscription` pricing models that are unlimited or until-canceled, the `numberOfCycles` is not returned.\n\nFor `singlePaymentForDuration` and `singlePaymentUnlimited` pricing models, the `numberOfCycles` is `1`."
586
+ ).optional().nullable()
587
587
  }).describe(
588
- "Coupon applied to the order, from the Coupons API."
588
+ "Cycle duration to apply `price` for.\n\nUse with all pricing models.\nCan apply the same price to multiple payment cycles."
589
589
  ).optional(),
590
- discount: z.string().describe("Total discount applied to the order.").optional(),
591
- tax: z.object({
592
- name: z.string().describe("Name of the tax. For example, VAT.").optional(),
593
- includedInPrice: z.boolean().describe(
594
- "Whether tax is included in the original price. When `false`, tax is added at checkout."
590
+ price: z.object({
591
+ subtotal: z.string().describe(
592
+ 'Price of the order excluding tax, specified as a monetary amount. For example, `"9.99"`.'
595
593
  ).optional(),
596
- rate: z.string().describe(
597
- 'Tax rate percentage, as a number between 0 and 100. For example, a 7% tax rate is `"7.00"`.'
594
+ coupon: z.object({
595
+ code: z.string().describe("Code of the applied coupon.").min(1).max(20).optional(),
596
+ amount: z.string().describe(
597
+ "Total discount of the coupon, as a monetary amount."
598
+ ).optional(),
599
+ _id: z.string().describe("Coupon ID.").regex(
600
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
601
+ "Must be a valid GUID"
602
+ ).optional()
603
+ }).describe(
604
+ "Coupon applied to the order, from the Coupons API."
598
605
  ).optional(),
599
- amount: z.string().describe(
600
- 'Total tax, specified as a monetary amount. For example, `"3.99"`.'
606
+ discount: z.string().describe("Total discount applied to the order.").optional(),
607
+ tax: z.object({
608
+ name: z.string().describe("Name of the tax. For example, VAT.").optional(),
609
+ includedInPrice: z.boolean().describe(
610
+ "Whether tax is included in the original price. When `false`, tax is added at checkout."
611
+ ).optional(),
612
+ rate: z.string().describe(
613
+ 'Tax rate percentage, as a number between 0 and 100. For example, a 7% tax rate is `"7.00"`.'
614
+ ).optional(),
615
+ amount: z.string().describe(
616
+ 'Total tax, specified as a monetary amount. For example, `"3.99"`.'
617
+ ).optional()
618
+ }).describe(
619
+ "Tax applied to the order.\n\nTax is only applied if the site [has it configured](https://support.wix.com/en/article/pricing-plans-setting-up-tax-collection)."
620
+ ).optional(),
621
+ total: z.string().describe(
622
+ 'Price after tax and discount is applied. Specified as a monetary amount, for example, `"13.98"`.\n\nIf no tax is applied, the amount is the same as `subtotal`.'
623
+ ).optional(),
624
+ currency: z.string().describe(
625
+ "Three-letter currency code in\n[ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format."
626
+ ).optional(),
627
+ proration: z.string().describe(
628
+ "Price change after billing date was change and price was adjusted. Could be positive and negative values."
601
629
  ).optional()
630
+ }).describe("Order price.").optional()
631
+ })
632
+ ).optional()
633
+ }),
634
+ z.xor([
635
+ z.object({
636
+ subscription: z.never().optional(),
637
+ singlePaymentForDuration: z.never().optional(),
638
+ singlePaymentUnlimited: z.never().optional()
639
+ }),
640
+ z.object({
641
+ singlePaymentForDuration: z.never().optional(),
642
+ singlePaymentUnlimited: z.never().optional(),
643
+ subscription: z.object({
644
+ cycleDuration: z.object({
645
+ count: z.number().int().describe(
646
+ "Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`."
647
+ ).min(1).optional().nullable(),
648
+ unit: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
602
649
  }).describe(
603
- "Tax applied to the order.\n\nTax is only applied if the site [has it configured](https://support.wix.com/en/article/pricing-plans-setting-up-tax-collection)."
604
- ).optional(),
605
- total: z.string().describe(
606
- 'Price after tax and discount is applied. Specified as a monetary amount, for example, `"13.98"`.\n\nIf no tax is applied, the amount is the same as `subtotal`.'
607
- ).optional(),
608
- currency: z.string().describe(
609
- "Three-letter currency code in\n[ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format."
650
+ "Number of payment cycles the subscription is valid for.\n`0` for unlimited plans or for plans that are valid until canceled."
610
651
  ).optional(),
611
- proration: z.string().describe(
612
- "Price change after billing date was change and price was adjusted. Could be positive and negative values."
613
- ).optional()
614
- }).describe("Order price.").optional()
615
- })
616
- ).optional()
617
- }),
618
- z.xor([
619
- z.object({
620
- subscription: z.never().optional(),
621
- singlePaymentForDuration: z.never().optional(),
622
- singlePaymentUnlimited: z.never().optional()
623
- }),
624
- z.object({
625
- singlePaymentForDuration: z.never().optional(),
626
- singlePaymentUnlimited: z.never().optional(),
627
- subscription: z.object({
628
- cycleDuration: z.object({
652
+ cycleCount: z.number().int().describe(
653
+ "Length of a payment cycle. For example, 1 month to have monthly payments.\nMultiply `cycleDuration`'s `count` by `cycleCount` to get the subscription duration.\nCurrently, only a value of `1` is supported."
654
+ ).min(0).max(2e3).optional().nullable()
655
+ }).describe(
656
+ "Pricing model for an order with recurring payment cycles."
657
+ )
658
+ }),
659
+ z.object({
660
+ subscription: z.never().optional(),
661
+ singlePaymentUnlimited: z.never().optional(),
662
+ singlePaymentForDuration: z.object({
629
663
  count: z.number().int().describe(
630
664
  "Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`."
631
665
  ).min(1).optional().nullable(),
632
666
  unit: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
633
667
  }).describe(
634
- "Number of payment cycles the subscription is valid for.\n`0` for unlimited plans or for plans that are valid until canceled."
635
- ).optional(),
636
- cycleCount: z.number().int().describe(
637
- "Length of a payment cycle. For example, 1 month to have monthly payments.\nMultiply `cycleDuration`'s `count` by `cycleCount` to get the subscription duration.\nCurrently, only a value of `1` is supported."
638
- ).min(0).max(2e3).optional().nullable()
639
- }).describe(
640
- "Pricing model for an order with recurring payment cycles."
641
- )
642
- }),
643
- z.object({
644
- subscription: z.never().optional(),
645
- singlePaymentUnlimited: z.never().optional(),
646
- singlePaymentForDuration: z.object({
647
- count: z.number().int().describe(
648
- "Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`."
649
- ).min(1).optional().nullable(),
650
- unit: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
651
- }).describe(
652
- "Pricing model for an order with a one-time payment and the order is valid for a specific amount of time."
653
- )
654
- }),
655
- z.object({
656
- subscription: z.never().optional(),
657
- singlePaymentForDuration: z.never().optional(),
658
- singlePaymentUnlimited: z.boolean().describe(
659
- "Pricing model for an order with a one-time payment and the order is valid until canceled."
660
- )
661
- })
662
- ])
663
- ).describe(
664
- "Order pricing model, price, and payment schedule.\n\nLearn more about [pricing models](https://dev.wix.com/api/rest/wix-pricing-plans/pricing-plans/introduction#wix-pricing-plans_pricing-plans_introduction_pricing-models)."
665
- ).optional(),
666
- type: z.enum(["UNDEFINED", "ONLINE", "OFFLINE", "EXTERNAL"]).describe("How the order was processed.").optional(),
667
- status: z.enum([
668
- "UNDEFINED",
669
- "DRAFT",
670
- "PENDING",
671
- "ACTIVE",
672
- "PAUSED",
673
- "ENDED",
674
- "CANCELED"
675
- ]).describe("Status of the order.").optional(),
676
- autoRenewCanceled: z.boolean().describe(
677
- "Whether the order will be canceled at the next payment date.\n\nIf `true`, the order status will be `CANCELED` and the next payment won't be charged. Omitted for single payment orders."
678
- ).optional().nullable(),
679
- cancellation: z.object({
680
- requestedDate: z.date().describe("Date and time the cancellation was requested.").optional().nullable(),
681
- cause: z.enum([
668
+ "Pricing model for an order with a one-time payment and the order is valid for a specific amount of time."
669
+ )
670
+ }),
671
+ z.object({
672
+ subscription: z.never().optional(),
673
+ singlePaymentForDuration: z.never().optional(),
674
+ singlePaymentUnlimited: z.boolean().describe(
675
+ "Pricing model for an order with a one-time payment and the order is valid until canceled."
676
+ )
677
+ })
678
+ ])
679
+ ).describe(
680
+ "Order pricing model, price, and payment schedule.\n\nLearn more about [pricing models](https://dev.wix.com/api/rest/wix-pricing-plans/pricing-plans/introduction#wix-pricing-plans_pricing-plans_introduction_pricing-models)."
681
+ ).optional(),
682
+ type: z.enum(["UNDEFINED", "ONLINE", "OFFLINE", "EXTERNAL"]).describe("How the order was processed.").optional(),
683
+ status: z.enum([
682
684
  "UNDEFINED",
683
- "OWNER_ACTION",
684
- "MEMBER_ACTION",
685
- "PAYMENT_FAILURE",
686
- "PAYMENT_SETUP_FAILURE",
687
- "UNKNOWN"
688
- ]).describe("Reason for the cancellation.").optional(),
689
- effectiveAt: z.enum(["UNDEFINED", "IMMEDIATELY", "NEXT_PAYMENT_DATE"]).describe(
690
- "When the cancellation takes effect. Set when cancelling the order."
691
- ).optional()
692
- }).describe(
693
- "Details about the cancellation of an order.\n\nOnly present if the status is `CANCELED`."
694
- ).optional(),
695
- lastPaymentStatus: z.enum([
696
- "UNDEFINED",
697
- "PAID",
698
- "REFUNDED",
699
- "FAILED",
700
- "UNPAID",
701
- "PENDING",
702
- "NOT_APPLICABLE"
703
- ]).describe(
704
- "Status of the last payment for the order.\nUpdated automatically for online orders. Updated manually by the Wix user for offline orders."
705
- ).optional(),
706
- startDate: z.date().describe("Start date and time for the ordered plan.").optional().nullable(),
707
- endDate: z.date().describe(
708
- "Current end date and time for the ordered plan.\n\n`endDate` may be updated over the course of an order.\nIf the order is paused, it will have a later `endDate` once it is resumed.\n`endDate` may also be postponed.\n\nOmitted if the order is valid until canceled and still `ACTIVE`."
709
- ).optional().nullable(),
710
- pausePeriods: z.array(
711
- z.object({
712
- status: z.enum(["UNDEFINED", "ACTIVE", "ENDED"]).describe("Status of the pause period.").optional(),
713
- pauseDate: z.date().describe("Start date and time of the pause period.").optional().nullable(),
714
- resumeDate: z.date().describe(
715
- "End date and time of the pause period.\n\nOmitted while the pause period remains `ACTIVE`."
716
- ).optional().nullable()
717
- })
718
- ).optional(),
719
- freeTrialDays: z.number().int().describe(
720
- "Free trial period for the order, in days.\n\nOnly available for recurring plans."
721
- ).min(1).max(999).optional().nullable(),
722
- earliestEndDate: z.date().describe(
723
- "Earliest end date and time that the plan for the order can expire.\n\nCalculated by using the original end date plus any pause periods. Omitted if the order is active until canceled. Reserved for future use."
724
- ).optional().nullable(),
725
- currentCycle: z.object({
726
- index: z.number().int().describe(
727
- "Index of the current payment cycle in the order.\n\n`0` when order is in a free trial period. In all other cases, the index starts with `1`."
728
- ).min(0).optional(),
729
- startedDate: z.date().describe("Start date and time for the current payment cycle.").optional().nullable(),
730
- endedDate: z.date().describe("End date and time for the current payment cycle.").optional().nullable()
731
- }).describe(
732
- "Current payment cycle for the order.\n\n`currentCycle` will be omitted if the order's status is `CANCELED` or `ENDED`, or if the `startDate` hasn't passed yet."
733
- ).optional(),
734
- planName: z.string().describe("Plan name at the time of purchase.").optional(),
735
- planDescription: z.string().describe("Plan description at the time of purchase").optional(),
736
- planPrice: z.string().describe("Plan price as it was at the moment of order creation.").optional(),
737
- _createdDate: z.date().describe("Date and time the order was created.").optional().nullable(),
738
- _updatedDate: z.date().describe("Date and time the order was updated.").optional().nullable(),
739
- formData: z.object({
740
- formId: z.string().describe(
741
- "ID of the [order form](https://dev.wix.com/docs/rest/api-reference/wix-forms/form-submissions/introduction) associated with the plan at checkout."
742
- ).regex(
743
- /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
744
- "Must be a valid GUID"
685
+ "DRAFT",
686
+ "PENDING",
687
+ "ACTIVE",
688
+ "PAUSED",
689
+ "ENDED",
690
+ "CANCELED"
691
+ ]).describe("Status of the order.").optional(),
692
+ autoRenewCanceled: z.boolean().describe(
693
+ "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."
745
694
  ).optional().nullable(),
746
- submissionId: z.string().describe(
747
- "ID of a submission to the plan's order form at checkout. Every time a visitor completes the checkout process for a plan, a new submission is created."
748
- ).regex(
749
- /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
750
- "Must be a valid GUID"
695
+ cancellation: z.object({
696
+ requestedDate: z.date().describe("Date and time the cancellation was requested.").optional().nullable(),
697
+ cause: z.enum([
698
+ "UNDEFINED",
699
+ "OWNER_ACTION",
700
+ "MEMBER_ACTION",
701
+ "PAYMENT_FAILURE",
702
+ "PAYMENT_SETUP_FAILURE",
703
+ "UNKNOWN"
704
+ ]).describe("Reason for the cancellation.").optional(),
705
+ effectiveAt: z.enum(["UNDEFINED", "IMMEDIATELY", "NEXT_PAYMENT_DATE"]).describe(
706
+ "When the cancellation takes effect. Set when cancelling the order."
707
+ ).optional()
708
+ }).describe(
709
+ "Details about the cancellation of an order.\n\nOnly present if the status is `CANCELED`."
710
+ ).optional(),
711
+ lastPaymentStatus: z.enum([
712
+ "UNDEFINED",
713
+ "PAID",
714
+ "REFUNDED",
715
+ "FAILED",
716
+ "UNPAID",
717
+ "PENDING",
718
+ "NOT_APPLICABLE"
719
+ ]).describe(
720
+ "Status of the last payment for the order.\nUpdated automatically for online orders. Updated manually by the Wix user for offline orders."
721
+ ).optional(),
722
+ startDate: z.date().describe("Start date and time for the ordered plan.").optional().nullable(),
723
+ endDate: z.date().describe(
724
+ "Current end date and time for the ordered plan.\n\n`endDate` may be updated over the course of an order.\nIf the order is paused, it will have a later `endDate` once it is resumed.\n`endDate` may also be postponed.\n\nOmitted if the order is valid until canceled and still `ACTIVE`."
751
725
  ).optional().nullable(),
752
- submissionData: z.record(z.string(), z.any()).describe("Data submitted to the plan's order form at checkout.").optional()
726
+ pausePeriods: z.array(
727
+ z.object({
728
+ status: z.enum(["UNDEFINED", "ACTIVE", "ENDED"]).describe("Status of the pause period.").optional(),
729
+ pauseDate: z.date().describe("Start date and time of the pause period.").optional().nullable(),
730
+ resumeDate: z.date().describe(
731
+ "End date and time of the pause period.\n\nOmitted while the pause period remains `ACTIVE`."
732
+ ).optional().nullable()
733
+ })
734
+ ).optional(),
735
+ freeTrialDays: z.number().int().describe(
736
+ "Free trial period for the order, in days.\n\nOnly available for recurring plans."
737
+ ).min(1).max(999).optional().nullable(),
738
+ earliestEndDate: z.date().describe(
739
+ "Earliest end date and time that the plan for the order can expire.\n\nCalculated by using the original end date plus any pause periods. Omitted if the order is active until canceled. Reserved for future use."
740
+ ).optional().nullable(),
741
+ currentCycle: z.object({
742
+ index: z.number().int().describe(
743
+ "Index of the current payment cycle in the order.\n\n`0` when order is in a free trial period. In all other cases, the index starts with `1`."
744
+ ).min(0).optional(),
745
+ startedDate: z.date().describe("Start date and time for the current payment cycle.").optional().nullable(),
746
+ endedDate: z.date().describe("End date and time for the current payment cycle.").optional().nullable()
747
+ }).describe(
748
+ "Current payment cycle for the order.\n\n`currentCycle` will be omitted if the order's status is `CANCELED` or `ENDED`, or if the `startDate` hasn't passed yet."
749
+ ).optional(),
750
+ planName: z.string().describe("Plan name at the time of purchase.").optional(),
751
+ planDescription: z.string().describe("Plan description at the time of purchase").optional(),
752
+ planPrice: z.string().describe("Plan price as it was at the moment of order creation.").optional(),
753
+ _createdDate: z.date().describe("Date and time the order was created.").optional().nullable(),
754
+ _updatedDate: z.date().describe("Date and time the order was updated.").optional().nullable(),
755
+ formData: z.object({
756
+ formId: z.string().describe(
757
+ "ID of the [order form](https://dev.wix.com/docs/rest/api-reference/wix-forms/form-submissions/introduction) associated with the plan at checkout."
758
+ ).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
+ ).optional().nullable(),
762
+ submissionId: z.string().describe(
763
+ "ID of a submission to the plan's order form at checkout. Every time a visitor completes the checkout process for a plan, a new submission is created."
764
+ ).regex(
765
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
766
+ "Must be a valid GUID"
767
+ ).optional().nullable(),
768
+ submissionData: z.record(z.string(), z.any()).describe("Data submitted to the plan's order form at checkout.").optional()
769
+ }).describe(
770
+ "Information about the form submitted during the plan's checkout."
771
+ ).optional()
772
+ })
773
+ ).optional(),
774
+ pagingMetadata: z.object({
775
+ count: z.number().int().describe("Number of items returned in the response.").optional().nullable(),
776
+ offset: z.number().int().describe("Offset that was requested.").optional().nullable(),
777
+ total: z.number().int().describe(
778
+ "Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set."
779
+ ).optional().nullable(),
780
+ tooManyToCount: z.boolean().describe(
781
+ "Flag that indicates the server failed to calculate the `total` field."
782
+ ).optional().nullable(),
783
+ cursors: z.object({
784
+ next: z.string().describe(
785
+ "Cursor string pointing to the next page in the list of results."
786
+ ).max(16e3).optional().nullable(),
787
+ prev: z.string().describe(
788
+ "Cursor pointing to the previous page in the list of results."
789
+ ).max(16e3).optional().nullable()
753
790
  }).describe(
754
- "Information about the form submitted during the plan's checkout."
791
+ "Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used."
755
792
  ).optional()
756
- }).describe("Order.").optional()
793
+ }).describe(
794
+ "Object containing paging-related data (number of orders returned, offset)."
795
+ ).optional()
796
+ });
797
+ var PostponeEndDateRequest = /* @__PURE__ */ z.object({
798
+ _id: z.string().describe("Order ID.").regex(
799
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
800
+ "Must be a valid GUID"
801
+ ),
802
+ endDate: z.date().describe(
803
+ "New end date and time.\n\nMust be later than the current end date and time."
804
+ )
805
+ });
806
+ var PostponeEndDateResponse = /* @__PURE__ */ z.object({});
807
+ var CancelOrderRequest = /* @__PURE__ */ z.object({
808
+ _id: z.string().describe("Order ID.").regex(
809
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
810
+ "Must be a valid GUID"
811
+ ),
812
+ effectiveAt: z.enum(["UNDEFINED", "IMMEDIATELY", "NEXT_PAYMENT_DATE"])
813
+ });
814
+ var CancelOrderResponse = /* @__PURE__ */ z.object({});
815
+ var MarkAsPaidRequest = /* @__PURE__ */ z.object({
816
+ _id: z.string().describe("Order ID.").regex(
817
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
818
+ "Must be a valid GUID"
819
+ )
820
+ });
821
+ var MarkAsPaidResponse = /* @__PURE__ */ z.object({});
822
+ var PauseOrderRequest = /* @__PURE__ */ z.object({
823
+ _id: z.string().describe("Order ID.").regex(
824
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
825
+ "Must be a valid GUID"
826
+ )
827
+ });
828
+ var PauseOrderResponse = /* @__PURE__ */ z.object({});
829
+ var ResumeOrderRequest = /* @__PURE__ */ z.object({
830
+ _id: z.string().describe("Order ID.").regex(
831
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
832
+ "Must be a valid GUID"
833
+ )
757
834
  });
758
- var GetOnlineOrderPreviewRequest = z.object({
835
+ var ResumeOrderResponse = /* @__PURE__ */ z.object({});
836
+ var CreateOnlineOrderRequest = /* @__PURE__ */ z.object({
759
837
  planId: z.string().describe("Plan ID.").regex(
760
838
  /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
761
839
  "Must be a valid GUID"
762
840
  ),
763
841
  options: z.object({
764
842
  startDate: z.date().describe(
765
- "Start date and time for the plan of the order preview in a `YYYY-MM-DDThh:mm[:ss][.sss]Z` format.\n\nDefault: Current date and time."
843
+ "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."
766
844
  ).optional().nullable(),
767
- couponCode: z.string().describe("Coupon code to apply.").min(1).max(20).optional().nullable()
845
+ couponCode: z.string().describe("Coupon code to apply.").min(1).max(20).optional().nullable(),
846
+ onBehalf: z.object({
847
+ memberId: z.string().describe("Member ID.").regex(
848
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
849
+ "Must be a valid GUID"
850
+ ),
851
+ orderMethod: z.enum(["UNKNOWN", "MOTO", "POS"]).optional()
852
+ }).describe("Provided if checkout is initiated on buyer's behalf.").optional(),
853
+ submissionId: z.string().describe("Submission ID of the form submitted with this order.").regex(
854
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
855
+ "Must be a valid GUID"
856
+ ).optional().nullable()
768
857
  }).optional()
769
858
  });
770
- var GetOnlineOrderPreviewResponse = z.object({
859
+ var CreateOnlineOrderResponse = /* @__PURE__ */ z.object({
771
860
  order: z.object({
772
861
  _id: z.string().describe("Order ID.").regex(
773
862
  /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
@@ -1088,32 +1177,30 @@ var GetOnlineOrderPreviewResponse = z.object({
1088
1177
  }).describe(
1089
1178
  "Information about the form submitted during the plan's checkout."
1090
1179
  ).optional()
1091
- }).describe(
1092
- "Order preview. This field is undefined if the member has already reached the purchase limit for the order's plan."
1093
- ).optional(),
1094
- purchaseLimitExceeded: z.boolean().describe(
1095
- "Whether the member has already reached purchase limit for the order's plan."
1096
- ).optional()
1180
+ }).describe("Created online order.").optional()
1097
1181
  });
1098
- var GetOfflineOrderPreviewRequest = z.object({
1099
- planId: z.string().describe("ID of the plan of the previewed order.").regex(
1182
+ var CreateOfflineOrderRequest = /* @__PURE__ */ z.object({
1183
+ planId: z.string().describe("ID of the plan being ordered, from the Plans API.").regex(
1100
1184
  /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
1101
1185
  "Must be a valid GUID"
1102
1186
  ),
1103
- memberId: z.string().describe(
1104
- "Member ID of the buyer the previewed order is for, from the Members API."
1105
- ).regex(
1187
+ memberId: z.string().describe("ID of the member ordering the plan, from the Members API.").regex(
1106
1188
  /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
1107
1189
  "Must be a valid GUID"
1108
1190
  ),
1109
1191
  options: z.object({
1110
1192
  startDate: z.date().describe(
1111
- "Start date and time for plan of the previewed order in a `YYYY-MM-DDThh:mm[:ss][.sss]Z` format.\n\nDefault: Current date and time."
1193
+ "Start date and time for the ordered plan in a `YYYY-MM-DDThh:mm[:ss][.sss]Z` format.\n\nDefault: Current date and time."
1112
1194
  ).optional().nullable(),
1113
- couponCode: z.string().describe("Coupon code to apply, from the Coupons API.").min(1).max(20).optional().nullable()
1114
- }).describe("Options for previewing the offline order. ").optional()
1195
+ paid: z.boolean().describe("Whether the order is paid.\n\nDefault: `false`").optional().nullable(),
1196
+ couponCode: z.string().describe("Coupon code to apply, from the Coupons API.").min(1).max(20).optional().nullable(),
1197
+ submissionId: z.string().describe("Form submission ID that was submitted with the order.").regex(
1198
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
1199
+ "Must be a valid GUID"
1200
+ ).optional().nullable()
1201
+ }).describe("Options for creating an offline order. ").optional()
1115
1202
  });
1116
- var GetOfflineOrderPreviewResponse = z.object({
1203
+ var CreateOfflineOrderResponse = /* @__PURE__ */ z.object({
1117
1204
  order: z.object({
1118
1205
  _id: z.string().describe("Order ID.").regex(
1119
1206
  /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
@@ -1434,166 +1521,21 @@ var GetOfflineOrderPreviewResponse = z.object({
1434
1521
  }).describe(
1435
1522
  "Information about the form submitted during the plan's checkout."
1436
1523
  ).optional()
1437
- }).describe("The previewed order, as if the plan had been ordered.").optional(),
1438
- purchaseLimitExceeded: z.boolean().describe(
1439
- "Whether this previewed order would exceed the permitted amount of purchases available\nfor this plan for this buyer.\n\nAlways `false` for plans that do not have purchase limits."
1440
- ).optional()
1524
+ }).describe("Order.").optional()
1441
1525
  });
1442
- var GetPricePreviewRequest = z.object({
1443
- planId: z.string().describe("ID of plan to preview.").regex(
1526
+ var GetOnlineOrderPreviewRequest = /* @__PURE__ */ z.object({
1527
+ planId: z.string().describe("Plan ID.").regex(
1444
1528
  /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
1445
1529
  "Must be a valid GUID"
1446
1530
  ),
1447
1531
  options: z.object({
1448
- couponCode: z.string().describe("Coupon code to apply, from the Coupons API.").min(1).max(20).optional().nullable()
1449
- }).describe("Options for getting a price preview. ").optional()
1532
+ startDate: z.date().describe(
1533
+ "Start date and time for the plan of the order preview in a `YYYY-MM-DDThh:mm[:ss][.sss]Z` format.\n\nDefault: Current date and time."
1534
+ ).optional().nullable(),
1535
+ couponCode: z.string().describe("Coupon code to apply.").min(1).max(20).optional().nullable()
1536
+ }).optional()
1450
1537
  });
1451
- var GetPricePreviewResponse = z.object({
1452
- price: z.intersection(
1453
- z.object({
1454
- subtotal: z.string().describe(
1455
- 'Price of the order excluding tax, specified as a monetary amount. for example, `"9.99"`.'
1456
- ).optional(),
1457
- discount: z.string().describe("Total discount applied.").optional(),
1458
- tax: z.object({
1459
- name: z.string().describe("Name of the tax. For example, VAT.").optional(),
1460
- includedInPrice: z.boolean().describe(
1461
- "Whether tax is included in the original price. When `false`, tax is added at checkout."
1462
- ).optional(),
1463
- rate: z.string().describe(
1464
- 'Tax rate percentage, as a number between 0 and 100. For example, a 7% tax rate is `"7.00"`.'
1465
- ).optional(),
1466
- amount: z.string().describe(
1467
- 'Total tax, specified as a monetary amount. For example, `"3.99"`.'
1468
- ).optional()
1469
- }).describe("Tax applied.").optional(),
1470
- total: z.string().describe(
1471
- 'Price after tax and discount is applied, specified as a monetary amount. For example, `"13.98"`.\n\nIf no tax is applied, the amount is the same as `subtotal`.'
1472
- ).optional(),
1473
- planPrice: z.string().describe("Plan price as it was at the moment of order creation.").optional(),
1474
- currency: z.string().describe(
1475
- "Currency code. Must be valid ISO 4217 currency code (e.g., USD)."
1476
- ).optional(),
1477
- freeTrialDays: z.number().int().describe(
1478
- "Free trial period for the order in days. Only available for recurring plans."
1479
- ).min(1).max(999).optional().nullable(),
1480
- coupon: z.object({
1481
- code: z.string().describe("Code of the applied coupon.").min(1).max(20).optional(),
1482
- amount: z.string().describe("Total discount of the coupon, as a monetary amount.").optional(),
1483
- _id: z.string().describe("Coupon ID.").regex(
1484
- /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
1485
- "Must be a valid GUID"
1486
- ).optional()
1487
- }).describe(
1488
- "Coupon applied to the order. Empty means no coupon was applied."
1489
- ).optional()
1490
- }),
1491
- z.xor([
1492
- z.object({
1493
- subscription: z.never().optional(),
1494
- singlePaymentForDuration: z.never().optional(),
1495
- singlePaymentUnlimited: z.never().optional()
1496
- }),
1497
- z.object({
1498
- singlePaymentForDuration: z.never().optional(),
1499
- singlePaymentUnlimited: z.never().optional(),
1500
- subscription: z.object({
1501
- cycleDuration: z.object({
1502
- count: z.number().int().describe(
1503
- "Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`."
1504
- ).min(1).optional().nullable(),
1505
- unit: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
1506
- }).describe(
1507
- "Number of payment cycles the subscription is valid for.\n`0` for unlimited plans or for plans that are valid until canceled."
1508
- ).optional(),
1509
- cycleCount: z.number().int().describe(
1510
- "Length of a payment cycle. For example, 1 month to have monthly payments.\nMultiply `cycleDuration`'s `count` by `cycleCount` to get the subscription duration.\nCurrently, only a value of `1` is supported."
1511
- ).min(0).max(2e3).optional().nullable()
1512
- }).describe("Order has recurring payments.")
1513
- }),
1514
- z.object({
1515
- subscription: z.never().optional(),
1516
- singlePaymentUnlimited: z.never().optional(),
1517
- singlePaymentForDuration: z.object({
1518
- count: z.number().int().describe(
1519
- "Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`."
1520
- ).min(1).optional().nullable(),
1521
- unit: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
1522
- }).describe(
1523
- "One-time payment. Order is valid for a specified duration."
1524
- )
1525
- }),
1526
- z.object({
1527
- subscription: z.never().optional(),
1528
- singlePaymentForDuration: z.never().optional(),
1529
- singlePaymentUnlimited: z.boolean().describe("One-time payment. Order is valid until it is canceled.")
1530
- })
1531
- ])
1532
- ).describe(
1533
- "__Deprecated.__ Use `prices` instead. This property will be removed on September 30, 2022."
1534
- ).optional(),
1535
- prices: z.array(
1536
- z.object({
1537
- duration: z.object({
1538
- cycleFrom: z.number().int().describe(
1539
- "Price starts to apply with this cycle.\n\n`1` is the first payment cycle for all pricing models."
1540
- ).optional(),
1541
- numberOfCycles: z.number().int().describe(
1542
- "Amount of cycles to apply price for.\n\nFor `subscription` pricing models with a finite number of cycles, the `numberOfCycles` is the same as `pricing.subscription.cycleCount`.\n\nFor `subscription` pricing models that are unlimited or until-canceled, the `numberOfCycles` is not returned.\n\nFor `singlePaymentForDuration` and `singlePaymentUnlimited` pricing models, the `numberOfCycles` is `1`."
1543
- ).optional().nullable()
1544
- }).describe(
1545
- "Cycle duration to apply `price` for.\n\nUse with all pricing models.\nCan apply the same price to multiple payment cycles."
1546
- ).optional(),
1547
- price: z.object({
1548
- subtotal: z.string().describe(
1549
- 'Price of the order excluding tax, specified as a monetary amount. For example, `"9.99"`.'
1550
- ).optional(),
1551
- coupon: z.object({
1552
- code: z.string().describe("Code of the applied coupon.").min(1).max(20).optional(),
1553
- amount: z.string().describe(
1554
- "Total discount of the coupon, as a monetary amount."
1555
- ).optional(),
1556
- _id: z.string().describe("Coupon ID.").regex(
1557
- /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
1558
- "Must be a valid GUID"
1559
- ).optional()
1560
- }).describe("Coupon applied to the order, from the Coupons API.").optional(),
1561
- discount: z.string().describe("Total discount applied to the order.").optional(),
1562
- tax: z.object({
1563
- name: z.string().describe("Name of the tax. For example, VAT.").optional(),
1564
- includedInPrice: z.boolean().describe(
1565
- "Whether tax is included in the original price. When `false`, tax is added at checkout."
1566
- ).optional(),
1567
- rate: z.string().describe(
1568
- 'Tax rate percentage, as a number between 0 and 100. For example, a 7% tax rate is `"7.00"`.'
1569
- ).optional(),
1570
- amount: z.string().describe(
1571
- 'Total tax, specified as a monetary amount. For example, `"3.99"`.'
1572
- ).optional()
1573
- }).describe(
1574
- "Tax applied to the order.\n\nTax is only applied if the site [has it configured](https://support.wix.com/en/article/pricing-plans-setting-up-tax-collection)."
1575
- ).optional(),
1576
- total: z.string().describe(
1577
- 'Price after tax and discount is applied. Specified as a monetary amount, for example, `"13.98"`.\n\nIf no tax is applied, the amount is the same as `subtotal`.'
1578
- ).optional(),
1579
- currency: z.string().describe(
1580
- "Three-letter currency code in\n[ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format."
1581
- ).optional(),
1582
- proration: z.string().describe(
1583
- "Price change after billing date was change and price was adjusted. Could be positive and negative values."
1584
- ).optional()
1585
- }).describe("Order price.").optional()
1586
- })
1587
- ).optional()
1588
- });
1589
- var ManagementGetOrderRequest = z.object({
1590
- _id: z.string().describe("Order ID.").regex(
1591
- /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
1592
- "Must be a valid GUID"
1593
- ),
1594
- options: z.object({ fieldSet: z.enum(["UNKNOWN_SET", "BASIC", "FULL"]).optional() }).describe("Options to use when getting an order. ").optional()
1595
- });
1596
- var ManagementGetOrderResponse = z.object({
1538
+ var GetOnlineOrderPreviewResponse = /* @__PURE__ */ z.object({
1597
1539
  order: z.object({
1598
1540
  _id: z.string().describe("Order ID.").regex(
1599
1541
  /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
@@ -1914,454 +1856,512 @@ var ManagementGetOrderResponse = z.object({
1914
1856
  }).describe(
1915
1857
  "Information about the form submitted during the plan's checkout."
1916
1858
  ).optional()
1917
- }).describe("Order.").optional()
1859
+ }).describe(
1860
+ "Order preview. This field is undefined if the member has already reached the purchase limit for the order's plan."
1861
+ ).optional(),
1862
+ purchaseLimitExceeded: z.boolean().describe(
1863
+ "Whether the member has already reached purchase limit for the order's plan."
1864
+ ).optional()
1918
1865
  });
1919
- var ManagementListOrdersRequest = z.object({
1866
+ var GetOfflineOrderPreviewRequest = /* @__PURE__ */ z.object({
1867
+ planId: z.string().describe("ID of the plan of the previewed order.").regex(
1868
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
1869
+ "Must be a valid GUID"
1870
+ ),
1871
+ memberId: z.string().describe(
1872
+ "Member ID of the buyer the previewed order is for, from the Members API."
1873
+ ).regex(
1874
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
1875
+ "Must be a valid GUID"
1876
+ ),
1920
1877
  options: z.object({
1921
- buyerIds: z.array(z.string()).optional(),
1922
- planIds: z.array(z.string()).optional(),
1923
- autoRenewCanceled: z.boolean().describe(
1924
- "Filter by whether or not the auto-renewal of recurring orders was canceled."
1878
+ startDate: z.date().describe(
1879
+ "Start date and time for plan of the previewed order in a `YYYY-MM-DDThh:mm[:ss][.sss]Z` format.\n\nDefault: Current date and time."
1925
1880
  ).optional().nullable(),
1926
- orderStatuses: z.array(
1927
- z.enum([
1928
- "UNDEFINED",
1929
- "DRAFT",
1930
- "PENDING",
1931
- "ACTIVE",
1932
- "PAUSED",
1933
- "ENDED",
1934
- "CANCELED"
1935
- ])
1881
+ couponCode: z.string().describe("Coupon code to apply, from the Coupons API.").min(1).max(20).optional().nullable()
1882
+ }).describe("Options for previewing the offline order. ").optional()
1883
+ });
1884
+ var GetOfflineOrderPreviewResponse = /* @__PURE__ */ z.object({
1885
+ order: z.object({
1886
+ _id: z.string().describe("Order ID.").regex(
1887
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
1888
+ "Must be a valid GUID"
1936
1889
  ).optional(),
1937
- paymentStatuses: z.array(
1938
- z.enum([
1939
- "UNDEFINED",
1940
- "PAID",
1941
- "REFUNDED",
1942
- "FAILED",
1943
- "UNPAID",
1944
- "PENDING",
1945
- "NOT_APPLICABLE"
1946
- ])
1890
+ planId: z.string().describe(
1891
+ "ID of the plan purchased with the order, from the Plans API."
1892
+ ).regex(
1893
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
1894
+ "Must be a valid GUID"
1947
1895
  ).optional(),
1948
- limit: z.number().int().describe(
1949
- "Number of orders to return. See Sorting and Paging for more information.\n\nMax: `50`"
1950
- ).min(1).max(50).optional().nullable(),
1951
- offset: z.number().int().describe("Number of orders to skip in the current sort order.").min(0).optional().nullable(),
1952
- sorting: z.object({
1953
- fieldName: z.string().describe("Name of the field to sort by.").max(512).optional(),
1954
- order: z.enum(["ASC", "DESC"]).optional(),
1955
- origin: z.object({
1956
- latitude: z.number().describe("Address latitude.").optional().nullable(),
1957
- longitude: z.number().describe("Address longitude.").optional().nullable()
1958
- }).describe(
1959
- "Origin point for geo-distance sorting on a GEO field\nresults are ordered by distance from this point (ASC = nearest first, DESC = farthest first)."
1960
- ).optional()
1961
- }).describe(
1962
- "Sort order.\n\nUse `ASC` for ascending order or `DESC` for descending order.\n\nDefault: `DESC`."
1896
+ subscriptionId: z.string().describe(
1897
+ "ID of the related Wix subscription.\n\nEvery pricing plan order corresponds to a Wix subscription, including orders for single payment plans. Learn more in\na [Pricing Plans overview](https://support.wix.com/en/article/pricing-plans-an-overview#create-plans-to-suit-your-business)."
1898
+ ).regex(
1899
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
1900
+ "Must be a valid GUID"
1963
1901
  ).optional(),
1964
- fieldSet: z.enum(["UNKNOWN_SET", "BASIC", "FULL"]).optional()
1965
- }).describe("Filtering, sorting, and pagination options. ").optional()
1966
- });
1967
- var ManagementListOrdersResponse = z.object({
1968
- orders: z.array(
1969
- z.object({
1970
- _id: z.string().describe("Order ID.").regex(
1971
- /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
1972
- "Must be a valid GUID"
1973
- ).optional(),
1974
- planId: z.string().describe(
1975
- "ID of the plan purchased with the order, from the Plans API."
1976
- ).regex(
1977
- /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
1978
- "Must be a valid GUID"
1979
- ).optional(),
1980
- subscriptionId: z.string().describe(
1981
- "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)."
1982
- ).regex(
1902
+ wixPayOrderId: z.string().describe(
1903
+ "Wix Pay order ID.\n\nProvided by Wix whether the order is created online or offline. The field is omitted when the order is free."
1904
+ ).regex(
1905
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
1906
+ "Must be a valid GUID"
1907
+ ).optional().nullable(),
1908
+ buyer: z.object({
1909
+ memberId: z.string().describe("Member ID for a Wix site member, from the Members API.").regex(
1983
1910
  /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
1984
1911
  "Must be a valid GUID"
1985
1912
  ).optional(),
1986
- wixPayOrderId: z.string().describe(
1987
- "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."
1913
+ contactId: z.string().describe(
1914
+ "Contact ID for a Wix site contact, from the Contacts API."
1988
1915
  ).regex(
1989
1916
  /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
1990
1917
  "Must be a valid GUID"
1991
- ).optional().nullable(),
1992
- buyer: z.object({
1993
- memberId: z.string().describe(
1994
- "Member ID for a Wix site member, from the Members API."
1995
- ).regex(
1996
- /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
1997
- "Must be a valid GUID"
1918
+ ).optional()
1919
+ }).describe(
1920
+ "The buyer's IDs. Includes `memberId` and `contactId`.\n\nCurrently, Pricing Plan purchases are limited to members only. `contactId` is returned,\nbut a buyer will not be able to purchase a plan without a `memberId`."
1921
+ ).optional(),
1922
+ priceDetails: z.intersection(
1923
+ z.object({
1924
+ subtotal: z.string().describe(
1925
+ 'Price of the order excluding tax, specified as a monetary amount. for example, `"9.99"`.'
1998
1926
  ).optional(),
1999
- contactId: z.string().describe(
2000
- "Contact ID for a Wix site contact, from the Contacts API."
2001
- ).regex(
2002
- /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
2003
- "Must be a valid GUID"
2004
- ).optional()
2005
- }).describe(
2006
- "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`."
2007
- ).optional(),
2008
- priceDetails: z.intersection(
2009
- z.object({
2010
- subtotal: z.string().describe(
2011
- 'Price of the order excluding tax, specified as a monetary amount. for example, `"9.99"`.'
2012
- ).optional(),
2013
- discount: z.string().describe("Total discount applied.").optional(),
2014
- tax: z.object({
2015
- name: z.string().describe("Name of the tax. For example, VAT.").optional(),
2016
- includedInPrice: z.boolean().describe(
2017
- "Whether tax is included in the original price. When `false`, tax is added at checkout."
2018
- ).optional(),
2019
- rate: z.string().describe(
2020
- 'Tax rate percentage, as a number between 0 and 100. For example, a 7% tax rate is `"7.00"`.'
2021
- ).optional(),
2022
- amount: z.string().describe(
2023
- 'Total tax, specified as a monetary amount. For example, `"3.99"`.'
2024
- ).optional()
2025
- }).describe("Tax applied.").optional(),
2026
- total: z.string().describe(
2027
- '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`.'
1927
+ discount: z.string().describe("Total discount applied.").optional(),
1928
+ tax: z.object({
1929
+ name: z.string().describe("Name of the tax. For example, VAT.").optional(),
1930
+ includedInPrice: z.boolean().describe(
1931
+ "Whether tax is included in the original price. When `false`, tax is added at checkout."
2028
1932
  ).optional(),
2029
- planPrice: z.string().describe(
2030
- "Plan price as it was at the moment of order creation."
1933
+ rate: z.string().describe(
1934
+ 'Tax rate percentage, as a number between 0 and 100. For example, a 7% tax rate is `"7.00"`.'
2031
1935
  ).optional(),
2032
- currency: z.string().describe(
2033
- "Currency code. Must be valid ISO 4217 currency code (e.g., USD)."
1936
+ amount: z.string().describe(
1937
+ 'Total tax, specified as a monetary amount. For example, `"3.99"`.'
1938
+ ).optional()
1939
+ }).describe("Tax applied.").optional(),
1940
+ total: z.string().describe(
1941
+ 'Price after tax and discount is applied, specified as a monetary amount. For example, `"13.98"`.\n\nIf no tax is applied, the amount is the same as `subtotal`.'
1942
+ ).optional(),
1943
+ planPrice: z.string().describe("Plan price as it was at the moment of order creation.").optional(),
1944
+ currency: z.string().describe(
1945
+ "Currency code. Must be valid ISO 4217 currency code (e.g., USD)."
1946
+ ).optional(),
1947
+ freeTrialDays: z.number().int().describe(
1948
+ "Free trial period for the order in days. Only available for recurring plans."
1949
+ ).min(1).max(999).optional().nullable(),
1950
+ coupon: z.object({
1951
+ code: z.string().describe("Code of the applied coupon.").min(1).max(20).optional(),
1952
+ amount: z.string().describe(
1953
+ "Total discount of the coupon, as a monetary amount."
2034
1954
  ).optional(),
2035
- freeTrialDays: z.number().int().describe(
2036
- "Free trial period for the order in days. Only available for recurring plans."
2037
- ).min(1).max(999).optional().nullable(),
2038
- coupon: z.object({
2039
- code: z.string().describe("Code of the applied coupon.").min(1).max(20).optional(),
2040
- amount: z.string().describe(
2041
- "Total discount of the coupon, as a monetary amount."
2042
- ).optional(),
2043
- _id: z.string().describe("Coupon ID.").regex(
2044
- /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
2045
- "Must be a valid GUID"
2046
- ).optional()
2047
- }).describe(
2048
- "Coupon applied to the order. Empty means no coupon was applied."
1955
+ _id: z.string().describe("Coupon ID.").regex(
1956
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
1957
+ "Must be a valid GUID"
2049
1958
  ).optional()
1959
+ }).describe(
1960
+ "Coupon applied to the order. Empty means no coupon was applied."
1961
+ ).optional()
1962
+ }),
1963
+ z.xor([
1964
+ z.object({
1965
+ subscription: z.never().optional(),
1966
+ singlePaymentForDuration: z.never().optional(),
1967
+ singlePaymentUnlimited: z.never().optional()
2050
1968
  }),
2051
- z.xor([
2052
- z.object({
2053
- subscription: z.never().optional(),
2054
- singlePaymentForDuration: z.never().optional(),
2055
- singlePaymentUnlimited: z.never().optional()
2056
- }),
2057
- z.object({
2058
- singlePaymentForDuration: z.never().optional(),
2059
- singlePaymentUnlimited: z.never().optional(),
2060
- subscription: z.object({
2061
- cycleDuration: z.object({
2062
- count: z.number().int().describe(
2063
- "Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`."
2064
- ).min(1).optional().nullable(),
2065
- unit: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
2066
- }).describe(
2067
- "Number of payment cycles the subscription is valid for.\n`0` for unlimited plans or for plans that are valid until canceled."
2068
- ).optional(),
2069
- cycleCount: z.number().int().describe(
2070
- "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."
2071
- ).min(0).max(2e3).optional().nullable()
2072
- }).describe("Order has recurring payments.")
2073
- }),
2074
- z.object({
2075
- subscription: z.never().optional(),
2076
- singlePaymentUnlimited: z.never().optional(),
2077
- singlePaymentForDuration: z.object({
1969
+ z.object({
1970
+ singlePaymentForDuration: z.never().optional(),
1971
+ singlePaymentUnlimited: z.never().optional(),
1972
+ subscription: z.object({
1973
+ cycleDuration: z.object({
2078
1974
  count: z.number().int().describe(
2079
1975
  "Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`."
2080
1976
  ).min(1).optional().nullable(),
2081
1977
  unit: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
2082
1978
  }).describe(
2083
- "One-time payment. Order is valid for a specified duration."
2084
- )
2085
- }),
2086
- z.object({
2087
- subscription: z.never().optional(),
2088
- singlePaymentForDuration: z.never().optional(),
2089
- singlePaymentUnlimited: z.boolean().describe(
2090
- "One-time payment. Order is valid until it is canceled."
2091
- )
2092
- })
2093
- ])
2094
- ).describe(
2095
- "__Deprecated.__ Use `pricing` instead. This property will be removed on September 30, 2022."
2096
- ).optional(),
2097
- pricing: z.intersection(
1979
+ "Number of payment cycles the subscription is valid for.\n`0` for unlimited plans or for plans that are valid until canceled."
1980
+ ).optional(),
1981
+ cycleCount: z.number().int().describe(
1982
+ "Length of a payment cycle. For example, 1 month to have monthly payments.\nMultiply `cycleDuration`'s `count` by `cycleCount` to get the subscription duration.\nCurrently, only a value of `1` is supported."
1983
+ ).min(0).max(2e3).optional().nullable()
1984
+ }).describe("Order has recurring payments.")
1985
+ }),
2098
1986
  z.object({
2099
- prices: z.array(
2100
- z.object({
2101
- duration: z.object({
2102
- cycleFrom: z.number().int().describe(
2103
- "Price starts to apply with this cycle.\n\n`1` is the first payment cycle for all pricing models."
1987
+ subscription: z.never().optional(),
1988
+ singlePaymentUnlimited: z.never().optional(),
1989
+ singlePaymentForDuration: z.object({
1990
+ count: z.number().int().describe(
1991
+ "Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`."
1992
+ ).min(1).optional().nullable(),
1993
+ unit: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
1994
+ }).describe(
1995
+ "One-time payment. Order is valid for a specified duration."
1996
+ )
1997
+ }),
1998
+ z.object({
1999
+ subscription: z.never().optional(),
2000
+ singlePaymentForDuration: z.never().optional(),
2001
+ singlePaymentUnlimited: z.boolean().describe(
2002
+ "One-time payment. Order is valid until it is canceled."
2003
+ )
2004
+ })
2005
+ ])
2006
+ ).describe(
2007
+ "__Deprecated.__ Use `pricing` instead. This property will be removed on September 30, 2022."
2008
+ ).optional(),
2009
+ pricing: z.intersection(
2010
+ z.object({
2011
+ prices: z.array(
2012
+ z.object({
2013
+ duration: z.object({
2014
+ cycleFrom: z.number().int().describe(
2015
+ "Price starts to apply with this cycle.\n\n`1` is the first payment cycle for all pricing models."
2016
+ ).optional(),
2017
+ numberOfCycles: z.number().int().describe(
2018
+ "Amount of cycles to apply price for.\n\nFor `subscription` pricing models with a finite number of cycles, the `numberOfCycles` is the same as `pricing.subscription.cycleCount`.\n\nFor `subscription` pricing models that are unlimited or until-canceled, the `numberOfCycles` is not returned.\n\nFor `singlePaymentForDuration` and `singlePaymentUnlimited` pricing models, the `numberOfCycles` is `1`."
2019
+ ).optional().nullable()
2020
+ }).describe(
2021
+ "Cycle duration to apply `price` for.\n\nUse with all pricing models.\nCan apply the same price to multiple payment cycles."
2022
+ ).optional(),
2023
+ price: z.object({
2024
+ subtotal: z.string().describe(
2025
+ 'Price of the order excluding tax, specified as a monetary amount. For example, `"9.99"`.'
2026
+ ).optional(),
2027
+ coupon: z.object({
2028
+ code: z.string().describe("Code of the applied coupon.").min(1).max(20).optional(),
2029
+ amount: z.string().describe(
2030
+ "Total discount of the coupon, as a monetary amount."
2104
2031
  ).optional(),
2105
- numberOfCycles: z.number().int().describe(
2106
- "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`."
2107
- ).optional().nullable()
2032
+ _id: z.string().describe("Coupon ID.").regex(
2033
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
2034
+ "Must be a valid GUID"
2035
+ ).optional()
2108
2036
  }).describe(
2109
- "Cycle duration to apply `price` for.\n\nUse with all pricing models.\nCan apply the same price to multiple payment cycles."
2037
+ "Coupon applied to the order, from the Coupons API."
2110
2038
  ).optional(),
2111
- price: z.object({
2112
- subtotal: z.string().describe(
2113
- 'Price of the order excluding tax, specified as a monetary amount. For example, `"9.99"`.'
2114
- ).optional(),
2115
- coupon: z.object({
2116
- code: z.string().describe("Code of the applied coupon.").min(1).max(20).optional(),
2117
- amount: z.string().describe(
2118
- "Total discount of the coupon, as a monetary amount."
2119
- ).optional(),
2120
- _id: z.string().describe("Coupon ID.").regex(
2121
- /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
2122
- "Must be a valid GUID"
2123
- ).optional()
2124
- }).describe(
2125
- "Coupon applied to the order, from the Coupons API."
2126
- ).optional(),
2127
- discount: z.string().describe("Total discount applied to the order.").optional(),
2128
- tax: z.object({
2129
- name: z.string().describe("Name of the tax. For example, VAT.").optional(),
2130
- includedInPrice: z.boolean().describe(
2131
- "Whether tax is included in the original price. When `false`, tax is added at checkout."
2132
- ).optional(),
2133
- rate: z.string().describe(
2134
- 'Tax rate percentage, as a number between 0 and 100. For example, a 7% tax rate is `"7.00"`.'
2135
- ).optional(),
2136
- amount: z.string().describe(
2137
- 'Total tax, specified as a monetary amount. For example, `"3.99"`.'
2138
- ).optional()
2139
- }).describe(
2140
- "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)."
2141
- ).optional(),
2142
- total: z.string().describe(
2143
- '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`.'
2039
+ discount: z.string().describe("Total discount applied to the order.").optional(),
2040
+ tax: z.object({
2041
+ name: z.string().describe("Name of the tax. For example, VAT.").optional(),
2042
+ includedInPrice: z.boolean().describe(
2043
+ "Whether tax is included in the original price. When `false`, tax is added at checkout."
2144
2044
  ).optional(),
2145
- currency: z.string().describe(
2146
- "Three-letter currency code in\n[ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format."
2045
+ rate: z.string().describe(
2046
+ 'Tax rate percentage, as a number between 0 and 100. For example, a 7% tax rate is `"7.00"`.'
2147
2047
  ).optional(),
2148
- proration: z.string().describe(
2149
- "Price change after billing date was change and price was adjusted. Could be positive and negative values."
2048
+ amount: z.string().describe(
2049
+ 'Total tax, specified as a monetary amount. For example, `"3.99"`.'
2150
2050
  ).optional()
2151
- }).describe("Order price.").optional()
2152
- })
2153
- ).optional()
2154
- }),
2155
- z.xor([
2156
- z.object({
2157
- subscription: z.never().optional(),
2158
- singlePaymentForDuration: z.never().optional(),
2159
- singlePaymentUnlimited: z.never().optional()
2160
- }),
2161
- z.object({
2162
- singlePaymentForDuration: z.never().optional(),
2163
- singlePaymentUnlimited: z.never().optional(),
2164
- subscription: z.object({
2165
- cycleDuration: z.object({
2166
- count: z.number().int().describe(
2167
- "Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`."
2168
- ).min(1).optional().nullable(),
2169
- unit: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
2170
2051
  }).describe(
2171
- "Number of payment cycles the subscription is valid for.\n`0` for unlimited plans or for plans that are valid until canceled."
2052
+ "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)."
2172
2053
  ).optional(),
2173
- cycleCount: z.number().int().describe(
2174
- "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."
2175
- ).min(0).max(2e3).optional().nullable()
2176
- }).describe(
2177
- "Pricing model for an order with recurring payment cycles."
2178
- )
2179
- }),
2180
- z.object({
2181
- subscription: z.never().optional(),
2182
- singlePaymentUnlimited: z.never().optional(),
2183
- singlePaymentForDuration: z.object({
2054
+ total: z.string().describe(
2055
+ 'Price after tax and discount is applied. Specified as a monetary amount, for example, `"13.98"`.\n\nIf no tax is applied, the amount is the same as `subtotal`.'
2056
+ ).optional(),
2057
+ currency: z.string().describe(
2058
+ "Three-letter currency code in\n[ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format."
2059
+ ).optional(),
2060
+ proration: z.string().describe(
2061
+ "Price change after billing date was change and price was adjusted. Could be positive and negative values."
2062
+ ).optional()
2063
+ }).describe("Order price.").optional()
2064
+ })
2065
+ ).optional()
2066
+ }),
2067
+ z.xor([
2068
+ z.object({
2069
+ subscription: z.never().optional(),
2070
+ singlePaymentForDuration: z.never().optional(),
2071
+ singlePaymentUnlimited: z.never().optional()
2072
+ }),
2073
+ z.object({
2074
+ singlePaymentForDuration: z.never().optional(),
2075
+ singlePaymentUnlimited: z.never().optional(),
2076
+ subscription: z.object({
2077
+ cycleDuration: z.object({
2184
2078
  count: z.number().int().describe(
2185
2079
  "Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`."
2186
2080
  ).min(1).optional().nullable(),
2187
2081
  unit: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
2188
2082
  }).describe(
2189
- "Pricing model for an order with a one-time payment and the order is valid for a specific amount of time."
2190
- )
2191
- }),
2192
- z.object({
2193
- subscription: z.never().optional(),
2194
- singlePaymentForDuration: z.never().optional(),
2195
- singlePaymentUnlimited: z.boolean().describe(
2196
- "Pricing model for an order with a one-time payment and the order is valid until canceled."
2197
- )
2198
- })
2199
- ])
2200
- ).describe(
2201
- "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)."
2202
- ).optional(),
2203
- type: z.enum(["UNDEFINED", "ONLINE", "OFFLINE", "EXTERNAL"]).describe("How the order was processed.").optional(),
2204
- status: z.enum([
2205
- "UNDEFINED",
2206
- "DRAFT",
2207
- "PENDING",
2208
- "ACTIVE",
2209
- "PAUSED",
2210
- "ENDED",
2211
- "CANCELED"
2212
- ]).describe("Status of the order.").optional(),
2213
- autoRenewCanceled: z.boolean().describe(
2214
- "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."
2215
- ).optional().nullable(),
2216
- cancellation: z.object({
2217
- requestedDate: z.date().describe("Date and time the cancellation was requested.").optional().nullable(),
2218
- cause: z.enum([
2219
- "UNDEFINED",
2220
- "OWNER_ACTION",
2221
- "MEMBER_ACTION",
2222
- "PAYMENT_FAILURE",
2223
- "PAYMENT_SETUP_FAILURE",
2224
- "UNKNOWN"
2225
- ]).describe("Reason for the cancellation.").optional(),
2226
- effectiveAt: z.enum(["UNDEFINED", "IMMEDIATELY", "NEXT_PAYMENT_DATE"]).describe(
2227
- "When the cancellation takes effect. Set when cancelling the order."
2228
- ).optional()
2229
- }).describe(
2230
- "Details about the cancellation of an order.\n\nOnly present if the status is `CANCELED`."
2231
- ).optional(),
2232
- lastPaymentStatus: z.enum([
2233
- "UNDEFINED",
2234
- "PAID",
2235
- "REFUNDED",
2236
- "FAILED",
2237
- "UNPAID",
2238
- "PENDING",
2239
- "NOT_APPLICABLE"
2240
- ]).describe(
2241
- "Status of the last payment for the order.\nUpdated automatically for online orders. Updated manually by the Wix user for offline orders."
2242
- ).optional(),
2243
- startDate: z.date().describe("Start date and time for the ordered plan.").optional().nullable(),
2244
- endDate: z.date().describe(
2245
- "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`."
2246
- ).optional().nullable(),
2247
- pausePeriods: z.array(
2083
+ "Number of payment cycles the subscription is valid for.\n`0` for unlimited plans or for plans that are valid until canceled."
2084
+ ).optional(),
2085
+ cycleCount: z.number().int().describe(
2086
+ "Length of a payment cycle. For example, 1 month to have monthly payments.\nMultiply `cycleDuration`'s `count` by `cycleCount` to get the subscription duration.\nCurrently, only a value of `1` is supported."
2087
+ ).min(0).max(2e3).optional().nullable()
2088
+ }).describe(
2089
+ "Pricing model for an order with recurring payment cycles."
2090
+ )
2091
+ }),
2248
2092
  z.object({
2249
- status: z.enum(["UNDEFINED", "ACTIVE", "ENDED"]).describe("Status of the pause period.").optional(),
2250
- pauseDate: z.date().describe("Start date and time of the pause period.").optional().nullable(),
2251
- resumeDate: z.date().describe(
2252
- "End date and time of the pause period.\n\nOmitted while the pause period remains `ACTIVE`."
2253
- ).optional().nullable()
2093
+ subscription: z.never().optional(),
2094
+ singlePaymentUnlimited: z.never().optional(),
2095
+ singlePaymentForDuration: z.object({
2096
+ count: z.number().int().describe(
2097
+ "Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`."
2098
+ ).min(1).optional().nullable(),
2099
+ unit: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
2100
+ }).describe(
2101
+ "Pricing model for an order with a one-time payment and the order is valid for a specific amount of time."
2102
+ )
2103
+ }),
2104
+ z.object({
2105
+ subscription: z.never().optional(),
2106
+ singlePaymentForDuration: z.never().optional(),
2107
+ singlePaymentUnlimited: z.boolean().describe(
2108
+ "Pricing model for an order with a one-time payment and the order is valid until canceled."
2109
+ )
2254
2110
  })
2255
- ).optional(),
2256
- freeTrialDays: z.number().int().describe(
2257
- "Free trial period for the order, in days.\n\nOnly available for recurring plans."
2258
- ).min(1).max(999).optional().nullable(),
2259
- earliestEndDate: z.date().describe(
2260
- "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."
2261
- ).optional().nullable(),
2262
- currentCycle: z.object({
2263
- index: z.number().int().describe(
2264
- "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`."
2265
- ).min(0).optional(),
2266
- startedDate: z.date().describe("Start date and time for the current payment cycle.").optional().nullable(),
2267
- endedDate: z.date().describe("End date and time for the current payment cycle.").optional().nullable()
2268
- }).describe(
2269
- "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."
2270
- ).optional(),
2271
- planName: z.string().describe("Plan name at the time of purchase.").optional(),
2272
- planDescription: z.string().describe("Plan description at the time of purchase").optional(),
2273
- planPrice: z.string().describe("Plan price as it was at the moment of order creation.").optional(),
2274
- _createdDate: z.date().describe("Date and time the order was created.").optional().nullable(),
2275
- _updatedDate: z.date().describe("Date and time the order was updated.").optional().nullable(),
2276
- formData: z.object({
2277
- formId: z.string().describe(
2278
- "ID of the [order form](https://dev.wix.com/docs/rest/api-reference/wix-forms/form-submissions/introduction) associated with the plan at checkout."
2279
- ).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
- ).optional().nullable(),
2283
- submissionId: z.string().describe(
2284
- "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."
2285
- ).regex(
2286
- /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
2287
- "Must be a valid GUID"
2288
- ).optional().nullable(),
2289
- submissionData: z.record(z.string(), z.any()).describe("Data submitted to the plan's order form at checkout.").optional()
2290
- }).describe(
2291
- "Information about the form submitted during the plan's checkout."
2111
+ ])
2112
+ ).describe(
2113
+ "Order pricing model, price, and payment schedule.\n\nLearn more about [pricing models](https://dev.wix.com/api/rest/wix-pricing-plans/pricing-plans/introduction#wix-pricing-plans_pricing-plans_introduction_pricing-models)."
2114
+ ).optional(),
2115
+ type: z.enum(["UNDEFINED", "ONLINE", "OFFLINE", "EXTERNAL"]).describe("How the order was processed.").optional(),
2116
+ status: z.enum([
2117
+ "UNDEFINED",
2118
+ "DRAFT",
2119
+ "PENDING",
2120
+ "ACTIVE",
2121
+ "PAUSED",
2122
+ "ENDED",
2123
+ "CANCELED"
2124
+ ]).describe("Status of the order.").optional(),
2125
+ autoRenewCanceled: z.boolean().describe(
2126
+ "Whether the order will be canceled at the next payment date.\n\nIf `true`, the order status will be `CANCELED` and the next payment won't be charged. Omitted for single payment orders."
2127
+ ).optional().nullable(),
2128
+ cancellation: z.object({
2129
+ requestedDate: z.date().describe("Date and time the cancellation was requested.").optional().nullable(),
2130
+ cause: z.enum([
2131
+ "UNDEFINED",
2132
+ "OWNER_ACTION",
2133
+ "MEMBER_ACTION",
2134
+ "PAYMENT_FAILURE",
2135
+ "PAYMENT_SETUP_FAILURE",
2136
+ "UNKNOWN"
2137
+ ]).describe("Reason for the cancellation.").optional(),
2138
+ effectiveAt: z.enum(["UNDEFINED", "IMMEDIATELY", "NEXT_PAYMENT_DATE"]).describe(
2139
+ "When the cancellation takes effect. Set when cancelling the order."
2292
2140
  ).optional()
2293
- })
2294
- ).optional(),
2295
- pagingMetadata: z.object({
2296
- count: z.number().int().describe("Number of items returned in the response.").optional().nullable(),
2297
- offset: z.number().int().describe("Offset that was requested.").optional().nullable(),
2298
- total: z.number().int().describe(
2299
- "Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set."
2141
+ }).describe(
2142
+ "Details about the cancellation of an order.\n\nOnly present if the status is `CANCELED`."
2143
+ ).optional(),
2144
+ lastPaymentStatus: z.enum([
2145
+ "UNDEFINED",
2146
+ "PAID",
2147
+ "REFUNDED",
2148
+ "FAILED",
2149
+ "UNPAID",
2150
+ "PENDING",
2151
+ "NOT_APPLICABLE"
2152
+ ]).describe(
2153
+ "Status of the last payment for the order.\nUpdated automatically for online orders. Updated manually by the Wix user for offline orders."
2154
+ ).optional(),
2155
+ startDate: z.date().describe("Start date and time for the ordered plan.").optional().nullable(),
2156
+ endDate: z.date().describe(
2157
+ "Current end date and time for the ordered plan.\n\n`endDate` may be updated over the course of an order.\nIf the order is paused, it will have a later `endDate` once it is resumed.\n`endDate` may also be postponed.\n\nOmitted if the order is valid until canceled and still `ACTIVE`."
2300
2158
  ).optional().nullable(),
2301
- tooManyToCount: z.boolean().describe(
2302
- "Flag that indicates the server failed to calculate the `total` field."
2159
+ pausePeriods: z.array(
2160
+ z.object({
2161
+ status: z.enum(["UNDEFINED", "ACTIVE", "ENDED"]).describe("Status of the pause period.").optional(),
2162
+ pauseDate: z.date().describe("Start date and time of the pause period.").optional().nullable(),
2163
+ resumeDate: z.date().describe(
2164
+ "End date and time of the pause period.\n\nOmitted while the pause period remains `ACTIVE`."
2165
+ ).optional().nullable()
2166
+ })
2167
+ ).optional(),
2168
+ freeTrialDays: z.number().int().describe(
2169
+ "Free trial period for the order, in days.\n\nOnly available for recurring plans."
2170
+ ).min(1).max(999).optional().nullable(),
2171
+ earliestEndDate: z.date().describe(
2172
+ "Earliest end date and time that the plan for the order can expire.\n\nCalculated by using the original end date plus any pause periods. Omitted if the order is active until canceled. Reserved for future use."
2303
2173
  ).optional().nullable(),
2304
- cursors: z.object({
2305
- next: z.string().describe(
2306
- "Cursor string pointing to the next page in the list of results."
2307
- ).max(16e3).optional().nullable(),
2308
- prev: z.string().describe(
2309
- "Cursor pointing to the previous page in the list of results."
2310
- ).max(16e3).optional().nullable()
2174
+ currentCycle: z.object({
2175
+ index: z.number().int().describe(
2176
+ "Index of the current payment cycle in the order.\n\n`0` when order is in a free trial period. In all other cases, the index starts with `1`."
2177
+ ).min(0).optional(),
2178
+ startedDate: z.date().describe("Start date and time for the current payment cycle.").optional().nullable(),
2179
+ endedDate: z.date().describe("End date and time for the current payment cycle.").optional().nullable()
2311
2180
  }).describe(
2312
- "Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used."
2181
+ "Current payment cycle for the order.\n\n`currentCycle` will be omitted if the order's status is `CANCELED` or `ENDED`, or if the `startDate` hasn't passed yet."
2182
+ ).optional(),
2183
+ planName: z.string().describe("Plan name at the time of purchase.").optional(),
2184
+ planDescription: z.string().describe("Plan description at the time of purchase").optional(),
2185
+ planPrice: z.string().describe("Plan price as it was at the moment of order creation.").optional(),
2186
+ _createdDate: z.date().describe("Date and time the order was created.").optional().nullable(),
2187
+ _updatedDate: z.date().describe("Date and time the order was updated.").optional().nullable(),
2188
+ formData: z.object({
2189
+ formId: z.string().describe(
2190
+ "ID of the [order form](https://dev.wix.com/docs/rest/api-reference/wix-forms/form-submissions/introduction) associated with the plan at checkout."
2191
+ ).regex(
2192
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
2193
+ "Must be a valid GUID"
2194
+ ).optional().nullable(),
2195
+ submissionId: z.string().describe(
2196
+ "ID of a submission to the plan's order form at checkout. Every time a visitor completes the checkout process for a plan, a new submission is created."
2197
+ ).regex(
2198
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
2199
+ "Must be a valid GUID"
2200
+ ).optional().nullable(),
2201
+ submissionData: z.record(z.string(), z.any()).describe("Data submitted to the plan's order form at checkout.").optional()
2202
+ }).describe(
2203
+ "Information about the form submitted during the plan's checkout."
2313
2204
  ).optional()
2314
- }).describe(
2315
- "Object containing paging-related data (number of orders returned, offset)."
2205
+ }).describe("The previewed order, as if the plan had been ordered.").optional(),
2206
+ purchaseLimitExceeded: z.boolean().describe(
2207
+ "Whether this previewed order would exceed the permitted amount of purchases available\nfor this plan for this buyer.\n\nAlways `false` for plans that do not have purchase limits."
2316
2208
  ).optional()
2317
2209
  });
2318
- var PostponeEndDateRequest = z.object({
2319
- _id: z.string().describe("Order ID.").regex(
2320
- /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
2321
- "Must be a valid GUID"
2322
- ),
2323
- endDate: z.date().describe(
2324
- "New end date and time.\n\nMust be later than the current end date and time."
2325
- )
2326
- });
2327
- var PostponeEndDateResponse = z.object({});
2328
- var CancelOrderRequest = z.object({
2329
- _id: z.string().describe("Order ID.").regex(
2210
+ var GetPricePreviewRequest = /* @__PURE__ */ z.object({
2211
+ planId: z.string().describe("ID of plan to preview.").regex(
2330
2212
  /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
2331
2213
  "Must be a valid GUID"
2332
2214
  ),
2333
- effectiveAt: z.enum(["UNDEFINED", "IMMEDIATELY", "NEXT_PAYMENT_DATE"])
2334
- });
2335
- var CancelOrderResponse = z.object({});
2336
- var MarkAsPaidRequest = z.object({
2337
- _id: z.string().describe("Order ID.").regex(
2338
- /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
2339
- "Must be a valid GUID"
2340
- )
2341
- });
2342
- var MarkAsPaidResponse = z.object({});
2343
- var PauseOrderRequest = z.object({
2344
- _id: z.string().describe("Order ID.").regex(
2345
- /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
2346
- "Must be a valid GUID"
2347
- )
2215
+ options: z.object({
2216
+ couponCode: z.string().describe("Coupon code to apply, from the Coupons API.").min(1).max(20).optional().nullable()
2217
+ }).describe("Options for getting a price preview. ").optional()
2348
2218
  });
2349
- var PauseOrderResponse = z.object({});
2350
- var ResumeOrderRequest = z.object({
2351
- _id: z.string().describe("Order ID.").regex(
2352
- /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
2353
- "Must be a valid GUID"
2354
- )
2219
+ var GetPricePreviewResponse = /* @__PURE__ */ z.object({
2220
+ price: z.intersection(
2221
+ z.object({
2222
+ subtotal: z.string().describe(
2223
+ 'Price of the order excluding tax, specified as a monetary amount. for example, `"9.99"`.'
2224
+ ).optional(),
2225
+ discount: z.string().describe("Total discount applied.").optional(),
2226
+ tax: z.object({
2227
+ name: z.string().describe("Name of the tax. For example, VAT.").optional(),
2228
+ includedInPrice: z.boolean().describe(
2229
+ "Whether tax is included in the original price. When `false`, tax is added at checkout."
2230
+ ).optional(),
2231
+ rate: z.string().describe(
2232
+ 'Tax rate percentage, as a number between 0 and 100. For example, a 7% tax rate is `"7.00"`.'
2233
+ ).optional(),
2234
+ amount: z.string().describe(
2235
+ 'Total tax, specified as a monetary amount. For example, `"3.99"`.'
2236
+ ).optional()
2237
+ }).describe("Tax applied.").optional(),
2238
+ total: z.string().describe(
2239
+ 'Price after tax and discount is applied, specified as a monetary amount. For example, `"13.98"`.\n\nIf no tax is applied, the amount is the same as `subtotal`.'
2240
+ ).optional(),
2241
+ planPrice: z.string().describe("Plan price as it was at the moment of order creation.").optional(),
2242
+ currency: z.string().describe(
2243
+ "Currency code. Must be valid ISO 4217 currency code (e.g., USD)."
2244
+ ).optional(),
2245
+ freeTrialDays: z.number().int().describe(
2246
+ "Free trial period for the order in days. Only available for recurring plans."
2247
+ ).min(1).max(999).optional().nullable(),
2248
+ coupon: z.object({
2249
+ code: z.string().describe("Code of the applied coupon.").min(1).max(20).optional(),
2250
+ amount: z.string().describe("Total discount of the coupon, as a monetary amount.").optional(),
2251
+ _id: z.string().describe("Coupon ID.").regex(
2252
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
2253
+ "Must be a valid GUID"
2254
+ ).optional()
2255
+ }).describe(
2256
+ "Coupon applied to the order. Empty means no coupon was applied."
2257
+ ).optional()
2258
+ }),
2259
+ z.xor([
2260
+ z.object({
2261
+ subscription: z.never().optional(),
2262
+ singlePaymentForDuration: z.never().optional(),
2263
+ singlePaymentUnlimited: z.never().optional()
2264
+ }),
2265
+ z.object({
2266
+ singlePaymentForDuration: z.never().optional(),
2267
+ singlePaymentUnlimited: z.never().optional(),
2268
+ subscription: z.object({
2269
+ cycleDuration: z.object({
2270
+ count: z.number().int().describe(
2271
+ "Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`."
2272
+ ).min(1).optional().nullable(),
2273
+ unit: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
2274
+ }).describe(
2275
+ "Number of payment cycles the subscription is valid for.\n`0` for unlimited plans or for plans that are valid until canceled."
2276
+ ).optional(),
2277
+ cycleCount: z.number().int().describe(
2278
+ "Length of a payment cycle. For example, 1 month to have monthly payments.\nMultiply `cycleDuration`'s `count` by `cycleCount` to get the subscription duration.\nCurrently, only a value of `1` is supported."
2279
+ ).min(0).max(2e3).optional().nullable()
2280
+ }).describe("Order has recurring payments.")
2281
+ }),
2282
+ z.object({
2283
+ subscription: z.never().optional(),
2284
+ singlePaymentUnlimited: z.never().optional(),
2285
+ singlePaymentForDuration: z.object({
2286
+ count: z.number().int().describe(
2287
+ "Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`."
2288
+ ).min(1).optional().nullable(),
2289
+ unit: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Unit of time for the cycle duration.").optional()
2290
+ }).describe(
2291
+ "One-time payment. Order is valid for a specified duration."
2292
+ )
2293
+ }),
2294
+ z.object({
2295
+ subscription: z.never().optional(),
2296
+ singlePaymentForDuration: z.never().optional(),
2297
+ singlePaymentUnlimited: z.boolean().describe("One-time payment. Order is valid until it is canceled.")
2298
+ })
2299
+ ])
2300
+ ).describe(
2301
+ "__Deprecated.__ Use `prices` instead. This property will be removed on September 30, 2022."
2302
+ ).optional(),
2303
+ prices: z.array(
2304
+ z.object({
2305
+ duration: z.object({
2306
+ cycleFrom: z.number().int().describe(
2307
+ "Price starts to apply with this cycle.\n\n`1` is the first payment cycle for all pricing models."
2308
+ ).optional(),
2309
+ numberOfCycles: z.number().int().describe(
2310
+ "Amount of cycles to apply price for.\n\nFor `subscription` pricing models with a finite number of cycles, the `numberOfCycles` is the same as `pricing.subscription.cycleCount`.\n\nFor `subscription` pricing models that are unlimited or until-canceled, the `numberOfCycles` is not returned.\n\nFor `singlePaymentForDuration` and `singlePaymentUnlimited` pricing models, the `numberOfCycles` is `1`."
2311
+ ).optional().nullable()
2312
+ }).describe(
2313
+ "Cycle duration to apply `price` for.\n\nUse with all pricing models.\nCan apply the same price to multiple payment cycles."
2314
+ ).optional(),
2315
+ price: z.object({
2316
+ subtotal: z.string().describe(
2317
+ 'Price of the order excluding tax, specified as a monetary amount. For example, `"9.99"`.'
2318
+ ).optional(),
2319
+ coupon: z.object({
2320
+ code: z.string().describe("Code of the applied coupon.").min(1).max(20).optional(),
2321
+ amount: z.string().describe(
2322
+ "Total discount of the coupon, as a monetary amount."
2323
+ ).optional(),
2324
+ _id: z.string().describe("Coupon ID.").regex(
2325
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
2326
+ "Must be a valid GUID"
2327
+ ).optional()
2328
+ }).describe("Coupon applied to the order, from the Coupons API.").optional(),
2329
+ discount: z.string().describe("Total discount applied to the order.").optional(),
2330
+ tax: z.object({
2331
+ name: z.string().describe("Name of the tax. For example, VAT.").optional(),
2332
+ includedInPrice: z.boolean().describe(
2333
+ "Whether tax is included in the original price. When `false`, tax is added at checkout."
2334
+ ).optional(),
2335
+ rate: z.string().describe(
2336
+ 'Tax rate percentage, as a number between 0 and 100. For example, a 7% tax rate is `"7.00"`.'
2337
+ ).optional(),
2338
+ amount: z.string().describe(
2339
+ 'Total tax, specified as a monetary amount. For example, `"3.99"`.'
2340
+ ).optional()
2341
+ }).describe(
2342
+ "Tax applied to the order.\n\nTax is only applied if the site [has it configured](https://support.wix.com/en/article/pricing-plans-setting-up-tax-collection)."
2343
+ ).optional(),
2344
+ total: z.string().describe(
2345
+ 'Price after tax and discount is applied. Specified as a monetary amount, for example, `"13.98"`.\n\nIf no tax is applied, the amount is the same as `subtotal`.'
2346
+ ).optional(),
2347
+ currency: z.string().describe(
2348
+ "Three-letter currency code in\n[ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format."
2349
+ ).optional(),
2350
+ proration: z.string().describe(
2351
+ "Price change after billing date was change and price was adjusted. Could be positive and negative values."
2352
+ ).optional()
2353
+ }).describe("Order price.").optional()
2354
+ })
2355
+ ).optional()
2355
2356
  });
2356
- var ResumeOrderResponse = z.object({});
2357
- var MemberGetOrderRequest = z.object({
2357
+ var MemberGetOrderRequest = /* @__PURE__ */ z.object({
2358
2358
  _id: z.string().describe("Order ID.").regex(
2359
2359
  /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
2360
2360
  "Must be a valid GUID"
2361
2361
  ),
2362
2362
  options: z.object({ fieldSet: z.enum(["UNKNOWN_SET", "BASIC", "FULL"]).optional() }).describe("Options for getting a logged-in member's order. ").optional()
2363
2363
  });
2364
- var MemberGetOrderResponse = z.object({
2364
+ var MemberGetOrderResponse = /* @__PURE__ */ z.object({
2365
2365
  _id: z.string().describe("Order ID.").regex(
2366
2366
  /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
2367
2367
  "Must be a valid GUID"
@@ -2674,7 +2674,7 @@ var MemberGetOrderResponse = z.object({
2674
2674
  "Information about the form submitted during the plan's checkout."
2675
2675
  ).optional()
2676
2676
  });
2677
- var MemberListOrdersRequest = z.object({
2677
+ var MemberListOrdersRequest = /* @__PURE__ */ z.object({
2678
2678
  options: z.object({
2679
2679
  planIds: z.array(z.string()).optional(),
2680
2680
  autoRenewCanceled: z.boolean().describe("Filter for orders where auto renewal was canceled.").optional().nullable(),
@@ -2717,7 +2717,7 @@ var MemberListOrdersRequest = z.object({
2717
2717
  fieldSet: z.enum(["UNKNOWN_SET", "BASIC", "FULL"]).optional()
2718
2718
  }).describe("Filtering, sorting, and pagination options. ").optional()
2719
2719
  });
2720
- var MemberListOrdersResponse = z.object({
2720
+ var MemberListOrdersResponse = /* @__PURE__ */ z.object({
2721
2721
  orders: z.array(
2722
2722
  z.object({
2723
2723
  _id: z.string().describe("Order ID.").regex(
@@ -3068,14 +3068,14 @@ var MemberListOrdersResponse = z.object({
3068
3068
  "Object containing paging-related data (number of orders returned, offset)."
3069
3069
  ).optional()
3070
3070
  });
3071
- var RequestCancellationRequest = z.object({
3071
+ var RequestCancellationRequest = /* @__PURE__ */ z.object({
3072
3072
  _id: z.string().describe("Order ID.").regex(
3073
3073
  /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
3074
3074
  "Must be a valid GUID"
3075
3075
  ),
3076
3076
  effectiveAt: z.enum(["UNDEFINED", "IMMEDIATELY", "NEXT_PAYMENT_DATE"])
3077
3077
  });
3078
- var RequestCancellationResponse = z.object({});
3078
+ var RequestCancellationResponse = /* @__PURE__ */ z.object({});
3079
3079
  // Annotate the CommonJS export names for ESM import in node:
3080
3080
  0 && (module.exports = {
3081
3081
  CancelOrderRequest,