@proteinjs/user 1.8.0 → 1.9.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 +14 -0
- package/dist/generated/index.d.ts.map +1 -1
- package/dist/generated/index.js +7 -1
- package/dist/generated/index.js.map +1 -1
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -1
- package/dist/src/MachineAccount.d.ts +47 -0
- package/dist/src/MachineAccount.d.ts.map +1 -0
- package/dist/src/MachineAccount.js +100 -0
- package/dist/src/MachineAccount.js.map +1 -0
- package/dist/src/ScopedRecord.d.ts +8 -0
- package/dist/src/ScopedRecord.d.ts.map +1 -1
- package/dist/src/ScopedRecord.js +5 -1
- package/dist/src/ScopedRecord.js.map +1 -1
- package/dist/src/services/AccountDeletionService.d.ts +27 -0
- package/dist/src/services/AccountDeletionService.d.ts.map +1 -0
- package/dist/src/services/AccountDeletionService.js +6 -0
- package/dist/src/services/AccountDeletionService.js.map +1 -0
- package/dist/src/services/MachineCredentialsService.d.ts +38 -0
- package/dist/src/services/MachineCredentialsService.d.ts.map +1 -0
- package/dist/src/services/MachineCredentialsService.js +6 -0
- package/dist/src/services/MachineCredentialsService.js.map +1 -0
- package/dist/src/services/SetUserStatusService.d.ts +15 -0
- package/dist/src/services/SetUserStatusService.d.ts.map +1 -0
- package/dist/src/services/SetUserStatusService.js +6 -0
- package/dist/src/services/SetUserStatusService.js.map +1 -0
- package/dist/src/tables/AccountDeletionTable.d.ts +85 -0
- package/dist/src/tables/AccountDeletionTable.d.ts.map +1 -0
- package/dist/src/tables/AccountDeletionTable.js +62 -0
- package/dist/src/tables/AccountDeletionTable.js.map +1 -0
- package/dist/src/tables/SessionTable.d.ts +1 -1
- package/dist/src/tables/UserStatusEventTable.d.ts +30 -0
- package/dist/src/tables/UserStatusEventTable.d.ts.map +1 -0
- package/dist/src/tables/UserStatusEventTable.js +43 -0
- package/dist/src/tables/UserStatusEventTable.js.map +1 -0
- package/dist/src/tables/UserTable.d.ts +36 -2
- package/dist/src/tables/UserTable.d.ts.map +1 -1
- package/dist/src/tables/UserTable.js +73 -4
- package/dist/src/tables/UserTable.js.map +1 -1
- package/dist/src/tables/tables.d.ts +4 -0
- package/dist/src/tables/tables.d.ts.map +1 -1
- package/dist/src/tables/tables.js +4 -0
- package/dist/src/tables/tables.js.map +1 -1
- package/dist/test/tablesAuth.test.js +20 -4
- package/dist/test/tablesAuth.test.js.map +1 -1
- package/generated/index.ts +7 -1
- package/index.ts +6 -0
- package/package.json +4 -4
- package/src/MachineAccount.ts +103 -0
- package/src/ScopedRecord.ts +11 -0
- package/src/services/AccountDeletionService.ts +28 -0
- package/src/services/MachineCredentialsService.ts +43 -0
- package/src/services/SetUserStatusService.ts +16 -0
- package/src/tables/AccountDeletionTable.ts +98 -0
- package/src/tables/UserStatusEventTable.ts +34 -0
- package/src/tables/UserTable.ts +57 -6
- package/src/tables/tables.ts +4 -0
- package/test/tablesAuth.test.ts +22 -4
|
@@ -2,15 +2,19 @@ import { AccessGrant } from './AccessGrantTable';
|
|
|
2
2
|
import { User } from './UserTable';
|
|
3
3
|
import { Session } from './SessionTable';
|
|
4
4
|
import { Table } from '@proteinjs/db';
|
|
5
|
+
import { AccountDeletion } from './AccountDeletionTable';
|
|
5
6
|
import { Invite } from './InviteTable';
|
|
6
7
|
import { AccessInvite } from './AccessInviteTable';
|
|
7
8
|
import { RoleGrantEvent } from './RoleGrantEventTable';
|
|
9
|
+
import { UserStatusEvent } from './UserStatusEventTable';
|
|
8
10
|
export declare const tables: {
|
|
9
11
|
AccessGrant: Table<AccessGrant>;
|
|
10
12
|
AccessInvite: Table<AccessInvite>;
|
|
13
|
+
AccountDeletion: Table<AccountDeletion>;
|
|
11
14
|
Invite: Table<Invite>;
|
|
12
15
|
RoleGrantEvent: Table<RoleGrantEvent>;
|
|
13
16
|
User: Table<User>;
|
|
17
|
+
UserStatusEvent: Table<UserStatusEvent>;
|
|
14
18
|
Session: Table<Session>;
|
|
15
19
|
};
|
|
16
20
|
//# sourceMappingURL=tables.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tables.d.ts","sourceRoot":"","sources":["../../../src/tables/tables.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAoB,MAAM,oBAAoB,CAAC;AACnE,OAAO,EAAa,IAAI,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAgB,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACvD,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACtC,OAAO,EAAE,MAAM,EAAe,MAAM,eAAe,CAAC;AACpD,OAAO,EAAE,YAAY,EAAqB,MAAM,qBAAqB,CAAC;AACtE,OAAO,EAAE,cAAc,EAAuB,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"tables.d.ts","sourceRoot":"","sources":["../../../src/tables/tables.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAoB,MAAM,oBAAoB,CAAC;AACnE,OAAO,EAAa,IAAI,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAgB,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACvD,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACtC,OAAO,EAAE,eAAe,EAAwB,MAAM,wBAAwB,CAAC;AAC/E,OAAO,EAAE,MAAM,EAAe,MAAM,eAAe,CAAC;AACpD,OAAO,EAAE,YAAY,EAAqB,MAAM,qBAAqB,CAAC;AACtE,OAAO,EAAE,cAAc,EAAuB,MAAM,uBAAuB,CAAC;AAC5E,OAAO,EAAE,eAAe,EAAwB,MAAM,wBAAwB,CAAC;AAE/E,eAAO,MAAM,MAAM;;;;;;;;;CASlB,CAAC"}
|
|
@@ -4,15 +4,19 @@ exports.tables = void 0;
|
|
|
4
4
|
var AccessGrantTable_1 = require("./AccessGrantTable");
|
|
5
5
|
var UserTable_1 = require("./UserTable");
|
|
6
6
|
var SessionTable_1 = require("./SessionTable");
|
|
7
|
+
var AccountDeletionTable_1 = require("./AccountDeletionTable");
|
|
7
8
|
var InviteTable_1 = require("./InviteTable");
|
|
8
9
|
var AccessInviteTable_1 = require("./AccessInviteTable");
|
|
9
10
|
var RoleGrantEventTable_1 = require("./RoleGrantEventTable");
|
|
11
|
+
var UserStatusEventTable_1 = require("./UserStatusEventTable");
|
|
10
12
|
exports.tables = {
|
|
11
13
|
AccessGrant: new AccessGrantTable_1.AccessGrantTable(),
|
|
12
14
|
AccessInvite: new AccessInviteTable_1.AccessInviteTable(),
|
|
15
|
+
AccountDeletion: new AccountDeletionTable_1.AccountDeletionTable(),
|
|
13
16
|
Invite: new InviteTable_1.InviteTable(),
|
|
14
17
|
RoleGrantEvent: new RoleGrantEventTable_1.RoleGrantEventTable(),
|
|
15
18
|
User: new UserTable_1.UserTable(),
|
|
19
|
+
UserStatusEvent: new UserStatusEventTable_1.UserStatusEventTable(),
|
|
16
20
|
Session: new SessionTable_1.SessionTable(),
|
|
17
21
|
};
|
|
18
22
|
//# sourceMappingURL=tables.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tables.js","sourceRoot":"","sources":["../../../src/tables/tables.ts"],"names":[],"mappings":";;;AAAA,uDAAmE;AACnE,yCAA8C;AAC9C,+CAAuD;AAEvD,6CAAoD;AACpD,yDAAsE;AACtE,6DAA4E;
|
|
1
|
+
{"version":3,"file":"tables.js","sourceRoot":"","sources":["../../../src/tables/tables.ts"],"names":[],"mappings":";;;AAAA,uDAAmE;AACnE,yCAA8C;AAC9C,+CAAuD;AAEvD,+DAA+E;AAC/E,6CAAoD;AACpD,yDAAsE;AACtE,6DAA4E;AAC5E,+DAA+E;AAElE,QAAA,MAAM,GAAG;IACpB,WAAW,EAAE,IAAI,mCAAgB,EAAwB;IACzD,YAAY,EAAE,IAAI,qCAAiB,EAAyB;IAC5D,eAAe,EAAE,IAAI,2CAAoB,EAA4B;IACrE,MAAM,EAAE,IAAI,yBAAW,EAAmB;IAC1C,cAAc,EAAE,IAAI,yCAAmB,EAA2B;IAClE,IAAI,EAAE,IAAI,qBAAS,EAAiB;IACpC,eAAe,EAAE,IAAI,2CAAoB,EAA4B;IACrE,OAAO,EAAE,IAAI,2BAAY,EAAoB;CAC9C,CAAC"}
|
|
@@ -5,10 +5,13 @@ var permissions_1 = require("../src/permissions");
|
|
|
5
5
|
/**
|
|
6
6
|
* The users/roles split lives in these table schemas — invariants worth pinning so a drive-by
|
|
7
7
|
* edit cannot silently reopen a door:
|
|
8
|
-
* - user: 'users' permission covers viewing/managing records, EXCEPT roles
|
|
9
|
-
* service-protected (single write
|
|
8
|
+
* - user: 'users' permission covers viewing/managing records, EXCEPT roles and status — those
|
|
9
|
+
* columns are service-protected (single write paths: the Roles and SetUserStatus services),
|
|
10
|
+
* and the deletion-machinery datetimes are written only by the server-side deletion flow.
|
|
10
11
|
* - role_grant_event: the audit trail is readable by 'roles' holders and has NO generic write
|
|
11
12
|
* door — an explicit auth block with no write grants is a lock, not an admin default.
|
|
13
|
+
* - user_status_event: the standing audit trail is admin-read (the same scope as the
|
|
14
|
+
* SetUserStatus service that writes it) with NO generic write door.
|
|
12
15
|
* - session: 'sessions' holders read (a different trust than 'users' — rows carry auth
|
|
13
16
|
* material); writes are system-written, so there is NO generic write door.
|
|
14
17
|
* - invite: 'users' holders read and delete; creating rides SignupService only.
|
|
@@ -32,9 +35,15 @@ describe('user table auth shape', function () {
|
|
|
32
35
|
delete: { permission: permissions_1.USER_PERMISSIONS.users },
|
|
33
36
|
});
|
|
34
37
|
});
|
|
35
|
-
it(
|
|
38
|
+
it("service-protects roles and status (single write paths: the Roles and SetUserStatus\n services), the deletion-machinery datetimes (written only by the server-side\n deletion flow), and machine-account ownership (written only by the boot sync)", function () {
|
|
36
39
|
var _a;
|
|
37
|
-
expect((_a = tables_1.tables.User.auth) === null || _a === void 0 ? void 0 : _a.serviceProtectedColumns).toEqual([
|
|
40
|
+
expect((_a = tables_1.tables.User.auth) === null || _a === void 0 ? void 0 : _a.serviceProtectedColumns).toEqual([
|
|
41
|
+
'roles',
|
|
42
|
+
'status',
|
|
43
|
+
'deleteRequestedAt',
|
|
44
|
+
'purgeAfter',
|
|
45
|
+
'isLoadedFromSource',
|
|
46
|
+
]);
|
|
38
47
|
});
|
|
39
48
|
});
|
|
40
49
|
describe('role_grant_event table auth shape', function () {
|
|
@@ -44,6 +53,13 @@ describe('role_grant_event table auth shape', function () {
|
|
|
44
53
|
expect((_b = tables_1.tables.RoleGrantEvent.auth) === null || _b === void 0 ? void 0 : _b.service).toEqual({ query: { permission: permissions_1.USER_PERMISSIONS.roles } });
|
|
45
54
|
});
|
|
46
55
|
});
|
|
56
|
+
describe('user_status_event table auth shape', function () {
|
|
57
|
+
it('is admin-read only and has no generic write door', function () {
|
|
58
|
+
var _a, _b;
|
|
59
|
+
expect((_a = tables_1.tables.UserStatusEvent.auth) === null || _a === void 0 ? void 0 : _a.db).toEqual({ query: ['admin'] });
|
|
60
|
+
expect((_b = tables_1.tables.UserStatusEvent.auth) === null || _b === void 0 ? void 0 : _b.service).toEqual({ query: ['admin'] });
|
|
61
|
+
});
|
|
62
|
+
});
|
|
47
63
|
describe('session table auth shape', function () {
|
|
48
64
|
it('is readable by sessions holders and has no generic write door (writes are system-written)', function () {
|
|
49
65
|
var _a, _b;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tablesAuth.test.js","sourceRoot":"","sources":["../../test/tablesAuth.test.ts"],"names":[],"mappings":";;AAAA,+CAA8C;AAC9C,kDAAsD;AAEtD
|
|
1
|
+
{"version":3,"file":"tablesAuth.test.js","sourceRoot":"","sources":["../../test/tablesAuth.test.ts"],"names":[],"mappings":";;AAAA,+CAA8C;AAC9C,kDAAsD;AAEtD;;;;;;;;;;;;;GAaG;AAEH,QAAQ,CAAC,uBAAuB,EAAE;IAChC,EAAE,CAAC,kDAAkD,EAAE;;QACrD,MAAM,CAAC,MAAA,eAAM,CAAC,IAAI,CAAC,IAAI,0CAAE,OAAO,CAAC,CAAC,OAAO,CAAC;YACxC,KAAK,EAAE,EAAE,UAAU,EAAE,8BAAgB,CAAC,KAAK,EAAE;YAC7C,MAAM,EAAE,EAAE,UAAU,EAAE,8BAAgB,CAAC,KAAK,EAAE;YAC9C,MAAM,EAAE,EAAE,UAAU,EAAE,8BAAgB,CAAC,KAAK,EAAE;YAC9C,MAAM,EAAE,EAAE,UAAU,EAAE,8BAAgB,CAAC,KAAK,EAAE;SAC/C,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,0PAEsD,EAAE;;QACzD,MAAM,CAAC,MAAA,eAAM,CAAC,IAAI,CAAC,IAAI,0CAAE,EAAE,CAAC,CAAC,OAAO,CAAC;YACnC,KAAK,EAAE,EAAE,UAAU,EAAE,8BAAgB,CAAC,KAAK,EAAE;YAC7C,MAAM,EAAE,EAAE,UAAU,EAAE,8BAAgB,CAAC,KAAK,EAAE;YAC9C,MAAM,EAAE,EAAE,UAAU,EAAE,8BAAgB,CAAC,KAAK,EAAE;YAC9C,MAAM,EAAE,EAAE,UAAU,EAAE,8BAAgB,CAAC,KAAK,EAAE;SAC/C,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,6PAE+E,EAAE;;QAClF,MAAM,CAAC,MAAA,eAAM,CAAC,IAAI,CAAC,IAAI,0CAAE,uBAAuB,CAAC,CAAC,OAAO,CAAC;YACxD,OAAO;YACP,QAAQ;YACR,mBAAmB;YACnB,YAAY;YACZ,oBAAoB;SACrB,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,QAAQ,CAAC,mCAAmC,EAAE;IAC5C,EAAE,CAAC,4DAA4D,EAAE;;QAC/D,MAAM,CAAC,MAAA,eAAM,CAAC,cAAc,CAAC,IAAI,0CAAE,EAAE,CAAC,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,EAAE,UAAU,EAAE,8BAAgB,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QAClG,MAAM,CAAC,MAAA,eAAM,CAAC,cAAc,CAAC,IAAI,0CAAE,OAAO,CAAC,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,EAAE,UAAU,EAAE,8BAAgB,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;IACzG,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,QAAQ,CAAC,oCAAoC,EAAE;IAC7C,EAAE,CAAC,kDAAkD,EAAE;;QACrD,MAAM,CAAC,MAAA,eAAM,CAAC,eAAe,CAAC,IAAI,0CAAE,EAAE,CAAC,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;QACtE,MAAM,CAAC,MAAA,eAAM,CAAC,eAAe,CAAC,IAAI,0CAAE,OAAO,CAAC,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;IAC7E,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,QAAQ,CAAC,0BAA0B,EAAE;IACnC,EAAE,CAAC,2FAA2F,EAAE;;QAC9F,MAAM,CAAC,MAAA,eAAM,CAAC,OAAO,CAAC,IAAI,0CAAE,EAAE,CAAC,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,EAAE,UAAU,EAAE,8BAAgB,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;QAC9F,MAAM,CAAC,MAAA,eAAM,CAAC,OAAO,CAAC,IAAI,0CAAE,OAAO,CAAC,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,EAAE,UAAU,EAAE,8BAAgB,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;IACrG,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,QAAQ,CAAC,yBAAyB,EAAE;IAClC,EAAE,CAAC,8EAA8E,EAAE;;QACjF,MAAM,CAAC,MAAA,eAAM,CAAC,MAAM,CAAC,IAAI,0CAAE,OAAO,CAAC,CAAC,OAAO,CAAC;YAC1C,KAAK,EAAE,EAAE,UAAU,EAAE,8BAAgB,CAAC,KAAK,EAAE;YAC7C,MAAM,EAAE,EAAE,UAAU,EAAE,8BAAgB,CAAC,KAAK,EAAE;SAC/C,CAAC,CAAC;QACH,4FAA4F;QAC5F,MAAM,CAAC,MAAA,eAAM,CAAC,MAAM,CAAC,IAAI,0CAAE,EAAE,CAAC,CAAC,OAAO,CAAC;YACrC,KAAK,EAAE,EAAE,UAAU,EAAE,8BAAgB,CAAC,KAAK,EAAE;YAC7C,MAAM,EAAE,EAAE,UAAU,EAAE,8BAAgB,CAAC,KAAK,EAAE;SAC/C,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
package/generated/index.ts
CHANGED
|
@@ -8,27 +8,33 @@ import '@proteinjs/user-auth';
|
|
|
8
8
|
/** Generate Source Graph */
|
|
9
9
|
|
|
10
10
|
const sourceGraph =
|
|
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"}]}';
|
|
11
|
+
'{"options":{"directed":true,"multigraph":false,"compound":false},"nodes":[{"v":"@proteinjs/user/MachineAccount","value":{"packageName":"@proteinjs/user","name":"MachineAccount","filePath":"/home/runner/work/user/user/packages/user/src/MachineAccount.ts","qualifiedName":"@proteinjs/user/MachineAccount","isAbstract":false,"isStatic":false,"visibility":"public","properties":[{"name":"id","type":{"packageName":"","name":"string","filePath":null,"qualifiedName":"/string","typeParameters":null,"directParents":null},"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public"},{"name":"email","type":{"packageName":"","name":"string","filePath":null,"qualifiedName":"/string","typeParameters":null,"directParents":null},"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public"},{"name":"accountName","type":{"packageName":"","name":"string","filePath":null,"qualifiedName":"/string","typeParameters":null,"directParents":null},"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public"},{"name":"roles","type":{"packageName":"","name":"string[]","filePath":null,"qualifiedName":"/string[]","typeParameters":null,"directParents":null},"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public"},{"name":"secretName","type":{"packageName":"","name":"string","filePath":null,"qualifiedName":"/string","typeParameters":null,"directParents":null},"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public"}],"methods":[{"name":"validate","returnType":{"packageName":"","name":"void","filePath":null,"qualifiedName":"/void","typeParameters":null,"directParents":null},"isAsync":false,"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"private","parameters":[]}],"typeParameters":[],"directParentInterfaces":[{"packageName":"@proteinjs/db","name":"SourceRecordLoader","filePath":null,"qualifiedName":"@proteinjs/db/SourceRecordLoader","properties":[],"methods":[],"typeParameters":["@proteinjs/user/User"],"directParents":[]}],"directParentClasses":[],"sourceType":2}},{"v":"@proteinjs/db/SourceRecordLoader"},{"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/AccountDeletionService","value":{"packageName":"@proteinjs/user","name":"AccountDeletionService","filePath":"/home/runner/work/user/user/packages/user/src/services/AccountDeletionService.ts","qualifiedName":"@proteinjs/user/AccountDeletionService","properties":[],"methods":[{"name":"requestDeletion","returnType":{"packageName":"","name":"Promise<{ purgeAfter: Moment }>","filePath":null,"qualifiedName":"/Promise<{ purgeAfter: Moment }>","typeParameters":null,"directParents":null},"isAsync":false,"isOptional":false,"isAbstract":true,"isStatic":false,"visibility":"public","parameters":[{"name":"password","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/MachineCredentialsService","value":{"packageName":"@proteinjs/user","name":"MachineCredentialsService","filePath":"/home/runner/work/user/user/packages/user/src/services/MachineCredentialsService.ts","qualifiedName":"@proteinjs/user/MachineCredentialsService","properties":[],"methods":[{"name":"listMachineAccounts","returnType":{"packageName":"","name":"Promise<MachineAccountView[]>","filePath":null,"qualifiedName":"/Promise<MachineAccountView[]>","typeParameters":null,"directParents":null},"isAsync":false,"isOptional":false,"isAbstract":true,"isStatic":false,"visibility":"public","parameters":[]},{"name":"mintCredential","returnType":{"packageName":"","name":"Promise<MintedMachineCredential>","filePath":null,"qualifiedName":"/Promise<MintedMachineCredential>","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}}]}],"typeParameters":[],"directParents":[{"packageName":"@proteinjs/service","name":"Service","filePath":null,"qualifiedName":"@proteinjs/service/Service","properties":[],"methods":[],"typeParameters":[],"directParents":[]}],"sourceType":3}},{"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":"@proteinjs/user/SetUserStatusService","value":{"packageName":"@proteinjs/user","name":"SetUserStatusService","filePath":"/home/runner/work/user/user/packages/user/src/services/SetUserStatusService.ts","qualifiedName":"@proteinjs/user/SetUserStatusService","properties":[],"methods":[{"name":"setUserStatus","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":"status","type":{"packageName":"@proteinjs/user","name":"UserStatus","filePath":null,"qualifiedName":"@proteinjs/user/UserStatus","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":"/(typeof ACCOUNT_DELETION_PHASES)[number]"},{"v":"@proteinjs/user/AccountDeletion","value":{"packageName":"@proteinjs/user","name":"AccountDeletion","filePath":"/home/runner/work/user/user/packages/user/src/tables/AccountDeletionTable.ts","qualifiedName":"@proteinjs/user/AccountDeletion","properties":[{"name":"userId","type":{"packageName":"","name":"string","filePath":null,"qualifiedName":"/string","typeParameters":null,"directParents":null},"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public"},{"name":"userEmail","type":{"packageName":"","name":"string","filePath":null,"qualifiedName":"/string","typeParameters":null,"directParents":null},"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public"},{"name":"phase","type":{"packageName":"@proteinjs/user","name":"AccountDeletionPhase","filePath":null,"qualifiedName":"@proteinjs/user/AccountDeletionPhase","typeParameters":null,"directParents":null},"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public"},{"name":"purgeAfter","type":{"packageName":"moment","name":"Moment","filePath":null,"qualifiedName":"moment/Moment","typeParameters":null,"directParents":null},"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public"},{"name":"manifestGrants","type":{"packageName":"","name":"ManifestGrant[]","filePath":null,"qualifiedName":"/ManifestGrant[]","typeParameters":null,"directParents":null},"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public"},{"name":"ownedResourceIds","type":{"packageName":"","name":"string[]","filePath":null,"qualifiedName":"/string[]","typeParameters":null,"directParents":null},"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public"},{"name":"leaseSeq","type":{"packageName":"","name":"number","filePath":null,"qualifiedName":"/number","typeParameters":null,"directParents":null},"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public"},{"name":"ownerNodeId","type":{"packageName":"","name":"string | null","filePath":null,"qualifiedName":"/string | null","typeParameters":null,"directParents":null},"isOptional":true,"isAbstract":false,"isStatic":false,"visibility":"public"},{"name":"heartbeatAt","type":{"packageName":"","name":"Moment | null","filePath":null,"qualifiedName":"/Moment | null","typeParameters":null,"directParents":null},"isOptional":true,"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/user/AccountDeletionTable","value":{"packageName":"@proteinjs/user","name":"AccountDeletionTable","filePath":"/home/runner/work/user/user/packages/user/src/tables/AccountDeletionTable.ts","qualifiedName":"@proteinjs/user/AccountDeletionTable","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<AccountDeletion>[\'auth\']","filePath":null,"qualifiedName":"/Table<AccountDeletion>[\'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/AccountDeletion"],"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/UserStatusEvent","value":{"packageName":"@proteinjs/user","name":"UserStatusEvent","filePath":"/home/runner/work/user/user/packages/user/src/tables/UserStatusEventTable.ts","qualifiedName":"@proteinjs/user/UserStatusEvent","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 status changed */\\n target: string;\\n /** the standing the target was set to */\\n status: UserStatus;\\n}","filePath":null,"qualifiedName":"@proteinjs/user/{\\n /** id of the user who made the change */\\n actor: string;\\n /** id of the user whose status changed */\\n target: string;\\n /** the standing the target was set to */\\n status: UserStatus;\\n}","typeParameters":[],"directParents":null}],"sourceType":1}},{"v":"@proteinjs/user/UserStatusEventTable","value":{"packageName":"@proteinjs/user","name":"UserStatusEventTable","filePath":"/home/runner/work/user/user/packages/user/src/tables/UserStatusEventTable.ts","qualifiedName":"@proteinjs/user/UserStatusEventTable","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<UserStatusEvent>[\'auth\']","filePath":null,"qualifiedName":"/Table<UserStatusEvent>[\'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/UserStatusEvent"],"directParentInterfaces":[],"directParentClasses":[]}],"sourceType":2}},{"v":"/(typeof USER_STATUSES)[number]"},{"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":"SourceRecord","filePath":null,"qualifiedName":"@proteinjs/db/SourceRecord","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 /**\\n * Account standing. Written ONLY by the SetUserStatus service (audited per change). New rows\\n * default to \'active\'; rows predating the column read null, which every gate treats as active \\u2014\\n * only an explicit \'deactivated\' is refused (authentication and session resolution both gate on\\n * it in @proteinjs/user-server).\\n */\\n status?: UserStatus | null;\\n /** When the user asked for their account to be deleted. Written by the account-deletion flow only. */\\n deleteRequestedAt?: Moment | null;\\n /** When the grace window ends and the purge walker may erase the account. Written by the account-deletion flow only. */\\n purgeAfter?: Moment | 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 /**\\n * Account standing. Written ONLY by the SetUserStatus service (audited per change). New rows\\n * default to \'active\'; rows predating the column read null, which every gate treats as active \\u2014\\n * only an explicit \'deactivated\' is refused (authentication and session resolution both gate on\\n * it in @proteinjs/user-server).\\n */\\n status?: UserStatus | null;\\n /** When the user asked for their account to be deleted. Written by the account-deletion flow only. */\\n deleteRequestedAt?: Moment | null;\\n /** When the grace window ends and the purge walker may erase the account. Written by the account-deletion flow only. */\\n purgeAfter?: Moment | null;\\n}","typeParameters":[],"directParents":null}],"sourceType":1}},{"v":"@proteinjs/db/SourceRecord"},{"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":"sourceRecordOptions","type":{"packageName":"","name":"Table<User>[\'sourceRecordOptions\']","filePath":null,"qualifiedName":"/Table<User>[\'sourceRecordOptions\']","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/MachineAccount","w":"@proteinjs/db/SourceRecordLoader","value":"implements interface"},{"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/AccountDeletionService","w":"@proteinjs/service/Service","value":"extends interface"},{"v":"@proteinjs/user/MachineCredentialsService","w":"@proteinjs/service/Service","value":"extends interface"},{"v":"@proteinjs/user/RolesService","w":"@proteinjs/service/Service","value":"extends interface"},{"v":"@proteinjs/user/SetUserStatusService","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/AccountDeletion","w":"@proteinjs/db/Record","value":"extends interface"},{"v":"@proteinjs/user/AccountDeletionTable","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/UserStatusEvent","w":"@proteinjs/db/Record","value":"extends type"},{"v":"@proteinjs/user/UserStatusEventTable","w":"@proteinjs/db/Table","value":"extends class"},{"v":"@proteinjs/user/User","w":"@proteinjs/db/SourceRecord","value":"extends type"},{"v":"@proteinjs/user/UserTable","w":"@proteinjs/db/Table","value":"extends class"}]}';
|
|
12
12
|
|
|
13
13
|
/** Generate Source Links */
|
|
14
14
|
|
|
15
|
+
import { MachineAccount } from '../src/MachineAccount';
|
|
15
16
|
import { AdminRole } from '../src/RolesCatalog';
|
|
16
17
|
import { UserRepo } from '../src/UserRepo';
|
|
17
18
|
import { AccessGrantTable } from '../src/tables/AccessGrantTable';
|
|
18
19
|
import { AccessInviteTable } from '../src/tables/AccessInviteTable';
|
|
20
|
+
import { AccountDeletionTable } from '../src/tables/AccountDeletionTable';
|
|
19
21
|
import { InviteTable } from '../src/tables/InviteTable';
|
|
20
22
|
import { RoleGrantEventTable } from '../src/tables/RoleGrantEventTable';
|
|
21
23
|
import { SessionTable } from '../src/tables/SessionTable';
|
|
24
|
+
import { UserStatusEventTable } from '../src/tables/UserStatusEventTable';
|
|
22
25
|
import { UserTable } from '../src/tables/UserTable';
|
|
23
26
|
|
|
24
27
|
const sourceLinks = {
|
|
28
|
+
'@proteinjs/user/MachineAccount': MachineAccount,
|
|
25
29
|
'@proteinjs/user/AdminRole': AdminRole,
|
|
26
30
|
'@proteinjs/user/UserRepo': UserRepo,
|
|
27
31
|
'@proteinjs/user/AccessGrantTable': AccessGrantTable,
|
|
28
32
|
'@proteinjs/user/AccessInviteTable': AccessInviteTable,
|
|
33
|
+
'@proteinjs/user/AccountDeletionTable': AccountDeletionTable,
|
|
29
34
|
'@proteinjs/user/InviteTable': InviteTable,
|
|
30
35
|
'@proteinjs/user/RoleGrantEventTable': RoleGrantEventTable,
|
|
31
36
|
'@proteinjs/user/SessionTable': SessionTable,
|
|
37
|
+
'@proteinjs/user/UserStatusEventTable': UserStatusEventTable,
|
|
32
38
|
'@proteinjs/user/UserTable': UserTable,
|
|
33
39
|
};
|
|
34
40
|
|
package/index.ts
CHANGED
|
@@ -1,18 +1,24 @@
|
|
|
1
1
|
export * from './src/services/AccessInviteService';
|
|
2
|
+
export * from './src/services/AccountDeletionService';
|
|
3
|
+
export * from './src/services/MachineCredentialsService';
|
|
2
4
|
export * from './src/services/RolesService';
|
|
5
|
+
export * from './src/services/SetUserStatusService';
|
|
3
6
|
export * from './src/services/SignupService';
|
|
4
7
|
export * from './src/services/UpdateUserInfoService';
|
|
5
8
|
|
|
6
9
|
export * from './src/tables/AccessGrantTable';
|
|
7
10
|
export * from './src/tables/AccessInviteTable';
|
|
11
|
+
export * from './src/tables/AccountDeletionTable';
|
|
8
12
|
export * from './src/tables/InviteTable';
|
|
9
13
|
export * from './src/tables/RoleGrantEventTable';
|
|
14
|
+
export * from './src/tables/UserStatusEventTable';
|
|
10
15
|
export * from './src/tables/UserTable';
|
|
11
16
|
export * from './src/tables/SessionTable';
|
|
12
17
|
export * from './src/tables/tables';
|
|
13
18
|
export * from './src/routes';
|
|
14
19
|
export * from './src/cacheKeys';
|
|
15
20
|
export * from './src/permissions';
|
|
21
|
+
export * from './src/MachineAccount';
|
|
16
22
|
export * from './src/RolesCatalog';
|
|
17
23
|
export * from './src/UserRepo';
|
|
18
24
|
export * from './src/ScopedRecord';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@proteinjs/user",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.9.0",
|
|
4
4
|
"description": "User management",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"test": "jest --passWithNoTests"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@proteinjs/db": "^1.
|
|
25
|
+
"@proteinjs/db": "^1.34.1",
|
|
26
26
|
"@proteinjs/reflection": "^1.1.12",
|
|
27
27
|
"@proteinjs/server-api": "^3.0.11",
|
|
28
28
|
"@proteinjs/service": "^1.5.1",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"moment": "2.29.4"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"@proteinjs/db-driver-knex": "^1.
|
|
33
|
+
"@proteinjs/db-driver-knex": "^1.11.5",
|
|
34
34
|
"@proteinjs/reflection-build": "^1.4.10",
|
|
35
35
|
"@types/jest": "29.5.5",
|
|
36
36
|
"@types/node": "14.0.13",
|
|
@@ -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": "9f0638dcd6baef3d93c04ef399dcd8909ea7cf45"
|
|
49
49
|
}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { SourceRecordLoader, Table, getSourceRecordLoaders } from '@proteinjs/db';
|
|
2
|
+
import { RolesCatalog } from './RolesCatalog';
|
|
3
|
+
import { tables } from './tables/tables';
|
|
4
|
+
import { User } from './tables/UserTable';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Every machine account declared into the user table. Duck-typed rather than `instanceof`
|
|
8
|
+
* (declarations may load from a different package copy in mixed-resolution environments):
|
|
9
|
+
* a user-table source-record declaration carrying a `secretName` is a machine account.
|
|
10
|
+
*/
|
|
11
|
+
export const getMachineAccounts = (): MachineAccount[] =>
|
|
12
|
+
getSourceRecordLoaders<User>().filter(
|
|
13
|
+
(loader): loader is MachineAccount =>
|
|
14
|
+
loader.table.name === tables.User.name && typeof (loader as MachineAccount).secretName === 'string'
|
|
15
|
+
);
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* A code-declared machine account: identity in source, credentials at runtime.
|
|
19
|
+
*
|
|
20
|
+
* Extend this (server-side — declarations name real operational emails and grants) to declare a
|
|
21
|
+
* machine account into the `user` table. The boot sync inserts it on first boot of a fresh env,
|
|
22
|
+
* ADOPTS an existing row by email in deployed envs (id kept — rows the account filed reference
|
|
23
|
+
* it; password kept — the credential is runtime-owned), reverts the declared fields on every
|
|
24
|
+
* boot (a runtime grant/revoke on a machine account is drift), and deactivates the account —
|
|
25
|
+
* sessions killed, never deleted — when the declaration is removed. Git history of the
|
|
26
|
+
* declaration is the machine-grant audit trail; the Roles service refuses machine targets.
|
|
27
|
+
*
|
|
28
|
+
* A `password` is deliberately NOT declarable: a fresh machine row has a NULL password, which
|
|
29
|
+
* `authenticate`'s verify treats as matching no password at all, so "account exists" can never
|
|
30
|
+
* reach "account can log in" without the explicit credential mint (`MachineCredentialsService`).
|
|
31
|
+
*/
|
|
32
|
+
export abstract class MachineAccount implements SourceRecordLoader<User> {
|
|
33
|
+
/** Stable id, used ONLY when inserting into a fresh env — existing rows adopt by email. */
|
|
34
|
+
abstract id: string;
|
|
35
|
+
/** The account's email (lowercase — validated at boot). The natural key adoption matches on. */
|
|
36
|
+
abstract email: string;
|
|
37
|
+
/** Display name shown wherever the account's actions surface. */
|
|
38
|
+
abstract accountName: string;
|
|
39
|
+
/**
|
|
40
|
+
* The account's role grants, declared — reverted to exactly this set on every boot. Each must
|
|
41
|
+
* be a catalog-known role; break-glass roles are refused (a machine account holding 'admin' is
|
|
42
|
+
* unrepresentable).
|
|
43
|
+
*/
|
|
44
|
+
abstract roles: string[];
|
|
45
|
+
/**
|
|
46
|
+
* Name of the Secret Manager secret the account's minted credential is pasted into — operator
|
|
47
|
+
* metadata surfaced by the credential mint, not a database column.
|
|
48
|
+
*/
|
|
49
|
+
abstract secretName: string;
|
|
50
|
+
|
|
51
|
+
get table(): Table<User> {
|
|
52
|
+
return tables.User;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
get record(): SourceRecordLoader<User>['record'] {
|
|
56
|
+
this.validate();
|
|
57
|
+
return {
|
|
58
|
+
id: this.id,
|
|
59
|
+
email: this.email,
|
|
60
|
+
name: this.accountName,
|
|
61
|
+
roles: [...this.roles],
|
|
62
|
+
// No mailbox ceremony for machines; forced so runtime flips get reverted.
|
|
63
|
+
emailVerified: true,
|
|
64
|
+
// Source-owned on purpose: re-declaring a removed (auto-deactivated) account is what
|
|
65
|
+
// reactivates it, via normal drift reversion.
|
|
66
|
+
status: 'active',
|
|
67
|
+
// The one contained cast (the codebase's sanctioned pattern for required-column typing):
|
|
68
|
+
// `User.password` is a required column, but a machine declaration NEVER emits a password
|
|
69
|
+
// key — the credential is runtime-owned, minted and stored as a hash by the credential
|
|
70
|
+
// service. The loader only writes fields present on the record, so the column stays
|
|
71
|
+
// untouched on adopted rows and NULL on fresh inserts (unloggable until minted).
|
|
72
|
+
} as unknown as SourceRecordLoader<User>['record'];
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/** Boot-time declaration validation — every violation fails the boot loudly by name. */
|
|
76
|
+
private validate(): void {
|
|
77
|
+
const describe = `MachineAccount declaration '${this.constructor.name}'`;
|
|
78
|
+
if (!this.id || !this.email || !this.accountName || !this.secretName) {
|
|
79
|
+
throw new Error(`${describe} must declare id, email, accountName, and secretName`);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
if (this.email !== this.email.toLowerCase()) {
|
|
83
|
+
throw new Error(
|
|
84
|
+
`${describe} declares email '${this.email}' — machine account emails must be lowercase ` +
|
|
85
|
+
`(authentication and the natural-key adoption both match on the lowercased email)`
|
|
86
|
+
);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
for (const role of this.roles) {
|
|
90
|
+
const entry = RolesCatalog.getEntry(role);
|
|
91
|
+
if (!entry) {
|
|
92
|
+
throw new Error(`${describe} declares unknown role '${role}' — pick one from the roles catalog`);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
if (entry.breakGlass) {
|
|
96
|
+
throw new Error(
|
|
97
|
+
`${describe} declares break-glass role '${role}' — machine accounts hold day-to-day ` +
|
|
98
|
+
`permission-mapped roles only, never break-glass`
|
|
99
|
+
);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
package/src/ScopedRecord.ts
CHANGED
|
@@ -74,6 +74,17 @@ export function isScopedTable(table: Table<any>) {
|
|
|
74
74
|
return !!scopeColumn;
|
|
75
75
|
}
|
|
76
76
|
|
|
77
|
+
/** Declares a scoped table whose rows deliberately SURVIVE account purge (billing ledger,
|
|
78
|
+
* ops records — casing §7.2/§7.4). Rows become pseudonymous when the user row purges
|
|
79
|
+
* (scope keeps the bare 36-char id). Default is PURGE: a new scoped table is erased unless
|
|
80
|
+
* it declares otherwise — the safe default for a privacy obligation. */
|
|
81
|
+
export interface AccountPurgePolicy {
|
|
82
|
+
readonly retainOnAccountPurge: true;
|
|
83
|
+
}
|
|
84
|
+
export function retainedOnAccountPurge(table: Table<any>): boolean {
|
|
85
|
+
return (table as Table<any> & Partial<AccountPurgePolicy>).retainOnAccountPurge === true;
|
|
86
|
+
}
|
|
87
|
+
|
|
77
88
|
/**
|
|
78
89
|
* Wrapper function to add default ScopedRecord columns to your table's columns.
|
|
79
90
|
*
|