fathom-typescript
Version:
Fathom's official TypeScript SDK.
36 lines (31 loc) • 862 B
text/typescript
/*
* 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";
export type Assignee = {
name: string | null;
email: string | null;
team: string | null;
};
/** @internal */
export const Assignee$inboundSchema: z.ZodType<
Assignee,
z.ZodTypeDef,
unknown
> = z.object({
name: z.nullable(z.string()),
email: z.nullable(z.string()),
team: z.nullable(z.string()),
});
export function assigneeFromJSON(
jsonString: string,
): SafeParseResult<Assignee, SDKValidationError> {
return safeParse(
jsonString,
(x) => Assignee$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'Assignee' from JSON`,
);
}