UNPKG

phonic

Version:

[![fern shield](https://img.shields.io/badge/%F0%9F%8C%BF-Built%20with%20Fern-brightgreen)](https://buildwithfern.com?utm_source=github&utm_medium=github&utm_campaign=readme&utm_source=https%3A%2F%2Fgithub.com%2FPhonic-Co%2Fphonic-node) [![npm shield](htt

90 lines (89 loc) 4.01 kB
"use strict"; /** * This file was auto-generated by Fern from our API Definition. */ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; })); var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); var __importStar = (this && this.__importStar) || (function () { var ownKeys = function(o) { ownKeys = Object.getOwnPropertyNames || function (o) { var ar = []; for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; return ar; }; return ownKeys(o); }; return function (mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); __setModuleDefault(result, mod); return result; }; })(); Object.defineProperty(exports, "__esModule", { value: true }); exports.PhonicClient = void 0; const core = __importStar(require("./core/index.js")); const headers_js_1 = require("./core/headers.js"); const Client_js_1 = require("./api/resources/agents/client/Client.js"); const Client_js_2 = require("./api/resources/tools/client/Client.js"); const Client_js_3 = require("./api/resources/extractionSchemas/client/Client.js"); const Client_js_4 = require("./api/resources/voices/client/Client.js"); const Client_js_5 = require("./api/resources/conversations/client/Client.js"); const Client_js_6 = require("./api/resources/auth/client/Client.js"); const Client_js_7 = require("./api/resources/projects/client/Client.js"); class PhonicClient { constructor(_options = {}) { this._options = Object.assign(Object.assign({}, _options), { headers: (0, headers_js_1.mergeHeaders)({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "phonic", "X-Fern-SDK-Version": "0.30.27", "User-Agent": "phonic/0.30.27", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, _options === null || _options === void 0 ? void 0 : _options.headers) }); } get agents() { var _a; return ((_a = this._agents) !== null && _a !== void 0 ? _a : (this._agents = new Client_js_1.Agents(this._options))); } get tools() { var _a; return ((_a = this._tools) !== null && _a !== void 0 ? _a : (this._tools = new Client_js_2.Tools(this._options))); } get extractionSchemas() { var _a; return ((_a = this._extractionSchemas) !== null && _a !== void 0 ? _a : (this._extractionSchemas = new Client_js_3.ExtractionSchemas(this._options))); } get voices() { var _a; return ((_a = this._voices) !== null && _a !== void 0 ? _a : (this._voices = new Client_js_4.Voices(this._options))); } get conversations() { var _a; return ((_a = this._conversations) !== null && _a !== void 0 ? _a : (this._conversations = new Client_js_5.Conversations(this._options))); } get auth() { var _a; return ((_a = this._auth) !== null && _a !== void 0 ? _a : (this._auth = new Client_js_6.Auth(this._options))); } get projects() { var _a; return ((_a = this._projects) !== null && _a !== void 0 ? _a : (this._projects = new Client_js_7.Projects(this._options))); } } exports.PhonicClient = PhonicClient;