@wix/auto_sdk_payments_saved-payment-methods 1.0.41 → 1.0.43

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 (45) hide show
  1. package/build/cjs/index.d.ts +24 -14
  2. package/build/cjs/index.js +14 -1
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/index.typings.d.ts +86 -79
  5. package/build/cjs/index.typings.js +14 -1
  6. package/build/cjs/index.typings.js.map +1 -1
  7. package/build/cjs/meta.d.ts +38 -39
  8. package/build/cjs/meta.js +14 -1
  9. package/build/cjs/meta.js.map +1 -1
  10. package/build/cjs/schemas.js +141 -117
  11. package/build/cjs/schemas.js.map +1 -1
  12. package/build/es/index.d.mts +24 -14
  13. package/build/es/index.mjs +14 -1
  14. package/build/es/index.mjs.map +1 -1
  15. package/build/es/index.typings.d.mts +86 -79
  16. package/build/es/index.typings.mjs +14 -1
  17. package/build/es/index.typings.mjs.map +1 -1
  18. package/build/es/meta.d.mts +38 -39
  19. package/build/es/meta.mjs +14 -1
  20. package/build/es/meta.mjs.map +1 -1
  21. package/build/es/schemas.mjs +141 -117
  22. package/build/es/schemas.mjs.map +1 -1
  23. package/build/internal/cjs/index.d.ts +24 -14
  24. package/build/internal/cjs/index.js +14 -1
  25. package/build/internal/cjs/index.js.map +1 -1
  26. package/build/internal/cjs/index.typings.d.ts +86 -79
  27. package/build/internal/cjs/index.typings.js +14 -1
  28. package/build/internal/cjs/index.typings.js.map +1 -1
  29. package/build/internal/cjs/meta.d.ts +38 -39
  30. package/build/internal/cjs/meta.js +14 -1
  31. package/build/internal/cjs/meta.js.map +1 -1
  32. package/build/internal/cjs/schemas.js +141 -117
  33. package/build/internal/cjs/schemas.js.map +1 -1
  34. package/build/internal/es/index.d.mts +24 -14
  35. package/build/internal/es/index.mjs +14 -1
  36. package/build/internal/es/index.mjs.map +1 -1
  37. package/build/internal/es/index.typings.d.mts +86 -79
  38. package/build/internal/es/index.typings.mjs +14 -1
  39. package/build/internal/es/index.typings.mjs.map +1 -1
  40. package/build/internal/es/meta.d.mts +38 -39
  41. package/build/internal/es/meta.mjs +14 -1
  42. package/build/internal/es/meta.mjs.map +1 -1
  43. package/build/internal/es/schemas.mjs +141 -117
  44. package/build/internal/es/schemas.mjs.map +1 -1
  45. package/package.json +2 -2
@@ -49,25 +49,25 @@ module.exports = __toCommonJS(schemas_exports);
49
49
  var z = __toESM(require("zod"));
50
50
  var UpsertSavedPaymentMethodRequest = z.object({
51
51
  savedPaymentMethod: z.object({
52
- _id: z.string().describe("Unique identifier of a saved payment method.").regex(
52
+ _id: z.string().describe("Saved payment method ID.").regex(
53
53
  /^[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}$/,
54
54
  "Must be a valid GUID"
55
55
  ).optional().nullable(),
56
56
  revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
57
- "Represents the current state of a saved payment method. Each time saved payment method is modified, its `revision` changes. For an update operation to succeed, you MUST pass the latest revision."
57
+ "Revision number, which increments by 1 each time the saved payment method is updated.\nTo prevent conflicting changes, the current revision must be passed when updating the saved payment method."
58
58
  ).optional().nullable(),
59
- _createdDate: z.date().describe("SavedPaymentMethod creation time.").optional().nullable(),
60
- _updatedDate: z.date().describe("SavedPaymentMethod last update time.").optional().nullable(),
61
- siteMemberId: z.string().describe("Saved payment method owner's member ID.").regex(
59
+ _createdDate: z.date().describe("Date and time the saved payment method was created.").optional().nullable(),
60
+ _updatedDate: z.date().describe("Date and time the saved payment method was last updated.").optional().nullable(),
61
+ siteMemberId: z.string().describe("ID of the site member who owns this saved payment method.").regex(
62
62
  /^[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}$/,
63
63
  "Must be a valid GUID"
64
64
  ).optional().nullable(),
65
65
  primary: z.boolean().describe(
66
- "Defines whether this payment method is primary for the member. Member can only have at most one primary saved payment method."
66
+ "Whether this saved payment method is the primary one for the member. Each member can have at most one primary saved payment method. The primary method is selected by default during checkout."
67
67
  ).optional(),
68
68
  paymentMethod: z.object({
69
69
  typeId: z.string().describe(
70
- "Legacy payment method type ID. Supported values are `creditCard`, `payPal`."
70
+ "Legacy payment method type ID. Supported values: `creditCard`, `payPal`."
71
71
  ).min(1).max(100),
72
72
  paymentMethodTypeId: z.string().describe("Payment method type ID.").regex(
73
73
  /^[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}$/,
@@ -78,35 +78,39 @@ var UpsertSavedPaymentMethodRequest = z.object({
78
78
  "Must be a valid GUID"
79
79
  ).optional().nullable(),
80
80
  cardInfo: z.object({
81
- lastFourDigits: z.string().describe("Credit card's last 4 digits.").min(4).max(4).optional().nullable(),
81
+ lastFourDigits: z.string().describe("Payment card's last 4 digits.").min(4).max(4).optional().nullable(),
82
82
  bin: z.string().describe(
83
- "Credit card's BIN (Bank Identification Number). It's first 4-6 digits of card's number."
83
+ "Payment card's BIN (Bank Identification Number). First 4-6 digits of the card number."
84
84
  ).min(4).max(6).optional().nullable(),
85
- expirationMonth: z.number().int().describe("Credit card's expiration month.").min(1).max(12),
86
- expirationYear: z.number().int().describe("Credit card's expiration year.").min(2e3).max(2099),
87
- cardholderName: z.string().describe("Card holder's full name specified on the card.").min(1).max(1e3).optional().nullable()
88
- }).describe("Details of credit card.").optional()
85
+ expirationMonth: z.number().int().describe("Payment card's expiration month.").min(1).max(12),
86
+ expirationYear: z.number().int().describe("Payment card's expiration year.").min(2e3).max(2099),
87
+ cardholderName: z.string().describe("Cardholder's full name as it appears on the card.").min(1).max(1e3).optional().nullable()
88
+ }).describe("Payment card details.").optional()
89
89
  }).describe("Payment method details."),
90
90
  merchantUseAllowed: z.boolean().describe(
91
- "Defines whether this payment method can be used by the merchant for making unscheduled payments.\nEven if it's set to `false` payment method still can be used for scheduled payments e.g. subscription renewal without the buyer being present."
91
+ "Whether the merchant can use this payment method for unscheduled payments, such as manual charges.\nEven when set to `false`, the payment method can still be used for scheduled payments such as subscription renewals without the buyer being present."
92
92
  ).optional().nullable(),
93
93
  sensitiveInfo: z.object({
94
94
  cardSensitiveInfo: z.object({
95
- persistentToken: z.string().describe("Persistent token of credit card tokenized by Wix.").regex(
95
+ persistentToken: z.string().describe(
96
+ "Persistent token of a payment card tokenized by Wix."
97
+ ).regex(
96
98
  /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
97
99
  "Must be a valid GUID"
98
100
  ).optional().nullable()
99
- }).describe("Sensitive details of credit card like card token.").optional()
100
- }).describe("Saved payment method sensitive information.").optional(),
101
+ }).describe("Payment card sensitive details.").optional()
102
+ }).describe("Saved payment method's sensitive information.").optional(),
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
- }).describe("Data Extensions").optional()
106
- }).describe("Saved payment method."),
107
+ }).describe(
108
+ "Custom field data for the saved payment method object.\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."
109
+ ).optional()
110
+ }).describe("Saved payment method to create or update."),
107
111
  options: z.object({
108
112
  temporaryCardToken: z.string().describe(
109
- "Temporary token of credit card tokenized by Wix. This token is used to create a persistent token"
113
+ "Temporary token of a payment card tokenized by Wix. Used to create a persistent token for future transactions."
110
114
  ).regex(
111
115
  /^[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
116
  "Must be a valid GUID"
@@ -115,25 +119,25 @@ var UpsertSavedPaymentMethodRequest = z.object({
115
119
  });
116
120
  var UpsertSavedPaymentMethodResponse = z.object({
117
121
  savedPaymentMethod: z.object({
118
- _id: z.string().describe("Unique identifier of a saved payment method.").regex(
122
+ _id: z.string().describe("Saved payment method ID.").regex(
119
123
  /^[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}$/,
120
124
  "Must be a valid GUID"
121
125
  ).optional().nullable(),
122
126
  revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
123
- "Represents the current state of a saved payment method. Each time saved payment method is modified, its `revision` changes. For an update operation to succeed, you MUST pass the latest revision."
127
+ "Revision number, which increments by 1 each time the saved payment method is updated.\nTo prevent conflicting changes, the current revision must be passed when updating the saved payment method."
124
128
  ).optional().nullable(),
125
- _createdDate: z.date().describe("SavedPaymentMethod creation time.").optional().nullable(),
126
- _updatedDate: z.date().describe("SavedPaymentMethod last update time.").optional().nullable(),
127
- siteMemberId: z.string().describe("Saved payment method owner's member ID.").regex(
129
+ _createdDate: z.date().describe("Date and time the saved payment method was created.").optional().nullable(),
130
+ _updatedDate: z.date().describe("Date and time the saved payment method was last updated.").optional().nullable(),
131
+ siteMemberId: z.string().describe("ID of the site member who owns this saved payment method.").regex(
128
132
  /^[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}$/,
129
133
  "Must be a valid GUID"
130
134
  ).optional().nullable(),
131
135
  primary: z.boolean().describe(
132
- "Defines whether this payment method is primary for the member. Member can only have at most one primary saved payment method."
136
+ "Whether this saved payment method is the primary one for the member. Each member can have at most one primary saved payment method. The primary method is selected by default during checkout."
133
137
  ).optional(),
134
138
  paymentMethod: z.object({
135
139
  typeId: z.string().describe(
136
- "Legacy payment method type ID. Supported values are `creditCard`, `payPal`."
140
+ "Legacy payment method type ID. Supported values: `creditCard`, `payPal`."
137
141
  ).min(1).max(100).optional(),
138
142
  paymentMethodTypeId: z.string().describe("Payment method type ID.").regex(
139
143
  /^[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}$/,
@@ -144,32 +148,36 @@ var UpsertSavedPaymentMethodResponse = z.object({
144
148
  "Must be a valid GUID"
145
149
  ).optional().nullable(),
146
150
  cardInfo: z.object({
147
- lastFourDigits: z.string().describe("Credit card's last 4 digits.").min(4).max(4).optional().nullable(),
151
+ lastFourDigits: z.string().describe("Payment card's last 4 digits.").min(4).max(4).optional().nullable(),
148
152
  bin: z.string().describe(
149
- "Credit card's BIN (Bank Identification Number). It's first 4-6 digits of card's number."
153
+ "Payment card's BIN (Bank Identification Number). First 4-6 digits of the card number."
150
154
  ).min(4).max(6).optional().nullable(),
151
- expirationMonth: z.number().int().describe("Credit card's expiration month.").min(1).max(12).optional().nullable(),
152
- expirationYear: z.number().int().describe("Credit card's expiration year.").min(2e3).max(2099).optional().nullable(),
153
- cardholderName: z.string().describe("Card holder's full name specified on the card.").min(1).max(1e3).optional().nullable()
154
- }).describe("Details of credit card.").optional()
155
+ expirationMonth: z.number().int().describe("Payment card's expiration month.").min(1).max(12).optional().nullable(),
156
+ expirationYear: z.number().int().describe("Payment card's expiration year.").min(2e3).max(2099).optional().nullable(),
157
+ cardholderName: z.string().describe("Cardholder's full name as it appears on the card.").min(1).max(1e3).optional().nullable()
158
+ }).describe("Payment card details.").optional()
155
159
  }).describe("Payment method details.").optional(),
156
160
  merchantUseAllowed: z.boolean().describe(
157
- "Defines whether this payment method can be used by the merchant for making unscheduled payments.\nEven if it's set to `false` payment method still can be used for scheduled payments e.g. subscription renewal without the buyer being present."
161
+ "Whether the merchant can use this payment method for unscheduled payments, such as manual charges.\nEven when set to `false`, the payment method can still be used for scheduled payments such as subscription renewals without the buyer being present."
158
162
  ).optional().nullable(),
159
163
  sensitiveInfo: z.object({
160
164
  cardSensitiveInfo: z.object({
161
- persistentToken: z.string().describe("Persistent token of credit card tokenized by Wix.").regex(
165
+ persistentToken: z.string().describe(
166
+ "Persistent token of a payment card tokenized by Wix."
167
+ ).regex(
162
168
  /^[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}$/,
163
169
  "Must be a valid GUID"
164
170
  ).optional().nullable()
165
- }).describe("Sensitive details of credit card like card token.").optional()
166
- }).describe("Saved payment method sensitive information.").optional(),
171
+ }).describe("Payment card sensitive details.").optional()
172
+ }).describe("Saved payment method's sensitive information.").optional(),
167
173
  extendedFields: z.object({
168
174
  namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
169
175
  "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)."
170
176
  ).optional()
171
- }).describe("Data Extensions").optional()
172
- }).describe("Saved payment method.").optional()
177
+ }).describe(
178
+ "Custom field data for the saved payment method object.\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."
179
+ ).optional()
180
+ }).describe("Created or updated saved payment method.").optional()
173
181
  });
174
182
  var GetSavedPaymentMethodRequest = z.object({
175
183
  savedPaymentMethodId: z.string().describe("Unique identifier of a saved payment method.").regex(
@@ -181,25 +189,25 @@ var GetSavedPaymentMethodRequest = z.object({
181
189
  }).optional()
182
190
  });
183
191
  var GetSavedPaymentMethodResponse = z.object({
184
- _id: z.string().describe("Unique identifier of a saved payment method.").regex(
192
+ _id: z.string().describe("Saved payment method ID.").regex(
185
193
  /^[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}$/,
186
194
  "Must be a valid GUID"
187
195
  ).optional().nullable(),
188
196
  revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
189
- "Represents the current state of a saved payment method. Each time saved payment method is modified, its `revision` changes. For an update operation to succeed, you MUST pass the latest revision."
197
+ "Revision number, which increments by 1 each time the saved payment method is updated.\nTo prevent conflicting changes, the current revision must be passed when updating the saved payment method."
190
198
  ).optional().nullable(),
191
- _createdDate: z.date().describe("SavedPaymentMethod creation time.").optional().nullable(),
192
- _updatedDate: z.date().describe("SavedPaymentMethod last update time.").optional().nullable(),
193
- siteMemberId: z.string().describe("Saved payment method owner's member ID.").regex(
199
+ _createdDate: z.date().describe("Date and time the saved payment method was created.").optional().nullable(),
200
+ _updatedDate: z.date().describe("Date and time the saved payment method was last updated.").optional().nullable(),
201
+ siteMemberId: z.string().describe("ID of the site member who owns this saved payment method.").regex(
194
202
  /^[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}$/,
195
203
  "Must be a valid GUID"
196
204
  ).optional().nullable(),
197
205
  primary: z.boolean().describe(
198
- "Defines whether this payment method is primary for the member. Member can only have at most one primary saved payment method."
206
+ "Whether this saved payment method is the primary one for the member. Each member can have at most one primary saved payment method. The primary method is selected by default during checkout."
199
207
  ).optional(),
200
208
  paymentMethod: z.object({
201
209
  typeId: z.string().describe(
202
- "Legacy payment method type ID. Supported values are `creditCard`, `payPal`."
210
+ "Legacy payment method type ID. Supported values: `creditCard`, `payPal`."
203
211
  ).min(1).max(100).optional(),
204
212
  paymentMethodTypeId: z.string().describe("Payment method type ID.").regex(
205
213
  /^[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}$/,
@@ -210,31 +218,33 @@ var GetSavedPaymentMethodResponse = z.object({
210
218
  "Must be a valid GUID"
211
219
  ).optional().nullable(),
212
220
  cardInfo: z.object({
213
- lastFourDigits: z.string().describe("Credit card's last 4 digits.").min(4).max(4).optional().nullable(),
221
+ lastFourDigits: z.string().describe("Payment card's last 4 digits.").min(4).max(4).optional().nullable(),
214
222
  bin: z.string().describe(
215
- "Credit card's BIN (Bank Identification Number). It's first 4-6 digits of card's number."
223
+ "Payment card's BIN (Bank Identification Number). First 4-6 digits of the card number."
216
224
  ).min(4).max(6).optional().nullable(),
217
- expirationMonth: z.number().int().describe("Credit card's expiration month.").min(1).max(12).optional().nullable(),
218
- expirationYear: z.number().int().describe("Credit card's expiration year.").min(2e3).max(2099).optional().nullable(),
219
- cardholderName: z.string().describe("Card holder's full name specified on the card.").min(1).max(1e3).optional().nullable()
220
- }).describe("Details of credit card.").optional()
225
+ expirationMonth: z.number().int().describe("Payment card's expiration month.").min(1).max(12).optional().nullable(),
226
+ expirationYear: z.number().int().describe("Payment card's expiration year.").min(2e3).max(2099).optional().nullable(),
227
+ cardholderName: z.string().describe("Cardholder's full name as it appears on the card.").min(1).max(1e3).optional().nullable()
228
+ }).describe("Payment card details.").optional()
221
229
  }).describe("Payment method details.").optional(),
222
230
  merchantUseAllowed: z.boolean().describe(
223
- "Defines whether this payment method can be used by the merchant for making unscheduled payments.\nEven if it's set to `false` payment method still can be used for scheduled payments e.g. subscription renewal without the buyer being present."
231
+ "Whether the merchant can use this payment method for unscheduled payments, such as manual charges.\nEven when set to `false`, the payment method can still be used for scheduled payments such as subscription renewals without the buyer being present."
224
232
  ).optional().nullable(),
225
233
  sensitiveInfo: z.object({
226
234
  cardSensitiveInfo: z.object({
227
- persistentToken: z.string().describe("Persistent token of credit card tokenized by Wix.").regex(
235
+ persistentToken: z.string().describe("Persistent token of a payment card tokenized by Wix.").regex(
228
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}$/,
229
237
  "Must be a valid GUID"
230
238
  ).optional().nullable()
231
- }).describe("Sensitive details of credit card like card token.").optional()
232
- }).describe("Saved payment method sensitive information.").optional(),
239
+ }).describe("Payment card sensitive details.").optional()
240
+ }).describe("Saved payment method's sensitive information.").optional(),
233
241
  extendedFields: z.object({
234
242
  namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
235
243
  "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)."
236
244
  ).optional()
237
- }).describe("Data Extensions").optional()
245
+ }).describe(
246
+ "Custom field data for the saved payment method object.\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."
247
+ ).optional()
238
248
  });
239
249
  var DeleteSavedPaymentMethodRequest = z.object({
240
250
  savedPaymentMethodId: z.string().describe("Unique identifier of a saved payment method.").regex(
@@ -246,13 +256,13 @@ var DeleteSavedPaymentMethodResponse = z.object({});
246
256
  var ListSavedPaymentMethodsRequest = z.object({
247
257
  options: z.object({
248
258
  siteMemberId: z.string().describe(
249
- "Site member that owns saved payment methods.\nPass `me` to list saved payment method of the current site member."
259
+ "ID of the site member whose saved payment methods to list. Pass `me` to list the current site member's saved payment methods."
250
260
  ).min(2).max(36).optional().nullable(),
251
261
  paymentMethodTypeId: z.string().describe(
252
- "Payment method type id. Supported values are `creditCard`, `payPal`."
262
+ "Legacy payment method type ID. Supported values: `creditCard`, `payPal`."
253
263
  ).min(1).max(100).optional().nullable(),
254
264
  merchantUseAllowed: z.boolean().describe(
255
- "Defines whether this payment method can be used by the merchant for making unscheduled payments.\nEven if it's set to `false` payment method still can be used for scheduled payments e.g. subscription renewal without the buyer being present."
265
+ "Whether to filter by saved payment methods that are allowed for unscheduled merchant-initiated payments."
256
266
  ).optional().nullable(),
257
267
  fields: z.array(z.enum(["SENSITIVE_INFO"])).max(1).optional(),
258
268
  paging: z.object({
@@ -261,32 +271,32 @@ var ListSavedPaymentMethodsRequest = z.object({
261
271
  "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."
262
272
  ).max(16e3).optional().nullable()
263
273
  }).describe(
264
- "Paging for limit the response size.\nIf no paging provider default response limit 100 will be used."
274
+ "Cursor paging parameters.\n\nDefault: `100` results per page."
265
275
  ).optional()
266
276
  }).optional()
267
277
  });
268
278
  var ListSavedPaymentMethodsResponse = z.object({
269
279
  savedPaymentMethods: z.array(
270
280
  z.object({
271
- _id: z.string().describe("Unique identifier of a saved payment method.").regex(
281
+ _id: z.string().describe("Saved payment method ID.").regex(
272
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}$/,
273
283
  "Must be a valid GUID"
274
284
  ).optional().nullable(),
275
285
  revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
276
- "Represents the current state of a saved payment method. Each time saved payment method is modified, its `revision` changes. For an update operation to succeed, you MUST pass the latest revision."
286
+ "Revision number, which increments by 1 each time the saved payment method is updated.\nTo prevent conflicting changes, the current revision must be passed when updating the saved payment method."
277
287
  ).optional().nullable(),
278
- _createdDate: z.date().describe("SavedPaymentMethod creation time.").optional().nullable(),
279
- _updatedDate: z.date().describe("SavedPaymentMethod last update time.").optional().nullable(),
280
- siteMemberId: z.string().describe("Saved payment method owner's member ID.").regex(
288
+ _createdDate: z.date().describe("Date and time the saved payment method was created.").optional().nullable(),
289
+ _updatedDate: z.date().describe("Date and time the saved payment method was last updated.").optional().nullable(),
290
+ siteMemberId: z.string().describe("ID of the site member who owns this saved payment method.").regex(
281
291
  /^[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}$/,
282
292
  "Must be a valid GUID"
283
293
  ).optional().nullable(),
284
294
  primary: z.boolean().describe(
285
- "Defines whether this payment method is primary for the member. Member can only have at most one primary saved payment method."
295
+ "Whether this saved payment method is the primary one for the member. Each member can have at most one primary saved payment method. The primary method is selected by default during checkout."
286
296
  ).optional(),
287
297
  paymentMethod: z.object({
288
298
  typeId: z.string().describe(
289
- "Legacy payment method type ID. Supported values are `creditCard`, `payPal`."
299
+ "Legacy payment method type ID. Supported values: `creditCard`, `payPal`."
290
300
  ).min(1).max(100).optional(),
291
301
  paymentMethodTypeId: z.string().describe("Payment method type ID.").regex(
292
302
  /^[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}$/,
@@ -297,31 +307,35 @@ var ListSavedPaymentMethodsResponse = z.object({
297
307
  "Must be a valid GUID"
298
308
  ).optional().nullable(),
299
309
  cardInfo: z.object({
300
- lastFourDigits: z.string().describe("Credit card's last 4 digits.").min(4).max(4).optional().nullable(),
310
+ lastFourDigits: z.string().describe("Payment card's last 4 digits.").min(4).max(4).optional().nullable(),
301
311
  bin: z.string().describe(
302
- "Credit card's BIN (Bank Identification Number). It's first 4-6 digits of card's number."
312
+ "Payment card's BIN (Bank Identification Number). First 4-6 digits of the card number."
303
313
  ).min(4).max(6).optional().nullable(),
304
- expirationMonth: z.number().int().describe("Credit card's expiration month.").min(1).max(12).optional().nullable(),
305
- expirationYear: z.number().int().describe("Credit card's expiration year.").min(2e3).max(2099).optional().nullable(),
306
- cardholderName: z.string().describe("Card holder's full name specified on the card.").min(1).max(1e3).optional().nullable()
307
- }).describe("Details of credit card.").optional()
314
+ expirationMonth: z.number().int().describe("Payment card's expiration month.").min(1).max(12).optional().nullable(),
315
+ expirationYear: z.number().int().describe("Payment card's expiration year.").min(2e3).max(2099).optional().nullable(),
316
+ cardholderName: z.string().describe("Cardholder's full name as it appears on the card.").min(1).max(1e3).optional().nullable()
317
+ }).describe("Payment card details.").optional()
308
318
  }).describe("Payment method details.").optional(),
309
319
  merchantUseAllowed: z.boolean().describe(
310
- "Defines whether this payment method can be used by the merchant for making unscheduled payments.\nEven if it's set to `false` payment method still can be used for scheduled payments e.g. subscription renewal without the buyer being present."
320
+ "Whether the merchant can use this payment method for unscheduled payments, such as manual charges.\nEven when set to `false`, the payment method can still be used for scheduled payments such as subscription renewals without the buyer being present."
311
321
  ).optional().nullable(),
312
322
  sensitiveInfo: z.object({
313
323
  cardSensitiveInfo: z.object({
314
- persistentToken: z.string().describe("Persistent token of credit card tokenized by Wix.").regex(
324
+ persistentToken: z.string().describe(
325
+ "Persistent token of a payment card tokenized by Wix."
326
+ ).regex(
315
327
  /^[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}$/,
316
328
  "Must be a valid GUID"
317
329
  ).optional().nullable()
318
- }).describe("Sensitive details of credit card like card token.").optional()
319
- }).describe("Saved payment method sensitive information.").optional(),
330
+ }).describe("Payment card sensitive details.").optional()
331
+ }).describe("Saved payment method's sensitive information.").optional(),
320
332
  extendedFields: z.object({
321
333
  namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
322
334
  "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)."
323
335
  ).optional()
324
- }).describe("Data Extensions").optional()
336
+ }).describe(
337
+ "Custom field data for the saved payment method object.\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."
338
+ ).optional()
325
339
  })
326
340
  ).optional(),
327
341
  pagingMetadata: z.object({
@@ -339,34 +353,38 @@ var ListSavedPaymentMethodsResponse = z.object({
339
353
  hasNext: z.boolean().describe(
340
354
  "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."
341
355
  ).optional().nullable()
342
- }).describe("Paging metadata.").optional()
356
+ }).describe("Details on the paged set of results returned.").optional()
343
357
  });
344
358
  var UpdateSavedPaymentMethodRequest = z.object({
345
- _id: z.string().describe("Unique identifier of a saved payment method.").regex(
359
+ _id: z.string().describe("Saved payment method ID.").regex(
346
360
  /^[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}$/,
347
361
  "Must be a valid GUID"
348
362
  ),
349
363
  options: z.object({
350
364
  savedPaymentMethod: z.object({
351
- _id: z.string().describe("Unique identifier of a saved payment method.").regex(
365
+ _id: z.string().describe("Saved payment method ID.").regex(
352
366
  /^[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}$/,
353
367
  "Must be a valid GUID"
354
368
  ).optional().nullable(),
355
369
  revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
356
- "Represents the current state of a saved payment method. Each time saved payment method is modified, its `revision` changes. For an update operation to succeed, you MUST pass the latest revision."
370
+ "Revision number, which increments by 1 each time the saved payment method is updated.\nTo prevent conflicting changes, the current revision must be passed when updating the saved payment method."
357
371
  ),
358
- _createdDate: z.date().describe("SavedPaymentMethod creation time.").optional().nullable(),
359
- _updatedDate: z.date().describe("SavedPaymentMethod last update time.").optional().nullable(),
360
- siteMemberId: z.string().describe("Saved payment method owner's member ID.").regex(
372
+ _createdDate: z.date().describe("Date and time the saved payment method was created.").optional().nullable(),
373
+ _updatedDate: z.date().describe(
374
+ "Date and time the saved payment method was last updated."
375
+ ).optional().nullable(),
376
+ siteMemberId: z.string().describe(
377
+ "ID of the site member who owns this saved payment method."
378
+ ).regex(
361
379
  /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
362
380
  "Must be a valid GUID"
363
381
  ).optional().nullable(),
364
382
  primary: z.boolean().describe(
365
- "Defines whether this payment method is primary for the member. Member can only have at most one primary saved payment method."
383
+ "Whether this saved payment method is the primary one for the member. Each member can have at most one primary saved payment method. The primary method is selected by default during checkout."
366
384
  ).optional(),
367
385
  paymentMethod: z.object({
368
386
  typeId: z.string().describe(
369
- "Legacy payment method type ID. Supported values are `creditCard`, `payPal`."
387
+ "Legacy payment method type ID. Supported values: `creditCard`, `payPal`."
370
388
  ).min(1).max(100).optional(),
371
389
  paymentMethodTypeId: z.string().describe("Payment method type ID.").regex(
372
390
  /^[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}$/,
@@ -377,56 +395,60 @@ var UpdateSavedPaymentMethodRequest = z.object({
377
395
  "Must be a valid GUID"
378
396
  ).optional().nullable(),
379
397
  cardInfo: z.object({
380
- lastFourDigits: z.string().describe("Credit card's last 4 digits.").min(4).max(4).optional().nullable(),
398
+ lastFourDigits: z.string().describe("Payment card's last 4 digits.").min(4).max(4).optional().nullable(),
381
399
  bin: z.string().describe(
382
- "Credit card's BIN (Bank Identification Number). It's first 4-6 digits of card's number."
400
+ "Payment card's BIN (Bank Identification Number). First 4-6 digits of the card number."
383
401
  ).min(4).max(6).optional().nullable(),
384
- expirationMonth: z.number().int().describe("Credit card's expiration month.").min(1).max(12).optional().nullable(),
385
- expirationYear: z.number().int().describe("Credit card's expiration year.").min(2e3).max(2099).optional().nullable(),
386
- cardholderName: z.string().describe("Card holder's full name specified on the card.").min(1).max(1e3).optional().nullable()
387
- }).describe("Details of credit card.").optional()
402
+ expirationMonth: z.number().int().describe("Payment card's expiration month.").min(1).max(12).optional().nullable(),
403
+ expirationYear: z.number().int().describe("Payment card's expiration year.").min(2e3).max(2099).optional().nullable(),
404
+ cardholderName: z.string().describe(
405
+ "Cardholder's full name as it appears on the card."
406
+ ).min(1).max(1e3).optional().nullable()
407
+ }).describe("Payment card details.").optional()
388
408
  }).describe("Payment method details.").optional(),
389
409
  merchantUseAllowed: z.boolean().describe(
390
- "Defines whether this payment method can be used by the merchant for making unscheduled payments.\nEven if it's set to `false` payment method still can be used for scheduled payments e.g. subscription renewal without the buyer being present."
410
+ "Whether the merchant can use this payment method for unscheduled payments, such as manual charges.\nEven when set to `false`, the payment method can still be used for scheduled payments such as subscription renewals without the buyer being present."
391
411
  ).optional().nullable(),
392
412
  sensitiveInfo: z.object({
393
413
  cardSensitiveInfo: z.object({
394
414
  persistentToken: z.string().describe(
395
- "Persistent token of credit card tokenized by Wix."
415
+ "Persistent token of a payment card tokenized by Wix."
396
416
  ).regex(
397
417
  /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
398
418
  "Must be a valid GUID"
399
419
  ).optional().nullable()
400
- }).describe("Sensitive details of credit card like card token.").optional()
401
- }).describe("Saved payment method sensitive information.").optional(),
420
+ }).describe("Payment card sensitive details.").optional()
421
+ }).describe("Saved payment method's sensitive information.").optional(),
402
422
  extendedFields: z.object({
403
423
  namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
404
424
  "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)."
405
425
  ).optional()
406
- }).describe("Data Extensions").optional()
426
+ }).describe(
427
+ "Custom field data for the saved payment method object.\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."
428
+ ).optional()
407
429
  }).describe("Saved payment method to update.").optional()
408
430
  }).optional()
409
431
  });
410
432
  var UpdateSavedPaymentMethodResponse = z.object({
411
- _id: z.string().describe("Unique identifier of a saved payment method.").regex(
433
+ _id: z.string().describe("Saved payment method ID.").regex(
412
434
  /^[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}$/,
413
435
  "Must be a valid GUID"
414
436
  ).optional().nullable(),
415
437
  revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
416
- "Represents the current state of a saved payment method. Each time saved payment method is modified, its `revision` changes. For an update operation to succeed, you MUST pass the latest revision."
438
+ "Revision number, which increments by 1 each time the saved payment method is updated.\nTo prevent conflicting changes, the current revision must be passed when updating the saved payment method."
417
439
  ).optional().nullable(),
418
- _createdDate: z.date().describe("SavedPaymentMethod creation time.").optional().nullable(),
419
- _updatedDate: z.date().describe("SavedPaymentMethod last update time.").optional().nullable(),
420
- siteMemberId: z.string().describe("Saved payment method owner's member ID.").regex(
440
+ _createdDate: z.date().describe("Date and time the saved payment method was created.").optional().nullable(),
441
+ _updatedDate: z.date().describe("Date and time the saved payment method was last updated.").optional().nullable(),
442
+ siteMemberId: z.string().describe("ID of the site member who owns this saved payment method.").regex(
421
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}$/,
422
444
  "Must be a valid GUID"
423
445
  ).optional().nullable(),
424
446
  primary: z.boolean().describe(
425
- "Defines whether this payment method is primary for the member. Member can only have at most one primary saved payment method."
447
+ "Whether this saved payment method is the primary one for the member. Each member can have at most one primary saved payment method. The primary method is selected by default during checkout."
426
448
  ).optional(),
427
449
  paymentMethod: z.object({
428
450
  typeId: z.string().describe(
429
- "Legacy payment method type ID. Supported values are `creditCard`, `payPal`."
451
+ "Legacy payment method type ID. Supported values: `creditCard`, `payPal`."
430
452
  ).min(1).max(100).optional(),
431
453
  paymentMethodTypeId: z.string().describe("Payment method type ID.").regex(
432
454
  /^[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}$/,
@@ -437,31 +459,33 @@ var UpdateSavedPaymentMethodResponse = z.object({
437
459
  "Must be a valid GUID"
438
460
  ).optional().nullable(),
439
461
  cardInfo: z.object({
440
- lastFourDigits: z.string().describe("Credit card's last 4 digits.").min(4).max(4).optional().nullable(),
462
+ lastFourDigits: z.string().describe("Payment card's last 4 digits.").min(4).max(4).optional().nullable(),
441
463
  bin: z.string().describe(
442
- "Credit card's BIN (Bank Identification Number). It's first 4-6 digits of card's number."
464
+ "Payment card's BIN (Bank Identification Number). First 4-6 digits of the card number."
443
465
  ).min(4).max(6).optional().nullable(),
444
- expirationMonth: z.number().int().describe("Credit card's expiration month.").min(1).max(12).optional().nullable(),
445
- expirationYear: z.number().int().describe("Credit card's expiration year.").min(2e3).max(2099).optional().nullable(),
446
- cardholderName: z.string().describe("Card holder's full name specified on the card.").min(1).max(1e3).optional().nullable()
447
- }).describe("Details of credit card.").optional()
466
+ expirationMonth: z.number().int().describe("Payment card's expiration month.").min(1).max(12).optional().nullable(),
467
+ expirationYear: z.number().int().describe("Payment card's expiration year.").min(2e3).max(2099).optional().nullable(),
468
+ cardholderName: z.string().describe("Cardholder's full name as it appears on the card.").min(1).max(1e3).optional().nullable()
469
+ }).describe("Payment card details.").optional()
448
470
  }).describe("Payment method details.").optional(),
449
471
  merchantUseAllowed: z.boolean().describe(
450
- "Defines whether this payment method can be used by the merchant for making unscheduled payments.\nEven if it's set to `false` payment method still can be used for scheduled payments e.g. subscription renewal without the buyer being present."
472
+ "Whether the merchant can use this payment method for unscheduled payments, such as manual charges.\nEven when set to `false`, the payment method can still be used for scheduled payments such as subscription renewals without the buyer being present."
451
473
  ).optional().nullable(),
452
474
  sensitiveInfo: z.object({
453
475
  cardSensitiveInfo: z.object({
454
- persistentToken: z.string().describe("Persistent token of credit card tokenized by Wix.").regex(
476
+ persistentToken: z.string().describe("Persistent token of a payment card tokenized by Wix.").regex(
455
477
  /^[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}$/,
456
478
  "Must be a valid GUID"
457
479
  ).optional().nullable()
458
- }).describe("Sensitive details of credit card like card token.").optional()
459
- }).describe("Saved payment method sensitive information.").optional(),
480
+ }).describe("Payment card sensitive details.").optional()
481
+ }).describe("Saved payment method's sensitive information.").optional(),
460
482
  extendedFields: z.object({
461
483
  namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
462
484
  "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)."
463
485
  ).optional()
464
- }).describe("Data Extensions").optional()
486
+ }).describe(
487
+ "Custom field data for the saved payment method object.\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."
488
+ ).optional()
465
489
  });
466
490
  var MarkSavedPaymentMethodPrimaryRequest = z.object({
467
491
  savedPaymentMethodId: z.string().describe("Unique identifier of a saved payment method.").regex(