/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ 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"; /** * Integration row returned by the auditor integrations API. * * @remarks * * `id` and `name` are always present. Other fields are optional to support * controlled audits where only approved columns are returned. */ export type AuditIntegration = { /** * Integration identifier. */ id: string; /** * Display name of the integration. */ name: string; /** * IDs of the audit segments this integration is in scope for. * * @remarks * Omitted when segment scoping is disabled. */ segmentIds?: Array | undefined; /** * Integration tag display names describing what data this integration provides. */ tags?: Array | undefined; /** * Category display names describing what the integration is used for. */ categories?: Array | undefined; }; /** @internal */ export const AuditIntegration$inboundSchema: z.ZodType< AuditIntegration, z.ZodTypeDef, unknown > = z.object({ id: z.string(), name: z.string(), segmentIds: z.array(z.string()).optional(), tags: z.array(z.string()).optional(), categories: z.array(z.string()).optional(), }); export function auditIntegrationFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => AuditIntegration$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AuditIntegration' from JSON`, ); }