@adonis-agora/agent
Version:
Governed, durable-backed AI agent (chat + tool-calling + governance) for AdonisJS — part of the Agora ecosystem.
23 lines • 1.5 kB
TypeScript
import type { Finding, PiiType } from '../types.js';
/** Dotted-quad IPv4 with every octet in 0-255 and no leading zeros. */
export declare function isIPv4(raw: string): boolean;
/** Luhn (mod 10) checksum over a digit string. */
export declare function luhnValid(digits: string): boolean;
/** Card brands by IIN prefix (digits only). Unknown prefixes are not treated as cards. */
export declare function cardBrand(digits: string): string | undefined;
/** CPF (Brazilian individual taxpayer id): 11 digits, two mod-11 check digits. */
export declare function cpfValid(raw: string): boolean;
/**
* CNPJ (Brazilian company id), numeric or the alphanumeric format in use since July 2026: 12
* characters [0-9A-Z] + 2 check digits, each character valued at its ASCII code minus 48.
*/
export declare function cnpjValid(raw: string): boolean;
/** US Social Security Number structure (no 000/666/9xx area, no 00 group, no 0000 serial). */
export declare function ssnValid(raw: string): boolean;
/** IBAN: known country length and ISO 7064 mod 97-10 checksum. */
export declare function ibanValid(raw: string): boolean;
/** Phone numbers: international (+CC), Brazilian and North American formats with separators. */
export declare function phoneValid(raw: string): boolean;
/** PII with format + checksum validation. Overlaps are resolved by the caller (longest, earliest). */
export declare function detectPii(text: string, types?: readonly PiiType[]): Finding[];
//# sourceMappingURL=pii.d.ts.map