@bwi-mentorspaces/application-utils-npm 0.0.5 → 0.0.7

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.
Files changed (115) hide show
  1. package/chat/index.d.ts +36 -36
  2. package/chat/index.js +58 -58
  3. package/chat/stream/enum/index.d.ts +33 -27
  4. package/chat/stream/enum/index.js +41 -34
  5. package/chat/stream/enum/index.js.map +1 -1
  6. package/chat/stream/index.d.ts +9 -9
  7. package/chat/stream/index.js +17 -17
  8. package/chat/stream/models/_/channel.data.d.ts +19 -19
  9. package/chat/stream/models/_/channel.data.js +2 -2
  10. package/chat/stream/models/_/channel.member.d.ts +14 -14
  11. package/chat/stream/models/_/channel.member.js +11 -11
  12. package/chat/stream/models/_/channel.response.d.ts +8 -8
  13. package/chat/stream/models/_/channel.response.js +2 -2
  14. package/chat/stream/models/_/event.data.d.ts +16 -0
  15. package/chat/stream/models/_/event.data.js +4 -0
  16. package/chat/stream/models/_/event.data.js.map +1 -0
  17. package/chat/stream/models/_/message.response.d.ts +8 -8
  18. package/chat/stream/models/_/message.response.js +2 -2
  19. package/chat/stream/models/_/stream.config.d.ts +22 -22
  20. package/chat/stream/models/_/stream.config.js +2 -2
  21. package/chat/stream/models/_/user.response.d.ts +8 -8
  22. package/chat/stream/models/_/user.response.js +2 -2
  23. package/chat/stream/models/index.d.ts +9 -7
  24. package/chat/stream/models/index.js +5 -5
  25. package/chat/stream/models/index.js.map +1 -1
  26. package/chat/stream/stream.api.d.ts +63 -63
  27. package/chat/stream/stream.api.js +76 -76
  28. package/chat/stream/stream.auth.d.ts +70 -70
  29. package/chat/stream/stream.auth.js +80 -80
  30. package/chat/stream/stream.base.d.ts +56 -56
  31. package/chat/stream/stream.base.js +93 -93
  32. package/chat/stream/stream.channel.d.ts +132 -118
  33. package/chat/stream/stream.channel.js +306 -285
  34. package/chat/stream/stream.channel.js.map +1 -1
  35. package/chat/stream/stream.error.d.ts +19 -19
  36. package/chat/stream/stream.error.js +17 -17
  37. package/chat/stream/stream.member.d.ts +75 -75
  38. package/chat/stream/stream.member.js +175 -175
  39. package/chat/stream/stream.message.d.ts +59 -59
  40. package/chat/stream/stream.message.js +112 -112
  41. package/chat/stream/stream.user.d.ts +49 -49
  42. package/chat/stream/stream.user.js +90 -90
  43. package/core/_/api-error.d.ts +24 -24
  44. package/core/_/api-error.js +21 -21
  45. package/core/_/api-response.d.ts +25 -25
  46. package/core/_/api-response.js +21 -21
  47. package/core/_/cors-headers.d.ts +16 -16
  48. package/core/_/cors-headers.js +32 -32
  49. package/core/_/model.d.ts +39 -31
  50. package/core/_/model.js +2 -2
  51. package/core/_/service-request.d.ts +66 -66
  52. package/core/_/service-request.js +104 -104
  53. package/core/_/service-request.js.map +1 -1
  54. package/core/index.d.ts +10 -10
  55. package/core/index.js +11 -11
  56. package/deployment/_/serverless.d.ts +26 -26
  57. package/deployment/_/serverless.js +43 -43
  58. package/deployment/index.d.ts +2 -2
  59. package/deployment/index.js +5 -5
  60. package/endpoint-test-factory/_/test-factory.d.ts +45 -45
  61. package/endpoint-test-factory/_/test-factory.js +91 -91
  62. package/endpoint-test-factory/index.d.ts +2 -2
  63. package/endpoint-test-factory/index.js +5 -5
  64. package/enums/index.d.ts +92 -92
  65. package/enums/index.js +2 -2
  66. package/meet/index.d.ts +36 -36
  67. package/meet/index.js +58 -58
  68. package/meet/twilio/enum/index.d.ts +6 -6
  69. package/meet/twilio/enum/index.js +10 -10
  70. package/meet/twilio/index.d.ts +5 -5
  71. package/meet/twilio/index.js +11 -11
  72. package/meet/twilio/models/_/room.data.d.ts +6 -6
  73. package/meet/twilio/models/_/room.data.js +2 -2
  74. package/meet/twilio/models/_/twilio.config.d.ts +29 -29
  75. package/meet/twilio/models/_/twilio.config.js +2 -2
  76. package/meet/twilio/models/index.d.ts +3 -3
  77. package/meet/twilio/models/index.js +2 -2
  78. package/meet/twilio/twilio.api.d.ts +28 -28
  79. package/meet/twilio/twilio.api.js +45 -45
  80. package/meet/twilio/twilio.auth.d.ts +55 -55
  81. package/meet/twilio/twilio.auth.js +83 -83
  82. package/meet/twilio/twilio.base.d.ts +41 -41
  83. package/meet/twilio/twilio.base.js +53 -53
  84. package/meet/twilio/twilio.room.d.ts +46 -46
  85. package/meet/twilio/twilio.room.js +124 -124
  86. package/package.json +57 -57
  87. package/swagger/_/swagger.config.d.ts +21 -21
  88. package/swagger/_/swagger.config.js +2 -2
  89. package/swagger/_/swagger.d.ts +37 -37
  90. package/swagger/_/swagger.js +78 -78
  91. package/swagger/index.d.ts +3 -3
  92. package/swagger/index.js +5 -5
  93. package/types/index.d.ts +19 -19
  94. package/types/index.js +2 -2
  95. package/utils/_/encoder.d.ts +19 -19
  96. package/utils/_/encoder.js +27 -27
  97. package/utils/_/encryptor.d.ts +26 -26
  98. package/utils/_/encryptor.js +67 -67
  99. package/utils/_/hasher.d.ts +25 -25
  100. package/utils/_/hasher.js +63 -63
  101. package/utils/_/object-mapper.d.ts +12 -12
  102. package/utils/_/object-mapper.js +22 -22
  103. package/utils/_/string-formatter.d.ts +34 -34
  104. package/utils/_/string-formatter.js +49 -49
  105. package/utils/_/utc-date.d.ts +35 -35
  106. package/utils/_/utc-date.js +84 -84
  107. package/utils/index.d.ts +7 -7
  108. package/utils/index.js +15 -15
  109. package/validators/_/checker.d.ts +62 -62
  110. package/validators/_/checker.js +98 -98
  111. package/validators/_/regex.d.ts +98 -98
  112. package/validators/_/regex.js +142 -142
  113. package/validators/_/regex.js.map +1 -1
  114. package/validators/index.d.ts +3 -3
  115. package/validators/index.js +7 -7
@@ -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/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 {};
package/meet/index.js CHANGED
@@ -1,59 +1,59 @@
1
- "use strict";
2
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
- return c > 3 && r && Object.defineProperty(target, key, r), r;
7
- };
8
- var __metadata = (this && this.__metadata) || function (k, v) {
9
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.Meet = void 0;
13
- const tsyringe_1 = require("tsyringe");
14
- const enum_1 = require("./twilio/enum");
15
- const twilio_api_1 = require("./twilio/twilio.api");
16
- /**
17
- * Meet implementation
18
- */
19
- let Meet = class Meet {
20
- /**
21
- * Meet constructor
22
- *
23
- * @param {ClientType} clientType client type
24
- * @param {IMeetConfig} config meet configuration
25
- */
26
- constructor(clientType, config) {
27
- this._clientType = clientType;
28
- this._config = config;
29
- this.init();
30
- }
31
- // getter / setter
32
- /**
33
- * getter for client
34
- *
35
- * @returns {T} client of type T
36
- */
37
- get client() {
38
- return this._client;
39
- }
40
- // methods
41
- /**
42
- * initialize method
43
- *
44
- * @returns {void} promise of type void
45
- */
46
- init() {
47
- // change to switch when adding new client types
48
- //Create a new Stream Client
49
- if (this._clientType == enum_1.ClientType.Twilio) {
50
- this._client = new twilio_api_1.TwilioApi(this._config);
51
- }
52
- }
53
- };
54
- Meet = __decorate([
55
- (0, tsyringe_1.injectable)(),
56
- __metadata("design:paramtypes", [String, Object])
57
- ], Meet);
58
- exports.Meet = Meet;
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.Meet = void 0;
13
+ const tsyringe_1 = require("tsyringe");
14
+ const enum_1 = require("./twilio/enum");
15
+ const twilio_api_1 = require("./twilio/twilio.api");
16
+ /**
17
+ * Meet implementation
18
+ */
19
+ let Meet = class Meet {
20
+ /**
21
+ * Meet constructor
22
+ *
23
+ * @param {ClientType} clientType client type
24
+ * @param {IMeetConfig} config meet configuration
25
+ */
26
+ constructor(clientType, config) {
27
+ this._clientType = clientType;
28
+ this._config = config;
29
+ this.init();
30
+ }
31
+ // getter / setter
32
+ /**
33
+ * getter for client
34
+ *
35
+ * @returns {T} client of type T
36
+ */
37
+ get client() {
38
+ return this._client;
39
+ }
40
+ // methods
41
+ /**
42
+ * initialize method
43
+ *
44
+ * @returns {void} promise of type void
45
+ */
46
+ init() {
47
+ // change to switch when adding new client types
48
+ //Create a new Stream Client
49
+ if (this._clientType == enum_1.ClientType.Twilio) {
50
+ this._client = new twilio_api_1.TwilioApi(this._config);
51
+ }
52
+ }
53
+ };
54
+ Meet = __decorate([
55
+ (0, tsyringe_1.injectable)(),
56
+ __metadata("design:paramtypes", [String, Object])
57
+ ], Meet);
58
+ exports.Meet = Meet;
59
59
  //# sourceMappingURL=index.js.map
@@ -1,6 +1,6 @@
1
- /**
2
- * Client Type enum
3
- */
4
- export declare enum ClientType {
5
- Twilio = "twilio"
6
- }
1
+ /**
2
+ * Client Type enum
3
+ */
4
+ export declare enum ClientType {
5
+ Twilio = "twilio"
6
+ }
@@ -1,11 +1,11 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ClientType = void 0;
4
- /**
5
- * Client Type enum
6
- */
7
- var ClientType;
8
- (function (ClientType) {
9
- ClientType["Twilio"] = "twilio";
10
- })(ClientType = exports.ClientType || (exports.ClientType = {}));
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ClientType = void 0;
4
+ /**
5
+ * Client Type enum
6
+ */
7
+ var ClientType;
8
+ (function (ClientType) {
9
+ ClientType["Twilio"] = "twilio";
10
+ })(ClientType = exports.ClientType || (exports.ClientType = {}));
11
11
  //# sourceMappingURL=index.js.map
@@ -1,5 +1,5 @@
1
- import { TwilioAuth } from "./twilio.auth";
2
- import { TwilioApi } from "./twilio.api";
3
- import { TwilioBase } from "./twilio.base";
4
- import { TwilioRoom } from "./twilio.room";
5
- export { TwilioApi, TwilioAuth, TwilioBase, TwilioRoom };
1
+ import { TwilioAuth } from "./twilio.auth";
2
+ import { TwilioApi } from "./twilio.api";
3
+ import { TwilioBase } from "./twilio.base";
4
+ import { TwilioRoom } from "./twilio.room";
5
+ export { TwilioApi, TwilioAuth, TwilioBase, TwilioRoom };
@@ -1,12 +1,12 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TwilioRoom = exports.TwilioBase = exports.TwilioAuth = exports.TwilioApi = void 0;
4
- const twilio_auth_1 = require("./twilio.auth");
5
- Object.defineProperty(exports, "TwilioAuth", { enumerable: true, get: function () { return twilio_auth_1.TwilioAuth; } });
6
- const twilio_api_1 = require("./twilio.api");
7
- Object.defineProperty(exports, "TwilioApi", { enumerable: true, get: function () { return twilio_api_1.TwilioApi; } });
8
- const twilio_base_1 = require("./twilio.base");
9
- Object.defineProperty(exports, "TwilioBase", { enumerable: true, get: function () { return twilio_base_1.TwilioBase; } });
10
- const twilio_room_1 = require("./twilio.room");
11
- Object.defineProperty(exports, "TwilioRoom", { enumerable: true, get: function () { return twilio_room_1.TwilioRoom; } });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TwilioRoom = exports.TwilioBase = exports.TwilioAuth = exports.TwilioApi = void 0;
4
+ const twilio_auth_1 = require("./twilio.auth");
5
+ Object.defineProperty(exports, "TwilioAuth", { enumerable: true, get: function () { return twilio_auth_1.TwilioAuth; } });
6
+ const twilio_api_1 = require("./twilio.api");
7
+ Object.defineProperty(exports, "TwilioApi", { enumerable: true, get: function () { return twilio_api_1.TwilioApi; } });
8
+ const twilio_base_1 = require("./twilio.base");
9
+ Object.defineProperty(exports, "TwilioBase", { enumerable: true, get: function () { return twilio_base_1.TwilioBase; } });
10
+ const twilio_room_1 = require("./twilio.room");
11
+ Object.defineProperty(exports, "TwilioRoom", { enumerable: true, get: function () { return twilio_room_1.TwilioRoom; } });
12
12
  //# sourceMappingURL=index.js.map