@agent-cards/sdk 0.23.19 → 0.23.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. package/CHANGELOG.md +61 -2
  2. package/PREFLIGHT.md +4 -0
  3. package/README.md +175 -7
  4. package/dist/amadeus.d.ts +4 -2
  5. package/dist/amadeus.js +16 -3
  6. package/dist/buy.d.ts +84 -2
  7. package/dist/buy.js +16 -1
  8. package/dist/card-endpoint-facts.d.ts +2 -1
  9. package/dist/card-endpoint-facts.js +18 -9
  10. package/dist/card-endpoint.d.ts +20 -4
  11. package/dist/card-endpoint.js +38 -4
  12. package/dist/card-fields.generated.js +1444 -51
  13. package/dist/cdp.d.ts +29 -0
  14. package/dist/cdp.js +444 -24
  15. package/dist/client.d.ts +134 -7
  16. package/dist/client.js +350 -25
  17. package/dist/comgate.d.ts +50 -0
  18. package/dist/comgate.js +80 -0
  19. package/dist/cybersource-secure-acceptance.generated.d.ts +1 -1
  20. package/dist/eprotect.generated.d.ts +1 -1
  21. package/dist/gmo.generated.js +7 -3
  22. package/dist/hipay.generated.d.ts +56 -0
  23. package/dist/hipay.generated.js +392 -0
  24. package/dist/hold.d.ts +180 -0
  25. package/dist/hold.js +270 -0
  26. package/dist/hosted-entry.d.ts +4 -0
  27. package/dist/hosted-entry.js +32 -0
  28. package/dist/index.d.ts +4 -1
  29. package/dist/index.js +1 -0
  30. package/dist/lifecycle.d.ts +10 -0
  31. package/dist/lifecycle.js +21 -0
  32. package/dist/merchant-card-endpoints.generated.js +102 -11
  33. package/dist/paddle-tokenex.generated.js +7 -3
  34. package/dist/paddle-vgs.generated.d.ts +3 -2
  35. package/dist/paddle-vgs.generated.js +9 -5
  36. package/dist/payrails.generated.js +7 -3
  37. package/dist/pre-claim.d.ts +20 -0
  38. package/dist/pre-claim.js +202 -22
  39. package/dist/preflight-catalog.json +58 -0
  40. package/dist/preflight-schemas.json +4 -0
  41. package/dist/preflight.generated.js +26 -2
  42. package/dist/prepared-processor.d.ts +6 -2
  43. package/dist/prepared-processor.js +18 -2
  44. package/dist/primer.generated.js +1487 -94
  45. package/dist/przelewy24.d.ts +47 -0
  46. package/dist/przelewy24.js +88 -0
  47. package/dist/quickpay.d.ts +44 -0
  48. package/dist/quickpay.js +65 -0
  49. package/dist/registry.d.ts +6 -5
  50. package/dist/registry.js +27 -7
  51. package/dist/shiji-sts.generated.js +7 -3
  52. package/dist/stripe-checkout.generated.js +744 -13
  53. package/dist/tokenex-iframe.d.ts +93 -0
  54. package/dist/tokenex-iframe.generated.d.ts +81 -0
  55. package/dist/tokenex-iframe.generated.js +403 -0
  56. package/dist/tokenex-iframe.js +195 -0
  57. package/dist/transbank.d.ts +45 -0
  58. package/dist/transbank.js +73 -0
  59. package/dist/twoc2p.d.ts +54 -0
  60. package/dist/twoc2p.generated.d.ts +33 -0
  61. package/dist/twoc2p.generated.js +1149 -0
  62. package/dist/twoc2p.js +85 -0
  63. package/dist/voice.d.ts +16 -13
  64. package/dist/voice.js +13 -10
  65. package/examples/preflight/kernel-native/inventory.json +1 -1
  66. package/package.json +3 -3
package/dist/client.d.ts CHANGED
@@ -242,6 +242,13 @@ export declare const SUPPORTED_REGISTRY_FEATURES: readonly string[];
242
242
  * checkout relay. Served on the same terms: only to a build that lists it, for a company
243
243
  * Agentcard turned Payfast on for.
244
244
  *
245
+ * `przelewy24_hosted_payment_page`: Przelewy24's pay wall, whose card-free link
246
+ * (secure.przelewy24.pl/trnRequest/<token>, a plain GET the merchant's redirect or script sends
247
+ * the buyer to) this build pauses for the cardholder's device by its exact link (hosted-entry.ts),
248
+ * and whose card method post, card form post and Saferpay resolver this build never lets the
249
+ * agent's browser send (pre-claim.ts, przelewy24.ts). Served on the same terms as NMI's and
250
+ * Redsys's: only to a build that lists it, for a company Agentcard turned Przelewy24 on for.
251
+ *
245
252
  * `wix_payments_tokenize`: the card request Wix Cashier's card frame sends to Wix's
246
253
  * tokenizer (cashier-pci.wixapps.net), only through a prepared checkout: Wix's payment
247
254
  * widget fails the payment 30 seconds after it asks the frame for a token. The
@@ -257,6 +264,115 @@ export declare const SUPPORTED_REGISTRY_FEATURES: readonly string[];
257
264
  * that the page then runs in the agent's browser. The cardholder's device sends the card through
258
265
  * the checkout relay. Served on the same terms: only to a build that lists it, for a company
259
266
  * Agentcard turned PayMongo on for.
267
+ *
268
+ * `gopay_card_form`: the card post GoPay's card frame sends to its own URL
269
+ * (secure.gopay.com/gp-card-comm/h/<token>) inside the GoPay gateway a shop opens. This build pauses
270
+ * only the frame's own card post and answers it with GoPay's answer as the API recorded it, the
271
+ * empty JSON object the frame reads; the gateway then reads the payment's end from GoPay and runs
272
+ * 3-D Secure in the agent's browser when the bank asks for it. The cardholder's device sends the card
273
+ * through the checkout relay. Served only to a build that lists it, and only for Agentcard's proof
274
+ * company until a reviewed change binds GoPay's payee and amount to the approval: the post names
275
+ * neither. The API takes it only at a shop Agentcard reviewed.
276
+ *
277
+ * `hipay_vault_token`: the token create HiPay's hosted fields send to HiPay's Secure Vault
278
+ * (secure2-vault.hipay-tpp.com, stage-secure2-vault for a test row), only through a prepared
279
+ * checkout: the merchant's page gives the frame 20 seconds after Pay. The cardholder's device
280
+ * sends the card to HiPay directly and the frame gets back HiPay's token. The number-only post
281
+ * the frame sends while the number is typed, and its /update once it holds a token, fail in the
282
+ * browser (pre-claim.ts hipayPreClaim). Served on the same terms: only to a build that lists it,
283
+ * for a company Agentcard turned HiPay on for.
284
+ *
285
+ * `twoc2p_secure_pay`: the Payment 2C2P's hosted payment page posts to its payment API
286
+ * (pgwv4.2c2p.com), carrying the card only as one field the page encrypts under 2C2P's static
287
+ * key. This build pauses it and writes over the placeholder's field the one the cardholder's
288
+ * device wrote under the key payment-core pins (twoc2p.ts), into that Payment alone; 3-D Secure
289
+ * then runs in the agent's browser. Served only to a build that lists it, and only for Agentcard's
290
+ * proof company, whatever the API's processor lists name: the field is the card under 2C2P's one
291
+ * static key, which any 2C2P merchant could charge.
292
+ *
293
+ * `quickpay_hosted_payment_page`: QuickPay's hosted payment window, whose card-free signed entry
294
+ * this build pauses for the cardholder's device and whose card post, fee lookup, wallet post, 3-D
295
+ * Secure step and card lookup this build never lets the agent's browser send (pre-claim.ts,
296
+ * quickpay.ts). Served on the same terms as NMI's and Redsys's: only to a build that lists it, for a
297
+ * company Agentcard turned QuickPay on for.
298
+ *
299
+ * `revolut_card_field`: the card payment Revolut Business's card field or card popup sends from
300
+ * its frame to /api/public/orders/<order token>/payments on merchant.revolut.com, on a merchant's
301
+ * own page or Revolut's hosted checkout. This build pauses only the frame's card payment and
302
+ * answers it with Revolut's answer as the API recorded it: the payment Revolut created, which the
303
+ * frame then follows, through any 3-D Secure step, in the agent's browser. A payment by Apple Pay,
304
+ * Google Pay or Revolut Pay on the same URL carries no card and continues untouched. Revolut's
305
+ * host answers the Vault's origin, so the cardholder's device sends the card itself, with no relay.
306
+ * Served on the same terms: only to a build that lists it, for a company Agentcard turned Revolut
307
+ * on for.
308
+ *
309
+ * `pay_nl_card_token`: the card token request a shop's card form sends to Pay. (pay.nl),
310
+ * Weeztix's sandboxed frame posting its FormData to payment.pay.nl/v1/Payment/getCardToken/json.
311
+ * This build pauses only the form's own multipart body at that exact URL; the cardholder's
312
+ * device sends the card through the checkout relay, and the frame gets the token answer
313
+ * payment-core's judge rebuilt, with the CORS answer for the frame's own origin, null. The
314
+ * request names no amount, so the agent's pair, above zero, is the one the cardholder approves
315
+ * (PAY_NL_PSP below). Served on the same terms: only to a build that lists it, for a company
316
+ * Agentcard turned Pay. on for.
317
+ *
318
+ * `paypal_card_fields`: PayPal Card Fields' confirm, the POST its v5 frame sends to
319
+ * www.paypal.com and its v6 frame to api-m.paypal.com. This build pauses it only in
320
+ * the frames' own shape, refuses one that asks PayPal to keep the card or forces
321
+ * 3-D Secure in the browser with a `blocked` event, and answers the frame with the
322
+ * order's id and status as the API recorded them. The device sends a v5 confirm
323
+ * through the checkout relay and a v6 one directly. Served on the same terms: only
324
+ * to a build that lists it, for a company Agentcard turned PayPal Card Fields on
325
+ * for. Every other company keeps the checkout guard's refusal (paypal-card-forms.ts).
326
+ *
327
+ * `comgate_hosted_payment_page`: ComGate's payment gateway, whose card-free gateway link
328
+ * (payN.comgate.cz/init?id=<transaction id>, a plain GET) this build pauses for the
329
+ * cardholder's device by its exact link (hosted-entry.ts), in the page, in a frame of it or
330
+ * in a window it opened, and whose card hosts this build never lets the agent's browser post
331
+ * to (pre-claim.ts, comgate.ts). Served on the same terms as NMI's and Redsys's: only to a
332
+ * build that lists it, for a company Agentcard turned ComGate on for.
333
+ *
334
+ * `makecommerce_card_frame`: the card post MakeCommerce's card frame sends to its own card endpoint
335
+ * (cc.maksekeskus.ee/card-payment) under the shop's publishable key. This build pauses only the
336
+ * frame's own one-time card payment and answers it with MakeCommerce's answer as the API recorded
337
+ * it: the URL of MakeCommerce's 3-D Secure page, which the frame then opens in the agent's browser.
338
+ * The cardholder's device sends the card through the checkout relay. Served on the same terms: only
339
+ * to a build that lists it, for a company Agentcard turned MakeCommerce on for.
340
+ *
341
+ * `poynt_collect_nonce`: GoDaddy Payments' card request, the POST Poynt Collect's
342
+ * card frame sends to a store's generate-nonce on services.poynt.net. This build
343
+ * pauses it only as the frame writes it, refuses a body that asks Poynt to keep the
344
+ * card in the browser with a `blocked` event, and answers the frame with the nonce as
345
+ * the API recorded it. The device sends the card through the checkout relay. Served
346
+ * on the same terms: only to a build that lists it, for a company Agentcard turned
347
+ * GoDaddy Payments on for.
348
+ *
349
+ * `tokenex_iframe_tokenize`: the card post TokenEx's hosted iframe v3 sends from its card-number frame
350
+ * to its own document URL on htp.tokenex.com (JetBlue's card form). This build pauses only the PCI frame's
351
+ * own card post with its CVV frame, refuses in the browser every other post on that path that carries a
352
+ * card (tokenex-iframe.ts), answers it with TokenEx's token as the API recorded it, rebuilt from
353
+ * payment-core's allow-list, and answers the same frame's byte-identical repeat from that answer while the
354
+ * approval is being handed off. Served on the same terms: only to a build that lists it, for a company
355
+ * Agentcard turned the TokenEx iframe on for.
356
+ *
357
+ * `transbank_webpay_hosted_payment_page`: Transbank's Webpay Plus, whose card-free entry
358
+ * (webpay3g.transbank.cl/webpayserver/initTransaction?token_ws=<token>, the merchant's
359
+ * redirect, a plain GET) this build pauses for the cardholder's device by its exact link
360
+ * (hosted-entry.ts) in the page or a frame of it, and with attachToCdp also in a window the
361
+ * page opened, and whose hosts this build never lets the agent's browser post to (pre-claim.ts,
362
+ * transbank.ts), so the token is never spent there. attachToPlaywright covers the page it is
363
+ * attached to and that page's frames only, and pauses only a direct or scripted navigation to
364
+ * the entry: its page.route sees no HTTP redirect hop, so a merchant's redirect needs attachToCdp.
365
+ * Served on the same terms as NMI's and Redsys's: only to a build that lists it, for a company
366
+ * Agentcard turned Webpay on for.
367
+ *
368
+ * `sumup_checkout_process`: the card request SumUp's Payment Widget sends from its hidden form frame
369
+ * on gateway.sumup.com, a PUT to https://api.sumup.com/v0.2/checkouts/<checkout id>. This build pauses
370
+ * that PUT as it pauses Gravy's, so only the CDP and Playwright adapters see it (the form frame is
371
+ * cross-origin to the page), and answers the frame with SumUp's own answer as the API recorded it: the
372
+ * paid checkout, or the 3-D Secure step the widget then runs in the agent's browser. The cardholder's
373
+ * device sends the card itself, and the API holds the payment to a merchant Agentcard reviewed, at the
374
+ * amount SumUp holds for the checkout. Served on the same terms: only to a build that lists it, for a
375
+ * company Agentcard turned SumUp on for.
260
376
  */
261
377
  export declare const SUPPORTED_CAPABILITIES: readonly string[];
262
378
  /**
@@ -816,7 +932,10 @@ export interface PlaceholderCard {
816
932
  /**
817
933
  * The placeholder number for a network (lowercase, as GET /api/v2/vault_cards names it) on a
818
934
  * processor's page: the processor's own number for that network when `overrides` names one, else
819
- * the network's default, else undefined for a network with no placeholder.
935
+ * the network's default, else undefined for a network with no placeholder. On a TokenEx iframe
936
+ * (`tokenex_iframe`) the number must also be one TokenEx's frame reads as that network, since the frame
937
+ * names the brand to the page from the typed digits and the cardholder's device refuses a mismatch: the
938
+ * frame's table takes Visa, Mastercard and American Express, so every other network gets undefined.
820
939
  */
821
940
  export declare function placeholderNumber(brand: string, psp?: string, overrides?: Readonly<Record<string, Readonly<Record<string, string>>>>): string | undefined;
822
941
  /**
@@ -839,7 +958,9 @@ export declare class PreparationRequiredError extends Error {
839
958
  * when the merchant's server created the payment), so the `amount` and
840
959
  * `currency` you pass are what the cardholder approves, and for WSPay the
841
960
  * figure the API compares with WSPay's answer when that answer names one (a
842
- * 3-D Secure step names none). Thrown locally before any create or
961
+ * 3-D Secure step names none). A Revolut card payment names the order's
962
+ * amount but not its currency, so it takes the same pair, above zero.
963
+ * Thrown locally before any create or
843
964
  * prompt, and terminal: the same request without an amount fails the same
844
965
  * way. The API answers 400 amount_required for the same case. A page total
845
966
  * (`pageAmount`) does not count.
@@ -1193,6 +1314,10 @@ export declare class CheckoutAuthError extends Error {
1193
1314
  * On Paytrail's hosts a payment's id reads `{transaction}`:
1194
1315
  * https://services.paytrail.com/payments/{transaction}/click-to-pay/loading-and-redirect, and on Payment
1195
1316
  * Highway's a card page's session reads `{session}`.
1317
+ * On 2C2P's page hosts everything after the build's folder reads `{token}`:
1318
+ * https://pgw-ui.2c2p.com/payment/4.1/{token}.
1319
+ * On QuickPay's host the window's session reads `{session}`:
1320
+ * https://payment.quickpay.net/{session}/3ds_auth.
1196
1321
  * A string that is not a URL keeps the part before any `?` or `#`, with the
1197
1322
  * same segments masked for every processor whose host it names.
1198
1323
  * A URL is read by its host only when the parser finds one. Text before a URL
@@ -1243,8 +1368,8 @@ export interface VaultClientOptions {
1243
1368
  /**
1244
1369
  * The voice module: how this product approves purchases by voice, named
1245
1370
  * once per business, with the Vault return link and the verifier address
1246
- * beside it. Leave it out for a client that approves no purchase by voice;
1247
- * `agentcard.voice.*` then throws `missing_approval_posture`. See `VoiceOptions`.
1371
+ * beside it. Leave it out and the client approves on Agentcard's page
1372
+ * (`approval: 'sheet'`). See `VoiceOptions`.
1248
1373
  */
1249
1374
  voice?: VoiceOptions;
1250
1375
  /**
@@ -1309,8 +1434,8 @@ export declare class VaultClient {
1309
1434
  /**
1310
1435
  * Approve purchases by voice inside your own product: connect a person once,
1311
1436
  * create the purchase, ask for the key word, read the result. Same
1312
- * credentials, same token as the checkout calls. Needs `voice: { approval }`
1313
- * at construction; without it every verb throws `missing_approval_posture`.
1437
+ * credentials, same token as the checkout calls. Approves on Agentcard's
1438
+ * page unless `voice: { approval: 'in_app' }` was named at construction.
1314
1439
  */
1315
1440
  readonly voice: VoiceModule;
1316
1441
  /**
@@ -1456,7 +1581,9 @@ export declare class VaultClient {
1456
1581
  * The facts hold only while the cardholder pays with that card. `psp` names the processor
1457
1582
  * whose card form the agent types into (the recognizer's name, `worldline_mycheckout`): a
1458
1583
  * processor that needs its own number for the card's network gets it, and every other gets the
1459
- * network's default. Throws PlaceholderCardError when there is no such card, its network has no
1584
+ * network's default. On a TokenEx iframe (`tokenex_iframe`, JetBlue) the number is one TokenEx's frame
1585
+ * reads as the card's own network, Visa, Mastercard or American Express, and any other network has no
1586
+ * placeholder there. Throws PlaceholderCardError when there is no such card, its network has no
1460
1587
  * placeholder, or it carries no expiry.
1461
1588
  */
1462
1589
  placeholderCard(input: {