/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: afa0c0406887 */ import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; /** * Terms that are allow-listed during the scans. If any finding picked up by a rule exactly matches a term in the allow-list, it will not be counted as a violation. */ export type AllowlistOptions = { /** * list of words and phrases to consider as whitelisted content */ terms?: Array | undefined; }; /** @internal */ export const AllowlistOptions$inboundSchema: z.ZodType< AllowlistOptions, z.ZodTypeDef, unknown > = z.object({ terms: z.array(z.string()).optional(), }); /** @internal */ export type AllowlistOptions$Outbound = { terms?: Array | undefined; }; /** @internal */ export const AllowlistOptions$outboundSchema: z.ZodType< AllowlistOptions$Outbound, z.ZodTypeDef, AllowlistOptions > = z.object({ terms: z.array(z.string()).optional(), }); export function allowlistOptionsToJSON( allowlistOptions: AllowlistOptions, ): string { return JSON.stringify( AllowlistOptions$outboundSchema.parse(allowlistOptions), ); } export function allowlistOptionsFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => AllowlistOptions$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AllowlistOptions' from JSON`, ); }