fathom-typescript
Version:
Fathom's official TypeScript SDK.
105 lines • 4.11 kB
JavaScript
;
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.Fathom = void 0;
const createWebhook_js_1 = require("../funcs/createWebhook.js");
const deleteWebhook_js_1 = require("../funcs/deleteWebhook.js");
const getRecordingSummary_js_1 = require("../funcs/getRecordingSummary.js");
const getRecordingTranscript_js_1 = require("../funcs/getRecordingTranscript.js");
const listMeetings_js_1 = require("../funcs/listMeetings.js");
const listTeamMembers_js_1 = require("../funcs/listTeamMembers.js");
const listTeams_js_1 = require("../funcs/listTeams.js");
const sdks_js_1 = require("../lib/sdks.js");
const operations_js_1 = require("../sdk/types/operations.js");
const fp_js_1 = require("./types/fp.js");
// #region imports
const svix_1 = require("svix");
const getAuthorizationUrl_js_1 = require("../funcs/getAuthorizationUrl.js");
const withAuthorization_js_1 = require("../funcs/withAuthorization.js");
// #endregion imports
class Fathom extends sdks_js_1.ClientSDK {
// #region sdk-class-body
static newTokenStore() {
return new withAuthorization_js_1.InMemoryTokenStore();
}
static getAuthorizationUrl(request) {
return (0, getAuthorizationUrl_js_1.getAuthorizationUrl)(request);
}
static withAuthorization({ clientId, clientSecret, code, redirectUri, tokenStore }) {
return (0, withAuthorization_js_1.withAuthorization)({
clientId,
clientSecret,
code,
redirectUri,
tokenStore,
});
}
static verifyWebhook(webhookSecret, headers, payload) {
const wh = new svix_1.Webhook(webhookSecret);
return wh.verify(payload, headers);
}
// #endregion sdk-class-body
/**
* List meetings
*/
async listMeetings(request, options) {
return (0, operations_js_1.unwrapResultIterator)((0, listMeetings_js_1.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 (0, fp_js_1.unwrapAsync)((0, getRecordingSummary_js_1.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 (0, fp_js_1.unwrapAsync)((0, getRecordingTranscript_js_1.getRecordingTranscript)(this, request, options));
}
/**
* List teams
*/
async listTeams(request, options) {
return (0, operations_js_1.unwrapResultIterator)((0, listTeams_js_1.listTeams)(this, request, options));
}
/**
* List team members
*/
async listTeamMembers(request, options) {
return (0, operations_js_1.unwrapResultIterator)((0, listTeamMembers_js_1.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 (0, fp_js_1.unwrapAsync)((0, createWebhook_js_1.createWebhook)(this, request, options));
}
/**
* Delete a webhook
*
* @remarks
* Delete a webhook.
*/
async deleteWebhook(request, options) {
return (0, fp_js_1.unwrapAsync)((0, deleteWebhook_js_1.deleteWebhook)(this, request, options));
}
}
exports.Fathom = Fathom;
//# sourceMappingURL=sdk.js.map