AI Guard | Node.js SDK
Data Guard
constructor(token: string, config: PangeaConfig): DataGuardServiceCreates a new DataGuardService
with the given Pangea API token and
configuration.
const config = new PangeaConfig({ domain: "pangea_domain" });
const dataGuard = new DataGuardService("pangea_token", config);
File guard (Beta)
guardFile(request: FileGuardRequest): Promise<PangeaResponse<{}>>Undocumented.
const response = await dataGuard.guardFile({
file_url: "https://example.org/file.txt",
});
Text guard (Beta)
guardText(request: TextGuardRequest): Promise<PangeaResponse<TextGuardResult>>Undocumented.
const response = await dataGuard.guardText({
text: "foobar",
});