@aldb2b/common 1.0.439 → 1.0.441
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/build/tsconfig.tsbuildinfo +28 -12
- package/build/types/meeting-request-token.interface.d.ts +3 -0
- package/build/types/meeting-token.interface.d.ts +2 -0
- package/build/utils/encryptor.d.ts +2 -1
- package/build/utils/encryptor.js +6 -2
- package/build/utils/encryptor.js.map +1 -1
- package/package.json +1 -1
|
@@ -3961,9 +3961,14 @@
|
|
|
3961
3961
|
"signature": "8ea04b7be95f32deb59ccd59f208ff135ecd4389bb0be17470239769cd69a5ba",
|
|
3962
3962
|
"affectsGlobalScope": false
|
|
3963
3963
|
},
|
|
3964
|
+
"../src/types/encryptRecordType.enum.ts": {
|
|
3965
|
+
"version": "71e593193ee9ba10d404f9f3bd986d466ecfaeb6e7f0d1db61b0066c15e465b9",
|
|
3966
|
+
"signature": "78c33bc9cd3f22b712c611a5a3363b6e9b9cb397e85884518a0dda77de95021d",
|
|
3967
|
+
"affectsGlobalScope": false
|
|
3968
|
+
},
|
|
3964
3969
|
"../src/types/meeting-request-token.interface.ts": {
|
|
3965
|
-
"version": "
|
|
3966
|
-
"signature": "
|
|
3970
|
+
"version": "0f3fba16b8c5ad69fd1d2deb904c4012b9d0480b683d8bbd851f34e801a5fcd4",
|
|
3971
|
+
"signature": "a3ae105244e04b4210320ff6c6dea6b7ce01116a03739b2ae57beee675d78425",
|
|
3967
3972
|
"affectsGlobalScope": false
|
|
3968
3973
|
},
|
|
3969
3974
|
"../src/types/calendar-source-type.enum.ts": {
|
|
@@ -4017,13 +4022,8 @@
|
|
|
4017
4022
|
"affectsGlobalScope": false
|
|
4018
4023
|
},
|
|
4019
4024
|
"../src/types/meeting-token.interface.ts": {
|
|
4020
|
-
"version": "
|
|
4021
|
-
"signature": "
|
|
4022
|
-
"affectsGlobalScope": false
|
|
4023
|
-
},
|
|
4024
|
-
"../src/types/encryptRecordType.enum.ts": {
|
|
4025
|
-
"version": "71e593193ee9ba10d404f9f3bd986d466ecfaeb6e7f0d1db61b0066c15e465b9",
|
|
4026
|
-
"signature": "78c33bc9cd3f22b712c611a5a3363b6e9b9cb397e85884518a0dda77de95021d",
|
|
4025
|
+
"version": "a7b55a124a5f5967624c8f42d70bc04cc315a01f10c5f4078dfe46a6e643732a",
|
|
4026
|
+
"signature": "762db89071c3b383e9e3b06a69962834d250f5aab13f162815d6ad51c3957872",
|
|
4027
4027
|
"affectsGlobalScope": false
|
|
4028
4028
|
},
|
|
4029
4029
|
"../node_modules/@types/range-parser/index.d.ts": {
|
|
@@ -6902,8 +6902,8 @@
|
|
|
6902
6902
|
"affectsGlobalScope": false
|
|
6903
6903
|
},
|
|
6904
6904
|
"../src/utils/encryptor.ts": {
|
|
6905
|
-
"version": "
|
|
6906
|
-
"signature": "
|
|
6905
|
+
"version": "5625e194119f90d3294cbf6e0183a55220fc68b2bb46b140c714efa7c63a27d4",
|
|
6906
|
+
"signature": "111419e1fa999c17873584ee36122978678d6dac8dc6c90ff526e77a2741d36c",
|
|
6907
6907
|
"affectsGlobalScope": false
|
|
6908
6908
|
},
|
|
6909
6909
|
"../src/enums/elastic-sort-order.enum.ts": {
|
|
@@ -12467,11 +12467,18 @@
|
|
|
12467
12467
|
"../src/types/match.interface.ts": [
|
|
12468
12468
|
"../src/types/match-group.interface.ts"
|
|
12469
12469
|
],
|
|
12470
|
+
"../src/types/meeting-request-token.interface.ts": [
|
|
12471
|
+
"../src/types/encryptRecordType.enum.ts"
|
|
12472
|
+
],
|
|
12473
|
+
"../src/types/meeting-token.interface.ts": [
|
|
12474
|
+
"../src/types/encryptRecordType.enum.ts"
|
|
12475
|
+
],
|
|
12470
12476
|
"../src/utils/create-default-directories.ts": [
|
|
12471
12477
|
"../node_modules/@types/node/fs.d.ts"
|
|
12472
12478
|
],
|
|
12473
12479
|
"../src/utils/encryptor.ts": [
|
|
12474
|
-
"../node_modules/@nestjs/common/index.d.ts"
|
|
12480
|
+
"../node_modules/@nestjs/common/index.d.ts",
|
|
12481
|
+
"../src/types/encryptRecordType.enum.ts"
|
|
12475
12482
|
],
|
|
12476
12483
|
"../src/utils/equal-array-object.ts": [
|
|
12477
12484
|
"../src/utils/equal-object.ts"
|
|
@@ -17973,6 +17980,15 @@
|
|
|
17973
17980
|
"../src/types/match.interface.ts": [
|
|
17974
17981
|
"../src/types/match-group.interface.ts"
|
|
17975
17982
|
],
|
|
17983
|
+
"../src/types/meeting-request-token.interface.ts": [
|
|
17984
|
+
"../src/types/encryptRecordType.enum.ts"
|
|
17985
|
+
],
|
|
17986
|
+
"../src/types/meeting-token.interface.ts": [
|
|
17987
|
+
"../src/types/encryptRecordType.enum.ts"
|
|
17988
|
+
],
|
|
17989
|
+
"../src/utils/encryptor.ts": [
|
|
17990
|
+
"../src/types/encryptRecordType.enum.ts"
|
|
17991
|
+
],
|
|
17976
17992
|
"../src/utils/getEndpoint.ts": [
|
|
17977
17993
|
"../src/types/feature.interface.ts"
|
|
17978
17994
|
],
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
+
import { EncryptRecordType } from "./encryptRecordType.enum";
|
|
1
2
|
export interface MeetingRequestToken {
|
|
2
3
|
stepId?: string;
|
|
3
4
|
userId: string;
|
|
4
5
|
meetingRequestDate?: string;
|
|
5
6
|
id?: string;
|
|
6
7
|
eventId?: string;
|
|
8
|
+
companyId?: string;
|
|
9
|
+
moduleType?: EncryptRecordType;
|
|
7
10
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { EncryptRecordType } from "../types/encryptRecordType.enum";
|
|
1
2
|
export declare class Encryptor<T> {
|
|
2
3
|
private cryptr;
|
|
3
4
|
constructor(tokenSerializer: string);
|
|
4
5
|
encrypt(data: T): any;
|
|
5
|
-
decrypt(token: string): T;
|
|
6
|
+
decrypt(token: string, moduleType?: EncryptRecordType): T;
|
|
6
7
|
}
|
package/build/utils/encryptor.js
CHANGED
|
@@ -19,9 +19,13 @@ let Encryptor = class Encryptor {
|
|
|
19
19
|
encrypt(data) {
|
|
20
20
|
return this.cryptr.encrypt(JSON.stringify(data));
|
|
21
21
|
}
|
|
22
|
-
decrypt(token) {
|
|
22
|
+
decrypt(token, moduleType) {
|
|
23
23
|
try {
|
|
24
|
-
|
|
24
|
+
const decodedToken = JSON.parse(this.cryptr.decrypt(token));
|
|
25
|
+
if (moduleType && moduleType !== decodedToken.moduleType) {
|
|
26
|
+
throw new common_1.BadRequestException('Invalid token');
|
|
27
|
+
}
|
|
28
|
+
return decodedToken;
|
|
25
29
|
}
|
|
26
30
|
catch (err) {
|
|
27
31
|
throw new common_1.BadRequestException('Invalid token');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"encryptor.js","sourceRoot":"","sources":["../../src/utils/encryptor.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAAgE;
|
|
1
|
+
{"version":3,"file":"encryptor.js","sourceRoot":"","sources":["../../src/utils/encryptor.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAAgE;AAIhE,MAAM,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAA;AAGhC,IAAa,SAAS,GAAtB,MAAa,SAAS;IAEpB,YAAY,eAAuB;QACjC,IAAI,CAAC,MAAM,GAAG,IAAI,MAAM,CAAC,eAAe,CAAC,CAAA;IAC3C,CAAC;IAED,OAAO,CAAC,IAAO;QACb,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAA;IAClD,CAAC;IAED,OAAO,CAAC,KAAa,EAAE,UAA8B;QACnD,IAAI;YACF,MAAM,YAAY,GAAQ,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAQ,CAAA;YACvE,IAAI,UAAU,IAAI,UAAU,KAAK,YAAY,CAAC,UAAU,EAAE;gBACxD,MAAM,IAAI,4BAAmB,CAAC,eAAe,CAAC,CAAA;aAC/C;YACD,OAAO,YAAY,CAAA;SACpB;QAAC,OAAO,GAAG,EAAE;YACZ,MAAM,IAAI,4BAAmB,CAAC,eAAe,CAAC,CAAA;SAC/C;IACH,CAAC;CACF,CAAA;AArBY,SAAS;IADrB,mBAAU,EAAE;;GACA,SAAS,CAqBrB;AArBY,8BAAS"}
|