/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v4-mini"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import * as types from "../../types/primitives.js"; import { IntegrationEntityType, IntegrationEntityType$inboundSchema, } from "./integration-entity-type.js"; import { SDKValidationError } from "./sdk-validation-error.js"; import { Status, Status$inboundSchema } from "./status.js"; export type EntityIntegrationMappingResponse = { createdAt?: Date | undefined; createdBy?: string | undefined; entityId?: string | undefined; entityType?: IntegrationEntityType | undefined; environmentId?: string | undefined; id?: string | undefined; metadata?: { [k: string]: any } | undefined; providerEntityId?: string | undefined; providerType?: string | undefined; status?: Status | undefined; tenantId?: string | undefined; updatedAt?: Date | undefined; updatedBy?: string | undefined; }; /** @internal */ export const EntityIntegrationMappingResponse$inboundSchema: z.ZodMiniType< EntityIntegrationMappingResponse, unknown > = z.pipe( z.object({ created_at: types.optional(types.date()), created_by: types.optional(types.string()), entity_id: types.optional(types.string()), entity_type: types.optional(IntegrationEntityType$inboundSchema), environment_id: types.optional(types.string()), id: types.optional(types.string()), metadata: types.optional(z.record(z.string(), z.any())), provider_entity_id: types.optional(types.string()), provider_type: types.optional(types.string()), status: types.optional(Status$inboundSchema), tenant_id: types.optional(types.string()), updated_at: types.optional(types.date()), updated_by: types.optional(types.string()), }), z.transform((v) => { return remap$(v, { "created_at": "createdAt", "created_by": "createdBy", "entity_id": "entityId", "entity_type": "entityType", "environment_id": "environmentId", "provider_entity_id": "providerEntityId", "provider_type": "providerType", "tenant_id": "tenantId", "updated_at": "updatedAt", "updated_by": "updatedBy", }); }), ); export function entityIntegrationMappingResponseFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => EntityIntegrationMappingResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'EntityIntegrationMappingResponse' from JSON`, ); }