@ipcom/asterisk-ari 0.0.159 → 0.0.161
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/cjs/index.cjs +210 -0
- package/dist/cjs/index.cjs.map +3 -3
- package/dist/cjs/package.json +3 -0
- package/dist/esm/index.js +210 -0
- package/dist/esm/index.js.map +3 -3
- package/dist/types/ari-client/ariClient.d.ts +14 -12
- package/dist/types/ari-client/ariClient.d.ts.map +1 -1
- package/dist/types/ari-client/baseClient.d.ts +1 -1
- package/dist/types/ari-client/interfaces/applications.types.d.ts +2 -2
- package/dist/types/ari-client/interfaces/bridges.types.d.ts +5 -5
- package/dist/types/ari-client/interfaces/channels.types.d.ts +4 -4
- package/dist/types/ari-client/interfaces/events.types.d.ts +41 -41
- package/dist/types/ari-client/interfaces/events.types.d.ts.map +1 -1
- package/dist/types/ari-client/interfaces/index.d.ts +10 -9
- package/dist/types/ari-client/interfaces/index.d.ts.map +1 -1
- package/dist/types/ari-client/interfaces/playbacks.types.d.ts +2 -2
- package/dist/types/ari-client/interfaces/recordings.types.d.ts +50 -0
- package/dist/types/ari-client/interfaces/recordings.types.d.ts.map +1 -0
- package/dist/types/ari-client/interfaces/websocket.types.d.ts +2 -2
- package/dist/types/ari-client/resources/applications.d.ts +2 -2
- package/dist/types/ari-client/resources/asterisk.d.ts +4 -4
- package/dist/types/ari-client/resources/baseResource.d.ts +1 -1
- package/dist/types/ari-client/resources/baseResource.d.ts.map +1 -1
- package/dist/types/ari-client/resources/bridges.d.ts +6 -6
- package/dist/types/ari-client/resources/channels.d.ts +39 -11
- package/dist/types/ari-client/resources/channels.d.ts.map +1 -1
- package/dist/types/ari-client/resources/endpoints.d.ts +2 -2
- package/dist/types/ari-client/resources/playbacks.d.ts +8 -8
- package/dist/types/ari-client/resources/playbacks.d.ts.map +1 -1
- package/dist/types/ari-client/resources/recordings.d.ts +77 -0
- package/dist/types/ari-client/resources/recordings.d.ts.map +1 -1
- package/dist/types/ari-client/resources/sounds.d.ts +2 -2
- package/dist/types/ari-client/utils.d.ts +1 -1
- package/dist/types/ari-client/websocketClient.d.ts +4 -4
- package/dist/types/index.d.ts +17 -17
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +24 -10
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { AriClient } from
|
|
2
|
-
import type { BaseClient } from
|
|
3
|
-
import type { AddChannelRequest, Bridge, BridgePlayback, CreateBridgeRequest, PlayMediaRequest, RemoveChannelRequest, WebSocketEvent } from
|
|
1
|
+
import type { AriClient } from '../ariClient';
|
|
2
|
+
import type { BaseClient } from '../baseClient.js';
|
|
3
|
+
import type { AddChannelRequest, Bridge, BridgePlayback, CreateBridgeRequest, PlayMediaRequest, RemoveChannelRequest, WebSocketEvent } from '../interfaces';
|
|
4
4
|
/**
|
|
5
5
|
* Represents an instance of a Bridge that provides methods to control
|
|
6
6
|
* bridges, manage event listeners, and manipulate its state.
|
|
@@ -43,7 +43,7 @@ export declare class BridgeInstance {
|
|
|
43
43
|
* @param event
|
|
44
44
|
* @param listener
|
|
45
45
|
*/
|
|
46
|
-
on<T extends WebSocketEvent[
|
|
46
|
+
on<T extends WebSocketEvent['type']>(event: T, listener: (data: Extract<WebSocketEvent, {
|
|
47
47
|
type: T;
|
|
48
48
|
}>) => void): void;
|
|
49
49
|
/**
|
|
@@ -52,7 +52,7 @@ export declare class BridgeInstance {
|
|
|
52
52
|
* @param event - The type of event to listen for.
|
|
53
53
|
* @param listener - The callback function to be called when the event occurs.
|
|
54
54
|
*/
|
|
55
|
-
once<T extends WebSocketEvent[
|
|
55
|
+
once<T extends WebSocketEvent['type']>(event: T, listener: (data: Extract<WebSocketEvent, {
|
|
56
56
|
type: T;
|
|
57
57
|
}>) => void): void;
|
|
58
58
|
/**
|
|
@@ -61,7 +61,7 @@ export declare class BridgeInstance {
|
|
|
61
61
|
* @param event - The type of event to remove listeners for.
|
|
62
62
|
* @param listener - Optional. The specific listener to remove. If not provided, all listeners for the event will be removed.
|
|
63
63
|
*/
|
|
64
|
-
off<T extends WebSocketEvent[
|
|
64
|
+
off<T extends WebSocketEvent['type']>(event: T, listener?: (data: Extract<WebSocketEvent, {
|
|
65
65
|
type: T;
|
|
66
66
|
}>) => void): void;
|
|
67
67
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { AriClient } from
|
|
2
|
-
import type { BaseClient } from
|
|
3
|
-
import type { Channel, ChannelPlayback, ChannelVar, ExternalMediaOptions, OriginateRequest, PlaybackOptions, RTPStats, RecordingOptions, SnoopOptions, WebSocketEvent } from
|
|
4
|
-
import type { PlaybackInstance } from
|
|
1
|
+
import type { AriClient } from '../ariClient';
|
|
2
|
+
import type { BaseClient } from '../baseClient.js';
|
|
3
|
+
import type { Channel, ChannelPlayback, ChannelVar, ExternalMediaOptions, OriginateRequest, PlaybackOptions, RTPStats, RecordingOptions, SnoopOptions, WebSocketEvent } from '../interfaces';
|
|
4
|
+
import type { PlaybackInstance } from './playbacks';
|
|
5
5
|
/**
|
|
6
6
|
* Represents an instance of a communication channel managed by the AriClient.
|
|
7
7
|
*/
|
|
@@ -16,13 +16,13 @@ export declare class ChannelInstance {
|
|
|
16
16
|
/**
|
|
17
17
|
* Registers an event listener for specific channel events
|
|
18
18
|
*/
|
|
19
|
-
on<T extends WebSocketEvent[
|
|
19
|
+
on<T extends WebSocketEvent['type']>(event: T, listener: (data: Extract<WebSocketEvent, {
|
|
20
20
|
type: T;
|
|
21
21
|
}>) => void): void;
|
|
22
22
|
/**
|
|
23
23
|
* Registers a one-time event listener
|
|
24
24
|
*/
|
|
25
|
-
once<T extends WebSocketEvent[
|
|
25
|
+
once<T extends WebSocketEvent['type']>(event: T, listener: (data: Extract<WebSocketEvent, {
|
|
26
26
|
type: T;
|
|
27
27
|
}>) => void): void;
|
|
28
28
|
/**
|
|
@@ -34,7 +34,7 @@ export declare class ChannelInstance {
|
|
|
34
34
|
* @param {(data: WebSocketEvent) => void} [listener] - Optional specific listener to remove
|
|
35
35
|
* @throws {Error} If no event type is provided
|
|
36
36
|
*/
|
|
37
|
-
off<T extends WebSocketEvent[
|
|
37
|
+
off<T extends WebSocketEvent['type']>(event: T, listener?: (data: Extract<WebSocketEvent, {
|
|
38
38
|
type: T;
|
|
39
39
|
}>) => void): void;
|
|
40
40
|
/**
|
|
@@ -64,6 +64,34 @@ export declare class ChannelInstance {
|
|
|
64
64
|
* @throws Error if channel already exists or origination fails
|
|
65
65
|
*/
|
|
66
66
|
originate(data: OriginateRequest): Promise<Channel>;
|
|
67
|
+
/**
|
|
68
|
+
* Continues the execution of a dialplan for the current channel.
|
|
69
|
+
*
|
|
70
|
+
* @param {string} [context] - The dialplan context to continue execution in, if specified.
|
|
71
|
+
* @param {string} [extension] - The dialplan extension to proceed with, if provided.
|
|
72
|
+
* @param {number} [priority] - The priority within the dialplan extension to resume at, if specified.
|
|
73
|
+
* @param {string} [label] - The label to start from within the dialplan, if given.
|
|
74
|
+
* @return {Promise<void>} Resolves when the dialplan is successfully continued.
|
|
75
|
+
*/
|
|
76
|
+
continueDialplan(context?: string, extension?: string, priority?: number, label?: string): Promise<void>;
|
|
77
|
+
/**
|
|
78
|
+
* Initiates a snoop operation on this channel with the provided options.
|
|
79
|
+
* Snooping allows you to listen in or interact with an existing call.
|
|
80
|
+
*
|
|
81
|
+
* @param {SnoopOptions} options - Configuration options for the snooping operation.
|
|
82
|
+
* @return {Promise<Channel>} A promise that resolves to the snooped channel data.
|
|
83
|
+
* @throws {Error} If the channel is not initialized or if snooping fails.
|
|
84
|
+
*/
|
|
85
|
+
snoop(options: SnoopOptions): Promise<Channel>;
|
|
86
|
+
/**
|
|
87
|
+
* Initiates a snoop operation on this channel with a specific snoop ID.
|
|
88
|
+
*
|
|
89
|
+
* @param {string} snoopId - The unique identifier for the snoop operation.
|
|
90
|
+
* @param {SnoopOptions} options - Configuration options for the snooping operation.
|
|
91
|
+
* @return {Promise<Channel>} A promise that resolves to the snooped channel data.
|
|
92
|
+
* @throws {Error} If the channel is not initialized or if snooping fails.
|
|
93
|
+
*/
|
|
94
|
+
snoopWithId(snoopId: string, options: SnoopOptions): Promise<Channel>;
|
|
67
95
|
/**
|
|
68
96
|
* Plays media on the channel
|
|
69
97
|
*/
|
|
@@ -156,7 +184,7 @@ export declare class ChannelInstance {
|
|
|
156
184
|
* @return {Promise<void>} A promise that resolves when the channel is successfully muted.
|
|
157
185
|
* @throws {Error} If the channel is not associated with this instance.
|
|
158
186
|
*/
|
|
159
|
-
muteChannel(direction?:
|
|
187
|
+
muteChannel(direction?: 'both' | 'in' | 'out'): Promise<void>;
|
|
160
188
|
/**
|
|
161
189
|
* Unmutes a previously muted channel in the specified direction.
|
|
162
190
|
*
|
|
@@ -165,7 +193,7 @@ export declare class ChannelInstance {
|
|
|
165
193
|
* @return {Promise<void>} A promise that resolves once the channel has been successfully unmuted.
|
|
166
194
|
* @throws {Error} If the channel is not associated with the current instance.
|
|
167
195
|
*/
|
|
168
|
-
unmuteChannel(direction?:
|
|
196
|
+
unmuteChannel(direction?: 'both' | 'in' | 'out'): Promise<void>;
|
|
169
197
|
/**
|
|
170
198
|
* Places the associated channel on hold if the channel is valid and linked to this instance.
|
|
171
199
|
*
|
|
@@ -458,7 +486,7 @@ export declare class Channels {
|
|
|
458
486
|
* @param {"both" | "in" | "out"} [direction="both"] - The direction for muting, can be "both", "in", or "out". Default is "both".
|
|
459
487
|
* @return {Promise<void>} A promise that resolves when the channel is successfully muted.
|
|
460
488
|
*/
|
|
461
|
-
muteChannel(channelId: string, direction?:
|
|
489
|
+
muteChannel(channelId: string, direction?: 'both' | 'in' | 'out'): Promise<void>;
|
|
462
490
|
/**
|
|
463
491
|
* Unmutes a previously muted channel, allowing communication in the specified direction(s).
|
|
464
492
|
*
|
|
@@ -466,7 +494,7 @@ export declare class Channels {
|
|
|
466
494
|
* @param {"both" | "in" | "out"} [direction="both"] - The direction of communication to unmute. Valid options are "both", "in" (incoming messages), or "out" (outgoing messages). Defaults to "both".
|
|
467
495
|
* @return {Promise<void>} A promise that resolves when the channel is successfully unmuted.
|
|
468
496
|
*/
|
|
469
|
-
unmuteChannel(channelId: string, direction?:
|
|
497
|
+
unmuteChannel(channelId: string, direction?: 'both' | 'in' | 'out'): Promise<void>;
|
|
470
498
|
/**
|
|
471
499
|
* Places a specific channel on hold by sending a POST request to the server.
|
|
472
500
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"channels.d.ts","sourceRoot":"","sources":["../../../../src/ari-client/resources/channels.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"channels.d.ts","sourceRoot":"","sources":["../../../../src/ari-client/resources/channels.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,KAAK,EACV,OAAO,EACP,eAAe,EACf,UAAU,EACV,oBAAoB,EACpB,gBAAgB,EAChB,eAAe,EACf,QAAQ,EACR,gBAAgB,EAChB,YAAY,EACZ,cAAc,EACf,MAAM,eAAe,CAAC;AAEvB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAmBpD;;GAEG;AACH,qBAAa,eAAe;IAWxB,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,UAAU;IAX7B,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAsB;IACnD,OAAO,CAAC,WAAW,CAAwB;IAC3C,OAAO,CAAC,QAAQ,CAAC,YAAY,CAIzB;IACJ,SAAgB,EAAE,EAAE,MAAM,CAAC;gBAGR,MAAM,EAAE,SAAS,EACjB,UAAU,EAAE,UAAU,EACvC,SAAS,CAAC,EAAE,MAAM;IAKpB;;OAEG;IACH,EAAE,CAAC,CAAC,SAAS,cAAc,CAAC,MAAM,CAAC,EACjC,KAAK,EAAE,CAAC,EACR,QAAQ,EAAE,CAAC,IAAI,E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AAM,CAAC;QAChB,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,GACA,OAAO,CAAC,IAAI,CAAC;IAOhB;;;;;;OAMG;IACG,WAAW,CACf,SAAS,EAAE,MAAM,EACjB,SAAS,GAAE,MAAM,GAAG,IAAI,GAAG,KAAc,GACxC,OAAO,CAAC,IAAI,CAAC;IAMhB;;;;;;OAMG;IACG,aAAa,CACjB,SAAS,EAAE,MAAM,EACjB,SAAS,GAAE,MAAM,GAAG,IAAI,GAAG,KAAc,GACxC,OAAO,CAAC,IAAI,CAAC;IAMhB;;;;;OAKG;IACG,WAAW,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAInD;;;;;OAKG;IACG,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAIrD;;;;;OAKG;IACG,aAAa,CAAC,IAAI,EAAE,gBAAgB,GAAG,OAAO,CAAC,OAAO,CAAC;IAI7D;;;;;;OAMG;IACG,eAAe,CACnB,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,gBAAgB,GACrB,OAAO,CAAC,OAAO,CAAC;CAGpB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { BaseClient } from
|
|
2
|
-
import type { Endpoint, EndpointDetails } from
|
|
1
|
+
import type { BaseClient } from '../baseClient.js';
|
|
2
|
+
import type { Endpoint, EndpointDetails } from '../interfaces/endpoints.types';
|
|
3
3
|
export declare class Endpoints {
|
|
4
4
|
private client;
|
|
5
5
|
constructor(client: BaseClient);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { AriClient } from
|
|
2
|
-
import type { BaseClient } from
|
|
3
|
-
import type { Playback, WebSocketEvent } from
|
|
1
|
+
import type { AriClient } from '../ariClient';
|
|
2
|
+
import type { BaseClient } from '../baseClient.js';
|
|
3
|
+
import type { Playback, WebSocketEvent } from '../interfaces';
|
|
4
4
|
/**
|
|
5
5
|
* Represents a playback instance that provides methods for controlling media playback,
|
|
6
6
|
* managing event listeners, and handling playback state.
|
|
@@ -27,7 +27,7 @@ export declare class PlaybackInstance {
|
|
|
27
27
|
* @param {T} event - Event type to listen for
|
|
28
28
|
* @param {(data: WebSocketEvent) => void} listener - Callback function for the event
|
|
29
29
|
*/
|
|
30
|
-
on<T extends WebSocketEvent[
|
|
30
|
+
on<T extends WebSocketEvent['type']>(event: T, listener: (data: Extract<WebSocketEvent, {
|
|
31
31
|
type: T;
|
|
32
32
|
}>) => void): void;
|
|
33
33
|
/**
|
|
@@ -36,7 +36,7 @@ export declare class PlaybackInstance {
|
|
|
36
36
|
* @param {T} event - Event type to listen for
|
|
37
37
|
* @param {(data: WebSocketEvent) => void} listener - Callback function for the event
|
|
38
38
|
*/
|
|
39
|
-
once<T extends WebSocketEvent[
|
|
39
|
+
once<T extends WebSocketEvent['type']>(event: T, listener: (data: Extract<WebSocketEvent, {
|
|
40
40
|
type: T;
|
|
41
41
|
}>) => void): void;
|
|
42
42
|
/**
|
|
@@ -45,7 +45,7 @@ export declare class PlaybackInstance {
|
|
|
45
45
|
* @param {T} event - Event type to remove listener(s) for
|
|
46
46
|
* @param {(data: WebSocketEvent) => void} [listener] - Optional specific listener to remove
|
|
47
47
|
*/
|
|
48
|
-
off<T extends WebSocketEvent[
|
|
48
|
+
off<T extends WebSocketEvent['type']>(event: T, listener?: (data: Extract<WebSocketEvent, {
|
|
49
49
|
type: T;
|
|
50
50
|
}>) => void): void;
|
|
51
51
|
/**
|
|
@@ -71,7 +71,7 @@ export declare class PlaybackInstance {
|
|
|
71
71
|
* @param {"pause" | "unpause" | "reverse" | "forward"} operation - Control operation to perform
|
|
72
72
|
* @throws {Error} If playback is not properly initialized or operation fails
|
|
73
73
|
*/
|
|
74
|
-
control(operation:
|
|
74
|
+
control(operation: 'pause' | 'unpause' | 'reverse' | 'forward'): Promise<void>;
|
|
75
75
|
/**
|
|
76
76
|
* Stops the current playback.
|
|
77
77
|
*
|
|
@@ -167,7 +167,7 @@ export declare class Playbacks {
|
|
|
167
167
|
* @param {"pause" | "unpause" | "reverse" | "forward"} operation - Operation to perform
|
|
168
168
|
* @throws {Error} If the playback ID is invalid or the operation fails
|
|
169
169
|
*/
|
|
170
|
-
control(playbackId: string, operation:
|
|
170
|
+
control(playbackId: string, operation: 'pause' | 'unpause' | 'reverse' | 'forward'): Promise<void>;
|
|
171
171
|
/**
|
|
172
172
|
* Stops a specific playback instance
|
|
173
173
|
* @param {string} playbackId - ID of the playback to stop
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"playbacks.d.ts","sourceRoot":"","sources":["../../../../src/ari-client/resources/playbacks.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"playbacks.d.ts","sourceRoot":"","sources":["../../../../src/ari-client/resources/playbacks.ts"],"names":[],"mappings":"AAGA,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;AAqB9D;;;GAGG;AACH,qBAAa,gBAAgB;IAiBzB,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,UAAU;IAC3B,OAAO,CAAC,QAAQ,CAAC,UAAU;IAlB7B,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAsB;IACnD,OAAO,CAAC,QAAQ,CAAC,YAAY,CAGzB;IACJ,OAAO,CAAC,YAAY,CAAyB;IAC7C,SAAgB,EAAE,EAAE,MAAM,CAAC;IAE3B;;;;;;OAMG;gBAEgB,MAAM,EAAE,SAAS,EACjB,UAAU,EAAE,UAAU,EACtB,UAAU,GAAE,MAAiC;IAKhE;;;;;OAKG;IACH,EAAE,CAAC,CAAC,SAAS,cAAc,CAAC,MAAM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,CAAuC;IAChE,OAAO,CAAC,UAAU,CAAqC;gBAG7C,UAAU,EAAE,UAAU,EACtB,MAAM,EAAE,SAAS;IAG3B;;;;;OAKG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE;QAAE,EAAE,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,gBAAgB;IAwBpD;;;;;;;;;;;OAWG;IACI,OAAO,IAAI,IAAI;IAStB;;OAEG;IACI,MAAM,IAAI,IAAI;IAsBrB;;;;OAIG;IACI,sBAAsB,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI;IAoBvD;;;OAGG;IACI,wBAAwB,CAAC,KAAK,EAAE,cAAc,GAAG,IAAI;IA4B5D;;;;;OAKG;IACG,GAAG,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC;IAchD;;;;;OAKG;IACG,OAAO,CACX,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,OAAO,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GACrD,OAAO,CAAC,IAAI,CAAC;IAehB;;;;OAIG;IACG,IAAI,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAe7C;;;OAGG;IACH,gBAAgB,IAAI,MAAM;IAI1B;;;;OAIG;IACH,WAAW,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO;CAGzC"}
|
|
@@ -1 +1,78 @@
|
|
|
1
|
+
import type { BaseClient } from '../baseClient';
|
|
2
|
+
import type { StoredRecording, LiveRecording, GetStoredParams, DeleteStoredParams, GetStoredFileParams, CopyStoredParams, GetLiveParams, CancelParams, StopParams, PauseParams, UnpauseParams, MuteParams, UnmuteParams } from '../interfaces';
|
|
3
|
+
export declare class Recordings {
|
|
4
|
+
private readonly baseClient;
|
|
5
|
+
constructor(baseClient: BaseClient);
|
|
6
|
+
/**
|
|
7
|
+
* List recordings that are complete.
|
|
8
|
+
* @returns Promise<StoredRecording[]>
|
|
9
|
+
*/
|
|
10
|
+
listStored(): Promise<StoredRecording[]>;
|
|
11
|
+
/**
|
|
12
|
+
* Get a stored recording's details.
|
|
13
|
+
* @param params - The parameters for getting a stored recording
|
|
14
|
+
* @returns Promise<StoredRecording>
|
|
15
|
+
*/
|
|
16
|
+
getStored(params: GetStoredParams): Promise<StoredRecording>;
|
|
17
|
+
/**
|
|
18
|
+
* Delete a stored recording.
|
|
19
|
+
* @param params - The parameters for deleting a stored recording
|
|
20
|
+
* @returns Promise<void>
|
|
21
|
+
*/
|
|
22
|
+
deleteStored(params: DeleteStoredParams): Promise<void>;
|
|
23
|
+
/**
|
|
24
|
+
* Get the file associated with the stored recording.
|
|
25
|
+
* @param params - The parameters for getting a stored recording file
|
|
26
|
+
* @returns Promise<ArrayBuffer>
|
|
27
|
+
*/
|
|
28
|
+
getStoredFile(params: GetStoredFileParams): Promise<ArrayBuffer>;
|
|
29
|
+
/**
|
|
30
|
+
* Copy a stored recording.
|
|
31
|
+
* @param params - The parameters for copying a stored recording
|
|
32
|
+
* @returns Promise<StoredRecording>
|
|
33
|
+
*/
|
|
34
|
+
copyStored(params: CopyStoredParams): Promise<StoredRecording>;
|
|
35
|
+
/**
|
|
36
|
+
* List live recordings.
|
|
37
|
+
* @param params - The parameters for getting a live recording
|
|
38
|
+
* @returns Promise<LiveRecording>
|
|
39
|
+
*/
|
|
40
|
+
getLive(params: GetLiveParams): Promise<LiveRecording>;
|
|
41
|
+
/**
|
|
42
|
+
* Stop a live recording and discard it.
|
|
43
|
+
* @param params - The parameters for canceling a recording
|
|
44
|
+
* @returns Promise<void>
|
|
45
|
+
*/
|
|
46
|
+
cancel(params: CancelParams): Promise<void>;
|
|
47
|
+
/**
|
|
48
|
+
* Stop a live recording and store it.
|
|
49
|
+
* @param params - The parameters for stopping a recording
|
|
50
|
+
* @returns Promise<void>
|
|
51
|
+
*/
|
|
52
|
+
stop(params: StopParams): Promise<void>;
|
|
53
|
+
/**
|
|
54
|
+
* Pause a live recording.
|
|
55
|
+
* @param params - The parameters for pausing a recording
|
|
56
|
+
* @returns Promise<void>
|
|
57
|
+
*/
|
|
58
|
+
pause(params: PauseParams): Promise<void>;
|
|
59
|
+
/**
|
|
60
|
+
* Unpause a live recording.
|
|
61
|
+
* @param params - The parameters for unpausing a recording
|
|
62
|
+
* @returns Promise<void>
|
|
63
|
+
*/
|
|
64
|
+
unpause(params: UnpauseParams): Promise<void>;
|
|
65
|
+
/**
|
|
66
|
+
* Mute a live recording.
|
|
67
|
+
* @param params - The parameters for muting a recording
|
|
68
|
+
* @returns Promise<void>
|
|
69
|
+
*/
|
|
70
|
+
mute(params: MuteParams): Promise<void>;
|
|
71
|
+
/**
|
|
72
|
+
* Unmute a live recording.
|
|
73
|
+
* @param params - The parameters for unmuting a recording
|
|
74
|
+
* @returns Promise<void>
|
|
75
|
+
*/
|
|
76
|
+
unmute(params: UnmuteParams): Promise<void>;
|
|
77
|
+
}
|
|
1
78
|
//# sourceMappingURL=recordings.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recordings.d.ts","sourceRoot":"","sources":["../../../../src/ari-client/resources/recordings.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"recordings.d.ts","sourceRoot":"","sources":["../../../../src/ari-client/resources/recordings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,KAAK,EACV,eAAe,EACf,aAAa,EACb,eAAe,EACf,kBAAkB,EAClB,mBAAmB,EACnB,gBAAgB,EAChB,aAAa,EACb,YAAY,EACZ,UAAU,EACV,WAAW,EACX,aAAa,EACb,UAAU,EACV,YAAY,EACb,MAAM,eAAe,CAAC;AAEvB,qBAAa,UAAU;IACT,OAAO,CAAC,QAAQ,CAAC,UAAU;gBAAV,UAAU,EAAE,UAAU;IACnD;;;OAGG;IACG,UAAU,IAAI,OAAO,CAAC,eAAe,EAAE,CAAC;IAI9C;;;;OAIG;IACG,SAAS,CAAC,MAAM,EAAE,eAAe,GAAG,OAAO,CAAC,eAAe,CAAC;IAMlE;;;;OAIG;IACG,YAAY,CAAC,MAAM,EAAE,kBAAkB,GAAG,OAAO,CAAC,IAAI,CAAC;IAM7D;;;;OAIG;IACG,aAAa,CAAC,MAAM,EAAE,mBAAmB,GAAG,OAAO,CAAC,WAAW,CAAC;IAOtE;;;;OAIG;IACG,UAAU,CAAC,MAAM,EAAE,gBAAgB,GAAG,OAAO,CAAC,eAAe,CAAC;IAYpE;;;;OAIG;IACG,OAAO,CAAC,MAAM,EAAE,aAAa,GAAG,OAAO,CAAC,aAAa,CAAC;IAM5D;;;;OAIG;IACG,MAAM,CAAC,MAAM,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC;IAMjD;;;;OAIG;IACG,IAAI,CAAC,MAAM,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;IAM7C;;;;OAIG;IACG,KAAK,CAAC,MAAM,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;IAM/C;;;;OAIG;IACG,OAAO,CAAC,MAAM,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC;IAMnD;;;;OAIG;IACG,IAAI,CAAC,MAAM,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;IAM7C;;;;OAIG;IACG,MAAM,CAAC,MAAM,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC;CAKlD"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { BaseClient } from
|
|
2
|
-
import type { Sound, SoundListRequest } from
|
|
1
|
+
import type { BaseClient } from '../baseClient.js';
|
|
2
|
+
import type { Sound, SoundListRequest } from '../interfaces/sounds.types.js';
|
|
3
3
|
export declare class Sounds {
|
|
4
4
|
private client;
|
|
5
5
|
constructor(client: BaseClient);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Channel, WebSocketEvent } from
|
|
1
|
+
import type { Channel, WebSocketEvent } from './interfaces';
|
|
2
2
|
export declare function toQueryParams<T>(options: T): string;
|
|
3
3
|
export declare function isPlaybackEvent(event: WebSocketEvent, playbackId?: string): event is Extract<WebSocketEvent, {
|
|
4
4
|
playbackId: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { EventEmitter } from
|
|
2
|
-
import type { AriClient } from
|
|
3
|
-
import type { BaseClient } from
|
|
4
|
-
import type { WebSocketEventType } from
|
|
1
|
+
import { EventEmitter } from 'events';
|
|
2
|
+
import type { AriClient } from './ariClient';
|
|
3
|
+
import type { BaseClient } from './baseClient.js';
|
|
4
|
+
import type { WebSocketEventType } from './interfaces';
|
|
5
5
|
/**
|
|
6
6
|
* WebSocketClient handles real-time communication with the Asterisk server.
|
|
7
7
|
* Extends EventEmitter to provide event-based communication patterns.
|
package/dist/types/index.d.ts
CHANGED
|
@@ -6,29 +6,29 @@
|
|
|
6
6
|
* Main client class for interacting with Asterisk REST Interface
|
|
7
7
|
* @packageDocumentation
|
|
8
8
|
*/
|
|
9
|
-
export { AriClient } from
|
|
9
|
+
export { AriClient } from './ari-client/ariClient.js';
|
|
10
10
|
/**
|
|
11
11
|
* Resource Classes
|
|
12
12
|
* These classes provide direct access to ARI resources
|
|
13
13
|
*/
|
|
14
|
-
export { Channels, ChannelInstance
|
|
15
|
-
export { Endpoints } from
|
|
16
|
-
export { Applications } from
|
|
17
|
-
export { Sounds } from
|
|
18
|
-
export { Playbacks, PlaybackInstance, } from
|
|
19
|
-
export { Asterisk } from
|
|
20
|
-
export { Bridges, BridgeInstance } from
|
|
14
|
+
export { Channels, ChannelInstance } from './ari-client/resources/channels.js';
|
|
15
|
+
export { Endpoints } from './ari-client/resources/endpoints.js';
|
|
16
|
+
export { Applications } from './ari-client/resources/applications.js';
|
|
17
|
+
export { Sounds } from './ari-client/resources/sounds.js';
|
|
18
|
+
export { Playbacks, PlaybackInstance, } from './ari-client/resources/playbacks.js';
|
|
19
|
+
export { Asterisk } from './ari-client/resources/asterisk.js';
|
|
20
|
+
export { Bridges, BridgeInstance } from './ari-client/resources/bridges.js';
|
|
21
21
|
/**
|
|
22
22
|
* Type Definitions
|
|
23
23
|
* These types and interfaces define the shape of data structures used throughout the API
|
|
24
24
|
*/
|
|
25
|
-
export type { AriClientConfig, AriApplication, } from
|
|
26
|
-
export type { Channel, ChannelEvent, ChannelPlayback, ChannelVar, ChannelDialplan, OriginateRequest, RecordingOptions, SnoopOptions, ExternalMediaOptions, RTPStats, } from
|
|
27
|
-
export type { Playback, PlaybackEvent, PlaybackOptions, PlaybackControlRequest, PlayMediaRequest, } from
|
|
28
|
-
export type { Bridge, BridgePlayback, CreateBridgeRequest, RemoveChannelRequest, AddChannelRequest, } from
|
|
29
|
-
export type { Endpoint, EndpointDetails, } from
|
|
30
|
-
export type { Application, ApplicationDetails, } from
|
|
31
|
-
export type { Sound, SoundListRequest
|
|
32
|
-
export type { AsteriskInfo, Module, Logging, Variable, AsteriskPing, } from
|
|
33
|
-
export type { WebSocketEvent, WebSocketEventType, } from
|
|
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';
|
|
34
34
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
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,
|
|
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,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AAE/E,OAAO,EAAE,SAAS,EAAE,MAAM,qCAAqC,CAAC;AAChE,OAAO,EAAE,YAAY,EAAE,MAAM,wCAAwC,CAAC;AACtE,OAAO,EAAE,MAAM,EAAE,MAAM,kCAAkC,CAAC;AAC1D,OAAO,EACL,SAAS,EACT,gBAAgB,GACjB,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,oCAAoC,CAAC;AAC9D,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AAE5E;;;GAGG;AAGH,YAAY,EACV,eAAe,EACf,cAAc,GACf,MAAM,kCAAkC,CAAC;AAG1C,YAAY,EACV,OAAO,EACP,YAAY,EACZ,eAAe,EACf,UAAU,EACV,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAChB,YAAY,EACZ,oBAAoB,EACpB,QAAQ,GACT,MAAM,kCAAkC,CAAC;AAG1C,YAAY,EACV,QAAQ,EACR,aAAa,EACb,eAAe,EACf,sBAAsB,EACtB,gBAAgB,GACjB,MAAM,kCAAkC,CAAC;AAG1C,YAAY,EACV,MAAM,EACN,cAAc,EACd,mBAAmB,EACnB,oBAAoB,EACpB,iBAAiB,GAClB,MAAM,kCAAkC,CAAC;AAG1C,YAAY,EACV,QAAQ,EACR,eAAe,GAChB,MAAM,kCAAkC,CAAC;AAG1C,YAAY,EACV,WAAW,EACX,kBAAkB,GACnB,MAAM,kCAAkC,CAAC;AAG1C,YAAY,EAAE,KAAK,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AAGhF,YAAY,EACV,YAAY,EACZ,MAAM,EACN,OAAO,EACP,QAAQ,EACR,YAAY,GACb,MAAM,kCAAkC,CAAC;AAG1C,YAAY,EACV,cAAc,EACd,kBAAkB,GACnB,MAAM,kCAAkC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,13 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ipcom/asterisk-ari",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.161",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "JavaScript client for Asterisk REST Interface.",
|
|
6
6
|
"homepage": "https://github.com/fabiotheo/ipcom-asterisk-ari",
|
|
7
|
-
"keywords": [
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
"keywords": [
|
|
8
|
+
"Asterisk",
|
|
9
|
+
"ARI",
|
|
10
|
+
"Node.js",
|
|
11
|
+
"TypeScript"
|
|
12
|
+
],
|
|
13
|
+
"types": "./dist/types/index.d.ts",
|
|
14
|
+
"main": "./dist/cjs/index.cjs",
|
|
15
|
+
"module": "./dist/esm/index.js",
|
|
11
16
|
"scripts": {
|
|
12
17
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
13
18
|
"build": "node build.js",
|
|
@@ -27,7 +32,7 @@
|
|
|
27
32
|
"author": "Fábio Fernandes Theodoro",
|
|
28
33
|
"dependencies": {
|
|
29
34
|
"@types/ws": "^8.5.13",
|
|
30
|
-
"axios": "^1.
|
|
35
|
+
"axios": "^1.9.0",
|
|
31
36
|
"exponential-backoff": "^3.1.1",
|
|
32
37
|
"uuid": "^11.0.3",
|
|
33
38
|
"ws": "^8.18.0"
|
|
@@ -39,16 +44,25 @@
|
|
|
39
44
|
".": {
|
|
40
45
|
"types": "./dist/types/index.d.ts",
|
|
41
46
|
"require": "./dist/cjs/index.cjs",
|
|
42
|
-
"import": "./dist/esm/index.js"
|
|
47
|
+
"import": "./dist/esm/index.js",
|
|
48
|
+
"default": "./dist/esm/index.js"
|
|
43
49
|
}
|
|
44
50
|
},
|
|
45
|
-
"files": [
|
|
51
|
+
"files": [
|
|
52
|
+
"dist"
|
|
53
|
+
],
|
|
46
54
|
"devDependencies": {
|
|
47
|
-
"@
|
|
55
|
+
"@eslint/js": "^9.28.0",
|
|
48
56
|
"@types/uuid": "^10.0.0",
|
|
49
57
|
"esbuild": "^0.24.0",
|
|
58
|
+
"eslint": "^9.28.0",
|
|
59
|
+
"eslint-config-prettier": "^10.1.5",
|
|
60
|
+
"eslint-plugin-prettier": "^5.4.1",
|
|
61
|
+
"globals": "^16.2.0",
|
|
62
|
+
"prettier": "3.5.3",
|
|
50
63
|
"typedoc": "^0.26.11",
|
|
51
|
-
"typescript": "5.6"
|
|
64
|
+
"typescript": "5.6",
|
|
65
|
+
"typescript-eslint": "^8.33.1"
|
|
52
66
|
},
|
|
53
67
|
"publishConfig": {
|
|
54
68
|
"access": "public"
|