UNPKG

fathom-typescript

Version:

Fathom's official TypeScript SDK.

101 lines 3.57 kB
/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { createWebhook } from "../funcs/createWebhook.js"; import { deleteWebhook } from "../funcs/deleteWebhook.js"; import { getRecordingSummary } from "../funcs/getRecordingSummary.js"; import { getRecordingTranscript } from "../funcs/getRecordingTranscript.js"; import { listMeetings } from "../funcs/listMeetings.js"; import { listTeamMembers } from "../funcs/listTeamMembers.js"; import { listTeams } from "../funcs/listTeams.js"; import { ClientSDK } from "../lib/sdks.js"; import { unwrapResultIterator } from "../sdk/types/operations.js"; import { unwrapAsync } from "./types/fp.js"; // #region imports import { Webhook, } from "svix"; import { getAuthorizationUrl, } from "../funcs/getAuthorizationUrl.js"; import { InMemoryTokenStore, withAuthorization, } from "../funcs/withAuthorization.js"; // #endregion imports export class Fathom extends ClientSDK { // #region sdk-class-body static newTokenStore() { return new InMemoryTokenStore(); } static getAuthorizationUrl(request) { return getAuthorizationUrl(request); } static withAuthorization({ clientId, clientSecret, code, redirectUri, tokenStore }) { return withAuthorization({ clientId, clientSecret, code, redirectUri, tokenStore, }); } static verifyWebhook(webhookSecret, headers, payload) { const wh = new Webhook(webhookSecret); return wh.verify(payload, headers); } // #endregion sdk-class-body /** * List meetings */ async listMeetings(request, options) { return unwrapResultIterator(listMeetings(this, request, options)); } /** * Get summary * * @remarks * This endpoint has two behaviors depending on your request payload: * - If you send `destination_url`, the endpoint will behave in an asynchronous manner. * - If you do not send `destination_url`, the endpoint will return the data directly. */ async getRecordingSummary(request, options) { return unwrapAsync(getRecordingSummary(this, request, options)); } /** * Get transcript * * @remarks * This endpoint has two behaviors depending on your request payload: * - If you send `destination_url`, the endpoint will behave in an asynchronous manner. * - If you do not send `destination_url`, the endpoint will return the data directly. */ async getRecordingTranscript(request, options) { return unwrapAsync(getRecordingTranscript(this, request, options)); } /** * List teams */ async listTeams(request, options) { return unwrapResultIterator(listTeams(this, request, options)); } /** * List team members */ async listTeamMembers(request, options) { return unwrapResultIterator(listTeamMembers(this, request, options)); } /** * Create a webhook * * @remarks * Create a webhook to receive new meeting content. * At least one of `include_transcript`, `include_crm_matches`, `include_summary`, or `include_action_items` must be true. */ async createWebhook(request, options) { return unwrapAsync(createWebhook(this, request, options)); } /** * Delete a webhook * * @remarks * Delete a webhook. */ async deleteWebhook(request, options) { return unwrapAsync(deleteWebhook(this, request, options)); } } //# sourceMappingURL=sdk.js.map