@proteinjs/user 1.6.0 → 1.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/generated/index.d.ts.map +1 -1
- package/dist/generated/index.js +5 -1
- package/dist/generated/index.js.map +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/dist/src/RolesCatalog.d.ts +37 -0
- package/dist/src/RolesCatalog.d.ts.map +1 -0
- package/dist/src/RolesCatalog.js +51 -0
- package/dist/src/RolesCatalog.js.map +1 -0
- package/dist/src/UserRepo.d.ts.map +1 -1
- package/dist/src/UserRepo.js +4 -1
- package/dist/src/UserRepo.js.map +1 -1
- package/dist/src/permissions.d.ts +18 -0
- package/dist/src/permissions.d.ts.map +1 -0
- package/dist/src/permissions.js +21 -0
- package/dist/src/permissions.js.map +1 -0
- package/dist/src/services/RolesService.d.ts +15 -0
- package/dist/src/services/RolesService.d.ts.map +1 -0
- package/dist/src/services/RolesService.js +6 -0
- package/dist/src/services/RolesService.js.map +1 -0
- package/dist/src/tables/InviteTable.d.ts +9 -0
- package/dist/src/tables/InviteTable.d.ts.map +1 -1
- package/dist/src/tables/InviteTable.js +19 -0
- package/dist/src/tables/InviteTable.js.map +1 -1
- package/dist/src/tables/RoleGrantEventTable.d.ts +30 -0
- package/dist/src/tables/RoleGrantEventTable.d.ts.map +1 -0
- package/dist/src/tables/RoleGrantEventTable.js +45 -0
- package/dist/src/tables/RoleGrantEventTable.js.map +1 -0
- package/dist/src/tables/SessionTable.d.ts +7 -0
- package/dist/src/tables/SessionTable.d.ts.map +1 -1
- package/dist/src/tables/SessionTable.js +15 -0
- package/dist/src/tables/SessionTable.js.map +1 -1
- package/dist/src/tables/UserTable.d.ts +12 -2
- package/dist/src/tables/UserTable.d.ts.map +1 -1
- package/dist/src/tables/UserTable.js +30 -1
- 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/dist/test/RolesCatalog.test.d.ts +2 -0
- package/dist/test/RolesCatalog.test.d.ts.map +1 -0
- package/dist/test/RolesCatalog.test.js +49 -0
- package/dist/test/RolesCatalog.test.js.map +1 -0
- package/dist/test/ScopedRecord.test.d.ts +1 -0
- package/dist/test/ScopedRecord.test.d.ts.map +1 -1
- package/dist/test/ScopedRecord.test.js +7 -0
- package/dist/test/ScopedRecord.test.js.map +1 -1
- package/dist/test/SharedRecord.test.d.ts +1 -0
- package/dist/test/SharedRecord.test.d.ts.map +1 -1
- package/dist/test/SharedRecord.test.js +13 -3
- package/dist/test/SharedRecord.test.js.map +1 -1
- package/dist/test/sessionTableAuth.test.d.ts +2 -0
- package/dist/test/sessionTableAuth.test.d.ts.map +1 -0
- package/dist/test/sessionTableAuth.test.js +81 -0
- package/dist/test/sessionTableAuth.test.js.map +1 -0
- package/dist/test/tablesAuth.test.d.ts +2 -0
- package/dist/test/tablesAuth.test.d.ts.map +1 -0
- package/dist/test/tablesAuth.test.js +68 -0
- package/dist/test/tablesAuth.test.js.map +1 -0
- package/generated/index.ts +5 -1
- package/index.ts +4 -0
- package/package.json +5 -5
- package/src/RolesCatalog.ts +56 -0
- package/src/UserRepo.ts +3 -1
- package/src/permissions.ts +17 -0
- package/src/services/RolesService.ts +16 -0
- package/src/tables/InviteTable.ts +19 -0
- package/src/tables/RoleGrantEventTable.ts +35 -0
- package/src/tables/SessionTable.ts +15 -0
- package/src/tables/UserTable.ts +33 -3
- package/src/tables/tables.ts +2 -0
- package/test/RolesCatalog.test.ts +54 -0
- package/test/ScopedRecord.test.ts +7 -0
- package/test/SharedRecord.test.ts +13 -3
- package/test/sessionTableAuth.test.ts +88 -0
- package/test/tablesAuth.test.ts +68 -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;AAqChB,cAAc,UAAU,CAAC"}
|
package/dist/generated/index.js
CHANGED
|
@@ -22,19 +22,23 @@ 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/brentbahry/repos/farm/n3xa2/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/SharedRecord\",\"value\":{\"packageName\":\"@proteinjs/user\",\"name\":\"SharedRecord\",\"filePath\":\"/Users/brentbahry/repos/farm/n3xa2/packages/proteinjs/packages/user/packages/user/src/SharedRecord.ts\",\"qualifiedName\":\"@proteinjs/user/SharedRecord\",\"properties\":[{\"name\":\"permissionSource\",\"type\":{\"packageName\":\"\",\"name\":\"Reference<T>\",\"filePath\":null,\"qualifiedName\":\"/Reference<T>\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"},{\"name\":\"permissionSourceTable\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"}],\"methods\":[],\"typeParameters\":[\"/T extends SharedRecord = any\"],\"directParents\":[{\"packageName\":\"@proteinjs/db\",\"name\":\"Record\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db/Record\",\"properties\":[],\"methods\":[],\"typeParameters\":[],\"directParents\":[]}],\"sourceType\":3}},{\"v\":\"@proteinjs/user/UserRepo\",\"value\":{\"packageName\":\"@proteinjs/user\",\"name\":\"UserRepo\",\"filePath\":\"/Users/brentbahry/repos/farm/n3xa2/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/AccessInviteService\",\"value\":{\"packageName\":\"@proteinjs/user\",\"name\":\"AccessInviteService\",\"filePath\":\"/Users/brentbahry/repos/farm/n3xa2/packages/proteinjs/packages/user/packages/user/src/services/AccessInviteService.ts\",\"qualifiedName\":\"@proteinjs/user/AccessInviteService\",\"properties\":[],\"methods\":[{\"name\":\"createAccessInvite\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<CreateAccessInviteResponse>\",\"filePath\":null,\"qualifiedName\":\"/Promise<CreateAccessInviteResponse>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":true,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"params\",\"type\":{\"packageName\":\"@proteinjs/user\",\"name\":\"CreateAccessInviteParams\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/user/CreateAccessInviteParams\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"acceptAccessInvite\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<T | undefined>\",\"filePath\":null,\"qualifiedName\":\"/Promise<T | undefined>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":true,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"token\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null}}]}],\"typeParameters\":[\"/T extends Record\"],\"directParents\":[{\"packageName\":\"@proteinjs/service\",\"name\":\"Service\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/service/Service\",\"properties\":[],\"methods\":[],\"typeParameters\":[],\"directParents\":[]}],\"sourceType\":3}},{\"v\":\"@proteinjs/service/Service\"},{\"v\":\"/Pick\"},{\"v\":\"@proteinjs/user/SignupService\",\"value\":{\"packageName\":\"@proteinjs/user\",\"name\":\"SignupService\",\"filePath\":\"/Users/brentbahry/repos/farm/n3xa2/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/user/UpdateUserInfoService\",\"value\":{\"packageName\":\"@proteinjs/user\",\"name\":\"UpdateUserInfoService\",\"filePath\":\"/Users/brentbahry/repos/farm/n3xa2/packages/proteinjs/packages/user/packages/user/src/services/UpdateUserInfoService.ts\",\"qualifiedName\":\"@proteinjs/user/UpdateUserInfoService\",\"properties\":[],\"methods\":[{\"name\":\"updateName\",\"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\":\"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\":false,\"isOptional\":false,\"isAbstract\":true,\"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\":[],\"directParents\":[{\"packageName\":\"@proteinjs/service\",\"name\":\"Service\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/service/Service\",\"properties\":[],\"methods\":[],\"typeParameters\":[],\"directParents\":[]}],\"sourceType\":3}},{\"v\":\"@proteinjs/user/AccessGrant\",\"value\":{\"packageName\":\"@proteinjs/user\",\"name\":\"AccessGrant\",\"filePath\":\"/Users/brentbahry/repos/farm/n3xa2/packages/proteinjs/packages/user/packages/user/src/tables/AccessGrantTable.ts\",\"qualifiedName\":\"@proteinjs/user/AccessGrant\",\"typeParameters\":[],\"directParents\":[{\"packageName\":\"@proteinjs/db\",\"name\":\"Record\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db/Record\",\"typeParameters\":[],\"directParents\":null},{\"packageName\":\"@proteinjs/user\",\"name\":\"{\\n principal: Reference<any>;\\n resource: Reference<any>;\\n resourceTable?: Table<any>['name'];\\n accessLevel: 'read' | 'write' | 'admin' | 'owner';\\n}\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/user/{\\n principal: Reference<any>;\\n resource: Reference<any>;\\n resourceTable?: Table<any>['name'];\\n accessLevel: 'read' | 'write' | 'admin' | 'owner';\\n}\",\"typeParameters\":[],\"directParents\":null}],\"sourceType\":1}},{\"v\":\"@proteinjs/user/AccessGrantTable\",\"value\":{\"packageName\":\"@proteinjs/user\",\"name\":\"AccessGrantTable\",\"filePath\":\"/Users/brentbahry/repos/farm/n3xa2/packages/proteinjs/packages/user/packages/user/src/tables/AccessGrantTable.ts\",\"qualifiedName\":\"@proteinjs/user/AccessGrantTable\",\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"properties\":[{\"name\":\"name\",\"type\":null,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"},{\"name\":\"auth\",\"type\":{\"packageName\":\"\",\"name\":\"Table<AccessGrant>['auth']\",\"filePath\":null,\"qualifiedName\":\"/Table<AccessGrant>['auth']\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"},{\"name\":\"indexes\",\"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/AccessGrant\"],\"directParentInterfaces\":[],\"directParentClasses\":[]}],\"sourceType\":2}},{\"v\":\"@proteinjs/db/Table\"},{\"v\":\"@proteinjs/user/AccessInvite\",\"value\":{\"packageName\":\"@proteinjs/user\",\"name\":\"AccessInvite\",\"filePath\":\"/Users/brentbahry/repos/farm/n3xa2/packages/proteinjs/packages/user/packages/user/src/tables/AccessInviteTable.ts\",\"qualifiedName\":\"@proteinjs/user/AccessInvite\",\"typeParameters\":[\"/T extends Record = any\"],\"directParents\":[{\"packageName\":\"@proteinjs/db\",\"name\":\"Record\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db/Record\",\"typeParameters\":[],\"directParents\":null},{\"packageName\":\"@proteinjs/user\",\"name\":\"{\\n token?: string;\\n tokenExpiresAt: Moment;\\n resource: Reference<T>;\\n resourceTable: string;\\n accessLevel: AccessGrant['accessLevel'];\\n accepted?: boolean;\\n acceptedBy?: Reference<User>;\\n acceptedAt?: Moment;\\n}\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/user/{\\n token?: string;\\n tokenExpiresAt: Moment;\\n resource: Reference<T>;\\n resourceTable: string;\\n accessLevel: AccessGrant['accessLevel'];\\n accepted?: boolean;\\n acceptedBy?: Reference<User>;\\n acceptedAt?: Moment;\\n}\",\"typeParameters\":[],\"directParents\":null}],\"sourceType\":1}},{\"v\":\"@proteinjs/user/AccessInviteTable\",\"value\":{\"packageName\":\"@proteinjs/user\",\"name\":\"AccessInviteTable\",\"filePath\":\"/Users/brentbahry/repos/farm/n3xa2/packages/proteinjs/packages/user/packages/user/src/tables/AccessInviteTable.ts\",\"qualifiedName\":\"@proteinjs/user/AccessInviteTable\",\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"properties\":[{\"name\":\"name\",\"type\":null,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"},{\"name\":\"auth\",\"type\":{\"packageName\":\"\",\"name\":\"Table<AccessInvite>['auth']\",\"filePath\":null,\"qualifiedName\":\"/Table<AccessInvite>['auth']\",\"typeParameters\":null,\"directParents\":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/AccessInvite\"],\"directParentInterfaces\":[],\"directParentClasses\":[]}],\"sourceType\":2}},{\"v\":\"@proteinjs/user/Invite\",\"value\":{\"packageName\":\"@proteinjs/user\",\"name\":\"Invite\",\"filePath\":\"/Users/brentbahry/repos/farm/n3xa2/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/brentbahry/repos/farm/n3xa2/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/user/Session\",\"value\":{\"packageName\":\"@proteinjs/user\",\"name\":\"Session\",\"filePath\":\"/Users/brentbahry/repos/farm/n3xa2/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/brentbahry/repos/farm/n3xa2/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/brentbahry/repos/farm/n3xa2/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/brentbahry/repos/farm/n3xa2/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/SharedRecord\",\"w\":\"@proteinjs/db/Record\",\"value\":\"extends interface\"},{\"v\":\"@proteinjs/user/UserRepo\",\"w\":\"@proteinjs/user-auth/AuthenticatedUserRepo\",\"value\":\"implements interface\"},{\"v\":\"@proteinjs/user/AccessInviteService\",\"w\":\"@proteinjs/service/Service\",\"value\":\"extends interface\"},{\"v\":\"@proteinjs/user/SignupService\",\"w\":\"@proteinjs/service/Service\",\"value\":\"extends interface\"},{\"v\":\"@proteinjs/user/UpdateUserInfoService\",\"w\":\"@proteinjs/service/Service\",\"value\":\"extends interface\"},{\"v\":\"@proteinjs/user/AccessGrant\",\"w\":\"@proteinjs/db/Record\",\"value\":\"extends type\"},{\"v\":\"@proteinjs/user/AccessGrantTable\",\"w\":\"@proteinjs/db/Table\",\"value\":\"extends class\"},{\"v\":\"@proteinjs/user/AccessInvite\",\"w\":\"@proteinjs/db/Record\",\"value\":\"extends type\"},{\"v\":\"@proteinjs/user/AccessInviteTable\",\"w\":\"@proteinjs/db/Table\",\"value\":\"extends class\"},{\"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\"}]}";
|
|
25
|
+
var sourceGraph = "{\"options\":{\"directed\":true,\"multigraph\":false,\"compound\":false},\"nodes\":[{\"v\":\"@proteinjs/user/RoleCatalogEntry\",\"value\":{\"packageName\":\"@proteinjs/user\",\"name\":\"RoleCatalogEntry\",\"filePath\":\"/Users/brentbahry/repos/farm/n3xa2/packages/proteinjs/packages/user/packages/user/src/RolesCatalog.ts\",\"qualifiedName\":\"@proteinjs/user/RoleCatalogEntry\",\"properties\":[{\"name\":\"role\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"},{\"name\":\"description\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"},{\"name\":\"breakGlass\",\"type\":{\"packageName\":\"\",\"name\":\"boolean\",\"filePath\":null,\"qualifiedName\":\"/boolean\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":true,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"}],\"methods\":[],\"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/AdminRole\",\"value\":{\"packageName\":\"@proteinjs/user\",\"name\":\"AdminRole\",\"filePath\":\"/Users/brentbahry/repos/farm/n3xa2/packages/proteinjs/packages/user/packages/user/src/RolesCatalog.ts\",\"qualifiedName\":\"@proteinjs/user/AdminRole\",\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"properties\":[{\"name\":\"role\",\"type\":null,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"},{\"name\":\"description\",\"type\":null,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"},{\"name\":\"breakGlass\",\"type\":null,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"}],\"methods\":[],\"typeParameters\":[],\"directParentInterfaces\":[{\"packageName\":\"@proteinjs/user\",\"name\":\"RoleCatalogEntry\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/user/RoleCatalogEntry\",\"properties\":[],\"methods\":[],\"typeParameters\":[],\"directParents\":[]}],\"directParentClasses\":[],\"sourceType\":2}},{\"v\":\"@proteinjs/user/ScopedRecord\",\"value\":{\"packageName\":\"@proteinjs/user\",\"name\":\"ScopedRecord\",\"filePath\":\"/Users/brentbahry/repos/farm/n3xa2/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/SharedRecord\",\"value\":{\"packageName\":\"@proteinjs/user\",\"name\":\"SharedRecord\",\"filePath\":\"/Users/brentbahry/repos/farm/n3xa2/packages/proteinjs/packages/user/packages/user/src/SharedRecord.ts\",\"qualifiedName\":\"@proteinjs/user/SharedRecord\",\"properties\":[{\"name\":\"permissionSource\",\"type\":{\"packageName\":\"\",\"name\":\"Reference<T>\",\"filePath\":null,\"qualifiedName\":\"/Reference<T>\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"},{\"name\":\"permissionSourceTable\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"}],\"methods\":[],\"typeParameters\":[\"/T extends SharedRecord = any\"],\"directParents\":[{\"packageName\":\"@proteinjs/db\",\"name\":\"Record\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db/Record\",\"properties\":[],\"methods\":[],\"typeParameters\":[],\"directParents\":[]}],\"sourceType\":3}},{\"v\":\"@proteinjs/user/UserRepo\",\"value\":{\"packageName\":\"@proteinjs/user\",\"name\":\"UserRepo\",\"filePath\":\"/Users/brentbahry/repos/farm/n3xa2/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/AccessInviteService\",\"value\":{\"packageName\":\"@proteinjs/user\",\"name\":\"AccessInviteService\",\"filePath\":\"/Users/brentbahry/repos/farm/n3xa2/packages/proteinjs/packages/user/packages/user/src/services/AccessInviteService.ts\",\"qualifiedName\":\"@proteinjs/user/AccessInviteService\",\"properties\":[],\"methods\":[{\"name\":\"createAccessInvite\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<CreateAccessInviteResponse>\",\"filePath\":null,\"qualifiedName\":\"/Promise<CreateAccessInviteResponse>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":true,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"params\",\"type\":{\"packageName\":\"@proteinjs/user\",\"name\":\"CreateAccessInviteParams\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/user/CreateAccessInviteParams\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"acceptAccessInvite\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<T | undefined>\",\"filePath\":null,\"qualifiedName\":\"/Promise<T | undefined>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":true,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"token\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null}}]}],\"typeParameters\":[\"/T extends Record\"],\"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/RolesService\",\"value\":{\"packageName\":\"@proteinjs/user\",\"name\":\"RolesService\",\"filePath\":\"/Users/brentbahry/repos/farm/n3xa2/packages/proteinjs/packages/user/packages/user/src/services/RolesService.ts\",\"qualifiedName\":\"@proteinjs/user/RolesService\",\"properties\":[],\"methods\":[{\"name\":\"grantRole\",\"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\":\"userId\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"role\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"revokeRole\",\"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\":\"userId\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"role\",\"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\":\"/Pick\"},{\"v\":\"@proteinjs/user/SignupService\",\"value\":{\"packageName\":\"@proteinjs/user\",\"name\":\"SignupService\",\"filePath\":\"/Users/brentbahry/repos/farm/n3xa2/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/user/UpdateUserInfoService\",\"value\":{\"packageName\":\"@proteinjs/user\",\"name\":\"UpdateUserInfoService\",\"filePath\":\"/Users/brentbahry/repos/farm/n3xa2/packages/proteinjs/packages/user/packages/user/src/services/UpdateUserInfoService.ts\",\"qualifiedName\":\"@proteinjs/user/UpdateUserInfoService\",\"properties\":[],\"methods\":[{\"name\":\"updateName\",\"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\":\"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\":false,\"isOptional\":false,\"isAbstract\":true,\"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\":[],\"directParents\":[{\"packageName\":\"@proteinjs/service\",\"name\":\"Service\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/service/Service\",\"properties\":[],\"methods\":[],\"typeParameters\":[],\"directParents\":[]}],\"sourceType\":3}},{\"v\":\"@proteinjs/user/AccessGrant\",\"value\":{\"packageName\":\"@proteinjs/user\",\"name\":\"AccessGrant\",\"filePath\":\"/Users/brentbahry/repos/farm/n3xa2/packages/proteinjs/packages/user/packages/user/src/tables/AccessGrantTable.ts\",\"qualifiedName\":\"@proteinjs/user/AccessGrant\",\"typeParameters\":[],\"directParents\":[{\"packageName\":\"@proteinjs/db\",\"name\":\"Record\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db/Record\",\"typeParameters\":[],\"directParents\":null},{\"packageName\":\"@proteinjs/user\",\"name\":\"{\\n principal: Reference<any>;\\n resource: Reference<any>;\\n resourceTable?: Table<any>['name'];\\n accessLevel: 'read' | 'write' | 'admin' | 'owner';\\n}\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/user/{\\n principal: Reference<any>;\\n resource: Reference<any>;\\n resourceTable?: Table<any>['name'];\\n accessLevel: 'read' | 'write' | 'admin' | 'owner';\\n}\",\"typeParameters\":[],\"directParents\":null}],\"sourceType\":1}},{\"v\":\"@proteinjs/user/AccessGrantTable\",\"value\":{\"packageName\":\"@proteinjs/user\",\"name\":\"AccessGrantTable\",\"filePath\":\"/Users/brentbahry/repos/farm/n3xa2/packages/proteinjs/packages/user/packages/user/src/tables/AccessGrantTable.ts\",\"qualifiedName\":\"@proteinjs/user/AccessGrantTable\",\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"properties\":[{\"name\":\"name\",\"type\":null,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"},{\"name\":\"auth\",\"type\":{\"packageName\":\"\",\"name\":\"Table<AccessGrant>['auth']\",\"filePath\":null,\"qualifiedName\":\"/Table<AccessGrant>['auth']\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"},{\"name\":\"indexes\",\"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/AccessGrant\"],\"directParentInterfaces\":[],\"directParentClasses\":[]}],\"sourceType\":2}},{\"v\":\"@proteinjs/db/Table\"},{\"v\":\"@proteinjs/user/AccessInvite\",\"value\":{\"packageName\":\"@proteinjs/user\",\"name\":\"AccessInvite\",\"filePath\":\"/Users/brentbahry/repos/farm/n3xa2/packages/proteinjs/packages/user/packages/user/src/tables/AccessInviteTable.ts\",\"qualifiedName\":\"@proteinjs/user/AccessInvite\",\"typeParameters\":[\"/T extends Record = any\"],\"directParents\":[{\"packageName\":\"@proteinjs/db\",\"name\":\"Record\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db/Record\",\"typeParameters\":[],\"directParents\":null},{\"packageName\":\"@proteinjs/user\",\"name\":\"{\\n token?: string;\\n tokenExpiresAt: Moment;\\n resource: Reference<T>;\\n resourceTable: string;\\n accessLevel: AccessGrant['accessLevel'];\\n accepted?: boolean;\\n acceptedBy?: Reference<User>;\\n acceptedAt?: Moment;\\n}\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/user/{\\n token?: string;\\n tokenExpiresAt: Moment;\\n resource: Reference<T>;\\n resourceTable: string;\\n accessLevel: AccessGrant['accessLevel'];\\n accepted?: boolean;\\n acceptedBy?: Reference<User>;\\n acceptedAt?: Moment;\\n}\",\"typeParameters\":[],\"directParents\":null}],\"sourceType\":1}},{\"v\":\"@proteinjs/user/AccessInviteTable\",\"value\":{\"packageName\":\"@proteinjs/user\",\"name\":\"AccessInviteTable\",\"filePath\":\"/Users/brentbahry/repos/farm/n3xa2/packages/proteinjs/packages/user/packages/user/src/tables/AccessInviteTable.ts\",\"qualifiedName\":\"@proteinjs/user/AccessInviteTable\",\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"properties\":[{\"name\":\"name\",\"type\":null,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"},{\"name\":\"auth\",\"type\":{\"packageName\":\"\",\"name\":\"Table<AccessInvite>['auth']\",\"filePath\":null,\"qualifiedName\":\"/Table<AccessInvite>['auth']\",\"typeParameters\":null,\"directParents\":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/AccessInvite\"],\"directParentInterfaces\":[],\"directParentClasses\":[]}],\"sourceType\":2}},{\"v\":\"@proteinjs/user/Invite\",\"value\":{\"packageName\":\"@proteinjs/user\",\"name\":\"Invite\",\"filePath\":\"/Users/brentbahry/repos/farm/n3xa2/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/brentbahry/repos/farm/n3xa2/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\":\"auth\",\"type\":{\"packageName\":\"\",\"name\":\"Table<Invite>['auth']\",\"filePath\":null,\"qualifiedName\":\"/Table<Invite>['auth']\",\"typeParameters\":null,\"directParents\":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/user/RoleGrantEvent\",\"value\":{\"packageName\":\"@proteinjs/user\",\"name\":\"RoleGrantEvent\",\"filePath\":\"/Users/brentbahry/repos/farm/n3xa2/packages/proteinjs/packages/user/packages/user/src/tables/RoleGrantEventTable.ts\",\"qualifiedName\":\"@proteinjs/user/RoleGrantEvent\",\"typeParameters\":[],\"directParents\":[{\"packageName\":\"@proteinjs/db\",\"name\":\"Record\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db/Record\",\"typeParameters\":[],\"directParents\":null},{\"packageName\":\"@proteinjs/user\",\"name\":\"{\\n /** id of the user who made the change */\\n actor: string;\\n /** id of the user whose roles changed */\\n target: string;\\n role: string;\\n action: 'grant' | 'revoke';\\n}\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/user/{\\n /** id of the user who made the change */\\n actor: string;\\n /** id of the user whose roles changed */\\n target: string;\\n role: string;\\n action: 'grant' | 'revoke';\\n}\",\"typeParameters\":[],\"directParents\":null}],\"sourceType\":1}},{\"v\":\"@proteinjs/user/RoleGrantEventTable\",\"value\":{\"packageName\":\"@proteinjs/user\",\"name\":\"RoleGrantEventTable\",\"filePath\":\"/Users/brentbahry/repos/farm/n3xa2/packages/proteinjs/packages/user/packages/user/src/tables/RoleGrantEventTable.ts\",\"qualifiedName\":\"@proteinjs/user/RoleGrantEventTable\",\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"properties\":[{\"name\":\"name\",\"type\":null,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"},{\"name\":\"auth\",\"type\":{\"packageName\":\"\",\"name\":\"Table<RoleGrantEvent>['auth']\",\"filePath\":null,\"qualifiedName\":\"/Table<RoleGrantEvent>['auth']\",\"typeParameters\":null,\"directParents\":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/RoleGrantEvent\"],\"directParentInterfaces\":[],\"directParentClasses\":[]}],\"sourceType\":2}},{\"v\":\"@proteinjs/user/Session\",\"value\":{\"packageName\":\"@proteinjs/user\",\"name\":\"Session\",\"filePath\":\"/Users/brentbahry/repos/farm/n3xa2/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/brentbahry/repos/farm/n3xa2/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\":\"auth\",\"type\":{\"packageName\":\"\",\"name\":\"Table<Session>['auth']\",\"filePath\":null,\"qualifiedName\":\"/Table<Session>['auth']\",\"typeParameters\":null,\"directParents\":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/brentbahry/repos/farm/n3xa2/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 /** Role names from the roles catalog (see `RolesCatalog`). Written ONLY by the Roles service. */\\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 /** Role names from the roles catalog (see `RolesCatalog`). Written ONLY by the Roles service. */\\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/brentbahry/repos/farm/n3xa2/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\":\"auth\",\"type\":{\"packageName\":\"\",\"name\":\"Table<User>['auth']\",\"filePath\":null,\"qualifiedName\":\"/Table<User>['auth']\",\"typeParameters\":null,\"directParents\":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/RoleCatalogEntry\",\"w\":\"@proteinjs/reflection/Loadable\",\"value\":\"extends interface\"},{\"v\":\"@proteinjs/user/AdminRole\",\"w\":\"@proteinjs/user/RoleCatalogEntry\",\"value\":\"implements interface\"},{\"v\":\"@proteinjs/user/ScopedRecord\",\"w\":\"@proteinjs/db/Record\",\"value\":\"extends interface\"},{\"v\":\"@proteinjs/user/SharedRecord\",\"w\":\"@proteinjs/db/Record\",\"value\":\"extends interface\"},{\"v\":\"@proteinjs/user/UserRepo\",\"w\":\"@proteinjs/user-auth/AuthenticatedUserRepo\",\"value\":\"implements interface\"},{\"v\":\"@proteinjs/user/AccessInviteService\",\"w\":\"@proteinjs/service/Service\",\"value\":\"extends interface\"},{\"v\":\"@proteinjs/user/RolesService\",\"w\":\"@proteinjs/service/Service\",\"value\":\"extends interface\"},{\"v\":\"@proteinjs/user/SignupService\",\"w\":\"@proteinjs/service/Service\",\"value\":\"extends interface\"},{\"v\":\"@proteinjs/user/UpdateUserInfoService\",\"w\":\"@proteinjs/service/Service\",\"value\":\"extends interface\"},{\"v\":\"@proteinjs/user/AccessGrant\",\"w\":\"@proteinjs/db/Record\",\"value\":\"extends type\"},{\"v\":\"@proteinjs/user/AccessGrantTable\",\"w\":\"@proteinjs/db/Table\",\"value\":\"extends class\"},{\"v\":\"@proteinjs/user/AccessInvite\",\"w\":\"@proteinjs/db/Record\",\"value\":\"extends type\"},{\"v\":\"@proteinjs/user/AccessInviteTable\",\"w\":\"@proteinjs/db/Table\",\"value\":\"extends class\"},{\"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/RoleGrantEvent\",\"w\":\"@proteinjs/db/Record\",\"value\":\"extends type\"},{\"v\":\"@proteinjs/user/RoleGrantEventTable\",\"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
|
+
var RolesCatalog_1 = require("../src/RolesCatalog");
|
|
27
28
|
var UserRepo_1 = require("../src/UserRepo");
|
|
28
29
|
var AccessGrantTable_1 = require("../src/tables/AccessGrantTable");
|
|
29
30
|
var AccessInviteTable_1 = require("../src/tables/AccessInviteTable");
|
|
30
31
|
var InviteTable_1 = require("../src/tables/InviteTable");
|
|
32
|
+
var RoleGrantEventTable_1 = require("../src/tables/RoleGrantEventTable");
|
|
31
33
|
var SessionTable_1 = require("../src/tables/SessionTable");
|
|
32
34
|
var UserTable_1 = require("../src/tables/UserTable");
|
|
33
35
|
var sourceLinks = {
|
|
36
|
+
'@proteinjs/user/AdminRole': RolesCatalog_1.AdminRole,
|
|
34
37
|
'@proteinjs/user/UserRepo': UserRepo_1.UserRepo,
|
|
35
38
|
'@proteinjs/user/AccessGrantTable': AccessGrantTable_1.AccessGrantTable,
|
|
36
39
|
'@proteinjs/user/AccessInviteTable': AccessInviteTable_1.AccessInviteTable,
|
|
37
40
|
'@proteinjs/user/InviteTable': InviteTable_1.InviteTable,
|
|
41
|
+
'@proteinjs/user/RoleGrantEventTable': RoleGrantEventTable_1.RoleGrantEventTable,
|
|
38
42
|
'@proteinjs/user/SessionTable': SessionTable_1.SessionTable,
|
|
39
43
|
'@proteinjs/user/UserTable': UserTable_1.UserTable,
|
|
40
44
|
};
|
|
@@ -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,218BAA218B,CAAC;AAGh38B,4BAA4B;AAE5B,oDAAgD;AAChD,4CAA2C;AAC3C,mEAAkE;AAClE,qEAAoE;AACpE,yDAAwD;AACxD,yEAAwE;AACxE,2DAA0D;AAC1D,qDAAoD;AAEpD,IAAM,WAAW,GAAG;IACnB,2BAA2B,EAAE,wBAAS;IACtC,0BAA0B,EAAE,mBAAQ;IACpC,kCAAkC,EAAE,mCAAgB;IACpD,mCAAmC,EAAE,qCAAiB;IACtD,6BAA6B,EAAE,yBAAW;IAC1C,qCAAqC,EAAE,yCAAmB;IAC1D,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
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
export * from './src/services/AccessInviteService';
|
|
2
|
+
export * from './src/services/RolesService';
|
|
2
3
|
export * from './src/services/SignupService';
|
|
3
4
|
export * from './src/services/UpdateUserInfoService';
|
|
4
5
|
export * from './src/tables/AccessGrantTable';
|
|
5
6
|
export * from './src/tables/AccessInviteTable';
|
|
6
7
|
export * from './src/tables/InviteTable';
|
|
8
|
+
export * from './src/tables/RoleGrantEventTable';
|
|
7
9
|
export * from './src/tables/UserTable';
|
|
8
10
|
export * from './src/tables/SessionTable';
|
|
9
11
|
export * from './src/tables/tables';
|
|
10
12
|
export * from './src/routes';
|
|
11
13
|
export * from './src/cacheKeys';
|
|
14
|
+
export * from './src/permissions';
|
|
15
|
+
export * from './src/RolesCatalog';
|
|
12
16
|
export * from './src/UserRepo';
|
|
13
17
|
export * from './src/ScopedRecord';
|
|
14
18
|
export * from './src/SharedRecord';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,cAAc,oCAAoC,CAAC;AACnD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,sCAAsC,CAAC;AAErD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,gCAAgC,CAAC;AAC/C,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;AACnC,cAAc,oBAAoB,CAAC;AAEnC,cAAc,sBAAsB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,cAAc,oCAAoC,CAAC;AACnD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,sCAAsC,CAAC;AAErD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,0BAA0B,CAAC;AACzC,cAAc,kCAAkC,CAAC;AACjD,cAAc,wBAAwB,CAAC;AACvC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,qBAAqB,CAAC;AACpC,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AAEnC,cAAc,sBAAsB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -15,16 +15,20 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./src/services/AccessInviteService"), exports);
|
|
18
|
+
__exportStar(require("./src/services/RolesService"), exports);
|
|
18
19
|
__exportStar(require("./src/services/SignupService"), exports);
|
|
19
20
|
__exportStar(require("./src/services/UpdateUserInfoService"), exports);
|
|
20
21
|
__exportStar(require("./src/tables/AccessGrantTable"), exports);
|
|
21
22
|
__exportStar(require("./src/tables/AccessInviteTable"), exports);
|
|
22
23
|
__exportStar(require("./src/tables/InviteTable"), exports);
|
|
24
|
+
__exportStar(require("./src/tables/RoleGrantEventTable"), exports);
|
|
23
25
|
__exportStar(require("./src/tables/UserTable"), exports);
|
|
24
26
|
__exportStar(require("./src/tables/SessionTable"), exports);
|
|
25
27
|
__exportStar(require("./src/tables/tables"), exports);
|
|
26
28
|
__exportStar(require("./src/routes"), exports);
|
|
27
29
|
__exportStar(require("./src/cacheKeys"), exports);
|
|
30
|
+
__exportStar(require("./src/permissions"), exports);
|
|
31
|
+
__exportStar(require("./src/RolesCatalog"), exports);
|
|
28
32
|
__exportStar(require("./src/UserRepo"), exports);
|
|
29
33
|
__exportStar(require("./src/ScopedRecord"), exports);
|
|
30
34
|
__exportStar(require("./src/SharedRecord"), exports);
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,qEAAmD;AACnD,+DAA6C;AAC7C,uEAAqD;AAErD,gEAA8C;AAC9C,iEAA+C;AAC/C,2DAAyC;AACzC,yDAAuC;AACvC,4DAA0C;AAC1C,sDAAoC;AACpC,+CAA6B;AAC7B,kDAAgC;AAChC,iDAA+B;AAC/B,qDAAmC;AACnC,qDAAmC;AAEnC,uDAAqC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,qEAAmD;AACnD,8DAA4C;AAC5C,+DAA6C;AAC7C,uEAAqD;AAErD,gEAA8C;AAC9C,iEAA+C;AAC/C,2DAAyC;AACzC,mEAAiD;AACjD,yDAAuC;AACvC,4DAA0C;AAC1C,sDAAoC;AACpC,+CAA6B;AAC7B,kDAAgC;AAChC,oDAAkC;AAClC,qDAAmC;AACnC,iDAA+B;AAC/B,qDAAmC;AACnC,qDAAmC;AAEnC,uDAAqC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { Loadable } from '@proteinjs/reflection';
|
|
2
|
+
/**
|
|
3
|
+
* A role known to the product. Consumers register entries by implementing this Loadable; admin
|
|
4
|
+
* surfaces render the catalog as a pick-list instead of free text, and the Roles service refuses
|
|
5
|
+
* to grant a role the catalog does not know.
|
|
6
|
+
*/
|
|
7
|
+
export interface RoleCatalogEntry extends Loadable {
|
|
8
|
+
/** Stable role name stored on user records (e.g. 'ops'). */
|
|
9
|
+
role: string;
|
|
10
|
+
/** What holding this role means, in plain words — shown in admin pick-lists. */
|
|
11
|
+
description: string;
|
|
12
|
+
/**
|
|
13
|
+
* Break-glass roles pass every role and permission check (see `UserAuth`) and are meant to be
|
|
14
|
+
* held by NOBODY day-to-day. Only 'admin' ships with this flag.
|
|
15
|
+
*/
|
|
16
|
+
breakGlass?: boolean;
|
|
17
|
+
}
|
|
18
|
+
export declare const getRoleCatalogEntries: () => RoleCatalogEntry[];
|
|
19
|
+
/**
|
|
20
|
+
* The built-in break-glass role: passes every role and permission check. Day-to-day access rides
|
|
21
|
+
* permission-mapped roles; admin exists for bootstrap and emergencies.
|
|
22
|
+
*/
|
|
23
|
+
export declare class AdminRole implements RoleCatalogEntry {
|
|
24
|
+
role: string;
|
|
25
|
+
description: string;
|
|
26
|
+
breakGlass: boolean;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* The registry of known roles: the built-in 'admin' plus consumer-registered `RoleCatalogEntry`
|
|
30
|
+
* implementations, deduped by role name (first registration wins; 'admin' cannot be redefined).
|
|
31
|
+
*/
|
|
32
|
+
export declare class RolesCatalog {
|
|
33
|
+
static getEntries(): RoleCatalogEntry[];
|
|
34
|
+
static getEntry(role: string): RoleCatalogEntry | undefined;
|
|
35
|
+
static isKnownRole(role: string): boolean;
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=RolesCatalog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RolesCatalog.d.ts","sourceRoot":"","sources":["../../src/RolesCatalog.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAoB,MAAM,uBAAuB,CAAC;AAEnE;;;;GAIG;AACH,MAAM,WAAW,gBAAiB,SAAQ,QAAQ;IAChD,4DAA4D;IAC5D,IAAI,EAAE,MAAM,CAAC;IACb,gFAAgF;IAChF,WAAW,EAAE,MAAM,CAAC;IACpB;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,eAAO,MAAM,qBAAqB,0BACoD,CAAC;AAEvF;;;GAGG;AACH,qBAAa,SAAU,YAAW,gBAAgB;IAChD,IAAI,SAAW;IACf,WAAW,SAAsF;IACjG,UAAU,UAAQ;CACnB;AAED;;;GAGG;AACH,qBAAa,YAAY;IACvB,MAAM,CAAC,UAAU,IAAI,gBAAgB,EAAE;IAWvC,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,gBAAgB,GAAG,SAAS;IAI3D,MAAM,CAAC,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;CAG1C"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RolesCatalog = exports.AdminRole = exports.getRoleCatalogEntries = void 0;
|
|
4
|
+
var reflection_1 = require("@proteinjs/reflection");
|
|
5
|
+
var getRoleCatalogEntries = function () {
|
|
6
|
+
return reflection_1.SourceRepository.get().objects('@proteinjs/user/RoleCatalogEntry');
|
|
7
|
+
};
|
|
8
|
+
exports.getRoleCatalogEntries = getRoleCatalogEntries;
|
|
9
|
+
/**
|
|
10
|
+
* The built-in break-glass role: passes every role and permission check. Day-to-day access rides
|
|
11
|
+
* permission-mapped roles; admin exists for bootstrap and emergencies.
|
|
12
|
+
*/
|
|
13
|
+
var AdminRole = /** @class */ (function () {
|
|
14
|
+
function AdminRole() {
|
|
15
|
+
this.role = 'admin';
|
|
16
|
+
this.description = 'Break-glass superuser: passes every permission check. Held by nobody day-to-day.';
|
|
17
|
+
this.breakGlass = true;
|
|
18
|
+
}
|
|
19
|
+
return AdminRole;
|
|
20
|
+
}());
|
|
21
|
+
exports.AdminRole = AdminRole;
|
|
22
|
+
/**
|
|
23
|
+
* The registry of known roles: the built-in 'admin' plus consumer-registered `RoleCatalogEntry`
|
|
24
|
+
* implementations, deduped by role name (first registration wins; 'admin' cannot be redefined).
|
|
25
|
+
*/
|
|
26
|
+
var RolesCatalog = /** @class */ (function () {
|
|
27
|
+
function RolesCatalog() {
|
|
28
|
+
}
|
|
29
|
+
RolesCatalog.getEntries = function () {
|
|
30
|
+
var entries = [new AdminRole()];
|
|
31
|
+
var _loop_1 = function (entry) {
|
|
32
|
+
if (!entries.some(function (existing) { return existing.role === entry.role; })) {
|
|
33
|
+
entries.push(entry);
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
for (var _i = 0, _a = (0, exports.getRoleCatalogEntries)(); _i < _a.length; _i++) {
|
|
37
|
+
var entry = _a[_i];
|
|
38
|
+
_loop_1(entry);
|
|
39
|
+
}
|
|
40
|
+
return entries;
|
|
41
|
+
};
|
|
42
|
+
RolesCatalog.getEntry = function (role) {
|
|
43
|
+
return RolesCatalog.getEntries().find(function (entry) { return entry.role === role; });
|
|
44
|
+
};
|
|
45
|
+
RolesCatalog.isKnownRole = function (role) {
|
|
46
|
+
return !!RolesCatalog.getEntry(role);
|
|
47
|
+
};
|
|
48
|
+
return RolesCatalog;
|
|
49
|
+
}());
|
|
50
|
+
exports.RolesCatalog = RolesCatalog;
|
|
51
|
+
//# sourceMappingURL=RolesCatalog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RolesCatalog.js","sourceRoot":"","sources":["../../src/RolesCatalog.ts"],"names":[],"mappings":";;;AAAA,oDAAmE;AAmB5D,IAAM,qBAAqB,GAAG;IACnC,OAAA,6BAAgB,CAAC,GAAG,EAAE,CAAC,OAAO,CAAmB,kCAAkC,CAAC;AAApF,CAAoF,CAAC;AAD1E,QAAA,qBAAqB,yBACqD;AAEvF;;;GAGG;AACH;IAAA;QACE,SAAI,GAAG,OAAO,CAAC;QACf,gBAAW,GAAG,kFAAkF,CAAC;QACjG,eAAU,GAAG,IAAI,CAAC;IACpB,CAAC;IAAD,gBAAC;AAAD,CAAC,AAJD,IAIC;AAJY,8BAAS;AAMtB;;;GAGG;AACH;IAAA;IAmBA,CAAC;IAlBQ,uBAAU,GAAjB;QACE,IAAM,OAAO,GAAuB,CAAC,IAAI,SAAS,EAAE,CAAC,CAAC;gCAC3C,KAAK;YACd,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,UAAC,QAAQ,IAAK,OAAA,QAAQ,CAAC,IAAI,KAAK,KAAK,CAAC,IAAI,EAA5B,CAA4B,CAAC,EAAE;gBAC7D,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;aACrB;;QAHH,KAAoB,UAAuB,EAAvB,SAAA,6BAAqB,GAAE,EAAvB,cAAuB,EAAvB,IAAuB;YAAtC,IAAM,KAAK,SAAA;oBAAL,KAAK;SAIf;QAED,OAAO,OAAO,CAAC;IACjB,CAAC;IAEM,qBAAQ,GAAf,UAAgB,IAAY;QAC1B,OAAO,YAAY,CAAC,UAAU,EAAE,CAAC,IAAI,CAAC,UAAC,KAAK,IAAK,OAAA,KAAK,CAAC,IAAI,KAAK,IAAI,EAAnB,CAAmB,CAAC,CAAC;IACxE,CAAC;IAEM,wBAAW,GAAlB,UAAmB,IAAY;QAC7B,OAAO,CAAC,CAAC,YAAY,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;IACvC,CAAC;IACH,mBAAC;AAAD,CAAC,AAnBD,IAmBC;AAnBY,oCAAY"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UserRepo.d.ts","sourceRoot":"","sources":["../../src/UserRepo.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAChF,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAG1C,qBAAa,QAAS,YAAW,qBAAqB;IACpD,OAAO,IAAI,IAAI,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,iBAAiB;
|
|
1
|
+
{"version":3,"file":"UserRepo.d.ts","sourceRoot":"","sources":["../../src/UserRepo.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAChF,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAG1C,qBAAa,QAAS,YAAW,qBAAqB;IACpD,OAAO,IAAI,IAAI,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,iBAAiB;IAQlD,OAAO,CAAC,IAAI,EAAE,IAAI;CAGnB"}
|
package/dist/src/UserRepo.js
CHANGED
|
@@ -7,8 +7,11 @@ var UserRepo = /** @class */ (function () {
|
|
|
7
7
|
function UserRepo() {
|
|
8
8
|
}
|
|
9
9
|
UserRepo.prototype.getUser = function () {
|
|
10
|
+
var _a;
|
|
10
11
|
var user = Object.assign({}, server_api_1.Session.getDataByKey(cacheKeys_1.USER_SESSION_CACHE_KEY));
|
|
11
|
-
|
|
12
|
+
// Roles are stored typed (`role_list`); rows that predate the roles backfill migration read
|
|
13
|
+
// as null, and a context without session data has none — both mean "no roles".
|
|
14
|
+
var roles = (_a = user.roles) !== null && _a !== void 0 ? _a : [];
|
|
12
15
|
return Object.assign(user, { roles: roles });
|
|
13
16
|
};
|
|
14
17
|
UserRepo.prototype.setUser = function (user) {
|
package/dist/src/UserRepo.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UserRepo.js","sourceRoot":"","sources":["../../src/UserRepo.ts"],"names":[],"mappings":";;;AAAA,oDAAgD;AAGhD,yCAAqD;AAErD;IAAA;
|
|
1
|
+
{"version":3,"file":"UserRepo.js","sourceRoot":"","sources":["../../src/UserRepo.ts"],"names":[],"mappings":";;;AAAA,oDAAgD;AAGhD,yCAAqD;AAErD;IAAA;IAYA,CAAC;IAXC,0BAAO,GAAP;;QACE,IAAM,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,oBAAO,CAAC,YAAY,CAAO,kCAAsB,CAAC,CAAC,CAAC;QACnF,4FAA4F;QAC5F,+EAA+E;QAC/E,IAAM,KAAK,GAAG,MAAA,IAAI,CAAC,KAAK,mCAAI,EAAE,CAAC;QAC/B,OAAO,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,EAAE,KAAK,OAAA,EAAE,CAAC,CAAC;IACxC,CAAC;IAED,0BAAO,GAAP,UAAQ,IAAU;QAChB,oBAAO,CAAC,YAAY,CAAC,kCAAsB,EAAE,IAAI,CAAC,CAAC;IACrD,CAAC;IACH,eAAC;AAAD,CAAC,AAZD,IAYC;AAZY,4BAAQ"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Abstract permission slugs the user-management surfaces declare. Seeing users and granting
|
|
3
|
+
* power are different trusts, so they are separate permissions. The consumer app maps slugs to
|
|
4
|
+
* its roles via `PermissionRolesMapping` (@proteinjs/user-auth); 'admin' passes both
|
|
5
|
+
* (break-glass).
|
|
6
|
+
*/
|
|
7
|
+
export declare const USER_PERMISSIONS: {
|
|
8
|
+
/** View and manage user records and invites — everything except the roles column. */
|
|
9
|
+
readonly users: "users";
|
|
10
|
+
/** Grant and revoke roles, through the Roles service only (audited per change). */
|
|
11
|
+
readonly roles: "roles";
|
|
12
|
+
/**
|
|
13
|
+
* View session records — a different trust than 'users' people-management (session rows carry
|
|
14
|
+
* auth material). Read-only by design: session writes are system-written (DbSessionStore).
|
|
15
|
+
*/
|
|
16
|
+
readonly sessions: "sessions";
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=permissions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"permissions.d.ts","sourceRoot":"","sources":["../../src/permissions.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB;IAC3B,qFAAqF;;IAErF,mFAAmF;;IAEnF;;;OAGG;;CAEK,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.USER_PERMISSIONS = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Abstract permission slugs the user-management surfaces declare. Seeing users and granting
|
|
6
|
+
* power are different trusts, so they are separate permissions. The consumer app maps slugs to
|
|
7
|
+
* its roles via `PermissionRolesMapping` (@proteinjs/user-auth); 'admin' passes both
|
|
8
|
+
* (break-glass).
|
|
9
|
+
*/
|
|
10
|
+
exports.USER_PERMISSIONS = {
|
|
11
|
+
/** View and manage user records and invites — everything except the roles column. */
|
|
12
|
+
users: 'users',
|
|
13
|
+
/** Grant and revoke roles, through the Roles service only (audited per change). */
|
|
14
|
+
roles: 'roles',
|
|
15
|
+
/**
|
|
16
|
+
* View session records — a different trust than 'users' people-management (session rows carry
|
|
17
|
+
* auth material). Read-only by design: session writes are system-written (DbSessionStore).
|
|
18
|
+
*/
|
|
19
|
+
sessions: 'sessions',
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=permissions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"permissions.js","sourceRoot":"","sources":["../../src/permissions.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACU,QAAA,gBAAgB,GAAG;IAC9B,qFAAqF;IACrF,KAAK,EAAE,OAAO;IACd,mFAAmF;IACnF,KAAK,EAAE,OAAO;IACd;;;OAGG;IACH,QAAQ,EAAE,UAAU;CACZ,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Service } from '@proteinjs/service';
|
|
2
|
+
export declare const getRolesService: () => RolesService;
|
|
3
|
+
/**
|
|
4
|
+
* The ONE write path for user roles. The `user.roles` column is service-protected (generic
|
|
5
|
+
* record writes cannot touch it); every change lands here, is validated against the roles
|
|
6
|
+
* catalog, and writes a `role_grant_event` audit row (actor, target, role, action; `created` is
|
|
7
|
+
* the timestamp). Requires the 'roles' permission.
|
|
8
|
+
*/
|
|
9
|
+
export interface RolesService extends Service {
|
|
10
|
+
/** Add a catalog role to a user. Already held: no change, no audit row. */
|
|
11
|
+
grantRole(userId: string, role: string): Promise<void>;
|
|
12
|
+
/** Remove a role from a user. Not held: no change, no audit row. */
|
|
13
|
+
revokeRole(userId: string, role: string): Promise<void>;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=RolesService.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RolesService.d.ts","sourceRoot":"","sources":["../../../src/services/RolesService.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAkB,MAAM,oBAAoB,CAAC;AAE7D,eAAO,MAAM,eAAe,oBAA+D,CAAC;AAE5F;;;;;GAKG;AACH,MAAM,WAAW,YAAa,SAAQ,OAAO;IAC3C,2EAA2E;IAC3E,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACvD,oEAAoE;IACpE,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACzD"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getRolesService = void 0;
|
|
4
|
+
var service_1 = require("@proteinjs/service");
|
|
5
|
+
exports.getRolesService = (0, service_1.serviceFactory)('@proteinjs/user/RolesService');
|
|
6
|
+
//# sourceMappingURL=RolesService.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RolesService.js","sourceRoot":"","sources":["../../../src/services/RolesService.ts"],"names":[],"mappings":";;;AAAA,8CAA6D;AAEhD,QAAA,eAAe,GAAG,IAAA,wBAAc,EAAe,8BAA8B,CAAC,CAAC"}
|
|
@@ -8,6 +8,15 @@ export type Invite = Record & {
|
|
|
8
8
|
};
|
|
9
9
|
export declare class InviteTable extends Table<Invite> {
|
|
10
10
|
name: string;
|
|
11
|
+
/**
|
|
12
|
+
* Invite management rides the 'users' permission: reads and deletes through the record
|
|
13
|
+
* surfaces; creating/refreshing an invite is `SignupService.sendInvite` ONLY (a generic insert
|
|
14
|
+
* would mint an invite that can never be redeemed — no token/expiry/inviter), so generic
|
|
15
|
+
* writes stay closed. The db doors mirror the service doors — `DbService`'s inner `Db`
|
|
16
|
+
* re-checks the db api as the calling user (see the user table); server code proper uses
|
|
17
|
+
* system paths, which bypass TableAuth.
|
|
18
|
+
*/
|
|
19
|
+
auth: Table<Invite>['auth'];
|
|
11
20
|
columns: {
|
|
12
21
|
id: import("@proteinjs/db").Column<string, any>;
|
|
13
22
|
created: import("@proteinjs/db").Column<Moment, any>;
|
|
@@ -1 +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;
|
|
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;AAGhC,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;;;;;;;OAOG;IACH,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CASzB;IACF,OAAO;;;;;;;;;WAKJ;CACJ"}
|
|
@@ -17,11 +17,30 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
exports.InviteTable = void 0;
|
|
19
19
|
var db_1 = require("@proteinjs/db");
|
|
20
|
+
var permissions_1 = require("../permissions");
|
|
20
21
|
var InviteTable = /** @class */ (function (_super) {
|
|
21
22
|
__extends(InviteTable, _super);
|
|
22
23
|
function InviteTable() {
|
|
23
24
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
24
25
|
_this.name = 'invite';
|
|
26
|
+
/**
|
|
27
|
+
* Invite management rides the 'users' permission: reads and deletes through the record
|
|
28
|
+
* surfaces; creating/refreshing an invite is `SignupService.sendInvite` ONLY (a generic insert
|
|
29
|
+
* would mint an invite that can never be redeemed — no token/expiry/inviter), so generic
|
|
30
|
+
* writes stay closed. The db doors mirror the service doors — `DbService`'s inner `Db`
|
|
31
|
+
* re-checks the db api as the calling user (see the user table); server code proper uses
|
|
32
|
+
* system paths, which bypass TableAuth.
|
|
33
|
+
*/
|
|
34
|
+
_this.auth = {
|
|
35
|
+
db: {
|
|
36
|
+
query: { permission: permissions_1.USER_PERMISSIONS.users },
|
|
37
|
+
delete: { permission: permissions_1.USER_PERMISSIONS.users },
|
|
38
|
+
},
|
|
39
|
+
service: {
|
|
40
|
+
query: { permission: permissions_1.USER_PERMISSIONS.users },
|
|
41
|
+
delete: { permission: permissions_1.USER_PERMISSIONS.users },
|
|
42
|
+
},
|
|
43
|
+
};
|
|
25
44
|
_this.columns = (0, db_1.withRecordColumns)({
|
|
26
45
|
email: new db_1.StringColumn('email', {}, 250),
|
|
27
46
|
token: new db_1.StringColumn('token'),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InviteTable.js","sourceRoot":"","sources":["../../../src/tables/InviteTable.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,oCAA+F;
|
|
1
|
+
{"version":3,"file":"InviteTable.js","sourceRoot":"","sources":["../../../src/tables/InviteTable.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,oCAA+F;AAE/F,8CAAkD;AASlD;IAAiC,+BAAa;IAA9C;QAAA,qEA0BC;QAzBC,UAAI,GAAG,QAAQ,CAAC;QAChB;;;;;;;WAOG;QACH,UAAI,GAA0B;YAC5B,EAAE,EAAE;gBACF,KAAK,EAAE,EAAE,UAAU,EAAE,8BAAgB,CAAC,KAAK,EAAE;gBAC7C,MAAM,EAAE,EAAE,UAAU,EAAE,8BAAgB,CAAC,KAAK,EAAE;aAC/C;YACD,OAAO,EAAE;gBACP,KAAK,EAAE,EAAE,UAAU,EAAE,8BAAgB,CAAC,KAAK,EAAE;gBAC7C,MAAM,EAAE,EAAE,UAAU,EAAE,8BAAgB,CAAC,KAAK,EAAE;aAC/C;SACF,CAAC;QACF,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,AA1BD,CAAiC,UAAK,GA0BrC;AA1BY,kCAAW"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Table, Record } from '@proteinjs/db';
|
|
2
|
+
/**
|
|
3
|
+
* Audit row written by the Roles service for EVERY grant/revoke. The base `created` column is the
|
|
4
|
+
* change timestamp. Rows are append-only: readable by 'roles' holders, written only by the Roles
|
|
5
|
+
* service's system path — no generic door grants writes, so the trail cannot be edited from the
|
|
6
|
+
* record surfaces.
|
|
7
|
+
*/
|
|
8
|
+
export type RoleGrantEvent = Record & {
|
|
9
|
+
/** id of the user who made the change */
|
|
10
|
+
actor: string;
|
|
11
|
+
/** id of the user whose roles changed */
|
|
12
|
+
target: string;
|
|
13
|
+
role: string;
|
|
14
|
+
action: 'grant' | 'revoke';
|
|
15
|
+
};
|
|
16
|
+
export declare class RoleGrantEventTable extends Table<RoleGrantEvent> {
|
|
17
|
+
name: string;
|
|
18
|
+
auth: Table<RoleGrantEvent>['auth'];
|
|
19
|
+
columns: {
|
|
20
|
+
id: import("@proteinjs/db").Column<string, any>;
|
|
21
|
+
created: import("@proteinjs/db").Column<import("moment").Moment, any>;
|
|
22
|
+
updated: import("@proteinjs/db").Column<import("moment").Moment, any>;
|
|
23
|
+
} & {} & {
|
|
24
|
+
actor: import("@proteinjs/db").Column<string, any>;
|
|
25
|
+
target: import("@proteinjs/db").Column<string, any>;
|
|
26
|
+
role: import("@proteinjs/db").Column<string, any>;
|
|
27
|
+
action: import("@proteinjs/db").Column<"grant" | "revoke", any>;
|
|
28
|
+
} & {};
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=RoleGrantEventTable.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RoleGrantEventTable.d.ts","sourceRoot":"","sources":["../../../src/tables/RoleGrantEventTable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,KAAK,EAAE,MAAM,EAAqB,MAAM,eAAe,CAAC;AAG/E;;;;;GAKG;AACH,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG;IACpC,yCAAyC;IACzC,KAAK,EAAE,MAAM,CAAC;IACd,yCAAyC;IACzC,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,OAAO,GAAG,QAAQ,CAAC;CAC5B,CAAC;AAEF,qBAAa,mBAAoB,SAAQ,KAAK,CAAC,cAAc,CAAC;IAC5D,IAAI,SAAsB;IAC1B,IAAI,EAAE,KAAK,CAAC,cAAc,CAAC,CAAC,MAAM,CAAC,CAOjC;IACF,OAAO;;;;;;;;;WAKJ;CACJ"}
|