@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
|
@@ -2,25 +2,25 @@
|
|
|
2
2
|
import * as z from "zod";
|
|
3
3
|
var UpsertSavedPaymentMethodRequest = z.object({
|
|
4
4
|
savedPaymentMethod: z.object({
|
|
5
|
-
_id: z.string().describe("
|
|
5
|
+
_id: z.string().describe("Saved payment method ID.").regex(
|
|
6
6
|
/^[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}$/,
|
|
7
7
|
"Must be a valid GUID"
|
|
8
8
|
).optional().nullable(),
|
|
9
9
|
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
10
|
-
"
|
|
10
|
+
"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."
|
|
11
11
|
).optional().nullable(),
|
|
12
|
-
_createdDate: z.date().describe("
|
|
13
|
-
_updatedDate: z.date().describe("
|
|
14
|
-
siteMemberId: z.string().describe("
|
|
12
|
+
_createdDate: z.date().describe("Date and time the saved payment method was created.").optional().nullable(),
|
|
13
|
+
_updatedDate: z.date().describe("Date and time the saved payment method was last updated.").optional().nullable(),
|
|
14
|
+
siteMemberId: z.string().describe("ID of the site member who owns this saved payment method.").regex(
|
|
15
15
|
/^[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}$/,
|
|
16
16
|
"Must be a valid GUID"
|
|
17
17
|
).optional().nullable(),
|
|
18
18
|
primary: z.boolean().describe(
|
|
19
|
-
"
|
|
19
|
+
"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."
|
|
20
20
|
).optional(),
|
|
21
21
|
paymentMethod: z.object({
|
|
22
22
|
typeId: z.string().describe(
|
|
23
|
-
"Legacy payment method type ID. Supported values
|
|
23
|
+
"Legacy payment method type ID. Supported values: `creditCard`, `payPal`."
|
|
24
24
|
).min(1).max(100),
|
|
25
25
|
paymentMethodTypeId: z.string().describe("Payment method type ID.").regex(
|
|
26
26
|
/^[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}$/,
|
|
@@ -31,35 +31,39 @@ var UpsertSavedPaymentMethodRequest = z.object({
|
|
|
31
31
|
"Must be a valid GUID"
|
|
32
32
|
).optional().nullable(),
|
|
33
33
|
cardInfo: z.object({
|
|
34
|
-
lastFourDigits: z.string().describe("
|
|
34
|
+
lastFourDigits: z.string().describe("Payment card's last 4 digits.").min(4).max(4).optional().nullable(),
|
|
35
35
|
bin: z.string().describe(
|
|
36
|
-
"
|
|
36
|
+
"Payment card's BIN (Bank Identification Number). First 4-6 digits of the card number."
|
|
37
37
|
).min(4).max(6).optional().nullable(),
|
|
38
|
-
expirationMonth: z.number().int().describe("
|
|
39
|
-
expirationYear: z.number().int().describe("
|
|
40
|
-
cardholderName: z.string().describe("
|
|
41
|
-
}).describe("
|
|
38
|
+
expirationMonth: z.number().int().describe("Payment card's expiration month.").min(1).max(12),
|
|
39
|
+
expirationYear: z.number().int().describe("Payment card's expiration year.").min(2e3).max(2099),
|
|
40
|
+
cardholderName: z.string().describe("Cardholder's full name as it appears on the card.").min(1).max(1e3).optional().nullable()
|
|
41
|
+
}).describe("Payment card details.").optional()
|
|
42
42
|
}).describe("Payment method details."),
|
|
43
43
|
merchantUseAllowed: z.boolean().describe(
|
|
44
|
-
"
|
|
44
|
+
"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."
|
|
45
45
|
).optional().nullable(),
|
|
46
46
|
sensitiveInfo: z.object({
|
|
47
47
|
cardSensitiveInfo: z.object({
|
|
48
|
-
persistentToken: z.string().describe(
|
|
48
|
+
persistentToken: z.string().describe(
|
|
49
|
+
"Persistent token of a payment card tokenized by Wix."
|
|
50
|
+
).regex(
|
|
49
51
|
/^[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}$/,
|
|
50
52
|
"Must be a valid GUID"
|
|
51
53
|
).optional().nullable()
|
|
52
|
-
}).describe("
|
|
53
|
-
}).describe("Saved payment method sensitive information.").optional(),
|
|
54
|
+
}).describe("Payment card sensitive details.").optional()
|
|
55
|
+
}).describe("Saved payment method's sensitive information.").optional(),
|
|
54
56
|
extendedFields: z.object({
|
|
55
57
|
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
56
58
|
"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)."
|
|
57
59
|
).optional()
|
|
58
|
-
}).describe(
|
|
59
|
-
|
|
60
|
+
}).describe(
|
|
61
|
+
"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."
|
|
62
|
+
).optional()
|
|
63
|
+
}).describe("Saved payment method to create or update."),
|
|
60
64
|
options: z.object({
|
|
61
65
|
temporaryCardToken: z.string().describe(
|
|
62
|
-
"Temporary token of
|
|
66
|
+
"Temporary token of a payment card tokenized by Wix. Used to create a persistent token for future transactions."
|
|
63
67
|
).regex(
|
|
64
68
|
/^[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}$/,
|
|
65
69
|
"Must be a valid GUID"
|
|
@@ -68,25 +72,25 @@ var UpsertSavedPaymentMethodRequest = z.object({
|
|
|
68
72
|
});
|
|
69
73
|
var UpsertSavedPaymentMethodResponse = z.object({
|
|
70
74
|
savedPaymentMethod: z.object({
|
|
71
|
-
_id: z.string().describe("
|
|
75
|
+
_id: z.string().describe("Saved payment method ID.").regex(
|
|
72
76
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
73
77
|
"Must be a valid GUID"
|
|
74
78
|
).optional().nullable(),
|
|
75
79
|
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
76
|
-
"
|
|
80
|
+
"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."
|
|
77
81
|
).optional().nullable(),
|
|
78
|
-
_createdDate: z.date().describe("
|
|
79
|
-
_updatedDate: z.date().describe("
|
|
80
|
-
siteMemberId: z.string().describe("
|
|
82
|
+
_createdDate: z.date().describe("Date and time the saved payment method was created.").optional().nullable(),
|
|
83
|
+
_updatedDate: z.date().describe("Date and time the saved payment method was last updated.").optional().nullable(),
|
|
84
|
+
siteMemberId: z.string().describe("ID of the site member who owns this saved payment method.").regex(
|
|
81
85
|
/^[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}$/,
|
|
82
86
|
"Must be a valid GUID"
|
|
83
87
|
).optional().nullable(),
|
|
84
88
|
primary: z.boolean().describe(
|
|
85
|
-
"
|
|
89
|
+
"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."
|
|
86
90
|
).optional(),
|
|
87
91
|
paymentMethod: z.object({
|
|
88
92
|
typeId: z.string().describe(
|
|
89
|
-
"Legacy payment method type ID. Supported values
|
|
93
|
+
"Legacy payment method type ID. Supported values: `creditCard`, `payPal`."
|
|
90
94
|
).min(1).max(100).optional(),
|
|
91
95
|
paymentMethodTypeId: z.string().describe("Payment method type ID.").regex(
|
|
92
96
|
/^[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,32 +101,36 @@ var UpsertSavedPaymentMethodResponse = z.object({
|
|
|
97
101
|
"Must be a valid GUID"
|
|
98
102
|
).optional().nullable(),
|
|
99
103
|
cardInfo: z.object({
|
|
100
|
-
lastFourDigits: z.string().describe("
|
|
104
|
+
lastFourDigits: z.string().describe("Payment card's last 4 digits.").min(4).max(4).optional().nullable(),
|
|
101
105
|
bin: z.string().describe(
|
|
102
|
-
"
|
|
106
|
+
"Payment card's BIN (Bank Identification Number). First 4-6 digits of the card number."
|
|
103
107
|
).min(4).max(6).optional().nullable(),
|
|
104
|
-
expirationMonth: z.number().int().describe("
|
|
105
|
-
expirationYear: z.number().int().describe("
|
|
106
|
-
cardholderName: z.string().describe("
|
|
107
|
-
}).describe("
|
|
108
|
+
expirationMonth: z.number().int().describe("Payment card's expiration month.").min(1).max(12).optional().nullable(),
|
|
109
|
+
expirationYear: z.number().int().describe("Payment card's expiration year.").min(2e3).max(2099).optional().nullable(),
|
|
110
|
+
cardholderName: z.string().describe("Cardholder's full name as it appears on the card.").min(1).max(1e3).optional().nullable()
|
|
111
|
+
}).describe("Payment card details.").optional()
|
|
108
112
|
}).describe("Payment method details.").optional(),
|
|
109
113
|
merchantUseAllowed: z.boolean().describe(
|
|
110
|
-
"
|
|
114
|
+
"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."
|
|
111
115
|
).optional().nullable(),
|
|
112
116
|
sensitiveInfo: z.object({
|
|
113
117
|
cardSensitiveInfo: z.object({
|
|
114
|
-
persistentToken: z.string().describe(
|
|
118
|
+
persistentToken: z.string().describe(
|
|
119
|
+
"Persistent token of a payment card tokenized by Wix."
|
|
120
|
+
).regex(
|
|
115
121
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
116
122
|
"Must be a valid GUID"
|
|
117
123
|
).optional().nullable()
|
|
118
|
-
}).describe("
|
|
119
|
-
}).describe("Saved payment method sensitive information.").optional(),
|
|
124
|
+
}).describe("Payment card sensitive details.").optional()
|
|
125
|
+
}).describe("Saved payment method's sensitive information.").optional(),
|
|
120
126
|
extendedFields: z.object({
|
|
121
127
|
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
122
128
|
"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)."
|
|
123
129
|
).optional()
|
|
124
|
-
}).describe(
|
|
125
|
-
|
|
130
|
+
}).describe(
|
|
131
|
+
"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."
|
|
132
|
+
).optional()
|
|
133
|
+
}).describe("Created or updated saved payment method.").optional()
|
|
126
134
|
});
|
|
127
135
|
var GetSavedPaymentMethodRequest = z.object({
|
|
128
136
|
savedPaymentMethodId: z.string().describe("Unique identifier of a saved payment method.").regex(
|
|
@@ -134,25 +142,25 @@ var GetSavedPaymentMethodRequest = z.object({
|
|
|
134
142
|
}).optional()
|
|
135
143
|
});
|
|
136
144
|
var GetSavedPaymentMethodResponse = z.object({
|
|
137
|
-
_id: z.string().describe("
|
|
145
|
+
_id: z.string().describe("Saved payment method ID.").regex(
|
|
138
146
|
/^[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}$/,
|
|
139
147
|
"Must be a valid GUID"
|
|
140
148
|
).optional().nullable(),
|
|
141
149
|
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
142
|
-
"
|
|
150
|
+
"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."
|
|
143
151
|
).optional().nullable(),
|
|
144
|
-
_createdDate: z.date().describe("
|
|
145
|
-
_updatedDate: z.date().describe("
|
|
146
|
-
siteMemberId: z.string().describe("
|
|
152
|
+
_createdDate: z.date().describe("Date and time the saved payment method was created.").optional().nullable(),
|
|
153
|
+
_updatedDate: z.date().describe("Date and time the saved payment method was last updated.").optional().nullable(),
|
|
154
|
+
siteMemberId: z.string().describe("ID of the site member who owns this saved payment method.").regex(
|
|
147
155
|
/^[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}$/,
|
|
148
156
|
"Must be a valid GUID"
|
|
149
157
|
).optional().nullable(),
|
|
150
158
|
primary: z.boolean().describe(
|
|
151
|
-
"
|
|
159
|
+
"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."
|
|
152
160
|
).optional(),
|
|
153
161
|
paymentMethod: z.object({
|
|
154
162
|
typeId: z.string().describe(
|
|
155
|
-
"Legacy payment method type ID. Supported values
|
|
163
|
+
"Legacy payment method type ID. Supported values: `creditCard`, `payPal`."
|
|
156
164
|
).min(1).max(100).optional(),
|
|
157
165
|
paymentMethodTypeId: z.string().describe("Payment method type ID.").regex(
|
|
158
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}$/,
|
|
@@ -163,31 +171,33 @@ var GetSavedPaymentMethodResponse = z.object({
|
|
|
163
171
|
"Must be a valid GUID"
|
|
164
172
|
).optional().nullable(),
|
|
165
173
|
cardInfo: z.object({
|
|
166
|
-
lastFourDigits: z.string().describe("
|
|
174
|
+
lastFourDigits: z.string().describe("Payment card's last 4 digits.").min(4).max(4).optional().nullable(),
|
|
167
175
|
bin: z.string().describe(
|
|
168
|
-
"
|
|
176
|
+
"Payment card's BIN (Bank Identification Number). First 4-6 digits of the card number."
|
|
169
177
|
).min(4).max(6).optional().nullable(),
|
|
170
|
-
expirationMonth: z.number().int().describe("
|
|
171
|
-
expirationYear: z.number().int().describe("
|
|
172
|
-
cardholderName: z.string().describe("
|
|
173
|
-
}).describe("
|
|
178
|
+
expirationMonth: z.number().int().describe("Payment card's expiration month.").min(1).max(12).optional().nullable(),
|
|
179
|
+
expirationYear: z.number().int().describe("Payment card's expiration year.").min(2e3).max(2099).optional().nullable(),
|
|
180
|
+
cardholderName: z.string().describe("Cardholder's full name as it appears on the card.").min(1).max(1e3).optional().nullable()
|
|
181
|
+
}).describe("Payment card details.").optional()
|
|
174
182
|
}).describe("Payment method details.").optional(),
|
|
175
183
|
merchantUseAllowed: z.boolean().describe(
|
|
176
|
-
"
|
|
184
|
+
"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."
|
|
177
185
|
).optional().nullable(),
|
|
178
186
|
sensitiveInfo: z.object({
|
|
179
187
|
cardSensitiveInfo: z.object({
|
|
180
|
-
persistentToken: z.string().describe("Persistent token of
|
|
188
|
+
persistentToken: z.string().describe("Persistent token of a payment card tokenized by Wix.").regex(
|
|
181
189
|
/^[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}$/,
|
|
182
190
|
"Must be a valid GUID"
|
|
183
191
|
).optional().nullable()
|
|
184
|
-
}).describe("
|
|
185
|
-
}).describe("Saved payment method sensitive information.").optional(),
|
|
192
|
+
}).describe("Payment card sensitive details.").optional()
|
|
193
|
+
}).describe("Saved payment method's sensitive information.").optional(),
|
|
186
194
|
extendedFields: z.object({
|
|
187
195
|
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
188
196
|
"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)."
|
|
189
197
|
).optional()
|
|
190
|
-
}).describe(
|
|
198
|
+
}).describe(
|
|
199
|
+
"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."
|
|
200
|
+
).optional()
|
|
191
201
|
});
|
|
192
202
|
var DeleteSavedPaymentMethodRequest = z.object({
|
|
193
203
|
savedPaymentMethodId: z.string().describe("Unique identifier of a saved payment method.").regex(
|
|
@@ -199,13 +209,13 @@ var DeleteSavedPaymentMethodResponse = z.object({});
|
|
|
199
209
|
var ListSavedPaymentMethodsRequest = z.object({
|
|
200
210
|
options: z.object({
|
|
201
211
|
siteMemberId: z.string().describe(
|
|
202
|
-
"
|
|
212
|
+
"ID of the site member whose saved payment methods to list. Pass `me` to list the current site member's saved payment methods."
|
|
203
213
|
).min(2).max(36).optional().nullable(),
|
|
204
214
|
paymentMethodTypeId: z.string().describe(
|
|
205
|
-
"
|
|
215
|
+
"Legacy payment method type ID. Supported values: `creditCard`, `payPal`."
|
|
206
216
|
).min(1).max(100).optional().nullable(),
|
|
207
217
|
merchantUseAllowed: z.boolean().describe(
|
|
208
|
-
"
|
|
218
|
+
"Whether to filter by saved payment methods that are allowed for unscheduled merchant-initiated payments."
|
|
209
219
|
).optional().nullable(),
|
|
210
220
|
fields: z.array(z.enum(["SENSITIVE_INFO"])).max(1).optional(),
|
|
211
221
|
paging: z.object({
|
|
@@ -214,32 +224,32 @@ var ListSavedPaymentMethodsRequest = z.object({
|
|
|
214
224
|
"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."
|
|
215
225
|
).max(16e3).optional().nullable()
|
|
216
226
|
}).describe(
|
|
217
|
-
"
|
|
227
|
+
"Cursor paging parameters.\n\nDefault: `100` results per page."
|
|
218
228
|
).optional()
|
|
219
229
|
}).optional()
|
|
220
230
|
});
|
|
221
231
|
var ListSavedPaymentMethodsResponse = z.object({
|
|
222
232
|
savedPaymentMethods: z.array(
|
|
223
233
|
z.object({
|
|
224
|
-
_id: z.string().describe("
|
|
234
|
+
_id: z.string().describe("Saved payment method ID.").regex(
|
|
225
235
|
/^[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}$/,
|
|
226
236
|
"Must be a valid GUID"
|
|
227
237
|
).optional().nullable(),
|
|
228
238
|
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
229
|
-
"
|
|
239
|
+
"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."
|
|
230
240
|
).optional().nullable(),
|
|
231
|
-
_createdDate: z.date().describe("
|
|
232
|
-
_updatedDate: z.date().describe("
|
|
233
|
-
siteMemberId: z.string().describe("
|
|
241
|
+
_createdDate: z.date().describe("Date and time the saved payment method was created.").optional().nullable(),
|
|
242
|
+
_updatedDate: z.date().describe("Date and time the saved payment method was last updated.").optional().nullable(),
|
|
243
|
+
siteMemberId: z.string().describe("ID of the site member who owns this saved payment method.").regex(
|
|
234
244
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
235
245
|
"Must be a valid GUID"
|
|
236
246
|
).optional().nullable(),
|
|
237
247
|
primary: z.boolean().describe(
|
|
238
|
-
"
|
|
248
|
+
"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."
|
|
239
249
|
).optional(),
|
|
240
250
|
paymentMethod: z.object({
|
|
241
251
|
typeId: z.string().describe(
|
|
242
|
-
"Legacy payment method type ID. Supported values
|
|
252
|
+
"Legacy payment method type ID. Supported values: `creditCard`, `payPal`."
|
|
243
253
|
).min(1).max(100).optional(),
|
|
244
254
|
paymentMethodTypeId: z.string().describe("Payment method type ID.").regex(
|
|
245
255
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
@@ -250,31 +260,35 @@ var ListSavedPaymentMethodsResponse = z.object({
|
|
|
250
260
|
"Must be a valid GUID"
|
|
251
261
|
).optional().nullable(),
|
|
252
262
|
cardInfo: z.object({
|
|
253
|
-
lastFourDigits: z.string().describe("
|
|
263
|
+
lastFourDigits: z.string().describe("Payment card's last 4 digits.").min(4).max(4).optional().nullable(),
|
|
254
264
|
bin: z.string().describe(
|
|
255
|
-
"
|
|
265
|
+
"Payment card's BIN (Bank Identification Number). First 4-6 digits of the card number."
|
|
256
266
|
).min(4).max(6).optional().nullable(),
|
|
257
|
-
expirationMonth: z.number().int().describe("
|
|
258
|
-
expirationYear: z.number().int().describe("
|
|
259
|
-
cardholderName: z.string().describe("
|
|
260
|
-
}).describe("
|
|
267
|
+
expirationMonth: z.number().int().describe("Payment card's expiration month.").min(1).max(12).optional().nullable(),
|
|
268
|
+
expirationYear: z.number().int().describe("Payment card's expiration year.").min(2e3).max(2099).optional().nullable(),
|
|
269
|
+
cardholderName: z.string().describe("Cardholder's full name as it appears on the card.").min(1).max(1e3).optional().nullable()
|
|
270
|
+
}).describe("Payment card details.").optional()
|
|
261
271
|
}).describe("Payment method details.").optional(),
|
|
262
272
|
merchantUseAllowed: z.boolean().describe(
|
|
263
|
-
"
|
|
273
|
+
"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."
|
|
264
274
|
).optional().nullable(),
|
|
265
275
|
sensitiveInfo: z.object({
|
|
266
276
|
cardSensitiveInfo: z.object({
|
|
267
|
-
persistentToken: z.string().describe(
|
|
277
|
+
persistentToken: z.string().describe(
|
|
278
|
+
"Persistent token of a payment card tokenized by Wix."
|
|
279
|
+
).regex(
|
|
268
280
|
/^[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}$/,
|
|
269
281
|
"Must be a valid GUID"
|
|
270
282
|
).optional().nullable()
|
|
271
|
-
}).describe("
|
|
272
|
-
}).describe("Saved payment method sensitive information.").optional(),
|
|
283
|
+
}).describe("Payment card sensitive details.").optional()
|
|
284
|
+
}).describe("Saved payment method's sensitive information.").optional(),
|
|
273
285
|
extendedFields: z.object({
|
|
274
286
|
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
275
287
|
"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)."
|
|
276
288
|
).optional()
|
|
277
|
-
}).describe(
|
|
289
|
+
}).describe(
|
|
290
|
+
"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."
|
|
291
|
+
).optional()
|
|
278
292
|
})
|
|
279
293
|
).optional(),
|
|
280
294
|
pagingMetadata: z.object({
|
|
@@ -292,34 +306,38 @@ var ListSavedPaymentMethodsResponse = z.object({
|
|
|
292
306
|
hasNext: z.boolean().describe(
|
|
293
307
|
"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."
|
|
294
308
|
).optional().nullable()
|
|
295
|
-
}).describe("
|
|
309
|
+
}).describe("Details on the paged set of results returned.").optional()
|
|
296
310
|
});
|
|
297
311
|
var UpdateSavedPaymentMethodRequest = z.object({
|
|
298
|
-
_id: z.string().describe("
|
|
312
|
+
_id: z.string().describe("Saved payment method ID.").regex(
|
|
299
313
|
/^[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}$/,
|
|
300
314
|
"Must be a valid GUID"
|
|
301
315
|
),
|
|
302
316
|
options: z.object({
|
|
303
317
|
savedPaymentMethod: z.object({
|
|
304
|
-
_id: z.string().describe("
|
|
318
|
+
_id: z.string().describe("Saved payment method ID.").regex(
|
|
305
319
|
/^[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}$/,
|
|
306
320
|
"Must be a valid GUID"
|
|
307
321
|
).optional().nullable(),
|
|
308
322
|
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
309
|
-
"
|
|
323
|
+
"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."
|
|
310
324
|
),
|
|
311
|
-
_createdDate: z.date().describe("
|
|
312
|
-
_updatedDate: z.date().describe(
|
|
313
|
-
|
|
325
|
+
_createdDate: z.date().describe("Date and time the saved payment method was created.").optional().nullable(),
|
|
326
|
+
_updatedDate: z.date().describe(
|
|
327
|
+
"Date and time the saved payment method was last updated."
|
|
328
|
+
).optional().nullable(),
|
|
329
|
+
siteMemberId: z.string().describe(
|
|
330
|
+
"ID of the site member who owns this saved payment method."
|
|
331
|
+
).regex(
|
|
314
332
|
/^[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}$/,
|
|
315
333
|
"Must be a valid GUID"
|
|
316
334
|
).optional().nullable(),
|
|
317
335
|
primary: z.boolean().describe(
|
|
318
|
-
"
|
|
336
|
+
"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."
|
|
319
337
|
).optional(),
|
|
320
338
|
paymentMethod: z.object({
|
|
321
339
|
typeId: z.string().describe(
|
|
322
|
-
"Legacy payment method type ID. Supported values
|
|
340
|
+
"Legacy payment method type ID. Supported values: `creditCard`, `payPal`."
|
|
323
341
|
).min(1).max(100).optional(),
|
|
324
342
|
paymentMethodTypeId: z.string().describe("Payment method type ID.").regex(
|
|
325
343
|
/^[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}$/,
|
|
@@ -330,56 +348,60 @@ var UpdateSavedPaymentMethodRequest = z.object({
|
|
|
330
348
|
"Must be a valid GUID"
|
|
331
349
|
).optional().nullable(),
|
|
332
350
|
cardInfo: z.object({
|
|
333
|
-
lastFourDigits: z.string().describe("
|
|
351
|
+
lastFourDigits: z.string().describe("Payment card's last 4 digits.").min(4).max(4).optional().nullable(),
|
|
334
352
|
bin: z.string().describe(
|
|
335
|
-
"
|
|
353
|
+
"Payment card's BIN (Bank Identification Number). First 4-6 digits of the card number."
|
|
336
354
|
).min(4).max(6).optional().nullable(),
|
|
337
|
-
expirationMonth: z.number().int().describe("
|
|
338
|
-
expirationYear: z.number().int().describe("
|
|
339
|
-
cardholderName: z.string().describe(
|
|
340
|
-
|
|
355
|
+
expirationMonth: z.number().int().describe("Payment card's expiration month.").min(1).max(12).optional().nullable(),
|
|
356
|
+
expirationYear: z.number().int().describe("Payment card's expiration year.").min(2e3).max(2099).optional().nullable(),
|
|
357
|
+
cardholderName: z.string().describe(
|
|
358
|
+
"Cardholder's full name as it appears on the card."
|
|
359
|
+
).min(1).max(1e3).optional().nullable()
|
|
360
|
+
}).describe("Payment card details.").optional()
|
|
341
361
|
}).describe("Payment method details.").optional(),
|
|
342
362
|
merchantUseAllowed: z.boolean().describe(
|
|
343
|
-
"
|
|
363
|
+
"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."
|
|
344
364
|
).optional().nullable(),
|
|
345
365
|
sensitiveInfo: z.object({
|
|
346
366
|
cardSensitiveInfo: z.object({
|
|
347
367
|
persistentToken: z.string().describe(
|
|
348
|
-
"Persistent token of
|
|
368
|
+
"Persistent token of a payment card tokenized by Wix."
|
|
349
369
|
).regex(
|
|
350
370
|
/^[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}$/,
|
|
351
371
|
"Must be a valid GUID"
|
|
352
372
|
).optional().nullable()
|
|
353
|
-
}).describe("
|
|
354
|
-
}).describe("Saved payment method sensitive information.").optional(),
|
|
373
|
+
}).describe("Payment card sensitive details.").optional()
|
|
374
|
+
}).describe("Saved payment method's sensitive information.").optional(),
|
|
355
375
|
extendedFields: z.object({
|
|
356
376
|
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
357
377
|
"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)."
|
|
358
378
|
).optional()
|
|
359
|
-
}).describe(
|
|
379
|
+
}).describe(
|
|
380
|
+
"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."
|
|
381
|
+
).optional()
|
|
360
382
|
}).describe("Saved payment method to update.").optional()
|
|
361
383
|
}).optional()
|
|
362
384
|
});
|
|
363
385
|
var UpdateSavedPaymentMethodResponse = z.object({
|
|
364
|
-
_id: z.string().describe("
|
|
386
|
+
_id: z.string().describe("Saved payment method ID.").regex(
|
|
365
387
|
/^[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}$/,
|
|
366
388
|
"Must be a valid GUID"
|
|
367
389
|
).optional().nullable(),
|
|
368
390
|
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
369
|
-
"
|
|
391
|
+
"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."
|
|
370
392
|
).optional().nullable(),
|
|
371
|
-
_createdDate: z.date().describe("
|
|
372
|
-
_updatedDate: z.date().describe("
|
|
373
|
-
siteMemberId: z.string().describe("
|
|
393
|
+
_createdDate: z.date().describe("Date and time the saved payment method was created.").optional().nullable(),
|
|
394
|
+
_updatedDate: z.date().describe("Date and time the saved payment method was last updated.").optional().nullable(),
|
|
395
|
+
siteMemberId: z.string().describe("ID of the site member who owns this saved payment method.").regex(
|
|
374
396
|
/^[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}$/,
|
|
375
397
|
"Must be a valid GUID"
|
|
376
398
|
).optional().nullable(),
|
|
377
399
|
primary: z.boolean().describe(
|
|
378
|
-
"
|
|
400
|
+
"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."
|
|
379
401
|
).optional(),
|
|
380
402
|
paymentMethod: z.object({
|
|
381
403
|
typeId: z.string().describe(
|
|
382
|
-
"Legacy payment method type ID. Supported values
|
|
404
|
+
"Legacy payment method type ID. Supported values: `creditCard`, `payPal`."
|
|
383
405
|
).min(1).max(100).optional(),
|
|
384
406
|
paymentMethodTypeId: z.string().describe("Payment method type ID.").regex(
|
|
385
407
|
/^[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}$/,
|
|
@@ -390,31 +412,33 @@ var UpdateSavedPaymentMethodResponse = z.object({
|
|
|
390
412
|
"Must be a valid GUID"
|
|
391
413
|
).optional().nullable(),
|
|
392
414
|
cardInfo: z.object({
|
|
393
|
-
lastFourDigits: z.string().describe("
|
|
415
|
+
lastFourDigits: z.string().describe("Payment card's last 4 digits.").min(4).max(4).optional().nullable(),
|
|
394
416
|
bin: z.string().describe(
|
|
395
|
-
"
|
|
417
|
+
"Payment card's BIN (Bank Identification Number). First 4-6 digits of the card number."
|
|
396
418
|
).min(4).max(6).optional().nullable(),
|
|
397
|
-
expirationMonth: z.number().int().describe("
|
|
398
|
-
expirationYear: z.number().int().describe("
|
|
399
|
-
cardholderName: z.string().describe("
|
|
400
|
-
}).describe("
|
|
419
|
+
expirationMonth: z.number().int().describe("Payment card's expiration month.").min(1).max(12).optional().nullable(),
|
|
420
|
+
expirationYear: z.number().int().describe("Payment card's expiration year.").min(2e3).max(2099).optional().nullable(),
|
|
421
|
+
cardholderName: z.string().describe("Cardholder's full name as it appears on the card.").min(1).max(1e3).optional().nullable()
|
|
422
|
+
}).describe("Payment card details.").optional()
|
|
401
423
|
}).describe("Payment method details.").optional(),
|
|
402
424
|
merchantUseAllowed: z.boolean().describe(
|
|
403
|
-
"
|
|
425
|
+
"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."
|
|
404
426
|
).optional().nullable(),
|
|
405
427
|
sensitiveInfo: z.object({
|
|
406
428
|
cardSensitiveInfo: z.object({
|
|
407
|
-
persistentToken: z.string().describe("Persistent token of
|
|
429
|
+
persistentToken: z.string().describe("Persistent token of a payment card tokenized by Wix.").regex(
|
|
408
430
|
/^[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}$/,
|
|
409
431
|
"Must be a valid GUID"
|
|
410
432
|
).optional().nullable()
|
|
411
|
-
}).describe("
|
|
412
|
-
}).describe("Saved payment method sensitive information.").optional(),
|
|
433
|
+
}).describe("Payment card sensitive details.").optional()
|
|
434
|
+
}).describe("Saved payment method's sensitive information.").optional(),
|
|
413
435
|
extendedFields: z.object({
|
|
414
436
|
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
415
437
|
"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)."
|
|
416
438
|
).optional()
|
|
417
|
-
}).describe(
|
|
439
|
+
}).describe(
|
|
440
|
+
"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."
|
|
441
|
+
).optional()
|
|
418
442
|
});
|
|
419
443
|
var MarkSavedPaymentMethodPrimaryRequest = z.object({
|
|
420
444
|
savedPaymentMethodId: z.string().describe("Unique identifier of a saved payment method.").regex(
|