mattrguerra/meridian-ops-boardmainPrivate on GitHub, published here in full

types.ts

Language TypeScript3.3 KB89 lines

packages/fathom-client/src/types.ts

  1. /**
  2. * Fathom shapes, projected from the OpenAPI spec and corrected against live
  3. * responses.
  4. *
  5. * Strict about the fields decisions are made from, permissive about the rest
  6. * (rule 4). Everything here that we do not act on is optional,
  7. * and unknown keys are simply ignored rather than rejected.
  8. */
  9. /**
  10. * A person as Fathom sends one. Both fields are nullable and that is not
  11. * theoretical: live assignees arrive with `email: null`, and occasionally with
  12. * both null. Attribution lives in
  13. * config/fathom-people.ts, not here; a client package has no roster.
  14. */
  15. export interface FathomPerson {
  16. name: string | null
  17. email: string | null
  18. /** Fathom's own team label. Null on most records; we do not read it. */
  19. team?: string | null
  20. }
  21. /** An invitee, which is a person plus Fathom's own verdict on whether they are external. */
  22. export interface FathomInvitee extends FathomPerson {
  23. email_domain?: string | null
  24. /**
  25. * Trusted over any domain list. Northgate alone arrives under two domains,
  26. * northgate.example and northgate-studio.example, so a hand-kept table would
  27. * silently treat half their staff as internal.
  28. */
  29. is_external: boolean
  30. }
  31. export interface FathomActionItem {
  32. description: string
  33. /** True when a human typed it rather than the model extracting it. */
  34. user_generated?: boolean
  35. completed?: boolean
  36. /** HH:MM:SS from the start of the recording. */
  37. recording_timestamp?: string | null
  38. /** Deep link straight to the moment it was said. The reason this beats a bare list. */
  39. recording_playback_url?: string | null
  40. /** Null, or `{name: null, email: null}`, both mean nobody was named. */
  41. assignee: FathomPerson | null
  42. }
  43. export interface FathomMeeting {
  44. title: string
  45. meeting_title?: string | null
  46. meeting_type?: string | null
  47. recording_id: number
  48. url: string
  49. share_url?: string | null
  50. created_at: string
  51. recording_start_time?: string | null
  52. recording_end_time?: string | null
  53. /**
  54. * Who inside the org may see this, in Fathom's own words: `no_teams` means
  55. * private to the recorder. Every meeting on this account reads `no_teams`,
  56. * which is why the board cannot rely on Fathom's permissions and gates by
  57. * participant itself. Why it reads that way is not established (rule 1).
  58. *
  59. * This field does not describe who can see a meeting either: keys return
  60. * `no_teams` meetings recorded by someone other than the key's owner. Read it
  61. * as a team-sharing flag and nothing more.
  62. */
  63. shared_with?: 'no_teams' | 'single_team' | 'multiple_teams' | 'all_teams' | string
  64. calendar_invitees_domains_type?: string | null
  65. calendar_invitees: FathomInvitee[]
  66. recorded_by: FathomPerson
  67. /** Present only when include_action_items was set. Null otherwise, not []. */
  68. action_items?: FathomActionItem[] | null
  69. /** Never requested by this client. See constants.ts on the heavy bucket. */
  70. transcript?: null
  71. default_summary?: null
  72. }
  73. /**
  74. * A window of meetings, plus whether it is the whole window.
  75. *
  76. * `truncated` is not cosmetic, same contract as OrderWindow and LeadWindow: a
  77. * caller cannot tell a complete sweep from a capped one by looking at the rows,
  78. * and a floor presented as a total misstates the window (rule 5).
  79. */
  80. export interface MeetingWindow {
  81. meetings: FathomMeeting[]
  82. truncated: boolean
  83. pages: number
  84. }