typescript-agi-ipcom 0.0.8-beta.4 → 0.0.8-beta.6

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.
@@ -1,42 +0,0 @@
1
- /** @ignore */
2
- export interface IResponseArguments {
3
- key: string;
4
- value: string | number | boolean;
5
- }
6
- /**
7
- * Represents a set of AGI response arguments
8
- * @ignore
9
- */
10
- export declare class ResponseArguments {
11
- private m_args;
12
- /**
13
- * Adds a new argument to the set
14
- * @param key
15
- * @param value
16
- */
17
- addArgument(key: string, value: string | number | boolean): void;
18
- /**
19
- * Retrieves the requested key as a string
20
- * @param key
21
- */
22
- string(key: string): string;
23
- /**
24
- * Retrieves the requested key as a number
25
- * @param key
26
- */
27
- number(key: string): number;
28
- /**
29
- * Retrieves the request key as a boolean
30
- * @param key
31
- */
32
- boolean(key: string): boolean;
33
- /**
34
- * Retrieves the requested key from a character code
35
- * @param key
36
- */
37
- char(key: string): string;
38
- /**
39
- * Retrieves the value from the arguments that has no key, if it exists
40
- */
41
- nokey(): string;
42
- }
@@ -1,79 +0,0 @@
1
- "use strict";
2
- // Copyright (c) 2020, Brandon Lehmann
3
- //
4
- // Please see the included LICENSE file for more information.
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.ResponseArguments = void 0;
7
- /**
8
- * Represents a set of AGI response arguments
9
- * @ignore
10
- */
11
- class ResponseArguments {
12
- constructor() {
13
- this.m_args = [];
14
- }
15
- /**
16
- * Adds a new argument to the set
17
- * @param key
18
- * @param value
19
- */
20
- addArgument(key, value) {
21
- this.m_args.push({ key, value });
22
- }
23
- /**
24
- * Retrieves the requested key as a string
25
- * @param key
26
- */
27
- string(key) {
28
- for (const arg of this.m_args) {
29
- if (arg.key === key) {
30
- return arg.value;
31
- }
32
- }
33
- return '';
34
- }
35
- /**
36
- * Retrieves the requested key as a number
37
- * @param key
38
- */
39
- number(key) {
40
- for (const arg of this.m_args) {
41
- if (arg.key === key) {
42
- return parseInt(arg.value, 10);
43
- }
44
- }
45
- return 0;
46
- }
47
- /**
48
- * Retrieves the request key as a boolean
49
- * @param key
50
- */
51
- boolean(key) {
52
- for (const arg of this.m_args) {
53
- if (arg.key === key) {
54
- return arg.value;
55
- }
56
- }
57
- return false;
58
- }
59
- /**
60
- * Retrieves the requested key from a character code
61
- * @param key
62
- */
63
- char(key) {
64
- const num = this.number(key);
65
- return (num !== 0) ? String.fromCharCode(num) : '';
66
- }
67
- /**
68
- * Retrieves the value from the arguments that has no key, if it exists
69
- */
70
- nokey() {
71
- for (const arg of this.m_args) {
72
- if (arg.key !== 'result' && arg.value) {
73
- return arg.key;
74
- }
75
- }
76
- return '';
77
- }
78
- }
79
- exports.ResponseArguments = ResponseArguments;
package/dist/index.d.ts DELETED
@@ -1,2 +0,0 @@
1
- export { AGIServer } from './AGIServer';
2
- export { Channel, ChannelState, DialStatus, PlaybackStatus } from './Channel';
package/dist/index.js DELETED
@@ -1,12 +0,0 @@
1
- "use strict";
2
- // Copyright (c) 2020, Brandon Lehmann
3
- //
4
- // Please see the included LICENSE file for more information.
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- var AGIServer_1 = require("./AGIServer");
7
- Object.defineProperty(exports, "AGIServer", { enumerable: true, get: function () { return AGIServer_1.AGIServer; } });
8
- var Channel_1 = require("./Channel");
9
- Object.defineProperty(exports, "Channel", { enumerable: true, get: function () { return Channel_1.Channel; } });
10
- Object.defineProperty(exports, "ChannelState", { enumerable: true, get: function () { return Channel_1.ChannelState; } });
11
- Object.defineProperty(exports, "DialStatus", { enumerable: true, get: function () { return Channel_1.DialStatus; } });
12
- Object.defineProperty(exports, "PlaybackStatus", { enumerable: true, get: function () { return Channel_1.PlaybackStatus; } });