@proteinjs/user 1.7.2 → 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.
Files changed (75) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/dist/generated/index.d.ts +0 -2
  3. package/dist/generated/index.d.ts.map +1 -1
  4. package/dist/generated/index.js +7 -3
  5. package/dist/generated/index.js.map +1 -1
  6. package/dist/index.d.ts +6 -0
  7. package/dist/index.d.ts.map +1 -1
  8. package/dist/index.js +6 -0
  9. package/dist/index.js.map +1 -1
  10. package/dist/src/MachineAccount.d.ts +47 -0
  11. package/dist/src/MachineAccount.d.ts.map +1 -0
  12. package/dist/src/MachineAccount.js +100 -0
  13. package/dist/src/MachineAccount.js.map +1 -0
  14. package/dist/src/ScopedRecord.d.ts +12 -1
  15. package/dist/src/ScopedRecord.d.ts.map +1 -1
  16. package/dist/src/ScopedRecord.js +19 -3
  17. package/dist/src/ScopedRecord.js.map +1 -1
  18. package/dist/src/UserRepo.d.ts +8 -0
  19. package/dist/src/UserRepo.d.ts.map +1 -1
  20. package/dist/src/UserRepo.js +22 -0
  21. package/dist/src/UserRepo.js.map +1 -1
  22. package/dist/src/routes.d.ts +11 -0
  23. package/dist/src/routes.d.ts.map +1 -1
  24. package/dist/src/routes.js +14 -1
  25. package/dist/src/routes.js.map +1 -1
  26. package/dist/src/services/AccountDeletionService.d.ts +27 -0
  27. package/dist/src/services/AccountDeletionService.d.ts.map +1 -0
  28. package/dist/src/services/AccountDeletionService.js +6 -0
  29. package/dist/src/services/AccountDeletionService.js.map +1 -0
  30. package/dist/src/services/MachineCredentialsService.d.ts +38 -0
  31. package/dist/src/services/MachineCredentialsService.d.ts.map +1 -0
  32. package/dist/src/services/MachineCredentialsService.js +6 -0
  33. package/dist/src/services/MachineCredentialsService.js.map +1 -0
  34. package/dist/src/services/SetUserStatusService.d.ts +15 -0
  35. package/dist/src/services/SetUserStatusService.d.ts.map +1 -0
  36. package/dist/src/services/SetUserStatusService.js +6 -0
  37. package/dist/src/services/SetUserStatusService.js.map +1 -0
  38. package/dist/src/services/UpdateUserInfoService.d.ts +16 -1
  39. package/dist/src/services/UpdateUserInfoService.d.ts.map +1 -1
  40. package/dist/src/services/UpdateUserInfoService.js.map +1 -1
  41. package/dist/src/tables/AccountDeletionTable.d.ts +85 -0
  42. package/dist/src/tables/AccountDeletionTable.d.ts.map +1 -0
  43. package/dist/src/tables/AccountDeletionTable.js +62 -0
  44. package/dist/src/tables/AccountDeletionTable.js.map +1 -0
  45. package/dist/src/tables/SessionTable.d.ts +1 -1
  46. package/dist/src/tables/UserStatusEventTable.d.ts +30 -0
  47. package/dist/src/tables/UserStatusEventTable.d.ts.map +1 -0
  48. package/dist/src/tables/UserStatusEventTable.js +43 -0
  49. package/dist/src/tables/UserStatusEventTable.js.map +1 -0
  50. package/dist/src/tables/UserTable.d.ts +48 -2
  51. package/dist/src/tables/UserTable.d.ts.map +1 -1
  52. package/dist/src/tables/UserTable.js +75 -4
  53. package/dist/src/tables/UserTable.js.map +1 -1
  54. package/dist/src/tables/tables.d.ts +4 -0
  55. package/dist/src/tables/tables.d.ts.map +1 -1
  56. package/dist/src/tables/tables.js +4 -0
  57. package/dist/src/tables/tables.js.map +1 -1
  58. package/dist/test/tablesAuth.test.js +20 -4
  59. package/dist/test/tablesAuth.test.js.map +1 -1
  60. package/generated/index.ts +7 -3
  61. package/index.ts +6 -0
  62. package/package.json +4 -4
  63. package/src/MachineAccount.ts +103 -0
  64. package/src/ScopedRecord.ts +16 -3
  65. package/src/UserRepo.ts +25 -0
  66. package/src/routes.ts +13 -0
  67. package/src/services/AccountDeletionService.ts +28 -0
  68. package/src/services/MachineCredentialsService.ts +43 -0
  69. package/src/services/SetUserStatusService.ts +16 -0
  70. package/src/services/UpdateUserInfoService.ts +17 -1
  71. package/src/tables/AccountDeletionTable.ts +98 -0
  72. package/src/tables/UserStatusEventTable.ts +34 -0
  73. package/src/tables/UserTable.ts +69 -6
  74. package/src/tables/tables.ts +4 -0
  75. package/test/tablesAuth.test.ts +22 -4
@@ -1,36 +1,40 @@
1
1
  /** Load Dependency Source Graphs */
2
2
 
3
3
  import '@proteinjs/db';
4
- import '@proteinjs/reflection';
5
4
  import '@proteinjs/server-api';
6
5
  import '@proteinjs/service';
7
6
  import '@proteinjs/user-auth';
8
- import 'moment';
9
7
 
10
8
  /** Generate Source Graph */
11
9
 
12
10
  const sourceGraph =
13
- '{"options":{"directed":true,"multigraph":false,"compound":false},"nodes":[{"v":"@proteinjs/user/RoleCatalogEntry","value":{"packageName":"@proteinjs/user","name":"RoleCatalogEntry","filePath":"/home/runner/work/user/user/packages/user/src/RolesCatalog.ts","qualifiedName":"@proteinjs/user/RoleCatalogEntry","properties":[{"name":"role","type":{"packageName":"","name":"string","filePath":null,"qualifiedName":"/string","typeParameters":null,"directParents":null},"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public"},{"name":"description","type":{"packageName":"","name":"string","filePath":null,"qualifiedName":"/string","typeParameters":null,"directParents":null},"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public"},{"name":"breakGlass","type":{"packageName":"","name":"boolean","filePath":null,"qualifiedName":"/boolean","typeParameters":null,"directParents":null},"isOptional":true,"isAbstract":false,"isStatic":false,"visibility":"public"}],"methods":[],"typeParameters":[],"directParents":[{"packageName":"@proteinjs/reflection","name":"Loadable","filePath":null,"qualifiedName":"@proteinjs/reflection/Loadable","properties":[],"methods":[],"typeParameters":[],"directParents":[]}],"sourceType":3}},{"v":"@proteinjs/reflection/Loadable"},{"v":"@proteinjs/user/AdminRole","value":{"packageName":"@proteinjs/user","name":"AdminRole","filePath":"/home/runner/work/user/user/packages/user/src/RolesCatalog.ts","qualifiedName":"@proteinjs/user/AdminRole","isAbstract":false,"isStatic":false,"visibility":"public","properties":[{"name":"role","type":null,"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public"},{"name":"description","type":null,"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public"},{"name":"breakGlass","type":null,"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public"}],"methods":[],"typeParameters":[],"directParentInterfaces":[{"packageName":"@proteinjs/user","name":"RoleCatalogEntry","filePath":null,"qualifiedName":"@proteinjs/user/RoleCatalogEntry","properties":[],"methods":[],"typeParameters":[],"directParents":[]}],"directParentClasses":[],"sourceType":2}},{"v":"@proteinjs/user/ScopedRecord","value":{"packageName":"@proteinjs/user","name":"ScopedRecord","filePath":"/home/runner/work/user/user/packages/user/src/ScopedRecord.ts","qualifiedName":"@proteinjs/user/ScopedRecord","properties":[{"name":"scope","type":{"packageName":"","name":"string","filePath":null,"qualifiedName":"/string","typeParameters":null,"directParents":null},"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public"}],"methods":[],"typeParameters":[],"directParents":[{"packageName":"@proteinjs/db","name":"Record","filePath":null,"qualifiedName":"@proteinjs/db/Record","properties":[],"methods":[],"typeParameters":[],"directParents":[]}],"sourceType":3}},{"v":"@proteinjs/db/Record"},{"v":"@proteinjs/user/SharedRecord","value":{"packageName":"@proteinjs/user","name":"SharedRecord","filePath":"/home/runner/work/user/user/packages/user/src/SharedRecord.ts","qualifiedName":"@proteinjs/user/SharedRecord","properties":[{"name":"permissionSource","type":{"packageName":"","name":"Reference<T>","filePath":null,"qualifiedName":"/Reference<T>","typeParameters":null,"directParents":null},"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public"},{"name":"permissionSourceTable","type":{"packageName":"","name":"string","filePath":null,"qualifiedName":"/string","typeParameters":null,"directParents":null},"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public"}],"methods":[],"typeParameters":["/T extends SharedRecord = any"],"directParents":[{"packageName":"@proteinjs/db","name":"Record","filePath":null,"qualifiedName":"@proteinjs/db/Record","properties":[],"methods":[],"typeParameters":[],"directParents":[]}],"sourceType":3}},{"v":"@proteinjs/user/UserRepo","value":{"packageName":"@proteinjs/user","name":"UserRepo","filePath":"/home/runner/work/user/user/packages/user/src/UserRepo.ts","qualifiedName":"@proteinjs/user/UserRepo","isAbstract":false,"isStatic":false,"visibility":"public","properties":[],"methods":[{"name":"getUser","returnType":{"packageName":"","name":"Omit<User, \'roles\'> & AuthenticatedUser","filePath":null,"qualifiedName":"/Omit<User, \'roles\'> & AuthenticatedUser","typeParameters":null,"directParents":null},"isAsync":false,"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public","parameters":[]},{"name":"setUser","returnType":null,"isAsync":false,"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public","parameters":[{"name":"user","type":{"packageName":"@proteinjs/user","name":"User","filePath":null,"qualifiedName":"@proteinjs/user/User","typeParameters":null,"directParents":null}}]}],"typeParameters":[],"directParentInterfaces":[{"packageName":"@proteinjs/user-auth","name":"AuthenticatedUserRepo","filePath":null,"qualifiedName":"@proteinjs/user-auth/AuthenticatedUserRepo","properties":[],"methods":[],"typeParameters":[],"directParents":[]}],"directParentClasses":[],"sourceType":2}},{"v":"@proteinjs/user-auth/AuthenticatedUserRepo"},{"v":"@proteinjs/user/AccessInviteService","value":{"packageName":"@proteinjs/user","name":"AccessInviteService","filePath":"/home/runner/work/user/user/packages/user/src/services/AccessInviteService.ts","qualifiedName":"@proteinjs/user/AccessInviteService","properties":[],"methods":[{"name":"createAccessInvite","returnType":{"packageName":"","name":"Promise<CreateAccessInviteResponse>","filePath":null,"qualifiedName":"/Promise<CreateAccessInviteResponse>","typeParameters":null,"directParents":null},"isAsync":false,"isOptional":false,"isAbstract":true,"isStatic":false,"visibility":"public","parameters":[{"name":"params","type":{"packageName":"@proteinjs/user","name":"CreateAccessInviteParams","filePath":null,"qualifiedName":"@proteinjs/user/CreateAccessInviteParams","typeParameters":null,"directParents":null}}]},{"name":"acceptAccessInvite","returnType":{"packageName":"","name":"Promise<T | undefined>","filePath":null,"qualifiedName":"/Promise<T | undefined>","typeParameters":null,"directParents":null},"isAsync":false,"isOptional":false,"isAbstract":true,"isStatic":false,"visibility":"public","parameters":[{"name":"token","type":{"packageName":"","name":"string","filePath":null,"qualifiedName":"/string","typeParameters":null,"directParents":null}}]}],"typeParameters":["/T extends Record"],"directParents":[{"packageName":"@proteinjs/service","name":"Service","filePath":null,"qualifiedName":"@proteinjs/service/Service","properties":[],"methods":[],"typeParameters":[],"directParents":[]}],"sourceType":3}},{"v":"@proteinjs/service/Service"},{"v":"@proteinjs/user/RolesService","value":{"packageName":"@proteinjs/user","name":"RolesService","filePath":"/home/runner/work/user/user/packages/user/src/services/RolesService.ts","qualifiedName":"@proteinjs/user/RolesService","properties":[],"methods":[{"name":"grantRole","returnType":{"packageName":"","name":"Promise<void>","filePath":null,"qualifiedName":"/Promise<void>","typeParameters":null,"directParents":null},"isAsync":false,"isOptional":false,"isAbstract":true,"isStatic":false,"visibility":"public","parameters":[{"name":"userId","type":{"packageName":"","name":"string","filePath":null,"qualifiedName":"/string","typeParameters":null,"directParents":null}},{"name":"role","type":{"packageName":"","name":"string","filePath":null,"qualifiedName":"/string","typeParameters":null,"directParents":null}}]},{"name":"revokeRole","returnType":{"packageName":"","name":"Promise<void>","filePath":null,"qualifiedName":"/Promise<void>","typeParameters":null,"directParents":null},"isAsync":false,"isOptional":false,"isAbstract":true,"isStatic":false,"visibility":"public","parameters":[{"name":"userId","type":{"packageName":"","name":"string","filePath":null,"qualifiedName":"/string","typeParameters":null,"directParents":null}},{"name":"role","type":{"packageName":"","name":"string","filePath":null,"qualifiedName":"/string","typeParameters":null,"directParents":null}}]}],"typeParameters":[],"directParents":[{"packageName":"@proteinjs/service","name":"Service","filePath":null,"qualifiedName":"@proteinjs/service/Service","properties":[],"methods":[],"typeParameters":[],"directParents":[]}],"sourceType":3}},{"v":"/Pick"},{"v":"@proteinjs/user/SignupService","value":{"packageName":"@proteinjs/user","name":"SignupService","filePath":"/home/runner/work/user/user/packages/user/src/services/SignupService.ts","qualifiedName":"@proteinjs/user/SignupService","properties":[],"methods":[{"name":"createUser","returnType":{"packageName":"","name":"Promise<void>","filePath":null,"qualifiedName":"/Promise<void>","typeParameters":null,"directParents":null},"isAsync":false,"isOptional":false,"isAbstract":true,"isStatic":false,"visibility":"public","parameters":[{"name":"user","type":{"packageName":"@proteinjs/user","name":"UserSignup","filePath":null,"qualifiedName":"@proteinjs/user/UserSignup","typeParameters":null,"directParents":null}},{"name":"token","type":{"packageName":"","name":"string","filePath":null,"qualifiedName":"/string","typeParameters":null,"directParents":null}}]},{"name":"sendInvite","returnType":{"packageName":"","name":"Promise<SendInviteResponse>","filePath":null,"qualifiedName":"/Promise<SendInviteResponse>","typeParameters":null,"directParents":null},"isAsync":false,"isOptional":false,"isAbstract":true,"isStatic":false,"visibility":"public","parameters":[{"name":"email","type":{"packageName":"","name":"string","filePath":null,"qualifiedName":"/string","typeParameters":null,"directParents":null}}]},{"name":"revokeInvite","returnType":{"packageName":"","name":"Promise<void>","filePath":null,"qualifiedName":"/Promise<void>","typeParameters":null,"directParents":null},"isAsync":false,"isOptional":false,"isAbstract":true,"isStatic":false,"visibility":"public","parameters":[{"name":"email","type":{"packageName":"","name":"string","filePath":null,"qualifiedName":"/string","typeParameters":null,"directParents":null}}]},{"name":"initializeSignup","returnType":{"packageName":"","name":"Promise<InitializeSignupResponse>","filePath":null,"qualifiedName":"/Promise<InitializeSignupResponse>","typeParameters":null,"directParents":null},"isAsync":false,"isOptional":false,"isAbstract":true,"isStatic":false,"visibility":"public","parameters":[{"name":"inviteToken","type":{"packageName":"","name":"string","filePath":null,"qualifiedName":"/string","typeParameters":null,"directParents":null}}]}],"typeParameters":[],"directParents":[{"packageName":"@proteinjs/service","name":"Service","filePath":null,"qualifiedName":"@proteinjs/service/Service","properties":[],"methods":[],"typeParameters":[],"directParents":[]}],"sourceType":3}},{"v":"@proteinjs/user/UpdateUserInfoService","value":{"packageName":"@proteinjs/user","name":"UpdateUserInfoService","filePath":"/home/runner/work/user/user/packages/user/src/services/UpdateUserInfoService.ts","qualifiedName":"@proteinjs/user/UpdateUserInfoService","properties":[],"methods":[{"name":"updateName","returnType":{"packageName":"","name":"Promise<void>","filePath":null,"qualifiedName":"/Promise<void>","typeParameters":null,"directParents":null},"isAsync":false,"isOptional":false,"isAbstract":true,"isStatic":false,"visibility":"public","parameters":[{"name":"name","type":{"packageName":"","name":"string","filePath":null,"qualifiedName":"/string","typeParameters":null,"directParents":null}}]},{"name":"updatePassword","returnType":{"packageName":"","name":"Promise<UpdatePasswordResponse>","filePath":null,"qualifiedName":"/Promise<UpdatePasswordResponse>","typeParameters":null,"directParents":null},"isAsync":false,"isOptional":false,"isAbstract":true,"isStatic":false,"visibility":"public","parameters":[{"name":"currentPassword","type":{"packageName":"","name":"string","filePath":null,"qualifiedName":"/string","typeParameters":null,"directParents":null}},{"name":"newPassword","type":{"packageName":"","name":"string","filePath":null,"qualifiedName":"/string","typeParameters":null,"directParents":null}}]}],"typeParameters":[],"directParents":[{"packageName":"@proteinjs/service","name":"Service","filePath":null,"qualifiedName":"@proteinjs/service/Service","properties":[],"methods":[],"typeParameters":[],"directParents":[]}],"sourceType":3}},{"v":"@proteinjs/user/AccessGrant","value":{"packageName":"@proteinjs/user","name":"AccessGrant","filePath":"/home/runner/work/user/user/packages/user/src/tables/AccessGrantTable.ts","qualifiedName":"@proteinjs/user/AccessGrant","typeParameters":[],"directParents":[{"packageName":"@proteinjs/db","name":"Record","filePath":null,"qualifiedName":"@proteinjs/db/Record","typeParameters":[],"directParents":null},{"packageName":"@proteinjs/user","name":"{\\n principal: Reference<any>;\\n resource: Reference<any>;\\n resourceTable?: Table<any>[\'name\'];\\n accessLevel: \'read\' | \'write\' | \'admin\' | \'owner\';\\n}","filePath":null,"qualifiedName":"@proteinjs/user/{\\n principal: Reference<any>;\\n resource: Reference<any>;\\n resourceTable?: Table<any>[\'name\'];\\n accessLevel: \'read\' | \'write\' | \'admin\' | \'owner\';\\n}","typeParameters":[],"directParents":null}],"sourceType":1}},{"v":"@proteinjs/user/AccessGrantTable","value":{"packageName":"@proteinjs/user","name":"AccessGrantTable","filePath":"/home/runner/work/user/user/packages/user/src/tables/AccessGrantTable.ts","qualifiedName":"@proteinjs/user/AccessGrantTable","isAbstract":false,"isStatic":false,"visibility":"public","properties":[{"name":"name","type":null,"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public"},{"name":"auth","type":{"packageName":"","name":"Table<AccessGrant>[\'auth\']","filePath":null,"qualifiedName":"/Table<AccessGrant>[\'auth\']","typeParameters":null,"directParents":null},"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public"},{"name":"indexes","type":null,"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public"},{"name":"columns","type":null,"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public"}],"methods":[],"typeParameters":[],"directParentInterfaces":[],"directParentClasses":[{"packageName":"@proteinjs/db","name":"Table","filePath":null,"qualifiedName":"@proteinjs/db/Table","isAbstract":false,"isStatic":false,"visibility":"public","properties":[],"methods":[],"typeParameters":["@proteinjs/user/AccessGrant"],"directParentInterfaces":[],"directParentClasses":[]}],"sourceType":2}},{"v":"@proteinjs/db/Table"},{"v":"@proteinjs/user/AccessInvite","value":{"packageName":"@proteinjs/user","name":"AccessInvite","filePath":"/home/runner/work/user/user/packages/user/src/tables/AccessInviteTable.ts","qualifiedName":"@proteinjs/user/AccessInvite","typeParameters":["/T extends Record = any"],"directParents":[{"packageName":"@proteinjs/db","name":"Record","filePath":null,"qualifiedName":"@proteinjs/db/Record","typeParameters":[],"directParents":null},{"packageName":"@proteinjs/user","name":"{\\n token?: string;\\n tokenExpiresAt: Moment;\\n resource: Reference<T>;\\n resourceTable: string;\\n accessLevel: AccessGrant[\'accessLevel\'];\\n accepted?: boolean;\\n acceptedBy?: Reference<User>;\\n acceptedAt?: Moment;\\n}","filePath":null,"qualifiedName":"@proteinjs/user/{\\n token?: string;\\n tokenExpiresAt: Moment;\\n resource: Reference<T>;\\n resourceTable: string;\\n accessLevel: AccessGrant[\'accessLevel\'];\\n accepted?: boolean;\\n acceptedBy?: Reference<User>;\\n acceptedAt?: Moment;\\n}","typeParameters":[],"directParents":null}],"sourceType":1}},{"v":"@proteinjs/user/AccessInviteTable","value":{"packageName":"@proteinjs/user","name":"AccessInviteTable","filePath":"/home/runner/work/user/user/packages/user/src/tables/AccessInviteTable.ts","qualifiedName":"@proteinjs/user/AccessInviteTable","isAbstract":false,"isStatic":false,"visibility":"public","properties":[{"name":"name","type":null,"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public"},{"name":"auth","type":{"packageName":"","name":"Table<AccessInvite>[\'auth\']","filePath":null,"qualifiedName":"/Table<AccessInvite>[\'auth\']","typeParameters":null,"directParents":null},"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public"},{"name":"columns","type":null,"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public"}],"methods":[],"typeParameters":[],"directParentInterfaces":[],"directParentClasses":[{"packageName":"@proteinjs/db","name":"Table","filePath":null,"qualifiedName":"@proteinjs/db/Table","isAbstract":false,"isStatic":false,"visibility":"public","properties":[],"methods":[],"typeParameters":["@proteinjs/user/AccessInvite"],"directParentInterfaces":[],"directParentClasses":[]}],"sourceType":2}},{"v":"@proteinjs/user/Invite","value":{"packageName":"@proteinjs/user","name":"Invite","filePath":"/home/runner/work/user/user/packages/user/src/tables/InviteTable.ts","qualifiedName":"@proteinjs/user/Invite","typeParameters":[],"directParents":[{"packageName":"@proteinjs/db","name":"Record","filePath":null,"qualifiedName":"@proteinjs/db/Record","typeParameters":[],"directParents":null},{"packageName":"@proteinjs/user","name":"{\\n email: string;\\n token: string | null;\\n tokenExpiresAt: Moment | null;\\n invitedBy: string;\\n}","filePath":null,"qualifiedName":"@proteinjs/user/{\\n email: string;\\n token: string | null;\\n tokenExpiresAt: Moment | null;\\n invitedBy: string;\\n}","typeParameters":[],"directParents":null}],"sourceType":1}},{"v":"@proteinjs/user/InviteTable","value":{"packageName":"@proteinjs/user","name":"InviteTable","filePath":"/home/runner/work/user/user/packages/user/src/tables/InviteTable.ts","qualifiedName":"@proteinjs/user/InviteTable","isAbstract":false,"isStatic":false,"visibility":"public","properties":[{"name":"name","type":null,"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public"},{"name":"auth","type":{"packageName":"","name":"Table<Invite>[\'auth\']","filePath":null,"qualifiedName":"/Table<Invite>[\'auth\']","typeParameters":null,"directParents":null},"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public"},{"name":"columns","type":null,"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public"}],"methods":[],"typeParameters":[],"directParentInterfaces":[],"directParentClasses":[{"packageName":"@proteinjs/db","name":"Table","filePath":null,"qualifiedName":"@proteinjs/db/Table","isAbstract":false,"isStatic":false,"visibility":"public","properties":[],"methods":[],"typeParameters":["@proteinjs/user/Invite"],"directParentInterfaces":[],"directParentClasses":[]}],"sourceType":2}},{"v":"@proteinjs/user/RoleGrantEvent","value":{"packageName":"@proteinjs/user","name":"RoleGrantEvent","filePath":"/home/runner/work/user/user/packages/user/src/tables/RoleGrantEventTable.ts","qualifiedName":"@proteinjs/user/RoleGrantEvent","typeParameters":[],"directParents":[{"packageName":"@proteinjs/db","name":"Record","filePath":null,"qualifiedName":"@proteinjs/db/Record","typeParameters":[],"directParents":null},{"packageName":"@proteinjs/user","name":"{\\n /** id of the user who made the change */\\n actor: string;\\n /** id of the user whose roles changed */\\n target: string;\\n role: string;\\n action: \'grant\' | \'revoke\';\\n}","filePath":null,"qualifiedName":"@proteinjs/user/{\\n /** id of the user who made the change */\\n actor: string;\\n /** id of the user whose roles changed */\\n target: string;\\n role: string;\\n action: \'grant\' | \'revoke\';\\n}","typeParameters":[],"directParents":null}],"sourceType":1}},{"v":"@proteinjs/user/RoleGrantEventTable","value":{"packageName":"@proteinjs/user","name":"RoleGrantEventTable","filePath":"/home/runner/work/user/user/packages/user/src/tables/RoleGrantEventTable.ts","qualifiedName":"@proteinjs/user/RoleGrantEventTable","isAbstract":false,"isStatic":false,"visibility":"public","properties":[{"name":"name","type":null,"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public"},{"name":"auth","type":{"packageName":"","name":"Table<RoleGrantEvent>[\'auth\']","filePath":null,"qualifiedName":"/Table<RoleGrantEvent>[\'auth\']","typeParameters":null,"directParents":null},"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public"},{"name":"columns","type":null,"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public"}],"methods":[],"typeParameters":[],"directParentInterfaces":[],"directParentClasses":[{"packageName":"@proteinjs/db","name":"Table","filePath":null,"qualifiedName":"@proteinjs/db/Table","isAbstract":false,"isStatic":false,"visibility":"public","properties":[],"methods":[],"typeParameters":["@proteinjs/user/RoleGrantEvent"],"directParentInterfaces":[],"directParentClasses":[]}],"sourceType":2}},{"v":"@proteinjs/user/Session","value":{"packageName":"@proteinjs/user","name":"Session","filePath":"/home/runner/work/user/user/packages/user/src/tables/SessionTable.ts","qualifiedName":"@proteinjs/user/Session","typeParameters":[],"directParents":[{"packageName":"@proteinjs/db","name":"Record","filePath":null,"qualifiedName":"@proteinjs/db/Record","typeParameters":[],"directParents":null},{"packageName":"@proteinjs/user","name":"{\\n sessionId: string;\\n session: string;\\n expires: Date;\\n userEmail: string;\\n}","filePath":null,"qualifiedName":"@proteinjs/user/{\\n sessionId: string;\\n session: string;\\n expires: Date;\\n userEmail: string;\\n}","typeParameters":[],"directParents":null}],"sourceType":1}},{"v":"@proteinjs/user/SessionTable","value":{"packageName":"@proteinjs/user","name":"SessionTable","filePath":"/home/runner/work/user/user/packages/user/src/tables/SessionTable.ts","qualifiedName":"@proteinjs/user/SessionTable","isAbstract":false,"isStatic":false,"visibility":"public","properties":[{"name":"name","type":null,"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public"},{"name":"auth","type":{"packageName":"","name":"Table<Session>[\'auth\']","filePath":null,"qualifiedName":"/Table<Session>[\'auth\']","typeParameters":null,"directParents":null},"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public"},{"name":"columns","type":null,"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public"}],"methods":[],"typeParameters":[],"directParentInterfaces":[],"directParentClasses":[{"packageName":"@proteinjs/db","name":"Table","filePath":null,"qualifiedName":"@proteinjs/db/Table","isAbstract":false,"isStatic":false,"visibility":"public","properties":[],"methods":[],"typeParameters":["@proteinjs/user/Session"],"directParentInterfaces":[],"directParentClasses":[]}],"sourceType":2}},{"v":"@proteinjs/user/User","value":{"packageName":"@proteinjs/user","name":"User","filePath":"/home/runner/work/user/user/packages/user/src/tables/UserTable.ts","qualifiedName":"@proteinjs/user/User","typeParameters":[],"directParents":[{"packageName":"@proteinjs/db","name":"Record","filePath":null,"qualifiedName":"@proteinjs/db/Record","typeParameters":[],"directParents":null},{"packageName":"@proteinjs/user","name":"{\\n name: string;\\n email: string;\\n password: string;\\n passwordResetToken?: string | null;\\n passwordResetTokenExpiration?: Moment | null;\\n emailVerified: boolean;\\n /** Role names from the roles catalog (see `RolesCatalog`). Written ONLY by the Roles service. */\\n roles: string[];\\n invitedBy?: string | null;\\n}","filePath":null,"qualifiedName":"@proteinjs/user/{\\n name: string;\\n email: string;\\n password: string;\\n passwordResetToken?: string | null;\\n passwordResetTokenExpiration?: Moment | null;\\n emailVerified: boolean;\\n /** Role names from the roles catalog (see `RolesCatalog`). Written ONLY by the Roles service. */\\n roles: string[];\\n invitedBy?: string | null;\\n}","typeParameters":[],"directParents":null}],"sourceType":1}},{"v":"@proteinjs/user/UserTable","value":{"packageName":"@proteinjs/user","name":"UserTable","filePath":"/home/runner/work/user/user/packages/user/src/tables/UserTable.ts","qualifiedName":"@proteinjs/user/UserTable","isAbstract":false,"isStatic":false,"visibility":"public","properties":[{"name":"name","type":null,"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public"},{"name":"auth","type":{"packageName":"","name":"Table<User>[\'auth\']","filePath":null,"qualifiedName":"/Table<User>[\'auth\']","typeParameters":null,"directParents":null},"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public"},{"name":"columns","type":null,"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public"}],"methods":[],"typeParameters":[],"directParentInterfaces":[],"directParentClasses":[{"packageName":"@proteinjs/db","name":"Table","filePath":null,"qualifiedName":"@proteinjs/db/Table","isAbstract":false,"isStatic":false,"visibility":"public","properties":[],"methods":[],"typeParameters":["@proteinjs/user/User"],"directParentInterfaces":[],"directParentClasses":[]}],"sourceType":2}}],"edges":[{"v":"@proteinjs/user/RoleCatalogEntry","w":"@proteinjs/reflection/Loadable","value":"extends interface"},{"v":"@proteinjs/user/AdminRole","w":"@proteinjs/user/RoleCatalogEntry","value":"implements interface"},{"v":"@proteinjs/user/ScopedRecord","w":"@proteinjs/db/Record","value":"extends interface"},{"v":"@proteinjs/user/SharedRecord","w":"@proteinjs/db/Record","value":"extends interface"},{"v":"@proteinjs/user/UserRepo","w":"@proteinjs/user-auth/AuthenticatedUserRepo","value":"implements interface"},{"v":"@proteinjs/user/AccessInviteService","w":"@proteinjs/service/Service","value":"extends interface"},{"v":"@proteinjs/user/RolesService","w":"@proteinjs/service/Service","value":"extends interface"},{"v":"@proteinjs/user/SignupService","w":"@proteinjs/service/Service","value":"extends interface"},{"v":"@proteinjs/user/UpdateUserInfoService","w":"@proteinjs/service/Service","value":"extends interface"},{"v":"@proteinjs/user/AccessGrant","w":"@proteinjs/db/Record","value":"extends type"},{"v":"@proteinjs/user/AccessGrantTable","w":"@proteinjs/db/Table","value":"extends class"},{"v":"@proteinjs/user/AccessInvite","w":"@proteinjs/db/Record","value":"extends type"},{"v":"@proteinjs/user/AccessInviteTable","w":"@proteinjs/db/Table","value":"extends class"},{"v":"@proteinjs/user/Invite","w":"@proteinjs/db/Record","value":"extends type"},{"v":"@proteinjs/user/InviteTable","w":"@proteinjs/db/Table","value":"extends class"},{"v":"@proteinjs/user/RoleGrantEvent","w":"@proteinjs/db/Record","value":"extends type"},{"v":"@proteinjs/user/RoleGrantEventTable","w":"@proteinjs/db/Table","value":"extends class"},{"v":"@proteinjs/user/Session","w":"@proteinjs/db/Record","value":"extends type"},{"v":"@proteinjs/user/SessionTable","w":"@proteinjs/db/Table","value":"extends class"},{"v":"@proteinjs/user/User","w":"@proteinjs/db/Record","value":"extends type"},{"v":"@proteinjs/user/UserTable","w":"@proteinjs/db/Table","value":"extends class"}]}';
11
+ '{"options":{"directed":true,"multigraph":false,"compound":false},"nodes":[{"v":"@proteinjs/user/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"}]}';
14
12
 
15
13
  /** Generate Source Links */
16
14
 
15
+ import { MachineAccount } from '../src/MachineAccount';
17
16
  import { AdminRole } from '../src/RolesCatalog';
18
17
  import { UserRepo } from '../src/UserRepo';
19
18
  import { AccessGrantTable } from '../src/tables/AccessGrantTable';
20
19
  import { AccessInviteTable } from '../src/tables/AccessInviteTable';
20
+ import { AccountDeletionTable } from '../src/tables/AccountDeletionTable';
21
21
  import { InviteTable } from '../src/tables/InviteTable';
22
22
  import { RoleGrantEventTable } from '../src/tables/RoleGrantEventTable';
23
23
  import { SessionTable } from '../src/tables/SessionTable';
24
+ import { UserStatusEventTable } from '../src/tables/UserStatusEventTable';
24
25
  import { UserTable } from '../src/tables/UserTable';
25
26
 
26
27
  const sourceLinks = {
28
+ '@proteinjs/user/MachineAccount': MachineAccount,
27
29
  '@proteinjs/user/AdminRole': AdminRole,
28
30
  '@proteinjs/user/UserRepo': UserRepo,
29
31
  '@proteinjs/user/AccessGrantTable': AccessGrantTable,
30
32
  '@proteinjs/user/AccessInviteTable': AccessInviteTable,
33
+ '@proteinjs/user/AccountDeletionTable': AccountDeletionTable,
31
34
  '@proteinjs/user/InviteTable': InviteTable,
32
35
  '@proteinjs/user/RoleGrantEventTable': RoleGrantEventTable,
33
36
  '@proteinjs/user/SessionTable': SessionTable,
37
+ '@proteinjs/user/UserStatusEventTable': UserStatusEventTable,
34
38
  '@proteinjs/user/UserTable': UserTable,
35
39
  };
36
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.7.2",
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.28.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.8.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": "b859e64f927b11872dd70323a65f4ac541d27d69"
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
+ }
@@ -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
  *
@@ -95,16 +106,18 @@ export function withScopedRecordColumns<T extends ScopedRecord>(
95
106
  /**
96
107
  * Adds the `scope` column as the first column to the provided index.
97
108
  *
98
- * @param args Index to create
109
+ * @param args Index to create (`unique: true` for a scoped UNIQUE index — name it with a
110
+ * `_unique` suffix, matching schema-metadata classification)
99
111
  * @returns Index with `scope` column added first
100
112
  */
101
113
  export function createScopedIndex<T extends ScopedRecord>(args: {
102
114
  columns: (keyof T)[];
103
115
  name?: string;
104
- }): { columns: (keyof T)[]; name?: string } {
116
+ unique?: boolean;
117
+ }): { columns: (keyof T)[]; name?: string; unique?: boolean } {
105
118
  if (args.columns.includes('scope')) {
106
119
  return args;
107
120
  }
108
121
 
109
- return { columns: ['scope', ...args.columns], name: args.name };
122
+ return { columns: ['scope', ...args.columns], name: args.name, ...(args.unique ? { unique: true } : {}) };
110
123
  }
package/src/UserRepo.ts CHANGED
@@ -3,7 +3,23 @@ import { AuthenticatedUser, AuthenticatedUserRepo } from '@proteinjs/user-auth';
3
3
  import { User } from './tables/UserTable';
4
4
  import { USER_SESSION_CACHE_KEY } from './cacheKeys';
5
5
 
6
+ export type UserChangedListener = (user: User) => void;
7
+
6
8
  export class UserRepo implements AuthenticatedUserRepo {
9
+ private static userChangedListeners = new Set<UserChangedListener>();
10
+
11
+ /**
12
+ * Subscribe to user-record changes (every `setUser`, i.e. every session-cache refresh after a
13
+ * user-info mutation). Lets UI surfaces (avatar chips, account header) re-render without a
14
+ * reload. Returns an unsubscribe function.
15
+ */
16
+ static onUserChanged(listener: UserChangedListener): () => void {
17
+ UserRepo.userChangedListeners.add(listener);
18
+ return () => {
19
+ UserRepo.userChangedListeners.delete(listener);
20
+ };
21
+ }
22
+
7
23
  getUser(): Omit<User, 'roles'> & AuthenticatedUser {
8
24
  const user = Object.assign({}, Session.getDataByKey<User>(USER_SESSION_CACHE_KEY));
9
25
  // Roles are stored typed (`role_list`); rows that predate the roles backfill migration read
@@ -14,5 +30,14 @@ export class UserRepo implements AuthenticatedUserRepo {
14
30
 
15
31
  setUser(user: User) {
16
32
  Session.setDataByKey(USER_SESSION_CACHE_KEY, user);
33
+ UserRepo.userChangedListeners.forEach((listener) => {
34
+ // Standard emitter isolation: one subscriber throwing must not break the mutation path
35
+ // (or starve the remaining subscribers).
36
+ try {
37
+ listener(user);
38
+ } catch (error) {
39
+ console.error('UserRepo userChanged listener threw', error);
40
+ }
41
+ });
17
42
  }
18
43
  }
package/src/routes.ts CHANGED
@@ -6,6 +6,19 @@ export const routes: { [name: string]: { path: string; method: 'get' | 'post' |
6
6
  logout: { path: '/user/logout', method: 'get' },
7
7
  };
8
8
 
9
+ /**
10
+ * Avatar-photo URL contract (server route: user-server src/routes/avatar.ts): the path is stable
11
+ * per user, so responses are cached hard (max-age=86400, immutable) and the `v` query param busts
12
+ * the cache — pass the user's current `avatarFileId`, which changes on every photo update. Users
13
+ * with an emoji avatar or no avatar answer 404 (clients render emoji/initials from the user
14
+ * record; the route serves photos only).
15
+ */
16
+ export const avatarRoute = {
17
+ path: (userId: string, avatarFileId: string) =>
18
+ `/avatar/${encodeURIComponent(userId)}?v=${encodeURIComponent(avatarFileId)}`,
19
+ method: 'get' as const,
20
+ };
21
+
9
22
  export const uiRoutes = {
10
23
  auth: {
11
24
  login: 'login',
@@ -0,0 +1,28 @@
1
+ import { Service, serviceFactory } from '@proteinjs/service';
2
+ import { Moment } from 'moment';
3
+
4
+ export const getAccountDeletionService = serviceFactory<AccountDeletionService>(
5
+ '@proteinjs/user/AccountDeletionService'
6
+ );
7
+
8
+ /**
9
+ * In-app account deletion, archive-then-purge: the synchronous call deactivates the account
10
+ * ("gone right away" — shares revoked both directions, sessions killed), and the background
11
+ * purge walker erases everything after the grace window. Logging back in during grace cancels
12
+ * (full restore, including shares — the login route runs the cancel hook, not this service).
13
+ *
14
+ * Acts ONLY on the session user — no target parameter, so the only authz surface beyond the
15
+ * door is the password re-auth inside the call. Door: any authenticated user (`allUsers`,
16
+ * declared on the implementation's serviceMetadata).
17
+ */
18
+ export interface AccountDeletionService extends Service {
19
+ /**
20
+ * Deactivate the session user's account and schedule the purge. Idempotent: a re-call after a
21
+ * partial failure resumes from the stored deletion manifest (never re-enumerates). The
22
+ * caller's sessions are killed last — the response is the last authenticated exchange.
23
+ *
24
+ * @param password re-auth — must match the session user's password
25
+ * @returns the purge date, for the UI's confirmation copy
26
+ */
27
+ requestDeletion(password: string): Promise<{ purgeAfter: Moment }>;
28
+ }