@wix/auto_sdk_ecom_order-payment-requests 1.0.55 → 1.0.56

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,533 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+
30
+ // schemas.ts
31
+ var schemas_exports = {};
32
+ __export(schemas_exports, {
33
+ CreateOrderPaymentRequestRequest: () => CreateOrderPaymentRequestRequest,
34
+ CreateOrderPaymentRequestResponse: () => CreateOrderPaymentRequestResponse,
35
+ DeleteOrderPaymentRequestRequest: () => DeleteOrderPaymentRequestRequest,
36
+ DeleteOrderPaymentRequestResponse: () => DeleteOrderPaymentRequestResponse,
37
+ GetOrderPaymentRequestRequest: () => GetOrderPaymentRequestRequest,
38
+ GetOrderPaymentRequestResponse: () => GetOrderPaymentRequestResponse,
39
+ GetOrderPaymentRequestUrlRequest: () => GetOrderPaymentRequestUrlRequest,
40
+ GetOrderPaymentRequestUrlResponse: () => GetOrderPaymentRequestUrlResponse,
41
+ QueryOrderPaymentRequestsRequest: () => QueryOrderPaymentRequestsRequest,
42
+ QueryOrderPaymentRequestsResponse: () => QueryOrderPaymentRequestsResponse,
43
+ UpdateExtendedFieldsRequest: () => UpdateExtendedFieldsRequest,
44
+ UpdateExtendedFieldsResponse: () => UpdateExtendedFieldsResponse,
45
+ UpdateOrderPaymentRequestRequest: () => UpdateOrderPaymentRequestRequest,
46
+ UpdateOrderPaymentRequestResponse: () => UpdateOrderPaymentRequestResponse
47
+ });
48
+ module.exports = __toCommonJS(schemas_exports);
49
+
50
+ // src/ecom-v1-order-payment-request-order-payment-requests.schemas.ts
51
+ var z = __toESM(require("zod"));
52
+ var CreateOrderPaymentRequestRequest = z.object({
53
+ options: z.object({
54
+ orderPaymentRequest: z.object({
55
+ _id: z.string().describe("Order payment request ID.").regex(
56
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
57
+ "Must be a valid GUID"
58
+ ).optional().nullable(),
59
+ source: z.object({
60
+ appId: z.string().describe("App Def ID that created the order payment request.").regex(
61
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
62
+ "Must be a valid GUID"
63
+ ).min(1).max(100).optional().nullable(),
64
+ externalId: z.string().describe(
65
+ "Reference to an ID from an external system, indicating the original source of the order payment request."
66
+ ).min(1).max(100).optional()
67
+ }).describe(
68
+ "Additional parameters to identify the source of the order payment request."
69
+ ).optional(),
70
+ status: z.enum(["UNPAID", "PAID", "EXPIRED"]).optional(),
71
+ orderId: z.string().describe("Order ID.").regex(
72
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
73
+ "Must be a valid GUID"
74
+ ),
75
+ orderNumber: z.string().describe("Order number.").max(100).optional().nullable(),
76
+ amount: z.object({
77
+ amount: z.string().describe("Amount.").optional(),
78
+ formattedAmount: z.string().describe("Amount formatted with currency symbol.").optional()
79
+ }).describe(
80
+ "Amount to collect.\n> **Note:** The amount can only be set once."
81
+ ),
82
+ currency: z.string().describe(
83
+ "Currency code. The value will always match the currency used in the order."
84
+ ).optional(),
85
+ paymentGatewayOrderId: z.string().describe(
86
+ "Payment gateway order id which is associated with this payment request"
87
+ ).min(1).max(100).optional().nullable(),
88
+ title: z.string().describe(
89
+ "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."
90
+ ).min(1).max(200),
91
+ description: z.string().describe(
92
+ "Description to be displayed to the customer on the payment page. Write a detailed description so the customer understands what they are paying for."
93
+ ).max(300).optional().nullable(),
94
+ expirationDate: z.date().describe("Time and date the order payment request expires.").optional().nullable(),
95
+ extendedFields: z.object({
96
+ namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
97
+ "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)."
98
+ ).optional()
99
+ }).describe(
100
+ "[Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields) must be configured in the [app dashboard](https://dev.wix.com/dc3/my-apps/) before they can be accessed with API calls."
101
+ ).optional(),
102
+ _createdDate: z.date().describe("Date and time the OrderPaymentRequest was created.").optional().nullable(),
103
+ _updatedDate: z.date().describe("Date and time the OrderPaymentRequest was last updated.").optional().nullable(),
104
+ image: z.string().describe("Image to display to the customer on the payment page.").optional(),
105
+ blockedPaymentMethods: z.array(z.enum(["MANUAL"])).max(1).optional()
106
+ }).describe("OrderPaymentRequest to be created.").optional()
107
+ }).optional()
108
+ });
109
+ var CreateOrderPaymentRequestResponse = z.object({
110
+ _id: z.string().describe("Order payment request ID.").regex(
111
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
112
+ "Must be a valid GUID"
113
+ ).optional().nullable(),
114
+ source: z.object({
115
+ appId: z.string().describe("App Def ID that created the order payment request.").regex(
116
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
117
+ "Must be a valid GUID"
118
+ ).min(1).max(100).optional().nullable(),
119
+ externalId: z.string().describe(
120
+ "Reference to an ID from an external system, indicating the original source of the order payment request."
121
+ ).min(1).max(100).optional()
122
+ }).describe(
123
+ "Additional parameters to identify the source of the order payment request."
124
+ ).optional(),
125
+ status: z.enum(["UNPAID", "PAID", "EXPIRED"]).describe("status.").optional(),
126
+ orderId: z.string().describe("Order ID.").regex(
127
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
128
+ "Must be a valid GUID"
129
+ ).optional(),
130
+ orderNumber: z.string().describe("Order number.").max(100).optional().nullable(),
131
+ amount: z.object({
132
+ amount: z.string().describe("Amount.").optional(),
133
+ formattedAmount: z.string().describe("Amount formatted with currency symbol.").optional()
134
+ }).describe(
135
+ "Amount to collect.\n> **Note:** The amount can only be set once."
136
+ ).optional(),
137
+ currency: z.string().describe(
138
+ "Currency code. The value will always match the currency used in the order."
139
+ ).optional(),
140
+ paymentGatewayOrderId: z.string().describe(
141
+ "Payment gateway order id which is associated with this payment request"
142
+ ).min(1).max(100).optional().nullable(),
143
+ title: z.string().describe(
144
+ "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."
145
+ ).min(1).max(200).optional(),
146
+ description: z.string().describe(
147
+ "Description to be displayed to the customer on the payment page. Write a detailed description so the customer understands what they are paying for."
148
+ ).max(300).optional().nullable(),
149
+ expirationDate: z.date().describe("Time and date the order payment request expires.").optional().nullable(),
150
+ extendedFields: z.object({
151
+ namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
152
+ "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)."
153
+ ).optional()
154
+ }).describe(
155
+ "[Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields) must be configured in the [app dashboard](https://dev.wix.com/dc3/my-apps/) before they can be accessed with API calls."
156
+ ).optional(),
157
+ _createdDate: z.date().describe("Date and time the OrderPaymentRequest was created.").optional().nullable(),
158
+ _updatedDate: z.date().describe("Date and time the OrderPaymentRequest was last updated.").optional().nullable(),
159
+ image: z.string().describe("Image to display to the customer on the payment page.").optional(),
160
+ blockedPaymentMethods: z.array(z.enum(["MANUAL"])).max(1).optional()
161
+ });
162
+ var GetOrderPaymentRequestRequest = z.object({
163
+ orderPaymentRequestId: z.string().describe("ID of the OrderPaymentRequest to retrieve.").regex(
164
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
165
+ "Must be a valid GUID"
166
+ )
167
+ });
168
+ var GetOrderPaymentRequestResponse = z.object({
169
+ _id: z.string().describe("Order payment request ID.").regex(
170
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
171
+ "Must be a valid GUID"
172
+ ).optional().nullable(),
173
+ source: z.object({
174
+ appId: z.string().describe("App Def ID that created the order payment request.").regex(
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}$/,
176
+ "Must be a valid GUID"
177
+ ).min(1).max(100).optional().nullable(),
178
+ externalId: z.string().describe(
179
+ "Reference to an ID from an external system, indicating the original source of the order payment request."
180
+ ).min(1).max(100).optional()
181
+ }).describe(
182
+ "Additional parameters to identify the source of the order payment request."
183
+ ).optional(),
184
+ status: z.enum(["UNPAID", "PAID", "EXPIRED"]).describe("status.").optional(),
185
+ orderId: z.string().describe("Order ID.").regex(
186
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
187
+ "Must be a valid GUID"
188
+ ).optional(),
189
+ orderNumber: z.string().describe("Order number.").max(100).optional().nullable(),
190
+ amount: z.object({
191
+ amount: z.string().describe("Amount.").optional(),
192
+ formattedAmount: z.string().describe("Amount formatted with currency symbol.").optional()
193
+ }).describe(
194
+ "Amount to collect.\n> **Note:** The amount can only be set once."
195
+ ).optional(),
196
+ currency: z.string().describe(
197
+ "Currency code. The value will always match the currency used in the order."
198
+ ).optional(),
199
+ paymentGatewayOrderId: z.string().describe(
200
+ "Payment gateway order id which is associated with this payment request"
201
+ ).min(1).max(100).optional().nullable(),
202
+ title: z.string().describe(
203
+ "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."
204
+ ).min(1).max(200).optional(),
205
+ description: z.string().describe(
206
+ "Description to be displayed to the customer on the payment page. Write a detailed description so the customer understands what they are paying for."
207
+ ).max(300).optional().nullable(),
208
+ expirationDate: z.date().describe("Time and date the order payment request expires.").optional().nullable(),
209
+ extendedFields: z.object({
210
+ namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
211
+ "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)."
212
+ ).optional()
213
+ }).describe(
214
+ "[Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields) must be configured in the [app dashboard](https://dev.wix.com/dc3/my-apps/) before they can be accessed with API calls."
215
+ ).optional(),
216
+ _createdDate: z.date().describe("Date and time the OrderPaymentRequest was created.").optional().nullable(),
217
+ _updatedDate: z.date().describe("Date and time the OrderPaymentRequest was last updated.").optional().nullable(),
218
+ image: z.string().describe("Image to display to the customer on the payment page.").optional(),
219
+ blockedPaymentMethods: z.array(z.enum(["MANUAL"])).max(1).optional()
220
+ });
221
+ var UpdateOrderPaymentRequestRequest = z.object({
222
+ _id: z.string().describe("Order payment request ID.").regex(
223
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
224
+ "Must be a valid GUID"
225
+ ),
226
+ orderPaymentRequest: z.object({
227
+ _id: z.string().describe("Order payment request ID.").regex(
228
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
229
+ "Must be a valid GUID"
230
+ ).optional().nullable(),
231
+ source: z.object({
232
+ appId: z.string().describe("App Def ID that created the order payment request.").regex(
233
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
234
+ "Must be a valid GUID"
235
+ ).min(1).max(100).optional().nullable(),
236
+ externalId: z.string().describe(
237
+ "Reference to an ID from an external system, indicating the original source of the order payment request."
238
+ ).min(1).max(100).optional()
239
+ }).describe(
240
+ "Additional parameters to identify the source of the order payment request."
241
+ ).optional(),
242
+ status: z.enum(["UNPAID", "PAID", "EXPIRED"]).optional(),
243
+ orderId: z.string().describe("Order ID.").regex(
244
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
245
+ "Must be a valid GUID"
246
+ ).optional(),
247
+ orderNumber: z.string().describe("Order number.").max(100).optional().nullable(),
248
+ amount: z.object({
249
+ amount: z.string().describe("Amount.").optional(),
250
+ formattedAmount: z.string().describe("Amount formatted with currency symbol.").optional()
251
+ }).describe(
252
+ "Amount to collect.\n> **Note:** The amount can only be set once."
253
+ ).optional(),
254
+ currency: z.string().describe(
255
+ "Currency code. The value will always match the currency used in the order."
256
+ ).optional(),
257
+ paymentGatewayOrderId: z.string().describe(
258
+ "Payment gateway order id which is associated with this payment request"
259
+ ).min(1).max(100).optional().nullable(),
260
+ title: z.string().describe(
261
+ "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."
262
+ ).min(1).max(200).optional(),
263
+ description: z.string().describe(
264
+ "Description to be displayed to the customer on the payment page. Write a detailed description so the customer understands what they are paying for."
265
+ ).max(300).optional().nullable(),
266
+ expirationDate: z.date().describe("Time and date the order payment request expires.").optional().nullable(),
267
+ extendedFields: z.object({
268
+ namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
269
+ "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)."
270
+ ).optional()
271
+ }).describe(
272
+ "[Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields) must be configured in the [app dashboard](https://dev.wix.com/dc3/my-apps/) before they can be accessed with API calls."
273
+ ).optional(),
274
+ _createdDate: z.date().describe("Date and time the OrderPaymentRequest was created.").optional().nullable(),
275
+ _updatedDate: z.date().describe("Date and time the OrderPaymentRequest was last updated.").optional().nullable(),
276
+ image: z.string().describe("Image to display to the customer on the payment page.").optional(),
277
+ blockedPaymentMethods: z.array(z.enum(["MANUAL"])).max(1).optional()
278
+ }).describe("OrderPaymentRequest to be updated, may be partial.")
279
+ });
280
+ var UpdateOrderPaymentRequestResponse = z.object({
281
+ _id: z.string().describe("Order payment request ID.").regex(
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}$/,
283
+ "Must be a valid GUID"
284
+ ).optional().nullable(),
285
+ source: z.object({
286
+ appId: z.string().describe("App Def ID that created the order payment request.").regex(
287
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
288
+ "Must be a valid GUID"
289
+ ).min(1).max(100).optional().nullable(),
290
+ externalId: z.string().describe(
291
+ "Reference to an ID from an external system, indicating the original source of the order payment request."
292
+ ).min(1).max(100).optional()
293
+ }).describe(
294
+ "Additional parameters to identify the source of the order payment request."
295
+ ).optional(),
296
+ status: z.enum(["UNPAID", "PAID", "EXPIRED"]).describe("status.").optional(),
297
+ orderId: z.string().describe("Order ID.").regex(
298
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
299
+ "Must be a valid GUID"
300
+ ).optional(),
301
+ orderNumber: z.string().describe("Order number.").max(100).optional().nullable(),
302
+ amount: z.object({
303
+ amount: z.string().describe("Amount.").optional(),
304
+ formattedAmount: z.string().describe("Amount formatted with currency symbol.").optional()
305
+ }).describe(
306
+ "Amount to collect.\n> **Note:** The amount can only be set once."
307
+ ).optional(),
308
+ currency: z.string().describe(
309
+ "Currency code. The value will always match the currency used in the order."
310
+ ).optional(),
311
+ paymentGatewayOrderId: z.string().describe(
312
+ "Payment gateway order id which is associated with this payment request"
313
+ ).min(1).max(100).optional().nullable(),
314
+ title: z.string().describe(
315
+ "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."
316
+ ).min(1).max(200).optional(),
317
+ description: z.string().describe(
318
+ "Description to be displayed to the customer on the payment page. Write a detailed description so the customer understands what they are paying for."
319
+ ).max(300).optional().nullable(),
320
+ expirationDate: z.date().describe("Time and date the order payment request expires.").optional().nullable(),
321
+ extendedFields: z.object({
322
+ namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
323
+ "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)."
324
+ ).optional()
325
+ }).describe(
326
+ "[Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields) must be configured in the [app dashboard](https://dev.wix.com/dc3/my-apps/) before they can be accessed with API calls."
327
+ ).optional(),
328
+ _createdDate: z.date().describe("Date and time the OrderPaymentRequest was created.").optional().nullable(),
329
+ _updatedDate: z.date().describe("Date and time the OrderPaymentRequest was last updated.").optional().nullable(),
330
+ image: z.string().describe("Image to display to the customer on the payment page.").optional(),
331
+ blockedPaymentMethods: z.array(z.enum(["MANUAL"])).max(1).optional()
332
+ });
333
+ var DeleteOrderPaymentRequestRequest = z.object({
334
+ orderPaymentRequestId: z.string().describe("Id of the OrderPaymentRequest to delete.").regex(
335
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
336
+ "Must be a valid GUID"
337
+ )
338
+ });
339
+ var DeleteOrderPaymentRequestResponse = z.object({});
340
+ var QueryOrderPaymentRequestsRequest = z.object({
341
+ query: z.intersection(
342
+ z.object({
343
+ filter: z.record(z.string(), z.any()).describe(
344
+ 'Filter object in the following format:\n`"filter" : {\n"fieldName1": "value1",\n"fieldName2":{"$operator":"value2"}\n}`\nExample of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`'
345
+ ).optional().nullable(),
346
+ sort: z.array(
347
+ z.object({
348
+ fieldName: z.string().describe("Name of the field to sort by.").max(512).optional(),
349
+ order: z.enum(["ASC", "DESC"]).optional()
350
+ })
351
+ ).max(5).optional()
352
+ }),
353
+ z.xor([
354
+ z.object({ cursorPaging: z.never().optional() }),
355
+ z.object({
356
+ cursorPaging: z.object({
357
+ limit: z.number().int().describe("Maximum number of items to return in the results.").min(0).max(100).optional().nullable(),
358
+ cursor: z.string().describe(
359
+ "Pointer to the next or previous page in the list of results.\n\nPass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\nNot relevant for the first request."
360
+ ).max(16e3).optional().nullable()
361
+ }).describe(
362
+ "Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`."
363
+ )
364
+ })
365
+ ])
366
+ ).describe("WQL expression.")
367
+ });
368
+ var QueryOrderPaymentRequestsResponse = z.object({
369
+ orderPaymentRequests: z.array(
370
+ z.object({
371
+ _id: z.string().describe("Order payment request ID.").regex(
372
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
373
+ "Must be a valid GUID"
374
+ ).optional().nullable(),
375
+ source: z.object({
376
+ appId: z.string().describe("App Def ID that created the order payment request.").regex(
377
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
378
+ "Must be a valid GUID"
379
+ ).min(1).max(100).optional().nullable(),
380
+ externalId: z.string().describe(
381
+ "Reference to an ID from an external system, indicating the original source of the order payment request."
382
+ ).min(1).max(100).optional()
383
+ }).describe(
384
+ "Additional parameters to identify the source of the order payment request."
385
+ ).optional(),
386
+ status: z.enum(["UNPAID", "PAID", "EXPIRED"]).describe("status.").optional(),
387
+ orderId: z.string().describe("Order ID.").regex(
388
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
389
+ "Must be a valid GUID"
390
+ ).optional(),
391
+ orderNumber: z.string().describe("Order number.").max(100).optional().nullable(),
392
+ amount: z.object({
393
+ amount: z.string().describe("Amount.").optional(),
394
+ formattedAmount: z.string().describe("Amount formatted with currency symbol.").optional()
395
+ }).describe(
396
+ "Amount to collect.\n> **Note:** The amount can only be set once."
397
+ ).optional(),
398
+ currency: z.string().describe(
399
+ "Currency code. The value will always match the currency used in the order."
400
+ ).optional(),
401
+ paymentGatewayOrderId: z.string().describe(
402
+ "Payment gateway order id which is associated with this payment request"
403
+ ).min(1).max(100).optional().nullable(),
404
+ title: z.string().describe(
405
+ "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."
406
+ ).min(1).max(200).optional(),
407
+ description: z.string().describe(
408
+ "Description to be displayed to the customer on the payment page. Write a detailed description so the customer understands what they are paying for."
409
+ ).max(300).optional().nullable(),
410
+ expirationDate: z.date().describe("Time and date the order payment request expires.").optional().nullable(),
411
+ extendedFields: z.object({
412
+ namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
413
+ "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)."
414
+ ).optional()
415
+ }).describe(
416
+ "[Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields) must be configured in the [app dashboard](https://dev.wix.com/dc3/my-apps/) before they can be accessed with API calls."
417
+ ).optional(),
418
+ _createdDate: z.date().describe("Date and time the OrderPaymentRequest was created.").optional().nullable(),
419
+ _updatedDate: z.date().describe("Date and time the OrderPaymentRequest was last updated.").optional().nullable(),
420
+ image: z.string().describe("Image to display to the customer on the payment page.").optional(),
421
+ blockedPaymentMethods: z.array(z.enum(["MANUAL"])).max(1).optional()
422
+ })
423
+ ).max(1e3).optional(),
424
+ pagingMetadata: z.object({
425
+ count: z.number().int().describe("Number of items returned in the response.").optional().nullable(),
426
+ cursors: z.object({
427
+ next: z.string().describe(
428
+ "Cursor string pointing to the next page in the list of results."
429
+ ).max(16e3).optional().nullable(),
430
+ prev: z.string().describe(
431
+ "Cursor pointing to the previous page in the list of results."
432
+ ).max(16e3).optional().nullable()
433
+ }).describe(
434
+ "Cursor strings that point to the next page, previous page, or both."
435
+ ).optional(),
436
+ hasNext: z.boolean().describe(
437
+ "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."
438
+ ).optional().nullable()
439
+ }).describe("Paging metadata").optional()
440
+ });
441
+ var GetOrderPaymentRequestUrlRequest = z.object({
442
+ orderPaymentRequestId: z.string().describe("Order Payment Request ID.").regex(
443
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
444
+ "Must be a valid GUID"
445
+ )
446
+ });
447
+ var GetOrderPaymentRequestUrlResponse = z.object({
448
+ orderPaymentRequestUrl: z.string().describe("Order Payment Request URL.").min(1).max(100).optional()
449
+ });
450
+ var UpdateExtendedFieldsRequest = z.object({
451
+ _id: z.string().describe("ID of the entity to update."),
452
+ namespace: z.string().describe(
453
+ "Identifier for the app whose extended fields are being updated."
454
+ ),
455
+ options: z.object({
456
+ namespaceData: z.record(z.string(), z.any()).describe(
457
+ "Data to update. Structured according to the [schema](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields#json-schema-for-extended-fields) defined when the extended fields were configured."
458
+ )
459
+ })
460
+ });
461
+ var UpdateExtendedFieldsResponse = z.object({
462
+ orderPaymentRequest: z.object({
463
+ _id: z.string().describe("Order payment request ID.").regex(
464
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
465
+ "Must be a valid GUID"
466
+ ).optional().nullable(),
467
+ source: z.object({
468
+ appId: z.string().describe("App Def ID that created the order payment request.").regex(
469
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
470
+ "Must be a valid GUID"
471
+ ).min(1).max(100).optional().nullable(),
472
+ externalId: z.string().describe(
473
+ "Reference to an ID from an external system, indicating the original source of the order payment request."
474
+ ).min(1).max(100).optional()
475
+ }).describe(
476
+ "Additional parameters to identify the source of the order payment request."
477
+ ).optional(),
478
+ status: z.enum(["UNPAID", "PAID", "EXPIRED"]).describe("status.").optional(),
479
+ orderId: z.string().describe("Order ID.").regex(
480
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
481
+ "Must be a valid GUID"
482
+ ).optional(),
483
+ orderNumber: z.string().describe("Order number.").max(100).optional().nullable(),
484
+ amount: z.object({
485
+ amount: z.string().describe("Amount.").optional(),
486
+ formattedAmount: z.string().describe("Amount formatted with currency symbol.").optional()
487
+ }).describe(
488
+ "Amount to collect.\n> **Note:** The amount can only be set once."
489
+ ).optional(),
490
+ currency: z.string().describe(
491
+ "Currency code. The value will always match the currency used in the order."
492
+ ).optional(),
493
+ paymentGatewayOrderId: z.string().describe(
494
+ "Payment gateway order id which is associated with this payment request"
495
+ ).min(1).max(100).optional().nullable(),
496
+ title: z.string().describe(
497
+ "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."
498
+ ).min(1).max(200).optional(),
499
+ description: z.string().describe(
500
+ "Description to be displayed to the customer on the payment page. Write a detailed description so the customer understands what they are paying for."
501
+ ).max(300).optional().nullable(),
502
+ expirationDate: z.date().describe("Time and date the order payment request expires.").optional().nullable(),
503
+ extendedFields: z.object({
504
+ namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
505
+ "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)."
506
+ ).optional()
507
+ }).describe(
508
+ "[Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields) must be configured in the [app dashboard](https://dev.wix.com/dc3/my-apps/) before they can be accessed with API calls."
509
+ ).optional(),
510
+ _createdDate: z.date().describe("Date and time the OrderPaymentRequest was created.").optional().nullable(),
511
+ _updatedDate: z.date().describe("Date and time the OrderPaymentRequest was last updated.").optional().nullable(),
512
+ image: z.string().describe("Image to display to the customer on the payment page.").optional(),
513
+ blockedPaymentMethods: z.array(z.enum(["MANUAL"])).max(1).optional()
514
+ }).describe("Updated OrderPaymentRequest.").optional()
515
+ });
516
+ // Annotate the CommonJS export names for ESM import in node:
517
+ 0 && (module.exports = {
518
+ CreateOrderPaymentRequestRequest,
519
+ CreateOrderPaymentRequestResponse,
520
+ DeleteOrderPaymentRequestRequest,
521
+ DeleteOrderPaymentRequestResponse,
522
+ GetOrderPaymentRequestRequest,
523
+ GetOrderPaymentRequestResponse,
524
+ GetOrderPaymentRequestUrlRequest,
525
+ GetOrderPaymentRequestUrlResponse,
526
+ QueryOrderPaymentRequestsRequest,
527
+ QueryOrderPaymentRequestsResponse,
528
+ UpdateExtendedFieldsRequest,
529
+ UpdateExtendedFieldsResponse,
530
+ UpdateOrderPaymentRequestRequest,
531
+ UpdateOrderPaymentRequestResponse
532
+ });
533
+ //# sourceMappingURL=schemas.js.map