@bwi-mentorspaces/application-utils-npm 0.0.6 → 0.0.9
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/chat/index.d.ts +36 -36
- package/chat/index.js +58 -58
- package/chat/stream/enum/index.d.ts +33 -27
- package/chat/stream/enum/index.js +41 -34
- package/chat/stream/enum/index.js.map +1 -1
- package/chat/stream/index.d.ts +9 -9
- package/chat/stream/index.js +17 -17
- package/chat/stream/models/_/channel.data.d.ts +19 -19
- package/chat/stream/models/_/channel.data.js +2 -2
- package/chat/stream/models/_/channel.member.d.ts +14 -14
- package/chat/stream/models/_/channel.member.js +11 -11
- package/chat/stream/models/_/channel.response.d.ts +8 -8
- package/chat/stream/models/_/channel.response.js +2 -2
- package/chat/stream/models/_/event.data.d.ts +16 -0
- package/chat/stream/models/_/event.data.js +4 -0
- package/chat/stream/models/_/event.data.js.map +1 -0
- package/chat/stream/models/_/message.response.d.ts +8 -8
- package/chat/stream/models/_/message.response.js +2 -2
- package/chat/stream/models/_/stream.config.d.ts +22 -22
- package/chat/stream/models/_/stream.config.js +2 -2
- package/chat/stream/models/_/user.response.d.ts +8 -8
- package/chat/stream/models/_/user.response.js +2 -2
- package/chat/stream/models/index.d.ts +9 -7
- package/chat/stream/models/index.js +5 -5
- package/chat/stream/models/index.js.map +1 -1
- package/chat/stream/stream.api.d.ts +63 -63
- package/chat/stream/stream.api.js +76 -76
- package/chat/stream/stream.auth.d.ts +70 -70
- package/chat/stream/stream.auth.js +80 -80
- package/chat/stream/stream.base.d.ts +56 -56
- package/chat/stream/stream.base.js +93 -93
- package/chat/stream/stream.channel.d.ts +132 -118
- package/chat/stream/stream.channel.js +306 -285
- package/chat/stream/stream.channel.js.map +1 -1
- package/chat/stream/stream.error.d.ts +19 -19
- package/chat/stream/stream.error.js +17 -17
- package/chat/stream/stream.member.d.ts +75 -75
- package/chat/stream/stream.member.js +175 -175
- package/chat/stream/stream.message.d.ts +59 -59
- package/chat/stream/stream.message.js +112 -112
- package/chat/stream/stream.user.d.ts +49 -49
- package/chat/stream/stream.user.js +90 -90
- package/core/_/api-error.d.ts +24 -24
- package/core/_/api-error.js +21 -21
- package/core/_/api-response.d.ts +25 -25
- package/core/_/api-response.js +21 -21
- package/core/_/cors-headers.d.ts +16 -16
- package/core/_/cors-headers.js +32 -32
- package/core/_/model.d.ts +39 -31
- package/core/_/model.js +2 -2
- package/core/_/service-request.d.ts +66 -66
- package/core/_/service-request.js +104 -104
- package/core/_/service-request.js.map +1 -1
- package/core/index.d.ts +10 -10
- package/core/index.js +11 -11
- package/coverage/coverage-final.json +4 -0
- package/deployment/_/serverless.d.ts +26 -26
- package/deployment/_/serverless.js +43 -43
- package/deployment/index.d.ts +2 -2
- package/deployment/index.js +5 -5
- package/endpoint-test-factory/_/test-factory.d.ts +45 -45
- package/endpoint-test-factory/_/test-factory.js +91 -91
- package/endpoint-test-factory/index.d.ts +2 -2
- package/endpoint-test-factory/index.js +5 -5
- package/enums/index.d.ts +92 -92
- package/enums/index.js +2 -2
- package/jest.config.d.ts +12 -0
- package/jest.config.js +16 -0
- package/jest.config.js.map +1 -0
- package/meet/index.d.ts +36 -36
- package/meet/index.js +58 -58
- package/meet/tests/unit/twilio/twilio.room.test.d.ts +1 -0
- package/meet/tests/unit/twilio/twilio.room.test.js +33 -0
- package/meet/tests/unit/twilio/twilio.room.test.js.map +1 -0
- package/meet/twilio/enum/index.d.ts +6 -6
- package/meet/twilio/enum/index.js +10 -10
- package/meet/twilio/index.d.ts +5 -5
- package/meet/twilio/index.js +11 -11
- package/meet/twilio/models/_/room.data.d.ts +6 -6
- package/meet/twilio/models/_/room.data.js +2 -2
- package/meet/twilio/models/_/twilio.config.d.ts +29 -29
- package/meet/twilio/models/_/twilio.config.js +2 -2
- package/meet/twilio/models/index.d.ts +3 -3
- package/meet/twilio/models/index.js +2 -2
- package/meet/twilio/twilio.api.d.ts +28 -28
- package/meet/twilio/twilio.api.js +45 -45
- package/meet/twilio/twilio.auth.d.ts +55 -55
- package/meet/twilio/twilio.auth.js +83 -83
- package/meet/twilio/twilio.base.d.ts +41 -41
- package/meet/twilio/twilio.base.js +53 -53
- package/meet/twilio/twilio.room.d.ts +58 -46
- package/meet/twilio/twilio.room.js +141 -124
- package/meet/twilio/twilio.room.js.map +1 -1
- package/package.json +64 -57
- package/swagger/_/swagger.config.d.ts +21 -21
- package/swagger/_/swagger.config.js +2 -2
- package/swagger/_/swagger.d.ts +37 -37
- package/swagger/_/swagger.js +78 -78
- package/swagger/index.d.ts +3 -3
- package/swagger/index.js +5 -5
- package/types/index.d.ts +19 -19
- package/types/index.js +2 -2
- package/utils/_/encoder.d.ts +19 -19
- package/utils/_/encoder.js +27 -27
- package/utils/_/encryptor.d.ts +26 -26
- package/utils/_/encryptor.js +67 -67
- package/utils/_/hasher.d.ts +25 -25
- package/utils/_/hasher.js +63 -63
- package/utils/_/object-mapper.d.ts +12 -12
- package/utils/_/object-mapper.js +22 -22
- package/utils/_/string-formatter.d.ts +34 -34
- package/utils/_/string-formatter.js +49 -49
- package/utils/_/utc-date.d.ts +35 -35
- package/utils/_/utc-date.js +84 -84
- package/utils/index.d.ts +7 -7
- package/utils/index.js +15 -15
- package/validators/_/checker.d.ts +62 -62
- package/validators/_/checker.js +98 -98
- package/validators/_/regex.d.ts +98 -98
- package/validators/_/regex.js +142 -142
- package/validators/index.d.ts +3 -3
- package/validators/index.js +7 -7
|
@@ -1,45 +1,45 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* MUST READ Setup.md
|
|
3
|
-
*
|
|
4
|
-
* Access @ node_modules/application-utils-npm/endpoint-test-factory/_/Setup.md
|
|
5
|
-
*/
|
|
6
|
-
import Express from "express";
|
|
7
|
-
import { Response } from "supertest";
|
|
8
|
-
import { Any } from "../../types";
|
|
9
|
-
import { Method } from "../../enums";
|
|
10
|
-
/**
|
|
11
|
-
* Test factory class
|
|
12
|
-
*/
|
|
13
|
-
export declare class TestFactory {
|
|
14
|
-
private _xprs;
|
|
15
|
-
private _debug;
|
|
16
|
-
/**
|
|
17
|
-
* Test Factor Constructor
|
|
18
|
-
*
|
|
19
|
-
* @param {Express.Application} app service express instance
|
|
20
|
-
* @param {boolean?} debug flag for debugging
|
|
21
|
-
*/
|
|
22
|
-
constructor(app: Express.Application, debug?: boolean);
|
|
23
|
-
/**
|
|
24
|
-
* getter for app
|
|
25
|
-
*
|
|
26
|
-
* @returns {Request.SuperTest<Request.Test>} supertest request
|
|
27
|
-
*/
|
|
28
|
-
private get app();
|
|
29
|
-
/**
|
|
30
|
-
* Log message (this.log) if debug = true
|
|
31
|
-
*
|
|
32
|
-
* @param {any[]} msg message to log as arguments
|
|
33
|
-
*/
|
|
34
|
-
log(...msg: Any[]): void;
|
|
35
|
-
/**
|
|
36
|
-
* Run test
|
|
37
|
-
*
|
|
38
|
-
* @param {Method} method enum value for GET, POST, PUT, DELETE
|
|
39
|
-
* @param {string} path api call path
|
|
40
|
-
* @param {object?} data post data
|
|
41
|
-
* @param {Map?} headers map of headers to add to request
|
|
42
|
-
* @returns {void}
|
|
43
|
-
*/
|
|
44
|
-
test(method: Method, path: string, data?: object, headers?: Map<string, string>): Promise<Response>;
|
|
45
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* MUST READ Setup.md
|
|
3
|
+
*
|
|
4
|
+
* Access @ node_modules/application-utils-npm/endpoint-test-factory/_/Setup.md
|
|
5
|
+
*/
|
|
6
|
+
import Express from "express";
|
|
7
|
+
import { Response } from "supertest";
|
|
8
|
+
import { Any } from "../../types";
|
|
9
|
+
import { Method } from "../../enums";
|
|
10
|
+
/**
|
|
11
|
+
* Test factory class
|
|
12
|
+
*/
|
|
13
|
+
export declare class TestFactory {
|
|
14
|
+
private _xprs;
|
|
15
|
+
private _debug;
|
|
16
|
+
/**
|
|
17
|
+
* Test Factor Constructor
|
|
18
|
+
*
|
|
19
|
+
* @param {Express.Application} app service express instance
|
|
20
|
+
* @param {boolean?} debug flag for debugging
|
|
21
|
+
*/
|
|
22
|
+
constructor(app: Express.Application, debug?: boolean);
|
|
23
|
+
/**
|
|
24
|
+
* getter for app
|
|
25
|
+
*
|
|
26
|
+
* @returns {Request.SuperTest<Request.Test>} supertest request
|
|
27
|
+
*/
|
|
28
|
+
private get app();
|
|
29
|
+
/**
|
|
30
|
+
* Log message (this.log) if debug = true
|
|
31
|
+
*
|
|
32
|
+
* @param {any[]} msg message to log as arguments
|
|
33
|
+
*/
|
|
34
|
+
log(...msg: Any[]): void;
|
|
35
|
+
/**
|
|
36
|
+
* Run test
|
|
37
|
+
*
|
|
38
|
+
* @param {Method} method enum value for GET, POST, PUT, DELETE
|
|
39
|
+
* @param {string} path api call path
|
|
40
|
+
* @param {object?} data post data
|
|
41
|
+
* @param {Map?} headers map of headers to add to request
|
|
42
|
+
* @returns {void}
|
|
43
|
+
*/
|
|
44
|
+
test(method: Method, path: string, data?: object, headers?: Map<string, string>): Promise<Response>;
|
|
45
|
+
}
|
|
@@ -1,92 +1,92 @@
|
|
|
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
|
-
exports.TestFactory = void 0;
|
|
16
|
-
const supertest_1 = __importDefault(require("supertest"));
|
|
17
|
-
/**
|
|
18
|
-
* Test factory class
|
|
19
|
-
*/
|
|
20
|
-
class TestFactory {
|
|
21
|
-
/**
|
|
22
|
-
* Test Factor Constructor
|
|
23
|
-
*
|
|
24
|
-
* @param {Express.Application} app service express instance
|
|
25
|
-
* @param {boolean?} debug flag for debugging
|
|
26
|
-
*/
|
|
27
|
-
constructor(app, debug) {
|
|
28
|
-
this._xprs = app;
|
|
29
|
-
this._debug = debug ? debug : false;
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* getter for app
|
|
33
|
-
*
|
|
34
|
-
* @returns {Request.SuperTest<Request.Test>} supertest request
|
|
35
|
-
*/
|
|
36
|
-
get app() {
|
|
37
|
-
return (0, supertest_1.default)(this._xprs);
|
|
38
|
-
}
|
|
39
|
-
/**
|
|
40
|
-
* Log message (this.log) if debug = true
|
|
41
|
-
*
|
|
42
|
-
* @param {any[]} msg message to log as arguments
|
|
43
|
-
*/
|
|
44
|
-
log(...msg) {
|
|
45
|
-
if (this._debug) {
|
|
46
|
-
console.log(msg);
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
/**
|
|
50
|
-
* Run test
|
|
51
|
-
*
|
|
52
|
-
* @param {Method} method enum value for GET, POST, PUT, DELETE
|
|
53
|
-
* @param {string} path api call path
|
|
54
|
-
* @param {object?} data post data
|
|
55
|
-
* @param {Map?} headers map of headers to add to request
|
|
56
|
-
* @returns {void}
|
|
57
|
-
*/
|
|
58
|
-
test(method, path, data, headers) {
|
|
59
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
60
|
-
let res;
|
|
61
|
-
let reqHeaders = {};
|
|
62
|
-
if (headers && headers.size > 0) {
|
|
63
|
-
headers.forEach((value, name) => {
|
|
64
|
-
reqHeaders = Object.assign(Object.assign({}, headers), { [name]: value });
|
|
65
|
-
});
|
|
66
|
-
this.log("Request Headers: ", reqHeaders);
|
|
67
|
-
}
|
|
68
|
-
switch (method) {
|
|
69
|
-
case "GET" /* GET */:
|
|
70
|
-
res = yield this.app.get(path).set(reqHeaders);
|
|
71
|
-
break;
|
|
72
|
-
case "POST" /* POST */:
|
|
73
|
-
res = yield this.app.post(path).send(data).set(reqHeaders);
|
|
74
|
-
break;
|
|
75
|
-
case "PATCH" /* PATCH */:
|
|
76
|
-
res = yield this.app.patch(path).send(data).set(reqHeaders);
|
|
77
|
-
break;
|
|
78
|
-
case "PUT" /* PUT */:
|
|
79
|
-
res = yield this.app.put(path).send(data).set(reqHeaders);
|
|
80
|
-
break;
|
|
81
|
-
case "DELETE" /* DELETE */:
|
|
82
|
-
res = yield this.app.delete(path).send(data).set(reqHeaders);
|
|
83
|
-
break;
|
|
84
|
-
default:
|
|
85
|
-
break;
|
|
86
|
-
}
|
|
87
|
-
return res;
|
|
88
|
-
});
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
exports.TestFactory = TestFactory;
|
|
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
|
+
exports.TestFactory = void 0;
|
|
16
|
+
const supertest_1 = __importDefault(require("supertest"));
|
|
17
|
+
/**
|
|
18
|
+
* Test factory class
|
|
19
|
+
*/
|
|
20
|
+
class TestFactory {
|
|
21
|
+
/**
|
|
22
|
+
* Test Factor Constructor
|
|
23
|
+
*
|
|
24
|
+
* @param {Express.Application} app service express instance
|
|
25
|
+
* @param {boolean?} debug flag for debugging
|
|
26
|
+
*/
|
|
27
|
+
constructor(app, debug) {
|
|
28
|
+
this._xprs = app;
|
|
29
|
+
this._debug = debug ? debug : false;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* getter for app
|
|
33
|
+
*
|
|
34
|
+
* @returns {Request.SuperTest<Request.Test>} supertest request
|
|
35
|
+
*/
|
|
36
|
+
get app() {
|
|
37
|
+
return (0, supertest_1.default)(this._xprs);
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Log message (this.log) if debug = true
|
|
41
|
+
*
|
|
42
|
+
* @param {any[]} msg message to log as arguments
|
|
43
|
+
*/
|
|
44
|
+
log(...msg) {
|
|
45
|
+
if (this._debug) {
|
|
46
|
+
console.log(msg);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Run test
|
|
51
|
+
*
|
|
52
|
+
* @param {Method} method enum value for GET, POST, PUT, DELETE
|
|
53
|
+
* @param {string} path api call path
|
|
54
|
+
* @param {object?} data post data
|
|
55
|
+
* @param {Map?} headers map of headers to add to request
|
|
56
|
+
* @returns {void}
|
|
57
|
+
*/
|
|
58
|
+
test(method, path, data, headers) {
|
|
59
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
60
|
+
let res;
|
|
61
|
+
let reqHeaders = {};
|
|
62
|
+
if (headers && headers.size > 0) {
|
|
63
|
+
headers.forEach((value, name) => {
|
|
64
|
+
reqHeaders = Object.assign(Object.assign({}, headers), { [name]: value });
|
|
65
|
+
});
|
|
66
|
+
this.log("Request Headers: ", reqHeaders);
|
|
67
|
+
}
|
|
68
|
+
switch (method) {
|
|
69
|
+
case "GET" /* GET */:
|
|
70
|
+
res = yield this.app.get(path).set(reqHeaders);
|
|
71
|
+
break;
|
|
72
|
+
case "POST" /* POST */:
|
|
73
|
+
res = yield this.app.post(path).send(data).set(reqHeaders);
|
|
74
|
+
break;
|
|
75
|
+
case "PATCH" /* PATCH */:
|
|
76
|
+
res = yield this.app.patch(path).send(data).set(reqHeaders);
|
|
77
|
+
break;
|
|
78
|
+
case "PUT" /* PUT */:
|
|
79
|
+
res = yield this.app.put(path).send(data).set(reqHeaders);
|
|
80
|
+
break;
|
|
81
|
+
case "DELETE" /* DELETE */:
|
|
82
|
+
res = yield this.app.delete(path).send(data).set(reqHeaders);
|
|
83
|
+
break;
|
|
84
|
+
default:
|
|
85
|
+
break;
|
|
86
|
+
}
|
|
87
|
+
return res;
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
exports.TestFactory = TestFactory;
|
|
92
92
|
//# sourceMappingURL=test-factory.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { TestFactory } from "./_/test-factory";
|
|
2
|
-
export { TestFactory };
|
|
1
|
+
import { TestFactory } from "./_/test-factory";
|
|
2
|
+
export { TestFactory };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TestFactory = void 0;
|
|
4
|
-
const test_factory_1 = require("./_/test-factory");
|
|
5
|
-
Object.defineProperty(exports, "TestFactory", { enumerable: true, get: function () { return test_factory_1.TestFactory; } });
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TestFactory = void 0;
|
|
4
|
+
const test_factory_1 = require("./_/test-factory");
|
|
5
|
+
Object.defineProperty(exports, "TestFactory", { enumerable: true, get: function () { return test_factory_1.TestFactory; } });
|
|
6
6
|
//# sourceMappingURL=index.js.map
|
package/enums/index.d.ts
CHANGED
|
@@ -1,92 +1,92 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Encryption Type enum
|
|
3
|
-
*/
|
|
4
|
-
export declare const enum EncryptionType {
|
|
5
|
-
AES = 0
|
|
6
|
-
}
|
|
7
|
-
/**
|
|
8
|
-
* Type of request method
|
|
9
|
-
*/
|
|
10
|
-
export declare const enum Method {
|
|
11
|
-
GET = "GET",
|
|
12
|
-
POST = "POST",
|
|
13
|
-
PUT = "PUT",
|
|
14
|
-
PATCH = "PATCH",
|
|
15
|
-
DELETE = "DELETE",
|
|
16
|
-
OPTIONS = "OPTIONS"
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* Type for MimeTypes
|
|
20
|
-
*/
|
|
21
|
-
export declare const enum MimeType {
|
|
22
|
-
ApplicationJson = "application/json"
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* Type of Req/Res Header Names
|
|
26
|
-
*/
|
|
27
|
-
export declare const enum Header {
|
|
28
|
-
Authorization = "Authorization",
|
|
29
|
-
Accept = "Accept",
|
|
30
|
-
AcceptCharset = "Accept-Charset",
|
|
31
|
-
AcceptEncoding = "Accept-Encoding",
|
|
32
|
-
ContentType = "Content-Type",
|
|
33
|
-
Cookie = "Cookie",
|
|
34
|
-
AccessControlAllowOrigin = "Access-Control-Allow-Origin",
|
|
35
|
-
AccessControlAllowMethods = "Access-Control-Allow-Methods",
|
|
36
|
-
AccessControlAllowHeaders = "Access-Control-Allow-Headers",
|
|
37
|
-
XAmzDate = "X-Amz-Date",
|
|
38
|
-
XAmzSecurityToken = "X-Amz-Security-Token",
|
|
39
|
-
XApiKey = "X-Api-Key",
|
|
40
|
-
Metadata = "Metadata"
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* Enum type for Http Status code
|
|
44
|
-
*/
|
|
45
|
-
export declare const enum Status {
|
|
46
|
-
OK = 200,
|
|
47
|
-
BadRequest = 400,
|
|
48
|
-
Unauthorized = 401,
|
|
49
|
-
Forbidden = 403,
|
|
50
|
-
NotFound = 404,
|
|
51
|
-
MethodNotAllowed = 405,
|
|
52
|
-
Conflict = 409,
|
|
53
|
-
InternalServerError = 500,
|
|
54
|
-
NotImplemented = 501,
|
|
55
|
-
ServiceUnavailable = 503
|
|
56
|
-
}
|
|
57
|
-
/**
|
|
58
|
-
* Type of friendly Messages to display on UI
|
|
59
|
-
*/
|
|
60
|
-
export declare const enum Message {
|
|
61
|
-
InvalidData = "Invalid data.",
|
|
62
|
-
Failure = "A failure occurred.",
|
|
63
|
-
Conflict = "A conflict occurred.",
|
|
64
|
-
InternalServerError = "An Internal Service Error occurred.",
|
|
65
|
-
MissingApiKeyHeader = "Missing Api Key header.",
|
|
66
|
-
MissingAuthorizationHeader = "Missing Authorization header.",
|
|
67
|
-
MissingMetadataHeader = "Missing Metadata header.",
|
|
68
|
-
Forbidden = "Access forbidden!",
|
|
69
|
-
Unauthorized = "You're not authorized!",
|
|
70
|
-
ExpiredToken = "Token Expired.",
|
|
71
|
-
InvalidToken = "Invalid Token.",
|
|
72
|
-
ExistingUser = "User already exists."
|
|
73
|
-
}
|
|
74
|
-
/**
|
|
75
|
-
* Routing options
|
|
76
|
-
*/
|
|
77
|
-
export declare const enum RouteOption {
|
|
78
|
-
Filter = "filter"
|
|
79
|
-
}
|
|
80
|
-
/**
|
|
81
|
-
* Interval time
|
|
82
|
-
*/
|
|
83
|
-
export declare const enum Interval {
|
|
84
|
-
Year = "year",
|
|
85
|
-
Quarter = "quarter",
|
|
86
|
-
Month = "month",
|
|
87
|
-
Week = "week",
|
|
88
|
-
Day = "day",
|
|
89
|
-
Hour = "hour",
|
|
90
|
-
Minute = "minute",
|
|
91
|
-
Second = "second"
|
|
92
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* Encryption Type enum
|
|
3
|
+
*/
|
|
4
|
+
export declare const enum EncryptionType {
|
|
5
|
+
AES = 0
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Type of request method
|
|
9
|
+
*/
|
|
10
|
+
export declare const enum Method {
|
|
11
|
+
GET = "GET",
|
|
12
|
+
POST = "POST",
|
|
13
|
+
PUT = "PUT",
|
|
14
|
+
PATCH = "PATCH",
|
|
15
|
+
DELETE = "DELETE",
|
|
16
|
+
OPTIONS = "OPTIONS"
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Type for MimeTypes
|
|
20
|
+
*/
|
|
21
|
+
export declare const enum MimeType {
|
|
22
|
+
ApplicationJson = "application/json"
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Type of Req/Res Header Names
|
|
26
|
+
*/
|
|
27
|
+
export declare const enum Header {
|
|
28
|
+
Authorization = "Authorization",
|
|
29
|
+
Accept = "Accept",
|
|
30
|
+
AcceptCharset = "Accept-Charset",
|
|
31
|
+
AcceptEncoding = "Accept-Encoding",
|
|
32
|
+
ContentType = "Content-Type",
|
|
33
|
+
Cookie = "Cookie",
|
|
34
|
+
AccessControlAllowOrigin = "Access-Control-Allow-Origin",
|
|
35
|
+
AccessControlAllowMethods = "Access-Control-Allow-Methods",
|
|
36
|
+
AccessControlAllowHeaders = "Access-Control-Allow-Headers",
|
|
37
|
+
XAmzDate = "X-Amz-Date",
|
|
38
|
+
XAmzSecurityToken = "X-Amz-Security-Token",
|
|
39
|
+
XApiKey = "X-Api-Key",
|
|
40
|
+
Metadata = "Metadata"
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Enum type for Http Status code
|
|
44
|
+
*/
|
|
45
|
+
export declare const enum Status {
|
|
46
|
+
OK = 200,
|
|
47
|
+
BadRequest = 400,
|
|
48
|
+
Unauthorized = 401,
|
|
49
|
+
Forbidden = 403,
|
|
50
|
+
NotFound = 404,
|
|
51
|
+
MethodNotAllowed = 405,
|
|
52
|
+
Conflict = 409,
|
|
53
|
+
InternalServerError = 500,
|
|
54
|
+
NotImplemented = 501,
|
|
55
|
+
ServiceUnavailable = 503
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Type of friendly Messages to display on UI
|
|
59
|
+
*/
|
|
60
|
+
export declare const enum Message {
|
|
61
|
+
InvalidData = "Invalid data.",
|
|
62
|
+
Failure = "A failure occurred.",
|
|
63
|
+
Conflict = "A conflict occurred.",
|
|
64
|
+
InternalServerError = "An Internal Service Error occurred.",
|
|
65
|
+
MissingApiKeyHeader = "Missing Api Key header.",
|
|
66
|
+
MissingAuthorizationHeader = "Missing Authorization header.",
|
|
67
|
+
MissingMetadataHeader = "Missing Metadata header.",
|
|
68
|
+
Forbidden = "Access forbidden!",
|
|
69
|
+
Unauthorized = "You're not authorized!",
|
|
70
|
+
ExpiredToken = "Token Expired.",
|
|
71
|
+
InvalidToken = "Invalid Token.",
|
|
72
|
+
ExistingUser = "User already exists."
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Routing options
|
|
76
|
+
*/
|
|
77
|
+
export declare const enum RouteOption {
|
|
78
|
+
Filter = "filter"
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Interval time
|
|
82
|
+
*/
|
|
83
|
+
export declare const enum Interval {
|
|
84
|
+
Year = "year",
|
|
85
|
+
Quarter = "quarter",
|
|
86
|
+
Month = "month",
|
|
87
|
+
Week = "week",
|
|
88
|
+
Day = "day",
|
|
89
|
+
Hour = "hour",
|
|
90
|
+
Minute = "minute",
|
|
91
|
+
Second = "second"
|
|
92
|
+
}
|
package/enums/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
package/jest.config.d.ts
ADDED
package/jest.config.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* For a detailed explanation regarding each configuration property and type check, visit:
|
|
4
|
+
* https://jestjs.io/docs/configuration
|
|
5
|
+
*/
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.default = {
|
|
8
|
+
transform: { "^.+\\.ts?$": "esbuild-jest" },
|
|
9
|
+
clearMocks: true,
|
|
10
|
+
collectCoverage: true,
|
|
11
|
+
coverageDirectory: "coverage",
|
|
12
|
+
coverageProvider: "v8",
|
|
13
|
+
testMatch: ["**/tests/unit/**/*.test.ts"],
|
|
14
|
+
preset: "ts-jest"
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=jest.config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jest.config.js","sourceRoot":"","sources":["../jest.config.ts"],"names":[],"mappings":";AAAA;;;GAGG;;AAEH,kBAAe;IACX,SAAS,EAAE,EAAE,YAAY,EAAE,cAAc,EAAE;IAC3C,UAAU,EAAE,IAAI;IAChB,eAAe,EAAE,IAAI;IACrB,iBAAiB,EAAE,UAAU;IAC7B,gBAAgB,EAAE,IAAI;IACtB,SAAS,EAAE,CAAC,4BAA4B,CAAC;IACzC,MAAM,EAAE,SAAS;CACpB,CAAC"}
|
package/meet/index.d.ts
CHANGED
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
import { ClientType } from "./twilio/enum";
|
|
2
|
-
import { IMeetConfig } from "./twilio/models/_/twilio.config";
|
|
3
|
-
/**
|
|
4
|
-
* Meet declarations
|
|
5
|
-
*/
|
|
6
|
-
interface IMeet<T> {
|
|
7
|
-
client: T;
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* Meet implementation
|
|
11
|
-
*/
|
|
12
|
-
export declare class Meet<T> implements IMeet<T> {
|
|
13
|
-
private _client;
|
|
14
|
-
private _config;
|
|
15
|
-
private _clientType;
|
|
16
|
-
/**
|
|
17
|
-
* Meet constructor
|
|
18
|
-
*
|
|
19
|
-
* @param {ClientType} clientType client type
|
|
20
|
-
* @param {IMeetConfig} config meet configuration
|
|
21
|
-
*/
|
|
22
|
-
constructor(clientType: ClientType, config: IMeetConfig);
|
|
23
|
-
/**
|
|
24
|
-
* getter for client
|
|
25
|
-
*
|
|
26
|
-
* @returns {T} client of type T
|
|
27
|
-
*/
|
|
28
|
-
get client(): T;
|
|
29
|
-
/**
|
|
30
|
-
* initialize method
|
|
31
|
-
*
|
|
32
|
-
* @returns {void} promise of type void
|
|
33
|
-
*/
|
|
34
|
-
private init;
|
|
35
|
-
}
|
|
36
|
-
export {};
|
|
1
|
+
import { ClientType } from "./twilio/enum";
|
|
2
|
+
import { IMeetConfig } from "./twilio/models/_/twilio.config";
|
|
3
|
+
/**
|
|
4
|
+
* Meet declarations
|
|
5
|
+
*/
|
|
6
|
+
interface IMeet<T> {
|
|
7
|
+
client: T;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Meet implementation
|
|
11
|
+
*/
|
|
12
|
+
export declare class Meet<T> implements IMeet<T> {
|
|
13
|
+
private _client;
|
|
14
|
+
private _config;
|
|
15
|
+
private _clientType;
|
|
16
|
+
/**
|
|
17
|
+
* Meet constructor
|
|
18
|
+
*
|
|
19
|
+
* @param {ClientType} clientType client type
|
|
20
|
+
* @param {IMeetConfig} config meet configuration
|
|
21
|
+
*/
|
|
22
|
+
constructor(clientType: ClientType, config: IMeetConfig);
|
|
23
|
+
/**
|
|
24
|
+
* getter for client
|
|
25
|
+
*
|
|
26
|
+
* @returns {T} client of type T
|
|
27
|
+
*/
|
|
28
|
+
get client(): T;
|
|
29
|
+
/**
|
|
30
|
+
* initialize method
|
|
31
|
+
*
|
|
32
|
+
* @returns {void} promise of type void
|
|
33
|
+
*/
|
|
34
|
+
private init;
|
|
35
|
+
}
|
|
36
|
+
export {};
|