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