@wix/auto_sdk_ecom_order-payment-requests 1.0.59 → 1.0.61
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 +52 -18
- package/build/cjs/index.js +164 -0
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +269 -69
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +49 -37
- package/build/cjs/meta.js.map +1 -1
- package/build/cjs/schemas.js +125 -127
- package/build/cjs/schemas.js.map +1 -1
- package/build/es/index.d.mts +52 -18
- package/build/es/index.mjs +158 -0
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +269 -69
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +49 -37
- package/build/es/meta.mjs.map +1 -1
- package/build/es/schemas.mjs +125 -127
- package/build/es/schemas.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +54 -20
- package/build/internal/cjs/index.js +164 -0
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +278 -80
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +49 -37
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/cjs/schemas.js +125 -127
- package/build/internal/cjs/schemas.js.map +1 -1
- package/build/internal/es/index.d.mts +54 -20
- package/build/internal/es/index.mjs +158 -0
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +278 -80
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +49 -37
- package/build/internal/es/meta.mjs.map +1 -1
- package/build/internal/es/schemas.mjs +125 -127
- package/build/internal/es/schemas.mjs.map +1 -1
- package/package.json +2 -2
|
@@ -8,15 +8,17 @@ var CreateOrderPaymentRequestRequest = z.object({
|
|
|
8
8
|
"Must be a valid GUID"
|
|
9
9
|
).optional().nullable(),
|
|
10
10
|
source: z.object({
|
|
11
|
-
appId: z.string().describe(
|
|
11
|
+
appId: z.string().describe(
|
|
12
|
+
"ID of the app that created the order payment request."
|
|
13
|
+
).regex(
|
|
12
14
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
13
15
|
"Must be a valid GUID"
|
|
14
16
|
).min(1).max(100).optional().nullable(),
|
|
15
17
|
externalId: z.string().describe(
|
|
16
|
-
"Reference to
|
|
18
|
+
"Reference to a record in the source system. For example, if the payment request was created from a paylink or invoice, use this field to store the paylink ID or invoice ID."
|
|
17
19
|
).min(1).max(100).optional()
|
|
18
20
|
}).describe(
|
|
19
|
-
"
|
|
21
|
+
"Details about the source that created the order payment request."
|
|
20
22
|
).optional(),
|
|
21
23
|
status: z.enum(["UNPAID", "PAID", "EXPIRED"]).optional(),
|
|
22
24
|
orderId: z.string().describe("Order ID.").regex(
|
|
@@ -28,33 +30,35 @@ var CreateOrderPaymentRequestRequest = z.object({
|
|
|
28
30
|
amount: z.string().describe("Amount.").optional(),
|
|
29
31
|
formattedAmount: z.string().describe("Amount formatted with currency symbol.").optional()
|
|
30
32
|
}).describe(
|
|
31
|
-
"Amount to collect
|
|
33
|
+
"Amount to collect. Set when the order payment request is created and can't be changed afterward."
|
|
32
34
|
),
|
|
33
35
|
currency: z.string().describe(
|
|
34
|
-
"
|
|
36
|
+
"Three-letter currency code in [ISO-4217 alphabetic format](http://en.wikipedia.org/wiki/ISO_4217). Always matches the order's currency."
|
|
35
37
|
).optional(),
|
|
36
38
|
paymentGatewayOrderId: z.string().describe(
|
|
37
|
-
"Payment gateway order
|
|
39
|
+
"Payment gateway order ID associated with this payment request."
|
|
38
40
|
).min(1).max(100).optional().nullable(),
|
|
39
|
-
title: z.string().describe(
|
|
40
|
-
"Title to be displayed to the customer on the payment page. Provide a clear and descriptive title to inform the customer about what they are paying for."
|
|
41
|
-
).min(1).max(200),
|
|
41
|
+
title: z.string().describe("Title displayed to the customer on the payment page.").min(1).max(200),
|
|
42
42
|
description: z.string().describe(
|
|
43
|
-
"Description
|
|
43
|
+
"Description displayed to the customer on the payment page."
|
|
44
44
|
).max(300).optional().nullable(),
|
|
45
|
-
expirationDate: z.date().describe(
|
|
45
|
+
expirationDate: z.date().describe(
|
|
46
|
+
"Date and time the order payment request expires. If not provided, the order payment request doesn't expire."
|
|
47
|
+
).optional().nullable(),
|
|
46
48
|
extendedFields: z.object({
|
|
47
49
|
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
48
50
|
"Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\nThe value of each key is structured according to the schema defined when the extended fields were configured.\n\nYou can only access fields for which you have the appropriate permissions.\n\nLearn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields)."
|
|
49
51
|
).optional()
|
|
50
52
|
}).describe(
|
|
51
|
-
"[Extended fields](https://dev.wix.com/docs/
|
|
53
|
+
"Custom field data for this order payment request.\n\n[Extended fields](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/schema-plugins/about-schema-plugin-extensions) must be configured in the app dashboard before they can be accessed with API calls."
|
|
52
54
|
).optional(),
|
|
53
|
-
_createdDate: z.date().describe("Date and time the
|
|
54
|
-
_updatedDate: z.date().describe(
|
|
55
|
+
_createdDate: z.date().describe("Date and time the order payment request was created.").optional().nullable(),
|
|
56
|
+
_updatedDate: z.date().describe(
|
|
57
|
+
"Date and time the order payment request was last updated."
|
|
58
|
+
).optional().nullable(),
|
|
55
59
|
image: z.string().describe("Image to display to the customer on the payment page.").optional(),
|
|
56
60
|
blockedPaymentMethods: z.array(z.enum(["MANUAL"])).max(1).optional()
|
|
57
|
-
}).describe("
|
|
61
|
+
}).describe("Order payment request to create.").optional()
|
|
58
62
|
}).optional()
|
|
59
63
|
});
|
|
60
64
|
var CreateOrderPaymentRequestResponse = z.object({
|
|
@@ -63,17 +67,19 @@ var CreateOrderPaymentRequestResponse = z.object({
|
|
|
63
67
|
"Must be a valid GUID"
|
|
64
68
|
).optional().nullable(),
|
|
65
69
|
source: z.object({
|
|
66
|
-
appId: z.string().describe("
|
|
70
|
+
appId: z.string().describe("ID of the app that created the order payment request.").regex(
|
|
67
71
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
68
72
|
"Must be a valid GUID"
|
|
69
73
|
).min(1).max(100).optional().nullable(),
|
|
70
74
|
externalId: z.string().describe(
|
|
71
|
-
"Reference to
|
|
75
|
+
"Reference to a record in the source system. For example, if the payment request was created from a paylink or invoice, use this field to store the paylink ID or invoice ID."
|
|
72
76
|
).min(1).max(100).optional()
|
|
73
77
|
}).describe(
|
|
74
|
-
"
|
|
78
|
+
"Details about the source that created the order payment request."
|
|
79
|
+
).optional(),
|
|
80
|
+
status: z.enum(["UNPAID", "PAID", "EXPIRED"]).describe(
|
|
81
|
+
"Payment request status. Set by the system. A new order payment request starts as `UNPAID`, unless `expirationDate` is already in the past at creation time, in which case it is created as `EXPIRED`. The system sets the status to `PAID` once payment is collected, `EXPIRED` when the expiration date passes, or `VOIDED` when the request is voided."
|
|
75
82
|
).optional(),
|
|
76
|
-
status: z.enum(["UNPAID", "PAID", "EXPIRED"]).describe("status.").optional(),
|
|
77
83
|
orderId: z.string().describe("Order ID.").regex(
|
|
78
84
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
79
85
|
"Must be a valid GUID"
|
|
@@ -83,35 +89,31 @@ var CreateOrderPaymentRequestResponse = z.object({
|
|
|
83
89
|
amount: z.string().describe("Amount.").optional(),
|
|
84
90
|
formattedAmount: z.string().describe("Amount formatted with currency symbol.").optional()
|
|
85
91
|
}).describe(
|
|
86
|
-
"Amount to collect
|
|
92
|
+
"Amount to collect. Set when the order payment request is created and can't be changed afterward."
|
|
87
93
|
).optional(),
|
|
88
94
|
currency: z.string().describe(
|
|
89
|
-
"
|
|
95
|
+
"Three-letter currency code in [ISO-4217 alphabetic format](http://en.wikipedia.org/wiki/ISO_4217). Always matches the order's currency."
|
|
90
96
|
).optional(),
|
|
91
|
-
paymentGatewayOrderId: z.string().describe(
|
|
92
|
-
|
|
93
|
-
).
|
|
94
|
-
|
|
95
|
-
"
|
|
96
|
-
).
|
|
97
|
-
description: z.string().describe(
|
|
98
|
-
"Description to be displayed to the customer on the payment page. Write a detailed description so the customer understands what they are paying for."
|
|
99
|
-
).max(300).optional().nullable(),
|
|
100
|
-
expirationDate: z.date().describe("Time and date the order payment request expires.").optional().nullable(),
|
|
97
|
+
paymentGatewayOrderId: z.string().describe("Payment gateway order ID associated with this payment request.").min(1).max(100).optional().nullable(),
|
|
98
|
+
title: z.string().describe("Title displayed to the customer on the payment page.").min(1).max(200).optional(),
|
|
99
|
+
description: z.string().describe("Description displayed to the customer on the payment page.").max(300).optional().nullable(),
|
|
100
|
+
expirationDate: z.date().describe(
|
|
101
|
+
"Date and time the order payment request expires. If not provided, the order payment request doesn't expire."
|
|
102
|
+
).optional().nullable(),
|
|
101
103
|
extendedFields: z.object({
|
|
102
104
|
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
103
105
|
"Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\nThe value of each key is structured according to the schema defined when the extended fields were configured.\n\nYou can only access fields for which you have the appropriate permissions.\n\nLearn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields)."
|
|
104
106
|
).optional()
|
|
105
107
|
}).describe(
|
|
106
|
-
"[Extended fields](https://dev.wix.com/docs/
|
|
108
|
+
"Custom field data for this order payment request.\n\n[Extended fields](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/schema-plugins/about-schema-plugin-extensions) must be configured in the app dashboard before they can be accessed with API calls."
|
|
107
109
|
).optional(),
|
|
108
|
-
_createdDate: z.date().describe("Date and time the
|
|
109
|
-
_updatedDate: z.date().describe("Date and time the
|
|
110
|
+
_createdDate: z.date().describe("Date and time the order payment request was created.").optional().nullable(),
|
|
111
|
+
_updatedDate: z.date().describe("Date and time the order payment request was last updated.").optional().nullable(),
|
|
110
112
|
image: z.string().describe("Image to display to the customer on the payment page.").optional(),
|
|
111
113
|
blockedPaymentMethods: z.array(z.enum(["MANUAL"])).max(1).optional()
|
|
112
114
|
});
|
|
113
115
|
var GetOrderPaymentRequestRequest = z.object({
|
|
114
|
-
orderPaymentRequestId: z.string().describe("ID of the
|
|
116
|
+
orderPaymentRequestId: z.string().describe("ID of the order payment request to retrieve.").regex(
|
|
115
117
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
116
118
|
"Must be a valid GUID"
|
|
117
119
|
)
|
|
@@ -122,17 +124,19 @@ var GetOrderPaymentRequestResponse = z.object({
|
|
|
122
124
|
"Must be a valid GUID"
|
|
123
125
|
).optional().nullable(),
|
|
124
126
|
source: z.object({
|
|
125
|
-
appId: z.string().describe("
|
|
127
|
+
appId: z.string().describe("ID of the app that created the order payment request.").regex(
|
|
126
128
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
127
129
|
"Must be a valid GUID"
|
|
128
130
|
).min(1).max(100).optional().nullable(),
|
|
129
131
|
externalId: z.string().describe(
|
|
130
|
-
"Reference to
|
|
132
|
+
"Reference to a record in the source system. For example, if the payment request was created from a paylink or invoice, use this field to store the paylink ID or invoice ID."
|
|
131
133
|
).min(1).max(100).optional()
|
|
132
134
|
}).describe(
|
|
133
|
-
"
|
|
135
|
+
"Details about the source that created the order payment request."
|
|
136
|
+
).optional(),
|
|
137
|
+
status: z.enum(["UNPAID", "PAID", "EXPIRED"]).describe(
|
|
138
|
+
"Payment request status. Set by the system. A new order payment request starts as `UNPAID`, unless `expirationDate` is already in the past at creation time, in which case it is created as `EXPIRED`. The system sets the status to `PAID` once payment is collected, `EXPIRED` when the expiration date passes, or `VOIDED` when the request is voided."
|
|
134
139
|
).optional(),
|
|
135
|
-
status: z.enum(["UNPAID", "PAID", "EXPIRED"]).describe("status.").optional(),
|
|
136
140
|
orderId: z.string().describe("Order ID.").regex(
|
|
137
141
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
138
142
|
"Must be a valid GUID"
|
|
@@ -142,30 +146,26 @@ var GetOrderPaymentRequestResponse = z.object({
|
|
|
142
146
|
amount: z.string().describe("Amount.").optional(),
|
|
143
147
|
formattedAmount: z.string().describe("Amount formatted with currency symbol.").optional()
|
|
144
148
|
}).describe(
|
|
145
|
-
"Amount to collect
|
|
149
|
+
"Amount to collect. Set when the order payment request is created and can't be changed afterward."
|
|
146
150
|
).optional(),
|
|
147
151
|
currency: z.string().describe(
|
|
148
|
-
"
|
|
152
|
+
"Three-letter currency code in [ISO-4217 alphabetic format](http://en.wikipedia.org/wiki/ISO_4217). Always matches the order's currency."
|
|
149
153
|
).optional(),
|
|
150
|
-
paymentGatewayOrderId: z.string().describe(
|
|
151
|
-
|
|
152
|
-
).
|
|
153
|
-
|
|
154
|
-
"
|
|
155
|
-
).
|
|
156
|
-
description: z.string().describe(
|
|
157
|
-
"Description to be displayed to the customer on the payment page. Write a detailed description so the customer understands what they are paying for."
|
|
158
|
-
).max(300).optional().nullable(),
|
|
159
|
-
expirationDate: z.date().describe("Time and date the order payment request expires.").optional().nullable(),
|
|
154
|
+
paymentGatewayOrderId: z.string().describe("Payment gateway order ID associated with this payment request.").min(1).max(100).optional().nullable(),
|
|
155
|
+
title: z.string().describe("Title displayed to the customer on the payment page.").min(1).max(200).optional(),
|
|
156
|
+
description: z.string().describe("Description displayed to the customer on the payment page.").max(300).optional().nullable(),
|
|
157
|
+
expirationDate: z.date().describe(
|
|
158
|
+
"Date and time the order payment request expires. If not provided, the order payment request doesn't expire."
|
|
159
|
+
).optional().nullable(),
|
|
160
160
|
extendedFields: z.object({
|
|
161
161
|
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
162
162
|
"Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\nThe value of each key is structured according to the schema defined when the extended fields were configured.\n\nYou can only access fields for which you have the appropriate permissions.\n\nLearn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields)."
|
|
163
163
|
).optional()
|
|
164
164
|
}).describe(
|
|
165
|
-
"[Extended fields](https://dev.wix.com/docs/
|
|
165
|
+
"Custom field data for this order payment request.\n\n[Extended fields](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/schema-plugins/about-schema-plugin-extensions) must be configured in the app dashboard before they can be accessed with API calls."
|
|
166
166
|
).optional(),
|
|
167
|
-
_createdDate: z.date().describe("Date and time the
|
|
168
|
-
_updatedDate: z.date().describe("Date and time the
|
|
167
|
+
_createdDate: z.date().describe("Date and time the order payment request was created.").optional().nullable(),
|
|
168
|
+
_updatedDate: z.date().describe("Date and time the order payment request was last updated.").optional().nullable(),
|
|
169
169
|
image: z.string().describe("Image to display to the customer on the payment page.").optional(),
|
|
170
170
|
blockedPaymentMethods: z.array(z.enum(["MANUAL"])).max(1).optional()
|
|
171
171
|
});
|
|
@@ -180,15 +180,15 @@ var UpdateOrderPaymentRequestRequest = z.object({
|
|
|
180
180
|
"Must be a valid GUID"
|
|
181
181
|
).optional().nullable(),
|
|
182
182
|
source: z.object({
|
|
183
|
-
appId: z.string().describe("
|
|
183
|
+
appId: z.string().describe("ID of the app that created the order payment request.").regex(
|
|
184
184
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
185
185
|
"Must be a valid GUID"
|
|
186
186
|
).min(1).max(100).optional().nullable(),
|
|
187
187
|
externalId: z.string().describe(
|
|
188
|
-
"Reference to
|
|
188
|
+
"Reference to a record in the source system. For example, if the payment request was created from a paylink or invoice, use this field to store the paylink ID or invoice ID."
|
|
189
189
|
).min(1).max(100).optional()
|
|
190
190
|
}).describe(
|
|
191
|
-
"
|
|
191
|
+
"Details about the source that created the order payment request."
|
|
192
192
|
).optional(),
|
|
193
193
|
status: z.enum(["UNPAID", "PAID", "EXPIRED"]).optional(),
|
|
194
194
|
orderId: z.string().describe("Order ID.").regex(
|
|
@@ -200,33 +200,31 @@ var UpdateOrderPaymentRequestRequest = z.object({
|
|
|
200
200
|
amount: z.string().describe("Amount.").optional(),
|
|
201
201
|
formattedAmount: z.string().describe("Amount formatted with currency symbol.").optional()
|
|
202
202
|
}).describe(
|
|
203
|
-
"Amount to collect
|
|
203
|
+
"Amount to collect. Set when the order payment request is created and can't be changed afterward."
|
|
204
204
|
).optional(),
|
|
205
205
|
currency: z.string().describe(
|
|
206
|
-
"
|
|
206
|
+
"Three-letter currency code in [ISO-4217 alphabetic format](http://en.wikipedia.org/wiki/ISO_4217). Always matches the order's currency."
|
|
207
207
|
).optional(),
|
|
208
208
|
paymentGatewayOrderId: z.string().describe(
|
|
209
|
-
"Payment gateway order
|
|
209
|
+
"Payment gateway order ID associated with this payment request."
|
|
210
210
|
).min(1).max(100).optional().nullable(),
|
|
211
|
-
title: z.string().describe(
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
).max(300).optional().nullable(),
|
|
217
|
-
expirationDate: z.date().describe("Time and date the order payment request expires.").optional().nullable(),
|
|
211
|
+
title: z.string().describe("Title displayed to the customer on the payment page.").min(1).max(200).optional(),
|
|
212
|
+
description: z.string().describe("Description displayed to the customer on the payment page.").max(300).optional().nullable(),
|
|
213
|
+
expirationDate: z.date().describe(
|
|
214
|
+
"Date and time the order payment request expires. If not provided, the order payment request doesn't expire."
|
|
215
|
+
).optional().nullable(),
|
|
218
216
|
extendedFields: z.object({
|
|
219
217
|
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
220
218
|
"Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\nThe value of each key is structured according to the schema defined when the extended fields were configured.\n\nYou can only access fields for which you have the appropriate permissions.\n\nLearn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields)."
|
|
221
219
|
).optional()
|
|
222
220
|
}).describe(
|
|
223
|
-
"[Extended fields](https://dev.wix.com/docs/
|
|
221
|
+
"Custom field data for this order payment request.\n\n[Extended fields](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/schema-plugins/about-schema-plugin-extensions) must be configured in the app dashboard before they can be accessed with API calls."
|
|
224
222
|
).optional(),
|
|
225
|
-
_createdDate: z.date().describe("Date and time the
|
|
226
|
-
_updatedDate: z.date().describe("Date and time the
|
|
223
|
+
_createdDate: z.date().describe("Date and time the order payment request was created.").optional().nullable(),
|
|
224
|
+
_updatedDate: z.date().describe("Date and time the order payment request was last updated.").optional().nullable(),
|
|
227
225
|
image: z.string().describe("Image to display to the customer on the payment page.").optional(),
|
|
228
226
|
blockedPaymentMethods: z.array(z.enum(["MANUAL"])).max(1).optional()
|
|
229
|
-
}).describe("
|
|
227
|
+
}).describe("Order payment request to update.")
|
|
230
228
|
});
|
|
231
229
|
var UpdateOrderPaymentRequestResponse = z.object({
|
|
232
230
|
_id: z.string().describe("Order payment request ID.").regex(
|
|
@@ -234,17 +232,19 @@ var UpdateOrderPaymentRequestResponse = z.object({
|
|
|
234
232
|
"Must be a valid GUID"
|
|
235
233
|
).optional().nullable(),
|
|
236
234
|
source: z.object({
|
|
237
|
-
appId: z.string().describe("
|
|
235
|
+
appId: z.string().describe("ID of the app that created the order payment request.").regex(
|
|
238
236
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
239
237
|
"Must be a valid GUID"
|
|
240
238
|
).min(1).max(100).optional().nullable(),
|
|
241
239
|
externalId: z.string().describe(
|
|
242
|
-
"Reference to
|
|
240
|
+
"Reference to a record in the source system. For example, if the payment request was created from a paylink or invoice, use this field to store the paylink ID or invoice ID."
|
|
243
241
|
).min(1).max(100).optional()
|
|
244
242
|
}).describe(
|
|
245
|
-
"
|
|
243
|
+
"Details about the source that created the order payment request."
|
|
244
|
+
).optional(),
|
|
245
|
+
status: z.enum(["UNPAID", "PAID", "EXPIRED"]).describe(
|
|
246
|
+
"Payment request status. Set by the system. A new order payment request starts as `UNPAID`, unless `expirationDate` is already in the past at creation time, in which case it is created as `EXPIRED`. The system sets the status to `PAID` once payment is collected, `EXPIRED` when the expiration date passes, or `VOIDED` when the request is voided."
|
|
246
247
|
).optional(),
|
|
247
|
-
status: z.enum(["UNPAID", "PAID", "EXPIRED"]).describe("status.").optional(),
|
|
248
248
|
orderId: z.string().describe("Order ID.").regex(
|
|
249
249
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
250
250
|
"Must be a valid GUID"
|
|
@@ -254,35 +254,31 @@ var UpdateOrderPaymentRequestResponse = z.object({
|
|
|
254
254
|
amount: z.string().describe("Amount.").optional(),
|
|
255
255
|
formattedAmount: z.string().describe("Amount formatted with currency symbol.").optional()
|
|
256
256
|
}).describe(
|
|
257
|
-
"Amount to collect
|
|
257
|
+
"Amount to collect. Set when the order payment request is created and can't be changed afterward."
|
|
258
258
|
).optional(),
|
|
259
259
|
currency: z.string().describe(
|
|
260
|
-
"
|
|
260
|
+
"Three-letter currency code in [ISO-4217 alphabetic format](http://en.wikipedia.org/wiki/ISO_4217). Always matches the order's currency."
|
|
261
261
|
).optional(),
|
|
262
|
-
paymentGatewayOrderId: z.string().describe(
|
|
263
|
-
|
|
264
|
-
).
|
|
265
|
-
|
|
266
|
-
"
|
|
267
|
-
).
|
|
268
|
-
description: z.string().describe(
|
|
269
|
-
"Description to be displayed to the customer on the payment page. Write a detailed description so the customer understands what they are paying for."
|
|
270
|
-
).max(300).optional().nullable(),
|
|
271
|
-
expirationDate: z.date().describe("Time and date the order payment request expires.").optional().nullable(),
|
|
262
|
+
paymentGatewayOrderId: z.string().describe("Payment gateway order ID associated with this payment request.").min(1).max(100).optional().nullable(),
|
|
263
|
+
title: z.string().describe("Title displayed to the customer on the payment page.").min(1).max(200).optional(),
|
|
264
|
+
description: z.string().describe("Description displayed to the customer on the payment page.").max(300).optional().nullable(),
|
|
265
|
+
expirationDate: z.date().describe(
|
|
266
|
+
"Date and time the order payment request expires. If not provided, the order payment request doesn't expire."
|
|
267
|
+
).optional().nullable(),
|
|
272
268
|
extendedFields: z.object({
|
|
273
269
|
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
274
270
|
"Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\nThe value of each key is structured according to the schema defined when the extended fields were configured.\n\nYou can only access fields for which you have the appropriate permissions.\n\nLearn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields)."
|
|
275
271
|
).optional()
|
|
276
272
|
}).describe(
|
|
277
|
-
"[Extended fields](https://dev.wix.com/docs/
|
|
273
|
+
"Custom field data for this order payment request.\n\n[Extended fields](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/schema-plugins/about-schema-plugin-extensions) must be configured in the app dashboard before they can be accessed with API calls."
|
|
278
274
|
).optional(),
|
|
279
|
-
_createdDate: z.date().describe("Date and time the
|
|
280
|
-
_updatedDate: z.date().describe("Date and time the
|
|
275
|
+
_createdDate: z.date().describe("Date and time the order payment request was created.").optional().nullable(),
|
|
276
|
+
_updatedDate: z.date().describe("Date and time the order payment request was last updated.").optional().nullable(),
|
|
281
277
|
image: z.string().describe("Image to display to the customer on the payment page.").optional(),
|
|
282
278
|
blockedPaymentMethods: z.array(z.enum(["MANUAL"])).max(1).optional()
|
|
283
279
|
});
|
|
284
280
|
var DeleteOrderPaymentRequestRequest = z.object({
|
|
285
|
-
orderPaymentRequestId: z.string().describe("
|
|
281
|
+
orderPaymentRequestId: z.string().describe("ID of the order payment request to delete.").regex(
|
|
286
282
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
287
283
|
"Must be a valid GUID"
|
|
288
284
|
)
|
|
@@ -324,17 +320,19 @@ var QueryOrderPaymentRequestsResponse = z.object({
|
|
|
324
320
|
"Must be a valid GUID"
|
|
325
321
|
).optional().nullable(),
|
|
326
322
|
source: z.object({
|
|
327
|
-
appId: z.string().describe("
|
|
323
|
+
appId: z.string().describe("ID of the app that created the order payment request.").regex(
|
|
328
324
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
329
325
|
"Must be a valid GUID"
|
|
330
326
|
).min(1).max(100).optional().nullable(),
|
|
331
327
|
externalId: z.string().describe(
|
|
332
|
-
"Reference to
|
|
328
|
+
"Reference to a record in the source system. For example, if the payment request was created from a paylink or invoice, use this field to store the paylink ID or invoice ID."
|
|
333
329
|
).min(1).max(100).optional()
|
|
334
330
|
}).describe(
|
|
335
|
-
"
|
|
331
|
+
"Details about the source that created the order payment request."
|
|
332
|
+
).optional(),
|
|
333
|
+
status: z.enum(["UNPAID", "PAID", "EXPIRED"]).describe(
|
|
334
|
+
"Payment request status. Set by the system. A new order payment request starts as `UNPAID`, unless `expirationDate` is already in the past at creation time, in which case it is created as `EXPIRED`. The system sets the status to `PAID` once payment is collected, `EXPIRED` when the expiration date passes, or `VOIDED` when the request is voided."
|
|
336
335
|
).optional(),
|
|
337
|
-
status: z.enum(["UNPAID", "PAID", "EXPIRED"]).describe("status.").optional(),
|
|
338
336
|
orderId: z.string().describe("Order ID.").regex(
|
|
339
337
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
340
338
|
"Must be a valid GUID"
|
|
@@ -344,30 +342,30 @@ var QueryOrderPaymentRequestsResponse = z.object({
|
|
|
344
342
|
amount: z.string().describe("Amount.").optional(),
|
|
345
343
|
formattedAmount: z.string().describe("Amount formatted with currency symbol.").optional()
|
|
346
344
|
}).describe(
|
|
347
|
-
"Amount to collect
|
|
345
|
+
"Amount to collect. Set when the order payment request is created and can't be changed afterward."
|
|
348
346
|
).optional(),
|
|
349
347
|
currency: z.string().describe(
|
|
350
|
-
"
|
|
348
|
+
"Three-letter currency code in [ISO-4217 alphabetic format](http://en.wikipedia.org/wiki/ISO_4217). Always matches the order's currency."
|
|
351
349
|
).optional(),
|
|
352
350
|
paymentGatewayOrderId: z.string().describe(
|
|
353
|
-
"Payment gateway order
|
|
351
|
+
"Payment gateway order ID associated with this payment request."
|
|
354
352
|
).min(1).max(100).optional().nullable(),
|
|
355
|
-
title: z.string().describe(
|
|
356
|
-
"Title to be displayed to the customer on the payment page. Provide a clear and descriptive title to inform the customer about what they are paying for."
|
|
357
|
-
).min(1).max(200).optional(),
|
|
353
|
+
title: z.string().describe("Title displayed to the customer on the payment page.").min(1).max(200).optional(),
|
|
358
354
|
description: z.string().describe(
|
|
359
|
-
"Description
|
|
355
|
+
"Description displayed to the customer on the payment page."
|
|
360
356
|
).max(300).optional().nullable(),
|
|
361
|
-
expirationDate: z.date().describe(
|
|
357
|
+
expirationDate: z.date().describe(
|
|
358
|
+
"Date and time the order payment request expires. If not provided, the order payment request doesn't expire."
|
|
359
|
+
).optional().nullable(),
|
|
362
360
|
extendedFields: z.object({
|
|
363
361
|
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
364
362
|
"Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\nThe value of each key is structured according to the schema defined when the extended fields were configured.\n\nYou can only access fields for which you have the appropriate permissions.\n\nLearn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields)."
|
|
365
363
|
).optional()
|
|
366
364
|
}).describe(
|
|
367
|
-
"[Extended fields](https://dev.wix.com/docs/
|
|
365
|
+
"Custom field data for this order payment request.\n\n[Extended fields](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/schema-plugins/about-schema-plugin-extensions) must be configured in the app dashboard before they can be accessed with API calls."
|
|
368
366
|
).optional(),
|
|
369
|
-
_createdDate: z.date().describe("Date and time the
|
|
370
|
-
_updatedDate: z.date().describe("Date and time the
|
|
367
|
+
_createdDate: z.date().describe("Date and time the order payment request was created.").optional().nullable(),
|
|
368
|
+
_updatedDate: z.date().describe("Date and time the order payment request was last updated.").optional().nullable(),
|
|
371
369
|
image: z.string().describe("Image to display to the customer on the payment page.").optional(),
|
|
372
370
|
blockedPaymentMethods: z.array(z.enum(["MANUAL"])).max(1).optional()
|
|
373
371
|
})
|
|
@@ -387,16 +385,16 @@ var QueryOrderPaymentRequestsResponse = z.object({
|
|
|
387
385
|
hasNext: z.boolean().describe(
|
|
388
386
|
"Whether there are more pages to retrieve following the current page.\n\n+ `true`: Another page of results can be retrieved.\n+ `false`: This is the last page."
|
|
389
387
|
).optional().nullable()
|
|
390
|
-
}).describe("Paging metadata").optional()
|
|
388
|
+
}).describe("Paging metadata.").optional()
|
|
391
389
|
});
|
|
392
390
|
var GetOrderPaymentRequestUrlRequest = z.object({
|
|
393
|
-
orderPaymentRequestId: z.string().describe("
|
|
391
|
+
orderPaymentRequestId: z.string().describe("ID of the order payment request.").regex(
|
|
394
392
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
395
393
|
"Must be a valid GUID"
|
|
396
394
|
)
|
|
397
395
|
});
|
|
398
396
|
var GetOrderPaymentRequestUrlResponse = z.object({
|
|
399
|
-
orderPaymentRequestUrl: z.string().describe("
|
|
397
|
+
orderPaymentRequestUrl: z.string().describe("Payment page URL for the order payment request.").min(1).max(100).optional()
|
|
400
398
|
});
|
|
401
399
|
var UpdateExtendedFieldsRequest = z.object({
|
|
402
400
|
_id: z.string().describe("ID of the entity to update."),
|
|
@@ -416,17 +414,19 @@ var UpdateExtendedFieldsResponse = z.object({
|
|
|
416
414
|
"Must be a valid GUID"
|
|
417
415
|
).optional().nullable(),
|
|
418
416
|
source: z.object({
|
|
419
|
-
appId: z.string().describe("
|
|
417
|
+
appId: z.string().describe("ID of the app that created the order payment request.").regex(
|
|
420
418
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
421
419
|
"Must be a valid GUID"
|
|
422
420
|
).min(1).max(100).optional().nullable(),
|
|
423
421
|
externalId: z.string().describe(
|
|
424
|
-
"Reference to
|
|
422
|
+
"Reference to a record in the source system. For example, if the payment request was created from a paylink or invoice, use this field to store the paylink ID or invoice ID."
|
|
425
423
|
).min(1).max(100).optional()
|
|
426
424
|
}).describe(
|
|
427
|
-
"
|
|
425
|
+
"Details about the source that created the order payment request."
|
|
426
|
+
).optional(),
|
|
427
|
+
status: z.enum(["UNPAID", "PAID", "EXPIRED"]).describe(
|
|
428
|
+
"Payment request status. Set by the system. A new order payment request starts as `UNPAID`, unless `expirationDate` is already in the past at creation time, in which case it is created as `EXPIRED`. The system sets the status to `PAID` once payment is collected, `EXPIRED` when the expiration date passes, or `VOIDED` when the request is voided."
|
|
428
429
|
).optional(),
|
|
429
|
-
status: z.enum(["UNPAID", "PAID", "EXPIRED"]).describe("status.").optional(),
|
|
430
430
|
orderId: z.string().describe("Order ID.").regex(
|
|
431
431
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
432
432
|
"Must be a valid GUID"
|
|
@@ -436,33 +436,31 @@ var UpdateExtendedFieldsResponse = z.object({
|
|
|
436
436
|
amount: z.string().describe("Amount.").optional(),
|
|
437
437
|
formattedAmount: z.string().describe("Amount formatted with currency symbol.").optional()
|
|
438
438
|
}).describe(
|
|
439
|
-
"Amount to collect
|
|
439
|
+
"Amount to collect. Set when the order payment request is created and can't be changed afterward."
|
|
440
440
|
).optional(),
|
|
441
441
|
currency: z.string().describe(
|
|
442
|
-
"
|
|
442
|
+
"Three-letter currency code in [ISO-4217 alphabetic format](http://en.wikipedia.org/wiki/ISO_4217). Always matches the order's currency."
|
|
443
443
|
).optional(),
|
|
444
444
|
paymentGatewayOrderId: z.string().describe(
|
|
445
|
-
"Payment gateway order
|
|
445
|
+
"Payment gateway order ID associated with this payment request."
|
|
446
446
|
).min(1).max(100).optional().nullable(),
|
|
447
|
-
title: z.string().describe(
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
).max(300).optional().nullable(),
|
|
453
|
-
expirationDate: z.date().describe("Time and date the order payment request expires.").optional().nullable(),
|
|
447
|
+
title: z.string().describe("Title displayed to the customer on the payment page.").min(1).max(200).optional(),
|
|
448
|
+
description: z.string().describe("Description displayed to the customer on the payment page.").max(300).optional().nullable(),
|
|
449
|
+
expirationDate: z.date().describe(
|
|
450
|
+
"Date and time the order payment request expires. If not provided, the order payment request doesn't expire."
|
|
451
|
+
).optional().nullable(),
|
|
454
452
|
extendedFields: z.object({
|
|
455
453
|
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
456
454
|
"Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\nThe value of each key is structured according to the schema defined when the extended fields were configured.\n\nYou can only access fields for which you have the appropriate permissions.\n\nLearn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields)."
|
|
457
455
|
).optional()
|
|
458
456
|
}).describe(
|
|
459
|
-
"[Extended fields](https://dev.wix.com/docs/
|
|
457
|
+
"Custom field data for this order payment request.\n\n[Extended fields](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/schema-plugins/about-schema-plugin-extensions) must be configured in the app dashboard before they can be accessed with API calls."
|
|
460
458
|
).optional(),
|
|
461
|
-
_createdDate: z.date().describe("Date and time the
|
|
462
|
-
_updatedDate: z.date().describe("Date and time the
|
|
459
|
+
_createdDate: z.date().describe("Date and time the order payment request was created.").optional().nullable(),
|
|
460
|
+
_updatedDate: z.date().describe("Date and time the order payment request was last updated.").optional().nullable(),
|
|
463
461
|
image: z.string().describe("Image to display to the customer on the payment page.").optional(),
|
|
464
462
|
blockedPaymentMethods: z.array(z.enum(["MANUAL"])).max(1).optional()
|
|
465
|
-
}).describe("Updated
|
|
463
|
+
}).describe("Updated order payment request.").optional()
|
|
466
464
|
});
|
|
467
465
|
export {
|
|
468
466
|
CreateOrderPaymentRequestRequest,
|