@jambonz/sdk 0.1.0 → 0.1.2
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/dist/client/index.cjs +60 -13
- package/dist/client/index.cjs.map +1 -1
- package/dist/client/index.d.cts +36 -7
- package/dist/client/index.d.ts +36 -7
- package/dist/client/index.js +59 -13
- package/dist/client/index.js.map +1 -1
- package/dist/common-BSJZX7WO.d.cts +34 -0
- package/dist/common-BSJZX7WO.d.ts +34 -0
- package/dist/index.cjs +364 -32
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +8 -7
- package/dist/index.d.ts +8 -7
- package/dist/index.js +360 -32
- package/dist/index.js.map +1 -1
- package/dist/rest-BF9HKZrA.d.ts +136 -0
- package/dist/rest-v8weIueZ.d.cts +136 -0
- package/dist/session-DHc6G_9y.d.cts +112 -0
- package/dist/session-DHc6G_9y.d.ts +112 -0
- package/dist/types/index.d.cts +4 -3
- package/dist/types/index.d.ts +4 -3
- package/dist/{verb-builder-But-DJle.d.cts → verb-builder-Dg_IPC4I.d.ts} +35 -2
- package/dist/{verb-builder-CO_qoYxC.d.ts → verb-builder-DkHAJrk4.d.cts} +35 -2
- package/dist/{verbs-B_afNNUM.d.cts → verbs-fjJjfGEt.d.cts} +40 -14
- package/dist/{verbs-B_afNNUM.d.ts → verbs-fjJjfGEt.d.ts} +40 -14
- package/dist/webhook/index.cjs +68 -8
- package/dist/webhook/index.cjs.map +1 -1
- package/dist/webhook/index.d.cts +45 -3
- package/dist/webhook/index.d.ts +45 -3
- package/dist/webhook/index.js +68 -9
- package/dist/webhook/index.js.map +1 -1
- package/dist/websocket/index.cjs +291 -19
- package/dist/websocket/index.cjs.map +1 -1
- package/dist/websocket/index.d.cts +198 -4
- package/dist/websocket/index.d.ts +198 -4
- package/dist/websocket/index.js +290 -20
- package/dist/websocket/index.js.map +1 -1
- package/package.json +19 -6
- package/schema/callbacks/base.schema.json +29 -0
- package/schema/callbacks/call-status.schema.json +22 -0
- package/schema/callbacks/conference-status.schema.json +24 -0
- package/schema/callbacks/conference-wait.schema.json +11 -0
- package/schema/callbacks/conference.schema.json +11 -0
- package/schema/callbacks/dequeue.schema.json +19 -0
- package/schema/callbacks/dial-dtmf.schema.json +18 -0
- package/schema/callbacks/dial-hold.schema.json +22 -0
- package/schema/callbacks/dial-refer.schema.json +28 -0
- package/schema/callbacks/dial.schema.json +31 -0
- package/schema/callbacks/enqueue-wait.schema.json +17 -0
- package/schema/callbacks/enqueue.schema.json +27 -0
- package/schema/callbacks/gather-partial.schema.json +54 -0
- package/schema/callbacks/gather.schema.json +60 -0
- package/schema/callbacks/listen.schema.json +21 -0
- package/schema/callbacks/llm.schema.json +30 -0
- package/schema/callbacks/message.schema.json +35 -0
- package/schema/callbacks/play.schema.json +36 -0
- package/schema/callbacks/session-new.schema.json +143 -0
- package/schema/callbacks/session-reconnect.schema.json +9 -0
- package/schema/callbacks/session-redirect.schema.json +38 -0
- package/schema/callbacks/sip-refer-event.schema.json +20 -0
- package/schema/callbacks/sip-refer.schema.json +22 -0
- package/schema/callbacks/sip-request.schema.json +27 -0
- package/schema/callbacks/transcribe-translation.schema.json +24 -0
- package/schema/callbacks/transcribe.schema.json +46 -0
- package/schema/callbacks/verb-status.schema.json +57 -0
- package/schema/components/actionHook.schema.json +36 -0
- package/schema/components/actionHookDelayAction.schema.json +37 -0
- package/schema/components/amd.schema.json +68 -0
- package/schema/components/auth.schema.json +18 -0
- package/schema/components/bidirectionalAudio.schema.json +22 -0
- package/schema/components/fillerNoise.schema.json +25 -0
- package/schema/components/recognizer-assemblyAiOptions.schema.json +35 -0
- package/schema/components/recognizer-awsOptions.schema.json +52 -0
- package/schema/components/recognizer-azureOptions.schema.json +32 -0
- package/schema/components/recognizer-cobaltOptions.schema.json +34 -0
- package/schema/components/recognizer-customOptions.schema.json +27 -0
- package/schema/components/recognizer-deepgramOptions.schema.json +147 -0
- package/schema/components/recognizer-elevenlabsOptions.schema.json +39 -0
- package/schema/components/recognizer-gladiaOptions.schema.json +8 -0
- package/schema/components/recognizer-googleOptions.schema.json +35 -0
- package/schema/components/recognizer-houndifyOptions.schema.json +53 -0
- package/schema/components/recognizer-ibmOptions.schema.json +54 -0
- package/schema/components/recognizer-nuanceOptions.schema.json +150 -0
- package/schema/components/recognizer-nvidiaOptions.schema.json +39 -0
- package/schema/components/recognizer-openaiOptions.schema.json +59 -0
- package/schema/components/recognizer-sonioxOptions.schema.json +46 -0
- package/schema/components/recognizer-speechmaticsOptions.schema.json +91 -0
- package/schema/components/recognizer-verbioOptions.schema.json +46 -0
- package/schema/components/recognizer.schema.json +212 -0
- package/schema/components/synthesizer.schema.json +82 -0
- package/schema/components/target.schema.json +105 -0
- package/schema/components/vad.schema.json +48 -0
- package/schema/jambonz-app.schema.json +106 -0
- package/schema/verbs/alert.schema.json +20 -0
- package/schema/verbs/answer.schema.json +12 -0
- package/schema/verbs/conference.schema.json +43 -0
- package/schema/verbs/config.schema.json +170 -0
- package/schema/verbs/dequeue.schema.json +36 -0
- package/schema/verbs/dial.schema.json +153 -0
- package/schema/verbs/dtmf.schema.json +27 -0
- package/schema/verbs/dub.schema.json +52 -0
- package/schema/verbs/enqueue.schema.json +38 -0
- package/schema/verbs/gather.schema.json +145 -0
- package/schema/verbs/hangup.schema.json +29 -0
- package/schema/verbs/leave.schema.json +12 -0
- package/schema/verbs/listen.schema.json +109 -0
- package/schema/verbs/llm.schema.json +131 -0
- package/schema/verbs/message.schema.json +30 -0
- package/schema/verbs/pause.schema.json +26 -0
- package/schema/verbs/pipeline.schema.json +61 -0
- package/schema/verbs/play.schema.json +69 -0
- package/schema/verbs/redirect.schema.json +23 -0
- package/schema/verbs/say.schema.json +84 -0
- package/schema/verbs/sip-decline.schema.json +31 -0
- package/schema/verbs/sip-refer.schema.json +41 -0
- package/schema/verbs/sip-request.schema.json +33 -0
- package/schema/verbs/stream.schema.json +30 -0
- package/schema/verbs/tag.schema.json +21 -0
- package/schema/verbs/transcribe.schema.json +48 -0
- package/dist/common-Bsqv1Brz.d.cts +0 -69
- package/dist/common-Bsqv1Brz.d.ts +0 -69
- package/dist/rest-BV_FsqnH.d.cts +0 -97
- package/dist/rest-CthGXHnw.d.ts +0 -97
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://jambonz.org/schema/verbs/stream",
|
|
4
|
+
"title": "Stream",
|
|
5
|
+
"description": "Streams real-time call audio to an external websocket endpoint. Functionally equivalent to 'listen' — this is an alias provided for naming clarity when the intent is audio streaming rather than recording.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"verb": { "const": "stream" },
|
|
9
|
+
"id": { "type": "string", "description": "An optional unique identifier for this verb instance." },
|
|
10
|
+
"url": { "type": "string", "format": "uri", "description": "The websocket URL to stream audio to." },
|
|
11
|
+
"actionHook": { "$ref": "../components/actionHook", "description": "A webhook invoked when the stream ends." },
|
|
12
|
+
"wsAuth": { "$ref": "../components/auth", "description": "Authentication credentials for the websocket connection." },
|
|
13
|
+
"mixType": { "type": "string", "enum": ["mono", "stereo", "mixed"], "description": "How to mix audio channels." },
|
|
14
|
+
"metadata": { "type": "object", "description": "Metadata to send with the initial connection.", "additionalProperties": true },
|
|
15
|
+
"sampleRate": { "type": "number", "description": "Audio sample rate in Hz.", "examples": [8000, 16000] },
|
|
16
|
+
"finishOnKey": { "type": "string", "description": "DTMF key that ends the stream." },
|
|
17
|
+
"maxLength": { "type": "number", "description": "Maximum duration in seconds." },
|
|
18
|
+
"passDtmf": { "type": "boolean", "description": "Forward DTMF events to the websocket." },
|
|
19
|
+
"playBeep": { "type": "boolean", "description": "Play a beep before streaming begins." },
|
|
20
|
+
"disableBidirectionalAudio": { "type": "boolean", "description": "Disable receiving audio from the websocket." },
|
|
21
|
+
"bidirectionalAudio": { "$ref": "../components/bidirectionalAudio", "description": "Bidirectional audio configuration." },
|
|
22
|
+
"timeout": { "type": "number", "description": "Inactivity timeout in seconds." },
|
|
23
|
+
"transcribe": { "$ref": "transcribe", "description": "Nested transcribe verb — enables simultaneous real-time transcription of the streamed audio." },
|
|
24
|
+
"earlyMedia": { "type": "boolean", "description": "Stream audio before the call is answered." }
|
|
25
|
+
},
|
|
26
|
+
"required": ["url"],
|
|
27
|
+
"examples": [
|
|
28
|
+
{ "verb": "stream", "url": "wss://myapp.example.com/audio", "sampleRate": 16000, "mixType": "stereo" }
|
|
29
|
+
]
|
|
30
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://jambonz.org/schema/verbs/tag",
|
|
4
|
+
"title": "Tag",
|
|
5
|
+
"description": "Attaches arbitrary metadata to the current call. Tagged data is included in all subsequent webhook requests and in the call detail record (CDR). Useful for tracking business context, routing decisions, or analytics data through the call lifecycle.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"verb": { "const": "tag" },
|
|
9
|
+
"id": { "type": "string", "description": "An optional unique identifier for this verb instance." },
|
|
10
|
+
"data": {
|
|
11
|
+
"type": "object",
|
|
12
|
+
"description": "An object containing the metadata to attach to the call. Keys and values are application-defined.",
|
|
13
|
+
"additionalProperties": true,
|
|
14
|
+
"examples": [{ "customerId": "12345", "department": "support", "priority": "high" }]
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"required": ["data"],
|
|
18
|
+
"examples": [
|
|
19
|
+
{ "verb": "tag", "data": { "customerId": "12345", "intent": "billing-inquiry" } }
|
|
20
|
+
]
|
|
21
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://jambonz.org/schema/verbs/transcribe",
|
|
4
|
+
"title": "Transcribe",
|
|
5
|
+
"description": "Enables real-time transcription of the call audio. Transcription results are sent to the transcriptionHook as they are produced. Runs as a background process — subsequent verbs execute immediately while transcription continues.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"verb": { "const": "transcribe" },
|
|
9
|
+
"id": { "type": "string", "description": "An optional unique identifier for this verb instance." },
|
|
10
|
+
"enable": {
|
|
11
|
+
"type": "boolean",
|
|
12
|
+
"description": "Enable or disable transcription. Used when transcribe is nested inside a config or dial verb to start or stop background transcription."
|
|
13
|
+
},
|
|
14
|
+
"transcriptionHook": {
|
|
15
|
+
"type": "string",
|
|
16
|
+
"format": "uri",
|
|
17
|
+
"description": "The webhook URL to receive transcription results."
|
|
18
|
+
},
|
|
19
|
+
"translationHook": {
|
|
20
|
+
"type": "string",
|
|
21
|
+
"format": "uri",
|
|
22
|
+
"description": "The webhook URL to receive translated transcription results."
|
|
23
|
+
},
|
|
24
|
+
"recognizer": {
|
|
25
|
+
"$ref": "../components/recognizer",
|
|
26
|
+
"description": "STT configuration for the transcription."
|
|
27
|
+
},
|
|
28
|
+
"earlyMedia": {
|
|
29
|
+
"type": "boolean",
|
|
30
|
+
"description": "If true, begin transcribing before the call is answered."
|
|
31
|
+
},
|
|
32
|
+
"channel": {
|
|
33
|
+
"type": "number",
|
|
34
|
+
"description": "Specific audio channel to transcribe."
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
"examples": [
|
|
38
|
+
{
|
|
39
|
+
"verb": "transcribe",
|
|
40
|
+
"transcriptionHook": "https://myapp.example.com/transcription",
|
|
41
|
+
"recognizer": {
|
|
42
|
+
"vendor": "deepgram",
|
|
43
|
+
"language": "en-US",
|
|
44
|
+
"deepgramOptions": { "model": "nova-2", "smartFormatting": true }
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
]
|
|
48
|
+
}
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Types for call session data received from jambonz.
|
|
3
|
-
*/
|
|
4
|
-
/** Call session data provided in webhook requests and WebSocket session:new messages. */
|
|
5
|
-
interface CallSession {
|
|
6
|
-
/** Unique call identifier. */
|
|
7
|
-
call_sid: string;
|
|
8
|
-
/** Account identifier. */
|
|
9
|
-
account_sid: string;
|
|
10
|
-
/** Application identifier. */
|
|
11
|
-
application_sid: string;
|
|
12
|
-
/** Call direction. */
|
|
13
|
-
direction: 'inbound' | 'outbound';
|
|
14
|
-
/** Caller phone number or SIP URI. */
|
|
15
|
-
from: string;
|
|
16
|
-
/** Called phone number or SIP URI. */
|
|
17
|
-
to: string;
|
|
18
|
-
/** SIP Call-ID header. */
|
|
19
|
-
call_id: string;
|
|
20
|
-
/** SIP response status code. */
|
|
21
|
-
sip_status: number;
|
|
22
|
-
/** Caller display name. */
|
|
23
|
-
caller_name?: string;
|
|
24
|
-
/** Call status. */
|
|
25
|
-
call_status?: string;
|
|
26
|
-
/** SIP trunk name. */
|
|
27
|
-
trunk?: string;
|
|
28
|
-
/** Service provider SID. */
|
|
29
|
-
service_provider_sid?: string;
|
|
30
|
-
/** Distributed tracing ID. */
|
|
31
|
-
trace_id?: string;
|
|
32
|
-
/** Custom SIP headers from the INVITE. */
|
|
33
|
-
sip_headers?: Record<string, string>;
|
|
34
|
-
/** Additional properties. */
|
|
35
|
-
[key: string]: unknown;
|
|
36
|
-
}
|
|
37
|
-
/** WebSocket message types received from jambonz. */
|
|
38
|
-
type WsMessageType = 'session:new' | 'session:adulting' | 'session:reconnect' | 'session:redirect' | 'verb:hook' | 'dial:confirm' | 'call:status' | 'verb:status' | 'llm:event' | 'llm:tool-call' | 'tts:streaming-event' | 'tts:tokens-result' | 'jambonz:error';
|
|
39
|
-
/** Inbound WebSocket message from jambonz. */
|
|
40
|
-
interface WsMessage {
|
|
41
|
-
type: WsMessageType;
|
|
42
|
-
msgid: string;
|
|
43
|
-
call_sid?: string;
|
|
44
|
-
hook?: string;
|
|
45
|
-
data?: Record<string, unknown>;
|
|
46
|
-
b3?: string;
|
|
47
|
-
}
|
|
48
|
-
/** Outbound WebSocket message to jambonz. */
|
|
49
|
-
interface WsResponse {
|
|
50
|
-
type: 'ack' | 'command';
|
|
51
|
-
msgid?: string;
|
|
52
|
-
command?: string;
|
|
53
|
-
queueCommand?: boolean;
|
|
54
|
-
data?: unknown;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
/**
|
|
58
|
-
* Common types and re-exports.
|
|
59
|
-
*/
|
|
60
|
-
|
|
61
|
-
/** Logger interface expected by SDK components. */
|
|
62
|
-
interface Logger {
|
|
63
|
-
info: (...args: unknown[]) => void;
|
|
64
|
-
error: (...args: unknown[]) => void;
|
|
65
|
-
debug: (...args: unknown[]) => void;
|
|
66
|
-
child?: (bindings: Record<string, unknown>) => Logger;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
export type { CallSession as C, Logger as L, WsMessage as W, WsMessageType as a, WsResponse as b };
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Types for call session data received from jambonz.
|
|
3
|
-
*/
|
|
4
|
-
/** Call session data provided in webhook requests and WebSocket session:new messages. */
|
|
5
|
-
interface CallSession {
|
|
6
|
-
/** Unique call identifier. */
|
|
7
|
-
call_sid: string;
|
|
8
|
-
/** Account identifier. */
|
|
9
|
-
account_sid: string;
|
|
10
|
-
/** Application identifier. */
|
|
11
|
-
application_sid: string;
|
|
12
|
-
/** Call direction. */
|
|
13
|
-
direction: 'inbound' | 'outbound';
|
|
14
|
-
/** Caller phone number or SIP URI. */
|
|
15
|
-
from: string;
|
|
16
|
-
/** Called phone number or SIP URI. */
|
|
17
|
-
to: string;
|
|
18
|
-
/** SIP Call-ID header. */
|
|
19
|
-
call_id: string;
|
|
20
|
-
/** SIP response status code. */
|
|
21
|
-
sip_status: number;
|
|
22
|
-
/** Caller display name. */
|
|
23
|
-
caller_name?: string;
|
|
24
|
-
/** Call status. */
|
|
25
|
-
call_status?: string;
|
|
26
|
-
/** SIP trunk name. */
|
|
27
|
-
trunk?: string;
|
|
28
|
-
/** Service provider SID. */
|
|
29
|
-
service_provider_sid?: string;
|
|
30
|
-
/** Distributed tracing ID. */
|
|
31
|
-
trace_id?: string;
|
|
32
|
-
/** Custom SIP headers from the INVITE. */
|
|
33
|
-
sip_headers?: Record<string, string>;
|
|
34
|
-
/** Additional properties. */
|
|
35
|
-
[key: string]: unknown;
|
|
36
|
-
}
|
|
37
|
-
/** WebSocket message types received from jambonz. */
|
|
38
|
-
type WsMessageType = 'session:new' | 'session:adulting' | 'session:reconnect' | 'session:redirect' | 'verb:hook' | 'dial:confirm' | 'call:status' | 'verb:status' | 'llm:event' | 'llm:tool-call' | 'tts:streaming-event' | 'tts:tokens-result' | 'jambonz:error';
|
|
39
|
-
/** Inbound WebSocket message from jambonz. */
|
|
40
|
-
interface WsMessage {
|
|
41
|
-
type: WsMessageType;
|
|
42
|
-
msgid: string;
|
|
43
|
-
call_sid?: string;
|
|
44
|
-
hook?: string;
|
|
45
|
-
data?: Record<string, unknown>;
|
|
46
|
-
b3?: string;
|
|
47
|
-
}
|
|
48
|
-
/** Outbound WebSocket message to jambonz. */
|
|
49
|
-
interface WsResponse {
|
|
50
|
-
type: 'ack' | 'command';
|
|
51
|
-
msgid?: string;
|
|
52
|
-
command?: string;
|
|
53
|
-
queueCommand?: boolean;
|
|
54
|
-
data?: unknown;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
/**
|
|
58
|
-
* Common types and re-exports.
|
|
59
|
-
*/
|
|
60
|
-
|
|
61
|
-
/** Logger interface expected by SDK components. */
|
|
62
|
-
interface Logger {
|
|
63
|
-
info: (...args: unknown[]) => void;
|
|
64
|
-
error: (...args: unknown[]) => void;
|
|
65
|
-
debug: (...args: unknown[]) => void;
|
|
66
|
-
child?: (bindings: Record<string, unknown>) => Logger;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
export type { CallSession as C, Logger as L, WsMessage as W, WsMessageType as a, WsResponse as b };
|
package/dist/rest-BV_FsqnH.d.cts
DELETED
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
import { A as ActionHook, w as Verb } from './verbs-B_afNNUM.cjs';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Types for the jambonz REST API client.
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
interface CreateCallRequest {
|
|
8
|
-
/** Application SID to handle the call. */
|
|
9
|
-
application_sid?: string;
|
|
10
|
-
/** Webhook URL for the call. */
|
|
11
|
-
call_hook?: ActionHook;
|
|
12
|
-
/** Status callback URL. */
|
|
13
|
-
call_status_hook?: ActionHook;
|
|
14
|
-
/** Caller ID. */
|
|
15
|
-
from: string;
|
|
16
|
-
/** Destination number or SIP URI. */
|
|
17
|
-
to: {
|
|
18
|
-
type: 'phone' | 'sip' | 'user' | 'teams';
|
|
19
|
-
number?: string;
|
|
20
|
-
sipUri?: string;
|
|
21
|
-
name?: string;
|
|
22
|
-
tenant?: string;
|
|
23
|
-
};
|
|
24
|
-
/** SIP trunk to use. */
|
|
25
|
-
trunk?: string;
|
|
26
|
-
/** Custom SIP headers. */
|
|
27
|
-
headers?: Record<string, string>;
|
|
28
|
-
/** Tag metadata. */
|
|
29
|
-
tag?: Record<string, unknown>;
|
|
30
|
-
/** Max call duration in seconds. */
|
|
31
|
-
timeout?: number;
|
|
32
|
-
}
|
|
33
|
-
interface UpdateCallRequest {
|
|
34
|
-
/** Redirect execution to a new webhook URL. */
|
|
35
|
-
call_hook?: ActionHook;
|
|
36
|
-
/** Redirect child call to a new webhook URL. */
|
|
37
|
-
child_call_hook?: ActionHook;
|
|
38
|
-
/** Status callback URL. */
|
|
39
|
-
call_status_hook?: ActionHook;
|
|
40
|
-
/** End the call. */
|
|
41
|
-
call_status?: 'completed' | 'no-answer';
|
|
42
|
-
/** Inject a verb (say/play) to one party on the call. */
|
|
43
|
-
whisper?: Verb;
|
|
44
|
-
/** Inject a dub track. */
|
|
45
|
-
dub?: Verb;
|
|
46
|
-
/** Mute/unmute the call. */
|
|
47
|
-
mute_status?: 'mute' | 'unmute';
|
|
48
|
-
/** Mute/unmute in conference. */
|
|
49
|
-
conf_mute_status?: 'mute' | 'unmute';
|
|
50
|
-
/** Hold/unhold in conference. */
|
|
51
|
-
conf_hold_status?: 'hold' | 'unhold';
|
|
52
|
-
/** Pause/resume audio streaming. */
|
|
53
|
-
listen_status?: 'pause' | 'resume';
|
|
54
|
-
/** Send a SIP request within the dialog. */
|
|
55
|
-
sip_request?: {
|
|
56
|
-
method: string;
|
|
57
|
-
body?: string;
|
|
58
|
-
headers?: Record<string, string>;
|
|
59
|
-
};
|
|
60
|
-
/** Control media path. */
|
|
61
|
-
media_path?: 'no-media' | 'partial-media' | 'full-media';
|
|
62
|
-
/** Tag metadata. */
|
|
63
|
-
tag?: Record<string, unknown>;
|
|
64
|
-
}
|
|
65
|
-
interface CallInfo {
|
|
66
|
-
call_sid: string;
|
|
67
|
-
account_sid: string;
|
|
68
|
-
application_sid: string;
|
|
69
|
-
call_id: string;
|
|
70
|
-
call_status: string;
|
|
71
|
-
direction: string;
|
|
72
|
-
from: string;
|
|
73
|
-
to: string;
|
|
74
|
-
duration: number;
|
|
75
|
-
trunk?: string;
|
|
76
|
-
[key: string]: unknown;
|
|
77
|
-
}
|
|
78
|
-
interface SendMessageRequest {
|
|
79
|
-
/** Sender phone number. */
|
|
80
|
-
from: string;
|
|
81
|
-
/** Destination phone number. */
|
|
82
|
-
to: string;
|
|
83
|
-
/** Message text. */
|
|
84
|
-
text?: string;
|
|
85
|
-
/** Media URLs for MMS. */
|
|
86
|
-
media?: string | string[];
|
|
87
|
-
/** Messaging carrier. */
|
|
88
|
-
carrier?: string;
|
|
89
|
-
/** Tag metadata. */
|
|
90
|
-
tag?: Record<string, unknown>;
|
|
91
|
-
}
|
|
92
|
-
interface MessageInfo {
|
|
93
|
-
message_sid: string;
|
|
94
|
-
[key: string]: unknown;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
export type { CallInfo as C, MessageInfo as M, SendMessageRequest as S, UpdateCallRequest as U, CreateCallRequest as a };
|
package/dist/rest-CthGXHnw.d.ts
DELETED
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
import { A as ActionHook, w as Verb } from './verbs-B_afNNUM.js';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Types for the jambonz REST API client.
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
interface CreateCallRequest {
|
|
8
|
-
/** Application SID to handle the call. */
|
|
9
|
-
application_sid?: string;
|
|
10
|
-
/** Webhook URL for the call. */
|
|
11
|
-
call_hook?: ActionHook;
|
|
12
|
-
/** Status callback URL. */
|
|
13
|
-
call_status_hook?: ActionHook;
|
|
14
|
-
/** Caller ID. */
|
|
15
|
-
from: string;
|
|
16
|
-
/** Destination number or SIP URI. */
|
|
17
|
-
to: {
|
|
18
|
-
type: 'phone' | 'sip' | 'user' | 'teams';
|
|
19
|
-
number?: string;
|
|
20
|
-
sipUri?: string;
|
|
21
|
-
name?: string;
|
|
22
|
-
tenant?: string;
|
|
23
|
-
};
|
|
24
|
-
/** SIP trunk to use. */
|
|
25
|
-
trunk?: string;
|
|
26
|
-
/** Custom SIP headers. */
|
|
27
|
-
headers?: Record<string, string>;
|
|
28
|
-
/** Tag metadata. */
|
|
29
|
-
tag?: Record<string, unknown>;
|
|
30
|
-
/** Max call duration in seconds. */
|
|
31
|
-
timeout?: number;
|
|
32
|
-
}
|
|
33
|
-
interface UpdateCallRequest {
|
|
34
|
-
/** Redirect execution to a new webhook URL. */
|
|
35
|
-
call_hook?: ActionHook;
|
|
36
|
-
/** Redirect child call to a new webhook URL. */
|
|
37
|
-
child_call_hook?: ActionHook;
|
|
38
|
-
/** Status callback URL. */
|
|
39
|
-
call_status_hook?: ActionHook;
|
|
40
|
-
/** End the call. */
|
|
41
|
-
call_status?: 'completed' | 'no-answer';
|
|
42
|
-
/** Inject a verb (say/play) to one party on the call. */
|
|
43
|
-
whisper?: Verb;
|
|
44
|
-
/** Inject a dub track. */
|
|
45
|
-
dub?: Verb;
|
|
46
|
-
/** Mute/unmute the call. */
|
|
47
|
-
mute_status?: 'mute' | 'unmute';
|
|
48
|
-
/** Mute/unmute in conference. */
|
|
49
|
-
conf_mute_status?: 'mute' | 'unmute';
|
|
50
|
-
/** Hold/unhold in conference. */
|
|
51
|
-
conf_hold_status?: 'hold' | 'unhold';
|
|
52
|
-
/** Pause/resume audio streaming. */
|
|
53
|
-
listen_status?: 'pause' | 'resume';
|
|
54
|
-
/** Send a SIP request within the dialog. */
|
|
55
|
-
sip_request?: {
|
|
56
|
-
method: string;
|
|
57
|
-
body?: string;
|
|
58
|
-
headers?: Record<string, string>;
|
|
59
|
-
};
|
|
60
|
-
/** Control media path. */
|
|
61
|
-
media_path?: 'no-media' | 'partial-media' | 'full-media';
|
|
62
|
-
/** Tag metadata. */
|
|
63
|
-
tag?: Record<string, unknown>;
|
|
64
|
-
}
|
|
65
|
-
interface CallInfo {
|
|
66
|
-
call_sid: string;
|
|
67
|
-
account_sid: string;
|
|
68
|
-
application_sid: string;
|
|
69
|
-
call_id: string;
|
|
70
|
-
call_status: string;
|
|
71
|
-
direction: string;
|
|
72
|
-
from: string;
|
|
73
|
-
to: string;
|
|
74
|
-
duration: number;
|
|
75
|
-
trunk?: string;
|
|
76
|
-
[key: string]: unknown;
|
|
77
|
-
}
|
|
78
|
-
interface SendMessageRequest {
|
|
79
|
-
/** Sender phone number. */
|
|
80
|
-
from: string;
|
|
81
|
-
/** Destination phone number. */
|
|
82
|
-
to: string;
|
|
83
|
-
/** Message text. */
|
|
84
|
-
text?: string;
|
|
85
|
-
/** Media URLs for MMS. */
|
|
86
|
-
media?: string | string[];
|
|
87
|
-
/** Messaging carrier. */
|
|
88
|
-
carrier?: string;
|
|
89
|
-
/** Tag metadata. */
|
|
90
|
-
tag?: Record<string, unknown>;
|
|
91
|
-
}
|
|
92
|
-
interface MessageInfo {
|
|
93
|
-
message_sid: string;
|
|
94
|
-
[key: string]: unknown;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
export type { CallInfo as C, MessageInfo as M, SendMessageRequest as S, UpdateCallRequest as U, CreateCallRequest as a };
|