@reactionary/acp 0.10.42 → 0.10.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/README.md +52 -57
- package/index.js +11 -0
- package/lib/acp-discounts.js +113 -0
- package/lib/acp-idempotency.js +119 -0
- package/lib/acp-mcp.js +206 -0
- package/lib/acp-payment-handlers.js +38 -0
- package/lib/acp-schemas.js +240 -70
- package/lib/acp-webhooks.js +72 -0
- package/lib/reactionary-acp-server.js +1156 -253
- package/package.json +3 -3
- package/src/index.d.ts +4 -0
- package/src/lib/acp-discounts.d.ts +45 -0
- package/src/lib/acp-idempotency.d.ts +23 -0
- package/src/lib/acp-mcp.d.ts +21 -0
- package/src/lib/acp-payment-handlers.d.ts +64 -0
- package/src/lib/acp-schemas.d.ts +766 -209
- package/src/lib/acp-webhooks.d.ts +48 -0
- package/src/lib/reactionary-acp-server.d.ts +343 -39
package/src/lib/acp-schemas.d.ts
CHANGED
|
@@ -1,12 +1,75 @@
|
|
|
1
1
|
import * as z from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* A requested item. The 2026-04-17 Item schema carries no quantity, while the
|
|
4
|
+
* checkout RFC still sends one; it is accepted as an optional decimal
|
|
5
|
+
* (B2B fractional units) and defaults to 1. Repeated ids add up.
|
|
6
|
+
*/
|
|
2
7
|
export declare const ACPItemSchema: z.ZodObject<{
|
|
3
8
|
id: z.ZodString;
|
|
4
|
-
quantity: z.
|
|
9
|
+
quantity: z.ZodOptional<z.ZodNumber>;
|
|
10
|
+
name: z.ZodOptional<z.ZodString>;
|
|
11
|
+
unit_amount: z.ZodOptional<z.ZodInt>;
|
|
5
12
|
}, z.core.$strip>;
|
|
6
|
-
export declare const
|
|
13
|
+
export declare const ACPCompanyInfoSchema: z.ZodObject<{
|
|
7
14
|
name: z.ZodString;
|
|
15
|
+
tax_id: z.ZodOptional<z.ZodString>;
|
|
16
|
+
department: z.ZodOptional<z.ZodString>;
|
|
17
|
+
cost_center: z.ZodOptional<z.ZodString>;
|
|
18
|
+
}, z.core.$strip>;
|
|
19
|
+
export declare const ACPLoyaltyInfoSchema: z.ZodObject<{
|
|
20
|
+
tier: z.ZodOptional<z.ZodString>;
|
|
21
|
+
points_balance: z.ZodOptional<z.ZodInt>;
|
|
22
|
+
member_since: z.ZodOptional<z.ZodString>;
|
|
23
|
+
}, z.core.$strip>;
|
|
24
|
+
export declare const ACPTaxExemptionSchema: z.ZodObject<{
|
|
25
|
+
certificate_id: z.ZodString;
|
|
26
|
+
certificate_type: z.ZodEnum<{
|
|
27
|
+
resale: "resale";
|
|
28
|
+
exempt_organization: "exempt_organization";
|
|
29
|
+
government: "government";
|
|
30
|
+
}>;
|
|
31
|
+
exempt_regions: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
32
|
+
expires_at: z.ZodOptional<z.ZodString>;
|
|
33
|
+
}, z.core.$strip>;
|
|
34
|
+
/** The 2026-04-17 Buyer: only the email is required. */
|
|
35
|
+
export declare const ACPBuyerSchema: z.ZodObject<{
|
|
36
|
+
first_name: z.ZodOptional<z.ZodString>;
|
|
37
|
+
last_name: z.ZodOptional<z.ZodString>;
|
|
38
|
+
full_name: z.ZodOptional<z.ZodString>;
|
|
8
39
|
email: z.ZodEmail;
|
|
9
40
|
phone_number: z.ZodOptional<z.ZodString>;
|
|
41
|
+
customer_id: z.ZodOptional<z.ZodString>;
|
|
42
|
+
account_type: z.ZodOptional<z.ZodEnum<{
|
|
43
|
+
business: "business";
|
|
44
|
+
guest: "guest";
|
|
45
|
+
registered: "registered";
|
|
46
|
+
}>>;
|
|
47
|
+
authentication_status: z.ZodOptional<z.ZodEnum<{
|
|
48
|
+
guest: "guest";
|
|
49
|
+
authenticated: "authenticated";
|
|
50
|
+
requires_signin: "requires_signin";
|
|
51
|
+
}>>;
|
|
52
|
+
company: z.ZodOptional<z.ZodObject<{
|
|
53
|
+
name: z.ZodString;
|
|
54
|
+
tax_id: z.ZodOptional<z.ZodString>;
|
|
55
|
+
department: z.ZodOptional<z.ZodString>;
|
|
56
|
+
cost_center: z.ZodOptional<z.ZodString>;
|
|
57
|
+
}, z.core.$strip>>;
|
|
58
|
+
loyalty: z.ZodOptional<z.ZodObject<{
|
|
59
|
+
tier: z.ZodOptional<z.ZodString>;
|
|
60
|
+
points_balance: z.ZodOptional<z.ZodInt>;
|
|
61
|
+
member_since: z.ZodOptional<z.ZodString>;
|
|
62
|
+
}, z.core.$strip>>;
|
|
63
|
+
tax_exemption: z.ZodOptional<z.ZodObject<{
|
|
64
|
+
certificate_id: z.ZodString;
|
|
65
|
+
certificate_type: z.ZodEnum<{
|
|
66
|
+
resale: "resale";
|
|
67
|
+
exempt_organization: "exempt_organization";
|
|
68
|
+
government: "government";
|
|
69
|
+
}>;
|
|
70
|
+
exempt_regions: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
71
|
+
expires_at: z.ZodOptional<z.ZodString>;
|
|
72
|
+
}, z.core.$strip>>;
|
|
10
73
|
}, z.core.$strip>;
|
|
11
74
|
export declare const ACPAddressSchema: z.ZodObject<{
|
|
12
75
|
name: z.ZodString;
|
|
@@ -16,58 +79,267 @@ export declare const ACPAddressSchema: z.ZodObject<{
|
|
|
16
79
|
state: z.ZodString;
|
|
17
80
|
country: z.ZodString;
|
|
18
81
|
postal_code: z.ZodString;
|
|
82
|
+
}, z.core.$strip>;
|
|
83
|
+
export declare const ACPFulfillmentDetailsSchema: z.ZodObject<{
|
|
84
|
+
name: z.ZodOptional<z.ZodString>;
|
|
19
85
|
phone_number: z.ZodOptional<z.ZodString>;
|
|
86
|
+
email: z.ZodOptional<z.ZodEmail>;
|
|
87
|
+
address: z.ZodOptional<z.ZodObject<{
|
|
88
|
+
name: z.ZodString;
|
|
89
|
+
line_one: z.ZodString;
|
|
90
|
+
line_two: z.ZodOptional<z.ZodString>;
|
|
91
|
+
city: z.ZodString;
|
|
92
|
+
state: z.ZodString;
|
|
93
|
+
country: z.ZodString;
|
|
94
|
+
postal_code: z.ZodString;
|
|
95
|
+
}, z.core.$strip>>;
|
|
96
|
+
}, z.core.$strip>;
|
|
97
|
+
export declare const ACPSelectedFulfillmentOptionSchema: z.ZodObject<{
|
|
98
|
+
type: z.ZodEnum<{
|
|
99
|
+
shipping: "shipping";
|
|
100
|
+
digital: "digital";
|
|
101
|
+
pickup: "pickup";
|
|
102
|
+
local_delivery: "local_delivery";
|
|
103
|
+
}>;
|
|
104
|
+
option_id: z.ZodString;
|
|
105
|
+
item_ids: z.ZodArray<z.ZodString>;
|
|
106
|
+
}, z.core.$strip>;
|
|
107
|
+
/**
|
|
108
|
+
* Affiliate attribution (affiliate attribution RFC): the provider plus a
|
|
109
|
+
* token or publisher id, first-touch on creation and last-touch on
|
|
110
|
+
* completion. Write-only.
|
|
111
|
+
*/
|
|
112
|
+
export declare const ACPAffiliateAttributionSchema: z.ZodObject<{
|
|
113
|
+
provider: z.ZodString;
|
|
114
|
+
token: z.ZodOptional<z.ZodString>;
|
|
115
|
+
publisher_id: z.ZodOptional<z.ZodString>;
|
|
116
|
+
campaign_id: z.ZodOptional<z.ZodString>;
|
|
117
|
+
creative_id: z.ZodOptional<z.ZodString>;
|
|
118
|
+
sub_id: z.ZodOptional<z.ZodString>;
|
|
119
|
+
source: z.ZodOptional<z.ZodObject<{
|
|
120
|
+
type: z.ZodEnum<{
|
|
121
|
+
url: "url";
|
|
122
|
+
unknown: "unknown";
|
|
123
|
+
platform: "platform";
|
|
124
|
+
}>;
|
|
125
|
+
url: z.ZodOptional<z.ZodURL>;
|
|
126
|
+
}, z.core.$strip>>;
|
|
127
|
+
issued_at: z.ZodOptional<z.ZodISODateTime>;
|
|
128
|
+
expires_at: z.ZodOptional<z.ZodISODateTime>;
|
|
129
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
130
|
+
touchpoint: z.ZodOptional<z.ZodEnum<{
|
|
131
|
+
first: "first";
|
|
132
|
+
last: "last";
|
|
133
|
+
}>>;
|
|
134
|
+
}, z.core.$strip>;
|
|
135
|
+
export type ACPAffiliateAttribution = z.infer<typeof ACPAffiliateAttributionSchema>;
|
|
136
|
+
export declare const ACP_INTERVENTION_TYPES: readonly ["3ds", "biometric", "address_verification"];
|
|
137
|
+
export type ACPInterventionType = (typeof ACP_INTERVENTION_TYPES)[number];
|
|
138
|
+
/**
|
|
139
|
+
* The agent's declared capabilities. Unknown values are ignored rather than
|
|
140
|
+
* rejected (capability negotiation RFC §4.6.2).
|
|
141
|
+
*/
|
|
142
|
+
export declare const ACPAgentCapabilitiesSchema: z.ZodObject<{
|
|
143
|
+
interventions: z.ZodOptional<z.ZodObject<{
|
|
144
|
+
supported: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
145
|
+
display_context: z.ZodOptional<z.ZodString>;
|
|
146
|
+
redirect_context: z.ZodOptional<z.ZodString>;
|
|
147
|
+
max_redirects: z.ZodOptional<z.ZodInt>;
|
|
148
|
+
max_interaction_depth: z.ZodOptional<z.ZodInt>;
|
|
149
|
+
}, z.core.$strip>>;
|
|
150
|
+
extensions: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
20
151
|
}, z.core.$strip>;
|
|
21
152
|
export declare const ACPCreateCheckoutSessionRequestSchema: z.ZodObject<{
|
|
153
|
+
capabilities: z.ZodObject<{
|
|
154
|
+
interventions: z.ZodOptional<z.ZodObject<{
|
|
155
|
+
supported: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
156
|
+
display_context: z.ZodOptional<z.ZodString>;
|
|
157
|
+
redirect_context: z.ZodOptional<z.ZodString>;
|
|
158
|
+
max_redirects: z.ZodOptional<z.ZodInt>;
|
|
159
|
+
max_interaction_depth: z.ZodOptional<z.ZodInt>;
|
|
160
|
+
}, z.core.$strip>>;
|
|
161
|
+
extensions: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
162
|
+
}, z.core.$strip>;
|
|
163
|
+
locale: z.ZodOptional<z.ZodString>;
|
|
164
|
+
timezone: z.ZodOptional<z.ZodString>;
|
|
165
|
+
affiliate_attribution: z.ZodOptional<z.ZodObject<{
|
|
166
|
+
provider: z.ZodString;
|
|
167
|
+
token: z.ZodOptional<z.ZodString>;
|
|
168
|
+
publisher_id: z.ZodOptional<z.ZodString>;
|
|
169
|
+
campaign_id: z.ZodOptional<z.ZodString>;
|
|
170
|
+
creative_id: z.ZodOptional<z.ZodString>;
|
|
171
|
+
sub_id: z.ZodOptional<z.ZodString>;
|
|
172
|
+
source: z.ZodOptional<z.ZodObject<{
|
|
173
|
+
type: z.ZodEnum<{
|
|
174
|
+
url: "url";
|
|
175
|
+
unknown: "unknown";
|
|
176
|
+
platform: "platform";
|
|
177
|
+
}>;
|
|
178
|
+
url: z.ZodOptional<z.ZodURL>;
|
|
179
|
+
}, z.core.$strip>>;
|
|
180
|
+
issued_at: z.ZodOptional<z.ZodISODateTime>;
|
|
181
|
+
expires_at: z.ZodOptional<z.ZodISODateTime>;
|
|
182
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
183
|
+
touchpoint: z.ZodOptional<z.ZodEnum<{
|
|
184
|
+
first: "first";
|
|
185
|
+
last: "last";
|
|
186
|
+
}>>;
|
|
187
|
+
}, z.core.$strip>>;
|
|
188
|
+
discounts: z.ZodOptional<z.ZodObject<{
|
|
189
|
+
codes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
190
|
+
}, z.core.$strip>>;
|
|
191
|
+
coupons: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
22
192
|
buyer: z.ZodOptional<z.ZodObject<{
|
|
23
|
-
|
|
193
|
+
first_name: z.ZodOptional<z.ZodString>;
|
|
194
|
+
last_name: z.ZodOptional<z.ZodString>;
|
|
195
|
+
full_name: z.ZodOptional<z.ZodString>;
|
|
24
196
|
email: z.ZodEmail;
|
|
25
197
|
phone_number: z.ZodOptional<z.ZodString>;
|
|
198
|
+
customer_id: z.ZodOptional<z.ZodString>;
|
|
199
|
+
account_type: z.ZodOptional<z.ZodEnum<{
|
|
200
|
+
business: "business";
|
|
201
|
+
guest: "guest";
|
|
202
|
+
registered: "registered";
|
|
203
|
+
}>>;
|
|
204
|
+
authentication_status: z.ZodOptional<z.ZodEnum<{
|
|
205
|
+
guest: "guest";
|
|
206
|
+
authenticated: "authenticated";
|
|
207
|
+
requires_signin: "requires_signin";
|
|
208
|
+
}>>;
|
|
209
|
+
company: z.ZodOptional<z.ZodObject<{
|
|
210
|
+
name: z.ZodString;
|
|
211
|
+
tax_id: z.ZodOptional<z.ZodString>;
|
|
212
|
+
department: z.ZodOptional<z.ZodString>;
|
|
213
|
+
cost_center: z.ZodOptional<z.ZodString>;
|
|
214
|
+
}, z.core.$strip>>;
|
|
215
|
+
loyalty: z.ZodOptional<z.ZodObject<{
|
|
216
|
+
tier: z.ZodOptional<z.ZodString>;
|
|
217
|
+
points_balance: z.ZodOptional<z.ZodInt>;
|
|
218
|
+
member_since: z.ZodOptional<z.ZodString>;
|
|
219
|
+
}, z.core.$strip>>;
|
|
220
|
+
tax_exemption: z.ZodOptional<z.ZodObject<{
|
|
221
|
+
certificate_id: z.ZodString;
|
|
222
|
+
certificate_type: z.ZodEnum<{
|
|
223
|
+
resale: "resale";
|
|
224
|
+
exempt_organization: "exempt_organization";
|
|
225
|
+
government: "government";
|
|
226
|
+
}>;
|
|
227
|
+
exempt_regions: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
228
|
+
expires_at: z.ZodOptional<z.ZodString>;
|
|
229
|
+
}, z.core.$strip>>;
|
|
26
230
|
}, z.core.$strip>>;
|
|
27
|
-
|
|
231
|
+
line_items: z.ZodArray<z.ZodObject<{
|
|
28
232
|
id: z.ZodString;
|
|
29
|
-
quantity: z.
|
|
233
|
+
quantity: z.ZodOptional<z.ZodNumber>;
|
|
234
|
+
name: z.ZodOptional<z.ZodString>;
|
|
235
|
+
unit_amount: z.ZodOptional<z.ZodInt>;
|
|
30
236
|
}, z.core.$strip>>;
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
line_two: z.ZodOptional<z.ZodString>;
|
|
35
|
-
city: z.ZodString;
|
|
36
|
-
state: z.ZodString;
|
|
37
|
-
country: z.ZodString;
|
|
38
|
-
postal_code: z.ZodString;
|
|
237
|
+
currency: z.ZodString;
|
|
238
|
+
fulfillment_details: z.ZodOptional<z.ZodObject<{
|
|
239
|
+
name: z.ZodOptional<z.ZodString>;
|
|
39
240
|
phone_number: z.ZodOptional<z.ZodString>;
|
|
241
|
+
email: z.ZodOptional<z.ZodEmail>;
|
|
242
|
+
address: z.ZodOptional<z.ZodObject<{
|
|
243
|
+
name: z.ZodString;
|
|
244
|
+
line_one: z.ZodString;
|
|
245
|
+
line_two: z.ZodOptional<z.ZodString>;
|
|
246
|
+
city: z.ZodString;
|
|
247
|
+
state: z.ZodString;
|
|
248
|
+
country: z.ZodString;
|
|
249
|
+
postal_code: z.ZodString;
|
|
250
|
+
}, z.core.$strip>>;
|
|
40
251
|
}, z.core.$strip>>;
|
|
41
252
|
}, z.core.$strip>;
|
|
42
253
|
export declare const ACPUpdateCheckoutSessionRequestSchema: z.ZodObject<{
|
|
43
254
|
buyer: z.ZodOptional<z.ZodObject<{
|
|
44
|
-
|
|
255
|
+
first_name: z.ZodOptional<z.ZodString>;
|
|
256
|
+
last_name: z.ZodOptional<z.ZodString>;
|
|
257
|
+
full_name: z.ZodOptional<z.ZodString>;
|
|
45
258
|
email: z.ZodEmail;
|
|
46
259
|
phone_number: z.ZodOptional<z.ZodString>;
|
|
260
|
+
customer_id: z.ZodOptional<z.ZodString>;
|
|
261
|
+
account_type: z.ZodOptional<z.ZodEnum<{
|
|
262
|
+
business: "business";
|
|
263
|
+
guest: "guest";
|
|
264
|
+
registered: "registered";
|
|
265
|
+
}>>;
|
|
266
|
+
authentication_status: z.ZodOptional<z.ZodEnum<{
|
|
267
|
+
guest: "guest";
|
|
268
|
+
authenticated: "authenticated";
|
|
269
|
+
requires_signin: "requires_signin";
|
|
270
|
+
}>>;
|
|
271
|
+
company: z.ZodOptional<z.ZodObject<{
|
|
272
|
+
name: z.ZodString;
|
|
273
|
+
tax_id: z.ZodOptional<z.ZodString>;
|
|
274
|
+
department: z.ZodOptional<z.ZodString>;
|
|
275
|
+
cost_center: z.ZodOptional<z.ZodString>;
|
|
276
|
+
}, z.core.$strip>>;
|
|
277
|
+
loyalty: z.ZodOptional<z.ZodObject<{
|
|
278
|
+
tier: z.ZodOptional<z.ZodString>;
|
|
279
|
+
points_balance: z.ZodOptional<z.ZodInt>;
|
|
280
|
+
member_since: z.ZodOptional<z.ZodString>;
|
|
281
|
+
}, z.core.$strip>>;
|
|
282
|
+
tax_exemption: z.ZodOptional<z.ZodObject<{
|
|
283
|
+
certificate_id: z.ZodString;
|
|
284
|
+
certificate_type: z.ZodEnum<{
|
|
285
|
+
resale: "resale";
|
|
286
|
+
exempt_organization: "exempt_organization";
|
|
287
|
+
government: "government";
|
|
288
|
+
}>;
|
|
289
|
+
exempt_regions: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
290
|
+
expires_at: z.ZodOptional<z.ZodString>;
|
|
291
|
+
}, z.core.$strip>>;
|
|
47
292
|
}, z.core.$strip>>;
|
|
48
|
-
|
|
293
|
+
line_items: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
49
294
|
id: z.ZodString;
|
|
50
|
-
quantity: z.
|
|
295
|
+
quantity: z.ZodOptional<z.ZodNumber>;
|
|
296
|
+
name: z.ZodOptional<z.ZodString>;
|
|
297
|
+
unit_amount: z.ZodOptional<z.ZodInt>;
|
|
51
298
|
}, z.core.$strip>>>;
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
line_one: z.ZodString;
|
|
55
|
-
line_two: z.ZodOptional<z.ZodString>;
|
|
56
|
-
city: z.ZodString;
|
|
57
|
-
state: z.ZodString;
|
|
58
|
-
country: z.ZodString;
|
|
59
|
-
postal_code: z.ZodString;
|
|
60
|
-
phone_number: z.ZodOptional<z.ZodString>;
|
|
299
|
+
discounts: z.ZodOptional<z.ZodObject<{
|
|
300
|
+
codes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
61
301
|
}, z.core.$strip>>;
|
|
62
|
-
|
|
302
|
+
coupons: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
303
|
+
fulfillment_details: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
304
|
+
name: z.ZodOptional<z.ZodString>;
|
|
305
|
+
phone_number: z.ZodOptional<z.ZodString>;
|
|
306
|
+
email: z.ZodOptional<z.ZodEmail>;
|
|
307
|
+
address: z.ZodOptional<z.ZodObject<{
|
|
308
|
+
name: z.ZodString;
|
|
309
|
+
line_one: z.ZodString;
|
|
310
|
+
line_two: z.ZodOptional<z.ZodString>;
|
|
311
|
+
city: z.ZodString;
|
|
312
|
+
state: z.ZodString;
|
|
313
|
+
country: z.ZodString;
|
|
314
|
+
postal_code: z.ZodString;
|
|
315
|
+
}, z.core.$strip>>;
|
|
316
|
+
}, z.core.$strip>>>;
|
|
317
|
+
selected_fulfillment_options: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
318
|
+
type: z.ZodEnum<{
|
|
319
|
+
shipping: "shipping";
|
|
320
|
+
digital: "digital";
|
|
321
|
+
pickup: "pickup";
|
|
322
|
+
local_delivery: "local_delivery";
|
|
323
|
+
}>;
|
|
324
|
+
option_id: z.ZodString;
|
|
325
|
+
item_ids: z.ZodArray<z.ZodString>;
|
|
326
|
+
}, z.core.$strip>>>>;
|
|
63
327
|
}, z.core.$strip>;
|
|
328
|
+
/**
|
|
329
|
+
* Payment data on completion: the instrument a payment handler produced,
|
|
330
|
+
* e.g. `{ type: 'card', credential: { type: 'spt', token: 'spt_...' } }`.
|
|
331
|
+
* Purchase-order payments (B2B) are not supported, so the handler and
|
|
332
|
+
* instrument are required.
|
|
333
|
+
*/
|
|
64
334
|
export declare const ACPPaymentDataSchema: z.ZodObject<{
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
335
|
+
handler_id: z.ZodString;
|
|
336
|
+
instrument: z.ZodObject<{
|
|
337
|
+
type: z.ZodString;
|
|
338
|
+
credential: z.ZodObject<{
|
|
339
|
+
type: z.ZodString;
|
|
340
|
+
token: z.ZodString;
|
|
341
|
+
}, z.core.$loose>;
|
|
342
|
+
}, z.core.$strip>;
|
|
71
343
|
billing_address: z.ZodOptional<z.ZodObject<{
|
|
72
344
|
name: z.ZodString;
|
|
73
345
|
line_one: z.ZodString;
|
|
@@ -76,22 +348,118 @@ export declare const ACPPaymentDataSchema: z.ZodObject<{
|
|
|
76
348
|
state: z.ZodString;
|
|
77
349
|
country: z.ZodString;
|
|
78
350
|
postal_code: z.ZodString;
|
|
79
|
-
|
|
351
|
+
}, z.core.$strip>>;
|
|
352
|
+
}, z.core.$strip>;
|
|
353
|
+
/** Seller-provided metadata the agent authenticates the buyer (3DS) with. */
|
|
354
|
+
export declare const ACPAuthenticationMetadataSchema: z.ZodObject<{
|
|
355
|
+
channel: z.ZodOptional<z.ZodObject<{}, z.core.$loose>>;
|
|
356
|
+
acquirer_details: z.ZodObject<{
|
|
357
|
+
acquirer_bin: z.ZodString;
|
|
358
|
+
acquirer_country: z.ZodString;
|
|
359
|
+
acquirer_merchant_id: z.ZodString;
|
|
360
|
+
merchant_name: z.ZodString;
|
|
361
|
+
requestor_id: z.ZodOptional<z.ZodString>;
|
|
362
|
+
}, z.core.$strip>;
|
|
363
|
+
directory_server: z.ZodEnum<{
|
|
364
|
+
american_express: "american_express";
|
|
365
|
+
mastercard: "mastercard";
|
|
366
|
+
visa: "visa";
|
|
367
|
+
}>;
|
|
368
|
+
flow_preference: z.ZodOptional<z.ZodObject<{
|
|
369
|
+
type: z.ZodEnum<{
|
|
370
|
+
challenge: "challenge";
|
|
371
|
+
frictionless: "frictionless";
|
|
372
|
+
}>;
|
|
373
|
+
challenge: z.ZodOptional<z.ZodObject<{
|
|
374
|
+
type: z.ZodOptional<z.ZodEnum<{
|
|
375
|
+
mandated: "mandated";
|
|
376
|
+
preferred: "preferred";
|
|
377
|
+
}>>;
|
|
378
|
+
}, z.core.$strip>>;
|
|
379
|
+
frictionless: z.ZodOptional<z.ZodObject<{
|
|
380
|
+
type: z.ZodOptional<z.ZodEnum<{
|
|
381
|
+
low_risk: "low_risk";
|
|
382
|
+
}>>;
|
|
383
|
+
}, z.core.$strip>>;
|
|
384
|
+
}, z.core.$strip>>;
|
|
385
|
+
}, z.core.$loose>;
|
|
386
|
+
/** Outcomes after which the payment may be authorized with the result. */
|
|
387
|
+
export declare const ACP_AUTHENTICATED_OUTCOMES: readonly ["authenticated", "attempt_acknowledged", "informational"];
|
|
388
|
+
export declare const ACPAuthenticationResultSchema: z.ZodObject<{
|
|
389
|
+
outcome: z.ZodEnum<{
|
|
390
|
+
rejected: "rejected";
|
|
391
|
+
denied: "denied";
|
|
392
|
+
canceled: "canceled";
|
|
393
|
+
authenticated: "authenticated";
|
|
394
|
+
attempt_acknowledged: "attempt_acknowledged";
|
|
395
|
+
informational: "informational";
|
|
396
|
+
abandoned: "abandoned";
|
|
397
|
+
internal_error: "internal_error";
|
|
398
|
+
not_supported: "not_supported";
|
|
399
|
+
processing_error: "processing_error";
|
|
400
|
+
}>;
|
|
401
|
+
outcome_details: z.ZodOptional<z.ZodObject<{
|
|
402
|
+
three_ds_cryptogram: z.ZodString;
|
|
403
|
+
electronic_commerce_indicator: z.ZodEnum<{
|
|
404
|
+
"01": "01";
|
|
405
|
+
"02": "02";
|
|
406
|
+
"05": "05";
|
|
407
|
+
"06": "06";
|
|
408
|
+
"07": "07";
|
|
409
|
+
}>;
|
|
410
|
+
transaction_id: z.ZodString;
|
|
411
|
+
version: z.ZodString;
|
|
80
412
|
}, z.core.$strip>>;
|
|
81
413
|
}, z.core.$strip>;
|
|
82
414
|
export declare const ACPCompleteCheckoutSessionRequestSchema: z.ZodObject<{
|
|
83
415
|
buyer: z.ZodOptional<z.ZodObject<{
|
|
84
|
-
|
|
416
|
+
first_name: z.ZodOptional<z.ZodString>;
|
|
417
|
+
last_name: z.ZodOptional<z.ZodString>;
|
|
418
|
+
full_name: z.ZodOptional<z.ZodString>;
|
|
85
419
|
email: z.ZodEmail;
|
|
86
420
|
phone_number: z.ZodOptional<z.ZodString>;
|
|
421
|
+
customer_id: z.ZodOptional<z.ZodString>;
|
|
422
|
+
account_type: z.ZodOptional<z.ZodEnum<{
|
|
423
|
+
business: "business";
|
|
424
|
+
guest: "guest";
|
|
425
|
+
registered: "registered";
|
|
426
|
+
}>>;
|
|
427
|
+
authentication_status: z.ZodOptional<z.ZodEnum<{
|
|
428
|
+
guest: "guest";
|
|
429
|
+
authenticated: "authenticated";
|
|
430
|
+
requires_signin: "requires_signin";
|
|
431
|
+
}>>;
|
|
432
|
+
company: z.ZodOptional<z.ZodObject<{
|
|
433
|
+
name: z.ZodString;
|
|
434
|
+
tax_id: z.ZodOptional<z.ZodString>;
|
|
435
|
+
department: z.ZodOptional<z.ZodString>;
|
|
436
|
+
cost_center: z.ZodOptional<z.ZodString>;
|
|
437
|
+
}, z.core.$strip>>;
|
|
438
|
+
loyalty: z.ZodOptional<z.ZodObject<{
|
|
439
|
+
tier: z.ZodOptional<z.ZodString>;
|
|
440
|
+
points_balance: z.ZodOptional<z.ZodInt>;
|
|
441
|
+
member_since: z.ZodOptional<z.ZodString>;
|
|
442
|
+
}, z.core.$strip>>;
|
|
443
|
+
tax_exemption: z.ZodOptional<z.ZodObject<{
|
|
444
|
+
certificate_id: z.ZodString;
|
|
445
|
+
certificate_type: z.ZodEnum<{
|
|
446
|
+
resale: "resale";
|
|
447
|
+
exempt_organization: "exempt_organization";
|
|
448
|
+
government: "government";
|
|
449
|
+
}>;
|
|
450
|
+
exempt_regions: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
451
|
+
expires_at: z.ZodOptional<z.ZodString>;
|
|
452
|
+
}, z.core.$strip>>;
|
|
87
453
|
}, z.core.$strip>>;
|
|
88
454
|
payment_data: z.ZodObject<{
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
455
|
+
handler_id: z.ZodString;
|
|
456
|
+
instrument: z.ZodObject<{
|
|
457
|
+
type: z.ZodString;
|
|
458
|
+
credential: z.ZodObject<{
|
|
459
|
+
type: z.ZodString;
|
|
460
|
+
token: z.ZodString;
|
|
461
|
+
}, z.core.$loose>;
|
|
462
|
+
}, z.core.$strip>;
|
|
95
463
|
billing_address: z.ZodOptional<z.ZodObject<{
|
|
96
464
|
name: z.ZodString;
|
|
97
465
|
line_one: z.ZodString;
|
|
@@ -100,206 +468,395 @@ export declare const ACPCompleteCheckoutSessionRequestSchema: z.ZodObject<{
|
|
|
100
468
|
state: z.ZodString;
|
|
101
469
|
country: z.ZodString;
|
|
102
470
|
postal_code: z.ZodString;
|
|
103
|
-
phone_number: z.ZodOptional<z.ZodString>;
|
|
104
471
|
}, z.core.$strip>>;
|
|
105
472
|
}, z.core.$strip>;
|
|
473
|
+
authentication_result: z.ZodOptional<z.ZodObject<{
|
|
474
|
+
outcome: z.ZodEnum<{
|
|
475
|
+
rejected: "rejected";
|
|
476
|
+
denied: "denied";
|
|
477
|
+
canceled: "canceled";
|
|
478
|
+
authenticated: "authenticated";
|
|
479
|
+
attempt_acknowledged: "attempt_acknowledged";
|
|
480
|
+
informational: "informational";
|
|
481
|
+
abandoned: "abandoned";
|
|
482
|
+
internal_error: "internal_error";
|
|
483
|
+
not_supported: "not_supported";
|
|
484
|
+
processing_error: "processing_error";
|
|
485
|
+
}>;
|
|
486
|
+
outcome_details: z.ZodOptional<z.ZodObject<{
|
|
487
|
+
three_ds_cryptogram: z.ZodString;
|
|
488
|
+
electronic_commerce_indicator: z.ZodEnum<{
|
|
489
|
+
"01": "01";
|
|
490
|
+
"02": "02";
|
|
491
|
+
"05": "05";
|
|
492
|
+
"06": "06";
|
|
493
|
+
"07": "07";
|
|
494
|
+
}>;
|
|
495
|
+
transaction_id: z.ZodString;
|
|
496
|
+
version: z.ZodString;
|
|
497
|
+
}, z.core.$strip>>;
|
|
498
|
+
}, z.core.$strip>>;
|
|
499
|
+
affiliate_attribution: z.ZodOptional<z.ZodObject<{
|
|
500
|
+
provider: z.ZodString;
|
|
501
|
+
token: z.ZodOptional<z.ZodString>;
|
|
502
|
+
publisher_id: z.ZodOptional<z.ZodString>;
|
|
503
|
+
campaign_id: z.ZodOptional<z.ZodString>;
|
|
504
|
+
creative_id: z.ZodOptional<z.ZodString>;
|
|
505
|
+
sub_id: z.ZodOptional<z.ZodString>;
|
|
506
|
+
source: z.ZodOptional<z.ZodObject<{
|
|
507
|
+
type: z.ZodEnum<{
|
|
508
|
+
url: "url";
|
|
509
|
+
unknown: "unknown";
|
|
510
|
+
platform: "platform";
|
|
511
|
+
}>;
|
|
512
|
+
url: z.ZodOptional<z.ZodURL>;
|
|
513
|
+
}, z.core.$strip>>;
|
|
514
|
+
issued_at: z.ZodOptional<z.ZodISODateTime>;
|
|
515
|
+
expires_at: z.ZodOptional<z.ZodISODateTime>;
|
|
516
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
517
|
+
touchpoint: z.ZodOptional<z.ZodEnum<{
|
|
518
|
+
first: "first";
|
|
519
|
+
last: "last";
|
|
520
|
+
}>>;
|
|
521
|
+
}, z.core.$strip>>;
|
|
522
|
+
marketing_consents: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
523
|
+
channel: z.ZodString;
|
|
524
|
+
opted_in: z.ZodBoolean;
|
|
525
|
+
}, z.core.$strip>>>;
|
|
526
|
+
}, z.core.$strip>;
|
|
527
|
+
/** Cart capability (2026-04-17): pre-checkout baskets without payment. */
|
|
528
|
+
export declare const ACPCartCreateRequestSchema: z.ZodObject<{
|
|
529
|
+
line_items: z.ZodArray<z.ZodObject<{
|
|
530
|
+
id: z.ZodString;
|
|
531
|
+
quantity: z.ZodOptional<z.ZodNumber>;
|
|
532
|
+
name: z.ZodOptional<z.ZodString>;
|
|
533
|
+
unit_amount: z.ZodOptional<z.ZodInt>;
|
|
534
|
+
}, z.core.$strip>>;
|
|
535
|
+
buyer: z.ZodOptional<z.ZodObject<{
|
|
536
|
+
first_name: z.ZodOptional<z.ZodString>;
|
|
537
|
+
last_name: z.ZodOptional<z.ZodString>;
|
|
538
|
+
full_name: z.ZodOptional<z.ZodString>;
|
|
539
|
+
email: z.ZodEmail;
|
|
540
|
+
phone_number: z.ZodOptional<z.ZodString>;
|
|
541
|
+
customer_id: z.ZodOptional<z.ZodString>;
|
|
542
|
+
account_type: z.ZodOptional<z.ZodEnum<{
|
|
543
|
+
business: "business";
|
|
544
|
+
guest: "guest";
|
|
545
|
+
registered: "registered";
|
|
546
|
+
}>>;
|
|
547
|
+
authentication_status: z.ZodOptional<z.ZodEnum<{
|
|
548
|
+
guest: "guest";
|
|
549
|
+
authenticated: "authenticated";
|
|
550
|
+
requires_signin: "requires_signin";
|
|
551
|
+
}>>;
|
|
552
|
+
company: z.ZodOptional<z.ZodObject<{
|
|
553
|
+
name: z.ZodString;
|
|
554
|
+
tax_id: z.ZodOptional<z.ZodString>;
|
|
555
|
+
department: z.ZodOptional<z.ZodString>;
|
|
556
|
+
cost_center: z.ZodOptional<z.ZodString>;
|
|
557
|
+
}, z.core.$strip>>;
|
|
558
|
+
loyalty: z.ZodOptional<z.ZodObject<{
|
|
559
|
+
tier: z.ZodOptional<z.ZodString>;
|
|
560
|
+
points_balance: z.ZodOptional<z.ZodInt>;
|
|
561
|
+
member_since: z.ZodOptional<z.ZodString>;
|
|
562
|
+
}, z.core.$strip>>;
|
|
563
|
+
tax_exemption: z.ZodOptional<z.ZodObject<{
|
|
564
|
+
certificate_id: z.ZodString;
|
|
565
|
+
certificate_type: z.ZodEnum<{
|
|
566
|
+
resale: "resale";
|
|
567
|
+
exempt_organization: "exempt_organization";
|
|
568
|
+
government: "government";
|
|
569
|
+
}>;
|
|
570
|
+
exempt_regions: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
571
|
+
expires_at: z.ZodOptional<z.ZodString>;
|
|
572
|
+
}, z.core.$strip>>;
|
|
573
|
+
}, z.core.$strip>>;
|
|
574
|
+
locale: z.ZodOptional<z.ZodString>;
|
|
106
575
|
}, z.core.$strip>;
|
|
576
|
+
/** A full replacement of the cart's line items. */
|
|
577
|
+
export declare const ACPCartUpdateRequestSchema: z.ZodObject<{
|
|
578
|
+
line_items: z.ZodArray<z.ZodObject<{
|
|
579
|
+
id: z.ZodString;
|
|
580
|
+
quantity: z.ZodOptional<z.ZodNumber>;
|
|
581
|
+
name: z.ZodOptional<z.ZodString>;
|
|
582
|
+
unit_amount: z.ZodOptional<z.ZodInt>;
|
|
583
|
+
}, z.core.$strip>>;
|
|
584
|
+
buyer: z.ZodOptional<z.ZodObject<{
|
|
585
|
+
first_name: z.ZodOptional<z.ZodString>;
|
|
586
|
+
last_name: z.ZodOptional<z.ZodString>;
|
|
587
|
+
full_name: z.ZodOptional<z.ZodString>;
|
|
588
|
+
email: z.ZodEmail;
|
|
589
|
+
phone_number: z.ZodOptional<z.ZodString>;
|
|
590
|
+
customer_id: z.ZodOptional<z.ZodString>;
|
|
591
|
+
account_type: z.ZodOptional<z.ZodEnum<{
|
|
592
|
+
business: "business";
|
|
593
|
+
guest: "guest";
|
|
594
|
+
registered: "registered";
|
|
595
|
+
}>>;
|
|
596
|
+
authentication_status: z.ZodOptional<z.ZodEnum<{
|
|
597
|
+
guest: "guest";
|
|
598
|
+
authenticated: "authenticated";
|
|
599
|
+
requires_signin: "requires_signin";
|
|
600
|
+
}>>;
|
|
601
|
+
company: z.ZodOptional<z.ZodObject<{
|
|
602
|
+
name: z.ZodString;
|
|
603
|
+
tax_id: z.ZodOptional<z.ZodString>;
|
|
604
|
+
department: z.ZodOptional<z.ZodString>;
|
|
605
|
+
cost_center: z.ZodOptional<z.ZodString>;
|
|
606
|
+
}, z.core.$strip>>;
|
|
607
|
+
loyalty: z.ZodOptional<z.ZodObject<{
|
|
608
|
+
tier: z.ZodOptional<z.ZodString>;
|
|
609
|
+
points_balance: z.ZodOptional<z.ZodInt>;
|
|
610
|
+
member_since: z.ZodOptional<z.ZodString>;
|
|
611
|
+
}, z.core.$strip>>;
|
|
612
|
+
tax_exemption: z.ZodOptional<z.ZodObject<{
|
|
613
|
+
certificate_id: z.ZodString;
|
|
614
|
+
certificate_type: z.ZodEnum<{
|
|
615
|
+
resale: "resale";
|
|
616
|
+
exempt_organization: "exempt_organization";
|
|
617
|
+
government: "government";
|
|
618
|
+
}>;
|
|
619
|
+
exempt_regions: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
620
|
+
expires_at: z.ZodOptional<z.ZodString>;
|
|
621
|
+
}, z.core.$strip>>;
|
|
622
|
+
}, z.core.$strip>>;
|
|
623
|
+
}, z.core.$strip>;
|
|
624
|
+
export declare const ACPCartStateSchema: z.ZodObject<{
|
|
625
|
+
id: z.ZodString;
|
|
626
|
+
cartId: z.ZodString;
|
|
627
|
+
sessionId: z.ZodOptional<z.ZodString>;
|
|
628
|
+
agentId: z.ZodOptional<z.ZodString>;
|
|
629
|
+
buyer: z.ZodOptional<z.ZodObject<{
|
|
630
|
+
first_name: z.ZodOptional<z.ZodString>;
|
|
631
|
+
last_name: z.ZodOptional<z.ZodString>;
|
|
632
|
+
full_name: z.ZodOptional<z.ZodString>;
|
|
633
|
+
email: z.ZodEmail;
|
|
634
|
+
phone_number: z.ZodOptional<z.ZodString>;
|
|
635
|
+
customer_id: z.ZodOptional<z.ZodString>;
|
|
636
|
+
account_type: z.ZodOptional<z.ZodEnum<{
|
|
637
|
+
business: "business";
|
|
638
|
+
guest: "guest";
|
|
639
|
+
registered: "registered";
|
|
640
|
+
}>>;
|
|
641
|
+
authentication_status: z.ZodOptional<z.ZodEnum<{
|
|
642
|
+
guest: "guest";
|
|
643
|
+
authenticated: "authenticated";
|
|
644
|
+
requires_signin: "requires_signin";
|
|
645
|
+
}>>;
|
|
646
|
+
company: z.ZodOptional<z.ZodObject<{
|
|
647
|
+
name: z.ZodString;
|
|
648
|
+
tax_id: z.ZodOptional<z.ZodString>;
|
|
649
|
+
department: z.ZodOptional<z.ZodString>;
|
|
650
|
+
cost_center: z.ZodOptional<z.ZodString>;
|
|
651
|
+
}, z.core.$strip>>;
|
|
652
|
+
loyalty: z.ZodOptional<z.ZodObject<{
|
|
653
|
+
tier: z.ZodOptional<z.ZodString>;
|
|
654
|
+
points_balance: z.ZodOptional<z.ZodInt>;
|
|
655
|
+
member_since: z.ZodOptional<z.ZodString>;
|
|
656
|
+
}, z.core.$strip>>;
|
|
657
|
+
tax_exemption: z.ZodOptional<z.ZodObject<{
|
|
658
|
+
certificate_id: z.ZodString;
|
|
659
|
+
certificate_type: z.ZodEnum<{
|
|
660
|
+
resale: "resale";
|
|
661
|
+
exempt_organization: "exempt_organization";
|
|
662
|
+
government: "government";
|
|
663
|
+
}>;
|
|
664
|
+
exempt_regions: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
665
|
+
expires_at: z.ZodOptional<z.ZodString>;
|
|
666
|
+
}, z.core.$strip>>;
|
|
667
|
+
}, z.core.$strip>>;
|
|
668
|
+
expiresAt: z.ZodString;
|
|
669
|
+
}, z.core.$loose>;
|
|
670
|
+
export type ACPCartCreateRequest = z.infer<typeof ACPCartCreateRequestSchema>;
|
|
671
|
+
export type ACPCartUpdateRequest = z.infer<typeof ACPCartUpdateRequestSchema>;
|
|
672
|
+
export type ACPCartState = z.infer<typeof ACPCartStateSchema>;
|
|
673
|
+
export declare const ACP_INTENT_TRACE_REASON_CODES: readonly ["price_sensitivity", "shipping_cost", "shipping_speed", "product_fit", "trust_security", "returns_policy", "payment_options", "comparison", "timing_deferred", "other"];
|
|
674
|
+
/**
|
|
675
|
+
* Why an agent abandons a session (intent traces RFC). Unknown reason codes
|
|
676
|
+
* are accepted and treated as `other`; metadata is a flat map.
|
|
677
|
+
*/
|
|
678
|
+
export declare const ACPIntentTraceSchema: z.ZodObject<{
|
|
679
|
+
reason_code: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
680
|
+
trace_summary: z.ZodOptional<z.ZodString>;
|
|
681
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
682
|
+
}, z.core.$strip>;
|
|
683
|
+
export declare const ACPCancelCheckoutSessionRequestSchema: z.ZodObject<{
|
|
684
|
+
intent_trace: z.ZodOptional<z.ZodObject<{
|
|
685
|
+
reason_code: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
686
|
+
trace_summary: z.ZodOptional<z.ZodString>;
|
|
687
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
688
|
+
}, z.core.$strip>>;
|
|
689
|
+
}, z.core.$strip>;
|
|
690
|
+
export type ACPIntentTrace = z.output<typeof ACPIntentTraceSchema>;
|
|
691
|
+
export type ACPCancelCheckoutSessionRequest = z.output<typeof ACPCancelCheckoutSessionRequestSchema>;
|
|
107
692
|
export declare const ACPCheckoutSessionStateSchema: z.ZodObject<{
|
|
108
693
|
id: z.ZodString;
|
|
109
694
|
sessionId: z.ZodOptional<z.ZodString>;
|
|
695
|
+
/** The authenticated agent that created the session and may access it. */
|
|
696
|
+
agentId: z.ZodOptional<z.ZodString>;
|
|
110
697
|
cartId: z.ZodString;
|
|
698
|
+
/** BCP 47 locale and IANA timezone requested on creation. */
|
|
699
|
+
locale: z.ZodOptional<z.ZodString>;
|
|
700
|
+
timezone: z.ZodOptional<z.ZodString>;
|
|
701
|
+
createdAt: z.ZodOptional<z.ZodString>;
|
|
702
|
+
updatedAt: z.ZodOptional<z.ZodString>;
|
|
703
|
+
/** What the agent declared on creation; capabilities are write-only. */
|
|
704
|
+
agentCapabilities: z.ZodOptional<z.ZodObject<{
|
|
705
|
+
interventions: z.ZodOptional<z.ZodObject<{
|
|
706
|
+
supported: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
707
|
+
display_context: z.ZodOptional<z.ZodString>;
|
|
708
|
+
redirect_context: z.ZodOptional<z.ZodString>;
|
|
709
|
+
max_redirects: z.ZodOptional<z.ZodInt>;
|
|
710
|
+
max_interaction_depth: z.ZodOptional<z.ZodInt>;
|
|
711
|
+
}, z.core.$strip>>;
|
|
712
|
+
extensions: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
713
|
+
}, z.core.$strip>>;
|
|
714
|
+
/** ISO 4217 currency requested on creation, lower case. */
|
|
715
|
+
currency: z.ZodOptional<z.ZodString>;
|
|
111
716
|
checkoutId: z.ZodOptional<z.ZodString>;
|
|
112
717
|
status: z.ZodEnum<{
|
|
113
718
|
canceled: "canceled";
|
|
719
|
+
complete_in_progress: "complete_in_progress";
|
|
114
720
|
completed: "completed";
|
|
115
721
|
not_ready_for_payment: "not_ready_for_payment";
|
|
116
722
|
ready_for_payment: "ready_for_payment";
|
|
723
|
+
authentication_required: "authentication_required";
|
|
117
724
|
in_progress: "in_progress";
|
|
118
725
|
}>;
|
|
119
726
|
buyer: z.ZodOptional<z.ZodObject<{
|
|
120
|
-
|
|
727
|
+
first_name: z.ZodOptional<z.ZodString>;
|
|
728
|
+
last_name: z.ZodOptional<z.ZodString>;
|
|
729
|
+
full_name: z.ZodOptional<z.ZodString>;
|
|
121
730
|
email: z.ZodEmail;
|
|
122
731
|
phone_number: z.ZodOptional<z.ZodString>;
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
html: z.ZodOptional<z.ZodString>;
|
|
140
|
-
markdown: z.ZodOptional<z.ZodString>;
|
|
141
|
-
}, z.core.$strip>;
|
|
142
|
-
export declare const ACPMediaSchema: z.ZodObject<{
|
|
143
|
-
url: z.ZodString;
|
|
144
|
-
alt_text: z.ZodOptional<z.ZodString>;
|
|
145
|
-
}, z.core.$strip>;
|
|
146
|
-
export declare const ACPFeedPriceSchema: z.ZodObject<{
|
|
147
|
-
amount: z.ZodInt;
|
|
148
|
-
currency: z.ZodString;
|
|
149
|
-
}, z.core.$strip>;
|
|
150
|
-
export declare const ACPAvailabilitySchema: z.ZodObject<{
|
|
151
|
-
available: z.ZodOptional<z.ZodBoolean>;
|
|
152
|
-
status: z.ZodOptional<z.ZodString>;
|
|
153
|
-
}, z.core.$strip>;
|
|
154
|
-
export declare const ACPBarcodeSchema: z.ZodObject<{
|
|
155
|
-
type: z.ZodString;
|
|
156
|
-
value: z.ZodString;
|
|
157
|
-
}, z.core.$strip>;
|
|
158
|
-
export declare const ACPVariantOptionSchema: z.ZodObject<{
|
|
159
|
-
name: z.ZodString;
|
|
160
|
-
value: z.ZodString;
|
|
161
|
-
}, z.core.$strip>;
|
|
162
|
-
export declare const ACPFeedVariantSchema: z.ZodObject<{
|
|
163
|
-
id: z.ZodString;
|
|
164
|
-
title: z.ZodString;
|
|
165
|
-
description: z.ZodOptional<z.ZodObject<{
|
|
166
|
-
plain: z.ZodOptional<z.ZodString>;
|
|
167
|
-
html: z.ZodOptional<z.ZodString>;
|
|
168
|
-
markdown: z.ZodOptional<z.ZodString>;
|
|
169
|
-
}, z.core.$strip>>;
|
|
170
|
-
url: z.ZodOptional<z.ZodString>;
|
|
171
|
-
barcodes: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
172
|
-
type: z.ZodString;
|
|
173
|
-
value: z.ZodString;
|
|
174
|
-
}, z.core.$strip>>>;
|
|
175
|
-
price: z.ZodOptional<z.ZodObject<{
|
|
176
|
-
amount: z.ZodInt;
|
|
177
|
-
currency: z.ZodString;
|
|
178
|
-
}, z.core.$strip>>;
|
|
179
|
-
list_price: z.ZodOptional<z.ZodObject<{
|
|
180
|
-
amount: z.ZodInt;
|
|
181
|
-
currency: z.ZodString;
|
|
182
|
-
}, z.core.$strip>>;
|
|
183
|
-
availability: z.ZodOptional<z.ZodObject<{
|
|
184
|
-
available: z.ZodOptional<z.ZodBoolean>;
|
|
185
|
-
status: z.ZodOptional<z.ZodString>;
|
|
186
|
-
}, z.core.$strip>>;
|
|
187
|
-
variant_options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
188
|
-
name: z.ZodString;
|
|
189
|
-
value: z.ZodString;
|
|
190
|
-
}, z.core.$strip>>>;
|
|
191
|
-
media: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
192
|
-
url: z.ZodString;
|
|
193
|
-
alt_text: z.ZodOptional<z.ZodString>;
|
|
194
|
-
}, z.core.$strip>>>;
|
|
195
|
-
}, z.core.$strip>;
|
|
196
|
-
export declare const ACPFeedProductSchema: z.ZodObject<{
|
|
197
|
-
id: z.ZodString;
|
|
198
|
-
title: z.ZodOptional<z.ZodString>;
|
|
199
|
-
description: z.ZodOptional<z.ZodObject<{
|
|
200
|
-
plain: z.ZodOptional<z.ZodString>;
|
|
201
|
-
html: z.ZodOptional<z.ZodString>;
|
|
202
|
-
markdown: z.ZodOptional<z.ZodString>;
|
|
203
|
-
}, z.core.$strip>>;
|
|
204
|
-
url: z.ZodOptional<z.ZodString>;
|
|
205
|
-
media: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
206
|
-
url: z.ZodString;
|
|
207
|
-
alt_text: z.ZodOptional<z.ZodString>;
|
|
208
|
-
}, z.core.$strip>>>;
|
|
209
|
-
variants: z.ZodArray<z.ZodObject<{
|
|
210
|
-
id: z.ZodString;
|
|
211
|
-
title: z.ZodString;
|
|
212
|
-
description: z.ZodOptional<z.ZodObject<{
|
|
213
|
-
plain: z.ZodOptional<z.ZodString>;
|
|
214
|
-
html: z.ZodOptional<z.ZodString>;
|
|
215
|
-
markdown: z.ZodOptional<z.ZodString>;
|
|
216
|
-
}, z.core.$strip>>;
|
|
217
|
-
url: z.ZodOptional<z.ZodString>;
|
|
218
|
-
barcodes: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
219
|
-
type: z.ZodString;
|
|
220
|
-
value: z.ZodString;
|
|
221
|
-
}, z.core.$strip>>>;
|
|
222
|
-
price: z.ZodOptional<z.ZodObject<{
|
|
223
|
-
amount: z.ZodInt;
|
|
224
|
-
currency: z.ZodString;
|
|
732
|
+
customer_id: z.ZodOptional<z.ZodString>;
|
|
733
|
+
account_type: z.ZodOptional<z.ZodEnum<{
|
|
734
|
+
business: "business";
|
|
735
|
+
guest: "guest";
|
|
736
|
+
registered: "registered";
|
|
737
|
+
}>>;
|
|
738
|
+
authentication_status: z.ZodOptional<z.ZodEnum<{
|
|
739
|
+
guest: "guest";
|
|
740
|
+
authenticated: "authenticated";
|
|
741
|
+
requires_signin: "requires_signin";
|
|
742
|
+
}>>;
|
|
743
|
+
company: z.ZodOptional<z.ZodObject<{
|
|
744
|
+
name: z.ZodString;
|
|
745
|
+
tax_id: z.ZodOptional<z.ZodString>;
|
|
746
|
+
department: z.ZodOptional<z.ZodString>;
|
|
747
|
+
cost_center: z.ZodOptional<z.ZodString>;
|
|
225
748
|
}, z.core.$strip>>;
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
749
|
+
loyalty: z.ZodOptional<z.ZodObject<{
|
|
750
|
+
tier: z.ZodOptional<z.ZodString>;
|
|
751
|
+
points_balance: z.ZodOptional<z.ZodInt>;
|
|
752
|
+
member_since: z.ZodOptional<z.ZodString>;
|
|
229
753
|
}, z.core.$strip>>;
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
754
|
+
tax_exemption: z.ZodOptional<z.ZodObject<{
|
|
755
|
+
certificate_id: z.ZodString;
|
|
756
|
+
certificate_type: z.ZodEnum<{
|
|
757
|
+
resale: "resale";
|
|
758
|
+
exempt_organization: "exempt_organization";
|
|
759
|
+
government: "government";
|
|
760
|
+
}>;
|
|
761
|
+
exempt_regions: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
762
|
+
expires_at: z.ZodOptional<z.ZodString>;
|
|
233
763
|
}, z.core.$strip>>;
|
|
234
|
-
variant_options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
235
|
-
name: z.ZodString;
|
|
236
|
-
value: z.ZodString;
|
|
237
|
-
}, z.core.$strip>>>;
|
|
238
|
-
media: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
239
|
-
url: z.ZodString;
|
|
240
|
-
alt_text: z.ZodOptional<z.ZodString>;
|
|
241
|
-
}, z.core.$strip>>>;
|
|
242
764
|
}, z.core.$strip>>;
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
765
|
+
/** Affiliate attribution by touchpoint; write-only, never returned. */
|
|
766
|
+
firstTouchAttribution: z.ZodOptional<z.ZodObject<{
|
|
767
|
+
provider: z.ZodString;
|
|
768
|
+
}, z.core.$loose>>;
|
|
769
|
+
lastTouchAttribution: z.ZodOptional<z.ZodObject<{
|
|
770
|
+
provider: z.ZodString;
|
|
771
|
+
}, z.core.$loose>>;
|
|
772
|
+
/** Marketing consents submitted on completion, reported with the order. */
|
|
773
|
+
marketingConsents: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
774
|
+
channel: z.ZodString;
|
|
775
|
+
opted_in: z.ZodBoolean;
|
|
776
|
+
}, z.core.$loose>>>;
|
|
777
|
+
/** Why the agent canceled the session; write-only, never returned. */
|
|
778
|
+
intentTrace: z.ZodOptional<z.ZodObject<{
|
|
779
|
+
reason_code: z.ZodString;
|
|
780
|
+
trace_summary: z.ZodOptional<z.ZodString>;
|
|
781
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
782
|
+
}, z.core.$loose>>;
|
|
783
|
+
/** Discount codes submitted (discount extension) and those rejected. */
|
|
784
|
+
discountCodes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
785
|
+
rejectedDiscounts: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
786
|
+
code: z.ZodString;
|
|
787
|
+
reason: z.ZodString;
|
|
788
|
+
message: z.ZodOptional<z.ZodString>;
|
|
789
|
+
}, z.core.$strip>>>;
|
|
790
|
+
/** The 3DS metadata the session awaits an authentication result for. */
|
|
791
|
+
authenticationMetadata: z.ZodOptional<z.ZodObject<{
|
|
792
|
+
channel: z.ZodOptional<z.ZodObject<{}, z.core.$loose>>;
|
|
793
|
+
acquirer_details: z.ZodObject<{
|
|
794
|
+
acquirer_bin: z.ZodString;
|
|
795
|
+
acquirer_country: z.ZodString;
|
|
796
|
+
acquirer_merchant_id: z.ZodString;
|
|
797
|
+
merchant_name: z.ZodString;
|
|
798
|
+
requestor_id: z.ZodOptional<z.ZodString>;
|
|
799
|
+
}, z.core.$strip>;
|
|
800
|
+
directory_server: z.ZodEnum<{
|
|
801
|
+
american_express: "american_express";
|
|
802
|
+
mastercard: "mastercard";
|
|
803
|
+
visa: "visa";
|
|
804
|
+
}>;
|
|
805
|
+
flow_preference: z.ZodOptional<z.ZodObject<{
|
|
806
|
+
type: z.ZodEnum<{
|
|
807
|
+
challenge: "challenge";
|
|
808
|
+
frictionless: "frictionless";
|
|
809
|
+
}>;
|
|
810
|
+
challenge: z.ZodOptional<z.ZodObject<{
|
|
811
|
+
type: z.ZodOptional<z.ZodEnum<{
|
|
812
|
+
mandated: "mandated";
|
|
813
|
+
preferred: "preferred";
|
|
814
|
+
}>>;
|
|
279
815
|
}, z.core.$strip>>;
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
816
|
+
frictionless: z.ZodOptional<z.ZodObject<{
|
|
817
|
+
type: z.ZodOptional<z.ZodEnum<{
|
|
818
|
+
low_risk: "low_risk";
|
|
819
|
+
}>>;
|
|
283
820
|
}, z.core.$strip>>;
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
821
|
+
}, z.core.$strip>>;
|
|
822
|
+
}, z.core.$loose>>;
|
|
823
|
+
fulfillmentDetails: z.ZodOptional<z.ZodObject<{
|
|
824
|
+
name: z.ZodOptional<z.ZodString>;
|
|
825
|
+
phone_number: z.ZodOptional<z.ZodString>;
|
|
826
|
+
email: z.ZodOptional<z.ZodEmail>;
|
|
827
|
+
address: z.ZodOptional<z.ZodObject<{
|
|
828
|
+
name: z.ZodString;
|
|
829
|
+
line_one: z.ZodString;
|
|
830
|
+
line_two: z.ZodOptional<z.ZodString>;
|
|
831
|
+
city: z.ZodString;
|
|
832
|
+
state: z.ZodString;
|
|
833
|
+
country: z.ZodString;
|
|
834
|
+
postal_code: z.ZodString;
|
|
292
835
|
}, z.core.$strip>>;
|
|
293
836
|
}, z.core.$strip>>;
|
|
294
|
-
|
|
837
|
+
fulfillmentOptionId: z.ZodOptional<z.ZodString>;
|
|
838
|
+
orderId: z.ZodOptional<z.ZodString>;
|
|
839
|
+
}, z.core.$loose>;
|
|
840
|
+
/** An order placed through an ACP checkout session, kept for order events. */
|
|
841
|
+
export declare const ACPOrderRecordSchema: z.ZodObject<{
|
|
842
|
+
id: z.ZodString;
|
|
843
|
+
checkoutSessionId: z.ZodString;
|
|
844
|
+
/** The ACP session that placed the order; backends scope orders to it. */
|
|
845
|
+
sessionId: z.ZodOptional<z.ZodString>;
|
|
846
|
+
/** The agent that placed the order, whose webhook receives its events. */
|
|
847
|
+
agentId: z.ZodOptional<z.ZodString>;
|
|
848
|
+
}, z.core.$loose>;
|
|
849
|
+
export type ACPOrderRecord = z.infer<typeof ACPOrderRecordSchema>;
|
|
295
850
|
export type ACPItem = z.infer<typeof ACPItemSchema>;
|
|
851
|
+
export type ACPAuthenticationMetadata = z.infer<typeof ACPAuthenticationMetadataSchema>;
|
|
852
|
+
export type ACPAuthenticationResult = z.infer<typeof ACPAuthenticationResultSchema>;
|
|
853
|
+
export type ACPAgentCapabilities = z.infer<typeof ACPAgentCapabilitiesSchema>;
|
|
296
854
|
export type ACPBuyer = z.infer<typeof ACPBuyerSchema>;
|
|
297
855
|
export type ACPAddress = z.infer<typeof ACPAddressSchema>;
|
|
856
|
+
export type ACPFulfillmentDetails = z.infer<typeof ACPFulfillmentDetailsSchema>;
|
|
857
|
+
export type ACPSelectedFulfillmentOption = z.infer<typeof ACPSelectedFulfillmentOptionSchema>;
|
|
298
858
|
export type ACPCreateCheckoutSessionRequest = z.infer<typeof ACPCreateCheckoutSessionRequestSchema>;
|
|
299
859
|
export type ACPUpdateCheckoutSessionRequest = z.infer<typeof ACPUpdateCheckoutSessionRequestSchema>;
|
|
300
860
|
export type ACPCompleteCheckoutSessionRequest = z.infer<typeof ACPCompleteCheckoutSessionRequestSchema>;
|
|
301
861
|
export type ACPPaymentData = z.infer<typeof ACPPaymentDataSchema>;
|
|
302
862
|
export type ACPCheckoutSessionState = z.infer<typeof ACPCheckoutSessionStateSchema>;
|
|
303
|
-
export type ACPFeedProduct = z.infer<typeof ACPFeedProductSchema>;
|
|
304
|
-
export type ACPFeedVariant = z.infer<typeof ACPFeedVariantSchema>;
|
|
305
|
-
export type ACPProductFeedResponse = z.infer<typeof ACPProductFeedResponseSchema>;
|