@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.
Files changed (122) hide show
  1. package/dist/client/index.cjs +60 -13
  2. package/dist/client/index.cjs.map +1 -1
  3. package/dist/client/index.d.cts +36 -7
  4. package/dist/client/index.d.ts +36 -7
  5. package/dist/client/index.js +59 -13
  6. package/dist/client/index.js.map +1 -1
  7. package/dist/common-BSJZX7WO.d.cts +34 -0
  8. package/dist/common-BSJZX7WO.d.ts +34 -0
  9. package/dist/index.cjs +364 -32
  10. package/dist/index.cjs.map +1 -1
  11. package/dist/index.d.cts +8 -7
  12. package/dist/index.d.ts +8 -7
  13. package/dist/index.js +360 -32
  14. package/dist/index.js.map +1 -1
  15. package/dist/rest-BF9HKZrA.d.ts +136 -0
  16. package/dist/rest-v8weIueZ.d.cts +136 -0
  17. package/dist/session-DHc6G_9y.d.cts +112 -0
  18. package/dist/session-DHc6G_9y.d.ts +112 -0
  19. package/dist/types/index.d.cts +4 -3
  20. package/dist/types/index.d.ts +4 -3
  21. package/dist/{verb-builder-But-DJle.d.cts → verb-builder-Dg_IPC4I.d.ts} +35 -2
  22. package/dist/{verb-builder-CO_qoYxC.d.ts → verb-builder-DkHAJrk4.d.cts} +35 -2
  23. package/dist/{verbs-B_afNNUM.d.cts → verbs-fjJjfGEt.d.cts} +40 -14
  24. package/dist/{verbs-B_afNNUM.d.ts → verbs-fjJjfGEt.d.ts} +40 -14
  25. package/dist/webhook/index.cjs +68 -8
  26. package/dist/webhook/index.cjs.map +1 -1
  27. package/dist/webhook/index.d.cts +45 -3
  28. package/dist/webhook/index.d.ts +45 -3
  29. package/dist/webhook/index.js +68 -9
  30. package/dist/webhook/index.js.map +1 -1
  31. package/dist/websocket/index.cjs +291 -19
  32. package/dist/websocket/index.cjs.map +1 -1
  33. package/dist/websocket/index.d.cts +198 -4
  34. package/dist/websocket/index.d.ts +198 -4
  35. package/dist/websocket/index.js +290 -20
  36. package/dist/websocket/index.js.map +1 -1
  37. package/package.json +19 -6
  38. package/schema/callbacks/base.schema.json +29 -0
  39. package/schema/callbacks/call-status.schema.json +22 -0
  40. package/schema/callbacks/conference-status.schema.json +24 -0
  41. package/schema/callbacks/conference-wait.schema.json +11 -0
  42. package/schema/callbacks/conference.schema.json +11 -0
  43. package/schema/callbacks/dequeue.schema.json +19 -0
  44. package/schema/callbacks/dial-dtmf.schema.json +18 -0
  45. package/schema/callbacks/dial-hold.schema.json +22 -0
  46. package/schema/callbacks/dial-refer.schema.json +28 -0
  47. package/schema/callbacks/dial.schema.json +31 -0
  48. package/schema/callbacks/enqueue-wait.schema.json +17 -0
  49. package/schema/callbacks/enqueue.schema.json +27 -0
  50. package/schema/callbacks/gather-partial.schema.json +54 -0
  51. package/schema/callbacks/gather.schema.json +60 -0
  52. package/schema/callbacks/listen.schema.json +21 -0
  53. package/schema/callbacks/llm.schema.json +30 -0
  54. package/schema/callbacks/message.schema.json +35 -0
  55. package/schema/callbacks/play.schema.json +36 -0
  56. package/schema/callbacks/session-new.schema.json +143 -0
  57. package/schema/callbacks/session-reconnect.schema.json +9 -0
  58. package/schema/callbacks/session-redirect.schema.json +38 -0
  59. package/schema/callbacks/sip-refer-event.schema.json +20 -0
  60. package/schema/callbacks/sip-refer.schema.json +22 -0
  61. package/schema/callbacks/sip-request.schema.json +27 -0
  62. package/schema/callbacks/transcribe-translation.schema.json +24 -0
  63. package/schema/callbacks/transcribe.schema.json +46 -0
  64. package/schema/callbacks/verb-status.schema.json +57 -0
  65. package/schema/components/actionHook.schema.json +36 -0
  66. package/schema/components/actionHookDelayAction.schema.json +37 -0
  67. package/schema/components/amd.schema.json +68 -0
  68. package/schema/components/auth.schema.json +18 -0
  69. package/schema/components/bidirectionalAudio.schema.json +22 -0
  70. package/schema/components/fillerNoise.schema.json +25 -0
  71. package/schema/components/recognizer-assemblyAiOptions.schema.json +35 -0
  72. package/schema/components/recognizer-awsOptions.schema.json +52 -0
  73. package/schema/components/recognizer-azureOptions.schema.json +32 -0
  74. package/schema/components/recognizer-cobaltOptions.schema.json +34 -0
  75. package/schema/components/recognizer-customOptions.schema.json +27 -0
  76. package/schema/components/recognizer-deepgramOptions.schema.json +147 -0
  77. package/schema/components/recognizer-elevenlabsOptions.schema.json +39 -0
  78. package/schema/components/recognizer-gladiaOptions.schema.json +8 -0
  79. package/schema/components/recognizer-googleOptions.schema.json +35 -0
  80. package/schema/components/recognizer-houndifyOptions.schema.json +53 -0
  81. package/schema/components/recognizer-ibmOptions.schema.json +54 -0
  82. package/schema/components/recognizer-nuanceOptions.schema.json +150 -0
  83. package/schema/components/recognizer-nvidiaOptions.schema.json +39 -0
  84. package/schema/components/recognizer-openaiOptions.schema.json +59 -0
  85. package/schema/components/recognizer-sonioxOptions.schema.json +46 -0
  86. package/schema/components/recognizer-speechmaticsOptions.schema.json +91 -0
  87. package/schema/components/recognizer-verbioOptions.schema.json +46 -0
  88. package/schema/components/recognizer.schema.json +212 -0
  89. package/schema/components/synthesizer.schema.json +82 -0
  90. package/schema/components/target.schema.json +105 -0
  91. package/schema/components/vad.schema.json +48 -0
  92. package/schema/jambonz-app.schema.json +106 -0
  93. package/schema/verbs/alert.schema.json +20 -0
  94. package/schema/verbs/answer.schema.json +12 -0
  95. package/schema/verbs/conference.schema.json +43 -0
  96. package/schema/verbs/config.schema.json +170 -0
  97. package/schema/verbs/dequeue.schema.json +36 -0
  98. package/schema/verbs/dial.schema.json +153 -0
  99. package/schema/verbs/dtmf.schema.json +27 -0
  100. package/schema/verbs/dub.schema.json +52 -0
  101. package/schema/verbs/enqueue.schema.json +38 -0
  102. package/schema/verbs/gather.schema.json +145 -0
  103. package/schema/verbs/hangup.schema.json +29 -0
  104. package/schema/verbs/leave.schema.json +12 -0
  105. package/schema/verbs/listen.schema.json +109 -0
  106. package/schema/verbs/llm.schema.json +131 -0
  107. package/schema/verbs/message.schema.json +30 -0
  108. package/schema/verbs/pause.schema.json +26 -0
  109. package/schema/verbs/pipeline.schema.json +61 -0
  110. package/schema/verbs/play.schema.json +69 -0
  111. package/schema/verbs/redirect.schema.json +23 -0
  112. package/schema/verbs/say.schema.json +84 -0
  113. package/schema/verbs/sip-decline.schema.json +31 -0
  114. package/schema/verbs/sip-refer.schema.json +41 -0
  115. package/schema/verbs/sip-request.schema.json +33 -0
  116. package/schema/verbs/stream.schema.json +30 -0
  117. package/schema/verbs/tag.schema.json +21 -0
  118. package/schema/verbs/transcribe.schema.json +48 -0
  119. package/dist/common-Bsqv1Brz.d.cts +0 -69
  120. package/dist/common-Bsqv1Brz.d.ts +0 -69
  121. package/dist/rest-BV_FsqnH.d.cts +0 -97
  122. package/dist/rest-CthGXHnw.d.ts +0 -97
@@ -0,0 +1,136 @@
1
+ import { A as ActionHook, y as Verb } from './verbs-fjJjfGEt.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
+ /** Ring until outbound call answers before sending 200 OK. */
25
+ answerOnBridge?: boolean;
26
+ /** SIP trunk to use. */
27
+ trunk?: string;
28
+ /** Hostname for SIP From header. */
29
+ fromHost?: string;
30
+ /** Custom SIP headers. */
31
+ headers?: Record<string, string>;
32
+ /** Tag metadata. */
33
+ tag?: Record<string, unknown>;
34
+ /** Seconds to wait for answer (default: 60). */
35
+ timeout?: number;
36
+ /** Maximum call duration in seconds. */
37
+ timeLimit?: number;
38
+ /** Webhook for SIP requests within the dialog. */
39
+ sipRequestWithinDialogHook?: ActionHook;
40
+ /** TTS vendor (required when not using application_sid). */
41
+ speech_synthesis_vendor?: string;
42
+ /** TTS language. */
43
+ speech_synthesis_language?: string;
44
+ /** TTS voice. */
45
+ speech_synthesis_voice?: string;
46
+ /** STT vendor (required when not using application_sid). */
47
+ speech_recognizer_vendor?: string;
48
+ /** STT language. */
49
+ speech_recognizer_language?: string;
50
+ /** Answering machine detection settings. */
51
+ amd?: Record<string, unknown>;
52
+ }
53
+ interface UpdateCallRequest {
54
+ /** Redirect execution to a new webhook URL. */
55
+ call_hook?: ActionHook;
56
+ /** Redirect child call to a new webhook URL. */
57
+ child_call_hook?: ActionHook;
58
+ /** End the call. */
59
+ call_status?: 'completed' | 'no-answer';
60
+ /** Inject a verb (say/play) to one party on the call. */
61
+ whisper?: Verb;
62
+ /** Inject a dub track. */
63
+ dub?: Verb;
64
+ /** Mute/unmute the call. */
65
+ mute_status?: 'mute' | 'unmute';
66
+ /** Mute/unmute in conference. */
67
+ conf_mute_status?: 'mute' | 'unmute';
68
+ /** Hold/unhold in conference. */
69
+ conf_hold_status?: 'hold' | 'unhold';
70
+ /** Pause/silence/resume audio streaming. */
71
+ listen_status?: 'pause' | 'silence' | 'resume';
72
+ /** Pause/resume live transcription. */
73
+ transcribe_status?: 'pause' | 'resume';
74
+ /** Send a SIP request within the dialog. */
75
+ sip_request?: {
76
+ method: string;
77
+ content_type?: string;
78
+ content?: string;
79
+ headers?: Record<string, string>;
80
+ };
81
+ /** Control call recording. */
82
+ record?: {
83
+ action: 'startCallRecording' | 'stopCallRecording' | 'pauseCallRecording' | 'resumeCallRecording';
84
+ recordingID?: string;
85
+ siprecServerURL?: string;
86
+ };
87
+ /** Conference participant action. */
88
+ conferenceParticipantAction?: {
89
+ action: 'tag' | 'untag' | 'coach' | 'uncoach' | 'mute' | 'unmute' | 'hold' | 'unhold';
90
+ tag?: string;
91
+ };
92
+ /** Send DTMF digits. */
93
+ dtmf?: {
94
+ digit: string;
95
+ duration?: number;
96
+ };
97
+ /** Tag metadata. */
98
+ tag?: Record<string, unknown>;
99
+ }
100
+ interface ListCallsFilter {
101
+ /** Filter by call direction. */
102
+ direction?: 'inbound' | 'outbound';
103
+ /** Filter by calling number. */
104
+ from?: string;
105
+ /** Filter by called number. */
106
+ to?: string;
107
+ /** Filter by call status. */
108
+ callStatus?: 'trying' | 'ringing' | 'early-media' | 'in-progress' | 'completed' | 'failed' | 'busy' | 'no-answer' | 'queued';
109
+ }
110
+ interface CallInfo {
111
+ call_sid: string;
112
+ account_sid: string;
113
+ application_sid: string;
114
+ call_id: string;
115
+ call_status: string;
116
+ direction: string;
117
+ from: string;
118
+ to: string;
119
+ sip_status?: number;
120
+ duration: number;
121
+ caller_name?: string;
122
+ originating_sip_trunk_name?: string;
123
+ parent_call_sid?: string;
124
+ service_url?: string;
125
+ [key: string]: unknown;
126
+ }
127
+ interface CallCount {
128
+ inbound: number;
129
+ outbound: number;
130
+ }
131
+ interface QueueInfo {
132
+ name: string;
133
+ length: string;
134
+ }
135
+
136
+ export type { CallCount as C, ListCallsFilter as L, QueueInfo as Q, UpdateCallRequest as U, CallInfo as a, CreateCallRequest as b };
@@ -0,0 +1,112 @@
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
+ /** SIP reason phrase. */
23
+ sip_reason?: string;
24
+ /** Caller display name from the SIP From header. */
25
+ caller_name?: string;
26
+ /** Caller ID value (phone number or SIP user). */
27
+ caller_id?: string;
28
+ /** Call status. */
29
+ call_status?: string;
30
+ /** Name of the originating SIP trunk as configured in jambonz. */
31
+ originating_sip_trunk_name?: string;
32
+ /** IP address of the originating SIP trunk. */
33
+ originating_sip_ip?: string;
34
+ /** Service provider SID. */
35
+ service_provider_sid?: string;
36
+ /** Distributed tracing ID. */
37
+ trace_id?: string;
38
+ /** Call SID of the parent call (present for adulting / child call scenarios). */
39
+ parent_call_sid?: string;
40
+ /** jambonz REST API base URL for mid-call control. */
41
+ api_base_url?: string;
42
+ /**
43
+ * Raw SIP INVITE message (drachtio SipRequest, serialized).
44
+ * Only present for WebSocket and HTTP POST transports.
45
+ * See https://drachtio.org/api#sip-request for the full API.
46
+ */
47
+ sip?: {
48
+ /** SIP headers as key-value pairs. Custom X-* headers are included. */
49
+ headers: Record<string, string>;
50
+ /** SIP message body (typically SDP). */
51
+ body?: string;
52
+ /** SIP method (always 'INVITE' for session:new). */
53
+ method?: string;
54
+ /** Request-URI from the SIP INVITE. */
55
+ uri?: string;
56
+ /** Phone number extracted from the Request-URI. */
57
+ calledNumber?: string;
58
+ /** Calling phone number from P-Asserted-Identity or From header. */
59
+ callingNumber?: string;
60
+ /** Transport protocol (e.g. 'udp', 'tcp', 'tls'). */
61
+ protocol?: string;
62
+ /** IP address of the sender. */
63
+ source_address?: string;
64
+ /** Port of the sender. */
65
+ source_port?: string | number;
66
+ };
67
+ /** Application environment variables configured in the jambonz portal. */
68
+ env_vars?: Record<string, string>;
69
+ /** Default speech settings for the account. */
70
+ defaults?: {
71
+ synthesizer?: {
72
+ vendor?: string;
73
+ language?: string;
74
+ voice?: string;
75
+ };
76
+ recognizer?: {
77
+ vendor?: string;
78
+ language?: string;
79
+ };
80
+ };
81
+ /** Custom data attached via the REST API when creating an outbound call. */
82
+ customerData?: Record<string, unknown>;
83
+ /** Additional properties. */
84
+ [key: string]: unknown;
85
+ }
86
+ /** TTS streaming event types sent by jambonz. */
87
+ type TtsStreamingEventType = 'stream_open' | 'stream_paused' | 'stream_resumed' | 'stream_closed' | 'user_interruption';
88
+ /** Payload for tts:streaming-event messages. */
89
+ interface TtsStreamingEvent {
90
+ event_type: TtsStreamingEventType;
91
+ }
92
+ /** WebSocket message types received from jambonz. */
93
+ 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';
94
+ /** Inbound WebSocket message from jambonz. */
95
+ interface WsMessage {
96
+ type: WsMessageType;
97
+ msgid: string;
98
+ call_sid?: string;
99
+ hook?: string;
100
+ data?: Record<string, unknown>;
101
+ b3?: string;
102
+ }
103
+ /** Outbound WebSocket message to jambonz. */
104
+ interface WsResponse {
105
+ type: 'ack' | 'command';
106
+ msgid?: string;
107
+ command?: string;
108
+ queueCommand?: boolean;
109
+ data?: unknown;
110
+ }
111
+
112
+ export type { CallSession as C, TtsStreamingEvent as T, WsMessage as W, TtsStreamingEventType as a, WsMessageType as b, WsResponse as c };
@@ -0,0 +1,112 @@
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
+ /** SIP reason phrase. */
23
+ sip_reason?: string;
24
+ /** Caller display name from the SIP From header. */
25
+ caller_name?: string;
26
+ /** Caller ID value (phone number or SIP user). */
27
+ caller_id?: string;
28
+ /** Call status. */
29
+ call_status?: string;
30
+ /** Name of the originating SIP trunk as configured in jambonz. */
31
+ originating_sip_trunk_name?: string;
32
+ /** IP address of the originating SIP trunk. */
33
+ originating_sip_ip?: string;
34
+ /** Service provider SID. */
35
+ service_provider_sid?: string;
36
+ /** Distributed tracing ID. */
37
+ trace_id?: string;
38
+ /** Call SID of the parent call (present for adulting / child call scenarios). */
39
+ parent_call_sid?: string;
40
+ /** jambonz REST API base URL for mid-call control. */
41
+ api_base_url?: string;
42
+ /**
43
+ * Raw SIP INVITE message (drachtio SipRequest, serialized).
44
+ * Only present for WebSocket and HTTP POST transports.
45
+ * See https://drachtio.org/api#sip-request for the full API.
46
+ */
47
+ sip?: {
48
+ /** SIP headers as key-value pairs. Custom X-* headers are included. */
49
+ headers: Record<string, string>;
50
+ /** SIP message body (typically SDP). */
51
+ body?: string;
52
+ /** SIP method (always 'INVITE' for session:new). */
53
+ method?: string;
54
+ /** Request-URI from the SIP INVITE. */
55
+ uri?: string;
56
+ /** Phone number extracted from the Request-URI. */
57
+ calledNumber?: string;
58
+ /** Calling phone number from P-Asserted-Identity or From header. */
59
+ callingNumber?: string;
60
+ /** Transport protocol (e.g. 'udp', 'tcp', 'tls'). */
61
+ protocol?: string;
62
+ /** IP address of the sender. */
63
+ source_address?: string;
64
+ /** Port of the sender. */
65
+ source_port?: string | number;
66
+ };
67
+ /** Application environment variables configured in the jambonz portal. */
68
+ env_vars?: Record<string, string>;
69
+ /** Default speech settings for the account. */
70
+ defaults?: {
71
+ synthesizer?: {
72
+ vendor?: string;
73
+ language?: string;
74
+ voice?: string;
75
+ };
76
+ recognizer?: {
77
+ vendor?: string;
78
+ language?: string;
79
+ };
80
+ };
81
+ /** Custom data attached via the REST API when creating an outbound call. */
82
+ customerData?: Record<string, unknown>;
83
+ /** Additional properties. */
84
+ [key: string]: unknown;
85
+ }
86
+ /** TTS streaming event types sent by jambonz. */
87
+ type TtsStreamingEventType = 'stream_open' | 'stream_paused' | 'stream_resumed' | 'stream_closed' | 'user_interruption';
88
+ /** Payload for tts:streaming-event messages. */
89
+ interface TtsStreamingEvent {
90
+ event_type: TtsStreamingEventType;
91
+ }
92
+ /** WebSocket message types received from jambonz. */
93
+ 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';
94
+ /** Inbound WebSocket message from jambonz. */
95
+ interface WsMessage {
96
+ type: WsMessageType;
97
+ msgid: string;
98
+ call_sid?: string;
99
+ hook?: string;
100
+ data?: Record<string, unknown>;
101
+ b3?: string;
102
+ }
103
+ /** Outbound WebSocket message to jambonz. */
104
+ interface WsResponse {
105
+ type: 'ack' | 'command';
106
+ msgid?: string;
107
+ command?: string;
108
+ queueCommand?: boolean;
109
+ data?: unknown;
110
+ }
111
+
112
+ export type { CallSession as C, TtsStreamingEvent as T, WsMessage as W, TtsStreamingEventType as a, WsMessageType as b, WsResponse as c };
@@ -1,3 +1,4 @@
1
- export { A as ActionHook, a as ActionHookDelayAction, b as ActionHookObject, c as AlertVerb, d as AnswerVerb, e as Auth, B as BidirectionalAudio, C as ConferenceVerb, f as ConfigVerb, D as DequeueVerb, g as DialVerb, h as DtmfVerb, i as DubVerb, E as EnqueueVerb, F as FillerNoise, G as GatherVerb, H as HangupVerb, J as JambonzApp, L as LeaveVerb, j as ListenVerb, k as LlmVerb, M as McpServerConfig, l as MessageVerb, P as PauseVerb, m as PipelineVerb, n as PlayVerb, R as Recognizer, o as RedirectVerb, S as SayVerb, p as SipDeclineVerb, q as SipReferVerb, r as SipRequestVerb, s as StreamVerb, t as Synthesizer, T as TagVerb, u as Target, v as TranscribeVerb, V as Vad, w as Verb, x as VerbName } from '../verbs-B_afNNUM.cjs';
2
- export { C as CallSession, L as Logger, W as WsMessage, a as WsMessageType, b as WsResponse } from '../common-Bsqv1Brz.cjs';
3
- export { C as CallInfo, a as CreateCallRequest, M as MessageInfo, S as SendMessageRequest, U as UpdateCallRequest } from '../rest-BV_FsqnH.cjs';
1
+ export { A as ActionHook, a as ActionHookDelayAction, b as ActionHookObject, c as AlertVerb, d as Amd, e as AmdTimers, f as AnswerVerb, g as Auth, B as BidirectionalAudio, C as ConferenceVerb, h as ConfigVerb, D as DequeueVerb, i as DialVerb, j as DtmfVerb, k as DubVerb, E as EnqueueVerb, F as FillerNoise, G as GatherVerb, H as HangupVerb, J as JambonzApp, L as LeaveVerb, l as ListenVerb, m as LlmVerb, M as McpServerConfig, n as MessageVerb, P as PauseVerb, o as PipelineVerb, p as PlayVerb, R as Recognizer, q as RedirectVerb, S as SayVerb, r as SipDeclineVerb, s as SipReferVerb, t as SipRequestVerb, u as StreamVerb, v as Synthesizer, T as TagVerb, w as Target, x as TranscribeVerb, V as Vad, y as Verb, z as VerbName } from '../verbs-fjJjfGEt.cjs';
2
+ export { C as CallSession, T as TtsStreamingEvent, a as TtsStreamingEventType, W as WsMessage, b as WsMessageType, c as WsResponse } from '../session-DHc6G_9y.cjs';
3
+ export { E as EnvVarDef, a as EnvVarSchema, L as Logger } from '../common-BSJZX7WO.cjs';
4
+ export { C as CallCount, a as CallInfo, b as CreateCallRequest, L as ListCallsFilter, Q as QueueInfo, U as UpdateCallRequest } from '../rest-v8weIueZ.cjs';
@@ -1,3 +1,4 @@
1
- export { A as ActionHook, a as ActionHookDelayAction, b as ActionHookObject, c as AlertVerb, d as AnswerVerb, e as Auth, B as BidirectionalAudio, C as ConferenceVerb, f as ConfigVerb, D as DequeueVerb, g as DialVerb, h as DtmfVerb, i as DubVerb, E as EnqueueVerb, F as FillerNoise, G as GatherVerb, H as HangupVerb, J as JambonzApp, L as LeaveVerb, j as ListenVerb, k as LlmVerb, M as McpServerConfig, l as MessageVerb, P as PauseVerb, m as PipelineVerb, n as PlayVerb, R as Recognizer, o as RedirectVerb, S as SayVerb, p as SipDeclineVerb, q as SipReferVerb, r as SipRequestVerb, s as StreamVerb, t as Synthesizer, T as TagVerb, u as Target, v as TranscribeVerb, V as Vad, w as Verb, x as VerbName } from '../verbs-B_afNNUM.js';
2
- export { C as CallSession, L as Logger, W as WsMessage, a as WsMessageType, b as WsResponse } from '../common-Bsqv1Brz.js';
3
- export { C as CallInfo, a as CreateCallRequest, M as MessageInfo, S as SendMessageRequest, U as UpdateCallRequest } from '../rest-CthGXHnw.js';
1
+ export { A as ActionHook, a as ActionHookDelayAction, b as ActionHookObject, c as AlertVerb, d as Amd, e as AmdTimers, f as AnswerVerb, g as Auth, B as BidirectionalAudio, C as ConferenceVerb, h as ConfigVerb, D as DequeueVerb, i as DialVerb, j as DtmfVerb, k as DubVerb, E as EnqueueVerb, F as FillerNoise, G as GatherVerb, H as HangupVerb, J as JambonzApp, L as LeaveVerb, l as ListenVerb, m as LlmVerb, M as McpServerConfig, n as MessageVerb, P as PauseVerb, o as PipelineVerb, p as PlayVerb, R as Recognizer, q as RedirectVerb, S as SayVerb, r as SipDeclineVerb, s as SipReferVerb, t as SipRequestVerb, u as StreamVerb, v as Synthesizer, T as TagVerb, w as Target, x as TranscribeVerb, V as Vad, y as Verb, z as VerbName } from '../verbs-fjJjfGEt.js';
2
+ export { C as CallSession, T as TtsStreamingEvent, a as TtsStreamingEventType, W as WsMessage, b as WsMessageType, c as WsResponse } from '../session-DHc6G_9y.js';
3
+ export { E as EnvVarDef, a as EnvVarSchema, L as Logger } from '../common-BSJZX7WO.js';
4
+ export { C as CallCount, a as CallInfo, b as CreateCallRequest, L as ListCallsFilter, Q as QueueInfo, U as UpdateCallRequest } from '../rest-BF9HKZrA.js';
@@ -1,8 +1,8 @@
1
- import { w as Verb, S as SayVerb, n as PlayVerb, G as GatherVerb, k as LlmVerb, m as PipelineVerb, j as ListenVerb, s as StreamVerb, v as TranscribeVerb, g as DialVerb, C as ConferenceVerb, E as EnqueueVerb, D as DequeueVerb, H as HangupVerb, o as RedirectVerb, P as PauseVerb, L as LeaveVerb, p as SipDeclineVerb, r as SipRequestVerb, q as SipReferVerb, f as ConfigVerb, d as AnswerVerb, c as AlertVerb, T as TagVerb, h as DtmfVerb, i as DubVerb, l as MessageVerb } from './verbs-B_afNNUM.cjs';
1
+ import { y as Verb, S as SayVerb, p as PlayVerb, G as GatherVerb, m as LlmVerb, o as PipelineVerb, l as ListenVerb, u as StreamVerb, x as TranscribeVerb, i as DialVerb, C as ConferenceVerb, E as EnqueueVerb, D as DequeueVerb, H as HangupVerb, q as RedirectVerb, P as PauseVerb, L as LeaveVerb, r as SipDeclineVerb, t as SipRequestVerb, s as SipReferVerb, h as ConfigVerb, f as AnswerVerb, c as AlertVerb, T as TagVerb, j as DtmfVerb, k as DubVerb, n as MessageVerb } from './verbs-fjJjfGEt.js';
2
2
 
3
3
  /**
4
4
  * Schema-based validation using AJV.
5
- * Loads all 36 JSON schemas from schema/ and validates verb arrays and individual verbs.
5
+ * Loads all JSON schemas from schema/ and validates verb arrays and individual verbs.
6
6
  */
7
7
  interface ValidationResult {
8
8
  valid: boolean;
@@ -35,35 +35,68 @@ interface VerbBuilderOptions {
35
35
  /** Path to schema directory. Auto-detected if omitted. */
36
36
  schemaDir?: string;
37
37
  }
38
+ /**
39
+ * Base class for building jambonz verb arrays. Extended by {@link WebhookResponse}
40
+ * and WsSession. Provides typed verb methods and optional runtime schema validation.
41
+ */
38
42
  declare class VerbBuilder {
39
43
  protected verbs: Verb[];
40
44
  protected validator: JambonzValidator | null;
45
+ /**
46
+ * @param opts - Options for validation and schema directory.
47
+ */
41
48
  constructor(opts?: VerbBuilderOptions);
49
+ /** Speak text using TTS. Supports SSML, multiple voices, and streaming. */
42
50
  say(opts: Omit<SayVerb, 'verb'>): this;
51
+ /** Play an audio file from a URL. */
43
52
  play(opts: Omit<PlayVerb, 'verb'>): this;
53
+ /** Collect speech (STT) and/or DTMF input from the caller. */
44
54
  gather(opts: Omit<GatherVerb, 'verb'>): this;
55
+ /** Connect the caller to an LLM for real-time voice conversation. */
45
56
  llm(opts: Omit<LlmVerb, 'verb'>): this;
57
+ /** Voice AI pipeline with integrated turn detection. */
46
58
  pipeline(opts: Omit<PipelineVerb, 'verb'>): this;
59
+ /** Stream real-time call audio to a WebSocket endpoint. Supports bidirectional audio. */
47
60
  listen(opts: Omit<ListenVerb, 'verb'>): this;
61
+ /** Stream real-time call audio to a WebSocket endpoint. Synonym for {@link listen}. */
48
62
  stream(opts: Omit<StreamVerb, 'verb'>): this;
63
+ /** Real-time call transcription sent to a webhook. */
49
64
  transcribe(opts: Omit<TranscribeVerb, 'verb'>): this;
65
+ /** Place an outbound call and bridge it to the current caller. */
50
66
  dial(opts: Omit<DialVerb, 'verb'>): this;
67
+ /** Join or create a multi-party conference room. */
51
68
  conference(opts: Omit<ConferenceVerb, 'verb'>): this;
69
+ /** Place the caller into a named queue. */
52
70
  enqueue(opts: Omit<EnqueueVerb, 'verb'>): this;
71
+ /** Remove a caller from a queue and bridge them. */
53
72
  dequeue(opts: Omit<DequeueVerb, 'verb'>): this;
73
+ /** End the call. */
54
74
  hangup(opts?: Omit<HangupVerb, 'verb'>): this;
75
+ /** Transfer control to a different webhook URL. */
55
76
  redirect(opts: Omit<RedirectVerb, 'verb'>): this;
77
+ /** Wait for a specified duration before continuing. */
56
78
  pause(opts: Omit<PauseVerb, 'verb'>): this;
79
+ /** Leave a conference or queue. */
57
80
  leave(opts?: Omit<LeaveVerb, 'verb'>): this;
81
+ /** Reject an incoming call with a SIP error response. */
58
82
  sipDecline(opts: Omit<SipDeclineVerb, 'verb'>): this;
83
+ /** Send a SIP INFO or other request within the dialog. */
59
84
  sipRequest(opts: Omit<SipRequestVerb, 'verb'>): this;
85
+ /** Transfer the call via SIP REFER. */
60
86
  sipRefer(opts: Omit<SipReferVerb, 'verb'>): this;
87
+ /** Set session-level defaults (TTS vendor/voice, STT vendor, VAD, etc.). */
61
88
  config(opts: Omit<ConfigVerb, 'verb'>): this;
89
+ /** Explicitly answer the call (sends a 200 OK). */
62
90
  answer(opts?: Omit<AnswerVerb, 'verb'>): this;
91
+ /** Send a SIP 180 Ringing with optional Alert-Info header. */
63
92
  alert(opts: Omit<AlertVerb, 'verb'>): this;
93
+ /** Attach metadata to the call for tracking or routing. */
64
94
  tag(opts: Omit<TagVerb, 'verb'>): this;
95
+ /** Send DTMF tones into the call. */
65
96
  dtmf(opts: Omit<DtmfVerb, 'verb'>): this;
97
+ /** Mix an auxiliary audio track into the call. */
66
98
  dub(opts: Omit<DubVerb, 'verb'>): this;
99
+ /** Send an SMS or MMS message. */
67
100
  message(opts: Omit<MessageVerb, 'verb'>): this;
68
101
  /**
69
102
  * Add one or more verbs from raw JSON.
@@ -1,8 +1,8 @@
1
- import { w as Verb, S as SayVerb, n as PlayVerb, G as GatherVerb, k as LlmVerb, m as PipelineVerb, j as ListenVerb, s as StreamVerb, v as TranscribeVerb, g as DialVerb, C as ConferenceVerb, E as EnqueueVerb, D as DequeueVerb, H as HangupVerb, o as RedirectVerb, P as PauseVerb, L as LeaveVerb, p as SipDeclineVerb, r as SipRequestVerb, q as SipReferVerb, f as ConfigVerb, d as AnswerVerb, c as AlertVerb, T as TagVerb, h as DtmfVerb, i as DubVerb, l as MessageVerb } from './verbs-B_afNNUM.js';
1
+ import { y as Verb, S as SayVerb, p as PlayVerb, G as GatherVerb, m as LlmVerb, o as PipelineVerb, l as ListenVerb, u as StreamVerb, x as TranscribeVerb, i as DialVerb, C as ConferenceVerb, E as EnqueueVerb, D as DequeueVerb, H as HangupVerb, q as RedirectVerb, P as PauseVerb, L as LeaveVerb, r as SipDeclineVerb, t as SipRequestVerb, s as SipReferVerb, h as ConfigVerb, f as AnswerVerb, c as AlertVerb, T as TagVerb, j as DtmfVerb, k as DubVerb, n as MessageVerb } from './verbs-fjJjfGEt.cjs';
2
2
 
3
3
  /**
4
4
  * Schema-based validation using AJV.
5
- * Loads all 36 JSON schemas from schema/ and validates verb arrays and individual verbs.
5
+ * Loads all JSON schemas from schema/ and validates verb arrays and individual verbs.
6
6
  */
7
7
  interface ValidationResult {
8
8
  valid: boolean;
@@ -35,35 +35,68 @@ interface VerbBuilderOptions {
35
35
  /** Path to schema directory. Auto-detected if omitted. */
36
36
  schemaDir?: string;
37
37
  }
38
+ /**
39
+ * Base class for building jambonz verb arrays. Extended by {@link WebhookResponse}
40
+ * and WsSession. Provides typed verb methods and optional runtime schema validation.
41
+ */
38
42
  declare class VerbBuilder {
39
43
  protected verbs: Verb[];
40
44
  protected validator: JambonzValidator | null;
45
+ /**
46
+ * @param opts - Options for validation and schema directory.
47
+ */
41
48
  constructor(opts?: VerbBuilderOptions);
49
+ /** Speak text using TTS. Supports SSML, multiple voices, and streaming. */
42
50
  say(opts: Omit<SayVerb, 'verb'>): this;
51
+ /** Play an audio file from a URL. */
43
52
  play(opts: Omit<PlayVerb, 'verb'>): this;
53
+ /** Collect speech (STT) and/or DTMF input from the caller. */
44
54
  gather(opts: Omit<GatherVerb, 'verb'>): this;
55
+ /** Connect the caller to an LLM for real-time voice conversation. */
45
56
  llm(opts: Omit<LlmVerb, 'verb'>): this;
57
+ /** Voice AI pipeline with integrated turn detection. */
46
58
  pipeline(opts: Omit<PipelineVerb, 'verb'>): this;
59
+ /** Stream real-time call audio to a WebSocket endpoint. Supports bidirectional audio. */
47
60
  listen(opts: Omit<ListenVerb, 'verb'>): this;
61
+ /** Stream real-time call audio to a WebSocket endpoint. Synonym for {@link listen}. */
48
62
  stream(opts: Omit<StreamVerb, 'verb'>): this;
63
+ /** Real-time call transcription sent to a webhook. */
49
64
  transcribe(opts: Omit<TranscribeVerb, 'verb'>): this;
65
+ /** Place an outbound call and bridge it to the current caller. */
50
66
  dial(opts: Omit<DialVerb, 'verb'>): this;
67
+ /** Join or create a multi-party conference room. */
51
68
  conference(opts: Omit<ConferenceVerb, 'verb'>): this;
69
+ /** Place the caller into a named queue. */
52
70
  enqueue(opts: Omit<EnqueueVerb, 'verb'>): this;
71
+ /** Remove a caller from a queue and bridge them. */
53
72
  dequeue(opts: Omit<DequeueVerb, 'verb'>): this;
73
+ /** End the call. */
54
74
  hangup(opts?: Omit<HangupVerb, 'verb'>): this;
75
+ /** Transfer control to a different webhook URL. */
55
76
  redirect(opts: Omit<RedirectVerb, 'verb'>): this;
77
+ /** Wait for a specified duration before continuing. */
56
78
  pause(opts: Omit<PauseVerb, 'verb'>): this;
79
+ /** Leave a conference or queue. */
57
80
  leave(opts?: Omit<LeaveVerb, 'verb'>): this;
81
+ /** Reject an incoming call with a SIP error response. */
58
82
  sipDecline(opts: Omit<SipDeclineVerb, 'verb'>): this;
83
+ /** Send a SIP INFO or other request within the dialog. */
59
84
  sipRequest(opts: Omit<SipRequestVerb, 'verb'>): this;
85
+ /** Transfer the call via SIP REFER. */
60
86
  sipRefer(opts: Omit<SipReferVerb, 'verb'>): this;
87
+ /** Set session-level defaults (TTS vendor/voice, STT vendor, VAD, etc.). */
61
88
  config(opts: Omit<ConfigVerb, 'verb'>): this;
89
+ /** Explicitly answer the call (sends a 200 OK). */
62
90
  answer(opts?: Omit<AnswerVerb, 'verb'>): this;
91
+ /** Send a SIP 180 Ringing with optional Alert-Info header. */
63
92
  alert(opts: Omit<AlertVerb, 'verb'>): this;
93
+ /** Attach metadata to the call for tracking or routing. */
64
94
  tag(opts: Omit<TagVerb, 'verb'>): this;
95
+ /** Send DTMF tones into the call. */
65
96
  dtmf(opts: Omit<DtmfVerb, 'verb'>): this;
97
+ /** Mix an auxiliary audio track into the call. */
66
98
  dub(opts: Omit<DubVerb, 'verb'>): this;
99
+ /** Send an SMS or MMS message. */
67
100
  message(opts: Omit<MessageVerb, 'verb'>): this;
68
101
  /**
69
102
  * Add one or more verbs from raw JSON.