/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { CredentialsDto, CredentialsDto$Outbound, CredentialsDto$outboundSchema, } from "./credentialsdto.js"; import { StepFilterDto, StepFilterDto$Outbound, StepFilterDto$outboundSchema, } from "./stepfilterdto.js"; /** * Configurations for the integration */ export type UpdateIntegrationRequestDtoConfigurations = {}; export type UpdateIntegrationRequestDto = { name?: string | undefined; identifier?: string | undefined; environmentId?: string | undefined; /** * If the integration is active the validation on the credentials field will run */ active?: boolean | undefined; credentials?: CredentialsDto | undefined; check?: boolean | undefined; conditions?: Array | undefined; /** * Configurations for the integration */ configurations?: UpdateIntegrationRequestDtoConfigurations | undefined; }; /** @internal */ export type UpdateIntegrationRequestDtoConfigurations$Outbound = {}; /** @internal */ export const UpdateIntegrationRequestDtoConfigurations$outboundSchema: z.ZodType< UpdateIntegrationRequestDtoConfigurations$Outbound, z.ZodTypeDef, UpdateIntegrationRequestDtoConfigurations > = z.object({}); export function updateIntegrationRequestDtoConfigurationsToJSON( updateIntegrationRequestDtoConfigurations: UpdateIntegrationRequestDtoConfigurations, ): string { return JSON.stringify( UpdateIntegrationRequestDtoConfigurations$outboundSchema.parse( updateIntegrationRequestDtoConfigurations, ), ); } /** @internal */ export type UpdateIntegrationRequestDto$Outbound = { name?: string | undefined; identifier?: string | undefined; _environmentId?: string | undefined; active?: boolean | undefined; credentials?: CredentialsDto$Outbound | undefined; check?: boolean | undefined; conditions?: Array | undefined; configurations?: | UpdateIntegrationRequestDtoConfigurations$Outbound | undefined; }; /** @internal */ export const UpdateIntegrationRequestDto$outboundSchema: z.ZodType< UpdateIntegrationRequestDto$Outbound, z.ZodTypeDef, UpdateIntegrationRequestDto > = z.object({ name: z.string().optional(), identifier: z.string().optional(), environmentId: z.string().optional(), active: z.boolean().optional(), credentials: CredentialsDto$outboundSchema.optional(), check: z.boolean().optional(), conditions: z.array(StepFilterDto$outboundSchema).optional(), configurations: z.lazy(() => UpdateIntegrationRequestDtoConfigurations$outboundSchema ).optional(), }).transform((v) => { return remap$(v, { environmentId: "_environmentId", }); }); export function updateIntegrationRequestDtoToJSON( updateIntegrationRequestDto: UpdateIntegrationRequestDto, ): string { return JSON.stringify( UpdateIntegrationRequestDto$outboundSchema.parse( updateIntegrationRequestDto, ), ); }