/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { lazySchema as lazySchema$, safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import * as types from "../../types/primitives.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; /** * Represents a company/tenant/organization accessible through the current connection. Used for multi-company connectors where a single OAuth connection provides access to multiple companies. */ export type AccountingConnectionCompany = { /** * Unique identifier for the company in the downstream system. Use this value in the x-apideck-company-id header to scope requests to this company. */ id: string; /** * Display name of the company */ name: string; }; /** @internal */ export const AccountingConnectionCompany$inboundSchema: z.ZodType< AccountingConnectionCompany, z.ZodTypeDef, unknown > = /* @__PURE__ */ lazySchema$(() => z.object({ id: types.string(), name: types.string(), }) ); export function accountingConnectionCompanyFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => AccountingConnectionCompany$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AccountingConnectionCompany' from JSON`, ); }