@polymorfa/sdk 0.1.0-dev.20260923124417 → 0.1.0-dev.20260923140837
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/README.md +143 -3
- package/dist/calls/diagnostics.d.ts +1 -1
- package/dist/calls/diagnostics.js +1 -1
- package/dist/client.d.ts +6 -0
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +6 -0
- package/dist/client.js.map +1 -1
- package/dist/errors.d.ts +1 -1
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +8 -0
- package/dist/errors.js.map +1 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/platform/usage.d.ts +156 -0
- package/dist/platform/usage.d.ts.map +1 -0
- package/dist/platform/usage.js +72 -0
- package/dist/platform/usage.js.map +1 -0
- package/dist/platform/voice.d.ts +315 -0
- package/dist/platform/voice.d.ts.map +1 -0
- package/dist/platform/voice.js +564 -0
- package/dist/platform/voice.js.map +1 -0
- package/dist/transport/http.d.ts +17 -0
- package/dist/transport/http.d.ts.map +1 -1
- package/dist/transport/http.js +80 -0
- package/dist/transport/http.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/webhooks/events.d.ts +54 -1
- package/dist/webhooks/events.d.ts.map +1 -1
- package/dist/webhooks/events.js +3 -0
- package/dist/webhooks/events.js.map +1 -1
- package/dist/webhooks/index.d.ts +1 -1
- package/dist/webhooks/index.d.ts.map +1 -1
- package/dist/webhooks/index.js.map +1 -1
- package/dist/webhooks/verify.js +2 -1
- package/dist/webhooks/verify.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
import { HttpTransport } from "../transport/http.js";
|
|
2
|
+
import type { ApiResponse, RequestOptions } from "../transport/types.js";
|
|
3
|
+
/**
|
|
4
|
+
* What was measured. Calls record `call.duration` (seconds) and, for outgoing
|
|
5
|
+
* Cloud API calls, `call.cloud_pulses` (6-second pulses). The other meters
|
|
6
|
+
* belong to voice automation and have no records yet.
|
|
7
|
+
*/
|
|
8
|
+
export type UsageMeter = "call.duration" | "call.cloud_pulses" | "campaign.call" | "tts.characters" | "tts.seconds" | "stt.seconds" | "agent.seconds" | "agent.tokens" | "agent.provider_cost" | "channels.peak" | "storage.byte_days";
|
|
9
|
+
export type UsageUnit = "second" | "pulse" | "call" | "character" | "token" | "provider_unit" | "channel" | "byte_day";
|
|
10
|
+
/** Whose provider key produced the usage. `none` for calls. */
|
|
11
|
+
export type UsageKeySource = "none" | "managed" | "customer";
|
|
12
|
+
export type UsagePricingState = "unpriced" | "priced" | "waived" | "settled";
|
|
13
|
+
export type UsageSourceKind = "call" | "attempt" | "flow_run" | "conversation" | "asset" | "team";
|
|
14
|
+
/** Dimensions of `call.duration` and `call.cloud_pulses` records. */
|
|
15
|
+
export interface CallUsageDimensions {
|
|
16
|
+
readonly direction: "inbound" | "outbound";
|
|
17
|
+
readonly upstream: "linked_device" | "cloud_api";
|
|
18
|
+
readonly origin: "direct" | "campaign" | "flow" | "agent" | "inbound_automation";
|
|
19
|
+
readonly participants: number;
|
|
20
|
+
readonly connections: number;
|
|
21
|
+
readonly sipLegs: number;
|
|
22
|
+
readonly video: boolean;
|
|
23
|
+
}
|
|
24
|
+
export interface UsageRecord {
|
|
25
|
+
readonly id: string;
|
|
26
|
+
readonly meter: UsageMeter;
|
|
27
|
+
readonly quantity: number;
|
|
28
|
+
readonly unit: UsageUnit;
|
|
29
|
+
/** Closed, per-meter attributes. See {@link CallUsageDimensions} for calls. */
|
|
30
|
+
readonly dimensions: Readonly<Record<string, string | number | boolean>>;
|
|
31
|
+
readonly keySource: UsageKeySource;
|
|
32
|
+
readonly sourceKind: UsageSourceKind;
|
|
33
|
+
/** The call id for call meters. */
|
|
34
|
+
readonly sourceId: string;
|
|
35
|
+
readonly projectId: string | null;
|
|
36
|
+
/** The number (session name) the usage belongs to. */
|
|
37
|
+
readonly session: string | null;
|
|
38
|
+
readonly occurredAt: string;
|
|
39
|
+
readonly recordedAt: string;
|
|
40
|
+
/** Increases when a later observation corrects the record. Keep the highest. */
|
|
41
|
+
readonly revision: number;
|
|
42
|
+
/** `unpriced` while usage is measured but not charged. */
|
|
43
|
+
readonly pricingState: UsagePricingState;
|
|
44
|
+
readonly rateCard: {
|
|
45
|
+
readonly id: string;
|
|
46
|
+
readonly version: number;
|
|
47
|
+
} | null;
|
|
48
|
+
readonly pricedCredits: number | null;
|
|
49
|
+
}
|
|
50
|
+
export interface UsageRecordPage {
|
|
51
|
+
readonly records: readonly UsageRecord[];
|
|
52
|
+
/** Pass as `cursor` for the next page; `null` on the last page. */
|
|
53
|
+
readonly nextCursor: string | null;
|
|
54
|
+
}
|
|
55
|
+
export interface UsageMeterTotal {
|
|
56
|
+
readonly meter: UsageMeter;
|
|
57
|
+
readonly unit: UsageUnit;
|
|
58
|
+
readonly keySource: UsageKeySource;
|
|
59
|
+
readonly quantity: number;
|
|
60
|
+
readonly records: number;
|
|
61
|
+
}
|
|
62
|
+
export interface UsageSummary {
|
|
63
|
+
/** Calendar month in UTC, `YYYY-MM`. */
|
|
64
|
+
readonly period: string;
|
|
65
|
+
readonly start: string;
|
|
66
|
+
readonly end: string;
|
|
67
|
+
readonly projectId: string | null;
|
|
68
|
+
readonly session: string | null;
|
|
69
|
+
/** Always `false` while usage is measured but not charged. */
|
|
70
|
+
readonly billingEnabled: boolean;
|
|
71
|
+
readonly meters: readonly UsageMeterTotal[];
|
|
72
|
+
/** Totals per number, most call time first (at most 100). */
|
|
73
|
+
readonly numbers: readonly {
|
|
74
|
+
readonly session: string;
|
|
75
|
+
readonly projectId: string | null;
|
|
76
|
+
readonly meters: readonly UsageMeterTotal[];
|
|
77
|
+
}[];
|
|
78
|
+
readonly numbersTruncated: boolean;
|
|
79
|
+
}
|
|
80
|
+
export type UsageGateKey = "calls.outbound_monthly" | "voice.campaigns" | "voice.campaigns.recipients" | "voice.campaigns.calls_monthly" | "voice.channels.concurrent" | "voice.audio_library" | "voice.audio_library.assets" | "voice.flows" | "voice.agents.elevenlabs" | "voice.agents.openai_realtime" | "voice.providers.managed" | "voice.providers.customer_key" | "voice.agent_minutes_monthly" | "voice.tts_characters_monthly" | "voice.stt_minutes_monthly" | "voice.storage.recordings" | "voice.storage.transcripts";
|
|
81
|
+
/**
|
|
82
|
+
* For an active gate, `record` counts actions over the limit without refusing
|
|
83
|
+
* them; `enforce` refuses them with `gate_limit_reached` (HTTP 402). `off`
|
|
84
|
+
* does not check. An inactive gate's configured mode does not enforce a limit.
|
|
85
|
+
*/
|
|
86
|
+
export type UsageGateMode = "off" | "record" | "enforce";
|
|
87
|
+
export interface UsageGate {
|
|
88
|
+
readonly key: UsageGateKey;
|
|
89
|
+
readonly kind: "capability" | "quota" | "limit" | "concurrency";
|
|
90
|
+
readonly subject: "team" | "number" | "project" | "campaign";
|
|
91
|
+
readonly mode: UsageGateMode;
|
|
92
|
+
/** Whether an action checks this gate today. */
|
|
93
|
+
readonly active: boolean;
|
|
94
|
+
/** `-1` for no limit; `null` when the limit applies per number and no `session` was given. */
|
|
95
|
+
readonly limit: number | null;
|
|
96
|
+
readonly used: number | null;
|
|
97
|
+
readonly unit: UsageUnit | "count" | "minute" | null;
|
|
98
|
+
readonly overLimit: boolean | null;
|
|
99
|
+
/** Checks over the limit in the last 30 days (UTC). */
|
|
100
|
+
readonly decisions: {
|
|
101
|
+
readonly wouldBlock: number;
|
|
102
|
+
readonly blocked: number;
|
|
103
|
+
readonly evaluationError: number;
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
export interface UsageGateList {
|
|
107
|
+
readonly session: string | null;
|
|
108
|
+
readonly gates: readonly UsageGate[];
|
|
109
|
+
}
|
|
110
|
+
export interface UsageSummaryParams {
|
|
111
|
+
/** Organization keys only; a project client always reads its own project. */
|
|
112
|
+
readonly projectId?: string;
|
|
113
|
+
/** One number (session name). */
|
|
114
|
+
readonly session?: string;
|
|
115
|
+
/** Calendar month in UTC, `YYYY-MM`. Defaults to the current month. */
|
|
116
|
+
readonly period?: string;
|
|
117
|
+
}
|
|
118
|
+
export interface UsageRecordParams extends UsageSummaryParams {
|
|
119
|
+
/** Calendar month in UTC, `YYYY-MM`. Omit it to list records from every month. */
|
|
120
|
+
readonly period?: string;
|
|
121
|
+
/** One call's records. */
|
|
122
|
+
readonly callId?: string;
|
|
123
|
+
readonly meter?: UsageMeter;
|
|
124
|
+
/** 1 to 100; defaults to 25. */
|
|
125
|
+
readonly limit?: number;
|
|
126
|
+
readonly cursor?: string;
|
|
127
|
+
}
|
|
128
|
+
export interface UsageGateParams {
|
|
129
|
+
readonly projectId?: string;
|
|
130
|
+
/** Include limits that apply per number. */
|
|
131
|
+
readonly session?: string;
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Metered usage and usage gates. Usage is measured, not charged. Requires the
|
|
135
|
+
* `sessions:read` scope; a project token reads only its own project's usage,
|
|
136
|
+
* and gate state needs an organization key.
|
|
137
|
+
*/
|
|
138
|
+
export declare class UsageResource {
|
|
139
|
+
private readonly transport;
|
|
140
|
+
private readonly projectId;
|
|
141
|
+
constructor(transport: HttpTransport, projectId: string | null);
|
|
142
|
+
/** `GET /platform/usage`: totals for one calendar month, by meter and by number. */
|
|
143
|
+
summary(params?: UsageSummaryParams, options?: RequestOptions): Promise<ApiResponse<UsageSummary>>;
|
|
144
|
+
/** `GET /platform/usage/records`: records newest first, one page. */
|
|
145
|
+
listRecords(params?: UsageRecordParams, options?: RequestOptions): Promise<ApiResponse<UsageRecordPage>>;
|
|
146
|
+
/** Iterates every matching record across pages. */
|
|
147
|
+
iterateRecords(params?: Omit<UsageRecordParams, "cursor">, options?: RequestOptions): AsyncGenerator<UsageRecord, void, undefined>;
|
|
148
|
+
/**
|
|
149
|
+
* `GET /platform/gates`: every usage gate with its mode, limit and usage.
|
|
150
|
+
* Gate state covers the whole team, so this needs an organization client;
|
|
151
|
+
* the API refuses project credentials with 403.
|
|
152
|
+
*/
|
|
153
|
+
listGates(params?: UsageGateParams, options?: RequestOptions): Promise<ApiResponse<UsageGateList>>;
|
|
154
|
+
private get;
|
|
155
|
+
}
|
|
156
|
+
//# sourceMappingURL=usage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usage.d.ts","sourceRoot":"","sources":["../../src/platform/usage.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,KAAK,EACV,WAAW,EAEX,cAAc,EACf,MAAM,uBAAuB,CAAC;AAG/B;;;;GAIG;AACH,MAAM,MAAM,UAAU,GAClB,eAAe,GACf,mBAAmB,GACnB,eAAe,GACf,gBAAgB,GAChB,aAAa,GACb,aAAa,GACb,eAAe,GACf,cAAc,GACd,qBAAqB,GACrB,eAAe,GACf,mBAAmB,CAAC;AAExB,MAAM,MAAM,SAAS,GACjB,QAAQ,GACR,OAAO,GACP,MAAM,GACN,WAAW,GACX,OAAO,GACP,eAAe,GACf,SAAS,GACT,UAAU,CAAC;AAEf,+DAA+D;AAC/D,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,SAAS,GAAG,UAAU,CAAC;AAC7D,MAAM,MAAM,iBAAiB,GAAG,UAAU,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS,CAAC;AAC7E,MAAM,MAAM,eAAe,GACzB,MAAM,GAAG,SAAS,GAAG,UAAU,GAAG,cAAc,GAAG,OAAO,GAAG,MAAM,CAAC;AAEtE,qEAAqE;AACrE,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,SAAS,EAAE,SAAS,GAAG,UAAU,CAAC;IAC3C,QAAQ,CAAC,QAAQ,EAAE,eAAe,GAAG,WAAW,CAAC;IACjD,QAAQ,CAAC,MAAM,EACb,QAAQ,GAAG,UAAU,GAAG,MAAM,GAAG,OAAO,GAAG,oBAAoB,CAAC;IAClE,QAAQ,CAAC,YAAY,EAAE,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,GAAE,cAAmB,GAC3B,OAAO,CAAC,WAAW,CAAC,aAAa,CAAC,CAAC;IAMtC,OAAO,CAAC,GAAG;CAiBZ"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { PolymorfaServerError } from "../errors.js";
|
|
2
|
+
import { HttpTransport } from "../transport/http.js";
|
|
3
|
+
import { unwrapResponse } from "./response.js";
|
|
4
|
+
/**
|
|
5
|
+
* Metered usage and usage gates. Usage is measured, not charged. Requires the
|
|
6
|
+
* `sessions:read` scope; a project token reads only its own project's usage,
|
|
7
|
+
* and gate state needs an organization key.
|
|
8
|
+
*/
|
|
9
|
+
export class UsageResource {
|
|
10
|
+
transport;
|
|
11
|
+
projectId;
|
|
12
|
+
constructor(transport, projectId) {
|
|
13
|
+
this.transport = transport;
|
|
14
|
+
this.projectId = projectId;
|
|
15
|
+
}
|
|
16
|
+
/** `GET /platform/usage`: totals for one calendar month, by meter and by number. */
|
|
17
|
+
async summary(params = {}, options = {}) {
|
|
18
|
+
return unwrapResponse(await this.get("/platform/usage", params, options));
|
|
19
|
+
}
|
|
20
|
+
/** `GET /platform/usage/records`: records newest first, one page. */
|
|
21
|
+
async listRecords(params = {}, options = {}) {
|
|
22
|
+
return unwrapResponse(await this.get("/platform/usage/records", params, options));
|
|
23
|
+
}
|
|
24
|
+
/** Iterates every matching record across pages. */
|
|
25
|
+
async *iterateRecords(params = {}, options = {}) {
|
|
26
|
+
let cursor;
|
|
27
|
+
const seen = new Set();
|
|
28
|
+
while (true) {
|
|
29
|
+
const page = await this.listRecords({ ...params, ...(cursor ? { cursor } : {}) }, options);
|
|
30
|
+
const next = page.data.nextCursor;
|
|
31
|
+
if (next !== null && seen.has(next)) {
|
|
32
|
+
throw new PolymorfaServerError("The Polymorfa API repeated a usage record cursor.", {
|
|
33
|
+
code: "invalid_response",
|
|
34
|
+
status: page.metadata.status,
|
|
35
|
+
...(page.metadata.requestId === undefined
|
|
36
|
+
? {}
|
|
37
|
+
: { requestId: page.metadata.requestId }),
|
|
38
|
+
metadata: page.metadata,
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
yield* page.data.records;
|
|
42
|
+
if (next === null)
|
|
43
|
+
return;
|
|
44
|
+
seen.add(next);
|
|
45
|
+
cursor = next;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* `GET /platform/gates`: every usage gate with its mode, limit and usage.
|
|
50
|
+
* Gate state covers the whole team, so this needs an organization client;
|
|
51
|
+
* the API refuses project credentials with 403.
|
|
52
|
+
*/
|
|
53
|
+
async listGates(params = {}, options = {}) {
|
|
54
|
+
return unwrapResponse(await this.get("/platform/gates", params, options));
|
|
55
|
+
}
|
|
56
|
+
get(path, params, options) {
|
|
57
|
+
const query = {};
|
|
58
|
+
for (const [key, value] of Object.entries(params)) {
|
|
59
|
+
if (value !== undefined)
|
|
60
|
+
query[key] = value;
|
|
61
|
+
}
|
|
62
|
+
if (this.projectId !== null)
|
|
63
|
+
query.projectId = this.projectId;
|
|
64
|
+
return this.transport.request({
|
|
65
|
+
method: "GET",
|
|
66
|
+
path,
|
|
67
|
+
...options,
|
|
68
|
+
query,
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
//# sourceMappingURL=usage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usage.js","sourceRoot":"","sources":["../../src/platform/usage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAMrD,OAAO,EAAqB,cAAc,EAAE,MAAM,eAAe,CAAC;AAsLlE;;;;GAIG;AACH,MAAM,OAAO,aAAa;IAEL;IACA;IAFnB,YACmB,SAAwB,EACxB,SAAwB;QADxB,cAAS,GAAT,SAAS,CAAe;QACxB,cAAS,GAAT,SAAS,CAAe;IACxC,CAAC;IAEJ,oFAAoF;IACpF,KAAK,CAAC,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;YACJ,CAAC;YACD,KAAK,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC;YACzB,IAAI,IAAI,KAAK,IAAI;gBAAE,OAAO;YAC1B,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;YACf,MAAM,GAAG,IAAI,CAAC;QAChB,CAAC;IACH,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,SAAS,CACb,SAA0B,EAAE,EAC5B,UAA0B,EAAE;QAE5B,OAAO,cAAc,CACnB,MAAM,IAAI,CAAC,GAAG,CAAgB,iBAAiB,EAAE,MAAM,EAAE,OAAO,CAAC,CAClE,CAAC;IACJ,CAAC;IAEO,GAAG,CACT,IAAuE,EACvE,MAAc,EACd,OAAuB;QAEvB,MAAM,KAAK,GAA+B,EAAE,CAAC;QAC7C,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;YAClD,IAAI,KAAK,KAAK,SAAS;gBAAE,KAAK,CAAC,GAAG,CAAC,GAAG,KAAmB,CAAC;QAC5D,CAAC;QACD,IAAI,IAAI,CAAC,SAAS,KAAK,IAAI;YAAE,KAAK,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC;QAC9D,OAAO,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC;YAC5B,MAAM,EAAE,KAAK;YACb,IAAI;YACJ,GAAG,OAAO;YACV,KAAK;SACN,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
@@ -0,0 +1,315 @@
|
|
|
1
|
+
import { CursorPage } from "../pagination.js";
|
|
2
|
+
import { HttpTransport } from "../transport/http.js";
|
|
3
|
+
import type { ApiResponse, RequestOptions } from "../transport/types.js";
|
|
4
|
+
import type { ClientOwner } from "./developer-types.js";
|
|
5
|
+
export declare const VOICE_AUDIO_STATUSES: readonly ["pending_upload", "uploaded", "transcoding", "ready", "failed"];
|
|
6
|
+
export type KnownVoiceAudioStatus = (typeof VOICE_AUDIO_STATUSES)[number];
|
|
7
|
+
export type VoiceAudioStatus = KnownVoiceAudioStatus | (string & {});
|
|
8
|
+
export declare const VOICE_AUDIO_SOURCES: readonly ["upload", "tts"];
|
|
9
|
+
export type KnownVoiceAudioSource = (typeof VOICE_AUDIO_SOURCES)[number];
|
|
10
|
+
export type VoiceAudioSource = KnownVoiceAudioSource | (string & {});
|
|
11
|
+
export declare const VOICE_AUDIO_FAILURE_REASONS: readonly ["unsupported_format", "too_large", "too_long", "decode_failed", "silent", "tts_failed", "processing_failed"];
|
|
12
|
+
export type KnownVoiceAudioFailureReason = (typeof VOICE_AUDIO_FAILURE_REASONS)[number];
|
|
13
|
+
export type VoiceAudioFailureReason = KnownVoiceAudioFailureReason | (string & {});
|
|
14
|
+
/** Container of the original upload. */
|
|
15
|
+
export declare const VOICE_AUDIO_FORMATS: readonly ["mp3", "wav", "ogg", "m4a"];
|
|
16
|
+
export type KnownVoiceAudioFormat = (typeof VOICE_AUDIO_FORMATS)[number];
|
|
17
|
+
export type VoiceAudioFormat = KnownVoiceAudioFormat | (string & {});
|
|
18
|
+
export declare const VOICE_PROVIDERS: readonly ["elevenlabs", "openai"];
|
|
19
|
+
export type KnownVoiceProvider = (typeof VOICE_PROVIDERS)[number];
|
|
20
|
+
export type VoiceProvider = KnownVoiceProvider | (string & {});
|
|
21
|
+
/** Whose provider key produced a TTS asset. */
|
|
22
|
+
export declare const VOICE_KEY_SOURCES: readonly ["managed", "customer"];
|
|
23
|
+
export type KnownVoiceKeySource = (typeof VOICE_KEY_SOURCES)[number];
|
|
24
|
+
export type VoiceKeySource = KnownVoiceKeySource | (string & {});
|
|
25
|
+
export declare const VOICE_PROVIDER_CREDENTIAL_STATUSES: readonly ["unverified", "valid", "invalid"];
|
|
26
|
+
export type KnownVoiceProviderCredentialStatus = (typeof VOICE_PROVIDER_CREDENTIAL_STATUSES)[number];
|
|
27
|
+
export type VoiceProviderCredentialStatus = KnownVoiceProviderCredentialStatus | (string & {});
|
|
28
|
+
export declare const VOICE_PROVIDER_CREDENTIAL_ERRORS: readonly ["unauthorized", "quota_exceeded", "forbidden_scope", "provider_unavailable"];
|
|
29
|
+
export type KnownVoiceProviderCredentialError = (typeof VOICE_PROVIDER_CREDENTIAL_ERRORS)[number];
|
|
30
|
+
export type VoiceProviderCredentialError = KnownVoiceProviderCredentialError | (string & {});
|
|
31
|
+
export declare const VOICE_AUDIO_UPLOAD_CONTENT_TYPES: readonly ["audio/mpeg", "audio/wav", "audio/x-wav", "audio/ogg", "audio/mp4", "audio/x-m4a"];
|
|
32
|
+
export type KnownVoiceAudioUploadContentType = (typeof VOICE_AUDIO_UPLOAD_CONTENT_TYPES)[number];
|
|
33
|
+
export type VoiceAudioUploadContentType = KnownVoiceAudioUploadContentType;
|
|
34
|
+
/** ElevenLabs models. `eleven_multilingual_v2` is the default. */
|
|
35
|
+
export declare const ELEVENLABS_TTS_MODELS: readonly ["eleven_multilingual_v2", "eleven_flash_v2_5", "eleven_turbo_v2_5"];
|
|
36
|
+
export type ElevenLabsTtsModel = (typeof ELEVENLABS_TTS_MODELS)[number];
|
|
37
|
+
/** OpenAI models. `gpt-4o-mini-tts` is the default. */
|
|
38
|
+
export declare const OPENAI_TTS_MODELS: readonly ["gpt-4o-mini-tts", "tts-1", "tts-1-hd"];
|
|
39
|
+
export type OpenAiTtsModel = (typeof OPENAI_TTS_MODELS)[number];
|
|
40
|
+
export declare const OPENAI_TTS_VOICES: readonly ["alloy", "ash", "ballad", "coral", "echo", "fable", "nova", "onyx", "sage", "shimmer", "verse"];
|
|
41
|
+
export type OpenAiTtsVoice = (typeof OPENAI_TTS_VOICES)[number];
|
|
42
|
+
/** Largest upload the API accepts: 16 MiB. */
|
|
43
|
+
export declare const VOICE_AUDIO_MAX_UPLOAD_BYTES = 16777216;
|
|
44
|
+
export interface VoiceAudioTts {
|
|
45
|
+
readonly provider: VoiceProvider;
|
|
46
|
+
readonly voiceId: string;
|
|
47
|
+
readonly model: string;
|
|
48
|
+
readonly text: string;
|
|
49
|
+
readonly characters: number;
|
|
50
|
+
readonly keySource: VoiceKeySource;
|
|
51
|
+
/** The customer credential used, or `null` for a Polymorfa-managed key. */
|
|
52
|
+
readonly credentialId: string | null;
|
|
53
|
+
}
|
|
54
|
+
export interface VoiceAudioAsset {
|
|
55
|
+
readonly id: string;
|
|
56
|
+
readonly projectId: string;
|
|
57
|
+
readonly name: string;
|
|
58
|
+
readonly source: VoiceAudioSource;
|
|
59
|
+
readonly status: VoiceAudioStatus;
|
|
60
|
+
readonly failureReason: VoiceAudioFailureReason | null;
|
|
61
|
+
readonly originalFormat: VoiceAudioFormat | null;
|
|
62
|
+
readonly originalContentType: string | null;
|
|
63
|
+
/** Size of the original bytes. */
|
|
64
|
+
readonly sizeBytes: number | null;
|
|
65
|
+
/** Length of the canonical audio, set when `ready`. */
|
|
66
|
+
readonly durationMs: number | null;
|
|
67
|
+
/** Hex SHA-256 of the canonical 16 kHz mono PCM, set when `ready`. */
|
|
68
|
+
readonly contentSha256: string | null;
|
|
69
|
+
readonly tts: VoiceAudioTts | null;
|
|
70
|
+
/** Days the asset is kept (1 to 3650), or `null` to keep it until deleted. */
|
|
71
|
+
readonly retentionDays: number | null;
|
|
72
|
+
readonly expiresAt: string | null;
|
|
73
|
+
/** Campaigns and flows that use the asset. Delete fails while it is above 0. */
|
|
74
|
+
readonly inUseCount: number;
|
|
75
|
+
/** Increases on every change. Send it as `expectedRevision` to guard updates. */
|
|
76
|
+
readonly revision: number;
|
|
77
|
+
readonly createdAt: string;
|
|
78
|
+
readonly updatedAt: string;
|
|
79
|
+
readonly readyAt: string | null;
|
|
80
|
+
}
|
|
81
|
+
/** Where to send the file. The URL is valid for 5 minutes; treat it as a secret. */
|
|
82
|
+
export interface VoiceAudioUpload {
|
|
83
|
+
readonly url: string;
|
|
84
|
+
readonly method: "POST";
|
|
85
|
+
readonly headers: Readonly<Record<string, string>>;
|
|
86
|
+
readonly maxBytes: number;
|
|
87
|
+
readonly expiresAt: string;
|
|
88
|
+
}
|
|
89
|
+
export interface VoiceAudioUploadCreated {
|
|
90
|
+
readonly asset: VoiceAudioAsset;
|
|
91
|
+
readonly upload: VoiceAudioUpload;
|
|
92
|
+
}
|
|
93
|
+
/** A short-lived link to Opus-in-Ogg audio (16 kHz mono), valid for 5 minutes. */
|
|
94
|
+
export interface VoiceAudioPreview {
|
|
95
|
+
readonly url: string;
|
|
96
|
+
readonly contentType: "audio/ogg";
|
|
97
|
+
readonly expiresAt: string;
|
|
98
|
+
}
|
|
99
|
+
export interface VoiceProviderCredential {
|
|
100
|
+
readonly id: string;
|
|
101
|
+
/** The project, or `null` for a credential every project of the team can use. */
|
|
102
|
+
readonly projectId: string | null;
|
|
103
|
+
readonly provider: VoiceProvider;
|
|
104
|
+
readonly label: string;
|
|
105
|
+
/** First 8 lowercase hex characters of the key's SHA-256. The key is never returned. */
|
|
106
|
+
readonly keyFingerprint: string;
|
|
107
|
+
readonly status: VoiceProviderCredentialStatus;
|
|
108
|
+
readonly verifiedAt: string | null;
|
|
109
|
+
readonly lastError: VoiceProviderCredentialError | null;
|
|
110
|
+
readonly revision: number;
|
|
111
|
+
readonly createdAt: string;
|
|
112
|
+
readonly updatedAt: string;
|
|
113
|
+
}
|
|
114
|
+
export interface VoiceResourceDeleted {
|
|
115
|
+
readonly id: string;
|
|
116
|
+
readonly deleted: true;
|
|
117
|
+
}
|
|
118
|
+
export interface ListVoiceAudioParams {
|
|
119
|
+
readonly status?: KnownVoiceAudioStatus;
|
|
120
|
+
readonly cursor?: string;
|
|
121
|
+
/** 1 to 100. The API default is 50. */
|
|
122
|
+
readonly limit?: number;
|
|
123
|
+
}
|
|
124
|
+
export interface CreateVoiceAudioUploadInput {
|
|
125
|
+
/** 1 to 100 characters. */
|
|
126
|
+
readonly name: string;
|
|
127
|
+
readonly contentType: VoiceAudioUploadContentType;
|
|
128
|
+
/** 1 to 16777216. */
|
|
129
|
+
readonly sizeBytes: number;
|
|
130
|
+
readonly retentionDays?: number;
|
|
131
|
+
}
|
|
132
|
+
export type VoiceAudioBody = Blob | ArrayBuffer | ArrayBufferView | ReadableStream<Uint8Array>;
|
|
133
|
+
export interface UploadVoiceAudioInput {
|
|
134
|
+
readonly name: string;
|
|
135
|
+
/** The file: bytes, a `Buffer`, a `Blob`/`File`, or a stream. */
|
|
136
|
+
readonly body: VoiceAudioBody;
|
|
137
|
+
/** Required unless `body` is a `Blob` with a type. */
|
|
138
|
+
readonly contentType?: VoiceAudioUploadContentType;
|
|
139
|
+
/**
|
|
140
|
+
* Required when `body` is a stream. For bytes and Blobs the size is the
|
|
141
|
+
* body's byte length; a different value is refused before any request.
|
|
142
|
+
*/
|
|
143
|
+
readonly sizeBytes?: number;
|
|
144
|
+
readonly retentionDays?: number;
|
|
145
|
+
}
|
|
146
|
+
interface SynthesizeVoiceAudioBase {
|
|
147
|
+
readonly name: string;
|
|
148
|
+
/** 1 to 5000 characters (1 to 4096 for OpenAI). */
|
|
149
|
+
readonly text: string;
|
|
150
|
+
/**
|
|
151
|
+
* Your provider credential for the same provider. Without it, Polymorfa's
|
|
152
|
+
* managed key is used.
|
|
153
|
+
*/
|
|
154
|
+
readonly credentialId?: string;
|
|
155
|
+
readonly retentionDays?: number;
|
|
156
|
+
}
|
|
157
|
+
export type SynthesizeVoiceAudioInput = (SynthesizeVoiceAudioBase & {
|
|
158
|
+
readonly provider: "elevenlabs";
|
|
159
|
+
/** An ElevenLabs voice ID (`^[A-Za-z0-9]{1,64}$`). */
|
|
160
|
+
readonly voiceId: string;
|
|
161
|
+
readonly model?: ElevenLabsTtsModel;
|
|
162
|
+
}) | (SynthesizeVoiceAudioBase & {
|
|
163
|
+
readonly provider: "openai";
|
|
164
|
+
readonly voiceId: OpenAiTtsVoice;
|
|
165
|
+
readonly model?: OpenAiTtsModel;
|
|
166
|
+
});
|
|
167
|
+
export interface UpdateVoiceAudioInput {
|
|
168
|
+
/** Refuse the change with `voice_asset_revision_conflict` if the asset has another revision. */
|
|
169
|
+
readonly expectedRevision?: number;
|
|
170
|
+
readonly name?: string;
|
|
171
|
+
/** Send `null` to keep the asset until it is deleted. */
|
|
172
|
+
readonly retentionDays?: number | null;
|
|
173
|
+
}
|
|
174
|
+
export interface WaitForVoiceAudioOptions {
|
|
175
|
+
/** Give up after this long. Default 120000. */
|
|
176
|
+
readonly timeoutMs?: number;
|
|
177
|
+
/** Delay between reads. Default 2000. */
|
|
178
|
+
readonly intervalMs?: number;
|
|
179
|
+
readonly signal?: AbortSignal;
|
|
180
|
+
}
|
|
181
|
+
export interface ListVoiceProviderCredentialsParams {
|
|
182
|
+
/** Adds that project's credentials to the team-wide ones. */
|
|
183
|
+
readonly projectId?: string;
|
|
184
|
+
}
|
|
185
|
+
interface CreateVoiceProviderCredentialBase {
|
|
186
|
+
readonly provider: KnownVoiceProvider;
|
|
187
|
+
/** 1 to 100 characters. */
|
|
188
|
+
readonly label: string;
|
|
189
|
+
/** Write-only, 1 to 512 characters. Never returned, logged or echoed in errors. */
|
|
190
|
+
readonly apiKey: string;
|
|
191
|
+
}
|
|
192
|
+
export type CreateVoiceProviderCredentialInput<O extends ClientOwner = "organization"> = O extends "project" ? CreateVoiceProviderCredentialBase : CreateVoiceProviderCredentialBase & {
|
|
193
|
+
/** A project, or `null`/omitted for a credential every project can use. */
|
|
194
|
+
readonly projectId?: string | null;
|
|
195
|
+
};
|
|
196
|
+
type ProjectArgument<O extends ClientOwner> = O extends "project" ? [] : [projectId: string];
|
|
197
|
+
type CredentialListArguments<O extends ClientOwner> = O extends "project" ? [options?: RequestOptions] : [params?: ListVoiceProviderCredentialsParams, options?: RequestOptions];
|
|
198
|
+
/**
|
|
199
|
+
* Follows the merged Voice Automation API contract. Writes require the
|
|
200
|
+
* `calls.voice-automation` beta; other teams get `voice_not_enabled`.
|
|
201
|
+
* Reads, previews and deletes keep working after withdrawal. An installed
|
|
202
|
+
* resource does not grant access or establish an enabled audience.
|
|
203
|
+
*/
|
|
204
|
+
export declare class VoiceResource<O extends ClientOwner> {
|
|
205
|
+
readonly audio: VoiceAudioResource<O>;
|
|
206
|
+
readonly providerCredentials: VoiceProviderCredentialsResource<O>;
|
|
207
|
+
constructor(transport: HttpTransport, projectId: string | null, confineById: boolean);
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* The project's audio library: uploaded recordings and text-to-speech
|
|
211
|
+
* renders, transcoded to 16 kHz mono for calls. Team clients name the project
|
|
212
|
+
* on `list`, `createUpload`, `upload` and `synthesize`; project clients use
|
|
213
|
+
* their own project.
|
|
214
|
+
*/
|
|
215
|
+
export declare class VoiceAudioResource<O extends ClientOwner> {
|
|
216
|
+
#private;
|
|
217
|
+
private readonly transport;
|
|
218
|
+
private readonly projectId;
|
|
219
|
+
/**
|
|
220
|
+
* Team keys reach every asset of the team by ID, so a project client
|
|
221
|
+
* built from one checks an asset's project before acting on it.
|
|
222
|
+
*/
|
|
223
|
+
private readonly confineById;
|
|
224
|
+
constructor(transport: HttpTransport, projectId: string | null,
|
|
225
|
+
/**
|
|
226
|
+
* Team keys reach every asset of the team by ID, so a project client
|
|
227
|
+
* built from one checks an asset's project before acting on it.
|
|
228
|
+
*/
|
|
229
|
+
confineById: boolean);
|
|
230
|
+
list(...args: [
|
|
231
|
+
...ProjectArgument<O>,
|
|
232
|
+
params?: ListVoiceAudioParams,
|
|
233
|
+
options?: RequestOptions
|
|
234
|
+
]): Promise<CursorPage<VoiceAudioAsset>>;
|
|
235
|
+
/**
|
|
236
|
+
* Creates an asset in `pending_upload` and returns where to send the file.
|
|
237
|
+
* Send it with `POST upload.url`, only the `upload.headers`, and no
|
|
238
|
+
* `Authorization` header, then call `complete`. `upload` does all three.
|
|
239
|
+
*/
|
|
240
|
+
createUpload(...args: [
|
|
241
|
+
...ProjectArgument<O>,
|
|
242
|
+
input: CreateVoiceAudioUploadInput,
|
|
243
|
+
options?: RequestOptions
|
|
244
|
+
]): Promise<ApiResponse<VoiceAudioUploadCreated>>;
|
|
245
|
+
/**
|
|
246
|
+
* Uploads a file into the library: creates the asset, sends the bytes to
|
|
247
|
+
* the upload URL without your credential, and completes it. Resolves with
|
|
248
|
+
* the asset in `transcoding`; wait for `voice.asset_ready` or use
|
|
249
|
+
* `waitUntilReady`. If sending fails, the asset stays in `pending_upload`.
|
|
250
|
+
* `options` apply to the API requests, not to the upload URL, except
|
|
251
|
+
* `signal` and `timeoutMs`.
|
|
252
|
+
*/
|
|
253
|
+
upload(...args: [
|
|
254
|
+
...ProjectArgument<O>,
|
|
255
|
+
input: UploadVoiceAudioInput,
|
|
256
|
+
options?: RequestOptions
|
|
257
|
+
]): Promise<ApiResponse<VoiceAudioAsset>>;
|
|
258
|
+
/** Starts transcoding after the upload. Fails with `state_conflict` if the file was not received. */
|
|
259
|
+
complete(assetId: string, options?: RequestOptions): Promise<ApiResponse<VoiceAudioAsset>>;
|
|
260
|
+
/** Renders text to speech into a new asset, returned in `transcoding`. */
|
|
261
|
+
synthesize(...args: [
|
|
262
|
+
...ProjectArgument<O>,
|
|
263
|
+
input: SynthesizeVoiceAudioInput,
|
|
264
|
+
options?: RequestOptions
|
|
265
|
+
]): Promise<ApiResponse<VoiceAudioAsset>>;
|
|
266
|
+
retrieve(assetId: string, options?: RequestOptions): Promise<ApiResponse<VoiceAudioAsset>>;
|
|
267
|
+
update(assetId: string, input: UpdateVoiceAudioInput, options?: RequestOptions): Promise<ApiResponse<VoiceAudioAsset>>;
|
|
268
|
+
/** Fails with `voice_asset_in_use` while a campaign or flow uses the asset. */
|
|
269
|
+
delete(assetId: string, options?: RequestOptions): Promise<ApiResponse<VoiceResourceDeleted>>;
|
|
270
|
+
/** A 5-minute link to the transcoded audio. Fails with `asset_not_ready` before `ready`. */
|
|
271
|
+
previewUrl(assetId: string, options?: RequestOptions): Promise<ApiResponse<VoiceAudioPreview>>;
|
|
272
|
+
/**
|
|
273
|
+
* Reads the asset until it is `ready` or `failed` and returns it; check
|
|
274
|
+
* `status` and `failureReason`. Throws `PolymorfaTimeoutError` (code
|
|
275
|
+
* `request_timeout`) once `timeoutMs` has elapsed: a read still in flight
|
|
276
|
+
* at the deadline is cancelled, and a result that arrives after it is not
|
|
277
|
+
* returned. Prefer the `voice.asset_ready` and `voice.asset_failed`
|
|
278
|
+
* webhooks in production.
|
|
279
|
+
*/
|
|
280
|
+
waitUntilReady(assetId: string, wait?: WaitForVoiceAudioOptions, options?: RequestOptions): Promise<ApiResponse<VoiceAudioAsset>>;
|
|
281
|
+
}
|
|
282
|
+
/**
|
|
283
|
+
* Your own ElevenLabs or OpenAI keys for text-to-speech. A credential belongs
|
|
284
|
+
* to one project or, when created by a team key without a project, to every
|
|
285
|
+
* project of the team. The key is write-only: responses carry only its
|
|
286
|
+
* fingerprint, and the SDK never logs it or includes it in errors.
|
|
287
|
+
*/
|
|
288
|
+
export declare class VoiceProviderCredentialsResource<O extends ClientOwner> {
|
|
289
|
+
#private;
|
|
290
|
+
private readonly transport;
|
|
291
|
+
private readonly projectId;
|
|
292
|
+
/**
|
|
293
|
+
* A project client built from a team key checks a credential's project
|
|
294
|
+
* before acting on it. It can read team-wide credentials but manages only
|
|
295
|
+
* its own project's.
|
|
296
|
+
*/
|
|
297
|
+
private readonly confineById;
|
|
298
|
+
constructor(transport: HttpTransport, projectId: string | null,
|
|
299
|
+
/**
|
|
300
|
+
* A project client built from a team key checks a credential's project
|
|
301
|
+
* before acting on it. It can read team-wide credentials but manages only
|
|
302
|
+
* its own project's.
|
|
303
|
+
*/
|
|
304
|
+
confineById: boolean);
|
|
305
|
+
/** Team-wide credentials plus, when a project is named, that project's. */
|
|
306
|
+
list(...args: CredentialListArguments<O>): Promise<ApiResponse<readonly VoiceProviderCredential[]>>;
|
|
307
|
+
/** Stores and checks a provider key. Fails with `provider_credential_invalid` if the provider rejects it. */
|
|
308
|
+
create(input: CreateVoiceProviderCredentialInput<O>, options?: RequestOptions): Promise<ApiResponse<VoiceProviderCredential>>;
|
|
309
|
+
retrieve(credentialId: string, options?: RequestOptions): Promise<ApiResponse<VoiceProviderCredential>>;
|
|
310
|
+
/** Checks the stored key with the provider again and returns the updated status. */
|
|
311
|
+
verify(credentialId: string, options?: RequestOptions): Promise<ApiResponse<VoiceProviderCredential>>;
|
|
312
|
+
delete(credentialId: string, options?: RequestOptions): Promise<ApiResponse<VoiceResourceDeleted>>;
|
|
313
|
+
}
|
|
314
|
+
export {};
|
|
315
|
+
//# sourceMappingURL=voice.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"voice.d.ts","sourceRoot":"","sources":["../../src/platform/voice.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAErD,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACzE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAUxD,eAAO,MAAM,oBAAoB,2EAMvB,CAAC;AACX,MAAM,MAAM,qBAAqB,GAAG,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,CAAC,CAAC;AAC1E,MAAM,MAAM,gBAAgB,GAAG,qBAAqB,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;AAErE,eAAO,MAAM,mBAAmB,4BAA6B,CAAC;AAC9D,MAAM,MAAM,qBAAqB,GAAG,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,CAAC,CAAC;AACzE,MAAM,MAAM,gBAAgB,GAAG,qBAAqB,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;AAErE,eAAO,MAAM,2BAA2B,wHAQ9B,CAAC;AACX,MAAM,MAAM,4BAA4B,GACtC,CAAC,OAAO,2BAA2B,CAAC,CAAC,MAAM,CAAC,CAAC;AAC/C,MAAM,MAAM,uBAAuB,GACjC,4BAA4B,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;AAE/C,wCAAwC;AACxC,eAAO,MAAM,mBAAmB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