@proteinjs/user 1.0.38 → 1.0.40
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/dist/generated/index.d.ts.map +1 -1
- package/dist/generated/index.js +3 -1
- package/dist/generated/index.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/src/routes.d.ts +11 -0
- package/dist/src/routes.d.ts.map +1 -1
- package/dist/src/routes.js +12 -2
- package/dist/src/routes.js.map +1 -1
- package/dist/src/services/SignupService.d.ts +24 -0
- package/dist/src/services/SignupService.d.ts.map +1 -0
- package/dist/src/services/SignupService.js +6 -0
- package/dist/src/services/SignupService.js.map +1 -0
- package/dist/src/tables/InviteTable.d.ts +22 -0
- package/dist/src/tables/InviteTable.d.ts.map +1 -0
- package/dist/src/tables/InviteTable.js +36 -0
- package/dist/src/tables/InviteTable.js.map +1 -0
- package/dist/src/tables/UserTable.d.ts +2 -0
- package/dist/src/tables/UserTable.d.ts.map +1 -1
- package/dist/src/tables/UserTable.js +1 -0
- package/dist/src/tables/UserTable.js.map +1 -1
- package/dist/src/tables/tables.d.ts +2 -0
- package/dist/src/tables/tables.d.ts.map +1 -1
- package/dist/src/tables/tables.js +2 -0
- package/dist/src/tables/tables.js.map +1 -1
- package/generated/index.ts +3 -1
- package/index.ts +3 -0
- package/package.json +8 -8
- package/src/routes.ts +12 -1
- package/src/services/SignupService.ts +28 -0
- package/src/tables/InviteTable.ts +19 -0
- package/src/tables/UserTable.ts +2 -0
- package/src/tables/tables.ts +2 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../generated/index.ts"],"names":[],"mappings":"AAAA,oCAAoC;AAEpC,OAAO,eAAe,CAAC;AACvB,OAAO,uBAAuB,CAAC;AAC/B,OAAO,uBAAuB,CAAC;AAC/B,OAAO,oBAAoB,CAAC;AAC5B,OAAO,sBAAsB,CAAC;AAC9B,OAAO,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../generated/index.ts"],"names":[],"mappings":"AAAA,oCAAoC;AAEpC,OAAO,eAAe,CAAC;AACvB,OAAO,uBAAuB,CAAC;AAC/B,OAAO,uBAAuB,CAAC;AAC/B,OAAO,oBAAoB,CAAC;AAC5B,OAAO,sBAAsB,CAAC;AAC9B,OAAO,QAAQ,CAAC;AA6BhB,cAAc,UAAU,CAAC"}
|
package/dist/generated/index.js
CHANGED
|
@@ -22,13 +22,15 @@ require("@proteinjs/service");
|
|
|
22
22
|
require("@proteinjs/user-auth");
|
|
23
23
|
require("moment");
|
|
24
24
|
/** Generate Source Graph */
|
|
25
|
-
var sourceGraph = "{\"options\":{\"directed\":true,\"multigraph\":false,\"compound\":false},\"nodes\":[{\"v\":\"@proteinjs/user/ScopedRecord\",\"value\":{\"packageName\":\"@proteinjs/user\",\"name\":\"ScopedRecord\",\"filePath\":\"/Users/veronica/Repositories/n3xa-meta-repo/packages/proteinjs/packages/user/packages/user/src/ScopedRecord.ts\",\"qualifiedName\":\"@proteinjs/user/ScopedRecord\",\"properties\":[{\"name\":\"scope\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"}],\"methods\":[],\"typeParameters\":[],\"directParents\":[{\"packageName\":\"@proteinjs/db\",\"name\":\"Record\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db/Record\",\"properties\":[],\"methods\":[],\"typeParameters\":[],\"directParents\":[]}],\"sourceType\":3}},{\"v\":\"@proteinjs/db/Record\"},{\"v\":\"@proteinjs/user/UserRepo\",\"value\":{\"packageName\":\"@proteinjs/user\",\"name\":\"UserRepo\",\"filePath\":\"/Users/veronica/Repositories/n3xa-meta-repo/packages/proteinjs/packages/user/packages/user/src/UserRepo.ts\",\"qualifiedName\":\"@proteinjs/user/UserRepo\",\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"properties\":[],\"methods\":[{\"name\":\"getUser\",\"returnType\":{\"packageName\":\"\",\"name\":\"Omit<User, 'roles'> & AuthenticatedUser\",\"filePath\":null,\"qualifiedName\":\"/Omit<User, 'roles'> & AuthenticatedUser\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[]},{\"name\":\"setUser\",\"returnType\":null,\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"user\",\"type\":{\"packageName\":\"@proteinjs/user\",\"name\":\"User\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/user/User\",\"typeParameters\":null,\"directParents\":null}}]}],\"typeParameters\":[],\"directParentInterfaces\":[{\"packageName\":\"@proteinjs/user-auth\",\"name\":\"AuthenticatedUserRepo\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/user-auth/AuthenticatedUserRepo\",\"properties\":[],\"methods\":[],\"typeParameters\":[],\"directParents\":[]}],\"directParentClasses\":[],\"sourceType\":2}},{\"v\":\"@proteinjs/user-auth/AuthenticatedUserRepo\"},{\"v\":\"@proteinjs/user/Session\",\"value\":{\"packageName\":\"@proteinjs/user\",\"name\":\"Session\",\"filePath\":\"/Users/veronica/Repositories/n3xa-meta-repo/packages/proteinjs/packages/user/packages/user/src/tables/SessionTable.ts\",\"qualifiedName\":\"@proteinjs/user/Session\",\"typeParameters\":[],\"directParents\":[{\"packageName\":\"@proteinjs/db\",\"name\":\"Record\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db/Record\",\"typeParameters\":[],\"directParents\":null},{\"packageName\":\"@proteinjs/user\",\"name\":\"{\\n sessionId: string;\\n session: string;\\n expires: Date;\\n userEmail: string;\\n}\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/user/{\\n sessionId: string;\\n session: string;\\n expires: Date;\\n userEmail: string;\\n}\",\"typeParameters\":[],\"directParents\":null}],\"sourceType\":1}},{\"v\":\"@proteinjs/user/SessionTable\",\"value\":{\"packageName\":\"@proteinjs/user\",\"name\":\"SessionTable\",\"filePath\":\"/Users/veronica/Repositories/n3xa-meta-repo/packages/proteinjs/packages/user/packages/user/src/tables/SessionTable.ts\",\"qualifiedName\":\"@proteinjs/user/SessionTable\",\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"properties\":[{\"name\":\"name\",\"type\":null,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"},{\"name\":\"columns\",\"type\":null,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"}],\"methods\":[],\"typeParameters\":[],\"directParentInterfaces\":[],\"directParentClasses\":[{\"packageName\":\"@proteinjs/db\",\"name\":\"Table\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db/Table\",\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"properties\":[],\"methods\":[],\"typeParameters\":[\"@proteinjs/user/Session\"],\"directParentInterfaces\":[],\"directParentClasses\":[]}],\"sourceType\":2}},{\"v\":\"@proteinjs/db/Table\"},{\"v\":\"@proteinjs/user/User\",\"value\":{\"packageName\":\"@proteinjs/user\",\"name\":\"User\",\"filePath\":\"/Users/veronica/Repositories/n3xa-meta-repo/packages/proteinjs/packages/user/packages/user/src/tables/UserTable.ts\",\"qualifiedName\":\"@proteinjs/user/User\",\"typeParameters\":[],\"directParents\":[{\"packageName\":\"@proteinjs/db\",\"name\":\"Record\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db/Record\",\"typeParameters\":[],\"directParents\":null},{\"packageName\":\"@proteinjs/user\",\"name\":\"{\\n name: string;\\n email: string;\\n password: string;\\n passwordResetToken?: string | null;\\n passwordResetTokenExpiration?: Moment | null;\\n emailVerified: boolean;\\n roles: string;\\n}\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/user/{\\n name: string;\\n email: string;\\n password: string;\\n passwordResetToken?: string | null;\\n passwordResetTokenExpiration?: Moment | null;\\n emailVerified: boolean;\\n roles: string;\\n}\",\"typeParameters\":[],\"directParents\":null}],\"sourceType\":1}},{\"v\":\"@proteinjs/user/UserTable\",\"value\":{\"packageName\":\"@proteinjs/user\",\"name\":\"UserTable\",\"filePath\":\"/Users/veronica/Repositories/n3xa-meta-repo/packages/proteinjs/packages/user/packages/user/src/tables/UserTable.ts\",\"qualifiedName\":\"@proteinjs/user/UserTable\",\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"properties\":[{\"name\":\"name\",\"type\":null,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"},{\"name\":\"columns\",\"type\":null,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"}],\"methods\":[],\"typeParameters\":[],\"directParentInterfaces\":[],\"directParentClasses\":[{\"packageName\":\"@proteinjs/db\",\"name\":\"Table\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db/Table\",\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"properties\":[],\"methods\":[],\"typeParameters\":[\"@proteinjs/user/User\"],\"directParentInterfaces\":[],\"directParentClasses\":[]}],\"sourceType\":2}}],\"edges\":[{\"v\":\"@proteinjs/user/ScopedRecord\",\"w\":\"@proteinjs/db/Record\",\"value\":\"extends interface\"},{\"v\":\"@proteinjs/user/UserRepo\",\"w\":\"@proteinjs/user-auth/AuthenticatedUserRepo\",\"value\":\"implements interface\"},{\"v\":\"@proteinjs/user/Session\",\"w\":\"@proteinjs/db/Record\",\"value\":\"extends type\"},{\"v\":\"@proteinjs/user/SessionTable\",\"w\":\"@proteinjs/db/Table\",\"value\":\"extends class\"},{\"v\":\"@proteinjs/user/User\",\"w\":\"@proteinjs/db/Record\",\"value\":\"extends type\"},{\"v\":\"@proteinjs/user/UserTable\",\"w\":\"@proteinjs/db/Table\",\"value\":\"extends class\"}]}";
|
|
25
|
+
var sourceGraph = "{\"options\":{\"directed\":true,\"multigraph\":false,\"compound\":false},\"nodes\":[{\"v\":\"@proteinjs/user/ScopedRecord\",\"value\":{\"packageName\":\"@proteinjs/user\",\"name\":\"ScopedRecord\",\"filePath\":\"/Users/veronica/Repositories/n3xa-meta-repo/packages/proteinjs/packages/user/packages/user/src/ScopedRecord.ts\",\"qualifiedName\":\"@proteinjs/user/ScopedRecord\",\"properties\":[{\"name\":\"scope\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"}],\"methods\":[],\"typeParameters\":[],\"directParents\":[{\"packageName\":\"@proteinjs/db\",\"name\":\"Record\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db/Record\",\"properties\":[],\"methods\":[],\"typeParameters\":[],\"directParents\":[]}],\"sourceType\":3}},{\"v\":\"@proteinjs/db/Record\"},{\"v\":\"@proteinjs/user/UserRepo\",\"value\":{\"packageName\":\"@proteinjs/user\",\"name\":\"UserRepo\",\"filePath\":\"/Users/veronica/Repositories/n3xa-meta-repo/packages/proteinjs/packages/user/packages/user/src/UserRepo.ts\",\"qualifiedName\":\"@proteinjs/user/UserRepo\",\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"properties\":[],\"methods\":[{\"name\":\"getUser\",\"returnType\":{\"packageName\":\"\",\"name\":\"Omit<User, 'roles'> & AuthenticatedUser\",\"filePath\":null,\"qualifiedName\":\"/Omit<User, 'roles'> & AuthenticatedUser\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[]},{\"name\":\"setUser\",\"returnType\":null,\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"user\",\"type\":{\"packageName\":\"@proteinjs/user\",\"name\":\"User\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/user/User\",\"typeParameters\":null,\"directParents\":null}}]}],\"typeParameters\":[],\"directParentInterfaces\":[{\"packageName\":\"@proteinjs/user-auth\",\"name\":\"AuthenticatedUserRepo\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/user-auth/AuthenticatedUserRepo\",\"properties\":[],\"methods\":[],\"typeParameters\":[],\"directParents\":[]}],\"directParentClasses\":[],\"sourceType\":2}},{\"v\":\"@proteinjs/user-auth/AuthenticatedUserRepo\"},{\"v\":\"/Pick\"},{\"v\":\"@proteinjs/user/SignupService\",\"value\":{\"packageName\":\"@proteinjs/user\",\"name\":\"SignupService\",\"filePath\":\"/Users/veronica/Repositories/n3xa-meta-repo/packages/proteinjs/packages/user/packages/user/src/services/SignupService.ts\",\"qualifiedName\":\"@proteinjs/user/SignupService\",\"properties\":[],\"methods\":[{\"name\":\"createUser\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<void>\",\"filePath\":null,\"qualifiedName\":\"/Promise<void>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":true,\"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\":false,\"isOptional\":false,\"isAbstract\":true,\"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\":false,\"isOptional\":false,\"isAbstract\":true,\"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\":false,\"isOptional\":false,\"isAbstract\":true,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"inviteToken\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null}}]}],\"typeParameters\":[],\"directParents\":[{\"packageName\":\"@proteinjs/service\",\"name\":\"Service\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/service/Service\",\"properties\":[],\"methods\":[],\"typeParameters\":[],\"directParents\":[]}],\"sourceType\":3}},{\"v\":\"@proteinjs/service/Service\"},{\"v\":\"@proteinjs/user/Invite\",\"value\":{\"packageName\":\"@proteinjs/user\",\"name\":\"Invite\",\"filePath\":\"/Users/veronica/Repositories/n3xa-meta-repo/packages/proteinjs/packages/user/packages/user/src/tables/InviteTable.ts\",\"qualifiedName\":\"@proteinjs/user/Invite\",\"typeParameters\":[],\"directParents\":[{\"packageName\":\"@proteinjs/db\",\"name\":\"Record\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db/Record\",\"typeParameters\":[],\"directParents\":null},{\"packageName\":\"@proteinjs/user\",\"name\":\"{\\n email: string;\\n token: string | null;\\n tokenExpiresAt: Moment | null;\\n invitedBy: string;\\n}\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/user/{\\n email: string;\\n token: string | null;\\n tokenExpiresAt: Moment | null;\\n invitedBy: string;\\n}\",\"typeParameters\":[],\"directParents\":null}],\"sourceType\":1}},{\"v\":\"@proteinjs/user/InviteTable\",\"value\":{\"packageName\":\"@proteinjs/user\",\"name\":\"InviteTable\",\"filePath\":\"/Users/veronica/Repositories/n3xa-meta-repo/packages/proteinjs/packages/user/packages/user/src/tables/InviteTable.ts\",\"qualifiedName\":\"@proteinjs/user/InviteTable\",\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"properties\":[{\"name\":\"name\",\"type\":null,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"},{\"name\":\"columns\",\"type\":null,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"}],\"methods\":[],\"typeParameters\":[],\"directParentInterfaces\":[],\"directParentClasses\":[{\"packageName\":\"@proteinjs/db\",\"name\":\"Table\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db/Table\",\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"properties\":[],\"methods\":[],\"typeParameters\":[\"@proteinjs/user/Invite\"],\"directParentInterfaces\":[],\"directParentClasses\":[]}],\"sourceType\":2}},{\"v\":\"@proteinjs/db/Table\"},{\"v\":\"@proteinjs/user/Session\",\"value\":{\"packageName\":\"@proteinjs/user\",\"name\":\"Session\",\"filePath\":\"/Users/veronica/Repositories/n3xa-meta-repo/packages/proteinjs/packages/user/packages/user/src/tables/SessionTable.ts\",\"qualifiedName\":\"@proteinjs/user/Session\",\"typeParameters\":[],\"directParents\":[{\"packageName\":\"@proteinjs/db\",\"name\":\"Record\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db/Record\",\"typeParameters\":[],\"directParents\":null},{\"packageName\":\"@proteinjs/user\",\"name\":\"{\\n sessionId: string;\\n session: string;\\n expires: Date;\\n userEmail: string;\\n}\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/user/{\\n sessionId: string;\\n session: string;\\n expires: Date;\\n userEmail: string;\\n}\",\"typeParameters\":[],\"directParents\":null}],\"sourceType\":1}},{\"v\":\"@proteinjs/user/SessionTable\",\"value\":{\"packageName\":\"@proteinjs/user\",\"name\":\"SessionTable\",\"filePath\":\"/Users/veronica/Repositories/n3xa-meta-repo/packages/proteinjs/packages/user/packages/user/src/tables/SessionTable.ts\",\"qualifiedName\":\"@proteinjs/user/SessionTable\",\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"properties\":[{\"name\":\"name\",\"type\":null,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"},{\"name\":\"columns\",\"type\":null,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"}],\"methods\":[],\"typeParameters\":[],\"directParentInterfaces\":[],\"directParentClasses\":[{\"packageName\":\"@proteinjs/db\",\"name\":\"Table\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db/Table\",\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"properties\":[],\"methods\":[],\"typeParameters\":[\"@proteinjs/user/Session\"],\"directParentInterfaces\":[],\"directParentClasses\":[]}],\"sourceType\":2}},{\"v\":\"@proteinjs/user/User\",\"value\":{\"packageName\":\"@proteinjs/user\",\"name\":\"User\",\"filePath\":\"/Users/veronica/Repositories/n3xa-meta-repo/packages/proteinjs/packages/user/packages/user/src/tables/UserTable.ts\",\"qualifiedName\":\"@proteinjs/user/User\",\"typeParameters\":[],\"directParents\":[{\"packageName\":\"@proteinjs/db\",\"name\":\"Record\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db/Record\",\"typeParameters\":[],\"directParents\":null},{\"packageName\":\"@proteinjs/user\",\"name\":\"{\\n name: string;\\n email: string;\\n password: string;\\n passwordResetToken?: string | null;\\n passwordResetTokenExpiration?: Moment | null;\\n emailVerified: boolean;\\n roles: string;\\n invitedBy?: string | null;\\n}\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/user/{\\n name: string;\\n email: string;\\n password: string;\\n passwordResetToken?: string | null;\\n passwordResetTokenExpiration?: Moment | null;\\n emailVerified: boolean;\\n roles: string;\\n invitedBy?: string | null;\\n}\",\"typeParameters\":[],\"directParents\":null}],\"sourceType\":1}},{\"v\":\"@proteinjs/user/UserTable\",\"value\":{\"packageName\":\"@proteinjs/user\",\"name\":\"UserTable\",\"filePath\":\"/Users/veronica/Repositories/n3xa-meta-repo/packages/proteinjs/packages/user/packages/user/src/tables/UserTable.ts\",\"qualifiedName\":\"@proteinjs/user/UserTable\",\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"properties\":[{\"name\":\"name\",\"type\":null,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"},{\"name\":\"columns\",\"type\":null,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"}],\"methods\":[],\"typeParameters\":[],\"directParentInterfaces\":[],\"directParentClasses\":[{\"packageName\":\"@proteinjs/db\",\"name\":\"Table\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db/Table\",\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"properties\":[],\"methods\":[],\"typeParameters\":[\"@proteinjs/user/User\"],\"directParentInterfaces\":[],\"directParentClasses\":[]}],\"sourceType\":2}}],\"edges\":[{\"v\":\"@proteinjs/user/ScopedRecord\",\"w\":\"@proteinjs/db/Record\",\"value\":\"extends interface\"},{\"v\":\"@proteinjs/user/UserRepo\",\"w\":\"@proteinjs/user-auth/AuthenticatedUserRepo\",\"value\":\"implements interface\"},{\"v\":\"@proteinjs/user/SignupService\",\"w\":\"@proteinjs/service/Service\",\"value\":\"extends interface\"},{\"v\":\"@proteinjs/user/Invite\",\"w\":\"@proteinjs/db/Record\",\"value\":\"extends type\"},{\"v\":\"@proteinjs/user/InviteTable\",\"w\":\"@proteinjs/db/Table\",\"value\":\"extends class\"},{\"v\":\"@proteinjs/user/Session\",\"w\":\"@proteinjs/db/Record\",\"value\":\"extends type\"},{\"v\":\"@proteinjs/user/SessionTable\",\"w\":\"@proteinjs/db/Table\",\"value\":\"extends class\"},{\"v\":\"@proteinjs/user/User\",\"w\":\"@proteinjs/db/Record\",\"value\":\"extends type\"},{\"v\":\"@proteinjs/user/UserTable\",\"w\":\"@proteinjs/db/Table\",\"value\":\"extends class\"}]}";
|
|
26
26
|
/** Generate Source Links */
|
|
27
27
|
var UserRepo_1 = require("../src/UserRepo");
|
|
28
|
+
var InviteTable_1 = require("../src/tables/InviteTable");
|
|
28
29
|
var SessionTable_1 = require("../src/tables/SessionTable");
|
|
29
30
|
var UserTable_1 = require("../src/tables/UserTable");
|
|
30
31
|
var sourceLinks = {
|
|
31
32
|
'@proteinjs/user/UserRepo': UserRepo_1.UserRepo,
|
|
33
|
+
'@proteinjs/user/InviteTable': InviteTable_1.InviteTable,
|
|
32
34
|
'@proteinjs/user/SessionTable': SessionTable_1.SessionTable,
|
|
33
35
|
'@proteinjs/user/UserTable': UserTable_1.UserTable,
|
|
34
36
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../generated/index.ts"],"names":[],"mappings":";AAAA,oCAAoC;;;;;;;;;;;;;;;;AAEpC,yBAAuB;AACvB,iCAA+B;AAC/B,iCAA+B;AAC/B,8BAA4B;AAC5B,gCAA8B;AAC9B,kBAAgB;AAGhB,4BAA4B;AAE5B,IAAM,WAAW,GAAG,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../generated/index.ts"],"names":[],"mappings":";AAAA,oCAAoC;;;;;;;;;;;;;;;;AAEpC,yBAAuB;AACvB,iCAA+B;AAC/B,iCAA+B;AAC/B,8BAA4B;AAC5B,gCAA8B;AAC9B,kBAAgB;AAGhB,4BAA4B;AAE5B,IAAM,WAAW,GAAG,+9XAA+9X,CAAC;AAGp/X,4BAA4B;AAE5B,4CAA2C;AAC3C,yDAAwD;AACxD,2DAA0D;AAC1D,qDAAoD;AAEpD,IAAM,WAAW,GAAG;IACnB,0BAA0B,EAAE,mBAAQ;IACpC,6BAA6B,EAAE,yBAAW;IAC1C,8BAA8B,EAAE,2BAAY;IAC5C,2BAA2B,EAAE,qBAAS;CACtC,CAAC;AAGF,kCAAkC;AAElC,oDAAyD;AACzD,6BAAgB,CAAC,KAAK,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC;AAGjD,2CAAyB"}
|
package/dist/index.d.ts
CHANGED
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,qBAAqB,CAAC;AACpC,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AAEnC,cAAc,sBAAsB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,cAAc,8BAA8B,CAAC;AAE7C,cAAc,0BAA0B,CAAC;AACzC,cAAc,wBAAwB,CAAC;AACvC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,qBAAqB,CAAC;AACpC,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AAEnC,cAAc,sBAAsB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -14,6 +14,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./src/services/SignupService"), exports);
|
|
18
|
+
__exportStar(require("./src/tables/InviteTable"), exports);
|
|
17
19
|
__exportStar(require("./src/tables/UserTable"), exports);
|
|
18
20
|
__exportStar(require("./src/tables/SessionTable"), exports);
|
|
19
21
|
__exportStar(require("./src/tables/tables"), exports);
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yDAAuC;AACvC,4DAA0C;AAC1C,sDAAoC;AACpC,+CAA6B;AAC7B,kDAAgC;AAChC,iDAA+B;AAC/B,qDAAmC;AAEnC,uDAAqC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+DAA6C;AAE7C,2DAAyC;AACzC,yDAAuC;AACvC,4DAA0C;AAC1C,sDAAoC;AACpC,+CAA6B;AAC7B,kDAAgC;AAChC,iDAA+B;AAC/B,qDAAmC;AAEnC,uDAAqC"}
|
package/dist/src/routes.d.ts
CHANGED
|
@@ -4,4 +4,15 @@ export declare const routes: {
|
|
|
4
4
|
method: 'get' | 'post' | 'put' | 'patch' | 'delete';
|
|
5
5
|
};
|
|
6
6
|
};
|
|
7
|
+
export declare const uiRoutes: {
|
|
8
|
+
auth: {
|
|
9
|
+
login: string;
|
|
10
|
+
forgotPassword: string;
|
|
11
|
+
passwordReset: string;
|
|
12
|
+
signup: string;
|
|
13
|
+
};
|
|
14
|
+
admin: {
|
|
15
|
+
invite: string;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
7
18
|
//# sourceMappingURL=routes.d.ts.map
|
package/dist/src/routes.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../src/routes.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM,EAAE;IAAE,CAAC,IAAI,EAAE,MAAM,GAAG;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,KAAK,GAAG,MAAM,GAAG,KAAK,GAAG,OAAO,GAAG,QAAQ,CAAA;KAAE,CAAA;
|
|
1
|
+
{"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../src/routes.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM,EAAE;IAAE,CAAC,IAAI,EAAE,MAAM,GAAG;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,KAAK,GAAG,MAAM,GAAG,KAAK,GAAG,OAAO,GAAG,QAAQ,CAAA;KAAE,CAAA;CAM3G,CAAC;AAEF,eAAO,MAAM,QAAQ;;;;;;;;;;CAUpB,CAAC"}
|
package/dist/src/routes.js
CHANGED
|
@@ -1,12 +1,22 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.routes = void 0;
|
|
3
|
+
exports.uiRoutes = exports.routes = void 0;
|
|
4
4
|
exports.routes = {
|
|
5
|
-
createUser: { path: '/user/create', method: 'post' },
|
|
6
5
|
login: { path: '/user/login', method: 'post' },
|
|
7
6
|
initiatePasswordReset: { path: '/user/initiate-password-reset', method: 'post' },
|
|
8
7
|
executePasswordReset: { path: '/user/execute-password-reset', method: 'post' },
|
|
9
8
|
validateResetToken: { path: '/user/validate-reset-token', method: 'get' },
|
|
10
9
|
logout: { path: '/user/logout', method: 'get' },
|
|
11
10
|
};
|
|
11
|
+
exports.uiRoutes = {
|
|
12
|
+
auth: {
|
|
13
|
+
login: 'login',
|
|
14
|
+
forgotPassword: 'login/forgot-password',
|
|
15
|
+
passwordReset: 'login/password-reset',
|
|
16
|
+
signup: 'signup',
|
|
17
|
+
},
|
|
18
|
+
admin: {
|
|
19
|
+
invite: 'invite',
|
|
20
|
+
},
|
|
21
|
+
};
|
|
12
22
|
//# sourceMappingURL=routes.js.map
|
package/dist/src/routes.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routes.js","sourceRoot":"","sources":["../../src/routes.ts"],"names":[],"mappings":";;;AAAa,QAAA,MAAM,GAA8F;IAC/G,
|
|
1
|
+
{"version":3,"file":"routes.js","sourceRoot":"","sources":["../../src/routes.ts"],"names":[],"mappings":";;;AAAa,QAAA,MAAM,GAA8F;IAC/G,KAAK,EAAE,EAAE,IAAI,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,EAAE;IAC9C,qBAAqB,EAAE,EAAE,IAAI,EAAE,+BAA+B,EAAE,MAAM,EAAE,MAAM,EAAE;IAChF,oBAAoB,EAAE,EAAE,IAAI,EAAE,8BAA8B,EAAE,MAAM,EAAE,MAAM,EAAE;IAC9E,kBAAkB,EAAE,EAAE,IAAI,EAAE,4BAA4B,EAAE,MAAM,EAAE,KAAK,EAAE;IACzE,MAAM,EAAE,EAAE,IAAI,EAAE,cAAc,EAAE,MAAM,EAAE,KAAK,EAAE;CAChD,CAAC;AAEW,QAAA,QAAQ,GAAG;IACtB,IAAI,EAAE;QACJ,KAAK,EAAE,OAAO;QACd,cAAc,EAAE,uBAAuB;QACvC,aAAa,EAAE,sBAAsB;QACrC,MAAM,EAAE,QAAQ;KACjB;IACD,KAAK,EAAE;QACL,MAAM,EAAE,QAAQ;KACjB;CACF,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Service } from '@proteinjs/service';
|
|
2
|
+
import { User } from '../tables/UserTable';
|
|
3
|
+
import { Invite } from '../tables/InviteTable';
|
|
4
|
+
export declare const getSignupService: () => SignupService;
|
|
5
|
+
export type SendInviteResponse = {
|
|
6
|
+
sent: boolean;
|
|
7
|
+
error?: string;
|
|
8
|
+
};
|
|
9
|
+
export type InitializeSignupResponse = {
|
|
10
|
+
isReady: boolean;
|
|
11
|
+
error?: string;
|
|
12
|
+
isInviteOnly?: boolean;
|
|
13
|
+
invite?: Omit<Invite, 'token'>;
|
|
14
|
+
};
|
|
15
|
+
export type UserSignup = Pick<User, 'name' | 'password'> & {
|
|
16
|
+
email?: User['email'];
|
|
17
|
+
};
|
|
18
|
+
export interface SignupService extends Service {
|
|
19
|
+
createUser(user: UserSignup, token?: string): Promise<void>;
|
|
20
|
+
sendInvite(email: string): Promise<SendInviteResponse>;
|
|
21
|
+
revokeInvite(email: string): Promise<void>;
|
|
22
|
+
initializeSignup(inviteToken?: string): Promise<InitializeSignupResponse>;
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=SignupService.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SignupService.d.ts","sourceRoot":"","sources":["../../../src/services/SignupService.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAkB,MAAM,oBAAoB,CAAC;AAC7D,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAE/C,eAAO,MAAM,gBAAgB,qBAAiE,CAAC;AAE/F,MAAM,MAAM,kBAAkB,GAAG;IAC/B,IAAI,EAAE,OAAO,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG;IACrC,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,MAAM,CAAC,EAAE,IAAI,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAChC,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,UAAU,CAAC,GAAG;IACzD,KAAK,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;CACvB,CAAC;AAEF,MAAM,WAAW,aAAc,SAAQ,OAAO;IAC5C,UAAU,CAAC,IAAI,EAAE,UAAU,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC5D,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAC;IACvD,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC3C,gBAAgB,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,wBAAwB,CAAC,CAAC;CAC3E"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getSignupService = void 0;
|
|
4
|
+
var service_1 = require("@proteinjs/service");
|
|
5
|
+
exports.getSignupService = (0, service_1.serviceFactory)('@proteinjs/user/SignupService');
|
|
6
|
+
//# sourceMappingURL=SignupService.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SignupService.js","sourceRoot":"","sources":["../../../src/services/SignupService.ts"],"names":[],"mappings":";;;AAAA,8CAA6D;AAIhD,QAAA,gBAAgB,GAAG,IAAA,wBAAc,EAAgB,+BAA+B,CAAC,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Table, Record } from '@proteinjs/db';
|
|
2
|
+
import { Moment } from 'moment';
|
|
3
|
+
export type Invite = Record & {
|
|
4
|
+
email: string;
|
|
5
|
+
token: string | null;
|
|
6
|
+
tokenExpiresAt: Moment | null;
|
|
7
|
+
invitedBy: string;
|
|
8
|
+
};
|
|
9
|
+
export declare class InviteTable extends Table<Invite> {
|
|
10
|
+
name: string;
|
|
11
|
+
columns: {
|
|
12
|
+
id: import("@proteinjs/db").Column<string, any>;
|
|
13
|
+
created: import("@proteinjs/db").Column<Moment, any>;
|
|
14
|
+
updated: import("@proteinjs/db").Column<Moment, any>;
|
|
15
|
+
} & {} & {
|
|
16
|
+
email: import("@proteinjs/db").Column<string, any>;
|
|
17
|
+
invitedBy: import("@proteinjs/db").Column<string, any>;
|
|
18
|
+
token: import("@proteinjs/db").Column<string | null, any>;
|
|
19
|
+
tokenExpiresAt: import("@proteinjs/db").Column<Moment | null, any>;
|
|
20
|
+
} & {};
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=InviteTable.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InviteTable.d.ts","sourceRoot":"","sources":["../../../src/tables/InviteTable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,KAAK,EAAE,MAAM,EAAqC,MAAM,eAAe,CAAC;AAC/F,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,MAAM,MAAM,MAAM,GAAG,MAAM,GAAG;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,qBAAa,WAAY,SAAQ,KAAK,CAAC,MAAM,CAAC;IAC5C,IAAI,SAAY;IAChB,OAAO;;;;;;;;;WAKJ;CACJ"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
+
extendStatics(d, b);
|
|
13
|
+
function __() { this.constructor = d; }
|
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.InviteTable = void 0;
|
|
19
|
+
var db_1 = require("@proteinjs/db");
|
|
20
|
+
var InviteTable = /** @class */ (function (_super) {
|
|
21
|
+
__extends(InviteTable, _super);
|
|
22
|
+
function InviteTable() {
|
|
23
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
24
|
+
_this.name = 'invite';
|
|
25
|
+
_this.columns = (0, db_1.withRecordColumns)({
|
|
26
|
+
email: new db_1.StringColumn('email', {}, 250),
|
|
27
|
+
token: new db_1.StringColumn('token'),
|
|
28
|
+
tokenExpiresAt: new db_1.DateTimeColumn('token_expires_at'),
|
|
29
|
+
invitedBy: new db_1.StringColumn('invited_by'),
|
|
30
|
+
});
|
|
31
|
+
return _this;
|
|
32
|
+
}
|
|
33
|
+
return InviteTable;
|
|
34
|
+
}(db_1.Table));
|
|
35
|
+
exports.InviteTable = InviteTable;
|
|
36
|
+
//# sourceMappingURL=InviteTable.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InviteTable.js","sourceRoot":"","sources":["../../../src/tables/InviteTable.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,oCAA+F;AAU/F;IAAiC,+BAAa;IAA9C;QAAA,qEAQC;QAPC,UAAI,GAAG,QAAQ,CAAC;QAChB,aAAO,GAAG,IAAA,sBAAiB,EAAS;YAClC,KAAK,EAAE,IAAI,iBAAY,CAAC,OAAO,EAAE,EAAE,EAAE,GAAG,CAAC;YACzC,KAAK,EAAE,IAAI,iBAAY,CAAC,OAAO,CAAC;YAChC,cAAc,EAAE,IAAI,mBAAc,CAAC,kBAAkB,CAAC;YACtD,SAAS,EAAE,IAAI,iBAAY,CAAC,YAAY,CAAC;SAC1C,CAAC,CAAC;;IACL,CAAC;IAAD,kBAAC;AAAD,CAAC,AARD,CAAiC,UAAK,GAQrC;AARY,kCAAW"}
|
|
@@ -8,6 +8,7 @@ export type User = Record & {
|
|
|
8
8
|
passwordResetTokenExpiration?: Moment | null;
|
|
9
9
|
emailVerified: boolean;
|
|
10
10
|
roles: string;
|
|
11
|
+
invitedBy?: string | null;
|
|
11
12
|
};
|
|
12
13
|
export declare class UserTable extends Table<User> {
|
|
13
14
|
name: string;
|
|
@@ -23,6 +24,7 @@ export declare class UserTable extends Table<User> {
|
|
|
23
24
|
passwordResetTokenExpiration: import("@proteinjs/db").Column<Moment | null | undefined, any>;
|
|
24
25
|
emailVerified: import("@proteinjs/db").Column<boolean, any>;
|
|
25
26
|
roles: import("@proteinjs/db").Column<string, any>;
|
|
27
|
+
invitedBy: import("@proteinjs/db").Column<string | null | undefined, any>;
|
|
26
28
|
} & {};
|
|
27
29
|
}
|
|
28
30
|
//# sourceMappingURL=UserTable.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UserTable.d.ts","sourceRoot":"","sources":["../../../src/tables/UserTable.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,EACL,MAAM,EAIP,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,MAAM,MAAM,IAAI,GAAG,MAAM,GAAG;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,kBAAkB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACnC,4BAA4B,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7C,aAAa,EAAE,OAAO,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"UserTable.d.ts","sourceRoot":"","sources":["../../../src/tables/UserTable.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,EACL,MAAM,EAIP,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,MAAM,MAAM,IAAI,GAAG,MAAM,GAAG;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,kBAAkB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACnC,4BAA4B,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7C,aAAa,EAAE,OAAO,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B,CAAC;AAEF,qBAAa,SAAU,SAAQ,KAAK,CAAC,IAAI,CAAC;IACxC,IAAI,SAAU;IACd,OAAO;;;;;;;;;;;;;WASJ;CACJ"}
|
|
@@ -30,6 +30,7 @@ var UserTable = /** @class */ (function (_super) {
|
|
|
30
30
|
passwordResetTokenExpiration: new db_1.DateTimeColumn('password_reset_token_expiration'),
|
|
31
31
|
emailVerified: new db_1.BooleanColumn('email_verified'),
|
|
32
32
|
roles: new db_1.StringColumn('roles'),
|
|
33
|
+
invitedBy: new db_1.StringColumn('invited_by'),
|
|
33
34
|
});
|
|
34
35
|
return _this;
|
|
35
36
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UserTable.js","sourceRoot":"","sources":["../../../src/tables/UserTable.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,oCASuB;
|
|
1
|
+
{"version":3,"file":"UserTable.js","sourceRoot":"","sources":["../../../src/tables/UserTable.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,oCASuB;AAcvB;IAA+B,6BAAW;IAA1C;QAAA,qEAYC;QAXC,UAAI,GAAG,MAAM,CAAC;QACd,aAAO,GAAG,IAAA,sBAAiB,EAAO;YAChC,IAAI,EAAE,IAAI,iBAAY,CAAC,MAAM,CAAC;YAC9B,KAAK,EAAE,IAAI,iBAAY,CAAC,OAAO,EAAE,EAAE,EAAE,GAAG,CAAC;YACzC,QAAQ,EAAE,IAAI,mBAAc,CAAC,UAAU,CAAC;YACxC,kBAAkB,EAAE,IAAI,iBAAY,CAAC,sBAAsB,CAAC;YAC5D,4BAA4B,EAAE,IAAI,mBAAc,CAAC,iCAAiC,CAAC;YACnF,aAAa,EAAE,IAAI,kBAAa,CAAC,gBAAgB,CAAC;YAClD,KAAK,EAAE,IAAI,iBAAY,CAAC,OAAO,CAAC;YAChC,SAAS,EAAE,IAAI,iBAAY,CAAC,YAAY,CAAC;SAC1C,CAAC,CAAC;;IACL,CAAC;IAAD,gBAAC;AAAD,CAAC,AAZD,CAA+B,UAAK,GAYnC;AAZY,8BAAS"}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { User } from './UserTable';
|
|
2
2
|
import { Session } from './SessionTable';
|
|
3
3
|
import { Table } from '@proteinjs/db';
|
|
4
|
+
import { Invite } from './InviteTable';
|
|
4
5
|
export declare const tables: {
|
|
6
|
+
Invite: Table<Invite>;
|
|
5
7
|
User: Table<User>;
|
|
6
8
|
Session: Table<Session>;
|
|
7
9
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tables.d.ts","sourceRoot":"","sources":["../../../src/tables/tables.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,IAAI,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAgB,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACvD,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"tables.d.ts","sourceRoot":"","sources":["../../../src/tables/tables.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,IAAI,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAgB,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACvD,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACtC,OAAO,EAAE,MAAM,EAAe,MAAM,eAAe,CAAC;AAEpD,eAAO,MAAM,MAAM;;;;CAIlB,CAAC"}
|
|
@@ -3,7 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.tables = void 0;
|
|
4
4
|
var UserTable_1 = require("./UserTable");
|
|
5
5
|
var SessionTable_1 = require("./SessionTable");
|
|
6
|
+
var InviteTable_1 = require("./InviteTable");
|
|
6
7
|
exports.tables = {
|
|
8
|
+
Invite: new InviteTable_1.InviteTable(),
|
|
7
9
|
User: new UserTable_1.UserTable(),
|
|
8
10
|
Session: new SessionTable_1.SessionTable(),
|
|
9
11
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tables.js","sourceRoot":"","sources":["../../../src/tables/tables.ts"],"names":[],"mappings":";;;AAAA,yCAA8C;AAC9C,+CAAuD;
|
|
1
|
+
{"version":3,"file":"tables.js","sourceRoot":"","sources":["../../../src/tables/tables.ts"],"names":[],"mappings":";;;AAAA,yCAA8C;AAC9C,+CAAuD;AAEvD,6CAAoD;AAEvC,QAAA,MAAM,GAAG;IACpB,MAAM,EAAE,IAAI,yBAAW,EAAmB;IAC1C,IAAI,EAAE,IAAI,qBAAS,EAAiB;IACpC,OAAO,EAAE,IAAI,2BAAY,EAAoB;CAC9C,CAAC"}
|
package/generated/index.ts
CHANGED
|
@@ -10,17 +10,19 @@ import 'moment';
|
|
|
10
10
|
|
|
11
11
|
/** Generate Source Graph */
|
|
12
12
|
|
|
13
|
-
const sourceGraph = "{\"options\":{\"directed\":true,\"multigraph\":false,\"compound\":false},\"nodes\":[{\"v\":\"@proteinjs/user/ScopedRecord\",\"value\":{\"packageName\":\"@proteinjs/user\",\"name\":\"ScopedRecord\",\"filePath\":\"/Users/veronica/Repositories/n3xa-meta-repo/packages/proteinjs/packages/user/packages/user/src/ScopedRecord.ts\",\"qualifiedName\":\"@proteinjs/user/ScopedRecord\",\"properties\":[{\"name\":\"scope\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"}],\"methods\":[],\"typeParameters\":[],\"directParents\":[{\"packageName\":\"@proteinjs/db\",\"name\":\"Record\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db/Record\",\"properties\":[],\"methods\":[],\"typeParameters\":[],\"directParents\":[]}],\"sourceType\":3}},{\"v\":\"@proteinjs/db/Record\"},{\"v\":\"@proteinjs/user/UserRepo\",\"value\":{\"packageName\":\"@proteinjs/user\",\"name\":\"UserRepo\",\"filePath\":\"/Users/veronica/Repositories/n3xa-meta-repo/packages/proteinjs/packages/user/packages/user/src/UserRepo.ts\",\"qualifiedName\":\"@proteinjs/user/UserRepo\",\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"properties\":[],\"methods\":[{\"name\":\"getUser\",\"returnType\":{\"packageName\":\"\",\"name\":\"Omit<User, 'roles'> & AuthenticatedUser\",\"filePath\":null,\"qualifiedName\":\"/Omit<User, 'roles'> & AuthenticatedUser\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[]},{\"name\":\"setUser\",\"returnType\":null,\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"user\",\"type\":{\"packageName\":\"@proteinjs/user\",\"name\":\"User\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/user/User\",\"typeParameters\":null,\"directParents\":null}}]}],\"typeParameters\":[],\"directParentInterfaces\":[{\"packageName\":\"@proteinjs/user-auth\",\"name\":\"AuthenticatedUserRepo\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/user-auth/AuthenticatedUserRepo\",\"properties\":[],\"methods\":[],\"typeParameters\":[],\"directParents\":[]}],\"directParentClasses\":[],\"sourceType\":2}},{\"v\":\"@proteinjs/user-auth/AuthenticatedUserRepo\"},{\"v\":\"@proteinjs/user/Session\",\"value\":{\"packageName\":\"@proteinjs/user\",\"name\":\"Session\",\"filePath\":\"/Users/veronica/Repositories/n3xa-meta-repo/packages/proteinjs/packages/user/packages/user/src/tables/SessionTable.ts\",\"qualifiedName\":\"@proteinjs/user/Session\",\"typeParameters\":[],\"directParents\":[{\"packageName\":\"@proteinjs/db\",\"name\":\"Record\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db/Record\",\"typeParameters\":[],\"directParents\":null},{\"packageName\":\"@proteinjs/user\",\"name\":\"{\\n sessionId: string;\\n session: string;\\n expires: Date;\\n userEmail: string;\\n}\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/user/{\\n sessionId: string;\\n session: string;\\n expires: Date;\\n userEmail: string;\\n}\",\"typeParameters\":[],\"directParents\":null}],\"sourceType\":1}},{\"v\":\"@proteinjs/user/SessionTable\",\"value\":{\"packageName\":\"@proteinjs/user\",\"name\":\"SessionTable\",\"filePath\":\"/Users/veronica/Repositories/n3xa-meta-repo/packages/proteinjs/packages/user/packages/user/src/tables/SessionTable.ts\",\"qualifiedName\":\"@proteinjs/user/SessionTable\",\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"properties\":[{\"name\":\"name\",\"type\":null,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"},{\"name\":\"columns\",\"type\":null,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"}],\"methods\":[],\"typeParameters\":[],\"directParentInterfaces\":[],\"directParentClasses\":[{\"packageName\":\"@proteinjs/db\",\"name\":\"Table\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db/Table\",\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"properties\":[],\"methods\":[],\"typeParameters\":[\"@proteinjs/user/Session\"],\"directParentInterfaces\":[],\"directParentClasses\":[]}],\"sourceType\":2}},{\"v\":\"@proteinjs/db/Table\"},{\"v\":\"@proteinjs/user/User\",\"value\":{\"packageName\":\"@proteinjs/user\",\"name\":\"User\",\"filePath\":\"/Users/veronica/Repositories/n3xa-meta-repo/packages/proteinjs/packages/user/packages/user/src/tables/UserTable.ts\",\"qualifiedName\":\"@proteinjs/user/User\",\"typeParameters\":[],\"directParents\":[{\"packageName\":\"@proteinjs/db\",\"name\":\"Record\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db/Record\",\"typeParameters\":[],\"directParents\":null},{\"packageName\":\"@proteinjs/user\",\"name\":\"{\\n name: string;\\n email: string;\\n password: string;\\n passwordResetToken?: string | null;\\n passwordResetTokenExpiration?: Moment | null;\\n emailVerified: boolean;\\n roles: string;\\n}\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/user/{\\n name: string;\\n email: string;\\n password: string;\\n passwordResetToken?: string | null;\\n passwordResetTokenExpiration?: Moment | null;\\n emailVerified: boolean;\\n roles: string;\\n}\",\"typeParameters\":[],\"directParents\":null}],\"sourceType\":1}},{\"v\":\"@proteinjs/user/UserTable\",\"value\":{\"packageName\":\"@proteinjs/user\",\"name\":\"UserTable\",\"filePath\":\"/Users/veronica/Repositories/n3xa-meta-repo/packages/proteinjs/packages/user/packages/user/src/tables/UserTable.ts\",\"qualifiedName\":\"@proteinjs/user/UserTable\",\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"properties\":[{\"name\":\"name\",\"type\":null,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"},{\"name\":\"columns\",\"type\":null,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"}],\"methods\":[],\"typeParameters\":[],\"directParentInterfaces\":[],\"directParentClasses\":[{\"packageName\":\"@proteinjs/db\",\"name\":\"Table\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db/Table\",\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"properties\":[],\"methods\":[],\"typeParameters\":[\"@proteinjs/user/User\"],\"directParentInterfaces\":[],\"directParentClasses\":[]}],\"sourceType\":2}}],\"edges\":[{\"v\":\"@proteinjs/user/ScopedRecord\",\"w\":\"@proteinjs/db/Record\",\"value\":\"extends interface\"},{\"v\":\"@proteinjs/user/UserRepo\",\"w\":\"@proteinjs/user-auth/AuthenticatedUserRepo\",\"value\":\"implements interface\"},{\"v\":\"@proteinjs/user/Session\",\"w\":\"@proteinjs/db/Record\",\"value\":\"extends type\"},{\"v\":\"@proteinjs/user/SessionTable\",\"w\":\"@proteinjs/db/Table\",\"value\":\"extends class\"},{\"v\":\"@proteinjs/user/User\",\"w\":\"@proteinjs/db/Record\",\"value\":\"extends type\"},{\"v\":\"@proteinjs/user/UserTable\",\"w\":\"@proteinjs/db/Table\",\"value\":\"extends class\"}]}";
|
|
13
|
+
const sourceGraph = "{\"options\":{\"directed\":true,\"multigraph\":false,\"compound\":false},\"nodes\":[{\"v\":\"@proteinjs/user/ScopedRecord\",\"value\":{\"packageName\":\"@proteinjs/user\",\"name\":\"ScopedRecord\",\"filePath\":\"/Users/veronica/Repositories/n3xa-meta-repo/packages/proteinjs/packages/user/packages/user/src/ScopedRecord.ts\",\"qualifiedName\":\"@proteinjs/user/ScopedRecord\",\"properties\":[{\"name\":\"scope\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"}],\"methods\":[],\"typeParameters\":[],\"directParents\":[{\"packageName\":\"@proteinjs/db\",\"name\":\"Record\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db/Record\",\"properties\":[],\"methods\":[],\"typeParameters\":[],\"directParents\":[]}],\"sourceType\":3}},{\"v\":\"@proteinjs/db/Record\"},{\"v\":\"@proteinjs/user/UserRepo\",\"value\":{\"packageName\":\"@proteinjs/user\",\"name\":\"UserRepo\",\"filePath\":\"/Users/veronica/Repositories/n3xa-meta-repo/packages/proteinjs/packages/user/packages/user/src/UserRepo.ts\",\"qualifiedName\":\"@proteinjs/user/UserRepo\",\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"properties\":[],\"methods\":[{\"name\":\"getUser\",\"returnType\":{\"packageName\":\"\",\"name\":\"Omit<User, 'roles'> & AuthenticatedUser\",\"filePath\":null,\"qualifiedName\":\"/Omit<User, 'roles'> & AuthenticatedUser\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[]},{\"name\":\"setUser\",\"returnType\":null,\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"user\",\"type\":{\"packageName\":\"@proteinjs/user\",\"name\":\"User\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/user/User\",\"typeParameters\":null,\"directParents\":null}}]}],\"typeParameters\":[],\"directParentInterfaces\":[{\"packageName\":\"@proteinjs/user-auth\",\"name\":\"AuthenticatedUserRepo\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/user-auth/AuthenticatedUserRepo\",\"properties\":[],\"methods\":[],\"typeParameters\":[],\"directParents\":[]}],\"directParentClasses\":[],\"sourceType\":2}},{\"v\":\"@proteinjs/user-auth/AuthenticatedUserRepo\"},{\"v\":\"/Pick\"},{\"v\":\"@proteinjs/user/SignupService\",\"value\":{\"packageName\":\"@proteinjs/user\",\"name\":\"SignupService\",\"filePath\":\"/Users/veronica/Repositories/n3xa-meta-repo/packages/proteinjs/packages/user/packages/user/src/services/SignupService.ts\",\"qualifiedName\":\"@proteinjs/user/SignupService\",\"properties\":[],\"methods\":[{\"name\":\"createUser\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<void>\",\"filePath\":null,\"qualifiedName\":\"/Promise<void>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":true,\"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\":false,\"isOptional\":false,\"isAbstract\":true,\"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\":false,\"isOptional\":false,\"isAbstract\":true,\"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\":false,\"isOptional\":false,\"isAbstract\":true,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"inviteToken\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null}}]}],\"typeParameters\":[],\"directParents\":[{\"packageName\":\"@proteinjs/service\",\"name\":\"Service\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/service/Service\",\"properties\":[],\"methods\":[],\"typeParameters\":[],\"directParents\":[]}],\"sourceType\":3}},{\"v\":\"@proteinjs/service/Service\"},{\"v\":\"@proteinjs/user/Invite\",\"value\":{\"packageName\":\"@proteinjs/user\",\"name\":\"Invite\",\"filePath\":\"/Users/veronica/Repositories/n3xa-meta-repo/packages/proteinjs/packages/user/packages/user/src/tables/InviteTable.ts\",\"qualifiedName\":\"@proteinjs/user/Invite\",\"typeParameters\":[],\"directParents\":[{\"packageName\":\"@proteinjs/db\",\"name\":\"Record\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db/Record\",\"typeParameters\":[],\"directParents\":null},{\"packageName\":\"@proteinjs/user\",\"name\":\"{\\n email: string;\\n token: string | null;\\n tokenExpiresAt: Moment | null;\\n invitedBy: string;\\n}\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/user/{\\n email: string;\\n token: string | null;\\n tokenExpiresAt: Moment | null;\\n invitedBy: string;\\n}\",\"typeParameters\":[],\"directParents\":null}],\"sourceType\":1}},{\"v\":\"@proteinjs/user/InviteTable\",\"value\":{\"packageName\":\"@proteinjs/user\",\"name\":\"InviteTable\",\"filePath\":\"/Users/veronica/Repositories/n3xa-meta-repo/packages/proteinjs/packages/user/packages/user/src/tables/InviteTable.ts\",\"qualifiedName\":\"@proteinjs/user/InviteTable\",\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"properties\":[{\"name\":\"name\",\"type\":null,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"},{\"name\":\"columns\",\"type\":null,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"}],\"methods\":[],\"typeParameters\":[],\"directParentInterfaces\":[],\"directParentClasses\":[{\"packageName\":\"@proteinjs/db\",\"name\":\"Table\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db/Table\",\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"properties\":[],\"methods\":[],\"typeParameters\":[\"@proteinjs/user/Invite\"],\"directParentInterfaces\":[],\"directParentClasses\":[]}],\"sourceType\":2}},{\"v\":\"@proteinjs/db/Table\"},{\"v\":\"@proteinjs/user/Session\",\"value\":{\"packageName\":\"@proteinjs/user\",\"name\":\"Session\",\"filePath\":\"/Users/veronica/Repositories/n3xa-meta-repo/packages/proteinjs/packages/user/packages/user/src/tables/SessionTable.ts\",\"qualifiedName\":\"@proteinjs/user/Session\",\"typeParameters\":[],\"directParents\":[{\"packageName\":\"@proteinjs/db\",\"name\":\"Record\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db/Record\",\"typeParameters\":[],\"directParents\":null},{\"packageName\":\"@proteinjs/user\",\"name\":\"{\\n sessionId: string;\\n session: string;\\n expires: Date;\\n userEmail: string;\\n}\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/user/{\\n sessionId: string;\\n session: string;\\n expires: Date;\\n userEmail: string;\\n}\",\"typeParameters\":[],\"directParents\":null}],\"sourceType\":1}},{\"v\":\"@proteinjs/user/SessionTable\",\"value\":{\"packageName\":\"@proteinjs/user\",\"name\":\"SessionTable\",\"filePath\":\"/Users/veronica/Repositories/n3xa-meta-repo/packages/proteinjs/packages/user/packages/user/src/tables/SessionTable.ts\",\"qualifiedName\":\"@proteinjs/user/SessionTable\",\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"properties\":[{\"name\":\"name\",\"type\":null,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"},{\"name\":\"columns\",\"type\":null,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"}],\"methods\":[],\"typeParameters\":[],\"directParentInterfaces\":[],\"directParentClasses\":[{\"packageName\":\"@proteinjs/db\",\"name\":\"Table\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db/Table\",\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"properties\":[],\"methods\":[],\"typeParameters\":[\"@proteinjs/user/Session\"],\"directParentInterfaces\":[],\"directParentClasses\":[]}],\"sourceType\":2}},{\"v\":\"@proteinjs/user/User\",\"value\":{\"packageName\":\"@proteinjs/user\",\"name\":\"User\",\"filePath\":\"/Users/veronica/Repositories/n3xa-meta-repo/packages/proteinjs/packages/user/packages/user/src/tables/UserTable.ts\",\"qualifiedName\":\"@proteinjs/user/User\",\"typeParameters\":[],\"directParents\":[{\"packageName\":\"@proteinjs/db\",\"name\":\"Record\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db/Record\",\"typeParameters\":[],\"directParents\":null},{\"packageName\":\"@proteinjs/user\",\"name\":\"{\\n name: string;\\n email: string;\\n password: string;\\n passwordResetToken?: string | null;\\n passwordResetTokenExpiration?: Moment | null;\\n emailVerified: boolean;\\n roles: string;\\n invitedBy?: string | null;\\n}\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/user/{\\n name: string;\\n email: string;\\n password: string;\\n passwordResetToken?: string | null;\\n passwordResetTokenExpiration?: Moment | null;\\n emailVerified: boolean;\\n roles: string;\\n invitedBy?: string | null;\\n}\",\"typeParameters\":[],\"directParents\":null}],\"sourceType\":1}},{\"v\":\"@proteinjs/user/UserTable\",\"value\":{\"packageName\":\"@proteinjs/user\",\"name\":\"UserTable\",\"filePath\":\"/Users/veronica/Repositories/n3xa-meta-repo/packages/proteinjs/packages/user/packages/user/src/tables/UserTable.ts\",\"qualifiedName\":\"@proteinjs/user/UserTable\",\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"properties\":[{\"name\":\"name\",\"type\":null,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"},{\"name\":\"columns\",\"type\":null,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"}],\"methods\":[],\"typeParameters\":[],\"directParentInterfaces\":[],\"directParentClasses\":[{\"packageName\":\"@proteinjs/db\",\"name\":\"Table\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db/Table\",\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"properties\":[],\"methods\":[],\"typeParameters\":[\"@proteinjs/user/User\"],\"directParentInterfaces\":[],\"directParentClasses\":[]}],\"sourceType\":2}}],\"edges\":[{\"v\":\"@proteinjs/user/ScopedRecord\",\"w\":\"@proteinjs/db/Record\",\"value\":\"extends interface\"},{\"v\":\"@proteinjs/user/UserRepo\",\"w\":\"@proteinjs/user-auth/AuthenticatedUserRepo\",\"value\":\"implements interface\"},{\"v\":\"@proteinjs/user/SignupService\",\"w\":\"@proteinjs/service/Service\",\"value\":\"extends interface\"},{\"v\":\"@proteinjs/user/Invite\",\"w\":\"@proteinjs/db/Record\",\"value\":\"extends type\"},{\"v\":\"@proteinjs/user/InviteTable\",\"w\":\"@proteinjs/db/Table\",\"value\":\"extends class\"},{\"v\":\"@proteinjs/user/Session\",\"w\":\"@proteinjs/db/Record\",\"value\":\"extends type\"},{\"v\":\"@proteinjs/user/SessionTable\",\"w\":\"@proteinjs/db/Table\",\"value\":\"extends class\"},{\"v\":\"@proteinjs/user/User\",\"w\":\"@proteinjs/db/Record\",\"value\":\"extends type\"},{\"v\":\"@proteinjs/user/UserTable\",\"w\":\"@proteinjs/db/Table\",\"value\":\"extends class\"}]}";
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
/** Generate Source Links */
|
|
17
17
|
|
|
18
18
|
import { UserRepo } from '../src/UserRepo';
|
|
19
|
+
import { InviteTable } from '../src/tables/InviteTable';
|
|
19
20
|
import { SessionTable } from '../src/tables/SessionTable';
|
|
20
21
|
import { UserTable } from '../src/tables/UserTable';
|
|
21
22
|
|
|
22
23
|
const sourceLinks = {
|
|
23
24
|
'@proteinjs/user/UserRepo': UserRepo,
|
|
25
|
+
'@proteinjs/user/InviteTable': InviteTable,
|
|
24
26
|
'@proteinjs/user/SessionTable': SessionTable,
|
|
25
27
|
'@proteinjs/user/UserTable': UserTable,
|
|
26
28
|
};
|
package/index.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@proteinjs/user",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.40",
|
|
4
4
|
"description": "User management",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -22,16 +22,16 @@
|
|
|
22
22
|
"test": "jest"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@proteinjs/db": "1.
|
|
26
|
-
"@proteinjs/reflection": "1.1.
|
|
27
|
-
"@proteinjs/server-api": "1.
|
|
28
|
-
"@proteinjs/service": "1.0.
|
|
29
|
-
"@proteinjs/user-auth": "^1.0.
|
|
25
|
+
"@proteinjs/db": "1.5.3",
|
|
26
|
+
"@proteinjs/reflection": "1.1.8",
|
|
27
|
+
"@proteinjs/server-api": "1.4.1",
|
|
28
|
+
"@proteinjs/service": "1.0.26",
|
|
29
|
+
"@proteinjs/user-auth": "^1.0.16",
|
|
30
30
|
"moment": "2.29.4"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"@proteinjs/db-driver-knex": "1.1.
|
|
34
|
-
"@proteinjs/reflection-build": "1.0.
|
|
33
|
+
"@proteinjs/db-driver-knex": "1.1.13",
|
|
34
|
+
"@proteinjs/reflection-build": "1.0.23",
|
|
35
35
|
"@types/jest": "29.5.5",
|
|
36
36
|
"@types/node": "14.0.13",
|
|
37
37
|
"@typescript-eslint/eslint-plugin": "7.8.0",
|
package/src/routes.ts
CHANGED
|
@@ -1,8 +1,19 @@
|
|
|
1
1
|
export const routes: { [name: string]: { path: string; method: 'get' | 'post' | 'put' | 'patch' | 'delete' } } = {
|
|
2
|
-
createUser: { path: '/user/create', method: 'post' },
|
|
3
2
|
login: { path: '/user/login', method: 'post' },
|
|
4
3
|
initiatePasswordReset: { path: '/user/initiate-password-reset', method: 'post' },
|
|
5
4
|
executePasswordReset: { path: '/user/execute-password-reset', method: 'post' },
|
|
6
5
|
validateResetToken: { path: '/user/validate-reset-token', method: 'get' },
|
|
7
6
|
logout: { path: '/user/logout', method: 'get' },
|
|
8
7
|
};
|
|
8
|
+
|
|
9
|
+
export const uiRoutes = {
|
|
10
|
+
auth: {
|
|
11
|
+
login: 'login',
|
|
12
|
+
forgotPassword: 'login/forgot-password',
|
|
13
|
+
passwordReset: 'login/password-reset',
|
|
14
|
+
signup: 'signup',
|
|
15
|
+
},
|
|
16
|
+
admin: {
|
|
17
|
+
invite: 'invite',
|
|
18
|
+
},
|
|
19
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Service, serviceFactory } from '@proteinjs/service';
|
|
2
|
+
import { User } from '../tables/UserTable';
|
|
3
|
+
import { Invite } from '../tables/InviteTable';
|
|
4
|
+
|
|
5
|
+
export const getSignupService = serviceFactory<SignupService>('@proteinjs/user/SignupService');
|
|
6
|
+
|
|
7
|
+
export type SendInviteResponse = {
|
|
8
|
+
sent: boolean;
|
|
9
|
+
error?: string;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export type InitializeSignupResponse = {
|
|
13
|
+
isReady: boolean;
|
|
14
|
+
error?: string;
|
|
15
|
+
isInviteOnly?: boolean;
|
|
16
|
+
invite?: Omit<Invite, 'token'>;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export type UserSignup = Pick<User, 'name' | 'password'> & {
|
|
20
|
+
email?: User['email'];
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export interface SignupService extends Service {
|
|
24
|
+
createUser(user: UserSignup, token?: string): Promise<void>;
|
|
25
|
+
sendInvite(email: string): Promise<SendInviteResponse>;
|
|
26
|
+
revokeInvite(email: string): Promise<void>;
|
|
27
|
+
initializeSignup(inviteToken?: string): Promise<InitializeSignupResponse>;
|
|
28
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { StringColumn, Table, Record, withRecordColumns, DateTimeColumn } from '@proteinjs/db';
|
|
2
|
+
import { Moment } from 'moment';
|
|
3
|
+
|
|
4
|
+
export type Invite = Record & {
|
|
5
|
+
email: string;
|
|
6
|
+
token: string | null;
|
|
7
|
+
tokenExpiresAt: Moment | null;
|
|
8
|
+
invitedBy: string;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export class InviteTable extends Table<Invite> {
|
|
12
|
+
name = 'invite';
|
|
13
|
+
columns = withRecordColumns<Invite>({
|
|
14
|
+
email: new StringColumn('email', {}, 250),
|
|
15
|
+
token: new StringColumn('token'),
|
|
16
|
+
tokenExpiresAt: new DateTimeColumn('token_expires_at'),
|
|
17
|
+
invitedBy: new StringColumn('invited_by'),
|
|
18
|
+
});
|
|
19
|
+
}
|
package/src/tables/UserTable.ts
CHANGED
|
@@ -18,6 +18,7 @@ export type User = Record & {
|
|
|
18
18
|
passwordResetTokenExpiration?: Moment | null;
|
|
19
19
|
emailVerified: boolean;
|
|
20
20
|
roles: string;
|
|
21
|
+
invitedBy?: string | null;
|
|
21
22
|
};
|
|
22
23
|
|
|
23
24
|
export class UserTable extends Table<User> {
|
|
@@ -30,5 +31,6 @@ export class UserTable extends Table<User> {
|
|
|
30
31
|
passwordResetTokenExpiration: new DateTimeColumn('password_reset_token_expiration'),
|
|
31
32
|
emailVerified: new BooleanColumn('email_verified'),
|
|
32
33
|
roles: new StringColumn('roles'),
|
|
34
|
+
invitedBy: new StringColumn('invited_by'),
|
|
33
35
|
});
|
|
34
36
|
}
|
package/src/tables/tables.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { UserTable, User } from './UserTable';
|
|
2
2
|
import { SessionTable, Session } from './SessionTable';
|
|
3
3
|
import { Table } from '@proteinjs/db';
|
|
4
|
+
import { Invite, InviteTable } from './InviteTable';
|
|
4
5
|
|
|
5
6
|
export const tables = {
|
|
7
|
+
Invite: new InviteTable() as Table<Invite>,
|
|
6
8
|
User: new UserTable() as Table<User>,
|
|
7
9
|
Session: new SessionTable() as Table<Session>,
|
|
8
10
|
};
|