@proteinjs/user-server 1.2.33 → 1.2.35
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/CHANGELOG.md +11 -0
- package/dist/generated/index.js +7 -7
- package/dist/generated/index.js.map +1 -1
- package/dist/src/authentication/authenticate.js +1 -1
- package/dist/src/authentication/authenticate.js.map +1 -1
- package/dist/src/authorization/userCache.js +1 -1
- package/dist/src/authorization/userCache.js.map +1 -1
- package/dist/src/routes/initiatePasswordReset.js +11 -11
- package/dist/src/routes/initiatePasswordReset.js.map +1 -1
- package/dist/src/services/Signup.d.ts.map +1 -1
- package/dist/src/services/Signup.js +39 -31
- package/dist/src/services/Signup.js.map +1 -1
- package/generated/index.ts +7 -7
- package/package.json +2 -2
- package/src/authentication/authenticate.ts +1 -1
- package/src/authorization/userCache.ts +1 -1
- package/src/routes/initiatePasswordReset.ts +1 -1
- package/src/services/Signup.ts +23 -15
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [1.2.34](https://github.com/proteinjs/user/compare/@proteinjs/user-server@1.2.33...@proteinjs/user-server@1.2.34) (2025-05-08)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* Email should be case insensitive when managing invites and auth ([9a4179b](https://github.com/proteinjs/user/commit/9a4179b6739dbec144444f5a07beac299df1a1be))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
## [1.2.28](https://github.com/proteinjs/user/compare/@proteinjs/user-server@1.2.25...@proteinjs/user-server@1.2.28) (2025-02-07)
|
|
7
18
|
|
|
8
19
|
|
package/dist/generated/index.js
CHANGED
|
@@ -26,29 +26,29 @@ require("crypto-js");
|
|
|
26
26
|
require("express-session");
|
|
27
27
|
require("moment");
|
|
28
28
|
/** Generate Source Graph */
|
|
29
|
-
var sourceGraph = "{\"options\":{\"directed\":true,\"multigraph\":false,\"compound\":false},\"nodes\":[{\"v\":\"@proteinjs/user-server/DbSessionStore\",\"value\":{\"packageName\":\"@proteinjs/user-server\",\"name\":\"DbSessionStore\",\"filePath\":\"/Users/brentbahry/repos/n3xa/packages/proteinjs/packages/user/packages/server/src/authentication/DbSessionStore.ts\",\"qualifiedName\":\"@proteinjs/user-server/DbSessionStore\",\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"properties\":[{\"name\":\"TWELVE_HOURS\",\"type\":null,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":true,\"visibility\":\"private\"},{\"name\":\"logger\",\"type\":null,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\"},{\"name\":\"get\",\"type\":null,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"},{\"name\":\"set\",\"type\":null,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"},{\"name\":\"touch\",\"type\":null,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"},{\"name\":\"destroy\",\"type\":null,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"}],\"methods\":[{\"name\":\"insertOrUpdate\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<void>\",\"filePath\":null,\"qualifiedName\":\"/Promise<void>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\",\"parameters\":[{\"name\":\"sessionId\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"session\",\"type\":{\"packageName\":\"\",\"name\":\"Express.SessionData\",\"filePath\":null,\"qualifiedName\":\"/Express.SessionData\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"cb\",\"type\":{\"packageName\":\"\",\"name\":\"(error?: any) => void\",\"filePath\":null,\"qualifiedName\":\"/(error?: any) => void\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"sweep\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<void>\",\"filePath\":null,\"qualifiedName\":\"/Promise<void>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\",\"parameters\":[]}],\"typeParameters\":[],\"directParentInterfaces\":[],\"directParentClasses\":[{\"packageName\":\"express-session\",\"name\":\"Store\",\"filePath\":null,\"qualifiedName\":\"express-session/Store\",\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"properties\":[],\"methods\":[],\"typeParameters\":[],\"directParentInterfaces\":[],\"directParentClasses\":[]}],\"sourceType\":2}},{\"v\":\"express-session/Store\"},{\"v\":\"@proteinjs/user-server/SocketIOSessionWatcher\",\"value\":{\"packageName\":\"@proteinjs/user-server\",\"name\":\"SocketIOSessionWatcher\",\"filePath\":\"/Users/brentbahry/repos/n3xa/packages/proteinjs/packages/user/packages/server/src/authentication/SocketIOSessionWatcher.ts\",\"qualifiedName\":\"@proteinjs/user-server/SocketIOSessionWatcher\",\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"properties\":[],\"methods\":[{\"name\":\"name\",\"returnType\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[]},{\"name\":\"table\",\"returnType\":{\"packageName\":\"\",\"name\":\"Table<Session>\",\"filePath\":null,\"qualifiedName\":\"/Table<Session>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[]},{\"name\":\"afterDelete\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<void>\",\"filePath\":null,\"qualifiedName\":\"/Promise<void>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"recordDeleteCount\",\"type\":{\"packageName\":\"\",\"name\":\"number\",\"filePath\":null,\"qualifiedName\":\"/number\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"deletedRecords\",\"type\":{\"packageName\":\"\",\"name\":\"T[]\",\"filePath\":null,\"qualifiedName\":\"/T[]\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"qb\",\"type\":{\"packageName\":\"\",\"name\":\"QueryBuilder<T>\",\"filePath\":null,\"qualifiedName\":\"/QueryBuilder<T>\",\"typeParameters\":null,\"directParents\":null}}]}],\"typeParameters\":[],\"directParentInterfaces\":[{\"packageName\":\"@proteinjs/db\",\"name\":\"TableWatcher\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db/TableWatcher\",\"properties\":[],\"methods\":[],\"typeParameters\":[\"@proteinjs/user/Session\"],\"directParents\":[]}],\"directParentClasses\":[],\"sourceType\":2}},{\"v\":\"@proteinjs/db/TableWatcher\"},{\"v\":\"@proteinjs/user-server/executePasswordReset\",\"value\":{\"packageName\":\"@proteinjs/user-server\",\"name\":\"executePasswordReset\",\"filePath\":\"/Users/brentbahry/repos/n3xa/packages/proteinjs/packages/user/packages/server/src/routes/executePasswordReset.ts\",\"qualifiedName\":\"@proteinjs/user-server/executePasswordReset\",\"type\":{\"packageName\":\"@proteinjs/server-api\",\"name\":\"Route\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/server-api/Route\",\"typeParameters\":[],\"directParents\":[{\"packageName\":\"@proteinjs/server-api\",\"name\":\"Route\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/server-api/Route\",\"typeParameters\":[],\"directParents\":null}]},\"isExported\":true,\"isConst\":true,\"sourceType\":0}},{\"v\":\"@proteinjs/server-api/Route\"},{\"v\":\"@proteinjs/user-server/initiatePasswordReset\",\"value\":{\"packageName\":\"@proteinjs/user-server\",\"name\":\"initiatePasswordReset\",\"filePath\":\"/Users/brentbahry/repos/n3xa/packages/proteinjs/packages/user/packages/server/src/routes/initiatePasswordReset.ts\",\"qualifiedName\":\"@proteinjs/user-server/initiatePasswordReset\",\"type\":{\"packageName\":\"@proteinjs/server-api\",\"name\":\"Route\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/server-api/Route\",\"typeParameters\":[],\"directParents\":[{\"packageName\":\"@proteinjs/server-api\",\"name\":\"Route\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/server-api/Route\",\"typeParameters\":[],\"directParents\":null}]},\"isExported\":true,\"isConst\":true,\"sourceType\":0}},{\"v\":\"@proteinjs/user-server/login\",\"value\":{\"packageName\":\"@proteinjs/user-server\",\"name\":\"login\",\"filePath\":\"/Users/brentbahry/repos/n3xa/packages/proteinjs/packages/user/packages/server/src/routes/login.ts\",\"qualifiedName\":\"@proteinjs/user-server/login\",\"type\":{\"packageName\":\"@proteinjs/server-api\",\"name\":\"Route\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/server-api/Route\",\"typeParameters\":[],\"directParents\":[{\"packageName\":\"@proteinjs/server-api\",\"name\":\"Route\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/server-api/Route\",\"typeParameters\":[],\"directParents\":null}]},\"isExported\":true,\"isConst\":true,\"sourceType\":0}},{\"v\":\"@proteinjs/user-server/logout\",\"value\":{\"packageName\":\"@proteinjs/user-server\",\"name\":\"logout\",\"filePath\":\"/Users/brentbahry/repos/n3xa/packages/proteinjs/packages/user/packages/server/src/routes/logout.ts\",\"qualifiedName\":\"@proteinjs/user-server/logout\",\"type\":{\"packageName\":\"@proteinjs/server-api\",\"name\":\"Route\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/server-api/Route\",\"typeParameters\":[],\"directParents\":[{\"packageName\":\"@proteinjs/server-api\",\"name\":\"Route\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/server-api/Route\",\"typeParameters\":[],\"directParents\":null}]},\"isExported\":true,\"isConst\":true,\"sourceType\":0}},{\"v\":\"@proteinjs/user-server/validateResetPasswordToken\",\"value\":{\"packageName\":\"@proteinjs/user-server\",\"name\":\"validateResetPasswordToken\",\"filePath\":\"/Users/brentbahry/repos/n3xa/packages/proteinjs/packages/user/packages/server/src/routes/validateResetPasswordToken.ts\",\"qualifiedName\":\"@proteinjs/user-server/validateResetPasswordToken\",\"type\":{\"packageName\":\"@proteinjs/server-api\",\"name\":\"Route\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/server-api/Route\",\"typeParameters\":[],\"directParents\":[{\"packageName\":\"@proteinjs/server-api\",\"name\":\"Route\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/server-api/Route\",\"typeParameters\":[],\"directParents\":null}]},\"isExported\":true,\"isConst\":true,\"sourceType\":0}},{\"v\":\"@proteinjs/user-server/DefaultInviteConfigFactory\",\"value\":{\"packageName\":\"@proteinjs/user-server\",\"name\":\"DefaultInviteConfigFactory\",\"filePath\":\"/Users/brentbahry/repos/n3xa/packages/proteinjs/packages/user/packages/server/src/services/Signup.ts\",\"qualifiedName\":\"@proteinjs/user-server/DefaultInviteConfigFactory\",\"properties\":[],\"methods\":[{\"name\":\"getConfig\",\"returnType\":{\"packageName\":\"@proteinjs/user-server\",\"name\":\"InviteConfig\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/user-server/InviteConfig\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":true,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[]}],\"typeParameters\":[],\"directParents\":[{\"packageName\":\"@proteinjs/reflection\",\"name\":\"Loadable\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/reflection/Loadable\",\"properties\":[],\"methods\":[],\"typeParameters\":[],\"directParents\":[]}],\"sourceType\":3}},{\"v\":\"@proteinjs/reflection/Loadable\"},{\"v\":\"@proteinjs/user-server/Signup\",\"value\":{\"packageName\":\"@proteinjs/user-server\",\"name\":\"Signup\",\"filePath\":\"/Users/brentbahry/repos/n3xa/packages/proteinjs/packages/user/packages/server/src/services/Signup.ts\",\"qualifiedName\":\"@proteinjs/user-server/Signup\",\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"properties\":[{\"name\":\"serviceMetadata\",\"type\":null,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"}],\"methods\":[{\"name\":\"createUser\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<void>\",\"filePath\":null,\"qualifiedName\":\"/Promise<void>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"user\",\"type\":{\"packageName\":\"@proteinjs/user\",\"name\":\"UserSignup\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/user/UserSignup\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"token\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"sendInvite\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<SendInviteResponse>\",\"filePath\":null,\"qualifiedName\":\"/Promise<SendInviteResponse>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"email\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"revokeInvite\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<void>\",\"filePath\":null,\"qualifiedName\":\"/Promise<void>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"email\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"initializeSignup\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<InitializeSignupResponse>\",\"filePath\":null,\"qualifiedName\":\"/Promise<InitializeSignupResponse>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"inviteToken\",\"type\":{\"packageName\":\"\",\"name\":\"string | undefined\",\"filePath\":null,\"qualifiedName\":\"/string | undefined\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"getValidInvite\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<Invite | null>\",\"filePath\":null,\"qualifiedName\":\"/Promise<Invite | null>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\",\"parameters\":[{\"name\":\"token\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null}}]}],\"typeParameters\":[],\"directParentInterfaces\":[{\"packageName\":\"@proteinjs/user\",\"name\":\"SignupService\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/user/SignupService\",\"properties\":[],\"methods\":[],\"typeParameters\":[],\"directParents\":[]}],\"directParentClasses\":[],\"sourceType\":2}},{\"v\":\"@proteinjs/user/SignupService\"},{\"v\":\"@proteinjs/user-server/UpdateUserInfo\",\"value\":{\"packageName\":\"@proteinjs/user-server\",\"name\":\"UpdateUserInfo\",\"filePath\":\"/Users/brentbahry/repos/n3xa/packages/proteinjs/packages/user/packages/server/src/services/UpdateUserInfo.ts\",\"qualifiedName\":\"@proteinjs/user-server/UpdateUserInfo\",\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"properties\":[{\"name\":\"serviceMetadata\",\"type\":null,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"}],\"methods\":[{\"name\":\"updateName\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<void>\",\"filePath\":null,\"qualifiedName\":\"/Promise<void>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"name\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"updatePassword\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<UpdatePasswordResponse>\",\"filePath\":null,\"qualifiedName\":\"/Promise<UpdatePasswordResponse>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"currentPassword\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"newPassword\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null}}]}],\"typeParameters\":[],\"directParentInterfaces\":[{\"packageName\":\"@proteinjs/user\",\"name\":\"UpdateUserInfoService\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/user/UpdateUserInfoService\",\"properties\":[],\"methods\":[],\"typeParameters\":[],\"directParents\":[]}],\"directParentClasses\":[],\"sourceType\":2}},{\"v\":\"@proteinjs/user/UpdateUserInfoService\"},{\"v\":\"@proteinjs/user-server/userCache\",\"value\":{\"packageName\":\"@proteinjs/user-server\",\"name\":\"userCache\",\"filePath\":\"/Users/brentbahry/repos/n3xa/packages/proteinjs/packages/user/packages/server/src/authorization/userCache.ts\",\"qualifiedName\":\"@proteinjs/user-server/userCache\",\"type\":{\"packageName\":\"\",\"name\":\"SessionDataCache<User>\",\"filePath\":null,\"qualifiedName\":\"/SessionDataCache<User>\",\"typeParameters\":[],\"directParents\":[{\"packageName\":\"@proteinjs/server-api\",\"name\":\"SessionDataCache\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/server-api/SessionDataCache\",\"typeParameters\":[\"@proteinjs/user/User\"],\"directParents\":null}]},\"isExported\":true,\"isConst\":true,\"sourceType\":0}},{\"v\":\"@proteinjs/server-api/SessionDataCache\"}],\"edges\":[{\"v\":\"@proteinjs/user-server/DbSessionStore\",\"w\":\"express-session/Store\",\"value\":\"extends class\"},{\"v\":\"@proteinjs/user-server/SocketIOSessionWatcher\",\"w\":\"@proteinjs/db/TableWatcher\",\"value\":\"implements interface\"},{\"v\":\"@proteinjs/user-server/executePasswordReset\",\"w\":\"@proteinjs/server-api/Route\",\"value\":\"has type\"},{\"v\":\"@proteinjs/user-server/initiatePasswordReset\",\"w\":\"@proteinjs/server-api/Route\",\"value\":\"has type\"},{\"v\":\"@proteinjs/user-server/login\",\"w\":\"@proteinjs/server-api/Route\",\"value\":\"has type\"},{\"v\":\"@proteinjs/user-server/logout\",\"w\":\"@proteinjs/server-api/Route\",\"value\":\"has type\"},{\"v\":\"@proteinjs/user-server/validateResetPasswordToken\",\"w\":\"@proteinjs/server-api/Route\",\"value\":\"has type\"},{\"v\":\"@proteinjs/user-server/DefaultInviteConfigFactory\",\"w\":\"@proteinjs/reflection/Loadable\",\"value\":\"extends interface\"},{\"v\":\"@proteinjs/user-server/Signup\",\"w\":\"@proteinjs/user/SignupService\",\"value\":\"implements interface\"},{\"v\":\"@proteinjs/user-server/UpdateUserInfo\",\"w\":\"@proteinjs/user/UpdateUserInfoService\",\"value\":\"implements interface\"},{\"v\":\"@proteinjs/user-server/userCache\",\"w\":\"@proteinjs/server-api/SessionDataCache\",\"value\":\"has type\"}]}";
|
|
29
|
+
var sourceGraph = "{\"options\":{\"directed\":true,\"multigraph\":false,\"compound\":false},\"nodes\":[{\"v\":\"@proteinjs/user-server/DbSessionStore\",\"value\":{\"packageName\":\"@proteinjs/user-server\",\"name\":\"DbSessionStore\",\"filePath\":\"/Users/brentbahry/repos/n3xa/packages/proteinjs/packages/user/packages/server/src/authentication/DbSessionStore.ts\",\"qualifiedName\":\"@proteinjs/user-server/DbSessionStore\",\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"properties\":[{\"name\":\"TWELVE_HOURS\",\"type\":null,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":true,\"visibility\":\"private\"},{\"name\":\"logger\",\"type\":null,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\"},{\"name\":\"get\",\"type\":null,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"},{\"name\":\"set\",\"type\":null,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"},{\"name\":\"touch\",\"type\":null,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"},{\"name\":\"destroy\",\"type\":null,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"}],\"methods\":[{\"name\":\"insertOrUpdate\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<void>\",\"filePath\":null,\"qualifiedName\":\"/Promise<void>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\",\"parameters\":[{\"name\":\"sessionId\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"session\",\"type\":{\"packageName\":\"\",\"name\":\"Express.SessionData\",\"filePath\":null,\"qualifiedName\":\"/Express.SessionData\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"cb\",\"type\":{\"packageName\":\"\",\"name\":\"(error?: any) => void\",\"filePath\":null,\"qualifiedName\":\"/(error?: any) => void\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"sweep\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<void>\",\"filePath\":null,\"qualifiedName\":\"/Promise<void>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\",\"parameters\":[]}],\"typeParameters\":[],\"directParentInterfaces\":[],\"directParentClasses\":[{\"packageName\":\"express-session\",\"name\":\"Store\",\"filePath\":null,\"qualifiedName\":\"express-session/Store\",\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"properties\":[],\"methods\":[],\"typeParameters\":[],\"directParentInterfaces\":[],\"directParentClasses\":[]}],\"sourceType\":2}},{\"v\":\"express-session/Store\"},{\"v\":\"@proteinjs/user-server/SocketIOSessionWatcher\",\"value\":{\"packageName\":\"@proteinjs/user-server\",\"name\":\"SocketIOSessionWatcher\",\"filePath\":\"/Users/brentbahry/repos/n3xa/packages/proteinjs/packages/user/packages/server/src/authentication/SocketIOSessionWatcher.ts\",\"qualifiedName\":\"@proteinjs/user-server/SocketIOSessionWatcher\",\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"properties\":[],\"methods\":[{\"name\":\"name\",\"returnType\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[]},{\"name\":\"table\",\"returnType\":{\"packageName\":\"\",\"name\":\"Table<Session>\",\"filePath\":null,\"qualifiedName\":\"/Table<Session>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[]},{\"name\":\"afterDelete\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<void>\",\"filePath\":null,\"qualifiedName\":\"/Promise<void>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"recordDeleteCount\",\"type\":{\"packageName\":\"\",\"name\":\"number\",\"filePath\":null,\"qualifiedName\":\"/number\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"deletedRecords\",\"type\":{\"packageName\":\"\",\"name\":\"T[]\",\"filePath\":null,\"qualifiedName\":\"/T[]\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"qb\",\"type\":{\"packageName\":\"\",\"name\":\"QueryBuilder<T>\",\"filePath\":null,\"qualifiedName\":\"/QueryBuilder<T>\",\"typeParameters\":null,\"directParents\":null}}]}],\"typeParameters\":[],\"directParentInterfaces\":[{\"packageName\":\"@proteinjs/db\",\"name\":\"TableWatcher\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db/TableWatcher\",\"properties\":[],\"methods\":[],\"typeParameters\":[\"@proteinjs/user/Session\"],\"directParents\":[]}],\"directParentClasses\":[],\"sourceType\":2}},{\"v\":\"@proteinjs/db/TableWatcher\"},{\"v\":\"@proteinjs/user-server/userCache\",\"value\":{\"packageName\":\"@proteinjs/user-server\",\"name\":\"userCache\",\"filePath\":\"/Users/brentbahry/repos/n3xa/packages/proteinjs/packages/user/packages/server/src/authorization/userCache.ts\",\"qualifiedName\":\"@proteinjs/user-server/userCache\",\"type\":{\"packageName\":\"\",\"name\":\"SessionDataCache<User>\",\"filePath\":null,\"qualifiedName\":\"/SessionDataCache<User>\",\"typeParameters\":[],\"directParents\":[{\"packageName\":\"@proteinjs/server-api\",\"name\":\"SessionDataCache\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/server-api/SessionDataCache\",\"typeParameters\":[\"@proteinjs/user/User\"],\"directParents\":null}]},\"isExported\":true,\"isConst\":true,\"sourceType\":0}},{\"v\":\"@proteinjs/server-api/SessionDataCache\"},{\"v\":\"@proteinjs/user-server/DefaultInviteConfigFactory\",\"value\":{\"packageName\":\"@proteinjs/user-server\",\"name\":\"DefaultInviteConfigFactory\",\"filePath\":\"/Users/brentbahry/repos/n3xa/packages/proteinjs/packages/user/packages/server/src/services/Signup.ts\",\"qualifiedName\":\"@proteinjs/user-server/DefaultInviteConfigFactory\",\"properties\":[],\"methods\":[{\"name\":\"getConfig\",\"returnType\":{\"packageName\":\"@proteinjs/user-server\",\"name\":\"InviteConfig\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/user-server/InviteConfig\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":true,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[]}],\"typeParameters\":[],\"directParents\":[{\"packageName\":\"@proteinjs/reflection\",\"name\":\"Loadable\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/reflection/Loadable\",\"properties\":[],\"methods\":[],\"typeParameters\":[],\"directParents\":[]}],\"sourceType\":3}},{\"v\":\"@proteinjs/reflection/Loadable\"},{\"v\":\"@proteinjs/user-server/Signup\",\"value\":{\"packageName\":\"@proteinjs/user-server\",\"name\":\"Signup\",\"filePath\":\"/Users/brentbahry/repos/n3xa/packages/proteinjs/packages/user/packages/server/src/services/Signup.ts\",\"qualifiedName\":\"@proteinjs/user-server/Signup\",\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"properties\":[{\"name\":\"serviceMetadata\",\"type\":null,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"}],\"methods\":[{\"name\":\"createUser\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<void>\",\"filePath\":null,\"qualifiedName\":\"/Promise<void>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"user\",\"type\":{\"packageName\":\"@proteinjs/user\",\"name\":\"UserSignup\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/user/UserSignup\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"token\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"sendInvite\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<SendInviteResponse>\",\"filePath\":null,\"qualifiedName\":\"/Promise<SendInviteResponse>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"email\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"revokeInvite\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<void>\",\"filePath\":null,\"qualifiedName\":\"/Promise<void>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"email\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"initializeSignup\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<InitializeSignupResponse>\",\"filePath\":null,\"qualifiedName\":\"/Promise<InitializeSignupResponse>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"inviteToken\",\"type\":{\"packageName\":\"\",\"name\":\"string | undefined\",\"filePath\":null,\"qualifiedName\":\"/string | undefined\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"getValidInvite\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<Invite | null>\",\"filePath\":null,\"qualifiedName\":\"/Promise<Invite | null>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\",\"parameters\":[{\"name\":\"token\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null}}]}],\"typeParameters\":[],\"directParentInterfaces\":[{\"packageName\":\"@proteinjs/user\",\"name\":\"SignupService\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/user/SignupService\",\"properties\":[],\"methods\":[],\"typeParameters\":[],\"directParents\":[]}],\"directParentClasses\":[],\"sourceType\":2}},{\"v\":\"@proteinjs/user/SignupService\"},{\"v\":\"@proteinjs/user-server/UpdateUserInfo\",\"value\":{\"packageName\":\"@proteinjs/user-server\",\"name\":\"UpdateUserInfo\",\"filePath\":\"/Users/brentbahry/repos/n3xa/packages/proteinjs/packages/user/packages/server/src/services/UpdateUserInfo.ts\",\"qualifiedName\":\"@proteinjs/user-server/UpdateUserInfo\",\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"properties\":[{\"name\":\"serviceMetadata\",\"type\":null,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"}],\"methods\":[{\"name\":\"updateName\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<void>\",\"filePath\":null,\"qualifiedName\":\"/Promise<void>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"name\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"updatePassword\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<UpdatePasswordResponse>\",\"filePath\":null,\"qualifiedName\":\"/Promise<UpdatePasswordResponse>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"currentPassword\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"newPassword\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null}}]}],\"typeParameters\":[],\"directParentInterfaces\":[{\"packageName\":\"@proteinjs/user\",\"name\":\"UpdateUserInfoService\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/user/UpdateUserInfoService\",\"properties\":[],\"methods\":[],\"typeParameters\":[],\"directParents\":[]}],\"directParentClasses\":[],\"sourceType\":2}},{\"v\":\"@proteinjs/user/UpdateUserInfoService\"},{\"v\":\"@proteinjs/user-server/executePasswordReset\",\"value\":{\"packageName\":\"@proteinjs/user-server\",\"name\":\"executePasswordReset\",\"filePath\":\"/Users/brentbahry/repos/n3xa/packages/proteinjs/packages/user/packages/server/src/routes/executePasswordReset.ts\",\"qualifiedName\":\"@proteinjs/user-server/executePasswordReset\",\"type\":{\"packageName\":\"@proteinjs/server-api\",\"name\":\"Route\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/server-api/Route\",\"typeParameters\":[],\"directParents\":[{\"packageName\":\"@proteinjs/server-api\",\"name\":\"Route\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/server-api/Route\",\"typeParameters\":[],\"directParents\":null}]},\"isExported\":true,\"isConst\":true,\"sourceType\":0}},{\"v\":\"@proteinjs/server-api/Route\"},{\"v\":\"@proteinjs/user-server/initiatePasswordReset\",\"value\":{\"packageName\":\"@proteinjs/user-server\",\"name\":\"initiatePasswordReset\",\"filePath\":\"/Users/brentbahry/repos/n3xa/packages/proteinjs/packages/user/packages/server/src/routes/initiatePasswordReset.ts\",\"qualifiedName\":\"@proteinjs/user-server/initiatePasswordReset\",\"type\":{\"packageName\":\"@proteinjs/server-api\",\"name\":\"Route\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/server-api/Route\",\"typeParameters\":[],\"directParents\":[{\"packageName\":\"@proteinjs/server-api\",\"name\":\"Route\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/server-api/Route\",\"typeParameters\":[],\"directParents\":null}]},\"isExported\":true,\"isConst\":true,\"sourceType\":0}},{\"v\":\"@proteinjs/user-server/login\",\"value\":{\"packageName\":\"@proteinjs/user-server\",\"name\":\"login\",\"filePath\":\"/Users/brentbahry/repos/n3xa/packages/proteinjs/packages/user/packages/server/src/routes/login.ts\",\"qualifiedName\":\"@proteinjs/user-server/login\",\"type\":{\"packageName\":\"@proteinjs/server-api\",\"name\":\"Route\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/server-api/Route\",\"typeParameters\":[],\"directParents\":[{\"packageName\":\"@proteinjs/server-api\",\"name\":\"Route\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/server-api/Route\",\"typeParameters\":[],\"directParents\":null}]},\"isExported\":true,\"isConst\":true,\"sourceType\":0}},{\"v\":\"@proteinjs/user-server/logout\",\"value\":{\"packageName\":\"@proteinjs/user-server\",\"name\":\"logout\",\"filePath\":\"/Users/brentbahry/repos/n3xa/packages/proteinjs/packages/user/packages/server/src/routes/logout.ts\",\"qualifiedName\":\"@proteinjs/user-server/logout\",\"type\":{\"packageName\":\"@proteinjs/server-api\",\"name\":\"Route\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/server-api/Route\",\"typeParameters\":[],\"directParents\":[{\"packageName\":\"@proteinjs/server-api\",\"name\":\"Route\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/server-api/Route\",\"typeParameters\":[],\"directParents\":null}]},\"isExported\":true,\"isConst\":true,\"sourceType\":0}},{\"v\":\"@proteinjs/user-server/validateResetPasswordToken\",\"value\":{\"packageName\":\"@proteinjs/user-server\",\"name\":\"validateResetPasswordToken\",\"filePath\":\"/Users/brentbahry/repos/n3xa/packages/proteinjs/packages/user/packages/server/src/routes/validateResetPasswordToken.ts\",\"qualifiedName\":\"@proteinjs/user-server/validateResetPasswordToken\",\"type\":{\"packageName\":\"@proteinjs/server-api\",\"name\":\"Route\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/server-api/Route\",\"typeParameters\":[],\"directParents\":[{\"packageName\":\"@proteinjs/server-api\",\"name\":\"Route\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/server-api/Route\",\"typeParameters\":[],\"directParents\":null}]},\"isExported\":true,\"isConst\":true,\"sourceType\":0}}],\"edges\":[{\"v\":\"@proteinjs/user-server/DbSessionStore\",\"w\":\"express-session/Store\",\"value\":\"extends class\"},{\"v\":\"@proteinjs/user-server/SocketIOSessionWatcher\",\"w\":\"@proteinjs/db/TableWatcher\",\"value\":\"implements interface\"},{\"v\":\"@proteinjs/user-server/userCache\",\"w\":\"@proteinjs/server-api/SessionDataCache\",\"value\":\"has type\"},{\"v\":\"@proteinjs/user-server/DefaultInviteConfigFactory\",\"w\":\"@proteinjs/reflection/Loadable\",\"value\":\"extends interface\"},{\"v\":\"@proteinjs/user-server/Signup\",\"w\":\"@proteinjs/user/SignupService\",\"value\":\"implements interface\"},{\"v\":\"@proteinjs/user-server/UpdateUserInfo\",\"w\":\"@proteinjs/user/UpdateUserInfoService\",\"value\":\"implements interface\"},{\"v\":\"@proteinjs/user-server/executePasswordReset\",\"w\":\"@proteinjs/server-api/Route\",\"value\":\"has type\"},{\"v\":\"@proteinjs/user-server/initiatePasswordReset\",\"w\":\"@proteinjs/server-api/Route\",\"value\":\"has type\"},{\"v\":\"@proteinjs/user-server/login\",\"w\":\"@proteinjs/server-api/Route\",\"value\":\"has type\"},{\"v\":\"@proteinjs/user-server/logout\",\"w\":\"@proteinjs/server-api/Route\",\"value\":\"has type\"},{\"v\":\"@proteinjs/user-server/validateResetPasswordToken\",\"w\":\"@proteinjs/server-api/Route\",\"value\":\"has type\"}]}";
|
|
30
30
|
/** Generate Source Links */
|
|
31
31
|
var DbSessionStore_1 = require("../src/authentication/DbSessionStore");
|
|
32
32
|
var SocketIOSessionWatcher_1 = require("../src/authentication/SocketIOSessionWatcher");
|
|
33
|
+
var userCache_1 = require("../src/authorization/userCache");
|
|
34
|
+
var Signup_1 = require("../src/services/Signup");
|
|
35
|
+
var UpdateUserInfo_1 = require("../src/services/UpdateUserInfo");
|
|
33
36
|
var executePasswordReset_1 = require("../src/routes/executePasswordReset");
|
|
34
37
|
var initiatePasswordReset_1 = require("../src/routes/initiatePasswordReset");
|
|
35
38
|
var login_1 = require("../src/routes/login");
|
|
36
39
|
var logout_1 = require("../src/routes/logout");
|
|
37
40
|
var validateResetPasswordToken_1 = require("../src/routes/validateResetPasswordToken");
|
|
38
|
-
var Signup_1 = require("../src/services/Signup");
|
|
39
|
-
var UpdateUserInfo_1 = require("../src/services/UpdateUserInfo");
|
|
40
|
-
var userCache_1 = require("../src/authorization/userCache");
|
|
41
41
|
var sourceLinks = {
|
|
42
42
|
'@proteinjs/user-server/DbSessionStore': DbSessionStore_1.DbSessionStore,
|
|
43
43
|
'@proteinjs/user-server/SocketIOSessionWatcher': SocketIOSessionWatcher_1.SocketIOSessionWatcher,
|
|
44
|
+
'@proteinjs/user-server/userCache': userCache_1.userCache,
|
|
45
|
+
'@proteinjs/user-server/Signup': Signup_1.Signup,
|
|
46
|
+
'@proteinjs/user-server/UpdateUserInfo': UpdateUserInfo_1.UpdateUserInfo,
|
|
44
47
|
'@proteinjs/user-server/executePasswordReset': executePasswordReset_1.executePasswordReset,
|
|
45
48
|
'@proteinjs/user-server/initiatePasswordReset': initiatePasswordReset_1.initiatePasswordReset,
|
|
46
49
|
'@proteinjs/user-server/login': login_1.login,
|
|
47
50
|
'@proteinjs/user-server/logout': logout_1.logout,
|
|
48
51
|
'@proteinjs/user-server/validateResetPasswordToken': validateResetPasswordToken_1.validateResetPasswordToken,
|
|
49
|
-
'@proteinjs/user-server/Signup': Signup_1.Signup,
|
|
50
|
-
'@proteinjs/user-server/UpdateUserInfo': UpdateUserInfo_1.UpdateUserInfo,
|
|
51
|
-
'@proteinjs/user-server/userCache': userCache_1.userCache,
|
|
52
52
|
};
|
|
53
53
|
/** Load Source Graph and Links */
|
|
54
54
|
var reflection_1 = require("@proteinjs/reflection");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../generated/index.ts"],"names":[],"mappings":";AAAA,oCAAoC;;;;;;;;;;;;;;;;AAEpC,yBAAuB;AACvB,mCAAiC;AACjC,6BAA2B;AAC3B,iCAA+B;AAC/B,6BAA2B;AAC3B,iCAA+B;AAC/B,2BAAyB;AACzB,qBAAmB;AACnB,2BAAyB;AACzB,kBAAgB;AAGhB,4BAA4B;AAE5B,IAAM,WAAW,GAAG,s1iBAAs1iB,CAAC;AAG32iB,4BAA4B;AAE5B,uEAAsE;AACtE,uFAAsF;AACtF,2EAA0E;AAC1E,6EAA4E;AAC5E,6CAA4C;AAC5C,+CAA8C;AAC9C,uFAAsF;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../generated/index.ts"],"names":[],"mappings":";AAAA,oCAAoC;;;;;;;;;;;;;;;;AAEpC,yBAAuB;AACvB,mCAAiC;AACjC,6BAA2B;AAC3B,iCAA+B;AAC/B,6BAA2B;AAC3B,iCAA+B;AAC/B,2BAAyB;AACzB,qBAAmB;AACnB,2BAAyB;AACzB,kBAAgB;AAGhB,4BAA4B;AAE5B,IAAM,WAAW,GAAG,s1iBAAs1iB,CAAC;AAG32iB,4BAA4B;AAE5B,uEAAsE;AACtE,uFAAsF;AACtF,4DAA2D;AAC3D,iDAAgD;AAChD,iEAAgE;AAChE,2EAA0E;AAC1E,6EAA4E;AAC5E,6CAA4C;AAC5C,+CAA8C;AAC9C,uFAAsF;AAEtF,IAAM,WAAW,GAAG;IACnB,uCAAuC,EAAE,+BAAc;IACvD,+CAA+C,EAAE,+CAAsB;IACvE,kCAAkC,EAAE,qBAAS;IAC7C,+BAA+B,EAAE,eAAM;IACvC,uCAAuC,EAAE,+BAAc;IACvD,6CAA6C,EAAE,2CAAoB;IACnE,8CAA8C,EAAE,6CAAqB;IACrE,8BAA8B,EAAE,aAAK;IACrC,+BAA+B,EAAE,eAAM;IACvC,mDAAmD,EAAE,uDAA0B;CAC/E,CAAC;AAGF,kCAAkC;AAElC,oDAAyD;AACzD,6BAAgB,CAAC,KAAK,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC;AAGjD,2CAAyB"}
|
|
@@ -67,7 +67,7 @@ function authenticate(email, password) {
|
|
|
67
67
|
return [2 /*return*/, true];
|
|
68
68
|
}
|
|
69
69
|
return [4 /*yield*/, (0, db_1.getDbAsSystem)().query(user_1.tables.User, {
|
|
70
|
-
email: email,
|
|
70
|
+
email: email.toLowerCase(),
|
|
71
71
|
password: (0, sha256_1.default)(password).toString(),
|
|
72
72
|
})];
|
|
73
73
|
case 1:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authenticate.js","sourceRoot":"","sources":["../../../src/authentication/authenticate.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,4DAAsC;AACtC,oCAA8C;AAC9C,wCAAyC;AACzC,4CAA2C;AAC3C,qEAAoE;AAEpE,SAAgB,oBAAoB,CAAC,uBAAgE;IACnG,IAAI,uBAAuB,EAAE;QAC3B,iDAAuB,CAAC,cAAc,CAAC,uBAAuB,CAAC,CAAC;KACjE;IAED,OAAO,YAAY,CAAC;AACtB,CAAC;AAND,oDAMC;AAED,SAAsB,YAAY,CAAC,KAAa,EAAE,QAAgB;;;;;;oBAC1D,MAAM,GAAG,IAAI,eAAM,CAAC,EAAE,IAAI,EAAE,cAAc,EAAE,CAAC,CAAC;oBAC9C,uBAAuB,GAAG,iDAAuB,CAAC,cAAc,EAAE,CAAC;oBACzE,IACE,uBAAuB;wBACvB,uBAAuB,CAAC,QAAQ,IAAI,KAAK;wBACzC,uBAAuB,CAAC,QAAQ,IAAI,QAAQ,EAC5C;wBACA,MAAM,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,kCAA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AAiC,EAAC;qBAC1C;oBAED,sBAAO,IAAI,EAAC;;;;CACb;AArBD,oCAqBC"}
|
|
@@ -67,7 +67,7 @@ exports.userCache = {
|
|
|
67
67
|
};
|
|
68
68
|
user = adminUser;
|
|
69
69
|
return [3 /*break*/, 3];
|
|
70
|
-
case 1: return [4 /*yield*/, (0, db_1.getDbAsSystem)().get(user_1.tables.User, { email: userEmail })];
|
|
70
|
+
case 1: return [4 /*yield*/, (0, db_1.getDbAsSystem)().get(user_1.tables.User, { email: userEmail.toLowerCase() })];
|
|
71
71
|
case 2:
|
|
72
72
|
user = _a.sent();
|
|
73
73
|
delete user['password'];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"userCache.js","sourceRoot":"","sources":["../../../src/authorization/userCache.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kDAA4B;AAE5B,oCAA8C;AAC9C,wCAAkF;AAClF,qFAAoF;AAEvE,QAAA,SAAS,GAA2B;IAC/C,GAAG,EAAE,6BAAsB;IAC3B,MAAM,EAAE,UAAO,SAAiB,EAAE,SAAiB;;;;;oBAC7C,IAAI,GAAG,gBAAS,CAAC;yBACjB,SAAS,EAAT,wBAAS;oBACL,gBAAgB,GAAG,iDAAuB,CAAC,cAAc,EAAE,CAAC;yBAC9D,CAAA,gBAAgB,IAAI,SAAS,IAAI,gBAAgB,CAAC,QAAQ,CAAA,EAA1D,wBAA0D;oBACtD,SAAS,GAAS;wBACtB,IAAI,EAAE,OAAO;wBACb,KAAK,EAAE,gBAAgB,CAAC,QAAQ;wBAChC,QAAQ,EAAE,gBAAgB,CAAC,QAAQ;wBACnC,aAAa,EAAE,IAAI;wBACnB,KAAK,EAAE,OAAO;wBACd,OAAO,EAAE,IAAA,gBAAM,GAAE;wBACjB,OAAO,EAAE,IAAA,gBAAM,GAAE;wBACjB,EAAE,EAAE,OAAO;qBACZ,CAAC;oBACF,IAAI,GAAG,SAAS,CAAC;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ePasswordReset = {
|
|
|
75
75
|
method: user_1.routes.initiatePasswordReset.method,
|
|
76
76
|
onRequest: function (request, response) { return __awaiter(void 0, void 0, void 0, function () {
|
|
77
77
|
var logger, email, db, genericResponse, user, currentTime, tokenCreationTime, timeDifference, emailSender, defaultConfigFactory, passwordResetToken, passwordResetTokenExpiration, config, _a, text, html, error_1;
|
|
78
|
-
var _b;
|
|
79
|
-
return __generator(this, function (
|
|
80
|
-
switch (
|
|
78
|
+
var _b, _c;
|
|
79
|
+
return __generator(this, function (_d) {
|
|
80
|
+
switch (_d.label) {
|
|
81
81
|
case 0:
|
|
82
82
|
logger = new logger_1.Logger({ name: 'initiatePasswordReset' });
|
|
83
|
-
email = request.body.email;
|
|
83
|
+
email = (_b = request.body.email) === null || _b === void 0 ? void 0 : _b.toLowerCase();
|
|
84
84
|
db = (0, db_1.getDbAsSystem)();
|
|
85
85
|
genericResponse = { message: 'If an account with that email exists, we have sent a password reset link.' };
|
|
86
86
|
return [4 /*yield*/, db.get(user_1.tables.User, { email: email })];
|
|
87
87
|
case 1:
|
|
88
|
-
user =
|
|
88
|
+
user = _d.sent();
|
|
89
89
|
if (!user) {
|
|
90
90
|
logger.info({ message: "Password reset requested for non-existent user", obj: { email: email } });
|
|
91
91
|
// Don't reveal that the user doesn't exist
|
|
@@ -110,25 +110,25 @@ exports.initiatePasswordReset = {
|
|
|
110
110
|
}
|
|
111
111
|
passwordResetToken = crypto_js_1.lib.WordArray.random(32).toString();
|
|
112
112
|
passwordResetTokenExpiration = (0, moment_1.default)().add(1, 'hour');
|
|
113
|
-
|
|
113
|
+
_d.label = 2;
|
|
114
114
|
case 2:
|
|
115
|
-
|
|
115
|
+
_d.trys.push([2, 5, , 6]);
|
|
116
116
|
config = defaultConfigFactory.getConfig();
|
|
117
117
|
_a = config.getEmailContent("".concat(user_1.uiRoutes.auth.passwordReset, "?token=").concat(passwordResetToken)), text = _a.text, html = _a.html;
|
|
118
118
|
// Send email containing a reset link
|
|
119
|
-
return [4 /*yield*/, emailSender.sendEmail(__assign({ to: user.email, subject: ((
|
|
119
|
+
return [4 /*yield*/, emailSender.sendEmail(__assign({ to: user.email, subject: ((_c = config.options) === null || _c === void 0 ? void 0 : _c.subject) || 'Reset Password', text: text, html: html }, config.options))];
|
|
120
120
|
case 3:
|
|
121
121
|
// Send email containing a reset link
|
|
122
|
-
|
|
122
|
+
_d.sent();
|
|
123
123
|
// If email is sent successfully, save reset token to user record
|
|
124
124
|
return [4 /*yield*/, db.update(user_1.tables.User, { id: user.id, passwordResetToken: passwordResetToken, passwordResetTokenExpiration: passwordResetTokenExpiration })];
|
|
125
125
|
case 4:
|
|
126
126
|
// If email is sent successfully, save reset token to user record
|
|
127
|
-
|
|
127
|
+
_d.sent();
|
|
128
128
|
response.send(genericResponse);
|
|
129
129
|
return [3 /*break*/, 6];
|
|
130
130
|
case 5:
|
|
131
|
-
error_1 =
|
|
131
|
+
error_1 = _d.sent();
|
|
132
132
|
logger.error({ message: "Failed to send password reset email", obj: { email: email }, error: error_1 });
|
|
133
133
|
response.status(500).send({ error: 'Failed to send password reset email. Please try again later.' });
|
|
134
134
|
return [3 /*break*/, 6];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"initiatePasswordReset.js","sourceRoot":"","sources":["../../../src/routes/initiatePasswordReset.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,oCAA8C;AAC9C,wCAA2D;AAC3D,4CAA2C;AAC3C,kDAA4B;AAC5B,wDAGiC;AACjC,uCAAgC;AAEhC;;;;;;;;;;;;GAYG;AACU,QAAA,qBAAqB,GAAU;IAC1C,IAAI,EAAE,aAAM,CAAC,qBAAqB,CAAC,IAAI;IACvC,MAAM,EAAE,aAAM,CAAC,qBAAqB,CAAC,MAAM;IAC3C,SAAS,EAAE,UAAO,OAAO,EAAE,QAAQ;;;;;;oBAC3B,MAAM,GAAG,IAAI,eAAM,CAAC,EAAE,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up.d.ts","sourceRoot":"","sources":["../../../src/services/Signup.ts"],"names":[],"mappings":"AACA,OAAO,EACL,kBAAkB,EAIlB,aAAa,EACb,wBAAwB,EAGxB,UAAU,EACX,MAAM,iBAAiB,CAAC;AAUzB,OAAO,EAAE,QAAQ,EAAoB,MAAM,uBAAuB,CAAC;AAEnE,MAAM,WAAW,YAAY;IAC3B,YAAY,EAAE,OAAO,CAAC;CACvB;AAED,MAAM,WAAW,0BAA2B,SAAQ,QAAQ;IAC1D,SAAS,IAAI,YAAY,CAAC;CAC3B;AAED,eAAO,MAAM,6BAA6B,QAAO,0BAShD,CAAC;AAEF,qBAAa,MAAO,YAAW,aAAa;IACnC,eAAe;;oCAEM,MAAM,QAAQ,GAAG,EAAE;;MAQ7C;IAEI,UAAU,CAAC,IAAI,EAAE,UAAU,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IA2D3D,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,CAAC;IA0DtD,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAShD;;;OAGG;IACG,gBAAgB,CAAC,WAAW,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC,wBAAwB,CAAC;IAoC1F,wFAAwF;YAC1E,cAAc;CAe7B"}
|
|
@@ -81,37 +81,37 @@ var Signup = /** @class */ (function () {
|
|
|
81
81
|
};
|
|
82
82
|
}
|
|
83
83
|
Signup.prototype.createUser = function (user, token) {
|
|
84
|
-
var _a, _b;
|
|
84
|
+
var _a, _b, _c;
|
|
85
85
|
return __awaiter(this, void 0, void 0, function () {
|
|
86
|
-
var logger, db, initSignupResponse, invite,
|
|
87
|
-
return __generator(this, function (
|
|
88
|
-
switch (
|
|
86
|
+
var logger, db, initSignupResponse, invite, _d, email, defaultEmailConfigFactory, config, emailSender, userRecord, _e, text_1, html_1, _f, text, html;
|
|
87
|
+
return __generator(this, function (_g) {
|
|
88
|
+
switch (_g.label) {
|
|
89
89
|
case 0:
|
|
90
90
|
logger = new logger_1.Logger({ name: 'Signup.createUser' });
|
|
91
91
|
db = (0, db_1.getDbAsSystem)();
|
|
92
92
|
return [4 /*yield*/, this.initializeSignup(token)];
|
|
93
93
|
case 1:
|
|
94
|
-
initSignupResponse =
|
|
94
|
+
initSignupResponse = _g.sent();
|
|
95
95
|
if (!initSignupResponse.isReady) {
|
|
96
96
|
throw new Error(initSignupResponse.error);
|
|
97
97
|
}
|
|
98
98
|
if (!token) return [3 /*break*/, 3];
|
|
99
99
|
return [4 /*yield*/, this.getValidInvite(token)];
|
|
100
100
|
case 2:
|
|
101
|
-
|
|
101
|
+
_d = _g.sent();
|
|
102
102
|
return [3 /*break*/, 4];
|
|
103
103
|
case 3:
|
|
104
|
-
|
|
105
|
-
|
|
104
|
+
_d = null;
|
|
105
|
+
_g.label = 4;
|
|
106
106
|
case 4:
|
|
107
|
-
invite =
|
|
107
|
+
invite = _d;
|
|
108
108
|
if (!token) return [3 /*break*/, 6];
|
|
109
109
|
return [4 /*yield*/, db.delete(user_1.tables.Invite, { token: token })];
|
|
110
110
|
case 5:
|
|
111
|
-
|
|
112
|
-
|
|
111
|
+
_g.sent();
|
|
112
|
+
_g.label = 6;
|
|
113
113
|
case 6:
|
|
114
|
-
email = invite ? invite.email : user.email;
|
|
114
|
+
email = (_a = (invite ? invite.email : user.email)) === null || _a === void 0 ? void 0 : _a.toLowerCase();
|
|
115
115
|
if (!email) {
|
|
116
116
|
throw new Error('Email is required when there is no invite');
|
|
117
117
|
}
|
|
@@ -120,15 +120,17 @@ var Signup = /** @class */ (function () {
|
|
|
120
120
|
emailSender = new email_server_1.EmailSender();
|
|
121
121
|
return [4 /*yield*/, db.get(user_1.tables.User, { email: email })];
|
|
122
122
|
case 7:
|
|
123
|
-
userRecord =
|
|
124
|
-
if (!userRecord) return [3 /*break*/,
|
|
123
|
+
userRecord = _g.sent();
|
|
124
|
+
if (!userRecord) return [3 /*break*/, 10];
|
|
125
125
|
logger.error({ message: "User with this email already exists", obj: { email: email } });
|
|
126
|
-
|
|
127
|
-
|
|
126
|
+
if (!config.getExistingUserEmailContent) return [3 /*break*/, 9];
|
|
127
|
+
_e = config.getExistingUserEmailContent(), text_1 = _e.text, html_1 = _e.html;
|
|
128
|
+
return [4 /*yield*/, emailSender.sendEmail(__assign({ to: email, subject: config.existingUserSubject || ((_b = config.options) === null || _b === void 0 ? void 0 : _b.subject) || 'Account already exists', text: text_1, html: html_1 }, config.options))];
|
|
128
129
|
case 8:
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
case 9: return [
|
|
130
|
+
_g.sent();
|
|
131
|
+
_g.label = 9;
|
|
132
|
+
case 9: return [2 /*return*/];
|
|
133
|
+
case 10: return [4 /*yield*/, db.insert(user_1.tables.User, {
|
|
132
134
|
name: user.name,
|
|
133
135
|
email: email,
|
|
134
136
|
password: (0, sha256_1.default)(user.password).toString(),
|
|
@@ -136,12 +138,12 @@ var Signup = /** @class */ (function () {
|
|
|
136
138
|
roles: '',
|
|
137
139
|
invitedBy: invite ? invite.invitedBy : null,
|
|
138
140
|
})];
|
|
139
|
-
case 10:
|
|
140
|
-
_f.sent();
|
|
141
|
-
_e = config.getNewUserEmailContent(), text = _e.text, html = _e.html;
|
|
142
|
-
return [4 /*yield*/, emailSender.sendEmail(__assign({ to: email, subject: config.newUserSubject || ((_b = config.options) === null || _b === void 0 ? void 0 : _b.subject) || 'Welcome!', text: text, html: html }, config.options))];
|
|
143
141
|
case 11:
|
|
144
|
-
|
|
142
|
+
_g.sent();
|
|
143
|
+
_f = config.getNewUserEmailContent(), text = _f.text, html = _f.html;
|
|
144
|
+
return [4 /*yield*/, emailSender.sendEmail(__assign({ to: email, subject: config.newUserSubject || ((_c = config.options) === null || _c === void 0 ? void 0 : _c.subject) || 'Welcome!', text: text, html: html }, config.options))];
|
|
145
|
+
case 12:
|
|
146
|
+
_g.sent();
|
|
145
147
|
logger.info({ message: "Created user", obj: { email: email } });
|
|
146
148
|
return [2 /*return*/];
|
|
147
149
|
}
|
|
@@ -151,16 +153,17 @@ var Signup = /** @class */ (function () {
|
|
|
151
153
|
Signup.prototype.sendInvite = function (email) {
|
|
152
154
|
var _a;
|
|
153
155
|
return __awaiter(this, void 0, void 0, function () {
|
|
154
|
-
var logger, db, userRecord, emailSender, defaultConfigFactory, config, token, tokenExpiresAt, invite, userId, _b, text, html, error_1;
|
|
156
|
+
var logger, caseInsensitiveEmail, db, userRecord, emailSender, defaultConfigFactory, config, token, tokenExpiresAt, invite, userId, _b, text, html, error_1;
|
|
155
157
|
return __generator(this, function (_c) {
|
|
156
158
|
switch (_c.label) {
|
|
157
159
|
case 0:
|
|
158
160
|
logger = new logger_1.Logger({ name: 'Signup.sendInvite' });
|
|
161
|
+
caseInsensitiveEmail = email.toLowerCase();
|
|
159
162
|
_c.label = 1;
|
|
160
163
|
case 1:
|
|
161
164
|
_c.trys.push([1, 9, , 10]);
|
|
162
165
|
db = (0, db_1.getDbAsSystem)();
|
|
163
|
-
return [4 /*yield*/, db.get(user_1.tables.User, { email:
|
|
166
|
+
return [4 /*yield*/, db.get(user_1.tables.User, { email: caseInsensitiveEmail })];
|
|
164
167
|
case 2:
|
|
165
168
|
userRecord = _c.sent();
|
|
166
169
|
if (userRecord) {
|
|
@@ -174,7 +177,7 @@ var Signup = /** @class */ (function () {
|
|
|
174
177
|
config = defaultConfigFactory.getConfig();
|
|
175
178
|
token = crypto_js_1.lib.WordArray.random(32).toString();
|
|
176
179
|
tokenExpiresAt = (0, moment_1.default)().add(7, 'days');
|
|
177
|
-
return [4 /*yield*/, db.get(user_1.tables.Invite, { email:
|
|
180
|
+
return [4 /*yield*/, db.get(user_1.tables.Invite, { email: caseInsensitiveEmail })];
|
|
178
181
|
case 3:
|
|
179
182
|
invite = _c.sent();
|
|
180
183
|
if (!invite) return [3 /*break*/, 5];
|
|
@@ -185,19 +188,24 @@ var Signup = /** @class */ (function () {
|
|
|
185
188
|
return [3 /*break*/, 7];
|
|
186
189
|
case 5:
|
|
187
190
|
userId = new user_1.UserRepo().getUser().id;
|
|
188
|
-
return [4 /*yield*/, db.insert(user_1.tables.Invite, {
|
|
191
|
+
return [4 /*yield*/, db.insert(user_1.tables.Invite, {
|
|
192
|
+
email: caseInsensitiveEmail,
|
|
193
|
+
token: token,
|
|
194
|
+
tokenExpiresAt: tokenExpiresAt,
|
|
195
|
+
invitedBy: userId,
|
|
196
|
+
})];
|
|
189
197
|
case 6:
|
|
190
198
|
invite = _c.sent();
|
|
191
199
|
_c.label = 7;
|
|
192
200
|
case 7:
|
|
193
201
|
_b = config.getEmailContent("".concat(user_1.uiRoutes.auth.signup, "?token=").concat(token)), text = _b.text, html = _b.html;
|
|
194
|
-
return [4 /*yield*/, emailSender.sendEmail(__assign({ to:
|
|
202
|
+
return [4 /*yield*/, emailSender.sendEmail(__assign({ to: caseInsensitiveEmail, subject: ((_a = config.options) === null || _a === void 0 ? void 0 : _a.subject) || "You're Invited", text: text, html: html }, config.options))];
|
|
195
203
|
case 8:
|
|
196
204
|
_c.sent();
|
|
197
205
|
return [2 /*return*/, { sent: true }];
|
|
198
206
|
case 9:
|
|
199
207
|
error_1 = _c.sent();
|
|
200
|
-
logger.error({ message: 'Error sending invite', obj: { email:
|
|
208
|
+
logger.error({ message: 'Error sending invite', obj: { email: caseInsensitiveEmail }, error: error_1 });
|
|
201
209
|
return [2 /*return*/, {
|
|
202
210
|
sent: false,
|
|
203
211
|
error: 'Error occurred.',
|
|
@@ -217,7 +225,7 @@ var Signup = /** @class */ (function () {
|
|
|
217
225
|
throw new Error('No email was provided.');
|
|
218
226
|
}
|
|
219
227
|
db = (0, db_1.getDb)();
|
|
220
|
-
return [4 /*yield*/, db.delete(user_1.tables.Invite, { email: email })];
|
|
228
|
+
return [4 /*yield*/, db.delete(user_1.tables.Invite, { email: email.toLowerCase() })];
|
|
221
229
|
case 1:
|
|
222
230
|
_a.sent();
|
|
223
231
|
return [2 /*return*/];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Signup.js","sourceRoot":"","sources":["../../../src/services/Signup.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,oCAAqD;AACrD,wCAUyB;AACzB,kDAA4B;AAC5B,uCAAgC;AAChC,4CAA2C;AAC3C,wDAIiC;AACjC,4DAAsC;AACtC,oDAAmE;AAU5D,IAAM,6BAA6B,GAAG;IAC3C,IAAM,cAAc,GAA+B;QACjD,SAAS,EAAE,cAAoB,OAAA,CAAC,EAAE,YAAY,EAAE,KAAK,EAAE,CAAC,EAAzB,CAAyB;KACzD,CAAC;IAEF,IAAM,OAAO,GAAG,6BAAgB,CAAC,GAAG,EAAE,CAAC,MAAM,CAC3C,mDAAmD,CACpD,CAAC;IACF,OAAO,OAAO,IAAI,cAAc,CAAC;AACnC,CAAC,CAAC;AATW,QAAA,6BAA6B,iCASxC;AAEF;IAAA;QACS,oBAAe,GAAG;YACvB,IAAI,EAAE;gBACJ,SAAS,EAAE,UAAC,UAAkB,EAAE,IAAW;oBACzC,IAAI,UAAU,KAAK,YAAY,IAAI,UAAU,KAAK,cAAc,EAAE;wBAChE,eAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;qBAC3B;oBAED,OAAO,IAAI,CAAC;gBACd,CAAC;aACF;SACF,CAAC;
|
|
1
|
+
{"version":3,"file":"Signup.js","sourceRoot":"","sources":["../../../src/services/Signup.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,oCAAqD;AACrD,wCAUyB;AACzB,kDAA4B;AAC5B,uCAAgC;AAChC,4CAA2C;AAC3C,wDAIiC;AACjC,4DAAsC;AACtC,oDAAmE;AAU5D,IAAM,6BAA6B,GAAG;IAC3C,IAAM,cAAc,GAA+B;QACjD,SAAS,EAAE,cAAoB,OAAA,CAAC,EAAE,YAAY,EAAE,KAA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d,KAAK,EAAE,mDAAmD;wCAC1D,YAAY,cAAA;qCACb,EAAC;6BACH;yBACF;wBAED,sBAAO;gCACL,OAAO,EAAE,IAAI;gCACb,YAAY,cAAA;gCACZ,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS;6BACpC,EAAC;;;wBAEF,sBAAO;gCACL,OAAO,EAAE,KAAK;gCACd,KAAK,EAAE,8BAA8B;6BACtC,EAAC;;;;;KAEL;IAED,wFAAwF;IAC1E,+BAAc,GAA5B,UAA6B,KAAa;;;;;;wBAClC,EAAE,GAAG,IAAA,kBAAa,GAAE,CAAC;wBACZ,qBAAM,EAAE,CAAC,GAAG,CAAC,aAAM,CAAC,MAAM,EAAE,EAAE,KAAK,OAAA,EAAE,CAAC,EAAA;;wBAA/C,MAAM,GAAG,SAAsC;wBAErD,IAAI,CAAC,MAAM,EAAE;4BACX,sBAAO,IAAI,EAAC;yBACb;wBAEK,WAAW,GAAG,IAAA,gBAAM,GAAE,CAAC;wBAC7B,IAAI,MAAM,CAAC,cAAc,IAAI,IAAA,gBAAM,EAAC,MAAM,CAAC,cAAc,CAAC,CAAC,QAAQ,CAAC,WAAW,CAAC,EAAE;4BAChF,sBAAO,IAAI,EAAC;yBACb;wBAED,sBAAO,MAAM,EAAC;;;;KACf;IACH,aAAC;AAAD,CAAC,AAnMD,IAmMC;AAnMY,wBAAM"}
|
package/generated/index.ts
CHANGED
|
@@ -14,33 +14,33 @@ import 'moment';
|
|
|
14
14
|
|
|
15
15
|
/** Generate Source Graph */
|
|
16
16
|
|
|
17
|
-
const sourceGraph = "{\"options\":{\"directed\":true,\"multigraph\":false,\"compound\":false},\"nodes\":[{\"v\":\"@proteinjs/user-server/DbSessionStore\",\"value\":{\"packageName\":\"@proteinjs/user-server\",\"name\":\"DbSessionStore\",\"filePath\":\"/Users/brentbahry/repos/n3xa/packages/proteinjs/packages/user/packages/server/src/authentication/DbSessionStore.ts\",\"qualifiedName\":\"@proteinjs/user-server/DbSessionStore\",\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"properties\":[{\"name\":\"TWELVE_HOURS\",\"type\":null,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":true,\"visibility\":\"private\"},{\"name\":\"logger\",\"type\":null,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\"},{\"name\":\"get\",\"type\":null,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"},{\"name\":\"set\",\"type\":null,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"},{\"name\":\"touch\",\"type\":null,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"},{\"name\":\"destroy\",\"type\":null,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"}],\"methods\":[{\"name\":\"insertOrUpdate\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<void>\",\"filePath\":null,\"qualifiedName\":\"/Promise<void>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\",\"parameters\":[{\"name\":\"sessionId\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"session\",\"type\":{\"packageName\":\"\",\"name\":\"Express.SessionData\",\"filePath\":null,\"qualifiedName\":\"/Express.SessionData\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"cb\",\"type\":{\"packageName\":\"\",\"name\":\"(error?: any) => void\",\"filePath\":null,\"qualifiedName\":\"/(error?: any) => void\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"sweep\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<void>\",\"filePath\":null,\"qualifiedName\":\"/Promise<void>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\",\"parameters\":[]}],\"typeParameters\":[],\"directParentInterfaces\":[],\"directParentClasses\":[{\"packageName\":\"express-session\",\"name\":\"Store\",\"filePath\":null,\"qualifiedName\":\"express-session/Store\",\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"properties\":[],\"methods\":[],\"typeParameters\":[],\"directParentInterfaces\":[],\"directParentClasses\":[]}],\"sourceType\":2}},{\"v\":\"express-session/Store\"},{\"v\":\"@proteinjs/user-server/SocketIOSessionWatcher\",\"value\":{\"packageName\":\"@proteinjs/user-server\",\"name\":\"SocketIOSessionWatcher\",\"filePath\":\"/Users/brentbahry/repos/n3xa/packages/proteinjs/packages/user/packages/server/src/authentication/SocketIOSessionWatcher.ts\",\"qualifiedName\":\"@proteinjs/user-server/SocketIOSessionWatcher\",\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"properties\":[],\"methods\":[{\"name\":\"name\",\"returnType\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[]},{\"name\":\"table\",\"returnType\":{\"packageName\":\"\",\"name\":\"Table<Session>\",\"filePath\":null,\"qualifiedName\":\"/Table<Session>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[]},{\"name\":\"afterDelete\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<void>\",\"filePath\":null,\"qualifiedName\":\"/Promise<void>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"recordDeleteCount\",\"type\":{\"packageName\":\"\",\"name\":\"number\",\"filePath\":null,\"qualifiedName\":\"/number\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"deletedRecords\",\"type\":{\"packageName\":\"\",\"name\":\"T[]\",\"filePath\":null,\"qualifiedName\":\"/T[]\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"qb\",\"type\":{\"packageName\":\"\",\"name\":\"QueryBuilder<T>\",\"filePath\":null,\"qualifiedName\":\"/QueryBuilder<T>\",\"typeParameters\":null,\"directParents\":null}}]}],\"typeParameters\":[],\"directParentInterfaces\":[{\"packageName\":\"@proteinjs/db\",\"name\":\"TableWatcher\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db/TableWatcher\",\"properties\":[],\"methods\":[],\"typeParameters\":[\"@proteinjs/user/Session\"],\"directParents\":[]}],\"directParentClasses\":[],\"sourceType\":2}},{\"v\":\"@proteinjs/db/TableWatcher\"},{\"v\":\"@proteinjs/user-server/executePasswordReset\",\"value\":{\"packageName\":\"@proteinjs/user-server\",\"name\":\"executePasswordReset\",\"filePath\":\"/Users/brentbahry/repos/n3xa/packages/proteinjs/packages/user/packages/server/src/routes/executePasswordReset.ts\",\"qualifiedName\":\"@proteinjs/user-server/executePasswordReset\",\"type\":{\"packageName\":\"@proteinjs/server-api\",\"name\":\"Route\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/server-api/Route\",\"typeParameters\":[],\"directParents\":[{\"packageName\":\"@proteinjs/server-api\",\"name\":\"Route\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/server-api/Route\",\"typeParameters\":[],\"directParents\":null}]},\"isExported\":true,\"isConst\":true,\"sourceType\":0}},{\"v\":\"@proteinjs/server-api/Route\"},{\"v\":\"@proteinjs/user-server/initiatePasswordReset\",\"value\":{\"packageName\":\"@proteinjs/user-server\",\"name\":\"initiatePasswordReset\",\"filePath\":\"/Users/brentbahry/repos/n3xa/packages/proteinjs/packages/user/packages/server/src/routes/initiatePasswordReset.ts\",\"qualifiedName\":\"@proteinjs/user-server/initiatePasswordReset\",\"type\":{\"packageName\":\"@proteinjs/server-api\",\"name\":\"Route\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/server-api/Route\",\"typeParameters\":[],\"directParents\":[{\"packageName\":\"@proteinjs/server-api\",\"name\":\"Route\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/server-api/Route\",\"typeParameters\":[],\"directParents\":null}]},\"isExported\":true,\"isConst\":true,\"sourceType\":0}},{\"v\":\"@proteinjs/user-server/login\",\"value\":{\"packageName\":\"@proteinjs/user-server\",\"name\":\"login\",\"filePath\":\"/Users/brentbahry/repos/n3xa/packages/proteinjs/packages/user/packages/server/src/routes/login.ts\",\"qualifiedName\":\"@proteinjs/user-server/login\",\"type\":{\"packageName\":\"@proteinjs/server-api\",\"name\":\"Route\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/server-api/Route\",\"typeParameters\":[],\"directParents\":[{\"packageName\":\"@proteinjs/server-api\",\"name\":\"Route\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/server-api/Route\",\"typeParameters\":[],\"directParents\":null}]},\"isExported\":true,\"isConst\":true,\"sourceType\":0}},{\"v\":\"@proteinjs/user-server/logout\",\"value\":{\"packageName\":\"@proteinjs/user-server\",\"name\":\"logout\",\"filePath\":\"/Users/brentbahry/repos/n3xa/packages/proteinjs/packages/user/packages/server/src/routes/logout.ts\",\"qualifiedName\":\"@proteinjs/user-server/logout\",\"type\":{\"packageName\":\"@proteinjs/server-api\",\"name\":\"Route\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/server-api/Route\",\"typeParameters\":[],\"directParents\":[{\"packageName\":\"@proteinjs/server-api\",\"name\":\"Route\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/server-api/Route\",\"typeParameters\":[],\"directParents\":null}]},\"isExported\":true,\"isConst\":true,\"sourceType\":0}},{\"v\":\"@proteinjs/user-server/validateResetPasswordToken\",\"value\":{\"packageName\":\"@proteinjs/user-server\",\"name\":\"validateResetPasswordToken\",\"filePath\":\"/Users/brentbahry/repos/n3xa/packages/proteinjs/packages/user/packages/server/src/routes/validateResetPasswordToken.ts\",\"qualifiedName\":\"@proteinjs/user-server/validateResetPasswordToken\",\"type\":{\"packageName\":\"@proteinjs/server-api\",\"name\":\"Route\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/server-api/Route\",\"typeParameters\":[],\"directParents\":[{\"packageName\":\"@proteinjs/server-api\",\"name\":\"Route\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/server-api/Route\",\"typeParameters\":[],\"directParents\":null}]},\"isExported\":true,\"isConst\":true,\"sourceType\":0}},{\"v\":\"@proteinjs/user-server/DefaultInviteConfigFactory\",\"value\":{\"packageName\":\"@proteinjs/user-server\",\"name\":\"DefaultInviteConfigFactory\",\"filePath\":\"/Users/brentbahry/repos/n3xa/packages/proteinjs/packages/user/packages/server/src/services/Signup.ts\",\"qualifiedName\":\"@proteinjs/user-server/DefaultInviteConfigFactory\",\"properties\":[],\"methods\":[{\"name\":\"getConfig\",\"returnType\":{\"packageName\":\"@proteinjs/user-server\",\"name\":\"InviteConfig\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/user-server/InviteConfig\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":true,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[]}],\"typeParameters\":[],\"directParents\":[{\"packageName\":\"@proteinjs/reflection\",\"name\":\"Loadable\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/reflection/Loadable\",\"properties\":[],\"methods\":[],\"typeParameters\":[],\"directParents\":[]}],\"sourceType\":3}},{\"v\":\"@proteinjs/reflection/Loadable\"},{\"v\":\"@proteinjs/user-server/Signup\",\"value\":{\"packageName\":\"@proteinjs/user-server\",\"name\":\"Signup\",\"filePath\":\"/Users/brentbahry/repos/n3xa/packages/proteinjs/packages/user/packages/server/src/services/Signup.ts\",\"qualifiedName\":\"@proteinjs/user-server/Signup\",\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"properties\":[{\"name\":\"serviceMetadata\",\"type\":null,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"}],\"methods\":[{\"name\":\"createUser\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<void>\",\"filePath\":null,\"qualifiedName\":\"/Promise<void>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"user\",\"type\":{\"packageName\":\"@proteinjs/user\",\"name\":\"UserSignup\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/user/UserSignup\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"token\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"sendInvite\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<SendInviteResponse>\",\"filePath\":null,\"qualifiedName\":\"/Promise<SendInviteResponse>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"email\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"revokeInvite\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<void>\",\"filePath\":null,\"qualifiedName\":\"/Promise<void>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"email\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"initializeSignup\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<InitializeSignupResponse>\",\"filePath\":null,\"qualifiedName\":\"/Promise<InitializeSignupResponse>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"inviteToken\",\"type\":{\"packageName\":\"\",\"name\":\"string | undefined\",\"filePath\":null,\"qualifiedName\":\"/string | undefined\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"getValidInvite\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<Invite | null>\",\"filePath\":null,\"qualifiedName\":\"/Promise<Invite | null>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\",\"parameters\":[{\"name\":\"token\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null}}]}],\"typeParameters\":[],\"directParentInterfaces\":[{\"packageName\":\"@proteinjs/user\",\"name\":\"SignupService\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/user/SignupService\",\"properties\":[],\"methods\":[],\"typeParameters\":[],\"directParents\":[]}],\"directParentClasses\":[],\"sourceType\":2}},{\"v\":\"@proteinjs/user/SignupService\"},{\"v\":\"@proteinjs/user-server/UpdateUserInfo\",\"value\":{\"packageName\":\"@proteinjs/user-server\",\"name\":\"UpdateUserInfo\",\"filePath\":\"/Users/brentbahry/repos/n3xa/packages/proteinjs/packages/user/packages/server/src/services/UpdateUserInfo.ts\",\"qualifiedName\":\"@proteinjs/user-server/UpdateUserInfo\",\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"properties\":[{\"name\":\"serviceMetadata\",\"type\":null,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"}],\"methods\":[{\"name\":\"updateName\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<void>\",\"filePath\":null,\"qualifiedName\":\"/Promise<void>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"name\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"updatePassword\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<UpdatePasswordResponse>\",\"filePath\":null,\"qualifiedName\":\"/Promise<UpdatePasswordResponse>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"currentPassword\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"newPassword\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null}}]}],\"typeParameters\":[],\"directParentInterfaces\":[{\"packageName\":\"@proteinjs/user\",\"name\":\"UpdateUserInfoService\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/user/UpdateUserInfoService\",\"properties\":[],\"methods\":[],\"typeParameters\":[],\"directParents\":[]}],\"directParentClasses\":[],\"sourceType\":2}},{\"v\":\"@proteinjs/user/UpdateUserInfoService\"},{\"v\":\"@proteinjs/user-server/userCache\",\"value\":{\"packageName\":\"@proteinjs/user-server\",\"name\":\"userCache\",\"filePath\":\"/Users/brentbahry/repos/n3xa/packages/proteinjs/packages/user/packages/server/src/authorization/userCache.ts\",\"qualifiedName\":\"@proteinjs/user-server/userCache\",\"type\":{\"packageName\":\"\",\"name\":\"SessionDataCache<User>\",\"filePath\":null,\"qualifiedName\":\"/SessionDataCache<User>\",\"typeParameters\":[],\"directParents\":[{\"packageName\":\"@proteinjs/server-api\",\"name\":\"SessionDataCache\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/server-api/SessionDataCache\",\"typeParameters\":[\"@proteinjs/user/User\"],\"directParents\":null}]},\"isExported\":true,\"isConst\":true,\"sourceType\":0}},{\"v\":\"@proteinjs/server-api/SessionDataCache\"}],\"edges\":[{\"v\":\"@proteinjs/user-server/DbSessionStore\",\"w\":\"express-session/Store\",\"value\":\"extends class\"},{\"v\":\"@proteinjs/user-server/SocketIOSessionWatcher\",\"w\":\"@proteinjs/db/TableWatcher\",\"value\":\"implements interface\"},{\"v\":\"@proteinjs/user-server/executePasswordReset\",\"w\":\"@proteinjs/server-api/Route\",\"value\":\"has type\"},{\"v\":\"@proteinjs/user-server/initiatePasswordReset\",\"w\":\"@proteinjs/server-api/Route\",\"value\":\"has type\"},{\"v\":\"@proteinjs/user-server/login\",\"w\":\"@proteinjs/server-api/Route\",\"value\":\"has type\"},{\"v\":\"@proteinjs/user-server/logout\",\"w\":\"@proteinjs/server-api/Route\",\"value\":\"has type\"},{\"v\":\"@proteinjs/user-server/validateResetPasswordToken\",\"w\":\"@proteinjs/server-api/Route\",\"value\":\"has type\"},{\"v\":\"@proteinjs/user-server/DefaultInviteConfigFactory\",\"w\":\"@proteinjs/reflection/Loadable\",\"value\":\"extends interface\"},{\"v\":\"@proteinjs/user-server/Signup\",\"w\":\"@proteinjs/user/SignupService\",\"value\":\"implements interface\"},{\"v\":\"@proteinjs/user-server/UpdateUserInfo\",\"w\":\"@proteinjs/user/UpdateUserInfoService\",\"value\":\"implements interface\"},{\"v\":\"@proteinjs/user-server/userCache\",\"w\":\"@proteinjs/server-api/SessionDataCache\",\"value\":\"has type\"}]}";
|
|
17
|
+
const sourceGraph = "{\"options\":{\"directed\":true,\"multigraph\":false,\"compound\":false},\"nodes\":[{\"v\":\"@proteinjs/user-server/DbSessionStore\",\"value\":{\"packageName\":\"@proteinjs/user-server\",\"name\":\"DbSessionStore\",\"filePath\":\"/Users/brentbahry/repos/n3xa/packages/proteinjs/packages/user/packages/server/src/authentication/DbSessionStore.ts\",\"qualifiedName\":\"@proteinjs/user-server/DbSessionStore\",\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"properties\":[{\"name\":\"TWELVE_HOURS\",\"type\":null,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":true,\"visibility\":\"private\"},{\"name\":\"logger\",\"type\":null,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\"},{\"name\":\"get\",\"type\":null,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"},{\"name\":\"set\",\"type\":null,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"},{\"name\":\"touch\",\"type\":null,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"},{\"name\":\"destroy\",\"type\":null,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"}],\"methods\":[{\"name\":\"insertOrUpdate\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<void>\",\"filePath\":null,\"qualifiedName\":\"/Promise<void>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\",\"parameters\":[{\"name\":\"sessionId\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"session\",\"type\":{\"packageName\":\"\",\"name\":\"Express.SessionData\",\"filePath\":null,\"qualifiedName\":\"/Express.SessionData\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"cb\",\"type\":{\"packageName\":\"\",\"name\":\"(error?: any) => void\",\"filePath\":null,\"qualifiedName\":\"/(error?: any) => void\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"sweep\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<void>\",\"filePath\":null,\"qualifiedName\":\"/Promise<void>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\",\"parameters\":[]}],\"typeParameters\":[],\"directParentInterfaces\":[],\"directParentClasses\":[{\"packageName\":\"express-session\",\"name\":\"Store\",\"filePath\":null,\"qualifiedName\":\"express-session/Store\",\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"properties\":[],\"methods\":[],\"typeParameters\":[],\"directParentInterfaces\":[],\"directParentClasses\":[]}],\"sourceType\":2}},{\"v\":\"express-session/Store\"},{\"v\":\"@proteinjs/user-server/SocketIOSessionWatcher\",\"value\":{\"packageName\":\"@proteinjs/user-server\",\"name\":\"SocketIOSessionWatcher\",\"filePath\":\"/Users/brentbahry/repos/n3xa/packages/proteinjs/packages/user/packages/server/src/authentication/SocketIOSessionWatcher.ts\",\"qualifiedName\":\"@proteinjs/user-server/SocketIOSessionWatcher\",\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"properties\":[],\"methods\":[{\"name\":\"name\",\"returnType\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[]},{\"name\":\"table\",\"returnType\":{\"packageName\":\"\",\"name\":\"Table<Session>\",\"filePath\":null,\"qualifiedName\":\"/Table<Session>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[]},{\"name\":\"afterDelete\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<void>\",\"filePath\":null,\"qualifiedName\":\"/Promise<void>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"recordDeleteCount\",\"type\":{\"packageName\":\"\",\"name\":\"number\",\"filePath\":null,\"qualifiedName\":\"/number\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"deletedRecords\",\"type\":{\"packageName\":\"\",\"name\":\"T[]\",\"filePath\":null,\"qualifiedName\":\"/T[]\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"qb\",\"type\":{\"packageName\":\"\",\"name\":\"QueryBuilder<T>\",\"filePath\":null,\"qualifiedName\":\"/QueryBuilder<T>\",\"typeParameters\":null,\"directParents\":null}}]}],\"typeParameters\":[],\"directParentInterfaces\":[{\"packageName\":\"@proteinjs/db\",\"name\":\"TableWatcher\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db/TableWatcher\",\"properties\":[],\"methods\":[],\"typeParameters\":[\"@proteinjs/user/Session\"],\"directParents\":[]}],\"directParentClasses\":[],\"sourceType\":2}},{\"v\":\"@proteinjs/db/TableWatcher\"},{\"v\":\"@proteinjs/user-server/userCache\",\"value\":{\"packageName\":\"@proteinjs/user-server\",\"name\":\"userCache\",\"filePath\":\"/Users/brentbahry/repos/n3xa/packages/proteinjs/packages/user/packages/server/src/authorization/userCache.ts\",\"qualifiedName\":\"@proteinjs/user-server/userCache\",\"type\":{\"packageName\":\"\",\"name\":\"SessionDataCache<User>\",\"filePath\":null,\"qualifiedName\":\"/SessionDataCache<User>\",\"typeParameters\":[],\"directParents\":[{\"packageName\":\"@proteinjs/server-api\",\"name\":\"SessionDataCache\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/server-api/SessionDataCache\",\"typeParameters\":[\"@proteinjs/user/User\"],\"directParents\":null}]},\"isExported\":true,\"isConst\":true,\"sourceType\":0}},{\"v\":\"@proteinjs/server-api/SessionDataCache\"},{\"v\":\"@proteinjs/user-server/DefaultInviteConfigFactory\",\"value\":{\"packageName\":\"@proteinjs/user-server\",\"name\":\"DefaultInviteConfigFactory\",\"filePath\":\"/Users/brentbahry/repos/n3xa/packages/proteinjs/packages/user/packages/server/src/services/Signup.ts\",\"qualifiedName\":\"@proteinjs/user-server/DefaultInviteConfigFactory\",\"properties\":[],\"methods\":[{\"name\":\"getConfig\",\"returnType\":{\"packageName\":\"@proteinjs/user-server\",\"name\":\"InviteConfig\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/user-server/InviteConfig\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":true,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[]}],\"typeParameters\":[],\"directParents\":[{\"packageName\":\"@proteinjs/reflection\",\"name\":\"Loadable\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/reflection/Loadable\",\"properties\":[],\"methods\":[],\"typeParameters\":[],\"directParents\":[]}],\"sourceType\":3}},{\"v\":\"@proteinjs/reflection/Loadable\"},{\"v\":\"@proteinjs/user-server/Signup\",\"value\":{\"packageName\":\"@proteinjs/user-server\",\"name\":\"Signup\",\"filePath\":\"/Users/brentbahry/repos/n3xa/packages/proteinjs/packages/user/packages/server/src/services/Signup.ts\",\"qualifiedName\":\"@proteinjs/user-server/Signup\",\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"properties\":[{\"name\":\"serviceMetadata\",\"type\":null,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"}],\"methods\":[{\"name\":\"createUser\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<void>\",\"filePath\":null,\"qualifiedName\":\"/Promise<void>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"user\",\"type\":{\"packageName\":\"@proteinjs/user\",\"name\":\"UserSignup\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/user/UserSignup\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"token\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"sendInvite\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<SendInviteResponse>\",\"filePath\":null,\"qualifiedName\":\"/Promise<SendInviteResponse>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"email\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"revokeInvite\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<void>\",\"filePath\":null,\"qualifiedName\":\"/Promise<void>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"email\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"initializeSignup\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<InitializeSignupResponse>\",\"filePath\":null,\"qualifiedName\":\"/Promise<InitializeSignupResponse>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"inviteToken\",\"type\":{\"packageName\":\"\",\"name\":\"string | undefined\",\"filePath\":null,\"qualifiedName\":\"/string | undefined\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"getValidInvite\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<Invite | null>\",\"filePath\":null,\"qualifiedName\":\"/Promise<Invite | null>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\",\"parameters\":[{\"name\":\"token\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null}}]}],\"typeParameters\":[],\"directParentInterfaces\":[{\"packageName\":\"@proteinjs/user\",\"name\":\"SignupService\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/user/SignupService\",\"properties\":[],\"methods\":[],\"typeParameters\":[],\"directParents\":[]}],\"directParentClasses\":[],\"sourceType\":2}},{\"v\":\"@proteinjs/user/SignupService\"},{\"v\":\"@proteinjs/user-server/UpdateUserInfo\",\"value\":{\"packageName\":\"@proteinjs/user-server\",\"name\":\"UpdateUserInfo\",\"filePath\":\"/Users/brentbahry/repos/n3xa/packages/proteinjs/packages/user/packages/server/src/services/UpdateUserInfo.ts\",\"qualifiedName\":\"@proteinjs/user-server/UpdateUserInfo\",\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"properties\":[{\"name\":\"serviceMetadata\",\"type\":null,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"}],\"methods\":[{\"name\":\"updateName\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<void>\",\"filePath\":null,\"qualifiedName\":\"/Promise<void>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"name\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"updatePassword\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<UpdatePasswordResponse>\",\"filePath\":null,\"qualifiedName\":\"/Promise<UpdatePasswordResponse>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"currentPassword\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"newPassword\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null}}]}],\"typeParameters\":[],\"directParentInterfaces\":[{\"packageName\":\"@proteinjs/user\",\"name\":\"UpdateUserInfoService\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/user/UpdateUserInfoService\",\"properties\":[],\"methods\":[],\"typeParameters\":[],\"directParents\":[]}],\"directParentClasses\":[],\"sourceType\":2}},{\"v\":\"@proteinjs/user/UpdateUserInfoService\"},{\"v\":\"@proteinjs/user-server/executePasswordReset\",\"value\":{\"packageName\":\"@proteinjs/user-server\",\"name\":\"executePasswordReset\",\"filePath\":\"/Users/brentbahry/repos/n3xa/packages/proteinjs/packages/user/packages/server/src/routes/executePasswordReset.ts\",\"qualifiedName\":\"@proteinjs/user-server/executePasswordReset\",\"type\":{\"packageName\":\"@proteinjs/server-api\",\"name\":\"Route\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/server-api/Route\",\"typeParameters\":[],\"directParents\":[{\"packageName\":\"@proteinjs/server-api\",\"name\":\"Route\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/server-api/Route\",\"typeParameters\":[],\"directParents\":null}]},\"isExported\":true,\"isConst\":true,\"sourceType\":0}},{\"v\":\"@proteinjs/server-api/Route\"},{\"v\":\"@proteinjs/user-server/initiatePasswordReset\",\"value\":{\"packageName\":\"@proteinjs/user-server\",\"name\":\"initiatePasswordReset\",\"filePath\":\"/Users/brentbahry/repos/n3xa/packages/proteinjs/packages/user/packages/server/src/routes/initiatePasswordReset.ts\",\"qualifiedName\":\"@proteinjs/user-server/initiatePasswordReset\",\"type\":{\"packageName\":\"@proteinjs/server-api\",\"name\":\"Route\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/server-api/Route\",\"typeParameters\":[],\"directParents\":[{\"packageName\":\"@proteinjs/server-api\",\"name\":\"Route\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/server-api/Route\",\"typeParameters\":[],\"directParents\":null}]},\"isExported\":true,\"isConst\":true,\"sourceType\":0}},{\"v\":\"@proteinjs/user-server/login\",\"value\":{\"packageName\":\"@proteinjs/user-server\",\"name\":\"login\",\"filePath\":\"/Users/brentbahry/repos/n3xa/packages/proteinjs/packages/user/packages/server/src/routes/login.ts\",\"qualifiedName\":\"@proteinjs/user-server/login\",\"type\":{\"packageName\":\"@proteinjs/server-api\",\"name\":\"Route\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/server-api/Route\",\"typeParameters\":[],\"directParents\":[{\"packageName\":\"@proteinjs/server-api\",\"name\":\"Route\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/server-api/Route\",\"typeParameters\":[],\"directParents\":null}]},\"isExported\":true,\"isConst\":true,\"sourceType\":0}},{\"v\":\"@proteinjs/user-server/logout\",\"value\":{\"packageName\":\"@proteinjs/user-server\",\"name\":\"logout\",\"filePath\":\"/Users/brentbahry/repos/n3xa/packages/proteinjs/packages/user/packages/server/src/routes/logout.ts\",\"qualifiedName\":\"@proteinjs/user-server/logout\",\"type\":{\"packageName\":\"@proteinjs/server-api\",\"name\":\"Route\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/server-api/Route\",\"typeParameters\":[],\"directParents\":[{\"packageName\":\"@proteinjs/server-api\",\"name\":\"Route\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/server-api/Route\",\"typeParameters\":[],\"directParents\":null}]},\"isExported\":true,\"isConst\":true,\"sourceType\":0}},{\"v\":\"@proteinjs/user-server/validateResetPasswordToken\",\"value\":{\"packageName\":\"@proteinjs/user-server\",\"name\":\"validateResetPasswordToken\",\"filePath\":\"/Users/brentbahry/repos/n3xa/packages/proteinjs/packages/user/packages/server/src/routes/validateResetPasswordToken.ts\",\"qualifiedName\":\"@proteinjs/user-server/validateResetPasswordToken\",\"type\":{\"packageName\":\"@proteinjs/server-api\",\"name\":\"Route\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/server-api/Route\",\"typeParameters\":[],\"directParents\":[{\"packageName\":\"@proteinjs/server-api\",\"name\":\"Route\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/server-api/Route\",\"typeParameters\":[],\"directParents\":null}]},\"isExported\":true,\"isConst\":true,\"sourceType\":0}}],\"edges\":[{\"v\":\"@proteinjs/user-server/DbSessionStore\",\"w\":\"express-session/Store\",\"value\":\"extends class\"},{\"v\":\"@proteinjs/user-server/SocketIOSessionWatcher\",\"w\":\"@proteinjs/db/TableWatcher\",\"value\":\"implements interface\"},{\"v\":\"@proteinjs/user-server/userCache\",\"w\":\"@proteinjs/server-api/SessionDataCache\",\"value\":\"has type\"},{\"v\":\"@proteinjs/user-server/DefaultInviteConfigFactory\",\"w\":\"@proteinjs/reflection/Loadable\",\"value\":\"extends interface\"},{\"v\":\"@proteinjs/user-server/Signup\",\"w\":\"@proteinjs/user/SignupService\",\"value\":\"implements interface\"},{\"v\":\"@proteinjs/user-server/UpdateUserInfo\",\"w\":\"@proteinjs/user/UpdateUserInfoService\",\"value\":\"implements interface\"},{\"v\":\"@proteinjs/user-server/executePasswordReset\",\"w\":\"@proteinjs/server-api/Route\",\"value\":\"has type\"},{\"v\":\"@proteinjs/user-server/initiatePasswordReset\",\"w\":\"@proteinjs/server-api/Route\",\"value\":\"has type\"},{\"v\":\"@proteinjs/user-server/login\",\"w\":\"@proteinjs/server-api/Route\",\"value\":\"has type\"},{\"v\":\"@proteinjs/user-server/logout\",\"w\":\"@proteinjs/server-api/Route\",\"value\":\"has type\"},{\"v\":\"@proteinjs/user-server/validateResetPasswordToken\",\"w\":\"@proteinjs/server-api/Route\",\"value\":\"has type\"}]}";
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
/** Generate Source Links */
|
|
21
21
|
|
|
22
22
|
import { DbSessionStore } from '../src/authentication/DbSessionStore';
|
|
23
23
|
import { SocketIOSessionWatcher } from '../src/authentication/SocketIOSessionWatcher';
|
|
24
|
+
import { userCache } from '../src/authorization/userCache';
|
|
25
|
+
import { Signup } from '../src/services/Signup';
|
|
26
|
+
import { UpdateUserInfo } from '../src/services/UpdateUserInfo';
|
|
24
27
|
import { executePasswordReset } from '../src/routes/executePasswordReset';
|
|
25
28
|
import { initiatePasswordReset } from '../src/routes/initiatePasswordReset';
|
|
26
29
|
import { login } from '../src/routes/login';
|
|
27
30
|
import { logout } from '../src/routes/logout';
|
|
28
31
|
import { validateResetPasswordToken } from '../src/routes/validateResetPasswordToken';
|
|
29
|
-
import { Signup } from '../src/services/Signup';
|
|
30
|
-
import { UpdateUserInfo } from '../src/services/UpdateUserInfo';
|
|
31
|
-
import { userCache } from '../src/authorization/userCache';
|
|
32
32
|
|
|
33
33
|
const sourceLinks = {
|
|
34
34
|
'@proteinjs/user-server/DbSessionStore': DbSessionStore,
|
|
35
35
|
'@proteinjs/user-server/SocketIOSessionWatcher': SocketIOSessionWatcher,
|
|
36
|
+
'@proteinjs/user-server/userCache': userCache,
|
|
37
|
+
'@proteinjs/user-server/Signup': Signup,
|
|
38
|
+
'@proteinjs/user-server/UpdateUserInfo': UpdateUserInfo,
|
|
36
39
|
'@proteinjs/user-server/executePasswordReset': executePasswordReset,
|
|
37
40
|
'@proteinjs/user-server/initiatePasswordReset': initiatePasswordReset,
|
|
38
41
|
'@proteinjs/user-server/login': login,
|
|
39
42
|
'@proteinjs/user-server/logout': logout,
|
|
40
43
|
'@proteinjs/user-server/validateResetPasswordToken': validateResetPasswordToken,
|
|
41
|
-
'@proteinjs/user-server/Signup': Signup,
|
|
42
|
-
'@proteinjs/user-server/UpdateUserInfo': UpdateUserInfo,
|
|
43
|
-
'@proteinjs/user-server/userCache': userCache,
|
|
44
44
|
};
|
|
45
45
|
|
|
46
46
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@proteinjs/user-server",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.35",
|
|
4
4
|
"description": "User server components",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"@proteinjs/db": "1.15.0",
|
|
25
|
-
"@proteinjs/email-server": "1.2.
|
|
25
|
+
"@proteinjs/email-server": "1.2.6",
|
|
26
26
|
"@proteinjs/logger": "1.0.8",
|
|
27
27
|
"@proteinjs/reflection": "1.1.10",
|
|
28
28
|
"@proteinjs/server": "2.1.3",
|
|
@@ -25,7 +25,7 @@ export async function authenticate(email: string, password: string): Promise<tru
|
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
const users = await getDbAsSystem().query(tables.User, {
|
|
28
|
-
email,
|
|
28
|
+
email: email.toLowerCase(),
|
|
29
29
|
password: sha256(password).toString(),
|
|
30
30
|
});
|
|
31
31
|
if (users.length < 1) {
|
|
@@ -23,7 +23,7 @@ export const userCache: SessionDataCache<User> = {
|
|
|
23
23
|
};
|
|
24
24
|
user = adminUser;
|
|
25
25
|
} else {
|
|
26
|
-
user = await getDbAsSystem().get(tables.User, { email: userEmail });
|
|
26
|
+
user = await getDbAsSystem().get(tables.User, { email: userEmail.toLowerCase() });
|
|
27
27
|
delete (user as any)['password'];
|
|
28
28
|
}
|
|
29
29
|
}
|
|
@@ -27,7 +27,7 @@ export const initiatePasswordReset: Route = {
|
|
|
27
27
|
method: routes.initiatePasswordReset.method,
|
|
28
28
|
onRequest: async (request, response): Promise<void> => {
|
|
29
29
|
const logger = new Logger({ name: 'initiatePasswordReset' });
|
|
30
|
-
const
|
|
30
|
+
const email = request.body.email?.toLowerCase();
|
|
31
31
|
const db = getDbAsSystem();
|
|
32
32
|
|
|
33
33
|
const genericResponse = { message: 'If an account with that email exists, we have sent a password reset link.' };
|
package/src/services/Signup.ts
CHANGED
|
@@ -67,7 +67,7 @@ export class Signup implements SignupService {
|
|
|
67
67
|
await db.delete(tables.Invite, { token });
|
|
68
68
|
}
|
|
69
69
|
|
|
70
|
-
const email = invite ? invite.email : user.email;
|
|
70
|
+
const email = (invite ? invite.email : user.email)?.toLowerCase();
|
|
71
71
|
if (!email) {
|
|
72
72
|
throw new Error('Email is required when there is no invite');
|
|
73
73
|
}
|
|
@@ -79,14 +79,16 @@ export class Signup implements SignupService {
|
|
|
79
79
|
const userRecord = await db.get(tables.User, { email });
|
|
80
80
|
if (userRecord) {
|
|
81
81
|
logger.error({ message: `User with this email already exists`, obj: { email } });
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
82
|
+
if (config.getExistingUserEmailContent) {
|
|
83
|
+
const { text, html } = config.getExistingUserEmailContent();
|
|
84
|
+
await emailSender.sendEmail({
|
|
85
|
+
to: email,
|
|
86
|
+
subject: config.existingUserSubject || config.options?.subject || 'Account already exists',
|
|
87
|
+
text,
|
|
88
|
+
html,
|
|
89
|
+
...config.options,
|
|
90
|
+
});
|
|
91
|
+
}
|
|
90
92
|
return;
|
|
91
93
|
}
|
|
92
94
|
|
|
@@ -112,9 +114,10 @@ export class Signup implements SignupService {
|
|
|
112
114
|
|
|
113
115
|
async sendInvite(email: string): Promise<SendInviteResponse> {
|
|
114
116
|
const logger = new Logger({ name: 'Signup.sendInvite' });
|
|
117
|
+
const caseInsensitiveEmail = email.toLowerCase();
|
|
115
118
|
try {
|
|
116
119
|
const db = getDbAsSystem();
|
|
117
|
-
const userRecord = await db.get(tables.User, { email });
|
|
120
|
+
const userRecord = await db.get(tables.User, { email: caseInsensitiveEmail });
|
|
118
121
|
if (userRecord) {
|
|
119
122
|
return { sent: false, error: 'User already exists with that email.' };
|
|
120
123
|
}
|
|
@@ -130,7 +133,7 @@ export class Signup implements SignupService {
|
|
|
130
133
|
|
|
131
134
|
const token = lib.WordArray.random(32).toString();
|
|
132
135
|
const tokenExpiresAt = moment().add(7, 'days');
|
|
133
|
-
let invite = await db.get(tables.Invite, { email });
|
|
136
|
+
let invite = await db.get(tables.Invite, { email: caseInsensitiveEmail });
|
|
134
137
|
if (invite) {
|
|
135
138
|
invite = {
|
|
136
139
|
...invite,
|
|
@@ -140,12 +143,17 @@ export class Signup implements SignupService {
|
|
|
140
143
|
await db.update(tables.Invite, invite);
|
|
141
144
|
} else {
|
|
142
145
|
const userId = new UserRepo().getUser().id;
|
|
143
|
-
invite = await db.insert(tables.Invite, {
|
|
146
|
+
invite = await db.insert(tables.Invite, {
|
|
147
|
+
email: caseInsensitiveEmail,
|
|
148
|
+
token,
|
|
149
|
+
tokenExpiresAt,
|
|
150
|
+
invitedBy: userId,
|
|
151
|
+
});
|
|
144
152
|
}
|
|
145
153
|
|
|
146
154
|
const { text, html } = config.getEmailContent(`${uiRoutes.auth.signup}?token=${token}`);
|
|
147
155
|
await emailSender.sendEmail({
|
|
148
|
-
to:
|
|
156
|
+
to: caseInsensitiveEmail,
|
|
149
157
|
subject: config.options?.subject || `You're Invited`,
|
|
150
158
|
text,
|
|
151
159
|
html,
|
|
@@ -154,7 +162,7 @@ export class Signup implements SignupService {
|
|
|
154
162
|
|
|
155
163
|
return { sent: true };
|
|
156
164
|
} catch (error: any) {
|
|
157
|
-
logger.error({ message: 'Error sending invite', obj: { email }, error });
|
|
165
|
+
logger.error({ message: 'Error sending invite', obj: { email: caseInsensitiveEmail }, error });
|
|
158
166
|
return {
|
|
159
167
|
sent: false,
|
|
160
168
|
error: 'Error occurred.',
|
|
@@ -168,7 +176,7 @@ export class Signup implements SignupService {
|
|
|
168
176
|
}
|
|
169
177
|
|
|
170
178
|
const db = getDb();
|
|
171
|
-
await db.delete(tables.Invite, { email });
|
|
179
|
+
await db.delete(tables.Invite, { email: email.toLowerCase() });
|
|
172
180
|
}
|
|
173
181
|
|
|
174
182
|
/**
|