@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.
Files changed (37) hide show
  1. package/build/cjs/index.d.ts +52 -18
  2. package/build/cjs/index.js +164 -0
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/index.typings.d.ts +269 -69
  5. package/build/cjs/index.typings.js.map +1 -1
  6. package/build/cjs/meta.d.ts +49 -37
  7. package/build/cjs/meta.js.map +1 -1
  8. package/build/cjs/schemas.js +125 -127
  9. package/build/cjs/schemas.js.map +1 -1
  10. package/build/es/index.d.mts +52 -18
  11. package/build/es/index.mjs +158 -0
  12. package/build/es/index.mjs.map +1 -1
  13. package/build/es/index.typings.d.mts +269 -69
  14. package/build/es/index.typings.mjs.map +1 -1
  15. package/build/es/meta.d.mts +49 -37
  16. package/build/es/meta.mjs.map +1 -1
  17. package/build/es/schemas.mjs +125 -127
  18. package/build/es/schemas.mjs.map +1 -1
  19. package/build/internal/cjs/index.d.ts +54 -20
  20. package/build/internal/cjs/index.js +164 -0
  21. package/build/internal/cjs/index.js.map +1 -1
  22. package/build/internal/cjs/index.typings.d.ts +278 -80
  23. package/build/internal/cjs/index.typings.js.map +1 -1
  24. package/build/internal/cjs/meta.d.ts +49 -37
  25. package/build/internal/cjs/meta.js.map +1 -1
  26. package/build/internal/cjs/schemas.js +125 -127
  27. package/build/internal/cjs/schemas.js.map +1 -1
  28. package/build/internal/es/index.d.mts +54 -20
  29. package/build/internal/es/index.mjs +158 -0
  30. package/build/internal/es/index.mjs.map +1 -1
  31. package/build/internal/es/index.typings.d.mts +278 -80
  32. package/build/internal/es/index.typings.mjs.map +1 -1
  33. package/build/internal/es/meta.d.mts +49 -37
  34. package/build/internal/es/meta.mjs.map +1 -1
  35. package/build/internal/es/schemas.mjs +125 -127
  36. package/build/internal/es/schemas.mjs.map +1 -1
  37. package/package.json +2 -2
@@ -57,15 +57,17 @@ var CreateOrderPaymentRequestRequest = z.object({
57
57
  "Must be a valid GUID"
58
58
  ).optional().nullable(),
59
59
  source: z.object({
60
- appId: z.string().describe("App Def ID that created the order payment request.").regex(
60
+ appId: z.string().describe(
61
+ "ID of the app that created the order payment request."
62
+ ).regex(
61
63
  /^[0-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
64
  "Must be a valid GUID"
63
65
  ).min(1).max(100).optional().nullable(),
64
66
  externalId: z.string().describe(
65
- "Reference to an ID from an external system, indicating the original source of the order payment request."
67
+ "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."
66
68
  ).min(1).max(100).optional()
67
69
  }).describe(
68
- "Additional parameters to identify the source of the order payment request."
70
+ "Details about the source that created the order payment request."
69
71
  ).optional(),
70
72
  status: z.enum(["UNPAID", "PAID", "EXPIRED"]).optional(),
71
73
  orderId: z.string().describe("Order ID.").regex(
@@ -77,33 +79,35 @@ var CreateOrderPaymentRequestRequest = z.object({
77
79
  amount: z.string().describe("Amount.").optional(),
78
80
  formattedAmount: z.string().describe("Amount formatted with currency symbol.").optional()
79
81
  }).describe(
80
- "Amount to collect.\n> **Note:** The amount can only be set once."
82
+ "Amount to collect. Set when the order payment request is created and can't be changed afterward."
81
83
  ),
82
84
  currency: z.string().describe(
83
- "Currency code. The value will always match the currency used in the order."
85
+ "Three-letter currency code in [ISO-4217 alphabetic format](http://en.wikipedia.org/wiki/ISO_4217). Always matches the order's currency."
84
86
  ).optional(),
85
87
  paymentGatewayOrderId: z.string().describe(
86
- "Payment gateway order id which is associated with this payment request"
88
+ "Payment gateway order ID associated with this payment request."
87
89
  ).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),
90
+ title: z.string().describe("Title displayed to the customer on the payment page.").min(1).max(200),
91
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."
92
+ "Description displayed to the customer on the payment page."
93
93
  ).max(300).optional().nullable(),
94
- expirationDate: z.date().describe("Time and date the order payment request expires.").optional().nullable(),
94
+ expirationDate: z.date().describe(
95
+ "Date and time the order payment request expires. If not provided, the order payment request doesn't expire."
96
+ ).optional().nullable(),
95
97
  extendedFields: z.object({
96
98
  namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
97
99
  "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
100
  ).optional()
99
101
  }).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."
102
+ "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."
101
103
  ).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
+ _createdDate: z.date().describe("Date and time the order payment request was created.").optional().nullable(),
105
+ _updatedDate: z.date().describe(
106
+ "Date and time the order payment request was last updated."
107
+ ).optional().nullable(),
104
108
  image: z.string().describe("Image to display to the customer on the payment page.").optional(),
105
109
  blockedPaymentMethods: z.array(z.enum(["MANUAL"])).max(1).optional()
106
- }).describe("OrderPaymentRequest to be created.").optional()
110
+ }).describe("Order payment request to create.").optional()
107
111
  }).optional()
108
112
  });
109
113
  var CreateOrderPaymentRequestResponse = z.object({
@@ -112,17 +116,19 @@ var CreateOrderPaymentRequestResponse = z.object({
112
116
  "Must be a valid GUID"
113
117
  ).optional().nullable(),
114
118
  source: z.object({
115
- appId: z.string().describe("App Def ID that created the order payment request.").regex(
119
+ appId: z.string().describe("ID of the app that created the order payment request.").regex(
116
120
  /^[0-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
121
  "Must be a valid GUID"
118
122
  ).min(1).max(100).optional().nullable(),
119
123
  externalId: z.string().describe(
120
- "Reference to an ID from an external system, indicating the original source of the order payment request."
124
+ "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."
121
125
  ).min(1).max(100).optional()
122
126
  }).describe(
123
- "Additional parameters to identify the source of the order payment request."
127
+ "Details about the source that created the order payment request."
128
+ ).optional(),
129
+ status: z.enum(["UNPAID", "PAID", "EXPIRED"]).describe(
130
+ "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."
124
131
  ).optional(),
125
- status: z.enum(["UNPAID", "PAID", "EXPIRED"]).describe("status.").optional(),
126
132
  orderId: z.string().describe("Order ID.").regex(
127
133
  /^[0-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
134
  "Must be a valid GUID"
@@ -132,35 +138,31 @@ var CreateOrderPaymentRequestResponse = z.object({
132
138
  amount: z.string().describe("Amount.").optional(),
133
139
  formattedAmount: z.string().describe("Amount formatted with currency symbol.").optional()
134
140
  }).describe(
135
- "Amount to collect.\n> **Note:** The amount can only be set once."
141
+ "Amount to collect. Set when the order payment request is created and can't be changed afterward."
136
142
  ).optional(),
137
143
  currency: z.string().describe(
138
- "Currency code. The value will always match the currency used in the order."
144
+ "Three-letter currency code in [ISO-4217 alphabetic format](http://en.wikipedia.org/wiki/ISO_4217). Always matches the order's currency."
139
145
  ).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(),
146
+ paymentGatewayOrderId: z.string().describe("Payment gateway order ID associated with this payment request.").min(1).max(100).optional().nullable(),
147
+ title: z.string().describe("Title displayed to the customer on the payment page.").min(1).max(200).optional(),
148
+ description: z.string().describe("Description displayed to the customer on the payment page.").max(300).optional().nullable(),
149
+ expirationDate: z.date().describe(
150
+ "Date and time the order payment request expires. If not provided, the order payment request doesn't expire."
151
+ ).optional().nullable(),
150
152
  extendedFields: z.object({
151
153
  namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
152
154
  "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
155
  ).optional()
154
156
  }).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."
157
+ "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."
156
158
  ).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
+ _createdDate: z.date().describe("Date and time the order payment request was created.").optional().nullable(),
160
+ _updatedDate: z.date().describe("Date and time the order payment request was last updated.").optional().nullable(),
159
161
  image: z.string().describe("Image to display to the customer on the payment page.").optional(),
160
162
  blockedPaymentMethods: z.array(z.enum(["MANUAL"])).max(1).optional()
161
163
  });
162
164
  var GetOrderPaymentRequestRequest = z.object({
163
- orderPaymentRequestId: z.string().describe("ID of the OrderPaymentRequest to retrieve.").regex(
165
+ orderPaymentRequestId: z.string().describe("ID of the order payment request to retrieve.").regex(
164
166
  /^[0-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
167
  "Must be a valid GUID"
166
168
  )
@@ -171,17 +173,19 @@ var GetOrderPaymentRequestResponse = z.object({
171
173
  "Must be a valid GUID"
172
174
  ).optional().nullable(),
173
175
  source: z.object({
174
- appId: z.string().describe("App Def ID that created the order payment request.").regex(
176
+ appId: z.string().describe("ID of the app that created the order payment request.").regex(
175
177
  /^[0-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
178
  "Must be a valid GUID"
177
179
  ).min(1).max(100).optional().nullable(),
178
180
  externalId: z.string().describe(
179
- "Reference to an ID from an external system, indicating the original source of the order payment request."
181
+ "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."
180
182
  ).min(1).max(100).optional()
181
183
  }).describe(
182
- "Additional parameters to identify the source of the order payment request."
184
+ "Details about the source that created the order payment request."
185
+ ).optional(),
186
+ status: z.enum(["UNPAID", "PAID", "EXPIRED"]).describe(
187
+ "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."
183
188
  ).optional(),
184
- status: z.enum(["UNPAID", "PAID", "EXPIRED"]).describe("status.").optional(),
185
189
  orderId: z.string().describe("Order ID.").regex(
186
190
  /^[0-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
191
  "Must be a valid GUID"
@@ -191,30 +195,26 @@ var GetOrderPaymentRequestResponse = z.object({
191
195
  amount: z.string().describe("Amount.").optional(),
192
196
  formattedAmount: z.string().describe("Amount formatted with currency symbol.").optional()
193
197
  }).describe(
194
- "Amount to collect.\n> **Note:** The amount can only be set once."
198
+ "Amount to collect. Set when the order payment request is created and can't be changed afterward."
195
199
  ).optional(),
196
200
  currency: z.string().describe(
197
- "Currency code. The value will always match the currency used in the order."
201
+ "Three-letter currency code in [ISO-4217 alphabetic format](http://en.wikipedia.org/wiki/ISO_4217). Always matches the order's currency."
198
202
  ).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(),
203
+ paymentGatewayOrderId: z.string().describe("Payment gateway order ID associated with this payment request.").min(1).max(100).optional().nullable(),
204
+ title: z.string().describe("Title displayed to the customer on the payment page.").min(1).max(200).optional(),
205
+ description: z.string().describe("Description displayed to the customer on the payment page.").max(300).optional().nullable(),
206
+ expirationDate: z.date().describe(
207
+ "Date and time the order payment request expires. If not provided, the order payment request doesn't expire."
208
+ ).optional().nullable(),
209
209
  extendedFields: z.object({
210
210
  namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
211
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
212
  ).optional()
213
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."
214
+ "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."
215
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(),
216
+ _createdDate: z.date().describe("Date and time the order payment request was created.").optional().nullable(),
217
+ _updatedDate: z.date().describe("Date and time the order payment request was last updated.").optional().nullable(),
218
218
  image: z.string().describe("Image to display to the customer on the payment page.").optional(),
219
219
  blockedPaymentMethods: z.array(z.enum(["MANUAL"])).max(1).optional()
220
220
  });
@@ -229,15 +229,15 @@ var UpdateOrderPaymentRequestRequest = z.object({
229
229
  "Must be a valid GUID"
230
230
  ).optional().nullable(),
231
231
  source: z.object({
232
- appId: z.string().describe("App Def ID that created the order payment request.").regex(
232
+ appId: z.string().describe("ID of the app that created the order payment request.").regex(
233
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
234
  "Must be a valid GUID"
235
235
  ).min(1).max(100).optional().nullable(),
236
236
  externalId: z.string().describe(
237
- "Reference to an ID from an external system, indicating the original source of the order payment request."
237
+ "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."
238
238
  ).min(1).max(100).optional()
239
239
  }).describe(
240
- "Additional parameters to identify the source of the order payment request."
240
+ "Details about the source that created the order payment request."
241
241
  ).optional(),
242
242
  status: z.enum(["UNPAID", "PAID", "EXPIRED"]).optional(),
243
243
  orderId: z.string().describe("Order ID.").regex(
@@ -249,33 +249,31 @@ var UpdateOrderPaymentRequestRequest = z.object({
249
249
  amount: z.string().describe("Amount.").optional(),
250
250
  formattedAmount: z.string().describe("Amount formatted with currency symbol.").optional()
251
251
  }).describe(
252
- "Amount to collect.\n> **Note:** The amount can only be set once."
252
+ "Amount to collect. Set when the order payment request is created and can't be changed afterward."
253
253
  ).optional(),
254
254
  currency: z.string().describe(
255
- "Currency code. The value will always match the currency used in the order."
255
+ "Three-letter currency code in [ISO-4217 alphabetic format](http://en.wikipedia.org/wiki/ISO_4217). Always matches the order's currency."
256
256
  ).optional(),
257
257
  paymentGatewayOrderId: z.string().describe(
258
- "Payment gateway order id which is associated with this payment request"
258
+ "Payment gateway order ID associated with this payment request."
259
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(),
260
+ title: z.string().describe("Title displayed to the customer on the payment page.").min(1).max(200).optional(),
261
+ description: z.string().describe("Description displayed to the customer on the payment page.").max(300).optional().nullable(),
262
+ expirationDate: z.date().describe(
263
+ "Date and time the order payment request expires. If not provided, the order payment request doesn't expire."
264
+ ).optional().nullable(),
267
265
  extendedFields: z.object({
268
266
  namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
269
267
  "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
268
  ).optional()
271
269
  }).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."
270
+ "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."
273
271
  ).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(),
272
+ _createdDate: z.date().describe("Date and time the order payment request was created.").optional().nullable(),
273
+ _updatedDate: z.date().describe("Date and time the order payment request was last updated.").optional().nullable(),
276
274
  image: z.string().describe("Image to display to the customer on the payment page.").optional(),
277
275
  blockedPaymentMethods: z.array(z.enum(["MANUAL"])).max(1).optional()
278
- }).describe("OrderPaymentRequest to be updated, may be partial.")
276
+ }).describe("Order payment request to update.")
279
277
  });
280
278
  var UpdateOrderPaymentRequestResponse = z.object({
281
279
  _id: z.string().describe("Order payment request ID.").regex(
@@ -283,17 +281,19 @@ var UpdateOrderPaymentRequestResponse = z.object({
283
281
  "Must be a valid GUID"
284
282
  ).optional().nullable(),
285
283
  source: z.object({
286
- appId: z.string().describe("App Def ID that created the order payment request.").regex(
284
+ appId: z.string().describe("ID of the app that created the order payment request.").regex(
287
285
  /^[0-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
286
  "Must be a valid GUID"
289
287
  ).min(1).max(100).optional().nullable(),
290
288
  externalId: z.string().describe(
291
- "Reference to an ID from an external system, indicating the original source of the order payment request."
289
+ "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."
292
290
  ).min(1).max(100).optional()
293
291
  }).describe(
294
- "Additional parameters to identify the source of the order payment request."
292
+ "Details about the source that created the order payment request."
293
+ ).optional(),
294
+ status: z.enum(["UNPAID", "PAID", "EXPIRED"]).describe(
295
+ "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."
295
296
  ).optional(),
296
- status: z.enum(["UNPAID", "PAID", "EXPIRED"]).describe("status.").optional(),
297
297
  orderId: z.string().describe("Order ID.").regex(
298
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
299
  "Must be a valid GUID"
@@ -303,35 +303,31 @@ var UpdateOrderPaymentRequestResponse = z.object({
303
303
  amount: z.string().describe("Amount.").optional(),
304
304
  formattedAmount: z.string().describe("Amount formatted with currency symbol.").optional()
305
305
  }).describe(
306
- "Amount to collect.\n> **Note:** The amount can only be set once."
306
+ "Amount to collect. Set when the order payment request is created and can't be changed afterward."
307
307
  ).optional(),
308
308
  currency: z.string().describe(
309
- "Currency code. The value will always match the currency used in the order."
309
+ "Three-letter currency code in [ISO-4217 alphabetic format](http://en.wikipedia.org/wiki/ISO_4217). Always matches the order's currency."
310
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(),
311
+ paymentGatewayOrderId: z.string().describe("Payment gateway order ID associated with this payment request.").min(1).max(100).optional().nullable(),
312
+ title: z.string().describe("Title displayed to the customer on the payment page.").min(1).max(200).optional(),
313
+ description: z.string().describe("Description displayed to the customer on the payment page.").max(300).optional().nullable(),
314
+ expirationDate: z.date().describe(
315
+ "Date and time the order payment request expires. If not provided, the order payment request doesn't expire."
316
+ ).optional().nullable(),
321
317
  extendedFields: z.object({
322
318
  namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
323
319
  "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
320
  ).optional()
325
321
  }).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."
322
+ "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."
327
323
  ).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(),
324
+ _createdDate: z.date().describe("Date and time the order payment request was created.").optional().nullable(),
325
+ _updatedDate: z.date().describe("Date and time the order payment request was last updated.").optional().nullable(),
330
326
  image: z.string().describe("Image to display to the customer on the payment page.").optional(),
331
327
  blockedPaymentMethods: z.array(z.enum(["MANUAL"])).max(1).optional()
332
328
  });
333
329
  var DeleteOrderPaymentRequestRequest = z.object({
334
- orderPaymentRequestId: z.string().describe("Id of the OrderPaymentRequest to delete.").regex(
330
+ orderPaymentRequestId: z.string().describe("ID of the order payment request to delete.").regex(
335
331
  /^[0-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
332
  "Must be a valid GUID"
337
333
  )
@@ -373,17 +369,19 @@ var QueryOrderPaymentRequestsResponse = z.object({
373
369
  "Must be a valid GUID"
374
370
  ).optional().nullable(),
375
371
  source: z.object({
376
- appId: z.string().describe("App Def ID that created the order payment request.").regex(
372
+ appId: z.string().describe("ID of the app that created the order payment request.").regex(
377
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}$/,
378
374
  "Must be a valid GUID"
379
375
  ).min(1).max(100).optional().nullable(),
380
376
  externalId: z.string().describe(
381
- "Reference to an ID from an external system, indicating the original source of the order payment request."
377
+ "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."
382
378
  ).min(1).max(100).optional()
383
379
  }).describe(
384
- "Additional parameters to identify the source of the order payment request."
380
+ "Details about the source that created the order payment request."
381
+ ).optional(),
382
+ status: z.enum(["UNPAID", "PAID", "EXPIRED"]).describe(
383
+ "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."
385
384
  ).optional(),
386
- status: z.enum(["UNPAID", "PAID", "EXPIRED"]).describe("status.").optional(),
387
385
  orderId: z.string().describe("Order ID.").regex(
388
386
  /^[0-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
387
  "Must be a valid GUID"
@@ -393,30 +391,30 @@ var QueryOrderPaymentRequestsResponse = z.object({
393
391
  amount: z.string().describe("Amount.").optional(),
394
392
  formattedAmount: z.string().describe("Amount formatted with currency symbol.").optional()
395
393
  }).describe(
396
- "Amount to collect.\n> **Note:** The amount can only be set once."
394
+ "Amount to collect. Set when the order payment request is created and can't be changed afterward."
397
395
  ).optional(),
398
396
  currency: z.string().describe(
399
- "Currency code. The value will always match the currency used in the order."
397
+ "Three-letter currency code in [ISO-4217 alphabetic format](http://en.wikipedia.org/wiki/ISO_4217). Always matches the order's currency."
400
398
  ).optional(),
401
399
  paymentGatewayOrderId: z.string().describe(
402
- "Payment gateway order id which is associated with this payment request"
400
+ "Payment gateway order ID associated with this payment request."
403
401
  ).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(),
402
+ title: z.string().describe("Title displayed to the customer on the payment page.").min(1).max(200).optional(),
407
403
  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."
404
+ "Description displayed to the customer on the payment page."
409
405
  ).max(300).optional().nullable(),
410
- expirationDate: z.date().describe("Time and date the order payment request expires.").optional().nullable(),
406
+ expirationDate: z.date().describe(
407
+ "Date and time the order payment request expires. If not provided, the order payment request doesn't expire."
408
+ ).optional().nullable(),
411
409
  extendedFields: z.object({
412
410
  namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
413
411
  "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
412
  ).optional()
415
413
  }).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."
414
+ "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."
417
415
  ).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(),
416
+ _createdDate: z.date().describe("Date and time the order payment request was created.").optional().nullable(),
417
+ _updatedDate: z.date().describe("Date and time the order payment request was last updated.").optional().nullable(),
420
418
  image: z.string().describe("Image to display to the customer on the payment page.").optional(),
421
419
  blockedPaymentMethods: z.array(z.enum(["MANUAL"])).max(1).optional()
422
420
  })
@@ -436,16 +434,16 @@ var QueryOrderPaymentRequestsResponse = z.object({
436
434
  hasNext: z.boolean().describe(
437
435
  "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
436
  ).optional().nullable()
439
- }).describe("Paging metadata").optional()
437
+ }).describe("Paging metadata.").optional()
440
438
  });
441
439
  var GetOrderPaymentRequestUrlRequest = z.object({
442
- orderPaymentRequestId: z.string().describe("Order Payment Request ID.").regex(
440
+ orderPaymentRequestId: z.string().describe("ID of the order payment request.").regex(
443
441
  /^[0-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
442
  "Must be a valid GUID"
445
443
  )
446
444
  });
447
445
  var GetOrderPaymentRequestUrlResponse = z.object({
448
- orderPaymentRequestUrl: z.string().describe("Order Payment Request URL.").min(1).max(100).optional()
446
+ orderPaymentRequestUrl: z.string().describe("Payment page URL for the order payment request.").min(1).max(100).optional()
449
447
  });
450
448
  var UpdateExtendedFieldsRequest = z.object({
451
449
  _id: z.string().describe("ID of the entity to update."),
@@ -465,17 +463,19 @@ var UpdateExtendedFieldsResponse = z.object({
465
463
  "Must be a valid GUID"
466
464
  ).optional().nullable(),
467
465
  source: z.object({
468
- appId: z.string().describe("App Def ID that created the order payment request.").regex(
466
+ appId: z.string().describe("ID of the app that created the order payment request.").regex(
469
467
  /^[0-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
468
  "Must be a valid GUID"
471
469
  ).min(1).max(100).optional().nullable(),
472
470
  externalId: z.string().describe(
473
- "Reference to an ID from an external system, indicating the original source of the order payment request."
471
+ "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."
474
472
  ).min(1).max(100).optional()
475
473
  }).describe(
476
- "Additional parameters to identify the source of the order payment request."
474
+ "Details about the source that created the order payment request."
475
+ ).optional(),
476
+ status: z.enum(["UNPAID", "PAID", "EXPIRED"]).describe(
477
+ "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."
477
478
  ).optional(),
478
- status: z.enum(["UNPAID", "PAID", "EXPIRED"]).describe("status.").optional(),
479
479
  orderId: z.string().describe("Order ID.").regex(
480
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
481
  "Must be a valid GUID"
@@ -485,33 +485,31 @@ var UpdateExtendedFieldsResponse = z.object({
485
485
  amount: z.string().describe("Amount.").optional(),
486
486
  formattedAmount: z.string().describe("Amount formatted with currency symbol.").optional()
487
487
  }).describe(
488
- "Amount to collect.\n> **Note:** The amount can only be set once."
488
+ "Amount to collect. Set when the order payment request is created and can't be changed afterward."
489
489
  ).optional(),
490
490
  currency: z.string().describe(
491
- "Currency code. The value will always match the currency used in the order."
491
+ "Three-letter currency code in [ISO-4217 alphabetic format](http://en.wikipedia.org/wiki/ISO_4217). Always matches the order's currency."
492
492
  ).optional(),
493
493
  paymentGatewayOrderId: z.string().describe(
494
- "Payment gateway order id which is associated with this payment request"
494
+ "Payment gateway order ID associated with this payment request."
495
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(),
496
+ title: z.string().describe("Title displayed to the customer on the payment page.").min(1).max(200).optional(),
497
+ description: z.string().describe("Description displayed to the customer on the payment page.").max(300).optional().nullable(),
498
+ expirationDate: z.date().describe(
499
+ "Date and time the order payment request expires. If not provided, the order payment request doesn't expire."
500
+ ).optional().nullable(),
503
501
  extendedFields: z.object({
504
502
  namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
505
503
  "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
504
  ).optional()
507
505
  }).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."
506
+ "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."
509
507
  ).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(),
508
+ _createdDate: z.date().describe("Date and time the order payment request was created.").optional().nullable(),
509
+ _updatedDate: z.date().describe("Date and time the order payment request was last updated.").optional().nullable(),
512
510
  image: z.string().describe("Image to display to the customer on the payment page.").optional(),
513
511
  blockedPaymentMethods: z.array(z.enum(["MANUAL"])).max(1).optional()
514
- }).describe("Updated OrderPaymentRequest.").optional()
512
+ }).describe("Updated order payment request.").optional()
515
513
  });
516
514
  // Annotate the CommonJS export names for ESM import in node:
517
515
  0 && (module.exports = {