/* * 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"; import { ClosedEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { ActionItem, ActionItem$inboundSchema } from "./actionitem.js"; import { CRMMatches, CRMMatches$inboundSchema } from "./crmmatches.js"; import { FathomUser, FathomUser$inboundSchema } from "./fathomuser.js"; import { Highlight, Highlight$inboundSchema } from "./highlight.js"; import { Invitee, Invitee$inboundSchema } from "./invitee.js"; import { MeetingSummary, MeetingSummary$inboundSchema, } from "./meetingsummary.js"; import { TranscriptItem, TranscriptItem$inboundSchema, } from "./transcriptitem.js"; export const CalendarInviteesDomainsType = { OnlyInternal: "only_internal", OneOrMoreExternal: "one_or_more_external", } as const; export type CalendarInviteesDomainsType = ClosedEnum< typeof CalendarInviteesDomainsType >; /** * Who the meeting is shared with within your organization. `no_teams`: private to the recorder. `single_team`: shared with one team. `multiple_teams`: shared with multiple teams. `all_teams`: shared with everyone in the organization. */ export const SharedWith = { NoTeams: "no_teams", SingleTeam: "single_team", MultipleTeams: "multiple_teams", AllTeams: "all_teams", } as const; /** * Who the meeting is shared with within your organization. `no_teams`: private to the recorder. `single_team`: shared with one team. `multiple_teams`: shared with multiple teams. `all_teams`: shared with everyone in the organization. */ export type SharedWith = ClosedEnum; export type Meeting = { title: string; /** * Calendar event title. */ meetingTitle: string | null; /** * The name of the meeting type assigned to this meeting, or `null` if none is assigned. */ meetingType: string | null; /** * The ID of the meeting recording. */ recordingId: number; url: string; /** * The underlying meeting join URL (Zoom, Google Meet, Microsoft Teams, or Slack huddle) from the calendar event. `null` when there is no associated calendar meeting. */ meetingUrl?: string | null | undefined; shareUrl: string; createdAt: Date; scheduledStartTime: Date; scheduledEndTime: Date; recordingStartTime: Date; recordingEndTime: Date; calendarInviteesDomainsType: CalendarInviteesDomainsType; /** * Who the meeting is shared with within your organization. `no_teams`: private to the recorder. `single_team`: shared with one team. `multiple_teams`: shared with multiple teams. `all_teams`: shared with everyone in the organization. */ sharedWith: SharedWith; transcriptLanguage: string; transcript?: Array | null | undefined; defaultSummary?: MeetingSummary | null | undefined; actionItems?: Array | null | undefined; highlights?: Array | null | undefined; calendarInvitees: Array; recordedBy: FathomUser; /** * CRM data linked to the meeting. Only returns data from your or your team's linked CRM. * * @remarks * If no CRM is connected for the workspace, the `error` field will be populated. */ crmMatches?: CRMMatches | null | undefined; }; /** @internal */ export const CalendarInviteesDomainsType$inboundSchema: z.ZodNativeEnum< typeof CalendarInviteesDomainsType > = z.nativeEnum(CalendarInviteesDomainsType); /** @internal */ export const SharedWith$inboundSchema: z.ZodNativeEnum = z .nativeEnum(SharedWith); /** @internal */ export const Meeting$inboundSchema: z.ZodType = z.object({ title: z.string(), meeting_title: z.nullable(z.string()), meeting_type: z.nullable(z.string()), recording_id: z.number().int(), url: z.string(), meeting_url: z.nullable(z.string()).optional(), share_url: z.string(), created_at: z.string().datetime({ offset: true }).transform(v => new Date(v) ), scheduled_start_time: z.string().datetime({ offset: true }).transform(v => new Date(v) ), scheduled_end_time: z.string().datetime({ offset: true }).transform(v => new Date(v) ), recording_start_time: z.string().datetime({ offset: true }).transform(v => new Date(v) ), recording_end_time: z.string().datetime({ offset: true }).transform(v => new Date(v) ), calendar_invitees_domains_type: CalendarInviteesDomainsType$inboundSchema, shared_with: SharedWith$inboundSchema, transcript_language: z.string(), transcript: z.nullable(z.array(TranscriptItem$inboundSchema)).optional(), default_summary: z.nullable(MeetingSummary$inboundSchema).optional(), action_items: z.nullable(z.array(ActionItem$inboundSchema)).optional(), highlights: z.nullable(z.array(Highlight$inboundSchema)).optional(), calendar_invitees: z.array(Invitee$inboundSchema), recorded_by: FathomUser$inboundSchema, crm_matches: z.nullable(CRMMatches$inboundSchema).optional(), }).transform((v) => { return remap$(v, { "meeting_title": "meetingTitle", "meeting_type": "meetingType", "recording_id": "recordingId", "meeting_url": "meetingUrl", "share_url": "shareUrl", "created_at": "createdAt", "scheduled_start_time": "scheduledStartTime", "scheduled_end_time": "scheduledEndTime", "recording_start_time": "recordingStartTime", "recording_end_time": "recordingEndTime", "calendar_invitees_domains_type": "calendarInviteesDomainsType", "shared_with": "sharedWith", "transcript_language": "transcriptLanguage", "default_summary": "defaultSummary", "action_items": "actionItems", "calendar_invitees": "calendarInvitees", "recorded_by": "recordedBy", "crm_matches": "crmMatches", }); }); export function meetingFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => Meeting$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Meeting' from JSON`, ); }