retell-sdk 0.1.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +59 -0
- package/LICENSE +201 -0
- package/README.md +304 -0
- package/_shims/MultipartBody.d.ts +9 -0
- package/_shims/MultipartBody.d.ts.map +1 -0
- package/_shims/MultipartBody.js +16 -0
- package/_shims/MultipartBody.js.map +1 -0
- package/_shims/MultipartBody.mjs +12 -0
- package/_shims/MultipartBody.mjs.map +1 -0
- package/_shims/README.md +46 -0
- package/_shims/auto/runtime-bun.d.ts +5 -0
- package/_shims/auto/runtime-bun.d.ts.map +1 -0
- package/_shims/auto/runtime-bun.js +21 -0
- package/_shims/auto/runtime-bun.js.map +1 -0
- package/_shims/auto/runtime-bun.mjs +2 -0
- package/_shims/auto/runtime-bun.mjs.map +1 -0
- package/_shims/auto/runtime-node.d.ts +5 -0
- package/_shims/auto/runtime-node.d.ts.map +1 -0
- package/_shims/auto/runtime-node.js +21 -0
- package/_shims/auto/runtime-node.js.map +1 -0
- package/_shims/auto/runtime-node.mjs +2 -0
- package/_shims/auto/runtime-node.mjs.map +1 -0
- package/_shims/auto/runtime.d.ts +5 -0
- package/_shims/auto/runtime.d.ts.map +1 -0
- package/_shims/auto/runtime.js +21 -0
- package/_shims/auto/runtime.js.map +1 -0
- package/_shims/auto/runtime.mjs +2 -0
- package/_shims/auto/runtime.mjs.map +1 -0
- package/_shims/auto/types-node.d.ts +5 -0
- package/_shims/auto/types-node.d.ts.map +1 -0
- package/_shims/auto/types-node.js +21 -0
- package/_shims/auto/types-node.js.map +1 -0
- package/_shims/auto/types-node.mjs +2 -0
- package/_shims/auto/types-node.mjs.map +1 -0
- package/_shims/auto/types.d.ts +101 -0
- package/_shims/auto/types.js +3 -0
- package/_shims/auto/types.mjs +3 -0
- package/_shims/bun-runtime.d.ts +6 -0
- package/_shims/bun-runtime.d.ts.map +1 -0
- package/_shims/bun-runtime.js +14 -0
- package/_shims/bun-runtime.js.map +1 -0
- package/_shims/bun-runtime.mjs +10 -0
- package/_shims/bun-runtime.mjs.map +1 -0
- package/_shims/index.d.ts +81 -0
- package/_shims/index.js +13 -0
- package/_shims/index.mjs +7 -0
- package/_shims/manual-types.d.ts +12 -0
- package/_shims/manual-types.js +3 -0
- package/_shims/manual-types.mjs +3 -0
- package/_shims/node-runtime.d.ts +3 -0
- package/_shims/node-runtime.d.ts.map +1 -0
- package/_shims/node-runtime.js +90 -0
- package/_shims/node-runtime.js.map +1 -0
- package/_shims/node-runtime.mjs +56 -0
- package/_shims/node-runtime.mjs.map +1 -0
- package/_shims/node-types.d.ts +42 -0
- package/_shims/node-types.js +3 -0
- package/_shims/node-types.mjs +3 -0
- package/_shims/registry.d.ts +37 -0
- package/_shims/registry.d.ts.map +1 -0
- package/_shims/registry.js +41 -0
- package/_shims/registry.js.map +1 -0
- package/_shims/registry.mjs +37 -0
- package/_shims/registry.mjs.map +1 -0
- package/_shims/web-runtime.d.ts +5 -0
- package/_shims/web-runtime.d.ts.map +1 -0
- package/_shims/web-runtime.js +78 -0
- package/_shims/web-runtime.js.map +1 -0
- package/_shims/web-runtime.mjs +71 -0
- package/_shims/web-runtime.mjs.map +1 -0
- package/_shims/web-types.d.ts +83 -0
- package/_shims/web-types.js +3 -0
- package/_shims/web-types.mjs +3 -0
- package/core.d.ts +237 -0
- package/core.d.ts.map +1 -0
- package/core.js +868 -0
- package/core.js.map +1 -0
- package/core.mjs +837 -0
- package/core.mjs.map +1 -0
- package/error.d.ts +53 -0
- package/error.d.ts.map +1 -0
- package/error.js +143 -0
- package/error.js.map +1 -0
- package/error.mjs +127 -0
- package/error.mjs.map +1 -0
- package/index.d.mts +133 -0
- package/index.d.ts +133 -0
- package/index.d.ts.map +1 -0
- package/index.js +117 -0
- package/index.js.map +1 -0
- package/index.mjs +89 -0
- package/index.mjs.map +1 -0
- package/package.json +107 -0
- package/resource.d.ts +6 -0
- package/resource.d.ts.map +1 -0
- package/resource.js +11 -0
- package/resource.js.map +1 -0
- package/resource.mjs +7 -0
- package/resource.mjs.map +1 -0
- package/resources/agent.d.ts +372 -0
- package/resources/agent.d.ts.map +1 -0
- package/resources/agent.js +44 -0
- package/resources/agent.js.map +1 -0
- package/resources/agent.mjs +40 -0
- package/resources/agent.mjs.map +1 -0
- package/resources/call.d.ts +461 -0
- package/resources/call.d.ts.map +1 -0
- package/resources/call.js +36 -0
- package/resources/call.js.map +1 -0
- package/resources/call.mjs +32 -0
- package/resources/call.mjs.map +1 -0
- package/resources/index.d.ts +5 -0
- package/resources/index.d.ts.map +1 -0
- package/resources/index.js +13 -0
- package/resources/index.js.map +1 -0
- package/resources/index.mjs +6 -0
- package/resources/index.mjs.map +1 -0
- package/resources/llm.d.ts +1355 -0
- package/resources/llm.d.ts.map +1 -0
- package/resources/llm.js +44 -0
- package/resources/llm.js.map +1 -0
- package/resources/llm.mjs +40 -0
- package/resources/llm.mjs.map +1 -0
- package/resources/phone-number.d.ts +78 -0
- package/resources/phone-number.d.ts.map +1 -0
- package/resources/phone-number.js +44 -0
- package/resources/phone-number.js.map +1 -0
- package/resources/phone-number.mjs +40 -0
- package/resources/phone-number.mjs.map +1 -0
- package/shims/node.d.ts +29 -0
- package/shims/node.d.ts.map +1 -0
- package/shims/node.js +31 -0
- package/shims/node.js.map +1 -0
- package/shims/node.mjs +5 -0
- package/shims/node.mjs.map +1 -0
- package/shims/web.d.ts +26 -0
- package/shims/web.d.ts.map +1 -0
- package/shims/web.js +31 -0
- package/shims/web.js.map +1 -0
- package/shims/web.mjs +5 -0
- package/shims/web.mjs.map +1 -0
- package/src/_shims/MultipartBody.ts +9 -0
- package/src/_shims/README.md +46 -0
- package/src/_shims/auto/runtime-bun.ts +4 -0
- package/src/_shims/auto/runtime-node.ts +4 -0
- package/src/_shims/auto/runtime.ts +4 -0
- package/src/_shims/auto/types-node.ts +4 -0
- package/src/_shims/auto/types.d.ts +101 -0
- package/src/_shims/auto/types.js +3 -0
- package/src/_shims/auto/types.mjs +3 -0
- package/src/_shims/bun-runtime.ts +14 -0
- package/src/_shims/index.d.ts +81 -0
- package/src/_shims/index.js +13 -0
- package/src/_shims/index.mjs +7 -0
- package/src/_shims/manual-types.d.ts +12 -0
- package/src/_shims/manual-types.js +3 -0
- package/src/_shims/manual-types.mjs +3 -0
- package/src/_shims/node-runtime.ts +83 -0
- package/src/_shims/node-types.d.ts +42 -0
- package/src/_shims/node-types.js +3 -0
- package/src/_shims/node-types.mjs +3 -0
- package/src/_shims/registry.ts +67 -0
- package/src/_shims/web-runtime.ts +103 -0
- package/src/_shims/web-types.d.ts +83 -0
- package/src/_shims/web-types.js +3 -0
- package/src/_shims/web-types.mjs +3 -0
- package/src/core.ts +1146 -0
- package/src/error.ts +146 -0
- package/src/index.ts +215 -0
- package/src/lib/.keep +4 -0
- package/src/resource.ts +11 -0
- package/src/resources/agent.ts +468 -0
- package/src/resources/call.ts +542 -0
- package/src/resources/index.ts +21 -0
- package/src/resources/llm.ts +1643 -0
- package/src/resources/phone-number.ts +111 -0
- package/src/shims/node.ts +50 -0
- package/src/shims/web.ts +50 -0
- package/src/tsconfig.json +11 -0
- package/src/uploads.ts +248 -0
- package/src/version.ts +1 -0
- package/uploads.d.ts +75 -0
- package/uploads.d.ts.map +1 -0
- package/uploads.js +165 -0
- package/uploads.js.map +1 -0
- package/uploads.mjs +152 -0
- package/uploads.mjs.map +1 -0
- package/version.d.ts +2 -0
- package/version.d.ts.map +1 -0
- package/version.js +5 -0
- package/version.js.map +1 -0
- package/version.mjs +2 -0
- package/version.mjs.map +1 -0
package/index.d.ts
ADDED
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import * as Core from "./core.js";
|
|
2
|
+
import * as Errors from "./error.js";
|
|
3
|
+
import { type Agent } from "./_shims/index.js";
|
|
4
|
+
import * as Uploads from "./uploads.js";
|
|
5
|
+
import * as API from 'retell-sdk/resources/index';
|
|
6
|
+
export interface ClientOptions {
|
|
7
|
+
/**
|
|
8
|
+
* Defaults to process.env['RETELL_API_KEY'].
|
|
9
|
+
*/
|
|
10
|
+
apiKey?: string | undefined;
|
|
11
|
+
/**
|
|
12
|
+
* Override the default base URL for the API, e.g., "https://api.example.com/v2/"
|
|
13
|
+
*
|
|
14
|
+
* Defaults to process.env['RETELL_SDK_BASE_URL'].
|
|
15
|
+
*/
|
|
16
|
+
baseURL?: string | null | undefined;
|
|
17
|
+
/**
|
|
18
|
+
* The maximum amount of time (in milliseconds) that the client should wait for a response
|
|
19
|
+
* from the server before timing out a single request.
|
|
20
|
+
*
|
|
21
|
+
* Note that request timeouts are retried by default, so in a worst-case scenario you may wait
|
|
22
|
+
* much longer than this timeout before the promise succeeds or fails.
|
|
23
|
+
*/
|
|
24
|
+
timeout?: number;
|
|
25
|
+
/**
|
|
26
|
+
* An HTTP agent used to manage HTTP(S) connections.
|
|
27
|
+
*
|
|
28
|
+
* If not provided, an agent will be constructed by default in the Node.js environment,
|
|
29
|
+
* otherwise no agent is used.
|
|
30
|
+
*/
|
|
31
|
+
httpAgent?: Agent;
|
|
32
|
+
/**
|
|
33
|
+
* Specify a custom `fetch` function implementation.
|
|
34
|
+
*
|
|
35
|
+
* If not provided, we use `node-fetch` on Node.js and otherwise expect that `fetch` is
|
|
36
|
+
* defined globally.
|
|
37
|
+
*/
|
|
38
|
+
fetch?: Core.Fetch | undefined;
|
|
39
|
+
/**
|
|
40
|
+
* The maximum number of times that the client will retry a request in case of a
|
|
41
|
+
* temporary failure, like a network error or a 5XX error from the server.
|
|
42
|
+
*
|
|
43
|
+
* @default 2
|
|
44
|
+
*/
|
|
45
|
+
maxRetries?: number;
|
|
46
|
+
/**
|
|
47
|
+
* Default headers to include with every request to the API.
|
|
48
|
+
*
|
|
49
|
+
* These can be removed in individual requests by explicitly setting the
|
|
50
|
+
* header to `undefined` or `null` in request options.
|
|
51
|
+
*/
|
|
52
|
+
defaultHeaders?: Core.Headers;
|
|
53
|
+
/**
|
|
54
|
+
* Default query parameters to include with every request to the API.
|
|
55
|
+
*
|
|
56
|
+
* These can be removed in individual requests by explicitly setting the
|
|
57
|
+
* param to `undefined` in request options.
|
|
58
|
+
*/
|
|
59
|
+
defaultQuery?: Core.DefaultQuery;
|
|
60
|
+
}
|
|
61
|
+
/** API Client for interfacing with the Retell Sdk API. */
|
|
62
|
+
export declare class RetellSdk extends Core.APIClient {
|
|
63
|
+
apiKey: string;
|
|
64
|
+
private _options;
|
|
65
|
+
/**
|
|
66
|
+
* API Client for interfacing with the Retell Sdk API.
|
|
67
|
+
*
|
|
68
|
+
* @param {string | undefined} [opts.apiKey=process.env['RETELL_API_KEY'] ?? undefined]
|
|
69
|
+
* @param {string} [opts.baseURL=process.env['RETELL_SDK_BASE_URL'] ?? https://api.retellai.com] - Override the default base URL for the API.
|
|
70
|
+
* @param {number} [opts.timeout=1 minute] - The maximum amount of time (in milliseconds) the client will wait for a response before timing out.
|
|
71
|
+
* @param {number} [opts.httpAgent] - An HTTP agent used to manage HTTP(s) connections.
|
|
72
|
+
* @param {Core.Fetch} [opts.fetch] - Specify a custom `fetch` function implementation.
|
|
73
|
+
* @param {number} [opts.maxRetries=2] - The maximum number of times the client will retry a request.
|
|
74
|
+
* @param {Core.Headers} opts.defaultHeaders - Default headers to include with every request to the API.
|
|
75
|
+
* @param {Core.DefaultQuery} opts.defaultQuery - Default query parameters to include with every request to the API.
|
|
76
|
+
*/
|
|
77
|
+
constructor({ baseURL, apiKey, ...opts }?: ClientOptions);
|
|
78
|
+
call: API.Call;
|
|
79
|
+
phoneNumber: API.PhoneNumber;
|
|
80
|
+
agent: API.Agent;
|
|
81
|
+
llm: API.Llm;
|
|
82
|
+
protected defaultQuery(): Core.DefaultQuery | undefined;
|
|
83
|
+
protected defaultHeaders(opts: Core.FinalRequestOptions): Core.Headers;
|
|
84
|
+
protected authHeaders(opts: Core.FinalRequestOptions): Core.Headers;
|
|
85
|
+
protected stringifyQuery(query: Record<string, unknown>): string;
|
|
86
|
+
static RetellSdk: typeof RetellSdk;
|
|
87
|
+
static RetellSdkError: typeof Errors.RetellSdkError;
|
|
88
|
+
static APIError: typeof Errors.APIError;
|
|
89
|
+
static APIConnectionError: typeof Errors.APIConnectionError;
|
|
90
|
+
static APIConnectionTimeoutError: typeof Errors.APIConnectionTimeoutError;
|
|
91
|
+
static APIUserAbortError: typeof Errors.APIUserAbortError;
|
|
92
|
+
static NotFoundError: typeof Errors.NotFoundError;
|
|
93
|
+
static ConflictError: typeof Errors.ConflictError;
|
|
94
|
+
static RateLimitError: typeof Errors.RateLimitError;
|
|
95
|
+
static BadRequestError: typeof Errors.BadRequestError;
|
|
96
|
+
static AuthenticationError: typeof Errors.AuthenticationError;
|
|
97
|
+
static InternalServerError: typeof Errors.InternalServerError;
|
|
98
|
+
static PermissionDeniedError: typeof Errors.PermissionDeniedError;
|
|
99
|
+
static UnprocessableEntityError: typeof Errors.UnprocessableEntityError;
|
|
100
|
+
}
|
|
101
|
+
export declare const RetellSdkError: typeof Errors.RetellSdkError, APIError: typeof Errors.APIError, APIConnectionError: typeof Errors.APIConnectionError, APIConnectionTimeoutError: typeof Errors.APIConnectionTimeoutError, APIUserAbortError: typeof Errors.APIUserAbortError, NotFoundError: typeof Errors.NotFoundError, ConflictError: typeof Errors.ConflictError, RateLimitError: typeof Errors.RateLimitError, BadRequestError: typeof Errors.BadRequestError, AuthenticationError: typeof Errors.AuthenticationError, InternalServerError: typeof Errors.InternalServerError, PermissionDeniedError: typeof Errors.PermissionDeniedError, UnprocessableEntityError: typeof Errors.UnprocessableEntityError;
|
|
102
|
+
export import toFile = Uploads.toFile;
|
|
103
|
+
export import fileFromPath = Uploads.fileFromPath;
|
|
104
|
+
export declare namespace RetellSdk {
|
|
105
|
+
export import toFile = Uploads.toFile;
|
|
106
|
+
export import fileFromPath = Uploads.fileFromPath;
|
|
107
|
+
export import RequestOptions = Core.RequestOptions;
|
|
108
|
+
export import Call = API.Call;
|
|
109
|
+
export import CallDetailResponse = API.CallDetailResponse;
|
|
110
|
+
export import CallCreateResponse = API.CallCreateResponse;
|
|
111
|
+
export import CallListResponse = API.CallListResponse;
|
|
112
|
+
export import CallRegisterResponse = API.CallRegisterResponse;
|
|
113
|
+
export import CallCreateParams = API.CallCreateParams;
|
|
114
|
+
export import CallListParams = API.CallListParams;
|
|
115
|
+
export import CallRegisterParams = API.CallRegisterParams;
|
|
116
|
+
export import PhoneNumber = API.PhoneNumber;
|
|
117
|
+
export import PhoneNumberResponse = API.PhoneNumberResponse;
|
|
118
|
+
export import PhoneNumberListResponse = API.PhoneNumberListResponse;
|
|
119
|
+
export import PhoneNumberCreateParams = API.PhoneNumberCreateParams;
|
|
120
|
+
export import PhoneNumberUpdateParams = API.PhoneNumberUpdateParams;
|
|
121
|
+
export import Agent = API.Agent;
|
|
122
|
+
export import AgentResponse = API.AgentResponse;
|
|
123
|
+
export import AgentListResponse = API.AgentListResponse;
|
|
124
|
+
export import AgentCreateParams = API.AgentCreateParams;
|
|
125
|
+
export import AgentUpdateParams = API.AgentUpdateParams;
|
|
126
|
+
export import Llm = API.Llm;
|
|
127
|
+
export import LlmResponse = API.LlmResponse;
|
|
128
|
+
export import LlmListResponse = API.LlmListResponse;
|
|
129
|
+
export import LlmCreateParams = API.LlmCreateParams;
|
|
130
|
+
export import LlmUpdateParams = API.LlmUpdateParams;
|
|
131
|
+
}
|
|
132
|
+
export default RetellSdk;
|
|
133
|
+
//# sourceMappingURL=index.d.ts.map
|
package/index.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["src/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,IAAI,MAAM,QAAQ,CAAC;AAC/B,OAAO,KAAK,MAAM,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,KAAK,OAAO,MAAM,WAAW,CAAC;AAErC,OAAO,KAAK,GAAG,MAAM,4BAA4B,CAAC;AAElD,MAAM,WAAW,aAAa;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__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
+
}) : function(o, v) {
|
|
17
|
+
o["default"] = v;
|
|
18
|
+
});
|
|
19
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
20
|
+
if (mod && mod.__esModule) return mod;
|
|
21
|
+
var result = {};
|
|
22
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
23
|
+
__setModuleDefault(result, mod);
|
|
24
|
+
return result;
|
|
25
|
+
};
|
|
26
|
+
var _a;
|
|
27
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
+
exports.fileFromPath = exports.toFile = exports.UnprocessableEntityError = exports.PermissionDeniedError = exports.InternalServerError = exports.AuthenticationError = exports.BadRequestError = exports.RateLimitError = exports.ConflictError = exports.NotFoundError = exports.APIUserAbortError = exports.APIConnectionTimeoutError = exports.APIConnectionError = exports.APIError = exports.RetellSdkError = exports.RetellSdk = void 0;
|
|
29
|
+
const Core = __importStar(require("./core.js"));
|
|
30
|
+
const Errors = __importStar(require("./error.js"));
|
|
31
|
+
const Uploads = __importStar(require("./uploads.js"));
|
|
32
|
+
const qs = __importStar(require("qs"));
|
|
33
|
+
const API = __importStar(require("retell-sdk/resources/index"));
|
|
34
|
+
/** API Client for interfacing with the Retell Sdk API. */
|
|
35
|
+
class RetellSdk extends Core.APIClient {
|
|
36
|
+
/**
|
|
37
|
+
* API Client for interfacing with the Retell Sdk API.
|
|
38
|
+
*
|
|
39
|
+
* @param {string | undefined} [opts.apiKey=process.env['RETELL_API_KEY'] ?? undefined]
|
|
40
|
+
* @param {string} [opts.baseURL=process.env['RETELL_SDK_BASE_URL'] ?? https://api.retellai.com] - Override the default base URL for the API.
|
|
41
|
+
* @param {number} [opts.timeout=1 minute] - The maximum amount of time (in milliseconds) the client will wait for a response before timing out.
|
|
42
|
+
* @param {number} [opts.httpAgent] - An HTTP agent used to manage HTTP(s) connections.
|
|
43
|
+
* @param {Core.Fetch} [opts.fetch] - Specify a custom `fetch` function implementation.
|
|
44
|
+
* @param {number} [opts.maxRetries=2] - The maximum number of times the client will retry a request.
|
|
45
|
+
* @param {Core.Headers} opts.defaultHeaders - Default headers to include with every request to the API.
|
|
46
|
+
* @param {Core.DefaultQuery} opts.defaultQuery - Default query parameters to include with every request to the API.
|
|
47
|
+
*/
|
|
48
|
+
constructor({ baseURL = Core.readEnv('RETELL_SDK_BASE_URL'), apiKey = Core.readEnv('RETELL_API_KEY'), ...opts } = {}) {
|
|
49
|
+
if (apiKey === undefined) {
|
|
50
|
+
throw new Errors.RetellSdkError("The RETELL_API_KEY environment variable is missing or empty; either provide it, or instantiate the RetellSdk client with an apiKey option, like new RetellSdk({ apiKey: 'My API Key' }).");
|
|
51
|
+
}
|
|
52
|
+
const options = {
|
|
53
|
+
apiKey,
|
|
54
|
+
...opts,
|
|
55
|
+
baseURL: baseURL || `https://api.retellai.com`,
|
|
56
|
+
};
|
|
57
|
+
super({
|
|
58
|
+
baseURL: options.baseURL,
|
|
59
|
+
timeout: options.timeout ?? 60000 /* 1 minute */,
|
|
60
|
+
httpAgent: options.httpAgent,
|
|
61
|
+
maxRetries: options.maxRetries,
|
|
62
|
+
fetch: options.fetch,
|
|
63
|
+
});
|
|
64
|
+
this.call = new API.Call(this);
|
|
65
|
+
this.phoneNumber = new API.PhoneNumber(this);
|
|
66
|
+
this.agent = new API.Agent(this);
|
|
67
|
+
this.llm = new API.Llm(this);
|
|
68
|
+
this._options = options;
|
|
69
|
+
this.apiKey = apiKey;
|
|
70
|
+
}
|
|
71
|
+
defaultQuery() {
|
|
72
|
+
return this._options.defaultQuery;
|
|
73
|
+
}
|
|
74
|
+
defaultHeaders(opts) {
|
|
75
|
+
return {
|
|
76
|
+
...super.defaultHeaders(opts),
|
|
77
|
+
...this._options.defaultHeaders,
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
authHeaders(opts) {
|
|
81
|
+
return { Authorization: `Bearer ${this.apiKey}` };
|
|
82
|
+
}
|
|
83
|
+
stringifyQuery(query) {
|
|
84
|
+
return qs.stringify(query, { arrayFormat: 'comma' });
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
exports.RetellSdk = RetellSdk;
|
|
88
|
+
_a = RetellSdk;
|
|
89
|
+
RetellSdk.RetellSdk = _a;
|
|
90
|
+
RetellSdk.RetellSdkError = Errors.RetellSdkError;
|
|
91
|
+
RetellSdk.APIError = Errors.APIError;
|
|
92
|
+
RetellSdk.APIConnectionError = Errors.APIConnectionError;
|
|
93
|
+
RetellSdk.APIConnectionTimeoutError = Errors.APIConnectionTimeoutError;
|
|
94
|
+
RetellSdk.APIUserAbortError = Errors.APIUserAbortError;
|
|
95
|
+
RetellSdk.NotFoundError = Errors.NotFoundError;
|
|
96
|
+
RetellSdk.ConflictError = Errors.ConflictError;
|
|
97
|
+
RetellSdk.RateLimitError = Errors.RateLimitError;
|
|
98
|
+
RetellSdk.BadRequestError = Errors.BadRequestError;
|
|
99
|
+
RetellSdk.AuthenticationError = Errors.AuthenticationError;
|
|
100
|
+
RetellSdk.InternalServerError = Errors.InternalServerError;
|
|
101
|
+
RetellSdk.PermissionDeniedError = Errors.PermissionDeniedError;
|
|
102
|
+
RetellSdk.UnprocessableEntityError = Errors.UnprocessableEntityError;
|
|
103
|
+
exports.RetellSdkError = Errors.RetellSdkError, exports.APIError = Errors.APIError, exports.APIConnectionError = Errors.APIConnectionError, exports.APIConnectionTimeoutError = Errors.APIConnectionTimeoutError, exports.APIUserAbortError = Errors.APIUserAbortError, exports.NotFoundError = Errors.NotFoundError, exports.ConflictError = Errors.ConflictError, exports.RateLimitError = Errors.RateLimitError, exports.BadRequestError = Errors.BadRequestError, exports.AuthenticationError = Errors.AuthenticationError, exports.InternalServerError = Errors.InternalServerError, exports.PermissionDeniedError = Errors.PermissionDeniedError, exports.UnprocessableEntityError = Errors.UnprocessableEntityError;
|
|
104
|
+
exports.toFile = Uploads.toFile;
|
|
105
|
+
exports.fileFromPath = Uploads.fileFromPath;
|
|
106
|
+
(function (RetellSdk) {
|
|
107
|
+
// Helper functions
|
|
108
|
+
RetellSdk.toFile = Uploads.toFile;
|
|
109
|
+
RetellSdk.fileFromPath = Uploads.fileFromPath;
|
|
110
|
+
RetellSdk.Call = API.Call;
|
|
111
|
+
RetellSdk.PhoneNumber = API.PhoneNumber;
|
|
112
|
+
RetellSdk.Agent = API.Agent;
|
|
113
|
+
RetellSdk.Llm = API.Llm;
|
|
114
|
+
})(RetellSdk = exports.RetellSdk || (exports.RetellSdk = {}));
|
|
115
|
+
exports = module.exports = RetellSdk;
|
|
116
|
+
exports.default = RetellSdk;
|
|
117
|
+
//# sourceMappingURL=index.js.map
|
package/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["src/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEtF,gDAA+B;AAC/B,mDAAkC;AAElC,sDAAqC;AACrC,uCAAyB;AACzB,gEAAkD;AAiElD,0DAA0D;AAC1D,MAAa,SAAU,SAAQ,IAAI,CAAC,SAAS;IAK3C;;;;;;;;;;;OAWG;IACH,YAAY,EACV,OAAO,GAAG,IAAI,CAAC,O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,QAAA,YAAY,GAAG,OAAO,CAAC,YAAY,CAAC;AAElD,WAAiB,SAAS;IACxB,mBAAmB;IACL,gBAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IACxB,sBAAY,GAAG,OAAO,CAAC,YAAY,CAAC;IAIpC,cAAI,GAAG,GAAG,CAAC,IAAI,CAAC;IAShB,qBAAW,GAAG,GAAG,CAAC,WAAW,CAAC;IAM9B,eAAK,GAAG,GAAG,CAAC,KAAK,CAAC;IAMlB,aAAG,GAAG,GAAG,CAAC,GAAG,CAAC;AAK9B,CAAC,EAjCgB,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAiCzB;AAED,kBAAe,SAAS,CAAC"}
|
package/index.mjs
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
var _a;
|
|
3
|
+
import * as Core from "./core.mjs";
|
|
4
|
+
import * as Errors from "./error.mjs";
|
|
5
|
+
import * as Uploads from "./uploads.mjs";
|
|
6
|
+
import * as qs from 'qs';
|
|
7
|
+
import * as API from 'retell-sdk/resources/index';
|
|
8
|
+
/** API Client for interfacing with the Retell Sdk API. */
|
|
9
|
+
export class RetellSdk extends Core.APIClient {
|
|
10
|
+
/**
|
|
11
|
+
* API Client for interfacing with the Retell Sdk API.
|
|
12
|
+
*
|
|
13
|
+
* @param {string | undefined} [opts.apiKey=process.env['RETELL_API_KEY'] ?? undefined]
|
|
14
|
+
* @param {string} [opts.baseURL=process.env['RETELL_SDK_BASE_URL'] ?? https://api.retellai.com] - Override the default base URL for the API.
|
|
15
|
+
* @param {number} [opts.timeout=1 minute] - The maximum amount of time (in milliseconds) the client will wait for a response before timing out.
|
|
16
|
+
* @param {number} [opts.httpAgent] - An HTTP agent used to manage HTTP(s) connections.
|
|
17
|
+
* @param {Core.Fetch} [opts.fetch] - Specify a custom `fetch` function implementation.
|
|
18
|
+
* @param {number} [opts.maxRetries=2] - The maximum number of times the client will retry a request.
|
|
19
|
+
* @param {Core.Headers} opts.defaultHeaders - Default headers to include with every request to the API.
|
|
20
|
+
* @param {Core.DefaultQuery} opts.defaultQuery - Default query parameters to include with every request to the API.
|
|
21
|
+
*/
|
|
22
|
+
constructor({ baseURL = Core.readEnv('RETELL_SDK_BASE_URL'), apiKey = Core.readEnv('RETELL_API_KEY'), ...opts } = {}) {
|
|
23
|
+
if (apiKey === undefined) {
|
|
24
|
+
throw new Errors.RetellSdkError("The RETELL_API_KEY environment variable is missing or empty; either provide it, or instantiate the RetellSdk client with an apiKey option, like new RetellSdk({ apiKey: 'My API Key' }).");
|
|
25
|
+
}
|
|
26
|
+
const options = {
|
|
27
|
+
apiKey,
|
|
28
|
+
...opts,
|
|
29
|
+
baseURL: baseURL || `https://api.retellai.com`,
|
|
30
|
+
};
|
|
31
|
+
super({
|
|
32
|
+
baseURL: options.baseURL,
|
|
33
|
+
timeout: options.timeout ?? 60000 /* 1 minute */,
|
|
34
|
+
httpAgent: options.httpAgent,
|
|
35
|
+
maxRetries: options.maxRetries,
|
|
36
|
+
fetch: options.fetch,
|
|
37
|
+
});
|
|
38
|
+
this.call = new API.Call(this);
|
|
39
|
+
this.phoneNumber = new API.PhoneNumber(this);
|
|
40
|
+
this.agent = new API.Agent(this);
|
|
41
|
+
this.llm = new API.Llm(this);
|
|
42
|
+
this._options = options;
|
|
43
|
+
this.apiKey = apiKey;
|
|
44
|
+
}
|
|
45
|
+
defaultQuery() {
|
|
46
|
+
return this._options.defaultQuery;
|
|
47
|
+
}
|
|
48
|
+
defaultHeaders(opts) {
|
|
49
|
+
return {
|
|
50
|
+
...super.defaultHeaders(opts),
|
|
51
|
+
...this._options.defaultHeaders,
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
authHeaders(opts) {
|
|
55
|
+
return { Authorization: `Bearer ${this.apiKey}` };
|
|
56
|
+
}
|
|
57
|
+
stringifyQuery(query) {
|
|
58
|
+
return qs.stringify(query, { arrayFormat: 'comma' });
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
_a = RetellSdk;
|
|
62
|
+
RetellSdk.RetellSdk = _a;
|
|
63
|
+
RetellSdk.RetellSdkError = Errors.RetellSdkError;
|
|
64
|
+
RetellSdk.APIError = Errors.APIError;
|
|
65
|
+
RetellSdk.APIConnectionError = Errors.APIConnectionError;
|
|
66
|
+
RetellSdk.APIConnectionTimeoutError = Errors.APIConnectionTimeoutError;
|
|
67
|
+
RetellSdk.APIUserAbortError = Errors.APIUserAbortError;
|
|
68
|
+
RetellSdk.NotFoundError = Errors.NotFoundError;
|
|
69
|
+
RetellSdk.ConflictError = Errors.ConflictError;
|
|
70
|
+
RetellSdk.RateLimitError = Errors.RateLimitError;
|
|
71
|
+
RetellSdk.BadRequestError = Errors.BadRequestError;
|
|
72
|
+
RetellSdk.AuthenticationError = Errors.AuthenticationError;
|
|
73
|
+
RetellSdk.InternalServerError = Errors.InternalServerError;
|
|
74
|
+
RetellSdk.PermissionDeniedError = Errors.PermissionDeniedError;
|
|
75
|
+
RetellSdk.UnprocessableEntityError = Errors.UnprocessableEntityError;
|
|
76
|
+
export const { RetellSdkError, APIError, APIConnectionError, APIConnectionTimeoutError, APIUserAbortError, NotFoundError, ConflictError, RateLimitError, BadRequestError, AuthenticationError, InternalServerError, PermissionDeniedError, UnprocessableEntityError, } = Errors;
|
|
77
|
+
export var toFile = Uploads.toFile;
|
|
78
|
+
export var fileFromPath = Uploads.fileFromPath;
|
|
79
|
+
(function (RetellSdk) {
|
|
80
|
+
// Helper functions
|
|
81
|
+
RetellSdk.toFile = Uploads.toFile;
|
|
82
|
+
RetellSdk.fileFromPath = Uploads.fileFromPath;
|
|
83
|
+
RetellSdk.Call = API.Call;
|
|
84
|
+
RetellSdk.PhoneNumber = API.PhoneNumber;
|
|
85
|
+
RetellSdk.Agent = API.Agent;
|
|
86
|
+
RetellSdk.Llm = API.Llm;
|
|
87
|
+
})(RetellSdk || (RetellSdk = {}));
|
|
88
|
+
export default RetellSdk;
|
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MAAM,EACX,cAAc,EACd,QAAQ,EACR,kBAAkB,EAClB,yBAAyB,EACzB,iBAAiB,EACjB,aAAa,EACb,aAAa,EACb,cAAc,EACd,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACrB,wBAAwB,GACzB,GAAG,MAAM,CAAC;AAEX,MAAM,KAAQ,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;AACtC,MAAM,KAAQ,YAAY,GAAG,OAAO,CAAC,YAAY,CAAC;AAElD,WAAiB,SAAS;IACxB,mBAAmB;IACL,gBAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IACxB,sBAAY,GAAG,OAAO,CAAC,YAAY,CAAC;IAIpC,cAAI,GAAG,GAAG,CAAC,IAAI,CAAC;IAShB,qBAAW,GAAG,GAAG,CAAC,WAAW,CAAC;IAM9B,eAAK,GAAG,GAAG,CAAC,KAAK,CAAC;IAMlB,aAAG,GAAG,GAAG,CAAC,GAAG,CAAC;AAK9B,CAAC,EAjCgB,SAAS,KAAT,SAAS,QAiCzB;AAED,eAAe,SAAS,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "retell-sdk",
|
|
3
|
+
"version": "0.1.0-alpha.1",
|
|
4
|
+
"description": "The official TypeScript library for the Retell Sdk API",
|
|
5
|
+
"author": "Retell Sdk <founders@retellai.com>",
|
|
6
|
+
"types": "./index.d.ts",
|
|
7
|
+
"main": "./index.js",
|
|
8
|
+
"type": "commonjs",
|
|
9
|
+
"repository": "github:RetellAI/retell-typescript-sdk",
|
|
10
|
+
"license": "Apache-2.0",
|
|
11
|
+
"packageManager": "yarn@1.22.21",
|
|
12
|
+
"files": [
|
|
13
|
+
"*"
|
|
14
|
+
],
|
|
15
|
+
"private": false,
|
|
16
|
+
"scripts": {
|
|
17
|
+
"test": "bin/check-test-server && yarn jest",
|
|
18
|
+
"build": "bash ./build",
|
|
19
|
+
"format": "prettier --write --cache --cache-strategy metadata . !dist",
|
|
20
|
+
"tsn": "ts-node -r tsconfig-paths/register",
|
|
21
|
+
"lint": "eslint --ext ts,js .",
|
|
22
|
+
"fix": "eslint --fix --ext ts,js ."
|
|
23
|
+
},
|
|
24
|
+
"dependencies": {
|
|
25
|
+
"@types/node": "^18.11.18",
|
|
26
|
+
"@types/node-fetch": "^2.6.4",
|
|
27
|
+
"@types/qs": "^6.9.7",
|
|
28
|
+
"abort-controller": "^3.0.0",
|
|
29
|
+
"agentkeepalive": "^4.2.1",
|
|
30
|
+
"digest-fetch": "^1.3.0",
|
|
31
|
+
"form-data-encoder": "1.7.2",
|
|
32
|
+
"formdata-node": "^4.3.2",
|
|
33
|
+
"node-fetch": "^2.6.7",
|
|
34
|
+
"qs": "^6.10.3",
|
|
35
|
+
"web-streams-polyfill": "^3.2.1"
|
|
36
|
+
},
|
|
37
|
+
"sideEffects": [
|
|
38
|
+
"./_shims/index.js",
|
|
39
|
+
"./_shims/index.mjs",
|
|
40
|
+
"./shims/node.js",
|
|
41
|
+
"./shims/node.mjs",
|
|
42
|
+
"./shims/web.js",
|
|
43
|
+
"./shims/web.mjs"
|
|
44
|
+
],
|
|
45
|
+
"imports": {
|
|
46
|
+
"retell-sdk": ".",
|
|
47
|
+
"retell-sdk/*": "./src/*"
|
|
48
|
+
},
|
|
49
|
+
"exports": {
|
|
50
|
+
"./_shims/auto/*": {
|
|
51
|
+
"deno": {
|
|
52
|
+
"types": "./_shims/auto/*.d.ts",
|
|
53
|
+
"require": "./_shims/auto/*.js",
|
|
54
|
+
"default": "./_shims/auto/*.mjs"
|
|
55
|
+
},
|
|
56
|
+
"bun": {
|
|
57
|
+
"types": "./_shims/auto/*.d.ts",
|
|
58
|
+
"require": "./_shims/auto/*-bun.js",
|
|
59
|
+
"default": "./_shims/auto/*-bun.mjs"
|
|
60
|
+
},
|
|
61
|
+
"browser": {
|
|
62
|
+
"types": "./_shims/auto/*.d.ts",
|
|
63
|
+
"require": "./_shims/auto/*.js",
|
|
64
|
+
"default": "./_shims/auto/*.mjs"
|
|
65
|
+
},
|
|
66
|
+
"worker": {
|
|
67
|
+
"types": "./_shims/auto/*.d.ts",
|
|
68
|
+
"require": "./_shims/auto/*.js",
|
|
69
|
+
"default": "./_shims/auto/*.mjs"
|
|
70
|
+
},
|
|
71
|
+
"workerd": {
|
|
72
|
+
"types": "./_shims/auto/*.d.ts",
|
|
73
|
+
"require": "./_shims/auto/*.js",
|
|
74
|
+
"default": "./_shims/auto/*.mjs"
|
|
75
|
+
},
|
|
76
|
+
"node": {
|
|
77
|
+
"types": "./_shims/auto/*-node.d.ts",
|
|
78
|
+
"require": "./_shims/auto/*-node.js",
|
|
79
|
+
"default": "./_shims/auto/*-node.mjs"
|
|
80
|
+
},
|
|
81
|
+
"types": "./_shims/auto/*.d.ts",
|
|
82
|
+
"require": "./_shims/auto/*.js",
|
|
83
|
+
"default": "./_shims/auto/*.mjs"
|
|
84
|
+
},
|
|
85
|
+
".": {
|
|
86
|
+
"require": {
|
|
87
|
+
"types": "./index.d.ts",
|
|
88
|
+
"default": "./index.js"
|
|
89
|
+
},
|
|
90
|
+
"types": "./index.d.mts",
|
|
91
|
+
"default": "./index.mjs"
|
|
92
|
+
},
|
|
93
|
+
"./*.mjs": {
|
|
94
|
+
"types": "./*.d.ts",
|
|
95
|
+
"default": "./*.mjs"
|
|
96
|
+
},
|
|
97
|
+
"./*.js": {
|
|
98
|
+
"types": "./*.d.ts",
|
|
99
|
+
"default": "./*.js"
|
|
100
|
+
},
|
|
101
|
+
"./*": {
|
|
102
|
+
"types": "./*.d.ts",
|
|
103
|
+
"require": "./*.js",
|
|
104
|
+
"default": "./*.mjs"
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
package/resource.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resource.d.ts","sourceRoot":"","sources":["src/resource.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEzC,qBAAa,WAAW;IACtB,SAAS,CAAC,OAAO,EAAE,SAAS,CAAC;gBAEjB,MAAM,EAAE,SAAS;CAG9B"}
|
package/resource.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.APIResource = void 0;
|
|
5
|
+
class APIResource {
|
|
6
|
+
constructor(client) {
|
|
7
|
+
this._client = client;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
exports.APIResource = APIResource;
|
|
11
|
+
//# sourceMappingURL=resource.js.map
|
package/resource.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resource.js","sourceRoot":"","sources":["src/resource.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAItF,MAAa,WAAW;IAGtB,YAAY,MAAiB;QAC3B,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;IACxB,CAAC;CACF;AAND,kCAMC"}
|
package/resource.mjs
ADDED
package/resource.mjs.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resource.mjs","sourceRoot":"","sources":["src/resource.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAItF,MAAM,OAAO,WAAW;IAGtB,YAAY,MAAiB;QAC3B,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;IACxB,CAAC;CACF"}
|