@wazo/sdk 0.43.13 → 0.43.15
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 +84 -57
- package/dist/wazo-sdk.js +2 -2
- package/esm/api-client.js +7 -132
- package/esm/base-api-client.js +125 -0
- package/esm/constants.js +11 -0
- package/esm/domain/CallLog.js +4 -1
- package/esm/domain/__tests__/CallLog.test.js +11 -0
- package/esm/index.js +1 -0
- package/esm/service/__tests__/getApiclient.test.js +37 -0
- package/esm/service/getApiClient.js +8 -6
- package/esm/types/api-client.d.ts +3 -41
- package/esm/types/api-client.d.ts.map +1 -1
- package/esm/types/base-api-client.d.ts +43 -0
- package/esm/types/base-api-client.d.ts.map +1 -0
- package/esm/types/constants.d.ts +12 -0
- package/esm/types/constants.d.ts.map +1 -0
- package/esm/types/domain/CallLog.d.ts.map +1 -1
- package/esm/types/index.d.ts +1 -0
- package/esm/types/index.d.ts.map +1 -1
- package/esm/types/service/__tests__/getApiclient.test.d.ts +2 -0
- package/esm/types/service/__tests__/getApiclient.test.d.ts.map +1 -0
- package/esm/types/service/getApiClient.d.ts +5 -2
- package/esm/types/service/getApiClient.d.ts.map +1 -1
- package/esm/types/simple/index.d.ts +1 -1
- package/esm/types/utils/api-requester.d.ts.map +1 -1
- package/esm/utils/api-requester.js +0 -1
- package/lib/api-client.js +17 -144
- package/lib/base-api-client.js +133 -0
- package/lib/constants.js +14 -0
- package/lib/domain/CallLog.js +4 -1
- package/lib/domain/__tests__/CallLog.test.js +3 -0
- package/lib/index.js +3 -1
- package/lib/service/__tests__/getApiclient.test.js +42 -0
- package/lib/service/getApiClient.js +8 -6
- package/lib/types/api-client.d.ts +3 -41
- package/lib/types/api-client.d.ts.map +1 -1
- package/lib/types/base-api-client.d.ts +43 -0
- package/lib/types/base-api-client.d.ts.map +1 -0
- package/lib/types/constants.d.ts +12 -0
- package/lib/types/constants.d.ts.map +1 -0
- package/lib/types/domain/CallLog.d.ts.map +1 -1
- package/lib/types/index.d.ts +1 -0
- package/lib/types/index.d.ts.map +1 -1
- package/lib/types/service/__tests__/getApiclient.test.d.ts +2 -0
- package/lib/types/service/__tests__/getApiclient.test.d.ts.map +1 -0
- package/lib/types/service/getApiClient.d.ts +5 -2
- package/lib/types/service/getApiClient.d.ts.map +1 -1
- package/lib/types/simple/index.d.ts +1 -1
- package/lib/types/utils/api-requester.d.ts.map +1 -1
- package/lib/utils/api-requester.js +0 -1
- package/package.json +1 -1
- package/src/api-client.ts +20 -188
- package/src/base-api-client.ts +184 -0
- package/src/constants.ts +11 -0
- package/src/domain/CallLog.ts +4 -1
- package/src/domain/__tests__/CallLog.test.ts +12 -0
- package/src/index.ts +1 -0
- package/src/service/__tests__/getApiclient.test.ts +46 -0
- package/src/service/getApiClient.ts +15 -8
- package/src/utils/api-requester.ts +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api-requester.d.ts","sourceRoot":"","sources":["../../../src/utils/api-requester.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAG7C,KAAK,iBAAiB,GAAG;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,GAAG,SAAS,CAAC;IAC9C,QAAQ,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACpC,oBAAoB,EAAE,CAAC,GAAG,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC,KAAK,GAAG,CAAC;IACnD,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,GAAG,SAAS,CAAC;IACrD,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAChC,CAAC;AAKF,MAAM,CAAC,OAAO,OAAO,YAAY;IAC/B,MAAM,EAAE,MAAM,CAAC;I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,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;IAe9G,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM;IAK9F,IAAI,OAAO,IAAI,MAAM,CAEpB;CAEF"}
|
|
@@ -42,7 +42,6 @@ export default class ApiRequester {
|
|
|
42
42
|
}
|
|
43
43
|
return Base64.encode(str);
|
|
44
44
|
}
|
|
45
|
-
// @see https://github.com/facebook/flow/issues/183#issuecomment-358607052
|
|
46
45
|
constructor({ server, refreshTokenCallback, clientId, agent = null, token = null, fetchOptions, requestTimeout = REQUEST_TIMEOUT_MS, }) {
|
|
47
46
|
this.server = server;
|
|
48
47
|
this.agent = agent;
|
package/lib/api-client.js
CHANGED
|
@@ -1,18 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
4
|
};
|
|
14
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
const auth_1 = __importDefault(require("./api/auth"));
|
|
16
6
|
const application_1 = __importDefault(require("./api/application"));
|
|
17
7
|
const confd_1 = __importDefault(require("./api/confd"));
|
|
18
8
|
const ctid_ng_1 = __importDefault(require("./api/ctid-ng"));
|
|
@@ -23,142 +13,25 @@ const calld_1 = __importDefault(require("./api/calld"));
|
|
|
23
13
|
const agentd_1 = __importDefault(require("./api/agentd"));
|
|
24
14
|
const webhookd_1 = __importDefault(require("./api/webhookd"));
|
|
25
15
|
const amid_1 = __importDefault(require("./api/amid"));
|
|
26
|
-
const
|
|
27
|
-
const
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
const CTIDNG_VERSION = '1.0';
|
|
33
|
-
const DIRD_VERSION = '0.1';
|
|
34
|
-
const CALL_LOGD_VERSION = '1.0';
|
|
35
|
-
const CHATD_VERSION = '1.0';
|
|
36
|
-
const CALLD_VERSION = '1.0';
|
|
37
|
-
const AGENTD_VERSION = '1.0';
|
|
38
|
-
const WEBHOOKD_VERSION = '1.0';
|
|
39
|
-
const AMID_VERSION = '1.0';
|
|
40
|
-
const logger = IssueReporter_1.default ? IssueReporter_1.default.loggerFor('api') : console;
|
|
41
|
-
class ApiClient {
|
|
42
|
-
// @see https://github.com/facebook/flow/issues/183#issuecomment-358607052
|
|
43
|
-
constructor({ server, agent = null, refreshToken, clientId, isMobile = false, fetchOptions, }) {
|
|
44
|
-
this.updateParameters({
|
|
45
|
-
server,
|
|
46
|
-
agent,
|
|
47
|
-
clientId,
|
|
48
|
-
fetchOptions,
|
|
49
|
-
});
|
|
50
|
-
this.refreshToken = refreshToken;
|
|
51
|
-
this.isMobile = isMobile || false;
|
|
16
|
+
const constants_1 = require("./constants");
|
|
17
|
+
const base_api_client_1 = __importDefault(require("./base-api-client"));
|
|
18
|
+
class ApiClient extends base_api_client_1.default {
|
|
19
|
+
constructor(args) {
|
|
20
|
+
super(args);
|
|
21
|
+
this.initializeEndpoints(); // Reinitialize sdk endpoints
|
|
52
22
|
}
|
|
53
23
|
initializeEndpoints() {
|
|
54
|
-
|
|
55
|
-
this.application = (0, application_1.default)(this.client, `calld/${APPLICATION_VERSION}/applications`);
|
|
56
|
-
this.confd = (0, confd_1.default)(this.client, `confd/${CONFD_VERSION}`);
|
|
57
|
-
this.ctidNg = (0, ctid_ng_1.default)(this.client, `ctid-ng/${CTIDNG_VERSION}`);
|
|
58
|
-
this.dird = (0, dird_1.default)(this.client, `dird/${DIRD_VERSION}`);
|
|
59
|
-
this.callLogd = (0, call_logd_1.default)(this.client, `call-logd/${CALL_LOGD_VERSION}`);
|
|
60
|
-
this.chatd = (0, chatd_1.default)(this.client, `chatd/${CHATD_VERSION}`);
|
|
61
|
-
this.calld = (0, calld_1.default)(this.client, `calld/${CALLD_VERSION}`);
|
|
62
|
-
this.agentd = (0, agentd_1.default)(this.client, `agentd/${AGENTD_VERSION}`);
|
|
63
|
-
this.webhookd = (0, webhookd_1.default)(this.client, `webhookd/${WEBHOOKD_VERSION}`);
|
|
64
|
-
this.amid = (0, amid_1.default)(this.client, `amid/${AMID_VERSION}`);
|
|
65
|
-
}
|
|
66
|
-
updateParameters({ server, agent, clientId, fetchOptions, }) {
|
|
67
|
-
const refreshTokenCallback = this.refreshTokenCallback.bind(this);
|
|
68
|
-
this.client = new api_requester_1.default({
|
|
69
|
-
server,
|
|
70
|
-
agent,
|
|
71
|
-
refreshTokenCallback,
|
|
72
|
-
clientId,
|
|
73
|
-
fetchOptions,
|
|
74
|
-
});
|
|
75
|
-
this.initializeEndpoints();
|
|
76
|
-
}
|
|
77
|
-
forceRefreshToken() {
|
|
78
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
79
|
-
logger.info('forcing refresh token, calling callback');
|
|
80
|
-
return this.refreshTokenCallback();
|
|
81
|
-
});
|
|
82
|
-
}
|
|
83
|
-
refreshTokenCallback() {
|
|
84
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
85
|
-
logger.info('refresh token callback called', {
|
|
86
|
-
refreshToken: (0, string_1.obfuscateToken)(this.refreshToken),
|
|
87
|
-
refreshBackend: this.refreshBackend,
|
|
88
|
-
refreshTenantId: this.refreshTenantId,
|
|
89
|
-
refreshDomainName: this.refreshDomainName,
|
|
90
|
-
refreshExpiration: this.refreshExpiration,
|
|
91
|
-
isMobile: this.isMobile,
|
|
92
|
-
});
|
|
93
|
-
if (!this.refreshToken) {
|
|
94
|
-
return null;
|
|
95
|
-
}
|
|
96
|
-
try {
|
|
97
|
-
const session = yield this.auth.refreshToken(this.refreshToken, this.refreshBackend, this.refreshExpiration, this.isMobile, this.refreshTenantId, this.refreshDomainName);
|
|
98
|
-
if (!session) {
|
|
99
|
-
return null;
|
|
100
|
-
}
|
|
101
|
-
logger.info('token refreshed', {
|
|
102
|
-
token: (0, string_1.obfuscateToken)(session.token),
|
|
103
|
-
});
|
|
104
|
-
if (this.onRefreshToken) {
|
|
105
|
-
this.onRefreshToken(session.token, session);
|
|
106
|
-
}
|
|
107
|
-
this.setToken(session.token);
|
|
108
|
-
return session.token;
|
|
109
|
-
}
|
|
110
|
-
catch (error) {
|
|
111
|
-
logger.error('token refresh, error', error);
|
|
112
|
-
if (this.onRefreshTokenError) {
|
|
113
|
-
this.onRefreshTokenError(error);
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
return null;
|
|
117
|
-
});
|
|
118
|
-
}
|
|
119
|
-
setToken(token) {
|
|
120
|
-
this.client.setToken(token);
|
|
121
|
-
}
|
|
122
|
-
setTenant(tenant) {
|
|
123
|
-
this.client.setTenant(tenant);
|
|
124
|
-
}
|
|
125
|
-
setRefreshToken(refreshToken) {
|
|
126
|
-
this.refreshToken = refreshToken;
|
|
127
|
-
}
|
|
128
|
-
setRequestTimeout(requestTimeout) {
|
|
129
|
-
this.client.setRequestTimeout(requestTimeout);
|
|
130
|
-
}
|
|
131
|
-
setClientId(clientId) {
|
|
132
|
-
this.client.clientId = clientId;
|
|
133
|
-
}
|
|
134
|
-
setOnRefreshToken(onRefreshToken) {
|
|
135
|
-
this.onRefreshToken = onRefreshToken;
|
|
136
|
-
}
|
|
137
|
-
setOnRefreshTokenError(callback) {
|
|
138
|
-
this.onRefreshTokenError = callback;
|
|
139
|
-
}
|
|
140
|
-
setRefreshExpiration(refreshExpiration) {
|
|
141
|
-
this.refreshExpiration = refreshExpiration;
|
|
142
|
-
}
|
|
143
|
-
setRefreshBackend(refreshBackend) {
|
|
144
|
-
this.refreshBackend = refreshBackend;
|
|
145
|
-
}
|
|
146
|
-
setRefreshTenantId(tenantId) {
|
|
147
|
-
console.warn('Use of `setRefreshTenantId` is deprecated, use `setRefreshDomainName` instead');
|
|
148
|
-
this.refreshTenantId = tenantId;
|
|
149
|
-
}
|
|
150
|
-
setRefreshDomainName(domainName) {
|
|
151
|
-
this.refreshDomainName = domainName;
|
|
152
|
-
}
|
|
153
|
-
setIsMobile(isMobile) {
|
|
154
|
-
this.isMobile = isMobile;
|
|
155
|
-
}
|
|
156
|
-
setFetchOptions(fetchOptions) {
|
|
157
|
-
this.fetchOptions = fetchOptions;
|
|
158
|
-
this.client.setFetchOptions(fetchOptions);
|
|
159
|
-
}
|
|
160
|
-
disableErrorLogging() {
|
|
161
|
-
this.client.disableErrorLogging();
|
|
24
|
+
super.initializeEndpoints();
|
|
25
|
+
this.application = (0, application_1.default)(this.client, `calld/${constants_1.APPLICATION_VERSION}/applications`);
|
|
26
|
+
this.confd = (0, confd_1.default)(this.client, `confd/${constants_1.CONFD_VERSION}`);
|
|
27
|
+
this.ctidNg = (0, ctid_ng_1.default)(this.client, `ctid-ng/${constants_1.CTIDNG_VERSION}`);
|
|
28
|
+
this.dird = (0, dird_1.default)(this.client, `dird/${constants_1.DIRD_VERSION}`);
|
|
29
|
+
this.callLogd = (0, call_logd_1.default)(this.client, `call-logd/${constants_1.CALL_LOGD_VERSION}`);
|
|
30
|
+
this.chatd = (0, chatd_1.default)(this.client, `chatd/${constants_1.CHATD_VERSION}`);
|
|
31
|
+
this.calld = (0, calld_1.default)(this.client, `calld/${constants_1.CALLD_VERSION}`);
|
|
32
|
+
this.agentd = (0, agentd_1.default)(this.client, `agentd/${constants_1.AGENTD_VERSION}`);
|
|
33
|
+
this.webhookd = (0, webhookd_1.default)(this.client, `webhookd/${constants_1.WEBHOOKD_VERSION}`);
|
|
34
|
+
this.amid = (0, amid_1.default)(this.client, `amid/${constants_1.AMID_VERSION}`);
|
|
162
35
|
}
|
|
163
36
|
}
|
|
164
37
|
exports.default = ApiClient;
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
const auth_1 = __importDefault(require("./api/auth"));
|
|
16
|
+
const api_requester_1 = __importDefault(require("./utils/api-requester"));
|
|
17
|
+
const IssueReporter_1 = __importDefault(require("./service/IssueReporter"));
|
|
18
|
+
const string_1 = require("./utils/string");
|
|
19
|
+
const constants_1 = require("./constants");
|
|
20
|
+
const logger = IssueReporter_1.default ? IssueReporter_1.default.loggerFor('api') : console;
|
|
21
|
+
class BaseApiClient {
|
|
22
|
+
constructor({ server, agent = null, refreshToken, clientId, isMobile = false, fetchOptions, }) {
|
|
23
|
+
this.updateParameters({
|
|
24
|
+
server,
|
|
25
|
+
agent,
|
|
26
|
+
clientId,
|
|
27
|
+
fetchOptions,
|
|
28
|
+
});
|
|
29
|
+
this.refreshToken = refreshToken;
|
|
30
|
+
this.isMobile = isMobile || false;
|
|
31
|
+
}
|
|
32
|
+
initializeEndpoints() {
|
|
33
|
+
this.auth = (0, auth_1.default)(this.client, `auth/${constants_1.AUTH_VERSION}`);
|
|
34
|
+
}
|
|
35
|
+
updateParameters({ server, agent, clientId, fetchOptions, }) {
|
|
36
|
+
const refreshTokenCallback = this.refreshTokenCallback.bind(this);
|
|
37
|
+
this.client = new api_requester_1.default({
|
|
38
|
+
server,
|
|
39
|
+
agent,
|
|
40
|
+
refreshTokenCallback,
|
|
41
|
+
clientId,
|
|
42
|
+
fetchOptions,
|
|
43
|
+
});
|
|
44
|
+
this.initializeEndpoints();
|
|
45
|
+
}
|
|
46
|
+
forceRefreshToken() {
|
|
47
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
48
|
+
logger.info('forcing refresh token, calling callback');
|
|
49
|
+
return this.refreshTokenCallback();
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
refreshTokenCallback() {
|
|
53
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
54
|
+
logger.info('refresh token callback called', {
|
|
55
|
+
refreshToken: (0, string_1.obfuscateToken)(this.refreshToken),
|
|
56
|
+
refreshBackend: this.refreshBackend,
|
|
57
|
+
refreshTenantId: this.refreshTenantId,
|
|
58
|
+
refreshDomainName: this.refreshDomainName,
|
|
59
|
+
refreshExpiration: this.refreshExpiration,
|
|
60
|
+
isMobile: this.isMobile,
|
|
61
|
+
});
|
|
62
|
+
if (!this.refreshToken) {
|
|
63
|
+
return null;
|
|
64
|
+
}
|
|
65
|
+
try {
|
|
66
|
+
const session = yield this.auth.refreshToken(this.refreshToken, this.refreshBackend, this.refreshExpiration, this.isMobile, this.refreshTenantId, this.refreshDomainName);
|
|
67
|
+
if (!session) {
|
|
68
|
+
return null;
|
|
69
|
+
}
|
|
70
|
+
logger.info('token refreshed', {
|
|
71
|
+
token: (0, string_1.obfuscateToken)(session.token),
|
|
72
|
+
});
|
|
73
|
+
if (this.onRefreshToken) {
|
|
74
|
+
this.onRefreshToken(session.token, session);
|
|
75
|
+
}
|
|
76
|
+
this.setToken(session.token);
|
|
77
|
+
return session.token;
|
|
78
|
+
}
|
|
79
|
+
catch (error) {
|
|
80
|
+
logger.error('token refresh, error', error);
|
|
81
|
+
if (this.onRefreshTokenError) {
|
|
82
|
+
this.onRefreshTokenError(error);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
return null;
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
setToken(token) {
|
|
89
|
+
this.client.setToken(token);
|
|
90
|
+
}
|
|
91
|
+
setTenant(tenant) {
|
|
92
|
+
this.client.setTenant(tenant);
|
|
93
|
+
}
|
|
94
|
+
setRefreshToken(refreshToken) {
|
|
95
|
+
this.refreshToken = refreshToken;
|
|
96
|
+
}
|
|
97
|
+
setRequestTimeout(requestTimeout) {
|
|
98
|
+
this.client.setRequestTimeout(requestTimeout);
|
|
99
|
+
}
|
|
100
|
+
setClientId(clientId) {
|
|
101
|
+
this.client.clientId = clientId;
|
|
102
|
+
}
|
|
103
|
+
setOnRefreshToken(onRefreshToken) {
|
|
104
|
+
this.onRefreshToken = onRefreshToken;
|
|
105
|
+
}
|
|
106
|
+
setOnRefreshTokenError(callback) {
|
|
107
|
+
this.onRefreshTokenError = callback;
|
|
108
|
+
}
|
|
109
|
+
setRefreshExpiration(refreshExpiration) {
|
|
110
|
+
this.refreshExpiration = refreshExpiration;
|
|
111
|
+
}
|
|
112
|
+
setRefreshBackend(refreshBackend) {
|
|
113
|
+
this.refreshBackend = refreshBackend;
|
|
114
|
+
}
|
|
115
|
+
setRefreshTenantId(tenantId) {
|
|
116
|
+
console.warn('Use of `setRefreshTenantId` is deprecated, use `setRefreshDomainName` instead');
|
|
117
|
+
this.refreshTenantId = tenantId;
|
|
118
|
+
}
|
|
119
|
+
setRefreshDomainName(domainName) {
|
|
120
|
+
this.refreshDomainName = domainName;
|
|
121
|
+
}
|
|
122
|
+
setIsMobile(isMobile) {
|
|
123
|
+
this.isMobile = isMobile;
|
|
124
|
+
}
|
|
125
|
+
setFetchOptions(fetchOptions) {
|
|
126
|
+
this.fetchOptions = fetchOptions;
|
|
127
|
+
this.client.setFetchOptions(fetchOptions);
|
|
128
|
+
}
|
|
129
|
+
disableErrorLogging() {
|
|
130
|
+
this.client.disableErrorLogging();
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
exports.default = BaseApiClient;
|
package/lib/constants.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AMID_VERSION = exports.WEBHOOKD_VERSION = exports.AGENTD_VERSION = exports.CALLD_VERSION = exports.CHATD_VERSION = exports.CALL_LOGD_VERSION = exports.DIRD_VERSION = exports.CTIDNG_VERSION = exports.CONFD_VERSION = exports.APPLICATION_VERSION = exports.AUTH_VERSION = void 0;
|
|
4
|
+
exports.AUTH_VERSION = '0.1';
|
|
5
|
+
exports.APPLICATION_VERSION = '1.0';
|
|
6
|
+
exports.CONFD_VERSION = '1.1';
|
|
7
|
+
exports.CTIDNG_VERSION = '1.0';
|
|
8
|
+
exports.DIRD_VERSION = '0.1';
|
|
9
|
+
exports.CALL_LOGD_VERSION = '1.0';
|
|
10
|
+
exports.CHATD_VERSION = '1.0';
|
|
11
|
+
exports.CALLD_VERSION = '1.0';
|
|
12
|
+
exports.AGENTD_VERSION = '1.0';
|
|
13
|
+
exports.WEBHOOKD_VERSION = '1.0';
|
|
14
|
+
exports.AMID_VERSION = '1.0';
|
package/lib/domain/CallLog.js
CHANGED
|
@@ -110,7 +110,10 @@ class CallLog {
|
|
|
110
110
|
}
|
|
111
111
|
isIncoming(session) {
|
|
112
112
|
if (this.callDirection === 'internal') {
|
|
113
|
-
return session.hasExtension(this.destination.plainExtension)
|
|
113
|
+
return session.hasExtension(this.destination.plainExtension)
|
|
114
|
+
|| session.hasExtension(this.requested.extension)
|
|
115
|
+
|| session.uuid === this.destination.uuid
|
|
116
|
+
|| session.uuid === this.requested.uuid;
|
|
114
117
|
}
|
|
115
118
|
return this.callDirection === 'inbound';
|
|
116
119
|
}
|
|
@@ -127,6 +127,9 @@ describe('CallLog Domain', () => {
|
|
|
127
127
|
// When destination is set to the same user session extension
|
|
128
128
|
const destinationCallLog = CallLog_1.default.parse(Object.assign(Object.assign({}, CALL_LOG_RESPONSE), { destination_extension: CALL_LOG_RESPONSE.requested_extension, destination_name: CALL_LOG_RESPONSE.requested_name, destination_user_uuid: CALL_LOG_RESPONSE.requested_user_uuid, requested_extension: CALL_LOG_RESPONSE.destination_extension, requested_name: CALL_LOG_RESPONSE.destination_name, requested_user_uuid: CALL_LOG_RESPONSE.destination_user_uuid }));
|
|
129
129
|
expect(destinationCallLog.isIncomingAndForwarded(BOB_SESSION)).toBe(true);
|
|
130
|
+
// When destination is set to the same user with a changed extension
|
|
131
|
+
const destinationExtensionChangedCallLog = CallLog_1.default.parse(Object.assign(Object.assign({}, CALL_LOG_RESPONSE), { destination_extension: `${CALL_LOG_RESPONSE.requested_extension}9`, destination_name: CALL_LOG_RESPONSE.requested_name, destination_user_uuid: CALL_LOG_RESPONSE.requested_user_uuid, requested_extension: `${CALL_LOG_RESPONSE.destination_extension}9`, requested_name: CALL_LOG_RESPONSE.destination_name, requested_user_uuid: CALL_LOG_RESPONSE.destination_user_uuid }));
|
|
132
|
+
expect(destinationExtensionChangedCallLog.isIncomingAndForwarded(BOB_SESSION)).toBe(true);
|
|
130
133
|
// When call direction is inbound
|
|
131
134
|
const inboundCallLog = CallLog_1.default.parse(Object.assign(Object.assign({}, CALL_LOG_RESPONSE), { call_direction: 'inbound' }));
|
|
132
135
|
expect(inboundCallLog.isIncomingAndForwarded(BOB_SESSION)).toBe(true);
|
package/lib/index.js
CHANGED
|
@@ -18,7 +18,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
18
18
|
};
|
|
19
19
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
20
|
exports.WebRTCClient = exports.SOCKET_EVENTS = exports.WebSocketClient = exports.AdHocAPIConference = exports.CallApi = exports.setIsMobile = exports.setOnRefreshTokenError = exports.setOnRefreshToken = exports.setCurrentServer = exports.setApiToken = exports.getApiClient = exports.SipLine = exports.MeetingAuthorization = exports.MeetingStatus = exports.ApiRequester = exports.Checker = exports.DebugDevice = exports.Meeting = exports.CTIPhone = exports.WebRTCPhone = exports.CallerID = exports.SwitchboardCall = exports.IndirectTransfer = exports.CallSession = exports.Room = exports.Relocation = exports.VoicemailFolder = exports.Voicemail = exports.Session = exports.LINE_STATE = exports.PROFILE_STATE = exports.Profile = exports.NotificationOptions = exports.Line = exports.Incall = exports.FORWARD_KEYS = exports.ForwardOption = exports.Features = exports.COUNTRIES = exports.Contact = exports.ChatRoom = exports.ChatMessage = exports.Recording = exports.CallLog = exports.Call = exports.SFUNotAvailableError = exports.ServerError = exports.BadResponse = exports.IssueReporter = exports.Emitter = void 0;
|
|
21
|
-
exports.SessionDescriptionHandler = exports.ExternalApp = exports.Agent = exports.WazoApiClient = void 0;
|
|
21
|
+
exports.SessionDescriptionHandler = exports.ExternalApp = exports.Agent = exports.BaseApiClient = exports.WazoApiClient = void 0;
|
|
22
22
|
const index_1 = __importDefault(require("./simple/index"));
|
|
23
23
|
var Emitter_1 = require("./utils/Emitter");
|
|
24
24
|
Object.defineProperty(exports, "Emitter", { enumerable: true, get: function () { return __importDefault(Emitter_1).default; } });
|
|
@@ -112,6 +112,8 @@ var web_rtc_client_1 = require("./web-rtc-client");
|
|
|
112
112
|
Object.defineProperty(exports, "WebRTCClient", { enumerable: true, get: function () { return __importDefault(web_rtc_client_1).default; } });
|
|
113
113
|
var api_client_1 = require("./api-client");
|
|
114
114
|
Object.defineProperty(exports, "WazoApiClient", { enumerable: true, get: function () { return __importDefault(api_client_1).default; } });
|
|
115
|
+
var base_api_client_1 = require("./base-api-client");
|
|
116
|
+
Object.defineProperty(exports, "BaseApiClient", { enumerable: true, get: function () { return __importDefault(base_api_client_1).default; } });
|
|
115
117
|
var Agent_1 = require("./domain/Agent");
|
|
116
118
|
Object.defineProperty(exports, "Agent", { enumerable: true, get: function () { return __importDefault(Agent_1).default; } });
|
|
117
119
|
var ExternalApp_1 = require("./domain/ExternalApp");
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const __1 = require("../..");
|
|
7
|
+
const getApiClient_1 = __importDefault(require("../getApiClient"));
|
|
8
|
+
describe('getApiClient', () => {
|
|
9
|
+
it('should return WazoApiClient by default', () => {
|
|
10
|
+
const globalClient = (0, getApiClient_1.default)();
|
|
11
|
+
expect(globalClient).toBeInstanceOf(__1.WazoApiClient);
|
|
12
|
+
expect(globalClient.amid).toBeDefined();
|
|
13
|
+
const serverClient = (0, getApiClient_1.default)('wazo-platorm.org');
|
|
14
|
+
expect(serverClient).toBeInstanceOf(__1.WazoApiClient);
|
|
15
|
+
expect(globalClient.amid).toBeDefined();
|
|
16
|
+
});
|
|
17
|
+
it.only('should return custom ApiClient', () => {
|
|
18
|
+
var _a;
|
|
19
|
+
const fooMethods = (client, baseUrl) => ({
|
|
20
|
+
test: (myString) => ({ client, myString, baseUrl }),
|
|
21
|
+
});
|
|
22
|
+
class FooApiClient extends __1.BaseApiClient {
|
|
23
|
+
constructor(args) {
|
|
24
|
+
super(args);
|
|
25
|
+
this.initializeEndpoints();
|
|
26
|
+
}
|
|
27
|
+
initializeEndpoints() {
|
|
28
|
+
super.initializeEndpoints();
|
|
29
|
+
this.foo = fooMethods(this.client, 'foo/0.1');
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
const extendedClient = (0, getApiClient_1.default)('foo.wazo-platform.org', FooApiClient);
|
|
33
|
+
expect(extendedClient).toBeInstanceOf(FooApiClient);
|
|
34
|
+
expect(extendedClient.auth).toBeDefined();
|
|
35
|
+
// @ts-ignore: we know amid is undefined, it's important to test it
|
|
36
|
+
expect(extendedClient.amid).not.toBeDefined();
|
|
37
|
+
const fooTest = (_a = extendedClient.foo) === null || _a === void 0 ? void 0 : _a.test('foo');
|
|
38
|
+
expect(fooTest.myString).toBe('foo');
|
|
39
|
+
expect(fooTest.client).toBeInstanceOf(__1.ApiRequester);
|
|
40
|
+
expect(fooTest.baseUrl).toBe('foo/0.1');
|
|
41
|
+
});
|
|
42
|
+
});
|
|
@@ -98,15 +98,17 @@ const fillClient = (apiClient) => {
|
|
|
98
98
|
if (requestTimeout) {
|
|
99
99
|
apiClient.setRequestTimeout(requestTimeout);
|
|
100
100
|
}
|
|
101
|
-
return apiClient;
|
|
102
101
|
};
|
|
103
|
-
|
|
102
|
+
const getApiClient = (forServer, Client = api_client_1.default) => {
|
|
104
103
|
const server = forServer || global.wazoCurrentServer || '';
|
|
105
104
|
if (server in global.wazoClients) {
|
|
106
|
-
|
|
105
|
+
fillClient(global.wazoClients[server]);
|
|
106
|
+
return global.wazoClients[server];
|
|
107
107
|
}
|
|
108
|
-
global.wazoClients[server] = new
|
|
108
|
+
global.wazoClients[server] = new Client({
|
|
109
109
|
server,
|
|
110
110
|
});
|
|
111
|
-
|
|
112
|
-
|
|
111
|
+
fillClient(global.wazoClients[server]);
|
|
112
|
+
return global.wazoClients[server];
|
|
113
|
+
};
|
|
114
|
+
exports.default = getApiClient;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { AuthD } from './api/auth';
|
|
2
1
|
import { ApplicationD } from './api/application';
|
|
3
2
|
import { ConfD } from './api/confd';
|
|
4
3
|
import { CtidNg } from './api/ctid-ng';
|
|
@@ -9,18 +8,8 @@ import { CallD } from './api/calld';
|
|
|
9
8
|
import { AgentD } from './api/agentd';
|
|
10
9
|
import { WebhookD } from './api/webhookd';
|
|
11
10
|
import { AmiD } from './api/amid';
|
|
12
|
-
import
|
|
13
|
-
|
|
14
|
-
server: string;
|
|
15
|
-
agent?: Record<string, any> | null | undefined;
|
|
16
|
-
clientId?: string;
|
|
17
|
-
refreshToken?: string | null | undefined;
|
|
18
|
-
isMobile?: boolean | null | undefined;
|
|
19
|
-
fetchOptions?: Record<string, any>;
|
|
20
|
-
};
|
|
21
|
-
export default class ApiClient {
|
|
22
|
-
client: ApiRequester;
|
|
23
|
-
auth: AuthD;
|
|
11
|
+
import BaseApiClient, { ConstructorParams } from './base-api-client';
|
|
12
|
+
export default class ApiClient extends BaseApiClient {
|
|
24
13
|
application: ApplicationD;
|
|
25
14
|
confd: ConfD;
|
|
26
15
|
ctidNg: CtidNg;
|
|
@@ -31,34 +20,7 @@ export default class ApiClient {
|
|
|
31
20
|
agentd: AgentD;
|
|
32
21
|
webhookd: WebhookD;
|
|
33
22
|
amid: AmiD;
|
|
34
|
-
|
|
35
|
-
onRefreshToken: ((...args: Array<any>) => any) | null | undefined;
|
|
36
|
-
onRefreshTokenError: ((...args: Array<any>) => any) | null | undefined;
|
|
37
|
-
refreshExpiration: number | null | undefined;
|
|
38
|
-
refreshBackend: string | null | undefined;
|
|
39
|
-
refreshTenantId: string | null | undefined;
|
|
40
|
-
refreshDomainName: string | null | undefined;
|
|
41
|
-
isMobile: boolean;
|
|
42
|
-
fetchOptions: Record<string, any>;
|
|
43
|
-
constructor({ server, agent, refreshToken, clientId, isMobile, fetchOptions, }: ConstructorParams);
|
|
23
|
+
constructor(args: ConstructorParams);
|
|
44
24
|
initializeEndpoints(): void;
|
|
45
|
-
updateParameters({ server, agent, clientId, fetchOptions, }: Record<string, any>): void;
|
|
46
|
-
forceRefreshToken(): Promise<string | null>;
|
|
47
|
-
refreshTokenCallback(): Promise<string | null>;
|
|
48
|
-
setToken(token: string): void;
|
|
49
|
-
setTenant(tenant: string): void;
|
|
50
|
-
setRefreshToken(refreshToken: string | null | undefined): void;
|
|
51
|
-
setRequestTimeout(requestTimeout: number): void;
|
|
52
|
-
setClientId(clientId: string | null | undefined): void;
|
|
53
|
-
setOnRefreshToken(onRefreshToken: (...args: Array<any>) => any): void;
|
|
54
|
-
setOnRefreshTokenError(callback: (...args: Array<any>) => any): void;
|
|
55
|
-
setRefreshExpiration(refreshExpiration: number): void;
|
|
56
|
-
setRefreshBackend(refreshBackend: string): void;
|
|
57
|
-
setRefreshTenantId(tenantId: string | null | undefined): void;
|
|
58
|
-
setRefreshDomainName(domainName: string | null | undefined): void;
|
|
59
|
-
setIsMobile(isMobile: boolean): void;
|
|
60
|
-
setFetchOptions(fetchOptions: Record<string, any>): void;
|
|
61
|
-
disableErrorLogging(): void;
|
|
62
25
|
}
|
|
63
|
-
export {};
|
|
64
26
|
//# sourceMappingURL=api-client.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api-client.d.ts","sourceRoot":"","sources":["../../src/api-client.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"api-client.d.ts","sourceRoot":"","sources":["../../src/api-client.ts"],"names":[],"mappings":"AAAA,OAA2B,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACrE,OAAqB,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAClD,OAAsB,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACtD,OAAoB,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAC/C,OAAwB,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC5D,OAAqB,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAClD,OAAqB,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAClD,OAAsB,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACrD,OAAwB,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAoB,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAa/C,OAAO,aAAa,EAAE,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAErE,MAAM,CAAC,OAAO,OAAO,SAAU,SAAQ,aAAa;IAClD,WAAW,EAAE,YAAY,CAAC;IAE1B,KAAK,EAAE,KAAK,CAAC;IAEb,MAAM,EAAE,MAAM,CAAC;IAEf,IAAI,EAAE,IAAI,CAAC;IAEX,QAAQ,EAAE,QAAQ,CAAC;IAEnB,KAAK,EAAE,KAAK,CAAC;IAEb,KAAK,EAAE,KAAK,CAAC;IAEb,MAAM,EAAE,MAAM,CAAC;IAEf,QAAQ,EAAE,QAAQ,CAAC;IAEnB,IAAI,EAAE,IAAI,CAAC;gBAEC,IAAI,EAAE,iBAAiB;IAKnC,mBAAmB,IAAI,IAAI;CAc5B"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { AuthD } from './api/auth';
|
|
2
|
+
import ApiRequester from './utils/api-requester';
|
|
3
|
+
export type ConstructorParams = {
|
|
4
|
+
server: string;
|
|
5
|
+
agent?: Record<string, any> | null | undefined;
|
|
6
|
+
clientId?: string;
|
|
7
|
+
refreshToken?: string | null | undefined;
|
|
8
|
+
isMobile?: boolean | null | undefined;
|
|
9
|
+
fetchOptions?: Record<string, any>;
|
|
10
|
+
};
|
|
11
|
+
export default class BaseApiClient {
|
|
12
|
+
client: ApiRequester;
|
|
13
|
+
auth: AuthD;
|
|
14
|
+
refreshToken: string | null | undefined;
|
|
15
|
+
onRefreshToken: ((...args: Array<any>) => any) | null | undefined;
|
|
16
|
+
onRefreshTokenError: ((...args: Array<any>) => any) | null | undefined;
|
|
17
|
+
refreshExpiration: number | null | undefined;
|
|
18
|
+
refreshBackend: string | null | undefined;
|
|
19
|
+
refreshTenantId: string | null | undefined;
|
|
20
|
+
refreshDomainName: string | null | undefined;
|
|
21
|
+
isMobile: boolean;
|
|
22
|
+
fetchOptions: Record<string, any>;
|
|
23
|
+
constructor({ server, agent, refreshToken, clientId, isMobile, fetchOptions, }: ConstructorParams);
|
|
24
|
+
initializeEndpoints(): void;
|
|
25
|
+
updateParameters({ server, agent, clientId, fetchOptions, }: Record<string, any>): void;
|
|
26
|
+
forceRefreshToken(): Promise<string | null>;
|
|
27
|
+
refreshTokenCallback(): Promise<string | null>;
|
|
28
|
+
setToken(token: string): void;
|
|
29
|
+
setTenant(tenant: string): void;
|
|
30
|
+
setRefreshToken(refreshToken: string | null | undefined): void;
|
|
31
|
+
setRequestTimeout(requestTimeout: number): void;
|
|
32
|
+
setClientId(clientId: string | null | undefined): void;
|
|
33
|
+
setOnRefreshToken(onRefreshToken: (...args: Array<any>) => any): void;
|
|
34
|
+
setOnRefreshTokenError(callback: (...args: Array<any>) => any): void;
|
|
35
|
+
setRefreshExpiration(refreshExpiration: number): void;
|
|
36
|
+
setRefreshBackend(refreshBackend: string): void;
|
|
37
|
+
setRefreshTenantId(tenantId: string | null | undefined): void;
|
|
38
|
+
setRefreshDomainName(domainName: string | null | undefined): void;
|
|
39
|
+
setIsMobile(isMobile: boolean): void;
|
|
40
|
+
setFetchOptions(fetchOptions: Record<string, any>): void;
|
|
41
|
+
disableErrorLogging(): void;
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=base-api-client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base-api-client.d.ts","sourceRoot":"","sources":["../../src/base-api-client.ts"],"names":[],"mappings":"AAAA,OAAoB,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAChD,OAAO,YAAY,MAAM,uBAAuB,CAAC;AAKjD,MAAM,MAAM,iBAAiB,GAAG;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,GAAG,SAAS,CAAC;IAC/C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACzC,QAAQ,CAAC,EAAE,OAAO,GAAG,IAAI,GAAG,SAAS,C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B,eAAe,CAAC,YAAY,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS;IAIvD,iBAAiB,CAAC,cAAc,EAAE,MAAM;IAIxC,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS;IAI/C,iBAAiB,CAAC,cAAc,EAAE,CAAC,GAAG,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC,KAAK,GAAG;IAI9D,sBAAsB,CAAC,QAAQ,EAAE,CAAC,GAAG,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC,KAAK,GAAG;IAI7D,oBAAoB,CAAC,iBAAiB,EAAE,MAAM;IAI9C,iBAAiB,CAAC,cAAc,EAAE,MAAM;IAIxC,kBAAkB,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS;IAKtD,oBAAoB,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS;IAI1D,WAAW,CAAC,QAAQ,EAAE,OAAO;IAI7B,eAAe,CAAC,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;IAKjD,mBAAmB;CAIpB"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare const AUTH_VERSION = "0.1";
|
|
2
|
+
export declare const APPLICATION_VERSION = "1.0";
|
|
3
|
+
export declare const CONFD_VERSION = "1.1";
|
|
4
|
+
export declare const CTIDNG_VERSION = "1.0";
|
|
5
|
+
export declare const DIRD_VERSION = "0.1";
|
|
6
|
+
export declare const CALL_LOGD_VERSION = "1.0";
|
|
7
|
+
export declare const CHATD_VERSION = "1.0";
|
|
8
|
+
export declare const CALLD_VERSION = "1.0";
|
|
9
|
+
export declare const AGENTD_VERSION = "1.0";
|
|
10
|
+
export declare const WEBHOOKD_VERSION = "1.0";
|
|
11
|
+
export declare const AMID_VERSION = "1.0";
|
|
12
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY,QAAQ,CAAC;AAClC,eAAO,MAAM,mBAAmB,QAAQ,CAAC;AACzC,eAAO,MAAM,aAAa,QAAQ,CAAC;AACnC,eAAO,MAAM,cAAc,QAAQ,CAAC;AACpC,eAAO,MAAM,YAAY,QAAQ,CAAC;AAClC,eAAO,MAAM,iBAAiB,QAAQ,CAAC;AACvC,eAAO,MAAM,aAAa,QAAQ,CAAC;AACnC,eAAO,MAAM,aAAa,QAAQ,CAAC;AACnC,eAAO,MAAM,cAAc,QAAQ,CAAC;AACpC,eAAO,MAAM,gBAAgB,QAAQ,CAAC;AACtC,eAAO,MAAM,YAAY,QAAQ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CallLog.d.ts","sourceRoot":"","sources":["../../../src/domain/CallLog.ts"],"names":[],"mappings":"AAEA,OAAO,OAAO,MAAM,WAAW,CAAC;AAChC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,SAAS,MAAM,aAAa,CAAC;AAGpC,eAAO,MAAM,gCAAgC,UAAU,CAAC;AAExD,MAAM,MAAM,eAAe,GAAG;IAC5B,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAClC,QAAQ,EAAE,OAAO,CAAC;IAClB,cAAc,EAAE,MAAM,CAAC;IACvB,qBAAqB,EAAE,MAAM,CAAC;IAC9B,gBAAgB,EAAE,MAAM,CAAC;IACzB,qBAAqB,EAAE,MAAM,GAAG,IAAI,CAAC;IACrC,QAAQ,EAAE,MAAM,CAAC;IACjB,GAAG,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,gBAAgB,EAAE,MAAM,CAAC;IACzB,WAAW,EAAE,MAAM,CAAC;IACpB,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,UAAU,EAAE,iBAAi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M,CAAC,SAAS,CAAC,KAAK,EAAE,QAAQ,GAAG,KAAK,CAAC,OAAO,CAAC;IAQjD,MAAM,CAAC,KAAK,CAAC,KAAK,EAAE,eAAe,GAAG,OAAO;IAiC7C,MAAM,CAAC,QAAQ,CAAC,KAAK,EAAE,eAAe,EAAE,OAAO,EAAE,OAAO,GAAG,OAAO;IAMlE,MAAM,CAAC,OAAO,CAAC,OAAO,EAAE,OAAO;gBAInB,EACV,MAAM,EACN,QAAQ,EACR,aAAa,EACb,WAAW,EACX,SAAS,EACT,MAAM,EACN,EAAE,EACF,QAAQ,EACR,KAAK,EACL,GAAG,EACH,UAAU,GACX,EAAE,gBAAgB;IAgBnB,eAAe,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,GAAG,OAAO;IAI1D,aAAa,CAAC,OAAO,EAAE,OAAO,GAAG,SAAS;IAY1C,eAAe,IAAI,OAAO;IAI1B,eAAe,IAAI,OAAO;IAK1B,cAAc,IAAI,OAAO;IAIzB,UAAU,IAAI,OAAO;IAIrB,UAAU,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO;IAQrC,UAAU,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO;IAYrC,sBAAsB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO;IAQjD,gBAAgB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO;IAQ3C,qBAAqB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO;IAIhD,gBAAgB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO;IAQ3C,eAAe,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO;IAI1C,aAAa;CAId"}
|
package/lib/types/index.d.ts
CHANGED
|
@@ -47,6 +47,7 @@ export { default as AdHocAPIConference } from './domain/AdHocAPIConference';
|
|
|
47
47
|
export { default as WebSocketClient, SOCKET_EVENTS } from './websocket-client';
|
|
48
48
|
export { default as WebRTCClient } from './web-rtc-client';
|
|
49
49
|
export { default as WazoApiClient } from './api-client';
|
|
50
|
+
export { default as BaseApiClient } from './base-api-client';
|
|
50
51
|
export { default as Agent, AgentResponse, AgentArguments } from './domain/Agent';
|
|
51
52
|
export { default as ExternalApp } from './domain/ExternalApp';
|
|
52
53
|
export { default as SessionDescriptionHandler } from './lib/WazoSessionDescriptionHandler';
|