@absolutejs/voice 0.0.22-beta.11 → 0.0.22-beta.110

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 (139) hide show
  1. package/README.md +411 -3
  2. package/dist/agent.d.ts +2 -0
  3. package/dist/angular/index.d.ts +8 -0
  4. package/dist/angular/index.js +1112 -44
  5. package/dist/angular/voice-app-kit-status.service.d.ts +12 -0
  6. package/dist/angular/voice-ops-status.component.d.ts +15 -0
  7. package/dist/angular/voice-provider-capabilities.service.d.ts +12 -0
  8. package/dist/angular/voice-provider-status.service.d.ts +12 -0
  9. package/dist/angular/voice-routing-status.service.d.ts +11 -0
  10. package/dist/angular/voice-stream.service.d.ts +2 -0
  11. package/dist/angular/voice-trace-timeline.service.d.ts +12 -0
  12. package/dist/angular/voice-turn-latency.service.d.ts +13 -0
  13. package/dist/angular/voice-turn-quality.service.d.ts +12 -0
  14. package/dist/angular/voice-workflow-status.service.d.ts +12 -0
  15. package/dist/appKit.d.ts +100 -0
  16. package/dist/assistantHealth.d.ts +81 -0
  17. package/dist/bargeInRoutes.d.ts +56 -0
  18. package/dist/campaign.d.ts +466 -0
  19. package/dist/client/actions.d.ts +22 -0
  20. package/dist/client/appKitStatus.d.ts +19 -0
  21. package/dist/client/bargeInMonitor.d.ts +7 -0
  22. package/dist/client/connection.d.ts +3 -0
  23. package/dist/client/duplex.d.ts +1 -1
  24. package/dist/client/htmxBootstrap.js +587 -13
  25. package/dist/client/index.d.ts +38 -0
  26. package/dist/client/index.js +1908 -8
  27. package/dist/client/liveTurnLatency.d.ts +41 -0
  28. package/dist/client/opsStatusWidget.d.ts +40 -0
  29. package/dist/client/providerCapabilities.d.ts +19 -0
  30. package/dist/client/providerCapabilitiesWidget.d.ts +32 -0
  31. package/dist/client/providerSimulationControls.d.ts +33 -0
  32. package/dist/client/providerSimulationControlsWidget.d.ts +20 -0
  33. package/dist/client/providerStatus.d.ts +19 -0
  34. package/dist/client/providerStatusWidget.d.ts +32 -0
  35. package/dist/client/routingStatus.d.ts +19 -0
  36. package/dist/client/routingStatusWidget.d.ts +28 -0
  37. package/dist/client/traceTimeline.d.ts +19 -0
  38. package/dist/client/traceTimelineWidget.d.ts +32 -0
  39. package/dist/client/turnLatency.d.ts +22 -0
  40. package/dist/client/turnLatencyWidget.d.ts +33 -0
  41. package/dist/client/turnQuality.d.ts +19 -0
  42. package/dist/client/turnQualityWidget.d.ts +32 -0
  43. package/dist/client/workflowStatus.d.ts +19 -0
  44. package/dist/diagnosticsRoutes.d.ts +44 -0
  45. package/dist/evalRoutes.d.ts +213 -0
  46. package/dist/fileStore.d.ts +3 -0
  47. package/dist/handoff.d.ts +54 -0
  48. package/dist/handoffHealth.d.ts +94 -0
  49. package/dist/index.d.ts +75 -8
  50. package/dist/index.js +11856 -3054
  51. package/dist/liveLatency.d.ts +78 -0
  52. package/dist/modelAdapters.d.ts +54 -0
  53. package/dist/openaiTTS.d.ts +18 -0
  54. package/dist/opsConsoleRoutes.d.ts +77 -0
  55. package/dist/opsWebhook.d.ts +126 -0
  56. package/dist/outcomeContract.d.ts +112 -0
  57. package/dist/phoneAgent.d.ts +41 -0
  58. package/dist/postgresStore.d.ts +2 -0
  59. package/dist/productionReadiness.d.ts +121 -0
  60. package/dist/providerAdapters.d.ts +48 -0
  61. package/dist/providerCapabilities.d.ts +92 -0
  62. package/dist/providerHealth.d.ts +79 -0
  63. package/dist/qualityRoutes.d.ts +76 -0
  64. package/dist/queue.d.ts +61 -0
  65. package/dist/react/VoiceOpsStatus.d.ts +6 -0
  66. package/dist/react/VoiceProviderCapabilities.d.ts +6 -0
  67. package/dist/react/VoiceProviderSimulationControls.d.ts +5 -0
  68. package/dist/react/VoiceProviderStatus.d.ts +6 -0
  69. package/dist/react/VoiceRoutingStatus.d.ts +6 -0
  70. package/dist/react/VoiceTraceTimeline.d.ts +6 -0
  71. package/dist/react/VoiceTurnLatency.d.ts +6 -0
  72. package/dist/react/VoiceTurnQuality.d.ts +6 -0
  73. package/dist/react/index.d.ts +17 -0
  74. package/dist/react/index.js +2467 -12
  75. package/dist/react/useVoiceAppKitStatus.d.ts +8 -0
  76. package/dist/react/useVoiceController.d.ts +2 -0
  77. package/dist/react/useVoiceProviderCapabilities.d.ts +8 -0
  78. package/dist/react/useVoiceProviderSimulationControls.d.ts +10 -0
  79. package/dist/react/useVoiceProviderStatus.d.ts +8 -0
  80. package/dist/react/useVoiceRoutingStatus.d.ts +8 -0
  81. package/dist/react/useVoiceStream.d.ts +2 -0
  82. package/dist/react/useVoiceTraceTimeline.d.ts +8 -0
  83. package/dist/react/useVoiceTurnLatency.d.ts +9 -0
  84. package/dist/react/useVoiceTurnQuality.d.ts +8 -0
  85. package/dist/react/useVoiceWorkflowStatus.d.ts +8 -0
  86. package/dist/resilienceRoutes.d.ts +142 -0
  87. package/dist/sessionReplay.d.ts +175 -0
  88. package/dist/simulationSuite.d.ts +120 -0
  89. package/dist/sqliteStore.d.ts +2 -0
  90. package/dist/svelte/createVoiceAppKitStatus.d.ts +8 -0
  91. package/dist/svelte/createVoiceOpsStatus.d.ts +9 -0
  92. package/dist/svelte/createVoiceProviderCapabilities.d.ts +10 -0
  93. package/dist/svelte/createVoiceProviderSimulationControls.d.ts +11 -0
  94. package/dist/svelte/createVoiceProviderStatus.d.ts +10 -0
  95. package/dist/svelte/createVoiceRoutingStatus.d.ts +10 -0
  96. package/dist/svelte/createVoiceTraceTimeline.d.ts +10 -0
  97. package/dist/svelte/createVoiceTurnLatency.d.ts +11 -0
  98. package/dist/svelte/createVoiceTurnQuality.d.ts +10 -0
  99. package/dist/svelte/createVoiceWorkflowStatus.d.ts +8 -0
  100. package/dist/svelte/index.d.ts +10 -0
  101. package/dist/svelte/index.js +1728 -4
  102. package/dist/telephony/contract.d.ts +61 -0
  103. package/dist/telephony/matrix.d.ts +97 -0
  104. package/dist/telephony/plivo.d.ts +254 -0
  105. package/dist/telephony/telnyx.d.ts +247 -0
  106. package/dist/telephony/twilio.d.ts +132 -0
  107. package/dist/telephonyOutcome.d.ts +201 -0
  108. package/dist/testing/index.d.ts +2 -0
  109. package/dist/testing/index.js +2637 -21
  110. package/dist/testing/ioProviderSimulator.d.ts +41 -0
  111. package/dist/testing/providerSimulator.d.ts +44 -0
  112. package/dist/toolContract.d.ts +130 -0
  113. package/dist/toolRuntime.d.ts +50 -0
  114. package/dist/trace.d.ts +1 -1
  115. package/dist/traceTimeline.d.ts +93 -0
  116. package/dist/turnLatency.d.ts +95 -0
  117. package/dist/turnQuality.d.ts +94 -0
  118. package/dist/types.d.ts +125 -2
  119. package/dist/vue/VoiceOpsStatus.d.ts +30 -0
  120. package/dist/vue/VoiceProviderCapabilities.d.ts +51 -0
  121. package/dist/vue/VoiceProviderSimulationControls.d.ts +88 -0
  122. package/dist/vue/VoiceProviderStatus.d.ts +51 -0
  123. package/dist/vue/VoiceRoutingStatus.d.ts +51 -0
  124. package/dist/vue/VoiceTurnLatency.d.ts +69 -0
  125. package/dist/vue/VoiceTurnQuality.d.ts +51 -0
  126. package/dist/vue/index.d.ts +16 -0
  127. package/dist/vue/index.js +2360 -26
  128. package/dist/vue/useVoiceAppKitStatus.d.ts +9 -0
  129. package/dist/vue/useVoiceProviderCapabilities.d.ts +9 -0
  130. package/dist/vue/useVoiceProviderSimulationControls.d.ts +24 -0
  131. package/dist/vue/useVoiceProviderStatus.d.ts +9 -0
  132. package/dist/vue/useVoiceRoutingStatus.d.ts +8 -0
  133. package/dist/vue/useVoiceStream.d.ts +2 -0
  134. package/dist/vue/useVoiceTraceTimeline.d.ts +9 -0
  135. package/dist/vue/useVoiceTurnLatency.d.ts +10 -0
  136. package/dist/vue/useVoiceTurnQuality.d.ts +9 -0
  137. package/dist/vue/useVoiceWorkflowStatus.d.ts +9 -0
  138. package/dist/workflowContract.d.ts +91 -0
  139. package/package.json +1 -1
@@ -0,0 +1,466 @@
1
+ import { Elysia } from 'elysia';
2
+ export type VoiceCampaignStatus = 'canceled' | 'completed' | 'draft' | 'paused' | 'running';
3
+ export type VoiceCampaignRecipientStatus = 'canceled' | 'completed' | 'failed' | 'pending' | 'queued';
4
+ export type VoiceCampaignAttemptStatus = 'canceled' | 'failed' | 'queued' | 'running' | 'succeeded';
5
+ export type VoiceCampaignRecipient = {
6
+ attempts: number;
7
+ completedAt?: number;
8
+ createdAt: number;
9
+ error?: string;
10
+ id: string;
11
+ metadata?: Record<string, unknown>;
12
+ name?: string;
13
+ phone: string;
14
+ status: VoiceCampaignRecipientStatus;
15
+ updatedAt: number;
16
+ variables?: Record<string, string | number | boolean | undefined>;
17
+ };
18
+ export type VoiceCampaignAttempt = {
19
+ campaignId: string;
20
+ completedAt?: number;
21
+ createdAt: number;
22
+ error?: string;
23
+ externalCallId?: string;
24
+ id: string;
25
+ metadata?: Record<string, unknown>;
26
+ recipientId: string;
27
+ startedAt?: number;
28
+ status: VoiceCampaignAttemptStatus;
29
+ updatedAt: number;
30
+ };
31
+ export type VoiceCampaign = {
32
+ createdAt: number;
33
+ description?: string;
34
+ id: string;
35
+ maxAttempts: number;
36
+ maxConcurrentAttempts: number;
37
+ metadata?: Record<string, unknown>;
38
+ name: string;
39
+ status: VoiceCampaignStatus;
40
+ updatedAt: number;
41
+ };
42
+ export type VoiceCampaignRecord = {
43
+ attempts: VoiceCampaignAttempt[];
44
+ campaign: VoiceCampaign;
45
+ recipients: VoiceCampaignRecipient[];
46
+ };
47
+ export type VoiceCampaignStore = {
48
+ get: (id: string) => Promise<VoiceCampaignRecord | undefined> | VoiceCampaignRecord | undefined;
49
+ list: () => Promise<VoiceCampaignRecord[]> | VoiceCampaignRecord[];
50
+ remove: (id: string) => Promise<void> | void;
51
+ set: (id: string, record: VoiceCampaignRecord) => Promise<void> | void;
52
+ };
53
+ export type VoiceCampaignDialerInput = {
54
+ attempt: VoiceCampaignAttempt;
55
+ campaign: VoiceCampaign;
56
+ recipient: VoiceCampaignRecipient;
57
+ };
58
+ export type VoiceCampaignDialerResult = {
59
+ externalCallId?: string;
60
+ metadata?: Record<string, unknown>;
61
+ status?: 'queued' | 'running' | 'succeeded';
62
+ };
63
+ export type VoiceCampaignDialer = (input: VoiceCampaignDialerInput) => Promise<VoiceCampaignDialerResult> | VoiceCampaignDialerResult;
64
+ export type VoiceCampaignCreateInput = {
65
+ description?: string;
66
+ id?: string;
67
+ maxAttempts?: number;
68
+ maxConcurrentAttempts?: number;
69
+ metadata?: Record<string, unknown>;
70
+ name: string;
71
+ };
72
+ export type VoiceCampaignRecipientInput = {
73
+ id?: string;
74
+ metadata?: Record<string, unknown>;
75
+ name?: string;
76
+ phone: string;
77
+ variables?: VoiceCampaignRecipient['variables'];
78
+ };
79
+ export type VoiceCampaignAttemptResultInput = {
80
+ error?: string;
81
+ externalCallId?: string;
82
+ metadata?: Record<string, unknown>;
83
+ status: 'failed' | 'succeeded';
84
+ };
85
+ export type VoiceCampaignTickResult = {
86
+ attempted: number;
87
+ campaignId: string;
88
+ errors: Array<{
89
+ error: string;
90
+ recipientId: string;
91
+ }>;
92
+ started: VoiceCampaignAttempt[];
93
+ };
94
+ export type VoiceCampaignProofOptions = {
95
+ campaign?: VoiceCampaignCreateInput;
96
+ completeAttempts?: boolean;
97
+ recipients?: VoiceCampaignRecipientInput[];
98
+ runtime?: VoiceCampaignRuntime;
99
+ store?: VoiceCampaignStore;
100
+ };
101
+ export type VoiceCampaignProofReport = {
102
+ campaign: VoiceCampaignRecord;
103
+ created: VoiceCampaignRecord;
104
+ final: VoiceCampaignRecord;
105
+ proof: 'voice-campaign';
106
+ recipients: VoiceCampaignRecord;
107
+ summary: VoiceCampaignSummary;
108
+ tick: VoiceCampaignTickResult;
109
+ };
110
+ export type VoiceCampaignSummary = {
111
+ attempts: {
112
+ failed: number;
113
+ queued: number;
114
+ running: number;
115
+ succeeded: number;
116
+ total: number;
117
+ };
118
+ campaigns: {
119
+ canceled: number;
120
+ completed: number;
121
+ draft: number;
122
+ paused: number;
123
+ running: number;
124
+ total: number;
125
+ };
126
+ recipients: {
127
+ canceled: number;
128
+ completed: number;
129
+ failed: number;
130
+ pending: number;
131
+ queued: number;
132
+ total: number;
133
+ };
134
+ };
135
+ export type VoiceCampaignRuntimeOptions = {
136
+ dialer?: VoiceCampaignDialer;
137
+ store: VoiceCampaignStore;
138
+ };
139
+ export type VoiceCampaignRuntime = {
140
+ addRecipients: (campaignId: string, recipients: VoiceCampaignRecipientInput[]) => Promise<VoiceCampaignRecord>;
141
+ cancel: (campaignId: string) => Promise<VoiceCampaignRecord>;
142
+ completeAttempt: (campaignId: string, attemptId: string, result: VoiceCampaignAttemptResultInput) => Promise<VoiceCampaignRecord>;
143
+ create: (input: VoiceCampaignCreateInput) => Promise<VoiceCampaignRecord>;
144
+ enqueue: (campaignId: string) => Promise<VoiceCampaignRecord>;
145
+ get: (campaignId: string) => Promise<VoiceCampaignRecord | undefined>;
146
+ list: () => Promise<VoiceCampaignRecord[]>;
147
+ pause: (campaignId: string) => Promise<VoiceCampaignRecord>;
148
+ remove: (campaignId: string) => Promise<void>;
149
+ resume: (campaignId: string) => Promise<VoiceCampaignRecord>;
150
+ summarize: () => Promise<VoiceCampaignSummary>;
151
+ tick: (campaignId: string) => Promise<VoiceCampaignTickResult>;
152
+ };
153
+ export type VoiceCampaignRoutesOptions = VoiceCampaignRuntimeOptions & {
154
+ headers?: HeadersInit;
155
+ htmlPath?: false | string;
156
+ name?: string;
157
+ path?: string;
158
+ title?: string;
159
+ };
160
+ export declare const createVoiceMemoryCampaignStore: () => VoiceCampaignStore;
161
+ export declare const summarizeVoiceCampaigns: (records: VoiceCampaignRecord[]) => VoiceCampaignSummary;
162
+ export declare const createVoiceCampaign: (options: VoiceCampaignRuntimeOptions) => VoiceCampaignRuntime;
163
+ export declare const runVoiceCampaignProof: (options?: VoiceCampaignProofOptions) => Promise<VoiceCampaignProofReport>;
164
+ export declare const renderVoiceCampaignsHTML: (records: VoiceCampaignRecord[], options?: {
165
+ title?: string;
166
+ }) => string;
167
+ export declare const createVoiceCampaignRoutes: (options: VoiceCampaignRoutesOptions) => Elysia<"", {
168
+ decorator: {};
169
+ store: {};
170
+ derive: {};
171
+ resolve: {};
172
+ }, {
173
+ typebox: {};
174
+ error: {};
175
+ }, {
176
+ schema: {};
177
+ standaloneSchema: {};
178
+ macro: {};
179
+ macroFn: {};
180
+ parser: {};
181
+ response: {};
182
+ }, {
183
+ [x: string]: {
184
+ get: {
185
+ body: unknown;
186
+ params: {};
187
+ query: unknown;
188
+ headers: unknown;
189
+ response: {
190
+ 200: {
191
+ campaigns: VoiceCampaignRecord[];
192
+ summary: VoiceCampaignSummary;
193
+ };
194
+ };
195
+ };
196
+ };
197
+ } & {
198
+ [x: string]: {
199
+ post: {
200
+ body: unknown;
201
+ params: {};
202
+ query: unknown;
203
+ headers: unknown;
204
+ response: {
205
+ 200: VoiceCampaignRecord;
206
+ };
207
+ };
208
+ };
209
+ } & {
210
+ [x: string]: {
211
+ ":campaignId": {
212
+ get: {
213
+ body: unknown;
214
+ params: {
215
+ campaignId: string;
216
+ } & {};
217
+ query: unknown;
218
+ headers: unknown;
219
+ response: {
220
+ 422: {
221
+ type: "validation";
222
+ on: string;
223
+ summary?: string;
224
+ message?: string;
225
+ found?: unknown;
226
+ property?: string;
227
+ expected?: string;
228
+ };
229
+ };
230
+ };
231
+ };
232
+ };
233
+ } & {
234
+ [x: string]: {
235
+ ":campaignId": {
236
+ delete: {
237
+ body: unknown;
238
+ params: {
239
+ campaignId: string;
240
+ } & {};
241
+ query: unknown;
242
+ headers: unknown;
243
+ response: {
244
+ 200: {
245
+ ok: boolean;
246
+ };
247
+ 422: {
248
+ type: "validation";
249
+ on: string;
250
+ summary?: string;
251
+ message?: string;
252
+ found?: unknown;
253
+ property?: string;
254
+ expected?: string;
255
+ };
256
+ };
257
+ };
258
+ };
259
+ };
260
+ } & {
261
+ [x: string]: {
262
+ ":campaignId": {
263
+ recipients: {
264
+ post: {
265
+ body: unknown;
266
+ params: {
267
+ campaignId: string;
268
+ } & {};
269
+ query: unknown;
270
+ headers: unknown;
271
+ response: {
272
+ 200: VoiceCampaignRecord;
273
+ 422: {
274
+ type: "validation";
275
+ on: string;
276
+ summary?: string;
277
+ message?: string;
278
+ found?: unknown;
279
+ property?: string;
280
+ expected?: string;
281
+ };
282
+ };
283
+ };
284
+ };
285
+ };
286
+ };
287
+ } & {
288
+ [x: string]: {
289
+ ":campaignId": {
290
+ enqueue: {
291
+ post: {
292
+ body: unknown;
293
+ params: {
294
+ campaignId: string;
295
+ } & {};
296
+ query: unknown;
297
+ headers: unknown;
298
+ response: {
299
+ 200: VoiceCampaignRecord;
300
+ 422: {
301
+ type: "validation";
302
+ on: string;
303
+ summary?: string;
304
+ message?: string;
305
+ found?: unknown;
306
+ property?: string;
307
+ expected?: string;
308
+ };
309
+ };
310
+ };
311
+ };
312
+ };
313
+ };
314
+ } & {
315
+ [x: string]: {
316
+ ":campaignId": {
317
+ pause: {
318
+ post: {
319
+ body: unknown;
320
+ params: {
321
+ campaignId: string;
322
+ } & {};
323
+ query: unknown;
324
+ headers: unknown;
325
+ response: {
326
+ 200: VoiceCampaignRecord;
327
+ 422: {
328
+ type: "validation";
329
+ on: string;
330
+ summary?: string;
331
+ message?: string;
332
+ found?: unknown;
333
+ property?: string;
334
+ expected?: string;
335
+ };
336
+ };
337
+ };
338
+ };
339
+ };
340
+ };
341
+ } & {
342
+ [x: string]: {
343
+ ":campaignId": {
344
+ resume: {
345
+ post: {
346
+ body: unknown;
347
+ params: {
348
+ campaignId: string;
349
+ } & {};
350
+ query: unknown;
351
+ headers: unknown;
352
+ response: {
353
+ 200: VoiceCampaignRecord;
354
+ 422: {
355
+ type: "validation";
356
+ on: string;
357
+ summary?: string;
358
+ message?: string;
359
+ found?: unknown;
360
+ property?: string;
361
+ expected?: string;
362
+ };
363
+ };
364
+ };
365
+ };
366
+ };
367
+ };
368
+ } & {
369
+ [x: string]: {
370
+ ":campaignId": {
371
+ cancel: {
372
+ post: {
373
+ body: unknown;
374
+ params: {
375
+ campaignId: string;
376
+ } & {};
377
+ query: unknown;
378
+ headers: unknown;
379
+ response: {
380
+ 200: VoiceCampaignRecord;
381
+ 422: {
382
+ type: "validation";
383
+ on: string;
384
+ summary?: string;
385
+ message?: string;
386
+ found?: unknown;
387
+ property?: string;
388
+ expected?: string;
389
+ };
390
+ };
391
+ };
392
+ };
393
+ };
394
+ };
395
+ } & {
396
+ [x: string]: {
397
+ ":campaignId": {
398
+ tick: {
399
+ post: {
400
+ body: unknown;
401
+ params: {
402
+ campaignId: string;
403
+ } & {};
404
+ query: unknown;
405
+ headers: unknown;
406
+ response: {
407
+ 200: VoiceCampaignTickResult;
408
+ 422: {
409
+ type: "validation";
410
+ on: string;
411
+ summary?: string;
412
+ message?: string;
413
+ found?: unknown;
414
+ property?: string;
415
+ expected?: string;
416
+ };
417
+ };
418
+ };
419
+ };
420
+ };
421
+ };
422
+ } & {
423
+ [x: string]: {
424
+ ":campaignId": {
425
+ attempts: {
426
+ ":attemptId": {
427
+ result: {
428
+ post: {
429
+ body: unknown;
430
+ params: {
431
+ campaignId: string;
432
+ attemptId: string;
433
+ } & {};
434
+ query: unknown;
435
+ headers: unknown;
436
+ response: {
437
+ 200: VoiceCampaignRecord;
438
+ 422: {
439
+ type: "validation";
440
+ on: string;
441
+ summary?: string;
442
+ message?: string;
443
+ found?: unknown;
444
+ property?: string;
445
+ expected?: string;
446
+ };
447
+ };
448
+ };
449
+ };
450
+ };
451
+ };
452
+ };
453
+ };
454
+ }, {
455
+ derive: {};
456
+ resolve: {};
457
+ schema: {};
458
+ standaloneSchema: {};
459
+ response: {};
460
+ }, {
461
+ derive: {};
462
+ resolve: {};
463
+ schema: {};
464
+ standaloneSchema: {};
465
+ response: {};
466
+ }>;
@@ -7,6 +7,7 @@ export declare const serverMessageToAction: <TResult = unknown>(message: VoiceSe
7
7
  type: "audio";
8
8
  text?: undefined;
9
9
  sessionId?: undefined;
10
+ event?: undefined;
10
11
  message?: undefined;
11
12
  transcript?: undefined;
12
13
  scenarioId?: undefined;
@@ -20,6 +21,7 @@ export declare const serverMessageToAction: <TResult = unknown>(message: VoiceSe
20
21
  receivedAt?: undefined;
21
22
  turnId?: undefined;
22
23
  sessionId?: undefined;
24
+ event?: undefined;
23
25
  message?: undefined;
24
26
  transcript?: undefined;
25
27
  scenarioId?: undefined;
@@ -33,6 +35,21 @@ export declare const serverMessageToAction: <TResult = unknown>(message: VoiceSe
33
35
  receivedAt?: undefined;
34
36
  turnId?: undefined;
35
37
  text?: undefined;
38
+ event?: undefined;
39
+ message?: undefined;
40
+ transcript?: undefined;
41
+ scenarioId?: undefined;
42
+ status?: undefined;
43
+ turn?: undefined;
44
+ } | {
45
+ event: import("..").VoiceCallLifecycleEvent;
46
+ sessionId: string;
47
+ type: "call_lifecycle";
48
+ chunk?: undefined;
49
+ format?: undefined;
50
+ receivedAt?: undefined;
51
+ turnId?: undefined;
52
+ text?: undefined;
36
53
  message?: undefined;
37
54
  transcript?: undefined;
38
55
  scenarioId?: undefined;
@@ -47,6 +64,7 @@ export declare const serverMessageToAction: <TResult = unknown>(message: VoiceSe
47
64
  turnId?: undefined;
48
65
  text?: undefined;
49
66
  sessionId?: undefined;
67
+ event?: undefined;
50
68
  transcript?: undefined;
51
69
  scenarioId?: undefined;
52
70
  status?: undefined;
@@ -60,6 +78,7 @@ export declare const serverMessageToAction: <TResult = unknown>(message: VoiceSe
60
78
  turnId?: undefined;
61
79
  text?: undefined;
62
80
  sessionId?: undefined;
81
+ event?: undefined;
63
82
  message?: undefined;
64
83
  scenarioId?: undefined;
65
84
  status?: undefined;
@@ -73,6 +92,7 @@ export declare const serverMessageToAction: <TResult = unknown>(message: VoiceSe
73
92
  turnId?: undefined;
74
93
  text?: undefined;
75
94
  sessionId?: undefined;
95
+ event?: undefined;
76
96
  message?: undefined;
77
97
  scenarioId?: undefined;
78
98
  status?: undefined;
@@ -87,6 +107,7 @@ export declare const serverMessageToAction: <TResult = unknown>(message: VoiceSe
87
107
  receivedAt?: undefined;
88
108
  turnId?: undefined;
89
109
  text?: undefined;
110
+ event?: undefined;
90
111
  message?: undefined;
91
112
  transcript?: undefined;
92
113
  turn?: undefined;
@@ -99,6 +120,7 @@ export declare const serverMessageToAction: <TResult = unknown>(message: VoiceSe
99
120
  turnId?: undefined;
100
121
  text?: undefined;
101
122
  sessionId?: undefined;
123
+ event?: undefined;
102
124
  message?: undefined;
103
125
  transcript?: undefined;
104
126
  scenarioId?: undefined;
@@ -0,0 +1,19 @@
1
+ import type { VoiceAppKitStatusReport } from '../appKit';
2
+ export type VoiceAppKitStatusClientOptions = {
3
+ fetch?: typeof fetch;
4
+ intervalMs?: number;
5
+ };
6
+ export type VoiceAppKitStatusSnapshot = {
7
+ error: string | null;
8
+ isLoading: boolean;
9
+ report?: VoiceAppKitStatusReport;
10
+ updatedAt?: number;
11
+ };
12
+ export declare const fetchVoiceAppKitStatus: (path?: string, options?: Pick<VoiceAppKitStatusClientOptions, "fetch">) => Promise<VoiceAppKitStatusReport>;
13
+ export declare const createVoiceAppKitStatusStore: (path?: string, options?: VoiceAppKitStatusClientOptions) => {
14
+ close: () => void;
15
+ getServerSnapshot: () => VoiceAppKitStatusSnapshot;
16
+ getSnapshot: () => VoiceAppKitStatusSnapshot;
17
+ refresh: () => Promise<VoiceAppKitStatusReport | undefined>;
18
+ subscribe: (listener: () => void) => () => void;
19
+ };
@@ -0,0 +1,7 @@
1
+ import type { VoiceBargeInMonitor } from '../types';
2
+ export type VoiceBargeInMonitorOptions = {
3
+ fetch?: typeof fetch;
4
+ path?: string;
5
+ thresholdMs?: number;
6
+ };
7
+ export declare const createVoiceBargeInMonitor: (options?: VoiceBargeInMonitorOptions) => VoiceBargeInMonitor;
@@ -1,5 +1,8 @@
1
1
  import type { VoiceClientMessage, VoiceConnectionOptions, VoiceServerMessage } from '../types';
2
2
  type VoiceConnectionHandle = {
3
+ callControl: (message: Omit<VoiceClientMessage & {
4
+ type: 'call_control';
5
+ }, 'type'>) => void;
3
6
  start: (input?: {
4
7
  sessionId?: string;
5
8
  scenarioId?: string;
@@ -1,3 +1,3 @@
1
1
  import type { VoiceAudioPlayer, VoiceBargeInBinding, VoiceBargeInOptions, VoiceController, VoiceDuplexController, VoiceDuplexControllerOptions } from '../types';
2
- export declare const bindVoiceBargeIn: <TResult = unknown>(controller: Pick<VoiceController<TResult>, "partial" | "sendAudio" | "subscribe">, player: Pick<VoiceAudioPlayer, "interrupt" | "isPlaying">, options?: VoiceBargeInOptions) => VoiceBargeInBinding;
2
+ export declare const bindVoiceBargeIn: <TResult = unknown>(controller: Pick<VoiceController<TResult>, "partial" | "sendAudio" | "sessionId" | "subscribe">, player: Pick<VoiceAudioPlayer, "interrupt" | "isPlaying" | "lastInterruptLatencyMs" | "lastPlaybackStopLatencyMs">, options?: VoiceBargeInOptions) => VoiceBargeInBinding;
3
3
  export declare const createVoiceDuplexController: <TResult = unknown>(path: string, options?: VoiceDuplexControllerOptions) => VoiceDuplexController<TResult>;