@ipcom/asterisk-ari 0.0.139 → 0.0.140
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 +254 -0
- package/dist/cjs/index.cjs +990 -267
- package/dist/cjs/index.cjs.map +3 -3
- package/dist/esm/index.js +993 -268
- package/dist/esm/index.js.map +3 -3
- package/dist/types/ari-client/ariClient.d.ts +64 -15
- package/dist/types/ari-client/ariClient.d.ts.map +1 -1
- package/dist/types/ari-client/baseClient.d.ts +55 -22
- package/dist/types/ari-client/baseClient.d.ts.map +1 -1
- package/dist/types/ari-client/resources/channels.d.ts +338 -47
- package/dist/types/ari-client/resources/channels.d.ts.map +1 -1
- package/dist/types/ari-client/resources/playbacks.d.ts +92 -19
- package/dist/types/ari-client/resources/playbacks.d.ts.map +1 -1
- package/dist/types/ari-client/utils.d.ts.map +1 -1
- package/dist/types/ari-client/websocketClient.d.ts +44 -13
- package/dist/types/ari-client/websocketClient.d.ts.map +1 -1
- package/dist/types/index.d.ts +26 -2
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,83 +1,156 @@
|
|
|
1
1
|
import type { AriClient } from "../ariClient";
|
|
2
2
|
import type { BaseClient } from "../baseClient.js";
|
|
3
3
|
import type { Playback, WebSocketEvent } from "../interfaces";
|
|
4
|
+
/**
|
|
5
|
+
* Represents a playback instance that provides methods for controlling media playback,
|
|
6
|
+
* managing event listeners, and handling playback state.
|
|
7
|
+
*/
|
|
4
8
|
export declare class PlaybackInstance {
|
|
5
|
-
private client;
|
|
6
|
-
private baseClient;
|
|
7
|
-
private playbackId;
|
|
8
|
-
private eventEmitter;
|
|
9
|
+
private readonly client;
|
|
10
|
+
private readonly baseClient;
|
|
11
|
+
private readonly playbackId;
|
|
12
|
+
private readonly eventEmitter;
|
|
9
13
|
private playbackData;
|
|
10
|
-
id: string;
|
|
14
|
+
readonly id: string;
|
|
15
|
+
/**
|
|
16
|
+
* Creates a new PlaybackInstance.
|
|
17
|
+
*
|
|
18
|
+
* @param {AriClient} client - ARI client for communication
|
|
19
|
+
* @param {BaseClient} baseClient - Base client for HTTP requests
|
|
20
|
+
* @param {string} [playbackId] - Optional playback ID, generates timestamp-based ID if not provided
|
|
21
|
+
*/
|
|
11
22
|
constructor(client: AriClient, baseClient: BaseClient, playbackId?: string);
|
|
12
23
|
/**
|
|
13
|
-
*
|
|
24
|
+
* Registers an event listener for a specific WebSocket event type.
|
|
25
|
+
*
|
|
26
|
+
* @param {T} event - Event type to listen for
|
|
27
|
+
* @param {Function} listener - Callback function for the event
|
|
14
28
|
*/
|
|
15
29
|
on<T extends WebSocketEvent["type"]>(event: T, listener: (data: Extract<WebSocketEvent, {
|
|
16
30
|
type: T;
|
|
17
31
|
}>) => void): void;
|
|
18
32
|
/**
|
|
19
|
-
*
|
|
33
|
+
* Registers a one-time event listener for a specific WebSocket event type.
|
|
34
|
+
*
|
|
35
|
+
* @param {T} event - Event type to listen for
|
|
36
|
+
* @param {Function} listener - Callback function for the event
|
|
20
37
|
*/
|
|
21
38
|
once<T extends WebSocketEvent["type"]>(event: T, listener: (data: Extract<WebSocketEvent, {
|
|
22
39
|
type: T;
|
|
23
40
|
}>) => void): void;
|
|
24
41
|
/**
|
|
25
|
-
*
|
|
42
|
+
* Removes event listener(s) for a specific WebSocket event type.
|
|
43
|
+
*
|
|
44
|
+
* @param {T} event - Event type to remove listener(s) for
|
|
45
|
+
* @param {Function} [listener] - Optional specific listener to remove
|
|
26
46
|
*/
|
|
27
47
|
off<T extends WebSocketEvent["type"]>(event: T, listener?: (data: Extract<WebSocketEvent, {
|
|
28
48
|
type: T;
|
|
29
49
|
}>) => void): void;
|
|
30
50
|
/**
|
|
31
|
-
*
|
|
51
|
+
* Emits a WebSocket event if it matches the current playback instance.
|
|
52
|
+
*
|
|
53
|
+
* @param {WebSocketEvent} event - Event to emit
|
|
32
54
|
*/
|
|
33
55
|
emitEvent(event: WebSocketEvent): void;
|
|
34
56
|
/**
|
|
35
|
-
*
|
|
57
|
+
* Retrieves current playback data.
|
|
58
|
+
*
|
|
59
|
+
* @returns {Promise<Playback>} Current playback data
|
|
60
|
+
* @throws {Error} If playback is not properly initialized
|
|
36
61
|
*/
|
|
37
62
|
get(): Promise<Playback>;
|
|
38
63
|
/**
|
|
39
|
-
*
|
|
64
|
+
* Controls playback with specified operation.
|
|
65
|
+
*
|
|
66
|
+
* @param {"pause" | "unpause" | "reverse" | "forward"} operation - Control operation to perform
|
|
67
|
+
* @throws {Error} If playback is not properly initialized or operation fails
|
|
40
68
|
*/
|
|
41
69
|
control(operation: "pause" | "unpause" | "reverse" | "forward"): Promise<void>;
|
|
42
70
|
/**
|
|
43
|
-
*
|
|
71
|
+
* Stops the current playback.
|
|
72
|
+
*
|
|
73
|
+
* @throws {Error} If playback is not properly initialized or stop operation fails
|
|
44
74
|
*/
|
|
45
75
|
stop(): Promise<void>;
|
|
46
76
|
/**
|
|
47
|
-
*
|
|
77
|
+
* Removes all event listeners from this playback instance.
|
|
48
78
|
*/
|
|
49
79
|
removeAllListeners(): void;
|
|
80
|
+
/**
|
|
81
|
+
* Checks if the playback instance has any listeners for a specific event.
|
|
82
|
+
*
|
|
83
|
+
* @param {string} event - Event type to check
|
|
84
|
+
* @returns {boolean} True if there are listeners for the event
|
|
85
|
+
*/
|
|
86
|
+
hasListeners(event: string): boolean;
|
|
87
|
+
/**
|
|
88
|
+
* Gets the current playback data without making an API call.
|
|
89
|
+
*
|
|
90
|
+
* @returns {Playback | null} Current playback data or null if not available
|
|
91
|
+
*/
|
|
92
|
+
getCurrentData(): Playback | null;
|
|
50
93
|
}
|
|
94
|
+
/**
|
|
95
|
+
* Manages playback instances and their related operations in the Asterisk REST Interface.
|
|
96
|
+
* This class provides functionality to create, control, and manage playback instances,
|
|
97
|
+
* as well as handle WebSocket events related to playbacks.
|
|
98
|
+
*/
|
|
51
99
|
export declare class Playbacks {
|
|
52
100
|
private baseClient;
|
|
53
101
|
private client;
|
|
54
102
|
private playbackInstances;
|
|
55
103
|
constructor(baseClient: BaseClient, client: AriClient);
|
|
56
104
|
/**
|
|
57
|
-
*
|
|
105
|
+
* Gets or creates a playback instance
|
|
106
|
+
* @param {Object} params - Parameters for getting/creating a playback instance
|
|
107
|
+
* @param {string} [params.id] - Optional ID of an existing playback
|
|
108
|
+
* @returns {PlaybackInstance} The requested or new playback instance
|
|
58
109
|
*/
|
|
59
110
|
Playback({ id }: {
|
|
60
111
|
id?: string;
|
|
61
112
|
}): PlaybackInstance;
|
|
62
113
|
/**
|
|
63
|
-
*
|
|
114
|
+
* Removes a playback instance and cleans up its resources
|
|
115
|
+
* @param {string} playbackId - ID of the playback instance to remove
|
|
116
|
+
* @throws {Error} If the playback instance doesn't exist
|
|
64
117
|
*/
|
|
65
118
|
removePlaybackInstance(playbackId: string): void;
|
|
66
119
|
/**
|
|
67
|
-
*
|
|
120
|
+
* Propagates WebSocket events to the corresponding playback instance
|
|
121
|
+
* @param {WebSocketEvent} event - The WebSocket event to propagate
|
|
68
122
|
*/
|
|
69
123
|
propagateEventToPlayback(event: WebSocketEvent): void;
|
|
70
124
|
/**
|
|
71
|
-
*
|
|
125
|
+
* Retrieves details of a specific playback
|
|
126
|
+
* @param {string} playbackId - ID of the playback to get details for
|
|
127
|
+
* @returns {Promise<Playback>} Promise resolving to playback details
|
|
128
|
+
* @throws {Error} If the playback ID is invalid or the request fails
|
|
72
129
|
*/
|
|
73
130
|
getDetails(playbackId: string): Promise<Playback>;
|
|
74
131
|
/**
|
|
75
|
-
*
|
|
132
|
+
* Controls a specific playback instance
|
|
133
|
+
* @param {string} playbackId - ID of the playback to control
|
|
134
|
+
* @param {"pause" | "unpause" | "reverse" | "forward"} operation - Operation to perform
|
|
135
|
+
* @throws {Error} If the playback ID is invalid or the operation fails
|
|
76
136
|
*/
|
|
77
137
|
control(playbackId: string, operation: "pause" | "unpause" | "reverse" | "forward"): Promise<void>;
|
|
78
138
|
/**
|
|
79
|
-
*
|
|
139
|
+
* Stops a specific playback instance
|
|
140
|
+
* @param {string} playbackId - ID of the playback to stop
|
|
141
|
+
* @throws {Error} If the playback ID is invalid or the stop operation fails
|
|
80
142
|
*/
|
|
81
143
|
stop(playbackId: string): Promise<void>;
|
|
144
|
+
/**
|
|
145
|
+
* Gets the count of active playback instances
|
|
146
|
+
* @returns {number} Number of active playback instances
|
|
147
|
+
*/
|
|
148
|
+
getInstanceCount(): number;
|
|
149
|
+
/**
|
|
150
|
+
* Checks if a playback instance exists
|
|
151
|
+
* @param {string} playbackId - ID of the playback to check
|
|
152
|
+
* @returns {boolean} True if the playback instance exists
|
|
153
|
+
*/
|
|
154
|
+
hasInstance(playbackId: string): boolean;
|
|
82
155
|
}
|
|
83
156
|
//# sourceMappingURL=playbacks.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"playbacks.d.ts","sourceRoot":"","sources":["../../../../src/ari-client/resources/playbacks.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"playbacks.d.ts","sourceRoot":"","sources":["../../../../src/ari-client/resources/playbacks.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAkB9D;;;GAGG;AACH,qBAAa,gBAAgB;IAavB,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,UAAU;IAC3B,OAAO,CAAC,QAAQ,CAAC,UAAU;IAd/B,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAs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GAAG,OAAO;IAIpC;;;;OAIG;IACH,cAAc,IAAI,QAAQ,GAAG,IAAI;CAGlC;AAED;;;;GAIG;AACH,qBAAa,SAAS;IAIhB,OAAO,CAAC,UAAU;IAClB,OAAO,CAAC,MAAM;IAJlB,OAAO,CAAC,iBAAiB,CAAuC;gBAGpD,UAAU,EAAE,UAAU,EACtB,MAAM,EAAE,SAAS;IAG7B;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,EAAE,EAAE,EAAE;QAAE,EAAE,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,gBAAgB;IAyBnD;;;;OAIG;IACH,sBAAsB,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI;IAehD;;;OAGG;IACH,wBAAwB,CAAC,KAAK,EAAE,cAAc,GAAG,IAAI;IAiBrD;;;;;OAKG;IACG,UAAU,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC;IAcvD;;;;;OAKG;IACG,OAAO,CACT,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,OAAO,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GACvD,OAAO,CAAC,IAAI,CAAC;IAgBhB;;;;OAIG;IACG,IAAI,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAgB7C;;;OAGG;IACH,gBAAgB,IAAI,MAAM;IAI1B;;;;OAIG;IACH,WAAW,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO;CAGzC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/ari-client/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/ari-client/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAE5D,wBAAgB,aAAa,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,GAAG,MAAM,CAMnD;AAED,wBAAgB,eAAe,CAC7B,KAAK,EAAE,cAAc,EACrB,UAAU,CAAC,EAAE,MAAM,GAClB,KAAK,IAAI,OAAO,CAAC,cAAc,EAAE;IAAE,UAAU,EAAE,MAAM,CAAA;CAAE,CAAC,CAG1D;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAC5B,KAAK,EAAE,cAAc,EACrB,SAAS,CAAC,EAAE,MAAM,GACjB,KAAK,IAAI,OAAO,CAAC,cAAc,EAAE;IAAE,OAAO,EAAE,OAAO,CAAA;CAAE,CAAC,CAKxD;AAED,eAAO,MAAM,aAAa,UAgBzB,CAAC"}
|
|
@@ -2,38 +2,69 @@ import { EventEmitter } from "events";
|
|
|
2
2
|
import type { AriClient } from "./ariClient";
|
|
3
3
|
import type { BaseClient } from "./baseClient.js";
|
|
4
4
|
import type { WebSocketEventType } from "./interfaces";
|
|
5
|
+
/**
|
|
6
|
+
* WebSocketClient handles real-time communication with the Asterisk server.
|
|
7
|
+
* Extends EventEmitter to provide event-based communication patterns.
|
|
8
|
+
*/
|
|
5
9
|
export declare class WebSocketClient extends EventEmitter {
|
|
6
|
-
private baseClient;
|
|
7
|
-
private apps;
|
|
8
|
-
private subscribedEvents?;
|
|
9
|
-
private ariClient?;
|
|
10
|
+
private readonly baseClient;
|
|
11
|
+
private readonly apps;
|
|
12
|
+
private readonly subscribedEvents?;
|
|
13
|
+
private readonly ariClient?;
|
|
10
14
|
private ws?;
|
|
11
15
|
private isReconnecting;
|
|
12
16
|
private readonly maxReconnectAttempts;
|
|
13
17
|
private readonly backOffOptions;
|
|
14
|
-
constructor(baseClient: BaseClient, // BaseClient contém baseUrl, username, e password
|
|
15
|
-
apps: string[], // Lista de aplicativos a serem conectados
|
|
16
|
-
subscribedEvents?: WebSocketEventType[] | undefined, // Lista de eventos a serem assinados
|
|
17
|
-
ariClient?: AriClient | undefined);
|
|
18
18
|
/**
|
|
19
|
-
*
|
|
19
|
+
* Creates a new WebSocket client instance.
|
|
20
|
+
*
|
|
21
|
+
* @param {BaseClient} baseClient - The base client containing connection details
|
|
22
|
+
* @param {string[]} apps - List of applications to connect to
|
|
23
|
+
* @param {WebSocketEventType[]} [subscribedEvents] - Optional list of events to subscribe to
|
|
24
|
+
* @param {AriClient} [ariClient] - Optional ARI client for handling channel and playback events
|
|
25
|
+
*/
|
|
26
|
+
constructor(baseClient: BaseClient, apps: string[], subscribedEvents?: WebSocketEventType[] | undefined, ariClient?: AriClient | undefined);
|
|
27
|
+
/**
|
|
28
|
+
* Establishes a WebSocket connection.
|
|
29
|
+
*
|
|
30
|
+
* @returns {Promise<void>} Resolves when connection is established
|
|
31
|
+
* @throws {Error} If connection fails
|
|
20
32
|
*/
|
|
21
33
|
connect(): Promise<void>;
|
|
22
34
|
/**
|
|
23
|
-
*
|
|
35
|
+
* Initializes WebSocket connection with reconnection logic.
|
|
36
|
+
*
|
|
37
|
+
* @param {string} wsUrl - The WebSocket URL to connect to
|
|
38
|
+
* @returns {Promise<void>} Resolves when connection is established
|
|
24
39
|
*/
|
|
25
40
|
private initializeWebSocket;
|
|
26
41
|
/**
|
|
27
|
-
*
|
|
42
|
+
* Processes incoming WebSocket messages.
|
|
43
|
+
*
|
|
44
|
+
* @param {string} rawMessage - The raw message received from WebSocket
|
|
28
45
|
*/
|
|
29
46
|
private handleMessage;
|
|
30
47
|
/**
|
|
31
|
-
*
|
|
48
|
+
* Attempts to reconnect to the WebSocket.
|
|
49
|
+
*
|
|
50
|
+
* @param {string} wsUrl - The WebSocket URL to reconnect to
|
|
32
51
|
*/
|
|
33
52
|
private reconnect;
|
|
34
53
|
/**
|
|
35
|
-
*
|
|
54
|
+
* Manually closes the WebSocket connection.
|
|
36
55
|
*/
|
|
37
56
|
close(): void;
|
|
57
|
+
/**
|
|
58
|
+
* Checks if the WebSocket is currently connected.
|
|
59
|
+
*
|
|
60
|
+
* @returns {boolean} True if connected, false otherwise
|
|
61
|
+
*/
|
|
62
|
+
isConnected(): boolean;
|
|
63
|
+
/**
|
|
64
|
+
* Gets the current connection state.
|
|
65
|
+
*
|
|
66
|
+
* @returns {number} The WebSocket ready state
|
|
67
|
+
*/
|
|
68
|
+
getState(): number;
|
|
38
69
|
}
|
|
39
70
|
//# sourceMappingURL=websocketClient.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"websocketClient.d.ts","sourceRoot":"","sources":["../../../src/ari-client/websocketClient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAGtC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,KAAK,EAAkB,kBAAkB,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"websocketClient.d.ts","sourceRoot":"","sources":["../../../src/ari-client/websocketClient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAGtC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,KAAK,EAAkB,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAMvE;;;GAGG;AACH,qBAAa,eAAgB,SAAQ,YAAY;IA8B3C,OAAO,CAAC,QAAQ,CAAC,UAAU;IAC3B,OAAO,CAAC,QAAQ,CAAC,IAAI;IACrB,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAC;IAClC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAC;IAhC/B,OAAO,CAAC,EAAE,CAAC,CAAY;IACvB,OAAO,CAAC,cAAc,CAAS;IAC/B,OAAO,CAAC,QAAQ,CAAC,oBAAoB,CAAkC;IAEvE,OAAO,CAAC,QAAQ,CAAC,cAAc,CAc7B;IAEF;;;;;;;OAOG;gBAEkB,UAAU,EAAE,UAAU,EACtB,IAAI,EAAE,MAAM,EAAE,EACd,gBAAgB,CAAC,EAAE,kBAAkB,EAAE,YAAA,EACvC,SAAS,CAAC,EAAE,SAAS,YAAA;IAS1C;;;;;OAKG;IACU,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IA8BrC;;;;;OAKG;YACW,mBAAmB;IAsCjC;;;;OAIG;IACH,OAAO,CAAC,aAAa;IAkCrB;;;;OAIG;IACH,OAAO,CAAC,SAAS;IAejB;;OAEG;IACI,KAAK,IAAI,IAAI;IAcpB;;;;OAIG;IACI,WAAW,IAAI,OAAO;IAI7B;;;;OAIG;IACI,QAAQ,IAAI,MAAM;CAG1B"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,10 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file Main entry point for the Asterisk REST Interface (ARI) client package
|
|
3
|
+
* @description This file exports all the necessary classes, types and interfaces for interacting with the ARI
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Main client class for interacting with Asterisk REST Interface
|
|
7
|
+
* @packageDocumentation
|
|
8
|
+
*/
|
|
1
9
|
export { AriClient } from "./ari-client/ariClient.js";
|
|
2
|
-
|
|
10
|
+
/**
|
|
11
|
+
* Resource Classes
|
|
12
|
+
* These classes provide direct access to ARI resources
|
|
13
|
+
*/
|
|
14
|
+
export { Channels, ChannelInstance, } from "./ari-client/resources/channels.js";
|
|
3
15
|
export { Endpoints } from "./ari-client/resources/endpoints.js";
|
|
4
16
|
export { Applications } from "./ari-client/resources/applications.js";
|
|
5
17
|
export { Sounds } from "./ari-client/resources/sounds.js";
|
|
6
18
|
export { Playbacks, PlaybackInstance, } from "./ari-client/resources/playbacks.js";
|
|
7
19
|
export { Asterisk } from "./ari-client/resources/asterisk.js";
|
|
8
20
|
export { Bridges } from "./ari-client/resources/bridges.js";
|
|
9
|
-
|
|
21
|
+
/**
|
|
22
|
+
* Type Definitions
|
|
23
|
+
* These types and interfaces define the shape of data structures used throughout the API
|
|
24
|
+
*/
|
|
25
|
+
export type { AriClientConfig, AriApplication, } from "./ari-client/interfaces/index.js";
|
|
26
|
+
export type { Channel, ChannelEvent, ChannelPlayback, ChannelVar, ChannelDialplan, OriginateRequest, RecordingOptions, SnoopOptions, ExternalMediaOptions, RTPStats, } from "./ari-client/interfaces/index.js";
|
|
27
|
+
export type { Playback, PlaybackEvent, PlaybackOptions, PlaybackControlRequest, PlayMediaRequest, } from "./ari-client/interfaces/index.js";
|
|
28
|
+
export type { Bridge, BridgePlayback, CreateBridgeRequest, RemoveChannelRequest, AddChannelRequest, } from "./ari-client/interfaces/index.js";
|
|
29
|
+
export type { Endpoint, EndpointDetails, } from "./ari-client/interfaces/index.js";
|
|
30
|
+
export type { Application, ApplicationDetails, } from "./ari-client/interfaces/index.js";
|
|
31
|
+
export type { Sound, SoundListRequest, } from "./ari-client/interfaces/index.js";
|
|
32
|
+
export type { AsteriskInfo, Module, Logging, Variable, AsteriskPing, } from "./ari-client/interfaces/index.js";
|
|
33
|
+
export type { WebSocketEvent, WebSocketEventType, } from "./ari-client/interfaces/index.js";
|
|
10
34
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;GAGG;AACH,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAEtD;;;GAGG;AACH,OAAO,EACL,QAAQ,EACR,eAAe,GAChB,MAAM,oCAAoC,CAAC;AAE5C,OAAO,EAAE,SAAS,EAAE,MAAM,qCAAqC,CAAC;AAChE,OAAO,EAAE,YAAY,EAAE,MAAM,wCAAwC,CAAC;AACtE,OAAO,EAAE,MAAM,EAAE,MAAM,kCAAkC,CAAC;AAC1D,OAA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