/* * 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"; /** * Details of the access token provisioned for a company. */ export type CompanyAccessToken = { /** * The number of seconds until the access token expires. */ expiresIn: number; /** * The access token for the company. */ accessToken: string; /** * The type of token. */ tokenType: string; }; /** @internal */ export const CompanyAccessToken$inboundSchema: z.ZodType< CompanyAccessToken, z.ZodTypeDef, unknown > = z.object({ expiresIn: z.number().int(), accessToken: z.string(), tokenType: z.string(), }); export function companyAccessTokenFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CompanyAccessToken$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CompanyAccessToken' from JSON`, ); }