@proteinjs/user 1.7.2 → 1.8.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/CHANGELOG.md +12 -0
- package/dist/generated/index.d.ts +0 -2
- package/dist/generated/index.d.ts.map +1 -1
- package/dist/generated/index.js +1 -3
- package/dist/generated/index.js.map +1 -1
- package/dist/src/ScopedRecord.d.ts +4 -1
- package/dist/src/ScopedRecord.d.ts.map +1 -1
- package/dist/src/ScopedRecord.js +14 -2
- package/dist/src/ScopedRecord.js.map +1 -1
- package/dist/src/UserRepo.d.ts +8 -0
- package/dist/src/UserRepo.d.ts.map +1 -1
- package/dist/src/UserRepo.js +22 -0
- package/dist/src/UserRepo.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 +14 -1
- package/dist/src/routes.js.map +1 -1
- package/dist/src/services/UpdateUserInfoService.d.ts +16 -1
- package/dist/src/services/UpdateUserInfoService.d.ts.map +1 -1
- package/dist/src/services/UpdateUserInfoService.js.map +1 -1
- package/dist/src/tables/UserTable.d.ts +12 -0
- package/dist/src/tables/UserTable.d.ts.map +1 -1
- package/dist/src/tables/UserTable.js +2 -0
- package/dist/src/tables/UserTable.js.map +1 -1
- package/generated/index.ts +1 -3
- package/package.json +2 -2
- package/src/ScopedRecord.ts +5 -3
- package/src/UserRepo.ts +25 -0
- package/src/routes.ts +13 -0
- package/src/services/UpdateUserInfoService.ts +17 -1
- package/src/tables/UserTable.ts +12 -0
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,18 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [1.8.0](https://github.com/proteinjs/user/compare/@proteinjs/user@1.7.2...@proteinjs/user@1.8.0) (2026-08-14)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* createScopedIndex passes unique through ([bf0a738](https://github.com/proteinjs/user/commit/bf0a7387540d797ea9ea789acaf921e9af832f6a))
|
|
12
|
+
* user avatars — photo/emoji schema, avatar mutations with session-cache refresh, shared /avatar route ([6af0bc5](https://github.com/proteinjs/user/commit/6af0bc5b34cf42fc3cc47706fc200fd8fdaa8d8d))
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
6
18
|
## [1.7.2](https://github.com/proteinjs/user/compare/@proteinjs/user@1.7.1...@proteinjs/user@1.7.2) (2026-08-14)
|
|
7
19
|
|
|
8
20
|
**Note:** Version bump only for package @proteinjs/user
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
/** Load Dependency Source Graphs */
|
|
2
2
|
import '@proteinjs/db';
|
|
3
|
-
import '@proteinjs/reflection';
|
|
4
3
|
import '@proteinjs/server-api';
|
|
5
4
|
import '@proteinjs/service';
|
|
6
5
|
import '@proteinjs/user-auth';
|
|
7
|
-
import 'moment';
|
|
8
6
|
export * from '../index';
|
|
9
7
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -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,
|
|
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,oBAAoB,CAAC;AAC5B,OAAO,sBAAsB,CAAC;AAqC9B,cAAc,UAAU,CAAC"}
|
package/dist/generated/index.js
CHANGED
|
@@ -16,13 +16,11 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
};
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
require("@proteinjs/db");
|
|
19
|
-
require("@proteinjs/reflection");
|
|
20
19
|
require("@proteinjs/server-api");
|
|
21
20
|
require("@proteinjs/service");
|
|
22
21
|
require("@proteinjs/user-auth");
|
|
23
|
-
require("moment");
|
|
24
22
|
/** Generate Source Graph */
|
|
25
|
-
var sourceGraph = "{\"options\":{\"directed\":true,\"multigraph\":false,\"compound\":false},\"nodes\":[{\"v\":\"@proteinjs/user/RoleCatalogEntry\",\"value\":{\"packageName\":\"@proteinjs/user\",\"name\":\"RoleCatalogEntry\",\"filePath\":\"/home/runner/work/user/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\":\"/home/runner/work/user/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\":\"/home/runner/work/user/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\":\"/home/runner/work/user/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\":\"/home/runner/work/user/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\":\"/home/runner/work/user/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\":\"/home/runner/work/user/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\":\"/home/runner/work/user/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\":\"/home/runner/work/user/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\":\"/home/runner/work/user/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\":\"/home/runner/work/user/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\":\"/home/runner/work/user/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\":\"/home/runner/work/user/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\":\"/home/runner/work/user/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\":\"/home/runner/work/user/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\":\"/home/runner/work/user/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\":\"/home/runner/work/user/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\":\"/home/runner/work/user/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\":\"/home/runner/work/user/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\":\"/home/runner/work/user/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\":\"/home/runner/work/user/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\"}]}";
|
|
23
|
+
var sourceGraph = "{\"options\":{\"directed\":true,\"multigraph\":false,\"compound\":false},\"nodes\":[{\"v\":\"@proteinjs/user/RoleCatalogEntry\",\"value\":{\"packageName\":\"@proteinjs/user\",\"name\":\"RoleCatalogEntry\",\"filePath\":\"/home/runner/work/user/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\":\"/home/runner/work/user/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\":\"/home/runner/work/user/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\":\"/home/runner/work/user/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\":\"/(user: User) => void\"},{\"v\":\"@proteinjs/user/UserRepo\",\"value\":{\"packageName\":\"@proteinjs/user\",\"name\":\"UserRepo\",\"filePath\":\"/home/runner/work/user/user/packages/user/src/UserRepo.ts\",\"qualifiedName\":\"@proteinjs/user/UserRepo\",\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"properties\":[{\"name\":\"userChangedListeners\",\"type\":null,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":true,\"visibility\":\"private\"}],\"methods\":[{\"name\":\"onUserChanged\",\"returnType\":{\"packageName\":\"\",\"name\":\"() => void\",\"filePath\":null,\"qualifiedName\":\"/() => void\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":true,\"visibility\":\"public\",\"parameters\":[{\"name\":\"listener\",\"type\":{\"packageName\":\"@proteinjs/user\",\"name\":\"UserChangedListener\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/user/UserChangedListener\",\"typeParameters\":null,\"directParents\":null}}]},{\"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\":\"/home/runner/work/user/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\":\"/home/runner/work/user/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\":\"/home/runner/work/user/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\":\"/Omit\"},{\"v\":\"@proteinjs/user/UpdateUserInfoService\",\"value\":{\"packageName\":\"@proteinjs/user\",\"name\":\"UpdateUserInfoService\",\"filePath\":\"/home/runner/work/user/user/packages/user/src/services/UpdateUserInfoService.ts\",\"qualifiedName\":\"@proteinjs/user/UpdateUserInfoService\",\"properties\":[],\"methods\":[{\"name\":\"updateName\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<UpdatedUser>\",\"filePath\":null,\"qualifiedName\":\"/Promise<UpdatedUser>\",\"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}}]},{\"name\":\"updateAvatarPhoto\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<UpdatedUser>\",\"filePath\":null,\"qualifiedName\":\"/Promise<UpdatedUser>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":true,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"fileData\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"mimeType\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"updateAvatarEmoji\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<UpdatedUser>\",\"filePath\":null,\"qualifiedName\":\"/Promise<UpdatedUser>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":true,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"emoji\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"clearAvatar\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<UpdatedUser>\",\"filePath\":null,\"qualifiedName\":\"/Promise<UpdatedUser>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":true,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[]}],\"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\":\"/home/runner/work/user/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\":\"/home/runner/work/user/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\":\"/home/runner/work/user/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\":\"/home/runner/work/user/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\":\"/home/runner/work/user/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\":\"/home/runner/work/user/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\":\"/home/runner/work/user/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\":\"/home/runner/work/user/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\":\"/home/runner/work/user/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\":\"/home/runner/work/user/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\":\"/home/runner/work/user/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 /**\\n * Emoji avatar. At most one of `avatarEmoji`/`avatarFileId` is set \\u2014 the avatar mutations in\\n * UpdateUserInfo enforce it (every mutation assigns BOTH columns); nothing else writes these.\\n */\\n avatarEmoji?: string | null;\\n /**\\n * File id of the stored avatar photo (512x512 JPEG). A plain string, NOT a ReferenceColumn:\\n * @proteinjs/db-file depends on @proteinjs/user, so a user\\u2192file reference would be circular.\\n */\\n avatarFileId?: 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 /**\\n * Emoji avatar. At most one of `avatarEmoji`/`avatarFileId` is set \\u2014 the avatar mutations in\\n * UpdateUserInfo enforce it (every mutation assigns BOTH columns); nothing else writes these.\\n */\\n avatarEmoji?: string | null;\\n /**\\n * File id of the stored avatar photo (512x512 JPEG). A plain string, NOT a ReferenceColumn:\\n * @proteinjs/db-file depends on @proteinjs/user, so a user\\u2192file reference would be circular.\\n */\\n avatarFileId?: string | null;\\n}\",\"typeParameters\":[],\"directParents\":null}],\"sourceType\":1}},{\"v\":\"@proteinjs/user/UserTable\",\"value\":{\"packageName\":\"@proteinjs/user\",\"name\":\"UserTable\",\"filePath\":\"/home/runner/work/user/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
24
|
/** Generate Source Links */
|
|
27
25
|
var RolesCatalog_1 = require("../src/RolesCatalog");
|
|
28
26
|
var UserRepo_1 = require("../src/UserRepo");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../generated/index.ts"],"names":[],"mappings":";AAAA,oCAAoC;;;;;;;;;;;;;;;;AAEpC,yBAAuB;AACvB,iCAA+B;AAC/B,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../generated/index.ts"],"names":[],"mappings":";AAAA,oCAAoC;;;;;;;;;;;;;;;;AAEpC,yBAAuB;AACvB,iCAA+B;AAC/B,8BAA4B;AAC5B,gCAA8B;AAG9B,4BAA4B;AAE5B,IAAM,WAAW,GAAG,2shCAA2shC,CAAC;AAGhuhC,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"}
|
|
@@ -18,14 +18,17 @@ export declare function withScopedRecordColumns<T extends ScopedRecord>(columns:
|
|
|
18
18
|
/**
|
|
19
19
|
* Adds the `scope` column as the first column to the provided index.
|
|
20
20
|
*
|
|
21
|
-
* @param args Index to create
|
|
21
|
+
* @param args Index to create (`unique: true` for a scoped UNIQUE index — name it with a
|
|
22
|
+
* `_unique` suffix, matching schema-metadata classification)
|
|
22
23
|
* @returns Index with `scope` column added first
|
|
23
24
|
*/
|
|
24
25
|
export declare function createScopedIndex<T extends ScopedRecord>(args: {
|
|
25
26
|
columns: (keyof T)[];
|
|
26
27
|
name?: string;
|
|
28
|
+
unique?: boolean;
|
|
27
29
|
}): {
|
|
28
30
|
columns: (keyof T)[];
|
|
29
31
|
name?: string;
|
|
32
|
+
unique?: boolean;
|
|
30
33
|
};
|
|
31
34
|
//# sourceMappingURL=ScopedRecord.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScopedRecord.d.ts","sourceRoot":"","sources":["../../src/ScopedRecord.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EAEP,MAAM,EAGN,KAAK,EAGL,EAAE,EACH,MAAM,eAAe,CAAC;AAGvB,MAAM,WAAW,YAAa,SAAQ,MAAM;IAC1C,KAAK,EAAE,MAAM,CAAC;CACf;AAED,eAAO,MAAM,WAAW,wBAAsB,CAAC;AAE/C,eAAO,MAAM,mBAAmB,oDACkB,CAAC;AA+CnD,wBAAgB,eAAe,0BAE9B;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC,WAG9C;AAED;;;;;;;GAOG;AACH,wBAAgB,uBAAuB,CAAC,CAAC,SAAS,YAAY,EAC5D,OAAO,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC,EAAE,MAAM,YAAY,CAAC,CAAC,EAC7C,gBAAgB,CAAC,EAAE,MAAM,EAAE,GAC1B,OAAO,CAAC,YAAY,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,EAAE,MAAM,YAAY,CAAC,CAAC,CAK9D;AAED
|
|
1
|
+
{"version":3,"file":"ScopedRecord.d.ts","sourceRoot":"","sources":["../../src/ScopedRecord.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EAEP,MAAM,EAGN,KAAK,EAGL,EAAE,EACH,MAAM,eAAe,CAAC;AAGvB,MAAM,WAAW,YAAa,SAAQ,MAAM;IAC1C,KAAK,EAAE,MAAM,CAAC;CACf;AAED,eAAO,MAAM,WAAW,wBAAsB,CAAC;AAE/C,eAAO,MAAM,mBAAmB,oDACkB,CAAC;AA+CnD,wBAAgB,eAAe,0BAE9B;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC,WAG9C;AAED;;;;;;;GAOG;AACH,wBAAgB,uBAAuB,CAAC,CAAC,SAAS,YAAY,EAC5D,OAAO,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC,EAAE,MAAM,YAAY,CAAC,CAAC,EAC7C,gBAAgB,CAAC,EAAE,MAAM,EAAE,GAC1B,OAAO,CAAC,YAAY,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,EAAE,MAAM,YAAY,CAAC,CAAC,CAK9D;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,SAAS,YAAY,EAAE,IAAI,EAAE;IAC9D,OAAO,EAAE,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,GAAG;IAAE,OAAO,EAAE,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,OAAO,CAAA;CAAE,CAM5D"}
|
package/dist/src/ScopedRecord.js
CHANGED
|
@@ -1,4 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
2
13
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
14
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
15
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -124,14 +135,15 @@ exports.withScopedRecordColumns = withScopedRecordColumns;
|
|
|
124
135
|
/**
|
|
125
136
|
* Adds the `scope` column as the first column to the provided index.
|
|
126
137
|
*
|
|
127
|
-
* @param args Index to create
|
|
138
|
+
* @param args Index to create (`unique: true` for a scoped UNIQUE index — name it with a
|
|
139
|
+
* `_unique` suffix, matching schema-metadata classification)
|
|
128
140
|
* @returns Index with `scope` column added first
|
|
129
141
|
*/
|
|
130
142
|
function createScopedIndex(args) {
|
|
131
143
|
if (args.columns.includes('scope')) {
|
|
132
144
|
return args;
|
|
133
145
|
}
|
|
134
|
-
return { columns: __spreadArray(['scope'], args.columns, true), name: args.name };
|
|
146
|
+
return __assign({ columns: __spreadArray(['scope'], args.columns, true), name: args.name }, (args.unique ? { unique: true } : {}));
|
|
135
147
|
}
|
|
136
148
|
exports.createScopedIndex = createScopedIndex;
|
|
137
149
|
//# sourceMappingURL=ScopedRecord.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScopedRecord.js","sourceRoot":"","sources":["../../src/ScopedRecord.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ScopedRecord.js","sourceRoot":"","sources":["../../src/ScopedRecord.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,oCAUuB;AACvB,uCAAsC;AAMzB,QAAA,WAAW,GAAG,CAAA,UAAmB,CAAA,CAAC;AAExC,IAAM,mBAAmB,GAAG;IACjC,OAAA,IAAI,OAAE,CAAI,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,IAAI,CAAC;AAAhD,CAAgD,CAAC;AADtC,QAAA,mBAAmB,uBACmB;AAEnD;;;;;;;;GAQG;AACH,IAAM,kBAAkB,GAAG,UAAC,SAAiB;IAC3C,IAAM,MAAM,GAAG,IAAI,mBAAQ,EAAE,CAAC,OAAO,EAAE,CAAC,EAAE,CAAC;IAC3C,IAAI,CAAC,MAAM,EAAE;QACX,MAAM,IAAI,KAAK,CACb,gDAAyC,SAAS,+CAA4C;YAC5F,yFAAyF;YACzF,8DAA8D,CACjE,CAAC;KACH;IACD,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC;AAEF,IAAM,sBAAsB,GAAG,UAAC,gBAA+B;IAA/B,iCAAA,EAAA,qBAA+B;IAC7D,OAAO;QACL,KAAK,EAAE,IAAI,iBAAY,CAAC,OAAO,EAAE;YAC/B,YAAY,EAAE;gBAAY,sBAAA,kBAAkB,CAAC,OAAO,CAAC,EAAA;qBAAA;YACrD,iBAAiB,EAAE,UAAC,WAAW,IAAK,OAAA,CAAC,WAAW,EAAZ,CAAY;YAChD,0FAA0F;YAC1F,4FAA4F;YAC5F,4FAA4F;YAC5F,uFAAuF;YACvF,SAAS,EAAE,UAAC,WAAW,IAAK,OAAA,CAAC,WAAW,EAAZ,CAAY;YACxC,UAAU,EAAE,UAAO,EAAE,EAAE,WAAW;;oBAChC,IAAI,CAAC,WAAW,EAAE;wBAChB,EAAE,CAAC,SAAS,CAAC;4BACX,KAAK,EAAE,OAAO;4BACd,QAAQ,EAAE,IAAI;4BACd,KAAK,iBAAG,kBAAkB,CAAC,OAAO,CAAC,GAAK,gBAAgB,OAAC;yBAC1D,CAAC,CAAC;qBACJ;;;iBACF;YACD,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE;SACrB,CAAC;KACH,CAAC;AACJ,CAAC,CAAC;AAEF,SAAgB,eAAe;IAC7B,OAAO,IAAA,cAAS,GAAgB,CAAC,MAAM,CAAC,UAAC,KAAK,IAAK,OAAA,aAAa,CAAC,KAAK,CAAC,EAApB,CAAoB,CAAC,CAAC;AAC3E,CAAC;AAFD,0CAEC;AAED,SAAgB,aAAa,CAAC,KAAiB;IAC7C,IAAM,WAAW,GAAG,IAAA,oBAAe,EAAC,KAAK,EAAE,sBAAsB,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAChF,OAAO,CAAC,CAAC,WAAW,CAAC;AACvB,CAAC;AAHD,sCAGC;AAED;;;;;;;GAOG;AACH,SAAgB,uBAAuB,CACrC,OAA6C,EAC7C,gBAA2B;IAE3B,OAAO,MAAM,CAAC,MAAM,CAClB,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,sBAAsB,CAAC,gBAAgB,CAAC,CAAC,EAC3D,IAAA,sBAAiB,EAAS,OAAO,CAAQ,CAC1C,CAAC;AACJ,CAAC;AARD,0DAQC;AAED;;;;;;GAMG;AACH,SAAgB,iBAAiB,CAAyB,IAIzD;IACC,IAAI,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE;QAClC,OAAO,IAAI,CAAC;KACb;IAED,kBAAS,OAAO,iBAAG,OAAO,GAAK,IAAI,CAAC,OAAO,SAAG,IAAI,EAAE,IAAI,CAAC,IAAI,IAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAG;AAC5G,CAAC;AAVD,8CAUC"}
|
package/dist/src/UserRepo.d.ts
CHANGED
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
import { AuthenticatedUser, AuthenticatedUserRepo } from '@proteinjs/user-auth';
|
|
2
2
|
import { User } from './tables/UserTable';
|
|
3
|
+
export type UserChangedListener = (user: User) => void;
|
|
3
4
|
export declare class UserRepo implements AuthenticatedUserRepo {
|
|
5
|
+
private static userChangedListeners;
|
|
6
|
+
/**
|
|
7
|
+
* Subscribe to user-record changes (every `setUser`, i.e. every session-cache refresh after a
|
|
8
|
+
* user-info mutation). Lets UI surfaces (avatar chips, account header) re-render without a
|
|
9
|
+
* reload. Returns an unsubscribe function.
|
|
10
|
+
*/
|
|
11
|
+
static onUserChanged(listener: UserChangedListener): () => void;
|
|
4
12
|
getUser(): Omit<User, 'roles'> & AuthenticatedUser;
|
|
5
13
|
setUser(user: User): void;
|
|
6
14
|
}
|
|
@@ -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;IAQlD,OAAO,CAAC,IAAI,EAAE,IAAI;
|
|
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,MAAM,MAAM,mBAAmB,GAAG,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;AAEvD,qBAAa,QAAS,YAAW,qBAAqB;IACpD,OAAO,CAAC,MAAM,CAAC,oBAAoB,CAAkC;IAErE;;;;OAIG;IACH,MAAM,CAAC,aAAa,CAAC,QAAQ,EAAE,mBAAmB,GAAG,MAAM,IAAI;IAO/D,OAAO,IAAI,IAAI,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,iBAAiB;IAQlD,OAAO,CAAC,IAAI,EAAE,IAAI;CAYnB"}
|
package/dist/src/UserRepo.js
CHANGED
|
@@ -6,6 +6,17 @@ var cacheKeys_1 = require("./cacheKeys");
|
|
|
6
6
|
var UserRepo = /** @class */ (function () {
|
|
7
7
|
function UserRepo() {
|
|
8
8
|
}
|
|
9
|
+
/**
|
|
10
|
+
* Subscribe to user-record changes (every `setUser`, i.e. every session-cache refresh after a
|
|
11
|
+
* user-info mutation). Lets UI surfaces (avatar chips, account header) re-render without a
|
|
12
|
+
* reload. Returns an unsubscribe function.
|
|
13
|
+
*/
|
|
14
|
+
UserRepo.onUserChanged = function (listener) {
|
|
15
|
+
UserRepo.userChangedListeners.add(listener);
|
|
16
|
+
return function () {
|
|
17
|
+
UserRepo.userChangedListeners.delete(listener);
|
|
18
|
+
};
|
|
19
|
+
};
|
|
9
20
|
UserRepo.prototype.getUser = function () {
|
|
10
21
|
var _a;
|
|
11
22
|
var user = Object.assign({}, server_api_1.Session.getDataByKey(cacheKeys_1.USER_SESSION_CACHE_KEY));
|
|
@@ -16,7 +27,18 @@ var UserRepo = /** @class */ (function () {
|
|
|
16
27
|
};
|
|
17
28
|
UserRepo.prototype.setUser = function (user) {
|
|
18
29
|
server_api_1.Session.setDataByKey(cacheKeys_1.USER_SESSION_CACHE_KEY, user);
|
|
30
|
+
UserRepo.userChangedListeners.forEach(function (listener) {
|
|
31
|
+
// Standard emitter isolation: one subscriber throwing must not break the mutation path
|
|
32
|
+
// (or starve the remaining subscribers).
|
|
33
|
+
try {
|
|
34
|
+
listener(user);
|
|
35
|
+
}
|
|
36
|
+
catch (error) {
|
|
37
|
+
console.error('UserRepo userChanged listener threw', error);
|
|
38
|
+
}
|
|
39
|
+
});
|
|
19
40
|
};
|
|
41
|
+
UserRepo.userChangedListeners = new Set();
|
|
20
42
|
return UserRepo;
|
|
21
43
|
}());
|
|
22
44
|
exports.UserRepo = UserRepo;
|
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;
|
|
1
|
+
{"version":3,"file":"UserRepo.js","sourceRoot":"","sources":["../../src/UserRepo.ts"],"names":[],"mappings":";;;AAAA,oDAAgD;AAGhD,yCAAqD;AAIrD;IAAA;IAmCA,CAAC;IAhCC;;;;OAIG;IACI,sBAAa,GAApB,UAAqB,QAA6B;QAChD,QAAQ,CAAC,oBAAoB,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QAC5C,OAAO;YACL,QAAQ,CAAC,oBAAoB,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;QACjD,CAAC,CAAC;IACJ,CAAC;IAED,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;QACnD,QAAQ,CAAC,oBAAoB,CAAC,OAAO,CAAC,UAAC,QAAQ;YAC7C,uFAAuF;YACvF,yCAAyC;YACzC,IAAI;gBACF,QAAQ,CAAC,IAAI,CAAC,CAAC;aAChB;YAAC,OAAO,KAAK,EAAE;gBACd,OAAO,CAAC,KAAK,CAAC,qCAAqC,EAAE,KAAK,CAAC,CAAC;aAC7D;QACH,CAAC,CAAC,CAAC;IACL,CAAC;IAjCc,6BAAoB,GAAG,IAAI,GAAG,EAAuB,CAAC;IAkCvE,eAAC;CAAA,AAnCD,IAmCC;AAnCY,4BAAQ"}
|
package/dist/src/routes.d.ts
CHANGED
|
@@ -4,6 +4,17 @@ export declare const routes: {
|
|
|
4
4
|
method: 'get' | 'post' | 'put' | 'patch' | 'delete';
|
|
5
5
|
};
|
|
6
6
|
};
|
|
7
|
+
/**
|
|
8
|
+
* Avatar-photo URL contract (server route: user-server src/routes/avatar.ts): the path is stable
|
|
9
|
+
* per user, so responses are cached hard (max-age=86400, immutable) and the `v` query param busts
|
|
10
|
+
* the cache — pass the user's current `avatarFileId`, which changes on every photo update. Users
|
|
11
|
+
* with an emoji avatar or no avatar answer 404 (clients render emoji/initials from the user
|
|
12
|
+
* record; the route serves photos only).
|
|
13
|
+
*/
|
|
14
|
+
export declare const avatarRoute: {
|
|
15
|
+
path: (userId: string, avatarFileId: string) => string;
|
|
16
|
+
method: "get";
|
|
17
|
+
};
|
|
7
18
|
export declare const uiRoutes: {
|
|
8
19
|
auth: {
|
|
9
20
|
login: string;
|
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;CAM3G,CAAC;AAEF,eAAO,MAAM,QAAQ;;;;;;;CAOpB,CAAC"}
|
|
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;;;;;;GAMG;AACH,eAAO,MAAM,WAAW;mBACP,MAAM,gBAAgB,MAAM;;CAG5C,CAAC;AAEF,eAAO,MAAM,QAAQ;;;;;;;CAOpB,CAAC"}
|
package/dist/src/routes.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.uiRoutes = exports.routes = void 0;
|
|
3
|
+
exports.uiRoutes = exports.avatarRoute = exports.routes = void 0;
|
|
4
4
|
exports.routes = {
|
|
5
5
|
login: { path: '/user/login', method: 'post' },
|
|
6
6
|
initiatePasswordReset: { path: '/user/initiate-password-reset', method: 'post' },
|
|
@@ -8,6 +8,19 @@ exports.routes = {
|
|
|
8
8
|
validateResetToken: { path: '/user/validate-reset-token', method: 'get' },
|
|
9
9
|
logout: { path: '/user/logout', method: 'get' },
|
|
10
10
|
};
|
|
11
|
+
/**
|
|
12
|
+
* Avatar-photo URL contract (server route: user-server src/routes/avatar.ts): the path is stable
|
|
13
|
+
* per user, so responses are cached hard (max-age=86400, immutable) and the `v` query param busts
|
|
14
|
+
* the cache — pass the user's current `avatarFileId`, which changes on every photo update. Users
|
|
15
|
+
* with an emoji avatar or no avatar answer 404 (clients render emoji/initials from the user
|
|
16
|
+
* record; the route serves photos only).
|
|
17
|
+
*/
|
|
18
|
+
exports.avatarRoute = {
|
|
19
|
+
path: function (userId, avatarFileId) {
|
|
20
|
+
return "/avatar/".concat(encodeURIComponent(userId), "?v=").concat(encodeURIComponent(avatarFileId));
|
|
21
|
+
},
|
|
22
|
+
method: 'get',
|
|
23
|
+
};
|
|
11
24
|
exports.uiRoutes = {
|
|
12
25
|
auth: {
|
|
13
26
|
login: 'login',
|
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,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;CACF,CAAC"}
|
|
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;AAEF;;;;;;GAMG;AACU,QAAA,WAAW,GAAG;IACzB,IAAI,EAAE,UAAC,MAAc,EAAE,YAAoB;QACzC,OAAA,kBAAW,kBAAkB,CAAC,MAAM,CAAC,gBAAM,kBAAkB,CAAC,YAAY,CAAC,CAAE;IAA7E,CAA6E;IAC/E,MAAM,EAAE,KAAc;CACvB,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;CACF,CAAC"}
|
|
@@ -1,11 +1,26 @@
|
|
|
1
1
|
import { Service } from '@proteinjs/service';
|
|
2
|
+
import { User } from '../tables/UserTable';
|
|
2
3
|
export declare const getUpdateUserInfoService: () => UpdateUserInfoService;
|
|
4
|
+
/** What user-info mutations return: the updated user record, never the password hash. */
|
|
5
|
+
export type UpdatedUser = Omit<User, 'password'>;
|
|
3
6
|
export interface UpdatePasswordResponse {
|
|
4
7
|
updated: boolean;
|
|
5
8
|
error?: string;
|
|
6
9
|
}
|
|
7
10
|
export interface UpdateUserInfoService extends Service {
|
|
8
|
-
updateName(name: string): Promise<
|
|
11
|
+
updateName(name: string): Promise<UpdatedUser>;
|
|
9
12
|
updatePassword(currentPassword: string, newPassword: string): Promise<UpdatePasswordResponse>;
|
|
13
|
+
/**
|
|
14
|
+
* Set a photo avatar: the image is re-encoded server-side to a 512x512 JPEG (EXIF stripped),
|
|
15
|
+
* stored via FileStorage, and any previous avatar photo is deleted. Nulls `avatarEmoji`
|
|
16
|
+
* (avatars are photo OR emoji, exactly one active).
|
|
17
|
+
* @param fileData base64-encoded image bytes (max 10MB decoded)
|
|
18
|
+
* @param mimeType one of image/jpeg, image/png, image/webp, image/heic, image/heif
|
|
19
|
+
*/
|
|
20
|
+
updateAvatarPhoto(fileData: string, mimeType: string): Promise<UpdatedUser>;
|
|
21
|
+
/** Set an emoji avatar. Nulls `avatarFileId` and deletes any previous avatar photo file. */
|
|
22
|
+
updateAvatarEmoji(emoji: string): Promise<UpdatedUser>;
|
|
23
|
+
/** Remove the avatar entirely (both representations; deletes any stored photo file). */
|
|
24
|
+
clearAvatar(): Promise<UpdatedUser>;
|
|
10
25
|
}
|
|
11
26
|
//# sourceMappingURL=UpdateUserInfoService.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UpdateUserInfoService.d.ts","sourceRoot":"","sources":["../../../src/services/UpdateUserInfoService.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAkB,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"UpdateUserInfoService.d.ts","sourceRoot":"","sources":["../../../src/services/UpdateUserInfoService.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAkB,MAAM,oBAAoB,CAAC;AAC7D,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAE3C,eAAO,MAAM,wBAAwB,6BAAiF,CAAC;AAEvH,yFAAyF;AACzF,MAAM,MAAM,WAAW,GAAG,IAAI,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;AAEjD,MAAM,WAAW,sBAAsB;IACrC,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,qBAAsB,SAAQ,OAAO;IACpD,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;IAC/C,cAAc,CAAC,eAAe,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,sBAAsB,CAAC,CAAC;IAC9F;;;;;;OAMG;IACH,iBAAiB,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;IAC5E,4FAA4F;IAC5F,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;IACvD,wFAAwF;IACxF,WAAW,IAAI,OAAO,CAAC,WAAW,CAAC,CAAC;CACrC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UpdateUserInfoService.js","sourceRoot":"","sources":["../../../src/services/UpdateUserInfoService.ts"],"names":[],"mappings":";;;AAAA,8CAA6D;
|
|
1
|
+
{"version":3,"file":"UpdateUserInfoService.js","sourceRoot":"","sources":["../../../src/services/UpdateUserInfoService.ts"],"names":[],"mappings":";;;AAAA,8CAA6D;AAGhD,QAAA,wBAAwB,GAAG,IAAA,wBAAc,EAAwB,uCAAuC,CAAC,CAAC"}
|
|
@@ -10,6 +10,16 @@ export type User = Record & {
|
|
|
10
10
|
/** Role names from the roles catalog (see `RolesCatalog`). Written ONLY by the Roles service. */
|
|
11
11
|
roles: string[];
|
|
12
12
|
invitedBy?: string | null;
|
|
13
|
+
/**
|
|
14
|
+
* Emoji avatar. At most one of `avatarEmoji`/`avatarFileId` is set — the avatar mutations in
|
|
15
|
+
* UpdateUserInfo enforce it (every mutation assigns BOTH columns); nothing else writes these.
|
|
16
|
+
*/
|
|
17
|
+
avatarEmoji?: string | null;
|
|
18
|
+
/**
|
|
19
|
+
* File id of the stored avatar photo (512x512 JPEG). A plain string, NOT a ReferenceColumn:
|
|
20
|
+
* @proteinjs/db-file depends on @proteinjs/user, so a user→file reference would be circular.
|
|
21
|
+
*/
|
|
22
|
+
avatarFileId?: string | null;
|
|
13
23
|
};
|
|
14
24
|
export declare class UserTable extends Table<User> {
|
|
15
25
|
name: string;
|
|
@@ -35,6 +45,8 @@ export declare class UserTable extends Table<User> {
|
|
|
35
45
|
passwordResetTokenExpiration: import("@proteinjs/db").Column<Moment | null | undefined, any>;
|
|
36
46
|
emailVerified: import("@proteinjs/db").Column<boolean, any>;
|
|
37
47
|
invitedBy: import("@proteinjs/db").Column<string | null | undefined, any>;
|
|
48
|
+
avatarEmoji: import("@proteinjs/db").Column<string | null | undefined, any>;
|
|
49
|
+
avatarFileId: import("@proteinjs/db").Column<string | null | undefined, any>;
|
|
38
50
|
} & {};
|
|
39
51
|
}
|
|
40
52
|
//# sourceMappingURL=UserTable.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UserTable.d.ts","sourceRoot":"","sources":["../../../src/tables/UserTable.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,EACL,MAAM,EAGP,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAGhC,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,iGAAiG;IACjG,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"UserTable.d.ts","sourceRoot":"","sources":["../../../src/tables/UserTable.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,EACL,MAAM,EAGP,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAGhC,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,iGAAiG;IACjG,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC9B,CAAC;AAEF,qBAAa,SAAU,SAAQ,KAAK,CAAC,IAAI,CAAC;IACxC,IAAI,SAAU;IACd;;;;;;;OAOG;IACH,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAcvB;IACF,OAAO;;;;;;;;;;;;;;;WAgBJ;CACJ"}
|
|
@@ -60,6 +60,8 @@ var UserTable = /** @class */ (function (_super) {
|
|
|
60
60
|
*/
|
|
61
61
|
roles: new db_1.ArrayColumn('role_list'),
|
|
62
62
|
invitedBy: new db_1.StringColumn('invited_by'),
|
|
63
|
+
avatarEmoji: new db_1.StringColumn('avatar_emoji'),
|
|
64
|
+
avatarFileId: new db_1.StringColumn('avatar_file_id'),
|
|
63
65
|
});
|
|
64
66
|
return _this;
|
|
65
67
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UserTable.js","sourceRoot":"","sources":["../../../src/tables/UserTable.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,oCASuB;AAEvB,8CAAkD;
|
|
1
|
+
{"version":3,"file":"UserTable.js","sourceRoot":"","sources":["../../../src/tables/UserTable.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,oCASuB;AAEvB,8CAAkD;AAwBlD;IAA+B,6BAAW;IAA1C;QAAA,qEA0CC;QAzCC,UAAI,GAAG,MAAM,CAAC;QACd;;;;;;;WAOG;QACH,UAAI,GAAwB;YAC1B,EAAE,EAAE;gBACF,KAAK,EAAE,EAAE,UAAU,EAAE,8BAAgB,CAAC,KAAK,EAAE;gBAC7C,MAAM,EAAE,EAAE,UAAU,EAAE,8BAAgB,CAAC,KAAK,EAAE;gBAC9C,MAAM,EAAE,EAAE,UAAU,EAAE,8BAAgB,CAAC,KAAK,EAAE;gBAC9C,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;gBAC9C,MAAM,EAAE,EAAE,UAAU,EAAE,8BAAgB,CAAC,KAAK,EAAE;gBAC9C,MAAM,EAAE,EAAE,UAAU,EAAE,8BAAgB,CAAC,KAAK,EAAE;aAC/C;YACD,uBAAuB,EAAE,CAAC,OAAO,CAAC;SACnC,CAAC;QACF,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;;;;eAIG;YACH,KAAK,EAAE,IAAI,gBAAW,CAAS,WAAW,CAAC;YAC3C,SAAS,EAAE,IAAI,iBAAY,CAAC,YAAY,CAAC;YACzC,WAAW,EAAE,IAAI,iBAAY,CAAC,cAAc,CAAC;YAC7C,YAAY,EAAE,IAAI,iBAAY,CAAC,gBAAgB,CAAC;SACjD,CAAC,CAAC;;IACL,CAAC;IAAD,gBAAC;AAAD,CAAC,AA1CD,CAA+B,UAAK,GA0CnC;AA1CY,8BAAS"}
|
package/generated/index.ts
CHANGED
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
/** Load Dependency Source Graphs */
|
|
2
2
|
|
|
3
3
|
import '@proteinjs/db';
|
|
4
|
-
import '@proteinjs/reflection';
|
|
5
4
|
import '@proteinjs/server-api';
|
|
6
5
|
import '@proteinjs/service';
|
|
7
6
|
import '@proteinjs/user-auth';
|
|
8
|
-
import 'moment';
|
|
9
7
|
|
|
10
8
|
/** Generate Source Graph */
|
|
11
9
|
|
|
12
10
|
const sourceGraph =
|
|
13
|
-
'{"options":{"directed":true,"multigraph":false,"compound":false},"nodes":[{"v":"@proteinjs/user/RoleCatalogEntry","value":{"packageName":"@proteinjs/user","name":"RoleCatalogEntry","filePath":"/home/runner/work/user/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":"/home/runner/work/user/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":"/home/runner/work/user/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":"/home/runner/work/user/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":"/home/runner/work/user/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":"/home/runner/work/user/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":"/home/runner/work/user/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":"/home/runner/work/user/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":"/home/runner/work/user/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":"/home/runner/work/user/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":"/home/runner/work/user/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":"/home/runner/work/user/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":"/home/runner/work/user/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":"/home/runner/work/user/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":"/home/runner/work/user/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":"/home/runner/work/user/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":"/home/runner/work/user/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":"/home/runner/work/user/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":"/home/runner/work/user/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":"/home/runner/work/user/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":"/home/runner/work/user/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"}]}';
|
|
11
|
+
'{"options":{"directed":true,"multigraph":false,"compound":false},"nodes":[{"v":"@proteinjs/user/RoleCatalogEntry","value":{"packageName":"@proteinjs/user","name":"RoleCatalogEntry","filePath":"/home/runner/work/user/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":"/home/runner/work/user/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":"/home/runner/work/user/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":"/home/runner/work/user/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":"/(user: User) => void"},{"v":"@proteinjs/user/UserRepo","value":{"packageName":"@proteinjs/user","name":"UserRepo","filePath":"/home/runner/work/user/user/packages/user/src/UserRepo.ts","qualifiedName":"@proteinjs/user/UserRepo","isAbstract":false,"isStatic":false,"visibility":"public","properties":[{"name":"userChangedListeners","type":null,"isOptional":false,"isAbstract":false,"isStatic":true,"visibility":"private"}],"methods":[{"name":"onUserChanged","returnType":{"packageName":"","name":"() => void","filePath":null,"qualifiedName":"/() => void","typeParameters":null,"directParents":null},"isAsync":false,"isOptional":false,"isAbstract":false,"isStatic":true,"visibility":"public","parameters":[{"name":"listener","type":{"packageName":"@proteinjs/user","name":"UserChangedListener","filePath":null,"qualifiedName":"@proteinjs/user/UserChangedListener","typeParameters":null,"directParents":null}}]},{"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":"/home/runner/work/user/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":"/home/runner/work/user/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":"/home/runner/work/user/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":"/Omit"},{"v":"@proteinjs/user/UpdateUserInfoService","value":{"packageName":"@proteinjs/user","name":"UpdateUserInfoService","filePath":"/home/runner/work/user/user/packages/user/src/services/UpdateUserInfoService.ts","qualifiedName":"@proteinjs/user/UpdateUserInfoService","properties":[],"methods":[{"name":"updateName","returnType":{"packageName":"","name":"Promise<UpdatedUser>","filePath":null,"qualifiedName":"/Promise<UpdatedUser>","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}}]},{"name":"updateAvatarPhoto","returnType":{"packageName":"","name":"Promise<UpdatedUser>","filePath":null,"qualifiedName":"/Promise<UpdatedUser>","typeParameters":null,"directParents":null},"isAsync":false,"isOptional":false,"isAbstract":true,"isStatic":false,"visibility":"public","parameters":[{"name":"fileData","type":{"packageName":"","name":"string","filePath":null,"qualifiedName":"/string","typeParameters":null,"directParents":null}},{"name":"mimeType","type":{"packageName":"","name":"string","filePath":null,"qualifiedName":"/string","typeParameters":null,"directParents":null}}]},{"name":"updateAvatarEmoji","returnType":{"packageName":"","name":"Promise<UpdatedUser>","filePath":null,"qualifiedName":"/Promise<UpdatedUser>","typeParameters":null,"directParents":null},"isAsync":false,"isOptional":false,"isAbstract":true,"isStatic":false,"visibility":"public","parameters":[{"name":"emoji","type":{"packageName":"","name":"string","filePath":null,"qualifiedName":"/string","typeParameters":null,"directParents":null}}]},{"name":"clearAvatar","returnType":{"packageName":"","name":"Promise<UpdatedUser>","filePath":null,"qualifiedName":"/Promise<UpdatedUser>","typeParameters":null,"directParents":null},"isAsync":false,"isOptional":false,"isAbstract":true,"isStatic":false,"visibility":"public","parameters":[]}],"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":"/home/runner/work/user/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":"/home/runner/work/user/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":"/home/runner/work/user/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":"/home/runner/work/user/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":"/home/runner/work/user/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":"/home/runner/work/user/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":"/home/runner/work/user/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":"/home/runner/work/user/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":"/home/runner/work/user/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":"/home/runner/work/user/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":"/home/runner/work/user/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 /**\\n * Emoji avatar. At most one of `avatarEmoji`/`avatarFileId` is set \\u2014 the avatar mutations in\\n * UpdateUserInfo enforce it (every mutation assigns BOTH columns); nothing else writes these.\\n */\\n avatarEmoji?: string | null;\\n /**\\n * File id of the stored avatar photo (512x512 JPEG). A plain string, NOT a ReferenceColumn:\\n * @proteinjs/db-file depends on @proteinjs/user, so a user\\u2192file reference would be circular.\\n */\\n avatarFileId?: 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 /**\\n * Emoji avatar. At most one of `avatarEmoji`/`avatarFileId` is set \\u2014 the avatar mutations in\\n * UpdateUserInfo enforce it (every mutation assigns BOTH columns); nothing else writes these.\\n */\\n avatarEmoji?: string | null;\\n /**\\n * File id of the stored avatar photo (512x512 JPEG). A plain string, NOT a ReferenceColumn:\\n * @proteinjs/db-file depends on @proteinjs/user, so a user\\u2192file reference would be circular.\\n */\\n avatarFileId?: string | null;\\n}","typeParameters":[],"directParents":null}],"sourceType":1}},{"v":"@proteinjs/user/UserTable","value":{"packageName":"@proteinjs/user","name":"UserTable","filePath":"/home/runner/work/user/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"}]}';
|
|
14
12
|
|
|
15
13
|
/** Generate Source Links */
|
|
16
14
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@proteinjs/user",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.8.0",
|
|
4
4
|
"description": "User management",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -45,5 +45,5 @@
|
|
|
45
45
|
},
|
|
46
46
|
"main": "./dist/generated/index.js",
|
|
47
47
|
"types": "./dist/generated/index.d.ts",
|
|
48
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "ca5406c5d08120454950abcb42a54bf77531b3e0"
|
|
49
49
|
}
|
package/src/ScopedRecord.ts
CHANGED
|
@@ -95,16 +95,18 @@ export function withScopedRecordColumns<T extends ScopedRecord>(
|
|
|
95
95
|
/**
|
|
96
96
|
* Adds the `scope` column as the first column to the provided index.
|
|
97
97
|
*
|
|
98
|
-
* @param args Index to create
|
|
98
|
+
* @param args Index to create (`unique: true` for a scoped UNIQUE index — name it with a
|
|
99
|
+
* `_unique` suffix, matching schema-metadata classification)
|
|
99
100
|
* @returns Index with `scope` column added first
|
|
100
101
|
*/
|
|
101
102
|
export function createScopedIndex<T extends ScopedRecord>(args: {
|
|
102
103
|
columns: (keyof T)[];
|
|
103
104
|
name?: string;
|
|
104
|
-
|
|
105
|
+
unique?: boolean;
|
|
106
|
+
}): { columns: (keyof T)[]; name?: string; unique?: boolean } {
|
|
105
107
|
if (args.columns.includes('scope')) {
|
|
106
108
|
return args;
|
|
107
109
|
}
|
|
108
110
|
|
|
109
|
-
return { columns: ['scope', ...args.columns], name: args.name };
|
|
111
|
+
return { columns: ['scope', ...args.columns], name: args.name, ...(args.unique ? { unique: true } : {}) };
|
|
110
112
|
}
|
package/src/UserRepo.ts
CHANGED
|
@@ -3,7 +3,23 @@ import { AuthenticatedUser, AuthenticatedUserRepo } from '@proteinjs/user-auth';
|
|
|
3
3
|
import { User } from './tables/UserTable';
|
|
4
4
|
import { USER_SESSION_CACHE_KEY } from './cacheKeys';
|
|
5
5
|
|
|
6
|
+
export type UserChangedListener = (user: User) => void;
|
|
7
|
+
|
|
6
8
|
export class UserRepo implements AuthenticatedUserRepo {
|
|
9
|
+
private static userChangedListeners = new Set<UserChangedListener>();
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Subscribe to user-record changes (every `setUser`, i.e. every session-cache refresh after a
|
|
13
|
+
* user-info mutation). Lets UI surfaces (avatar chips, account header) re-render without a
|
|
14
|
+
* reload. Returns an unsubscribe function.
|
|
15
|
+
*/
|
|
16
|
+
static onUserChanged(listener: UserChangedListener): () => void {
|
|
17
|
+
UserRepo.userChangedListeners.add(listener);
|
|
18
|
+
return () => {
|
|
19
|
+
UserRepo.userChangedListeners.delete(listener);
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
|
|
7
23
|
getUser(): Omit<User, 'roles'> & AuthenticatedUser {
|
|
8
24
|
const user = Object.assign({}, Session.getDataByKey<User>(USER_SESSION_CACHE_KEY));
|
|
9
25
|
// Roles are stored typed (`role_list`); rows that predate the roles backfill migration read
|
|
@@ -14,5 +30,14 @@ export class UserRepo implements AuthenticatedUserRepo {
|
|
|
14
30
|
|
|
15
31
|
setUser(user: User) {
|
|
16
32
|
Session.setDataByKey(USER_SESSION_CACHE_KEY, user);
|
|
33
|
+
UserRepo.userChangedListeners.forEach((listener) => {
|
|
34
|
+
// Standard emitter isolation: one subscriber throwing must not break the mutation path
|
|
35
|
+
// (or starve the remaining subscribers).
|
|
36
|
+
try {
|
|
37
|
+
listener(user);
|
|
38
|
+
} catch (error) {
|
|
39
|
+
console.error('UserRepo userChanged listener threw', error);
|
|
40
|
+
}
|
|
41
|
+
});
|
|
17
42
|
}
|
|
18
43
|
}
|
package/src/routes.ts
CHANGED
|
@@ -6,6 +6,19 @@ export const routes: { [name: string]: { path: string; method: 'get' | 'post' |
|
|
|
6
6
|
logout: { path: '/user/logout', method: 'get' },
|
|
7
7
|
};
|
|
8
8
|
|
|
9
|
+
/**
|
|
10
|
+
* Avatar-photo URL contract (server route: user-server src/routes/avatar.ts): the path is stable
|
|
11
|
+
* per user, so responses are cached hard (max-age=86400, immutable) and the `v` query param busts
|
|
12
|
+
* the cache — pass the user's current `avatarFileId`, which changes on every photo update. Users
|
|
13
|
+
* with an emoji avatar or no avatar answer 404 (clients render emoji/initials from the user
|
|
14
|
+
* record; the route serves photos only).
|
|
15
|
+
*/
|
|
16
|
+
export const avatarRoute = {
|
|
17
|
+
path: (userId: string, avatarFileId: string) =>
|
|
18
|
+
`/avatar/${encodeURIComponent(userId)}?v=${encodeURIComponent(avatarFileId)}`,
|
|
19
|
+
method: 'get' as const,
|
|
20
|
+
};
|
|
21
|
+
|
|
9
22
|
export const uiRoutes = {
|
|
10
23
|
auth: {
|
|
11
24
|
login: 'login',
|
|
@@ -1,13 +1,29 @@
|
|
|
1
1
|
import { Service, serviceFactory } from '@proteinjs/service';
|
|
2
|
+
import { User } from '../tables/UserTable';
|
|
2
3
|
|
|
3
4
|
export const getUpdateUserInfoService = serviceFactory<UpdateUserInfoService>('@proteinjs/user/UpdateUserInfoService');
|
|
4
5
|
|
|
6
|
+
/** What user-info mutations return: the updated user record, never the password hash. */
|
|
7
|
+
export type UpdatedUser = Omit<User, 'password'>;
|
|
8
|
+
|
|
5
9
|
export interface UpdatePasswordResponse {
|
|
6
10
|
updated: boolean;
|
|
7
11
|
error?: string;
|
|
8
12
|
}
|
|
9
13
|
|
|
10
14
|
export interface UpdateUserInfoService extends Service {
|
|
11
|
-
updateName(name: string): Promise<
|
|
15
|
+
updateName(name: string): Promise<UpdatedUser>;
|
|
12
16
|
updatePassword(currentPassword: string, newPassword: string): Promise<UpdatePasswordResponse>;
|
|
17
|
+
/**
|
|
18
|
+
* Set a photo avatar: the image is re-encoded server-side to a 512x512 JPEG (EXIF stripped),
|
|
19
|
+
* stored via FileStorage, and any previous avatar photo is deleted. Nulls `avatarEmoji`
|
|
20
|
+
* (avatars are photo OR emoji, exactly one active).
|
|
21
|
+
* @param fileData base64-encoded image bytes (max 10MB decoded)
|
|
22
|
+
* @param mimeType one of image/jpeg, image/png, image/webp, image/heic, image/heif
|
|
23
|
+
*/
|
|
24
|
+
updateAvatarPhoto(fileData: string, mimeType: string): Promise<UpdatedUser>;
|
|
25
|
+
/** Set an emoji avatar. Nulls `avatarFileId` and deletes any previous avatar photo file. */
|
|
26
|
+
updateAvatarEmoji(emoji: string): Promise<UpdatedUser>;
|
|
27
|
+
/** Remove the avatar entirely (both representations; deletes any stored photo file). */
|
|
28
|
+
clearAvatar(): Promise<UpdatedUser>;
|
|
13
29
|
}
|
package/src/tables/UserTable.ts
CHANGED
|
@@ -21,6 +21,16 @@ export type User = Record & {
|
|
|
21
21
|
/** Role names from the roles catalog (see `RolesCatalog`). Written ONLY by the Roles service. */
|
|
22
22
|
roles: string[];
|
|
23
23
|
invitedBy?: string | null;
|
|
24
|
+
/**
|
|
25
|
+
* Emoji avatar. At most one of `avatarEmoji`/`avatarFileId` is set — the avatar mutations in
|
|
26
|
+
* UpdateUserInfo enforce it (every mutation assigns BOTH columns); nothing else writes these.
|
|
27
|
+
*/
|
|
28
|
+
avatarEmoji?: string | null;
|
|
29
|
+
/**
|
|
30
|
+
* File id of the stored avatar photo (512x512 JPEG). A plain string, NOT a ReferenceColumn:
|
|
31
|
+
* @proteinjs/db-file depends on @proteinjs/user, so a user→file reference would be circular.
|
|
32
|
+
*/
|
|
33
|
+
avatarFileId?: string | null;
|
|
24
34
|
};
|
|
25
35
|
|
|
26
36
|
export class UserTable extends Table<User> {
|
|
@@ -62,5 +72,7 @@ export class UserTable extends Table<User> {
|
|
|
62
72
|
*/
|
|
63
73
|
roles: new ArrayColumn<string>('role_list'),
|
|
64
74
|
invitedBy: new StringColumn('invited_by'),
|
|
75
|
+
avatarEmoji: new StringColumn('avatar_emoji'),
|
|
76
|
+
avatarFileId: new StringColumn('avatar_file_id'),
|
|
65
77
|
});
|
|
66
78
|
}
|