@dereekb/zoom 12.1.0
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/LICENSE +21 -0
- package/README.md +6 -0
- package/index.cjs.d.ts +1 -0
- package/index.cjs.js +4346 -0
- package/index.esm.d.ts +1 -0
- package/index.esm.js +4293 -0
- package/nestjs/CHANGELOG.md +183 -0
- package/nestjs/README.md +11 -0
- package/nestjs/package.json +7 -0
- package/nestjs/src/index.d.ts +1 -0
- package/nestjs/src/index.js +5 -0
- package/nestjs/src/index.js.map +1 -0
- package/nestjs/src/lib/index.d.ts +2 -0
- package/nestjs/src/lib/index.js +6 -0
- package/nestjs/src/lib/index.js.map +1 -0
- package/nestjs/src/lib/oauth/index.d.ts +3 -0
- package/nestjs/src/lib/oauth/index.js +7 -0
- package/nestjs/src/lib/oauth/index.js.map +1 -0
- package/nestjs/src/lib/oauth/oauth.api.d.ts +12 -0
- package/nestjs/src/lib/oauth/oauth.api.js +41 -0
- package/nestjs/src/lib/oauth/oauth.api.js.map +1 -0
- package/nestjs/src/lib/oauth/oauth.config.d.ts +14 -0
- package/nestjs/src/lib/oauth/oauth.config.js +50 -0
- package/nestjs/src/lib/oauth/oauth.config.js.map +1 -0
- package/nestjs/src/lib/oauth/oauth.module.d.ts +29 -0
- package/nestjs/src/lib/oauth/oauth.module.js +36 -0
- package/nestjs/src/lib/oauth/oauth.module.js.map +1 -0
- package/nestjs/src/lib/oauth/oauth.service.d.ts +55 -0
- package/nestjs/src/lib/oauth/oauth.service.js +226 -0
- package/nestjs/src/lib/oauth/oauth.service.js.map +1 -0
- package/nestjs/src/lib/zoom/index.d.ts +3 -0
- package/nestjs/src/lib/zoom/index.js +7 -0
- package/nestjs/src/lib/zoom/index.js.map +1 -0
- package/nestjs/src/lib/zoom/zoom.api.d.ts +21 -0
- package/nestjs/src/lib/zoom/zoom.api.js +65 -0
- package/nestjs/src/lib/zoom/zoom.api.js.map +1 -0
- package/nestjs/src/lib/zoom/zoom.config.d.ts +10 -0
- package/nestjs/src/lib/zoom/zoom.config.js +15 -0
- package/nestjs/src/lib/zoom/zoom.config.js.map +1 -0
- package/nestjs/src/lib/zoom/zoom.module.d.ts +22 -0
- package/nestjs/src/lib/zoom/zoom.module.js +40 -0
- package/nestjs/src/lib/zoom/zoom.module.js.map +1 -0
- package/package.json +31 -0
- package/src/index.d.ts +1 -0
- package/src/lib/index.d.ts +7 -0
- package/src/lib/oauth/index.d.ts +5 -0
- package/src/lib/oauth/oauth.api.d.ts +39 -0
- package/src/lib/oauth/oauth.config.d.ts +44 -0
- package/src/lib/oauth/oauth.d.ts +71 -0
- package/src/lib/oauth/oauth.error.api.d.ts +30 -0
- package/src/lib/oauth/oauth.factory.d.ts +34 -0
- package/src/lib/zoom/index.d.ts +7 -0
- package/src/lib/zoom/zoom.api.meeting.d.ts +144 -0
- package/src/lib/zoom/zoom.api.meeting.type.d.ts +297 -0
- package/src/lib/zoom/zoom.api.user.d.ts +32 -0
- package/src/lib/zoom/zoom.api.user.type.d.ts +287 -0
- package/src/lib/zoom/zoom.config.d.ts +69 -0
- package/src/lib/zoom/zoom.error.api.d.ts +6 -0
- package/src/lib/zoom/zoom.factory.d.ts +23 -0
- package/src/lib/zoom.api.page.d.ts +73 -0
- package/src/lib/zoom.config.d.ts +39 -0
- package/src/lib/zoom.error.api.d.ts +145 -0
- package/src/lib/zoom.limit.d.ts +37 -0
- package/src/lib/zoom.type.d.ts +12 -0
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
|
4
|
+
|
|
5
|
+
# [12.1.0](https://github.com/dereekb/dbx-components/compare/v12.0.6-dev...v12.1.0) (2025-05-10)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* zoom api ([#29](https://github.com/dereekb/dbx-components/issues/29)) ([555a82a](https://github.com/dereekb/dbx-components/commit/555a82a321c82884d51bcff8bd54ad8c7b4e9f17))
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## [12.0.6](https://github.com/dereekb/dbx-components/compare/v12.0.5-dev...v12.0.6) (2025-05-07)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
## [12.0.5](https://github.com/dereekb/dbx-components/compare/v12.0.4-dev...v12.0.5) (2025-05-02)
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
## [12.0.4](https://github.com/dereekb/dbx-components/compare/v12.0.3-dev...v12.0.4) (2025-04-29)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
## [12.0.3](https://github.com/dereekb/dbx-components/compare/v12.0.2-dev...v12.0.3) (2025-04-29)
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
## [12.0.2](https://github.com/dereekb/dbx-components/compare/v12.0.1-dev...v12.0.2) (2025-04-26)
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
## [12.0.1](https://github.com/dereekb/dbx-components/compare/v12.0.0-dev...v12.0.1) (2025-04-25)
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
# [12.0.0](https://github.com/dereekb/dbx-components/compare/v11.1.8-dev...v12.0.0) (2025-04-23)
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
### Features
|
|
42
|
+
|
|
43
|
+
* angular 18 ([#28](https://github.com/dereekb/dbx-components/issues/28)) ([c8f5472](https://github.com/dereekb/dbx-components/commit/c8f5472026b47c8877f404a9c87bf7a3fa68b45b))
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
## [11.1.8](https://github.com/dereekb/dbx-components/compare/v11.1.7-dev...v11.1.8) (2025-04-04)
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
## [11.1.7](https://github.com/dereekb/dbx-components/compare/v11.1.6-dev...v11.1.7) (2025-03-26)
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
## [11.1.6](https://github.com/dereekb/dbx-components/compare/v11.1.5-dev...v11.1.6) (2025-03-20)
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
## [11.1.5](https://github.com/dereekb/dbx-components/compare/v11.1.4-dev...v11.1.5) (2025-03-20)
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
## [11.1.4](https://github.com/dereekb/dbx-components/compare/v11.1.3-dev...v11.1.4) (2025-03-17)
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
## [11.1.3](https://github.com/dereekb/dbx-components/compare/v11.1.2-dev...v11.1.3) (2025-03-07)
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
## [11.1.2](https://github.com/dereekb/dbx-components/compare/v11.1.1-dev...v11.1.2) (2025-03-04)
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
## [11.1.1](https://github.com/dereekb/dbx-components/compare/v11.1.0-dev...v11.1.1) (2025-03-03)
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
# [11.1.0](https://github.com/dereekb/dbx-components/compare/v11.0.21-dev...v11.1.0) (2025-02-28)
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
### Features
|
|
83
|
+
|
|
84
|
+
* notifications ([#27](https://github.com/dereekb/dbx-components/issues/27)) ([d83bdc3](https://github.com/dereekb/dbx-components/commit/d83bdc3c2f308a25cc4cb12e6eedd126e91c46a4))
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
## [11.0.21](https://github.com/dereekb/dbx-components/compare/v11.0.20-dev...v11.0.21) (2025-01-28)
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
## [11.0.20](https://github.com/dereekb/dbx-components/compare/v11.0.19-dev...v11.0.20) (2025-01-20)
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
## [11.0.19](https://github.com/dereekb/dbx-components/compare/v11.0.18-dev...v11.0.19) (2025-01-09)
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
## [11.0.18](https://github.com/dereekb/dbx-components/compare/v11.0.17-dev...v11.0.18) (2024-12-13)
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
## [11.0.17](https://github.com/dereekb/dbx-components/compare/v11.0.16-dev...v11.0.17) (2024-12-05)
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
## [11.0.16](https://github.com/dereekb/dbx-components/compare/v11.0.15-dev...v11.0.16) (2024-12-05)
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
## [11.0.15](https://github.com/dereekb/dbx-components/compare/v11.0.14-dev...v11.0.15) (2024-11-29)
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
## [11.0.14](https://github.com/dereekb/dbx-components/compare/v11.0.13-dev...v11.0.14) (2024-11-27)
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
## [11.0.13](https://github.com/dereekb/dbx-components/compare/v11.0.12-dev...v11.0.13) (2024-11-27)
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
## [11.0.12](https://github.com/dereekb/dbx-components/compare/v11.0.11-dev...v11.0.12) (2024-11-24)
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
## [11.0.10](https://github.com/dereekb/dbx-components/compare/v11.0.9-dev...v11.0.10) (2024-11-24)
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
## [11.0.9](https://github.com/dereekb/dbx-components/compare/v11.0.8-dev...v11.0.9) (2024-11-23)
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
## [11.0.8](https://github.com/dereekb/dbx-components/compare/v11.0.7-dev...v11.0.8) (2024-11-23)
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
## [11.0.7](https://github.com/dereekb/dbx-components/compare/v11.0.6-dev...v11.0.7) (2024-11-22)
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
## [11.0.6](https://github.com/dereekb/dbx-components/compare/v11.0.5-dev...v11.0.6) (2024-11-20)
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
## [11.0.5](https://github.com/dereekb/dbx-components/compare/v11.0.4-dev...v11.0.5) (2024-11-19)
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
## [11.0.4](https://github.com/dereekb/dbx-components/compare/v11.0.3-dev...v11.0.4) (2024-11-19)
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
## [11.0.3](https://github.com/dereekb/dbx-components/compare/v11.0.2-dev...v11.0.3) (2024-11-15)
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
## [11.0.2](https://github.com/dereekb/dbx-components/compare/v11.0.1-dev...v11.0.2) (2024-11-14)
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
## [11.0.1](https://github.com/dereekb/dbx-components/compare/v11.0.0-dev...v11.0.1) (2024-11-12)
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
# [11.0.0](https://github.com/dereekb/dbx-components/compare/v10.2.0-dev...v11.0.0) (2024-11-12)
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
# [10.2.0](https://github.com/dereekb/dbx-components/compare/v10.1.30-dev...v10.2.0) (2024-11-07)
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
### Features
|
|
176
|
+
|
|
177
|
+
* zoom recruit ([#26](https://github.com/dereekb/dbx-components/issues/26)) ([8e028fd](https://github.com/dereekb/dbx-components/commit/8e028fd6fc57fb276ce04d37ce010fb5a42d4157))
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
# Changelog
|
|
182
|
+
|
|
183
|
+
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
package/nestjs/README.md
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './lib';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../packages/zoom/nestjs/src/index.ts"],"names":[],"mappings":";;;AAAA,gDAAsB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/zoom/nestjs/src/lib/index.ts"],"names":[],"mappings":";;;AAAA,kDAAwB;AACxB,iDAAuB"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
tslib_1.__exportStar(require("./oauth.api"), exports);
|
|
5
|
+
tslib_1.__exportStar(require("./oauth.config"), exports);
|
|
6
|
+
tslib_1.__exportStar(require("./oauth.service"), exports);
|
|
7
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../packages/zoom/nestjs/src/lib/oauth/index.ts"],"names":[],"mappings":";;;AAAA,sDAA4B;AAC5B,yDAA+B;AAC/B,0DAAgC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ZoomOAuth, ZoomOAuthContext } from '@dereekb/zoom';
|
|
2
|
+
import { ZoomOAuthServiceConfig } from './oauth.config';
|
|
3
|
+
import { ZoomOAuthAccessTokenCacheService } from './oauth.service';
|
|
4
|
+
export declare class ZoomOAuthApi {
|
|
5
|
+
readonly config: ZoomOAuthServiceConfig;
|
|
6
|
+
readonly cacheService: ZoomOAuthAccessTokenCacheService;
|
|
7
|
+
readonly zoomOAuth: ZoomOAuth;
|
|
8
|
+
get oauthContext(): ZoomOAuthContext;
|
|
9
|
+
constructor(config: ZoomOAuthServiceConfig, cacheService: ZoomOAuthAccessTokenCacheService);
|
|
10
|
+
get serverAccessToken(): (input?: import("@dereekb/zoom").ZoomOAuthServerAccessTokenInput) => Promise<import("@dereekb/zoom").ZoomOAuthAccessTokenResponse>;
|
|
11
|
+
get userAccessToken(): (input: import("@dereekb/zoom").ZoomOAuthUserAccessTokenInput) => Promise<import("@dereekb/zoom").ZoomOAuthAccessTokenResponse>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ZoomOAuthApi = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const common_1 = require("@nestjs/common");
|
|
6
|
+
const zoom_1 = require("@dereekb/zoom");
|
|
7
|
+
const oauth_config_1 = require("./oauth.config");
|
|
8
|
+
const oauth_service_1 = require("./oauth.service");
|
|
9
|
+
let ZoomOAuthApi = class ZoomOAuthApi {
|
|
10
|
+
config;
|
|
11
|
+
cacheService;
|
|
12
|
+
zoomOAuth;
|
|
13
|
+
get oauthContext() {
|
|
14
|
+
return this.zoomOAuth.oauthContext;
|
|
15
|
+
}
|
|
16
|
+
constructor(config, cacheService) {
|
|
17
|
+
this.config = config;
|
|
18
|
+
this.cacheService = cacheService;
|
|
19
|
+
const accessTokenCache = config.zoomOAuth.accessTokenCache ? config.zoomOAuth.accessTokenCache : cacheService.loadZoomAccessTokenCache();
|
|
20
|
+
this.zoomOAuth = (0, zoom_1.zoomOAuthFactory)(config.factoryConfig ?? {})({
|
|
21
|
+
accessTokenCache,
|
|
22
|
+
...config.zoomOAuth
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
// MARK: Accessors
|
|
26
|
+
get serverAccessToken() {
|
|
27
|
+
return (0, zoom_1.serverAccessToken)(this.oauthContext);
|
|
28
|
+
}
|
|
29
|
+
get userAccessToken() {
|
|
30
|
+
return (0, zoom_1.userAccessToken)(this.oauthContext);
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
exports.ZoomOAuthApi = ZoomOAuthApi;
|
|
34
|
+
exports.ZoomOAuthApi = ZoomOAuthApi = tslib_1.__decorate([
|
|
35
|
+
(0, common_1.Injectable)(),
|
|
36
|
+
tslib_1.__param(0, (0, common_1.Inject)(oauth_config_1.ZoomOAuthServiceConfig)),
|
|
37
|
+
tslib_1.__param(1, (0, common_1.Inject)(oauth_service_1.ZoomOAuthAccessTokenCacheService)),
|
|
38
|
+
tslib_1.__metadata("design:paramtypes", [oauth_config_1.ZoomOAuthServiceConfig,
|
|
39
|
+
oauth_service_1.ZoomOAuthAccessTokenCacheService])
|
|
40
|
+
], ZoomOAuthApi);
|
|
41
|
+
//# sourceMappingURL=oauth.api.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"oauth.api.js","sourceRoot":"","sources":["../../../../../../../packages/zoom/nestjs/src/lib/oauth/oauth.api.ts"],"names":[],"mappings":";;;;AAAA,2CAAoD;AACpD,wCAAkH;AAClH,iDAAwD;AACxD,mDAAmE;AAG5D,IAAM,YAAY,GAAlB,MAAM,YAAY;IAQoB;IACU;IAR5C,SAAS,CAAY;IAE9B,IAAI,YAAY;QACd,OAAO,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC;IACrC,CAAC;IAED,YAC2C,MAA8B,EACpB,YAA8C;QADxD,WAAM,GAAN,MAAM,CAAwB;QACpB,iBAAY,GAAZ,YAAY,CAAkC;QAEjG,MAAM,gBAAgB,GAAG,MAAM,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAC,CAAC,YAAY,CAAC,wBAAwB,EAAE,CAAC;QACzI,IAAI,CAAC,SAAS,GAAG,IAAA,uBAAgB,EAAC,MAAM,CAAC,aAAa,IAAI,EAAE,CAAC,CAAC;YAC5D,gBAAgB;YAChB,GAAG,MAAM,CAAC,SAAS;SACpB,CAAC,CAAC;IACL,CAAC;IAED,kBAAkB;IAClB,IAAI,iBAAiB;QACnB,OAAO,IAAA,wBAAiB,EAAC,IAAI,CAAC,YAAY,CAAC,CAAC;IAC9C,CAAC;IAED,IAAI,eAAe;QACjB,OAAO,IAAA,sBAAe,EAAC,IAAI,CAAC,YAAY,CAAC,CAAC;IAC5C,CAAC;CACF,CAAA;AA1BY,oCAAY;uBAAZ,YAAY;IADxB,IAAA,mBAAU,GAAE;IASR,mBAAA,IAAA,eAAM,EAAC,qCAAsB,CAAC,CAAA;IAC9B,mBAAA,IAAA,eAAM,EAAC,gDAAgC,CAAC,CAAA;6CADQ,qCAAsB;QACN,gDAAgC;GATxF,YAAY,CA0BxB"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ZoomOAuthConfig, ZoomOAuthFactoryConfig } from '@dereekb/zoom';
|
|
2
|
+
import { ConfigService } from '@nestjs/config';
|
|
3
|
+
export interface ZoomOAuthServiceApiConfig extends Omit<ZoomOAuthConfig, 'userRefreshToken' | 'type'> {
|
|
4
|
+
readonly authEntityType: 'account';
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Configuration for ZoomService
|
|
8
|
+
*/
|
|
9
|
+
export declare abstract class ZoomOAuthServiceConfig {
|
|
10
|
+
readonly zoomOAuth: ZoomOAuthServiceApiConfig;
|
|
11
|
+
readonly factoryConfig?: ZoomOAuthFactoryConfig;
|
|
12
|
+
static assertValidConfig(config: ZoomOAuthServiceConfig): void;
|
|
13
|
+
}
|
|
14
|
+
export declare function readZoomOAuthServiceConfigFromConfigService(configService: ConfigService, prefix?: string): ZoomOAuthServiceConfig;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ZoomOAuthServiceConfig = void 0;
|
|
4
|
+
exports.readZoomOAuthServiceConfigFromConfigService = readZoomOAuthServiceConfigFromConfigService;
|
|
5
|
+
const util_1 = require("@dereekb/util");
|
|
6
|
+
/**
|
|
7
|
+
* Configuration for ZoomService
|
|
8
|
+
*/
|
|
9
|
+
class ZoomOAuthServiceConfig {
|
|
10
|
+
zoomOAuth;
|
|
11
|
+
factoryConfig;
|
|
12
|
+
static assertValidConfig(config) {
|
|
13
|
+
const { zoomOAuth } = config;
|
|
14
|
+
if (!zoomOAuth) {
|
|
15
|
+
throw new Error('ZoomOAuthServiceConfig.zoomOAuth is required');
|
|
16
|
+
}
|
|
17
|
+
else {
|
|
18
|
+
if (!zoomOAuth.accountId) {
|
|
19
|
+
throw new Error('ZoomOAuthServiceConfig.zoomOAuth.accountId is required');
|
|
20
|
+
}
|
|
21
|
+
else if (!zoomOAuth.clientSecret) {
|
|
22
|
+
throw new Error('ZoomOAuthServiceConfig.zoomOAuth.clientSecret is required');
|
|
23
|
+
}
|
|
24
|
+
else if (!zoomOAuth.clientId) {
|
|
25
|
+
throw new Error('ZoomOAuthServiceConfig.zoomOAuth.clientId is required');
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
exports.ZoomOAuthServiceConfig = ZoomOAuthServiceConfig;
|
|
31
|
+
function readZoomOAuthServiceConfigFromConfigService(configService, prefix) {
|
|
32
|
+
const prefixString = (0, util_1.characterPrefixSuffixInstance)({ suffix: '_', suffixEmptyString: false }).prefixSuffixString(prefix ?? '');
|
|
33
|
+
const accountIdKey = `${prefixString}ZOOM_ACCOUNT_ID`;
|
|
34
|
+
const clientIdKey = `${prefixString}ZOOM_CLIENT_ID`;
|
|
35
|
+
const clientSecretKey = `${prefixString}ZOOM_CLIENT_SECRET`;
|
|
36
|
+
const accountId = configService.getOrThrow(accountIdKey);
|
|
37
|
+
const clientId = configService.getOrThrow(clientIdKey);
|
|
38
|
+
const clientSecret = configService.getOrThrow(clientSecretKey);
|
|
39
|
+
const config = {
|
|
40
|
+
zoomOAuth: {
|
|
41
|
+
authEntityType: 'account',
|
|
42
|
+
accountId,
|
|
43
|
+
clientId,
|
|
44
|
+
clientSecret
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
ZoomOAuthServiceConfig.assertValidConfig(config);
|
|
48
|
+
return config;
|
|
49
|
+
}
|
|
50
|
+
//# sourceMappingURL=oauth.config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"oauth.config.js","sourceRoot":"","sources":["../../../../../../../packages/zoom/nestjs/src/lib/oauth/oauth.config.ts"],"names":[],"mappings":";;;AAgCA,kGAsBC;AAtDD,wCAA8D;AAQ9D;;GAEG;AACH,MAAsB,sBAAsB;IACjC,SAAS,CAA6B;IACtC,aAAa,CAA0B;IAEhD,MAAM,CAAC,iBAAiB,CAAC,MAA8B;QACrD,MAAM,EAAE,SAAS,EAAE,GAAG,MAAM,CAAC;QAE7B,IAAI,CAAC,SAAS,EAAE,CAAC;YACf,MAAM,IAAI,KAAK,CAAC,8CAA8C,CAAC,CAAC;QAClE,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,SAAS,CAAC,SAAS,EAAE,CAAC;gBACzB,MAAM,IAAI,KAAK,CAAC,wDAAwD,CAAC,CAAC;YAC5E,CAAC;iBAAM,IAAI,CAAC,SAAS,CAAC,YAAY,EAAE,CAAC;gBACnC,MAAM,IAAI,KAAK,CAAC,2DAA2D,CAAC,CAAC;YAC/E,CAAC;iBAAM,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,CAAC;gBAC/B,MAAM,IAAI,KAAK,CAAC,uDAAuD,CAAC,CAAC;YAC3E,CAAC;QACH,CAAC;IACH,CAAC;CACF;AAnBD,wDAmBC;AAED,SAAgB,2CAA2C,CAAC,aAA4B,EAAE,MAAe;IACvG,MAAM,YAAY,GAAG,IAAA,oCAA6B,EAAC,EAAE,MAAM,EAAE,GAAG,EAAE,iBAAiB,EAAE,KAAK,EAAE,CAAC,CAAC,kBAAkB,CAAC,MAAM,IAAI,EAAE,CAAC,CAAC;IAE/H,MAAM,YAAY,GAAG,GAAG,YAAY,iBAAiB,CAAC;IACtD,MAAM,WAAW,GAAG,GAAG,YAAY,gBAAgB,CAAC;IACpD,MAAM,eAAe,GAAG,GAAG,YAAY,oBAAoB,CAAC;IAE5D,MAAM,SAAS,GAAG,aAAa,CAAC,UAAU,CAAS,YAAY,CAAC,CAAC;IACjE,MAAM,QAAQ,GAAG,aAAa,CAAC,UAAU,CAAS,WAAW,CAAC,CAAC;IAC/D,MAAM,YAAY,GAAG,aAAa,CAAC,UAAU,CAAS,eAAe,CAAC,CAAC;IAEvE,MAAM,MAAM,GAA2B;QACrC,SAAS,EAAE;YACT,cAAc,EAAE,SAAS;YACzB,SAAS;YACT,QAAQ;YACR,YAAY;SACb;KACF,CAAC;IAEF,sBAAsB,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC;IACjD,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { ModuleMetadata } from '@nestjs/common';
|
|
2
|
+
import { ConfigService } from '@nestjs/config';
|
|
3
|
+
import { ZoomOAuthServiceConfig } from './oauth.config';
|
|
4
|
+
import { Maybe } from '@dereekb/util';
|
|
5
|
+
export type ZoomOAuthServiceConfigFactory = (configService: ConfigService) => ZoomOAuthServiceConfig;
|
|
6
|
+
export declare function zoomOAuthServiceConfigFactory(configService: ConfigService): ZoomOAuthServiceConfig;
|
|
7
|
+
export interface ProvideAppZoomOAuthMetadataConfig extends Pick<ModuleMetadata, 'imports' | 'exports' | 'providers'> {
|
|
8
|
+
/**
|
|
9
|
+
* The ZoomOAuthModule requires the following dependencies in order to initialze properly:
|
|
10
|
+
* - ZoomOAuthAccessTokenCacheService
|
|
11
|
+
*
|
|
12
|
+
* This module declaration makes it easier to import a module that exports those depenendencies.
|
|
13
|
+
*/
|
|
14
|
+
readonly dependencyModule?: Maybe<Required<ModuleMetadata>['imports']['0']>;
|
|
15
|
+
/**
|
|
16
|
+
* Optional override for the ZoomOAuthServiceConfigFactory.
|
|
17
|
+
*
|
|
18
|
+
* @default zoomOAuthServiceConfigFactory
|
|
19
|
+
*/
|
|
20
|
+
readonly zoomOAuthServiceConfigFactory?: ZoomOAuthServiceConfigFactory;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Convenience function used to generate ModuleMetadata for an app's ZoomOAuthModule.
|
|
24
|
+
*
|
|
25
|
+
* @param provide
|
|
26
|
+
* @param useFactory
|
|
27
|
+
* @returns
|
|
28
|
+
*/
|
|
29
|
+
export declare function appZoomOAuthModuleMetadata(config: ProvideAppZoomOAuthMetadataConfig): ModuleMetadata;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.zoomOAuthServiceConfigFactory = zoomOAuthServiceConfigFactory;
|
|
4
|
+
exports.appZoomOAuthModuleMetadata = appZoomOAuthModuleMetadata;
|
|
5
|
+
const config_1 = require("@nestjs/config");
|
|
6
|
+
const oauth_config_1 = require("./oauth.config");
|
|
7
|
+
const oauth_api_1 = require("./oauth.api");
|
|
8
|
+
function zoomOAuthServiceConfigFactory(configService) {
|
|
9
|
+
const config = (0, oauth_config_1.readZoomOAuthServiceConfigFromConfigService)(configService);
|
|
10
|
+
return config;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Convenience function used to generate ModuleMetadata for an app's ZoomOAuthModule.
|
|
14
|
+
*
|
|
15
|
+
* @param provide
|
|
16
|
+
* @param useFactory
|
|
17
|
+
* @returns
|
|
18
|
+
*/
|
|
19
|
+
function appZoomOAuthModuleMetadata(config) {
|
|
20
|
+
const { dependencyModule, imports, exports, providers } = config;
|
|
21
|
+
const dependencyModuleImport = dependencyModule ? [dependencyModule] : [];
|
|
22
|
+
return {
|
|
23
|
+
imports: [config_1.ConfigModule, ...dependencyModuleImport, ...(imports ?? [])],
|
|
24
|
+
exports: [oauth_api_1.ZoomOAuthApi, ...(exports ?? [])],
|
|
25
|
+
providers: [
|
|
26
|
+
{
|
|
27
|
+
provide: oauth_config_1.ZoomOAuthServiceConfig,
|
|
28
|
+
inject: [config_1.ConfigService],
|
|
29
|
+
useFactory: config.zoomOAuthServiceConfigFactory ?? zoomOAuthServiceConfigFactory
|
|
30
|
+
},
|
|
31
|
+
oauth_api_1.ZoomOAuthApi,
|
|
32
|
+
...(providers ?? [])
|
|
33
|
+
]
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=oauth.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"oauth.module.js","sourceRoot":"","sources":["../../../../../../../packages/zoom/nestjs/src/lib/oauth/oauth.module.ts"],"names":[],"mappings":";;AAQA,sEAGC;AA0BD,gEAiBC;AArDD,2CAA6D;AAC7D,iDAAqG;AACrG,2CAA2C;AAK3C,SAAgB,6BAA6B,CAAC,aAA4B;IACxE,MAAM,MAAM,GAAG,IAAA,0DAA2C,EAAC,aAAa,CAAC,CAAC;IAC1E,OAAO,MAAM,CAAC;AAChB,CAAC;AAmBD;;;;;;GAMG;AACH,SAAgB,0BAA0B,CAAC,MAAyC;IAClF,MAAM,EAAE,gBAAgB,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,GAAG,MAAM,CAAC;IACjE,MAAM,sBAAsB,GAAG,gBAAgB,CAAC,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IAE1E,OAAO;QACL,OAAO,EAAE,CAAC,qBAAY,EAAE,GAAG,sBAAsB,EAAE,GAAG,CAAC,OAAO,IAAI,EAAE,CAAC,CAAC;QACtE,OAAO,EAAE,CAAC,wBAAY,EAAE,GAAG,CAAC,OAAO,IAAI,EAAE,CAAC,CAAC;QAC3C,SAAS,EAAE;YACT;gBACE,OAAO,EAAE,qCAAsB;gBAC/B,MAAM,EAAE,CAAC,sBAAa,CAAC;gBACvB,UAAU,EAAE,MAAM,CAAC,6BAA6B,IAAI,6BAA6B;aAClF;YACD,wBAAY;YACZ,GAAG,CAAC,SAAS,IAAI,EAAE,CAAC;SACrB;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { ZoomAccessToken, ZoomAccessTokenCache } from '@dereekb/zoom';
|
|
2
|
+
import { Maybe } from '@dereekb/util';
|
|
3
|
+
/**
|
|
4
|
+
* Service used for retrieving ZoomAccessTokenCache for Zoom services.
|
|
5
|
+
*/
|
|
6
|
+
export declare abstract class ZoomOAuthAccessTokenCacheService {
|
|
7
|
+
/**
|
|
8
|
+
* Loads an ZoomAccessTokenCache for the given service key.
|
|
9
|
+
*
|
|
10
|
+
* @param service
|
|
11
|
+
*/
|
|
12
|
+
abstract loadZoomAccessTokenCache(): ZoomAccessTokenCache;
|
|
13
|
+
/**
|
|
14
|
+
* Creates or retrieves a cache for the given refresh token.
|
|
15
|
+
*
|
|
16
|
+
* @param refreshToken
|
|
17
|
+
*/
|
|
18
|
+
abstract cacheForRefreshToken?(refreshToken: string): ZoomAccessTokenCache;
|
|
19
|
+
}
|
|
20
|
+
export type ZoomOAuthAccessTokenCacheServiceWithRefreshToken = Required<ZoomOAuthAccessTokenCacheService>;
|
|
21
|
+
export type LogMergeZoomOAuthAccessTokenCacheServiceErrorFunction = (failedUpdates: (readonly [ZoomAccessTokenCache, unknown])[]) => void;
|
|
22
|
+
export declare function logMergeZoomOAuthAccessTokenCacheServiceErrorFunction(failedUpdates: (readonly [ZoomAccessTokenCache, unknown])[]): void;
|
|
23
|
+
/**
|
|
24
|
+
* Merges the input services in order to use some as a backup source.
|
|
25
|
+
*
|
|
26
|
+
* If once source fails retrieval, the next will be tried.
|
|
27
|
+
*
|
|
28
|
+
* When updating a cached token, it will update the token across all services.
|
|
29
|
+
*
|
|
30
|
+
* @param servicesToMerge Must include atleast one service. Empty arrays will throw an error.
|
|
31
|
+
*/
|
|
32
|
+
export declare function mergeZoomOAuthAccessTokenCacheServices(inputServicesToMerge: ZoomOAuthAccessTokenCacheService[], logError?: Maybe<boolean | LogMergeZoomOAuthAccessTokenCacheServiceErrorFunction>): ZoomOAuthAccessTokenCacheService;
|
|
33
|
+
/**
|
|
34
|
+
* Creates a ZoomOAuthAccessTokenCacheService that uses in-memory storage.
|
|
35
|
+
*
|
|
36
|
+
* @returns
|
|
37
|
+
*/
|
|
38
|
+
export declare function memoryZoomOAuthAccessTokenCacheService(existingToken?: Maybe<ZoomAccessToken>): ZoomOAuthAccessTokenCacheService;
|
|
39
|
+
export interface FileSystemZoomOAuthAccessTokenCacheService extends ZoomOAuthAccessTokenCacheService {
|
|
40
|
+
readTokenFile(): Promise<Maybe<ZoomOAuthAccessTokenCacheFileContent>>;
|
|
41
|
+
writeTokenFile(token: ZoomOAuthAccessTokenCacheFileContent): Promise<void>;
|
|
42
|
+
deleteTokenFile(): Promise<void>;
|
|
43
|
+
}
|
|
44
|
+
export declare const DEFAULT_FILE_ZOOM_ACCOUNTS_ACCESS_TOKEN_CACHE_SERVICE_PATH = ".tmp/zoom-access-tokens.json";
|
|
45
|
+
export type ZoomOAuthAccessTokenCacheFileContent = {
|
|
46
|
+
readonly token?: Maybe<ZoomAccessToken>;
|
|
47
|
+
};
|
|
48
|
+
/**
|
|
49
|
+
* Creates a ZoomOAuthAccessTokenCacheService that reads and writes the access token to the file system.
|
|
50
|
+
*
|
|
51
|
+
* Useful for testing.
|
|
52
|
+
*
|
|
53
|
+
* @returns
|
|
54
|
+
*/
|
|
55
|
+
export declare function fileZoomOAuthAccessTokenCacheService(filename?: string, useMemoryCache?: boolean): FileSystemZoomOAuthAccessTokenCacheService;
|