@agent-cards/sdk 0.23.20 → 0.23.22

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 (64) hide show
  1. package/CHANGELOG.md +55 -2
  2. package/PREFLIGHT.md +6 -0
  3. package/README.md +169 -5
  4. package/dist/amadeus-checkout.generated.d.ts +6 -1
  5. package/dist/amadeus-checkout.generated.js +26 -2
  6. package/dist/card-fields.generated.js +2341 -127
  7. package/dist/cdp.js +199 -28
  8. package/dist/client.d.ts +177 -9
  9. package/dist/client.js +387 -37
  10. package/dist/comgate.d.ts +50 -0
  11. package/dist/comgate.js +80 -0
  12. package/dist/creditguard.generated.js +4 -2
  13. package/dist/cse-body.js +11 -0
  14. package/dist/cybersource-secure-acceptance.generated.d.ts +1 -1
  15. package/dist/ebanx.d.ts +1 -1
  16. package/dist/ebanx.js +1 -1
  17. package/dist/eprotect.generated.d.ts +1 -1
  18. package/dist/eximbay.d.ts +46 -0
  19. package/dist/eximbay.js +69 -0
  20. package/dist/gmo.generated.js +7 -3
  21. package/dist/hipay.generated.d.ts +5 -5
  22. package/dist/hipay.generated.js +5 -2
  23. package/dist/hold.d.ts +1 -1
  24. package/dist/hold.js +10 -4
  25. package/dist/hosted-entry.d.ts +4 -0
  26. package/dist/hosted-entry.js +32 -0
  27. package/dist/index.d.ts +1 -0
  28. package/dist/lifecycle.d.ts +9 -4
  29. package/dist/lifecycle.js +16 -4
  30. package/dist/paddle-tokenex.generated.js +7 -3
  31. package/dist/paygent.generated.d.ts +60 -0
  32. package/dist/paygent.generated.js +425 -0
  33. package/dist/payrails.generated.js +7 -3
  34. package/dist/payrexx.d.ts +91 -0
  35. package/dist/payrexx.generated.d.ts +91 -0
  36. package/dist/payrexx.generated.js +536 -0
  37. package/dist/payrexx.js +141 -0
  38. package/dist/pre-claim.d.ts +30 -1
  39. package/dist/pre-claim.js +257 -39
  40. package/dist/preflight-catalog.json +58 -0
  41. package/dist/preflight-schemas.json +4 -0
  42. package/dist/preflight.generated.js +26 -2
  43. package/dist/prepared-processor.d.ts +7 -2
  44. package/dist/prepared-processor.js +16 -2
  45. package/dist/primer.generated.js +2469 -255
  46. package/dist/przelewy24.d.ts +47 -0
  47. package/dist/przelewy24.js +88 -0
  48. package/dist/registry.d.ts +6 -5
  49. package/dist/registry.js +27 -7
  50. package/dist/shiji-sts.generated.js +7 -3
  51. package/dist/stripe-checkout.generated.js +896 -19
  52. package/dist/toast-seal.generated.d.ts +37 -0
  53. package/dist/toast-seal.generated.js +625 -0
  54. package/dist/toast.generated.d.ts +41 -0
  55. package/dist/toast.generated.js +113 -0
  56. package/dist/tokenex-iframe.d.ts +93 -0
  57. package/dist/tokenex-iframe.generated.d.ts +81 -0
  58. package/dist/tokenex-iframe.generated.js +403 -0
  59. package/dist/tokenex-iframe.js +195 -0
  60. package/dist/transbank.d.ts +45 -0
  61. package/dist/transbank.js +73 -0
  62. package/dist/twoc2p.generated.js +7 -3
  63. package/examples/preflight/kernel-native/inventory.json +1 -1
  64. package/package.json +3 -3
@@ -0,0 +1,41 @@
1
+ declare var TOAST_PSP: string;
2
+ declare var TOAST_CAPABILITY: string;
3
+ declare var TOAST_OPERATION: string;
4
+ declare var TOAST_PAYMENT_METHODS_URL: string;
5
+ declare var TOAST_KEY_ID: string;
6
+ declare var TOAST_KEY: Readonly<{
7
+ spki: "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAkq50dXdz/fQOwYUswZRXgh5Vghs1tcJZCv2goNsC5BO3dXC/EiejcApaE/fKVMespzDNSLsQHXrWHegpE2piyeBwMzpTbHrCG3v6MnG6Nu+9dBYxPS4T9cNMsf0V/iCPiiaTXib6r8IfOjVZTTas2nKGZEtiDfYJIS3bJ/f30SMP4dAFILvzXGALeqleB/psQ8AFc/qUZf7VZpRnoGtKoo8wD253xTmDdaiKqr09bcJZxhTWsCB9aYouqdbl6y9/5Lu+MtyBkj7LI05g5QqDSfVax0sp/Fe7RY5SYxwlR4GlMonwtbvFTMKsr6dZ1uLuNjHA/6dm+112Uqn/AxrKGwIDAQAB";
8
+ sha256: "5475b78c9577b1258615286307547aba18c52faa6fd7d60ad0cfcb996e21ad0e";
9
+ }>;
10
+ declare var TOAST_CIPHERTEXT_BYTES: number;
11
+ declare var TOAST_SUBSTITUTION: Readonly<{
12
+ at: "card";
13
+ fields: readonly string[];
14
+ }>;
15
+ declare var TOAST_REFUSAL_CODES: readonly string[];
16
+ declare function isToastPaymentMethodsUrl(url: any): boolean;
17
+ declare function isToastHost(url: any): boolean;
18
+ declare function isToastCiphertext(value: any): boolean;
19
+ declare function readToastBody(body: any): Readonly<{
20
+ ok: false;
21
+ code: any;
22
+ }> | Readonly<{
23
+ ok: false;
24
+ wallet: true;
25
+ }> | Readonly<{
26
+ ok: boolean;
27
+ sessionSecret: any;
28
+ postalCode: any;
29
+ cardData: any;
30
+ }>;
31
+ declare function toastBodyVerdict(body: any): Readonly<{
32
+ verdict: "card";
33
+ }> | Readonly<{
34
+ verdict: "continue";
35
+ }> | Readonly<{
36
+ verdict: "refuse";
37
+ code: any;
38
+ }>;
39
+ declare function toastRequestRefusal(request: any): any;
40
+ declare function toastRefusalMessage(code: any): any;
41
+ export { TOAST_CAPABILITY, TOAST_CIPHERTEXT_BYTES, TOAST_KEY, TOAST_KEY_ID, TOAST_OPERATION, TOAST_PAYMENT_METHODS_URL, TOAST_PSP, TOAST_REFUSAL_CODES, TOAST_SUBSTITUTION, isToastCiphertext, isToastHost, isToastPaymentMethodsUrl, readToastBody, toastBodyVerdict, toastRefusalMessage, toastRequestRefusal };
@@ -0,0 +1,113 @@
1
+ // @ts-nocheck
2
+ // Generated from @agent-cards/payment-core. Do not edit.
3
+ // artifact-sha256: d0c3bda9a5b7939a6984156929cbcb7ba7d427fa38c544aad65c4593cf272d05
4
+ // src/toast.js
5
+ var TOAST_PSP = "toast";
6
+ var TOAST_CAPABILITY = "toast_pinned_key";
7
+ var TOAST_OPERATION = "toast.encrypted_card";
8
+ var TOAST_PAYMENT_METHODS_URL = "https://payments.toasttab.com/v1/payment-methods";
9
+ var TOAST_KEY_ID = "RSA-OAEP-SHA1::bacb4887-8314-4c23-98fc-d5ef7bc99e94_oo-legacy-browsers";
10
+ var TOAST_KEY = /* @__PURE__ */ Object.freeze({
11
+ spki: "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAkq50dXdz/fQOwYUswZRXgh5Vghs1tcJZCv2goNsC5BO3dXC/EiejcApaE/fKVMespzDNSLsQHXrWHegpE2piyeBwMzpTbHrCG3v6MnG6Nu+9dBYxPS4T9cNMsf0V/iCPiiaTXib6r8IfOjVZTTas2nKGZEtiDfYJIS3bJ/f30SMP4dAFILvzXGALeqleB/psQ8AFc/qUZf7VZpRnoGtKoo8wD253xTmDdaiKqr09bcJZxhTWsCB9aYouqdbl6y9/5Lu+MtyBkj7LI05g5QqDSfVax0sp/Fe7RY5SYxwlR4GlMonwtbvFTMKsr6dZ1uLuNjHA/6dm+112Uqn/AxrKGwIDAQAB",
12
+ sha256: "5475b78c9577b1258615286307547aba18c52faa6fd7d60ad0cfcb996e21ad0e"
13
+ });
14
+ var TOAST_CIPHERTEXT_BYTES = 256;
15
+ var TOAST_SUBSTITUTION = /* @__PURE__ */ Object.freeze({ at: "card", fields: Object.freeze(["cardData"]) });
16
+ var TOAST_REFUSAL_CODES = /* @__PURE__ */ Object.freeze(["toast_url_refused", "toast_foreign_key", "toast_keeps_card", "toast_body_malformed"]);
17
+ var BODY_LIMIT = 8192;
18
+ var ROOT_KEYS = /* @__PURE__ */ Object.freeze(["type", "card", "sessionSecret", "usage", "setupFutureUsage", "billingDetails"]);
19
+ var CARD_KEYS = /* @__PURE__ */ Object.freeze(["keyId", "cardData"]);
20
+ var WALLETS = /* @__PURE__ */ Object.freeze(["APPLE_PAY", "GOOGLE_PAY"]);
21
+ var SESSION_SECRET = /^[\x21-\x7e]{1,1024}$/;
22
+ var POSTAL_CODE = /^[A-Za-z0-9 -]{0,16}$/;
23
+ var CIPHERTEXT_B64 = /^[A-Za-z0-9+/]{341}[AQgw]==$/;
24
+ var record = (value) => value !== null && typeof value === "object" && !Array.isArray(value);
25
+ var sameKeys = (value, keys) => {
26
+ const own = Object.keys(value);
27
+ return own.length === keys.length && own.every((key, at) => key === keys[at]);
28
+ };
29
+ var refuse = (code) => Object.freeze({ verdict: "refuse", code });
30
+ var failed = (code) => (
31
+ /** @type {ToastBodyReadJs} */
32
+ Object.freeze({ ok: false, code }));
33
+ var CARD = /* @__PURE__ */ Object.freeze({ verdict: "card" });
34
+ var CONTINUE = /* @__PURE__ */ Object.freeze({ verdict: "continue" });
35
+ function isWalletBody(parsed) {
36
+ const card = parsed.card;
37
+ const rootOk = sameKeys(parsed, ["type", "card", "sessionSecret"]) || sameKeys(parsed, ["type", "card", "sessionSecret", "billingDetails"]) && record(parsed.billingDetails);
38
+ return rootOk && WALLETS.includes(parsed.type) && record(card) && sameKeys(card, ["keyId", "cardData", "wallet"]) && card.keyId === null && typeof card.cardData === "string" && record(card.wallet) && sameKeys(card.wallet, ["type"]) && card.wallet.type === parsed.type && typeof parsed.sessionSecret === "string";
39
+ }
40
+ function isToastPaymentMethodsUrl(url) {
41
+ return url === TOAST_PAYMENT_METHODS_URL;
42
+ }
43
+ function isToastHost(url) {
44
+ if (typeof url !== "string")
45
+ return false;
46
+ try {
47
+ return new URL(url).hostname.toLowerCase().replace(/\.$/, "") === "payments.toasttab.com";
48
+ }
49
+ catch {
50
+ return false;
51
+ }
52
+ }
53
+ function isToastCiphertext(value) {
54
+ return typeof value === "string" && CIPHERTEXT_B64.test(value);
55
+ }
56
+ function readToastBody(body) {
57
+ const malformed = failed("toast_body_malformed");
58
+ if (typeof body !== "string" || body.length > BODY_LIMIT)
59
+ return malformed;
60
+ let parsed;
61
+ try {
62
+ parsed = JSON.parse(body);
63
+ }
64
+ catch {
65
+ return malformed;
66
+ }
67
+ if (!record(parsed) || JSON.stringify(parsed) !== body)
68
+ return malformed;
69
+ if (isWalletBody(parsed))
70
+ return (
71
+ /** @type {ToastBodyReadJs} */
72
+ Object.freeze({ ok: false, wallet: true }));
73
+ const card = parsed.card;
74
+ if (!sameKeys(parsed, ROOT_KEYS) || parsed.type !== "CARD" || !record(card) || !sameKeys(card, CARD_KEYS))
75
+ return malformed;
76
+ if (typeof card.keyId !== "string")
77
+ return malformed;
78
+ if (card.keyId !== TOAST_KEY_ID)
79
+ return failed("toast_foreign_key");
80
+ if (!isToastCiphertext(card.cardData))
81
+ return malformed;
82
+ if (typeof parsed.sessionSecret !== "string" || !SESSION_SECRET.test(parsed.sessionSecret))
83
+ return malformed;
84
+ if (parsed.usage !== null || parsed.setupFutureUsage !== null)
85
+ return failed("toast_keeps_card");
86
+ const billing = parsed.billingDetails;
87
+ if (!record(billing) || !sameKeys(billing, ["postalCode"]) || typeof billing.postalCode !== "string" || !POSTAL_CODE.test(billing.postalCode))
88
+ return malformed;
89
+ const read = { ok: true, sessionSecret: parsed.sessionSecret, postalCode: billing.postalCode, cardData: card.cardData };
90
+ return Object.freeze(read);
91
+ }
92
+ function toastBodyVerdict(body) {
93
+ const read = readToastBody(body);
94
+ if (read.ok)
95
+ return CARD;
96
+ return read.wallet ? CONTINUE : refuse(read.code);
97
+ }
98
+ function toastRequestRefusal(request) {
99
+ if (!record(request) || typeof request.method !== "string" || request.method.toUpperCase() !== "POST" || !isToastPaymentMethodsUrl(request.url))
100
+ return "toast_url_refused";
101
+ const read = readToastBody(request.body);
102
+ return read.ok ? null : read.code ?? "toast_body_malformed";
103
+ }
104
+ var REFUSAL_MESSAGES = /* @__PURE__ */ Object.freeze({
105
+ toast_url_refused: "Refusing to pay: this Toast card request does not go to the address Toast's card form sends cards to. Nothing was sent.",
106
+ toast_foreign_key: "Refusing to pay: this Toast card request is encrypted under a key Agentcard has not reviewed. Nothing was sent.",
107
+ toast_keeps_card: "Refusing to pay: this Toast checkout asks to keep the card for later payments, and Agentcard pays only a one-time guest checkout here. Nothing was sent.",
108
+ toast_body_malformed: "Refusing to pay: this is not the card request of Toast's card form. Nothing was sent."
109
+ });
110
+ function toastRefusalMessage(code) {
111
+ return Object.prototype.hasOwnProperty.call(REFUSAL_MESSAGES, code) ? REFUSAL_MESSAGES[code] : REFUSAL_MESSAGES.toast_body_malformed;
112
+ }
113
+ export { TOAST_CAPABILITY, TOAST_CIPHERTEXT_BYTES, TOAST_KEY, TOAST_KEY_ID, TOAST_OPERATION, TOAST_PAYMENT_METHODS_URL, TOAST_PSP, TOAST_REFUSAL_CODES, TOAST_SUBSTITUTION, isToastCiphertext, isToastHost, isToastPaymentMethodsUrl, readToastBody, toastBodyVerdict, toastRefusalMessage, toastRequestRefusal };
@@ -0,0 +1,93 @@
1
+ import type { ReplayResponse } from './client.js';
2
+ /** The PSP id the API and the recognizer name this lane. */
3
+ export declare const TOKENEX_IFRAME_PSP: string;
4
+ /** The dark-launch capability the API serves the tokenex_iframe recognizer behind. */
5
+ export declare const TOKENEX_IFRAME_CAPABILITY: string;
6
+ /**
7
+ * Why the SDK refuses a TokenEx card post before anything is claimed, created or prompted: a post on the frame's
8
+ * /iframe/v3 path that carries a value in Data and is not the PCI card-number frame's own card post (a cvvOnly or
9
+ * PCI-only frame, a Token key, another key, order or type, a query this lane has not read or that names another
10
+ * account than the body, a URL variant or one longer than the recognizer reads, a content type other than JSON).
11
+ * The API answers the same code at create, so the refusal here only keeps the agent's placeholder from reaching
12
+ * TokenEx and saves the round trip.
13
+ */
14
+ export type TokenexIframeRefusalReason = 'invalid_tokenex_iframe_request';
15
+ export declare const INVALID_TOKENEX_IFRAME_REQUEST: TokenexIframeRefusalReason;
16
+ /** True when the URL parses onto one of TokenEx's two iframe hosts and the /iframe/v3 path, however it is spelled or queried. */
17
+ export declare function isTokenexIframePath(url: string): boolean;
18
+ /** Whether this build's registry serves the TokenEx iframe: a company Agentcard turned it on for, on a build that declares it. */
19
+ export declare function servesTokenexIframe(vault: {
20
+ recognizesProcessor?(psp: string): boolean;
21
+ } | undefined): boolean;
22
+ /**
23
+ * Whether an adapter must hand this request to the pre-claim gates: it is on the frame's /iframe/v3 path and this
24
+ * build's registry serves the TokenEx iframe. The recognizer matches only the exact card URL, so a variant (another
25
+ * query, a case or dot spelling) would otherwise never reach the gate that refuses it. attachToPlaywright's route
26
+ * predicate asks this; attachToCdp arms the two hosts from the recognizer's own host list.
27
+ */
28
+ export declare function isArmedTokenexIframeUrl(vault: {
29
+ recognizesProcessor?(psp: string): boolean;
30
+ } | undefined, url: string): boolean;
31
+ /**
32
+ * The pause decision for a POST on the frame's path, by payment-core's classifyTokenexIframeRequest:
33
+ * 'card' the exact card URL with the JSON content type and the sound pcicvv card post bound to its query: it pauses;
34
+ * 'invalid_tokenex_iframe_request' a post with a value in Data that is not that: it is refused in the browser;
35
+ * null not a card post (no value in Data, another path, BinLookup, Forter): the SDK's ordinary handling
36
+ * decides, and an empty-Data post continues untouched through the recognizer's passWithoutCard.
37
+ * A URL longer than payment-core reads (over 2,048 characters) classifies as null, as an unrelated request does, and
38
+ * the exact recognizer refuses it too, so a post on the frame's own path that carries a value in Data is refused here
39
+ * rather than sent to TokenEx with the agent's placeholder.
40
+ */
41
+ export declare function tokenexIframePauseDecision(request: {
42
+ url: string;
43
+ headers: Record<string, string>;
44
+ body: string | null;
45
+ }): 'card' | TokenexIframeRefusalReason | null;
46
+ /**
47
+ * The answer the paused card post may receive, rebuilt from payment-core's allow-list under a JSON content type:
48
+ * only TokenEx's 200 with a sound sixTOKENfour token (tokenexIframeResponseOutcome reads it as approved), keys TokenEx
49
+ * documents for a success and nothing else (sanitizeTokenexIframeResponse). Null for anything else: an error answer,
50
+ * another status, a body out of bounds. The frame adds its own `cardType` before the page reads the answer.
51
+ */
52
+ export declare function tokenexIframePageAnswer(status: number, body: string): {
53
+ status: number;
54
+ headers: Record<string, string>;
55
+ body: string;
56
+ } | null;
57
+ /** Whether the frame reads `number` as the network `brand` (lowercase, as GET /api/v2/vault_cards names it). */
58
+ export declare function tokenexIframePlaceholderFits(brand: string, number: string): boolean;
59
+ /** The longest an iframe key lives, and so the longest a stored answer is handed out: TokenEx's ExpiresInSeconds maximum. */
60
+ export declare const TOKENEX_IFRAME_REPEAT_WINDOW_MS = 1200000;
61
+ /** A stored answer handed to a repeat, with the approval it came from. */
62
+ export interface TokenexIframeRepeatAnswer {
63
+ authorizationId: string;
64
+ response: {
65
+ status: number;
66
+ headers: Record<string, string>;
67
+ body: string;
68
+ };
69
+ }
70
+ /**
71
+ * The approved TokenEx answers one attachment handed to a card post, per frame. `frame` is the adapter's identity
72
+ * for the request's frame (the CDP frameId of the out-of-process iframe, the Playwright Frame); a request whose
73
+ * frame is unknown is never remembered and never answered. Only an answer payment-core reads as approved (a sound
74
+ * sixTOKENfour token) to the sound card post is kept: an error answer leaves the next post a new question, so the
75
+ * page can try again.
76
+ */
77
+ export declare class TokenexIframeRepeats {
78
+ private readonly now;
79
+ private remembered;
80
+ constructor(now?: () => number);
81
+ /**
82
+ * Keep the answer a token replay handed to this card post, when TokenEx approved it. Called after the answer
83
+ * reached the browser, so it never throws: a failure here only leaves the page's next post a new question.
84
+ */
85
+ remember(frame: unknown, url: string, body: string | null, replay: ReplayResponse): void;
86
+ /**
87
+ * The stored answer for the same frame's same post, byte for byte, or null. Only an answer from `authorizationId`,
88
+ * the approval the attachment is handing off now, is handed out, and every answer from another approval is
89
+ * dropped: a later authorization ends the window of every earlier one.
90
+ */
91
+ answerFor(frame: unknown, url: string, body: string | null, authorizationId: string | null): TokenexIframeRepeatAnswer | null;
92
+ private prune;
93
+ }
@@ -0,0 +1,81 @@
1
+ declare var TOKENEX_IFRAME_PSP: string;
2
+ declare var TOKENEX_IFRAME_CAPABILITY: string;
3
+ declare var TOKENEX_IFRAME_OPERATION: string;
4
+ declare var TOKENEX_IFRAME_HOSTS: readonly string[];
5
+ declare var TOKENEX_IFRAME_PATH: string;
6
+ declare var TOKENEX_IFRAME_REFUSAL_REASONS: readonly string[];
7
+ declare var TOKENEX_IFRAME_BODY_KEYS: readonly string[];
8
+ declare var TOKENEX_IFRAME_TOKEN_SCHEMES: readonly string[];
9
+ declare var TOKENEX_IFRAME_REVIEWED_ACCOUNTS: Readonly<{
10
+ "htp.tokenex.com": Readonly<{}>;
11
+ "test-htp.tokenex.com": Readonly<{}>;
12
+ }>;
13
+ declare var TOKENEX_IFRAME_ACCOUNT_NAMES: Readonly<{
14
+ "htp.tokenex.com": Readonly<{}>;
15
+ "test-htp.tokenex.com": Readonly<{}>;
16
+ }>;
17
+ declare function tokenexIframeTarget(url: any): {
18
+ host: string;
19
+ query: Map<any, any>;
20
+ } | null;
21
+ declare function isTokenexIframeUrl(url: any, method?: string): boolean;
22
+ declare function tokenexIframeBodyRefusal(body: any): "unsupported" | null;
23
+ declare function tokenexIframeRequestRefusal(request: any): "unsupported" | null;
24
+ declare function isTokenexIframeRequest(request: any): boolean;
25
+ declare var TOKENEX_IFRAME_GATE_CODES: readonly string[];
26
+ declare function tokenexIframeBodyVerdict(body: any, url: any): {
27
+ verdict: string;
28
+ code?: undefined;
29
+ } | {
30
+ verdict: string;
31
+ code: string;
32
+ };
33
+ declare function classifyTokenexIframeRequest(url: any, method: any, body: any, headers: any): "card" | "unsupported" | null;
34
+ declare function tokenexIframeAccount(request: any): {
35
+ host: string;
36
+ tokenExId: any;
37
+ origin: any;
38
+ } | null;
39
+ declare function tokenexIframeAccountRefusal(request: any, accounts?: Readonly<{
40
+ "htp.tokenex.com": Readonly<{}>;
41
+ "test-htp.tokenex.com": Readonly<{}>;
42
+ }>): "unreviewed_account" | null;
43
+ declare function tokenexIframeAccountName(request: any, accounts?: Readonly<{
44
+ "htp.tokenex.com": Readonly<{}>;
45
+ "test-htp.tokenex.com": Readonly<{}>;
46
+ }>, names?: Readonly<{
47
+ "htp.tokenex.com": Readonly<{}>;
48
+ "test-htp.tokenex.com": Readonly<{}>;
49
+ }>): string | null;
50
+ declare function tokenexIframeCardType(number: any): string | RegExp | null;
51
+ declare function tokenexIframeBrandRefusal(body: any, card: any): "unsupported" | "brand_mismatch" | null;
52
+ declare function tokenexIframeDeviceRefusal(request: any, card: any, accounts?: Readonly<{
53
+ "htp.tokenex.com": Readonly<{}>;
54
+ "test-htp.tokenex.com": Readonly<{}>;
55
+ }>): "unsupported" | "brand_mismatch" | "unreviewed_account" | null;
56
+ declare function tokenexIframeRefusalMessage(reason: any): string;
57
+ declare function injectTokenexIframeCard(body: any, card: any): {
58
+ body: string;
59
+ where: string[];
60
+ };
61
+ declare function isTokenexIframeDeviceRequest(templateBody: any, deviceBody: any): boolean;
62
+ declare function tokenexIframeErrorCode(message: any): string | RegExp;
63
+ declare function tokenexIframeResponseOutcome(status: any, body: any, card: any): {
64
+ outcome: string;
65
+ code: string | RegExp;
66
+ reason?: undefined;
67
+ } | {
68
+ outcome: string;
69
+ reason: string | undefined;
70
+ code?: undefined;
71
+ } | {
72
+ outcome: string;
73
+ code?: undefined;
74
+ reason?: undefined;
75
+ };
76
+ declare function sanitizeTokenexIframeResponse(body: any): string;
77
+ declare function tokenexIframeFacts(status: any, body: any): {
78
+ outcome: string;
79
+ refusalCode: string | RegExp | null | undefined;
80
+ };
81
+ export { TOKENEX_IFRAME_ACCOUNT_NAMES, TOKENEX_IFRAME_BODY_KEYS, TOKENEX_IFRAME_CAPABILITY, TOKENEX_IFRAME_GATE_CODES, TOKENEX_IFRAME_HOSTS, TOKENEX_IFRAME_OPERATION, TOKENEX_IFRAME_PATH, TOKENEX_IFRAME_PSP, TOKENEX_IFRAME_REFUSAL_REASONS, TOKENEX_IFRAME_REVIEWED_ACCOUNTS, TOKENEX_IFRAME_TOKEN_SCHEMES, classifyTokenexIframeRequest, injectTokenexIframeCard, isTokenexIframeDeviceRequest, isTokenexIframeRequest, isTokenexIframeUrl, sanitizeTokenexIframeResponse, tokenexIframeAccount, tokenexIframeAccountName, tokenexIframeAccountRefusal, tokenexIframeBodyRefusal, tokenexIframeBodyVerdict, tokenexIframeBrandRefusal, tokenexIframeCardType, tokenexIframeDeviceRefusal, tokenexIframeErrorCode, tokenexIframeFacts, tokenexIframeRefusalMessage, tokenexIframeRequestRefusal, tokenexIframeResponseOutcome, tokenexIframeTarget };