fathom-typescript
Version:
Fathom's official TypeScript SDK.
39 lines • 1.51 kB
JavaScript
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import * as z from "zod/v3";
import { remap as remap$ } from "../../../lib/primitives.js";
import { safeParse } from "../../../lib/schemas.js";
export const TriggeredFor = {
MyRecordings: "my_recordings",
SharedExternalRecordings: "shared_external_recordings",
MySharedWithTeamRecordings: "my_shared_with_team_recordings",
SharedTeamRecordings: "shared_team_recordings",
};
/** @internal */
export const TriggeredFor$inboundSchema = z.nativeEnum(TriggeredFor);
/** @internal */
export const Webhook$inboundSchema = z.object({
id: z.string(),
url: z.string(),
secret: z.string(),
created_at: z.string().datetime({ offset: true }).transform(v => new Date(v)),
include_transcript: z.boolean(),
include_crm_matches: z.boolean(),
include_summary: z.boolean(),
include_action_items: z.boolean(),
triggered_for: z.array(TriggeredFor$inboundSchema),
}).transform((v) => {
return remap$(v, {
"created_at": "createdAt",
"include_transcript": "includeTranscript",
"include_crm_matches": "includeCrmMatches",
"include_summary": "includeSummary",
"include_action_items": "includeActionItems",
"triggered_for": "triggeredFor",
});
});
export function webhookFromJSON(jsonString) {
return safeParse(jsonString, (x) => Webhook$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Webhook' from JSON`);
}
//# sourceMappingURL=webhook.js.map