/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: a9772e5fd318 */ import * as z from "zod/v4"; import { safeParse } from "../lib/schemas.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { DeploymentState, DeploymentState$inboundSchema, } from "./deploymentstate.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; import { TargetDeployment, TargetDeployment$inboundSchema, } from "./targetdeployment.js"; import { TargetOperationsBundleSet, TargetOperationsBundleSet$inboundSchema, } from "./targetoperationsbundleset.js"; /** * State reconciliation result with optional target */ export type SyncReconcileResponse = { /** * Whether the state was reconciled */ success: boolean; current: DeploymentState; /** * Target deployment if update is needed */ target?: TargetDeployment | undefined; /** * Target operations-bundle set the Operator should converge its loaded plugin registry toward. */ targetOperationsBundleSet?: TargetOperationsBundleSet | undefined; }; /** @internal */ export const SyncReconcileResponse$inboundSchema: z.ZodType< SyncReconcileResponse, unknown > = z.object({ success: z.boolean(), current: DeploymentState$inboundSchema, target: TargetDeployment$inboundSchema.optional(), targetOperationsBundleSet: TargetOperationsBundleSet$inboundSchema.optional(), }); export function syncReconcileResponseFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => SyncReconcileResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SyncReconcileResponse' from JSON`, ); }