@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.
- package/build/cjs/index.d.ts +24 -14
- package/build/cjs/index.js +14 -1
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +86 -79
- package/build/cjs/index.typings.js +14 -1
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +38 -39
- package/build/cjs/meta.js +14 -1
- package/build/cjs/meta.js.map +1 -1
- package/build/cjs/schemas.js +141 -117
- package/build/cjs/schemas.js.map +1 -1
- package/build/es/index.d.mts +24 -14
- package/build/es/index.mjs +14 -1
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +86 -79
- package/build/es/index.typings.mjs +14 -1
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +38 -39
- package/build/es/meta.mjs +14 -1
- package/build/es/meta.mjs.map +1 -1
- package/build/es/schemas.mjs +141 -117
- package/build/es/schemas.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +24 -14
- package/build/internal/cjs/index.js +14 -1
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +86 -79
- package/build/internal/cjs/index.typings.js +14 -1
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +38 -39
- package/build/internal/cjs/meta.js +14 -1
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/cjs/schemas.js +141 -117
- package/build/internal/cjs/schemas.js.map +1 -1
- package/build/internal/es/index.d.mts +24 -14
- package/build/internal/es/index.mjs +14 -1
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +86 -79
- package/build/internal/es/index.typings.mjs +14 -1
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +38 -39
- package/build/internal/es/meta.mjs +14 -1
- package/build/internal/es/meta.mjs.map +1 -1
- package/build/internal/es/schemas.mjs +141 -117
- package/build/internal/es/schemas.mjs.map +1 -1
- 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("
|
|
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
|
-
"
|
|
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("
|
|
60
|
-
_updatedDate: z.date().describe("
|
|
61
|
-
siteMemberId: z.string().describe("
|
|
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
|
-
"
|
|
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
|
|
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("
|
|
81
|
+
lastFourDigits: z.string().describe("Payment card's last 4 digits.").min(4).max(4).optional().nullable(),
|
|
82
82
|
bin: z.string().describe(
|
|
83
|
-
"
|
|
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("
|
|
86
|
-
expirationYear: z.number().int().describe("
|
|
87
|
-
cardholderName: z.string().describe("
|
|
88
|
-
}).describe("
|
|
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
|
-
"
|
|
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(
|
|
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("
|
|
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(
|
|
106
|
-
|
|
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
|
|
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("
|
|
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
|
-
"
|
|
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("
|
|
126
|
-
_updatedDate: z.date().describe("
|
|
127
|
-
siteMemberId: z.string().describe("
|
|
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
|
-
"
|
|
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
|
|
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("
|
|
151
|
+
lastFourDigits: z.string().describe("Payment card's last 4 digits.").min(4).max(4).optional().nullable(),
|
|
148
152
|
bin: z.string().describe(
|
|
149
|
-
"
|
|
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("
|
|
152
|
-
expirationYear: z.number().int().describe("
|
|
153
|
-
cardholderName: z.string().describe("
|
|
154
|
-
}).describe("
|
|
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
|
-
"
|
|
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(
|
|
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("
|
|
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(
|
|
172
|
-
|
|
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("
|
|
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
|
-
"
|
|
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("
|
|
192
|
-
_updatedDate: z.date().describe("
|
|
193
|
-
siteMemberId: z.string().describe("
|
|
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
|
-
"
|
|
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
|
|
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("
|
|
221
|
+
lastFourDigits: z.string().describe("Payment card's last 4 digits.").min(4).max(4).optional().nullable(),
|
|
214
222
|
bin: z.string().describe(
|
|
215
|
-
"
|
|
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("
|
|
218
|
-
expirationYear: z.number().int().describe("
|
|
219
|
-
cardholderName: z.string().describe("
|
|
220
|
-
}).describe("
|
|
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
|
-
"
|
|
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
|
|
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("
|
|
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(
|
|
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
|
-
"
|
|
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
|
-
"
|
|
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
|
-
"
|
|
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
|
-
"
|
|
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("
|
|
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
|
-
"
|
|
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("
|
|
279
|
-
_updatedDate: z.date().describe("
|
|
280
|
-
siteMemberId: z.string().describe("
|
|
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
|
-
"
|
|
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
|
|
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("
|
|
310
|
+
lastFourDigits: z.string().describe("Payment card's last 4 digits.").min(4).max(4).optional().nullable(),
|
|
301
311
|
bin: z.string().describe(
|
|
302
|
-
"
|
|
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("
|
|
305
|
-
expirationYear: z.number().int().describe("
|
|
306
|
-
cardholderName: z.string().describe("
|
|
307
|
-
}).describe("
|
|
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
|
-
"
|
|
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(
|
|
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("
|
|
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(
|
|
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("
|
|
356
|
+
}).describe("Details on the paged set of results returned.").optional()
|
|
343
357
|
});
|
|
344
358
|
var UpdateSavedPaymentMethodRequest = z.object({
|
|
345
|
-
_id: z.string().describe("
|
|
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("
|
|
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
|
-
"
|
|
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("
|
|
359
|
-
_updatedDate: z.date().describe(
|
|
360
|
-
|
|
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
|
-
"
|
|
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
|
|
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("
|
|
398
|
+
lastFourDigits: z.string().describe("Payment card's last 4 digits.").min(4).max(4).optional().nullable(),
|
|
381
399
|
bin: z.string().describe(
|
|
382
|
-
"
|
|
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("
|
|
385
|
-
expirationYear: z.number().int().describe("
|
|
386
|
-
cardholderName: z.string().describe(
|
|
387
|
-
|
|
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
|
-
"
|
|
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
|
|
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("
|
|
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(
|
|
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("
|
|
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
|
-
"
|
|
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("
|
|
419
|
-
_updatedDate: z.date().describe("
|
|
420
|
-
siteMemberId: z.string().describe("
|
|
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
|
-
"
|
|
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
|
|
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("
|
|
462
|
+
lastFourDigits: z.string().describe("Payment card's last 4 digits.").min(4).max(4).optional().nullable(),
|
|
441
463
|
bin: z.string().describe(
|
|
442
|
-
"
|
|
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("
|
|
445
|
-
expirationYear: z.number().int().describe("
|
|
446
|
-
cardholderName: z.string().describe("
|
|
447
|
-
}).describe("
|
|
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
|
-
"
|
|
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
|
|
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("
|
|
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(
|
|
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(
|