@absolutejs/voice 0.0.22-beta.104 → 0.0.22-beta.105

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.
@@ -0,0 +1,41 @@
1
+ import { Elysia } from 'elysia';
2
+ import { type PlivoVoiceRoutesOptions } from './telephony/plivo';
3
+ import { type TelnyxVoiceRoutesOptions } from './telephony/telnyx';
4
+ import { type TwilioVoiceRoutesOptions } from './telephony/twilio';
5
+ import { type VoiceTelephonyCarrierMatrixRoutesOptions } from './telephony/matrix';
6
+ import type { VoiceSessionRecord } from './types';
7
+ type VoicePhoneAgentCarrierBase = {
8
+ name?: string;
9
+ smokePath?: false | string;
10
+ setupPath?: false | string;
11
+ };
12
+ export type VoicePhoneAgentTwilioCarrier<TContext = unknown, TSession extends VoiceSessionRecord = VoiceSessionRecord, TResult = unknown> = VoicePhoneAgentCarrierBase & {
13
+ options: TwilioVoiceRoutesOptions<TContext, TSession, TResult>;
14
+ provider: 'twilio';
15
+ };
16
+ export type VoicePhoneAgentTelnyxCarrier<TContext = unknown, TSession extends VoiceSessionRecord = VoiceSessionRecord, TResult = unknown> = VoicePhoneAgentCarrierBase & {
17
+ options?: TelnyxVoiceRoutesOptions<TContext, TSession, TResult>;
18
+ provider: 'telnyx';
19
+ };
20
+ export type VoicePhoneAgentPlivoCarrier<TContext = unknown, TSession extends VoiceSessionRecord = VoiceSessionRecord, TResult = unknown> = VoicePhoneAgentCarrierBase & {
21
+ options?: PlivoVoiceRoutesOptions<TContext, TSession, TResult>;
22
+ provider: 'plivo';
23
+ };
24
+ export type VoicePhoneAgentCarrier<TContext = unknown, TSession extends VoiceSessionRecord = VoiceSessionRecord, TResult = unknown> = VoicePhoneAgentTwilioCarrier<TContext, TSession, TResult> | VoicePhoneAgentTelnyxCarrier<TContext, TSession, TResult> | VoicePhoneAgentPlivoCarrier<TContext, TSession, TResult>;
25
+ export type VoicePhoneAgentRoutesOptions<TContext = unknown, TSession extends VoiceSessionRecord = VoiceSessionRecord, TResult = unknown> = {
26
+ carriers: readonly VoicePhoneAgentCarrier<TContext, TSession, TResult>[];
27
+ matrix?: false | Omit<VoiceTelephonyCarrierMatrixRoutesOptions, 'load'>;
28
+ name?: string;
29
+ };
30
+ export type VoicePhoneAgentRoutes = {
31
+ carriers: {
32
+ name?: string;
33
+ provider: 'plivo' | 'telnyx' | 'twilio';
34
+ setupPath?: false | string;
35
+ smokePath?: false | string;
36
+ }[];
37
+ matrixPath?: string;
38
+ routes: Elysia;
39
+ };
40
+ export declare const createVoicePhoneAgent: <TContext = unknown, TSession extends VoiceSessionRecord = VoiceSessionRecord, TResult = unknown>(options: VoicePhoneAgentRoutesOptions<TContext, TSession, TResult>) => VoicePhoneAgentRoutes;
41
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@absolutejs/voice",
3
- "version": "0.0.22-beta.104",
3
+ "version": "0.0.22-beta.105",
4
4
  "description": "Voice primitives and Elysia plugin for AbsoluteJS",
5
5
  "repository": {
6
6
  "type": "git",