@nest-boot/auth 8.0.8-beta.0 → 8.0.9-beta.1

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 (136) hide show
  1. package/README.md +74 -34
  2. package/dist/auth.middleware.d.ts +0 -4
  3. package/dist/auth.middleware.js +17 -21
  4. package/dist/auth.middleware.js.map +1 -1
  5. package/dist/auth.module.js +5 -5
  6. package/dist/auth.module.js.map +1 -1
  7. package/dist/connections/index.d.ts +1 -1
  8. package/dist/connections/index.js +1 -1
  9. package/dist/connections/index.js.map +1 -1
  10. package/dist/connections/member-api-key.connection-definition.d.ts +13 -0
  11. package/dist/connections/{workspace-api-key.connection-definition.js → member-api-key.connection-definition.js} +11 -11
  12. package/dist/connections/member-api-key.connection-definition.js.map +1 -0
  13. package/dist/connections/member.connection-definition.js +1 -0
  14. package/dist/connections/member.connection-definition.js.map +1 -1
  15. package/dist/entities/auth-entity-map.d.ts +2 -2
  16. package/dist/entities/auth-entity-map.js +2 -2
  17. package/dist/entities/auth-entity-map.js.map +1 -1
  18. package/dist/entities/index.d.ts +3 -3
  19. package/dist/entities/index.js +3 -3
  20. package/dist/entities/index.js.map +1 -1
  21. package/dist/entities/{workspace-api-key.entity.d.ts → member-api-key.entity.d.ts} +7 -5
  22. package/dist/entities/{workspace-api-key.entity.js → member-api-key.entity.js} +37 -28
  23. package/dist/entities/member-api-key.entity.js.map +1 -0
  24. package/dist/entities/member.entity.d.ts +6 -2
  25. package/dist/entities/member.entity.js +15 -2
  26. package/dist/entities/member.entity.js.map +1 -1
  27. package/dist/enums/index.d.ts +2 -1
  28. package/dist/enums/index.js +2 -1
  29. package/dist/enums/index.js.map +1 -1
  30. package/dist/enums/{workspace-api-key-permission.enum.d.ts → member-api-key-permission.enum.d.ts} +2 -2
  31. package/dist/enums/{workspace-api-key-permission.enum.js → member-api-key-permission.enum.js} +4 -4
  32. package/dist/enums/member-api-key-permission.enum.js.map +1 -0
  33. package/dist/enums/member-type.enum.d.ts +7 -0
  34. package/dist/enums/member-type.enum.js +11 -0
  35. package/dist/enums/member-type.enum.js.map +1 -0
  36. package/dist/index.d.ts +8 -7
  37. package/dist/index.js +8 -7
  38. package/dist/index.js.map +1 -1
  39. package/dist/infrastructure/api-key-authentication.service.js +25 -8
  40. package/dist/infrastructure/api-key-authentication.service.js.map +1 -1
  41. package/dist/infrastructure/auth-ability.factory.js +17 -2
  42. package/dist/infrastructure/auth-ability.factory.js.map +1 -1
  43. package/dist/infrastructure/auth-enum-registry.js +3 -3
  44. package/dist/infrastructure/auth-enum-registry.js.map +1 -1
  45. package/dist/infrastructure/create-auth-instance.js +2 -2
  46. package/dist/infrastructure/create-auth-instance.js.map +1 -1
  47. package/dist/infrastructure/request-identity.d.ts +2 -0
  48. package/dist/infrastructure/request-identity.js +26 -10
  49. package/dist/infrastructure/request-identity.js.map +1 -1
  50. package/dist/inputs/add-member.input.d.ts +13 -2
  51. package/dist/inputs/add-member.input.js +34 -3
  52. package/dist/inputs/add-member.input.js.map +1 -1
  53. package/dist/inputs/{create-workspace-api-key.input.d.ts → create-member-api-key.input.d.ts} +6 -4
  54. package/dist/inputs/{create-workspace-api-key.input.js → create-member-api-key.input.js} +20 -13
  55. package/dist/inputs/create-member-api-key.input.js.map +1 -0
  56. package/dist/inputs/create-user-api-key.input.d.ts +1 -1
  57. package/dist/inputs/create-user-api-key.input.js +1 -1
  58. package/dist/inputs/create-user-api-key.input.js.map +1 -1
  59. package/dist/inputs/{update-workspace-api-key.input.d.ts → update-member-api-key.input.d.ts} +3 -3
  60. package/dist/inputs/{update-workspace-api-key.input.js → update-member-api-key.input.js} +11 -11
  61. package/dist/inputs/update-member-api-key.input.js.map +1 -0
  62. package/dist/interfaces/ability-context.interface.d.ts +3 -3
  63. package/dist/interfaces/add-member-options.interface.d.ts +1 -1
  64. package/dist/interfaces/auth-module-api-key-options.interface.d.ts +2 -2
  65. package/dist/interfaces/auth-module-api-key-scope-options.interface.d.ts +2 -2
  66. package/dist/interfaces/create-api-key-options.interface.d.ts +1 -1
  67. package/dist/interfaces/create-member-api-key-options.interface.d.ts +7 -0
  68. package/dist/interfaces/create-member-api-key-options.interface.js +2 -0
  69. package/dist/interfaces/create-member-api-key-options.interface.js.map +1 -0
  70. package/dist/interfaces/member-api-key-validation.interface.d.ts +17 -0
  71. package/dist/interfaces/member-api-key-validation.interface.js +2 -0
  72. package/dist/interfaces/member-api-key-validation.interface.js.map +1 -0
  73. package/dist/interfaces/request-permissions.interface.d.ts +1 -1
  74. package/dist/objects/{create-workspace-api-key-result.object.d.ts → create-member-api-key-result.object.d.ts} +3 -3
  75. package/dist/objects/{create-workspace-api-key-result.object.js → create-member-api-key-result.object.js} +10 -10
  76. package/dist/objects/create-member-api-key-result.object.js.map +1 -0
  77. package/dist/objects/member-api-key-permission-option.object.d.ts +10 -0
  78. package/dist/objects/{workspace-api-key-permission-option.object.js → member-api-key-permission-option.object.js} +12 -12
  79. package/dist/objects/member-api-key-permission-option.object.js.map +1 -0
  80. package/dist/resolvers/member-api-key.resolver.d.ts +25 -0
  81. package/dist/resolvers/{workspace-api-key.resolver.js → member-api-key.resolver.js} +38 -34
  82. package/dist/resolvers/member-api-key.resolver.js.map +1 -0
  83. package/dist/resolvers/member.resolver.js +11 -1
  84. package/dist/resolvers/member.resolver.js.map +1 -1
  85. package/dist/resolvers/workspace.resolver.d.ts +6 -6
  86. package/dist/resolvers/workspace.resolver.js +9 -9
  87. package/dist/resolvers/workspace.resolver.js.map +1 -1
  88. package/dist/services/member-api-key.service.d.ts +43 -0
  89. package/dist/services/{workspace-api-key.service.js → member-api-key.service.js} +82 -52
  90. package/dist/services/member-api-key.service.js.map +1 -0
  91. package/dist/services/member.service.d.ts +4 -2
  92. package/dist/services/member.service.js +46 -17
  93. package/dist/services/member.service.js.map +1 -1
  94. package/dist/services/user-api-key.service.js +3 -1
  95. package/dist/services/user-api-key.service.js.map +1 -1
  96. package/dist/services/workspace.service.d.ts +0 -2
  97. package/dist/services/workspace.service.js +1 -11
  98. package/dist/services/workspace.service.js.map +1 -1
  99. package/dist/tsconfig.tsbuildinfo +1 -1
  100. package/dist/types/api-key-validation.type.d.ts +2 -2
  101. package/dist/types/api-key.type.d.ts +3 -3
  102. package/dist/utils/api-key-permissions.util.d.ts +2 -2
  103. package/dist/utils/api-key-permissions.util.js +1 -1
  104. package/dist/utils/api-key-permissions.util.js.map +1 -1
  105. package/dist/utils/build-request-ability.util.js +6 -16
  106. package/dist/utils/build-request-ability.util.js.map +1 -1
  107. package/dist/utils/permission-grants.util.js +2 -0
  108. package/dist/utils/permission-grants.util.js.map +1 -1
  109. package/dist/utils/resolve-effective-permissions.util.d.ts +1 -1
  110. package/dist/utils/resolve-effective-permissions.util.js +1 -1
  111. package/dist/utils/resolve-effective-permissions.util.js.map +1 -1
  112. package/dist/utils/resolve-request-member.util.d.ts +3 -0
  113. package/dist/utils/resolve-request-member.util.js +23 -0
  114. package/dist/utils/resolve-request-member.util.js.map +1 -0
  115. package/dist/utils/resolve-request-permissions.util.js +11 -16
  116. package/dist/utils/resolve-request-permissions.util.js.map +1 -1
  117. package/dist/workspace.constants.d.ts +3 -3
  118. package/dist/workspace.constants.js +6 -2
  119. package/dist/workspace.constants.js.map +1 -1
  120. package/package.json +17 -17
  121. package/dist/connections/workspace-api-key.connection-definition.d.ts +0 -13
  122. package/dist/connections/workspace-api-key.connection-definition.js.map +0 -1
  123. package/dist/entities/workspace-api-key.entity.js.map +0 -1
  124. package/dist/enums/workspace-api-key-permission.enum.js.map +0 -1
  125. package/dist/inputs/create-workspace-api-key.input.js.map +0 -1
  126. package/dist/inputs/update-workspace-api-key.input.js.map +0 -1
  127. package/dist/interfaces/workspace-api-key-validation.interface.d.ts +0 -11
  128. package/dist/interfaces/workspace-api-key-validation.interface.js +0 -2
  129. package/dist/interfaces/workspace-api-key-validation.interface.js.map +0 -1
  130. package/dist/objects/create-workspace-api-key-result.object.js.map +0 -1
  131. package/dist/objects/workspace-api-key-permission-option.object.d.ts +0 -10
  132. package/dist/objects/workspace-api-key-permission-option.object.js.map +0 -1
  133. package/dist/resolvers/workspace-api-key.resolver.d.ts +0 -25
  134. package/dist/resolvers/workspace-api-key.resolver.js.map +0 -1
  135. package/dist/services/workspace-api-key.service.d.ts +0 -41
  136. package/dist/services/workspace-api-key.service.js.map +0 -1
package/README.md CHANGED
@@ -43,7 +43,7 @@ contexts are preserved.
43
43
  ## Built-in entities
44
44
 
45
45
  Auth owns the concrete `User`, `Account`, `Session`, `Verification`,
46
- `Workspace`, `Member`, `Invitation`, `UserApiKey` and `WorkspaceApiKey` entities, their GraphQL
46
+ `Workspace`, `Member`, `Invitation`, `UserApiKey` and `MemberApiKey` entities, their GraphQL
47
47
  metadata, relations, RLS policies, and connections. There are no public auth
48
48
  `Base*` classes or `AuthModuleOptions.entities` overrides.
49
49
 
@@ -77,7 +77,7 @@ Service methods use explicit domain names without deprecated aliases:
77
77
  - `UserService.setUserRoles` replaces roles, while `setUserPermissions` replaces
78
78
  direct grants. `getEffectiveUserPermissions` and
79
79
  `MemberService.getEffectiveMemberPermissions` include role-derived grants.
80
- - `UserApiKeyService` and `WorkspaceApiKeyService` uses `createUserApiKey`, `updateUserApiKey`, `deleteUserApiKey`
80
+ - `UserApiKeyService` and `MemberApiKeyService` uses `createUserApiKey`, `updateUserApiKey`, `deleteUserApiKey`
81
81
  and their workspace counterparts, matching its existing lookup names.
82
82
  - `MemberService.getMemberByUser(workspace, user)` finds only active
83
83
  memberships; `getMember(id)` reads a member in the request's selected workspace.
@@ -107,7 +107,7 @@ pagination behavior are unchanged.
107
107
 
108
108
  Use `WorkspaceService.getWorkspaceConnectionByUser(user, args)` and
109
109
  `MemberService.getMemberConnectionByWorkspace(workspace, args)` for workspace/member connections, and
110
- `UserApiKeyService.getUserApiKeyConnection(user, args)` / `WorkspaceApiKeyService.getWorkspaceApiKeyConnection(workspace, args)`
110
+ `UserApiKeyService.getUserApiKeyConnection(user, args)` / `MemberApiKeyService.getMemberApiKeyConnection(workspace, args)`
111
111
  for API-key connections. Services own authorization, query scopes and
112
112
  `ConnectionManager` execution. User, session, workspace, member, API-key and
113
113
  invitation connection reads retain the request's native RLS scope. API-key ownership and credential permission ceilings still apply.
@@ -131,7 +131,7 @@ Reading another inviter's User additionally requires global user-read permission
131
131
  `InvitationService.getInvitation(id)` is the RLS-backed single-invitation lookup.
132
132
  It allows the recipient's session or the selected workspace's `member:invite`
133
133
  permission, then checks recipient ownership or workspace ownership and instance-level ability.
134
- Workspace API keys can use the workspace path without a user identity; failing
134
+ Member API keys can use the workspace path without a user identity; failing
135
135
  recipient authorization does not prevent independently authorized workspace access.
136
136
  It uses the request manager without clearing its native session or disabling filters.
137
137
  Applications must define recipient SELECT policies
@@ -161,27 +161,27 @@ connection definition is required. Its GraphQL transport exposes these connectio
161
161
 
162
162
  - [x] Restrict the permissions supplied to configured user and workspace
163
163
  Ability builders: User Keys use the intersection with their principal's
164
- effective permissions, while Workspace Keys use their own permissions.
164
+ effective permissions; Member Keys likewise intersect with their member's current grants. Empty key permissions inherit the owner's full grants.
165
165
  - [x] Add one shared permission normalizer and validator for configured user and
166
166
  workspace permission catalogs. Reject empty, duplicate, and unknown
167
167
  permission values at service boundaries.
168
168
  - [x] Apply permission-catalog validation when creating users and workspace
169
169
  members and when calling `setUserPermissions()` or
170
170
  `setMemberPermissions()`.
171
- - [x] Validate API-key permissions by owner type: Workspace Keys may contain
171
+ - [x] Validate API-key permissions by owner type: Member Keys may contain
172
172
  workspace permissions only; User Keys may contain configured user and
173
173
  workspace permissions.
174
174
  - [x] Prevent API-key privilege escalation on creation and update. User-scoped
175
175
  permissions must not exceed the owning user's effective permissions;
176
- Workspace Key permissions must not exceed the issuing member's effective
177
- workspace permissions. User Key access to a workspace must continue to be
176
+ Member Key permissions must not exceed both the owning member's and the issuer's
177
+ effective workspace permissions. User Key access to a workspace must continue to be
178
178
  intersected with the user's current membership permissions at request
179
179
  time.
180
180
  - [x] Add module-level API-key defaults and grant limits, and prevent an
181
181
  authenticating API key from delegating permissions it does not have.
182
182
  - [x] Enforce user and workspace abilities inside authorization-sensitive
183
183
  `UserService`, `WorkspaceService`, `MemberService`,
184
- `InvitationService`, and `UserApiKeyService` and `WorkspaceApiKeyService` operations, so
184
+ `InvitationService`, and `UserApiKeyService` and `MemberApiKeyService` operations, so
185
185
  direct service injection cannot bypass Resolver or Controller metadata.
186
186
  Authentication middleware primitives remain internal identity-resolution
187
187
  paths rather than privileged business operations.
@@ -264,6 +264,44 @@ GraphQL registration uses `AuthService.signUpPayload` and returns only
264
264
  the registered entity or grant authentication. The original DTO-returning
265
265
  AuthService methods remain available.
266
266
 
267
+ ## Member API-key creation
268
+
269
+ `MemberApiKeyService.createMemberApiKey(workspace, { member, ...options })`
270
+ accepts an existing member entity or ID. GraphQL accepts `input.memberId`.
271
+ Only the caller's own USER member or an active SERVICE_ACCOUNT member in the
272
+ selected workspace may own the new key.
273
+
274
+ Omitting the owner uses the current member. The example form defaults to **You**,
275
+ passing the current member ID. Choosing **Service account** displays a searchable
276
+ account dropdown. If no account is selected, the frontend first calls `addMember`
277
+ to create a service account named after the key, then calls `createMemberApiKey`
278
+ with its `memberId`. Account creation requires `service-account:write`; key creation
279
+ requires `member-api-key:write`. These are separate operations. With selected
280
+ permissions, `addMember` receives `roles: []` and those direct permissions. With
281
+ no selection, it omits roles and permissions to use the configured default
282
+ workspace role (MEMBER by default).
283
+
284
+ Empty API-key permissions (`[]`, including explicit `null` normalized to `[]`)
285
+ inherit the owning user's or member's complete current permissions. Non-empty
286
+ key permissions intersect with the owner's grants. Existing empty-permission
287
+ keys follow the same rule. Configured `allowedPermissions` limits explicit
288
+ selections; it does not cap inherited owner grants. Restricted credentials
289
+ cannot create, read, change, or delete keys that inherit all owner permissions;
290
+ their connection queries also exclude inherited keys.
291
+
292
+ ## Service account permissions
293
+
294
+ `member:read` and `member:write` apply to USER members. SERVICE_ACCOUNT members
295
+ use `service-account:read` and `service-account:write` for profile reads and
296
+ creation, update, and deletion. The default OWNER and ADMIN workspace roles
297
+ include both service account permissions; MEMBER does not. Member pagination
298
+ and lookup only include types the caller can read.
299
+
300
+ Changing service account roles or direct permissions also requires
301
+ `member:set-roles` or `member:set-permissions`, respectively, together with
302
+ `service-account:write`. Grant ceilings still apply. API-key management keeps
303
+ its separate `member-api-key:read` and `member-api-key:write` permissions.
304
+
267
305
  ## Scoped management writes
268
306
 
269
307
  Ordinary API-key update/delete, user update/delete and role/permission setters,
@@ -285,8 +323,8 @@ dedicated ownership-transfer operation is provided. API-key update/delete checks
285
323
  type and the loaded instance so conditional abilities remain enforced.
286
324
 
287
325
  API-key writes use `updateUserApiKey(id, input)`,
288
- `updateWorkspaceApiKey(id, input)`, `deleteUserApiKey(id)` and
289
- `deleteWorkspaceApiKey(id)`. The stored owner determines authorization and
326
+ `updateMemberApiKey(id, input)`, `deleteUserApiKey(id)` and
327
+ `deleteMemberApiKey(id)`. The stored owner determines authorization and
290
328
  permission normalization. User and member management methods accept either an
291
329
  ID or an entity; `updateWorkspace(id, input)` and `deleteWorkspace(id)`
292
330
  also accept their existing entity arguments. Passing an ID does not require an
@@ -296,14 +334,16 @@ Apply the example's `Initial → generated schema migrations` before using
296
334
  these write paths. Custom applications must supply equivalent grants and RLS
297
335
  policies for their own data-isolation requirements. Default table privileges do not protect individual columns; Services exclude credential hashes and reject API-key ownership changes.
298
336
  Workspace deletion permanently removes the selected workspace through the request's
299
- RLS-scoped manager. Foreign keys cascade to members, invitations and workspace API
337
+ RLS-scoped manager. Foreign keys cascade to members, invitations and member API
300
338
  keys; users and personal credentials remain. There is no deletion-specific database
301
339
  context or restore operation. Successful deletion clears the request's workspace
302
340
  identity and ability. Deleted keys no longer retain usage timestamps; durable
303
341
  deletion auditing belongs in a separate application audit log.
304
342
 
305
- Database request contexts use `app.user.id` and `app.workspace.id`; the previous
306
- `app.user` and `app.workspace` keys are no longer consumed by scope policies.
343
+ Database request contexts use `app.user.id`, `app.workspace.id`, and `app.member.id`.
344
+ `app.member.id` identifies the active member in the selected workspace for authenticated
345
+ requests, including service accounts; it is empty when no active member is present
346
+ and is cleared when workspace access or authentication is revoked.
307
347
  Application permissions are not passed to the database. Services enforce Ability
308
348
  checks, custom permission names and API-key ceilings. RLS retains identity-based
309
349
  ownership and workspace isolation, not permission-name
@@ -313,15 +353,15 @@ direct ORM/SQL access does not enforce those application authorization rules.
313
353
  Permission identifiers use lowercase `resource:action` names. Catalog membership,
314
354
  grant ceilings and API-key intersections use exact string equality; invalid
315
355
  names are rejected rather than case-converted. Auth owns the mappings for
316
- `user:*`, `session:*`, `workspace:*`, `member:*`, and scoped API-key
356
+ `user:*`, `session:*`, `workspace:*`, `member:*`, `service-account:*`, and scoped API-key
317
357
  permissions. Custom permission names only grant business abilities through
318
358
  explicit permission-bound rules; they cannot redefine built-in auth operations.
319
359
 
320
360
  Scoped user deletion authorizes the root DELETE with Service checks and RLS;
321
361
  auth dependants are cleaned up atomically by database foreign-key cascades.
322
- `UserApiKey` and `WorkspaceApiKey` have separate tables and required `user` or `workspace` foreign keys, respectively. Accounts, sessions (including impersonation sessions),
362
+ `UserApiKey` and `MemberApiKey` have separate tables and required `user` or `member` foreign keys, respectively. Accounts, sessions (including impersonation sessions),
323
363
  personal keys, memberships and sent invitations cascade from the deleted user.
324
- Workspaces and workspace-owned keys survive, even if no owner remains.
364
+ Deleting memberships also removes their member keys. Workspaces and other members' keys survive.
325
365
  Generate and apply these constraints; child deletes can be silently filtered by RLS.
326
366
  Authentication bootstrap,
327
367
  creation, invitation acceptance, impersonation and credential administration
@@ -413,7 +453,7 @@ field resolvers may target these classes without replacing built-in fields.
413
453
 
414
454
  ## Native query migration
415
455
 
416
- - Single-key queries move from root `userApiKey(id)` to `User.apiKey(id)` and from root `apiKey(id)` to `Workspace.apiKey(id)`. They resolve `UserApiKey` and `WorkspaceApiKey`, respectively, with nullable field results and pass their parent to `UserApiKeyService` and `WorkspaceApiKeyService`; mutation authorization is unchanged (see the operation naming migration below). Query through `currentUser { apiKey(id: ...) { id } }` or `currentWorkspace { apiKey(id: ...) { id } }`. Service authorization, ownership filters, permission ceilings and request RLS remain in effect.
456
+ - Single-key queries move from root `userApiKey(id)` to `User.apiKey(id)` and from root `apiKey(id)` to `Workspace.apiKey(id)`. They resolve `UserApiKey` and `MemberApiKey`, respectively, with nullable field results and pass their parent to `UserApiKeyService` and `MemberApiKeyService`; mutation authorization is unchanged (see the operation naming migration below). Query through `currentUser { apiKey(id: ...) { id } }` or `currentWorkspace { apiKey(id: ...) { id } }`. Service authorization, ownership filters, permission ceilings and request RLS remain in effect.
417
457
  - `users` uses `UserConnectionArgs` / `UserConnection` (first/after or last/before, query/filter/orderBy). `ListUsersInput` and `UserListType` are removed.
418
458
  - `User.accounts` now returns `AccountConnection!` through `AccountService.getAccountConnectionByUser(user, args)`: use `currentUser { accounts(first: 20) { edges { node { id providerId scopes } } pageInfo { hasNextPage endCursor } } }`. The array shape and `UserService.listUserAccounts` are removed. Account inspection requires the owning browser session; API keys are rejected and credentials are excluded.
419
459
  - Registration/sign-in payloads reference the built-in `User`, not `AuthUserType`. The entity-oriented AuthService methods establish the newly issued session and refresh RLS and abilities before resolving nested fields. Registration without a session does not authenticate the request; protected nested fields still require authentication.
@@ -465,8 +505,8 @@ preserving permitted profile edits. `MemberService.updateMember` checks each
465
505
  supplied field before updating and again under the row lock. Frontends should use
466
506
  `ability.can("write", member, "status")` for enable/disable actions.
467
507
 
468
- Personal keys use `user-api-key:read/write`; workspace keys use
469
- `workspace-api-key:read/write`. Write covers creation, updates, enabling/disabling,
508
+ Personal keys use `user-api-key:read/write`; member keys use
509
+ `member-api-key:read/write`. Write covers creation, updates, enabling/disabling,
470
510
  and deletion without granting reads.
471
511
  User administrators and workspace owners inherit them; ordinary users and
472
512
  workspace administrators require explicit role or direct grants. Existing
@@ -474,7 +514,7 @@ ownership checks and self-service operations remain enforced by Services.
474
514
 
475
515
  The `userRoles` and `workspaceRoles` queries return `{ role, grantable }` objects;
476
516
  `userPermissions` and `workspacePermissions` return `{ permission, grantable }`.
477
- `userApiKeyPermissions` and `workspaceApiKeyPermissions` also return
517
+ `userApiKeyPermissions` and `memberApiKeyPermissions` also return
478
518
  `{ permission, grantable, default }` entries. `grantable` includes the API-key
479
519
  allowlist and issuer's grant ceiling; `default` reflects configured defaults.
480
520
  Editors preselect only `default && grantable`. `member:invite` allows querying,
@@ -482,10 +522,10 @@ creating, and canceling workspace invitations; it does not grant member writes.
482
522
  Accepting or rejecting one's own invitation requires the recipient's user session,
483
523
  not invitation management permission.
484
524
 
485
- Configure these independently with `apiKey.user` and `apiKey.workspace`, each
525
+ Configure these independently with `apiKey.user` and `apiKey.member`, each
486
526
  containing `defaultPermissions` and `allowedPermissions`. Defaults are empty;
487
- omitted allowlists permit the scope's catalog, while `[]` permits no grants.
488
- User keys support both catalogs; workspace keys only support workspace grants.
527
+ omitted allowlists permit the scope's catalog, while `allowedPermissions: []` permits no explicit selections. Empty key `permissions` inherit the owner's complete grants.
528
+ User keys support both catalogs; member keys only support workspace grants.
489
529
  The former flat API-key settings are rejected with a migration message.
490
530
 
491
531
  Module permission catalogs and role maps extend built-in defaults. Same-name
@@ -526,7 +566,7 @@ removing actor arguments does not remove Service authorization.
526
566
  `updateWorkspace(id: ID!, input: UpdateWorkspaceInput!)`,
527
567
  and `deleteWorkspace(id: ID!)`
528
568
  now require an explicit workspace ID, which must match the selected workspace.
529
- User management mutation names and inputs are unchanged; see the naming migration below for workspace API keys.
569
+ User management mutation names and inputs are unchanged; see the naming migration below for member API keys.
530
570
  API-key update/delete Service methods no longer take user/workspace arguments.
531
571
 
532
572
  `createWorkspace` returns `CreateWorkspacePayload { id: ID! }` and
@@ -617,19 +657,19 @@ and usage tracking.
617
657
 
618
658
  This is a breaking schema change; no deprecated aliases are retained:
619
659
 
620
- | Removed name | Replacement |
621
- | -------------------- | ----------------------- |
622
- | `createApiKey` | `createWorkspaceApiKey` |
623
- | `updateApiKey` | `updateWorkspaceApiKey` |
624
- | `deleteApiKey` | `deleteWorkspaceApiKey` |
625
- | `currentAuthSession` | `currentSession` |
626
- | `removeWorkspace` | `deleteWorkspace` |
660
+ | Removed name | Replacement |
661
+ | -------------------- | -------------------- |
662
+ | `createApiKey` | `createMemberApiKey` |
663
+ | `updateApiKey` | `updateMemberApiKey` |
664
+ | `deleteApiKey` | `deleteMemberApiKey` |
665
+ | `currentAuthSession` | `currentSession` |
666
+ | `removeWorkspace` | `deleteWorkspace` |
627
667
 
628
- API-key entities, services, resolvers, connections, inputs, and creation results are split into `UserApiKey` and `WorkspaceApiKey` variants. Use `CreateUserApiKeyInput`, `UpdateUserApiKeyInput`, `CreateUserApiKeyResult`, and their `Workspace` counterparts. Permissions use separate `UserApiKeyPermission` and `WorkspaceApiKeyPermission` GraphQL enums; stored values stay unchanged.
668
+ API-key entities, services, resolvers, connections, inputs, and creation results are split into `UserApiKey` and `MemberApiKey` variants. Use `CreateUserApiKeyInput`, `UpdateUserApiKeyInput`, `CreateUserApiKeyResult`, and their `Workspace` counterparts. Permissions use separate `UserApiKeyPermission` and `MemberApiKeyPermission` GraphQL enums; stored values stay unchanged.
629
669
 
630
670
  API-key enums cover the full scope catalogs, independently of the current grant
631
671
  allowlist, so existing keys remain readable after the allowlist is tightened.
632
- Workspace keys may carry `member:invite` to read and cancel invitations.
672
+ Member keys may carry `member:invite` to read and cancel invitations.
633
673
  Creating an invitation also requires a user as sender; use a personal API key
634
674
  for invitation creation.
635
675
 
@@ -31,8 +31,4 @@ export declare class AuthMiddleware implements NestMiddleware {
31
31
  private resolveSession;
32
32
  private resolveApiKey;
33
33
  private resolveMember;
34
- private setApiKey;
35
- private updateSessionContext;
36
- private setUser;
37
- private setWorkspace;
38
34
  }
@@ -102,7 +102,7 @@ let AuthMiddleware = class AuthMiddleware {
102
102
  session: data.session,
103
103
  });
104
104
  await this.resolveMember();
105
- this.updateSessionContext();
105
+ RequestIdentity.syncDatabase(this.em);
106
106
  RequestIdentity.refresh(this.options);
107
107
  }
108
108
  catch (error) {
@@ -130,7 +130,7 @@ let AuthMiddleware = class AuthMiddleware {
130
130
  if (!hasSession)
131
131
  await this.resolveApiKey(req);
132
132
  await this.resolveMember();
133
- this.updateSessionContext();
133
+ RequestIdentity.syncDatabase(this.em);
134
134
  next();
135
135
  }
136
136
  catch (error) {
@@ -155,14 +155,13 @@ let AuthMiddleware = class AuthMiddleware {
155
155
  id: workspaceId,
156
156
  });
157
157
  if (workspace)
158
- this.setWorkspace(workspace);
158
+ RequestIdentity.stage({ workspace });
159
159
  }
160
160
  async resolveSession() {
161
161
  const data = await this.sessionService.getCurrentAuthenticatedSession();
162
162
  if (!data)
163
163
  return false;
164
- this.setUser(data.user);
165
- RequestIdentity.stage({ session: data.session });
164
+ RequestIdentity.stage({ user: data.user, session: data.session });
166
165
  return true;
167
166
  }
168
167
  async resolveApiKey(req) {
@@ -170,18 +169,27 @@ let AuthMiddleware = class AuthMiddleware {
170
169
  if (!plaintextApiKey)
171
170
  return;
172
171
  const validation = await this.apiKeyService.validate(plaintextApiKey);
173
- this.setApiKey(validation.apiKey);
174
172
  if (validation.ownerType === "user") {
175
- this.setUser(validation.user);
173
+ RequestIdentity.stage({
174
+ apiKey: validation.apiKey,
175
+ user: validation.user,
176
+ });
176
177
  return;
177
178
  }
178
179
  const selectedWorkspace = RequestContext.get(Workspace);
179
180
  if (selectedWorkspace && selectedWorkspace.id !== validation.workspace.id) {
180
- throw new UnauthorizedException("Workspace API key does not belong to the selected workspace");
181
+ throw new UnauthorizedException("Member API key does not belong to the selected workspace");
181
182
  }
182
- this.setWorkspace(validation.workspace);
183
+ RequestIdentity.stage({
184
+ apiKey: validation.apiKey,
185
+ user: validation.user,
186
+ member: validation.member,
187
+ workspace: validation.workspace,
188
+ });
183
189
  }
184
190
  async resolveMember() {
191
+ if (RequestContext.get(Member))
192
+ return;
185
193
  const user = RequestContext.get(User);
186
194
  const workspace = RequestContext.get(Workspace);
187
195
  if (!user || !workspace)
@@ -195,18 +203,6 @@ let AuthMiddleware = class AuthMiddleware {
195
203
  return;
196
204
  RequestIdentity.stage({ member });
197
205
  }
198
- setApiKey(apiKey) {
199
- RequestIdentity.stage({ apiKey });
200
- }
201
- updateSessionContext() {
202
- RequestIdentity.syncDatabase(this.em);
203
- }
204
- setUser(user) {
205
- RequestIdentity.stage({ user });
206
- }
207
- setWorkspace(workspace) {
208
- RequestIdentity.stage({ workspace });
209
- }
210
206
  };
211
207
  AuthMiddleware = __decorate([
212
208
  Injectable(),
@@ -1 +1 @@
1
- {"version":3,"file":"auth.middleware.js","sourceRoot":"","sources":["../src/auth.middleware.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AACrE,OAAO,EACL,mBAAmB,EACnB,MAAM,EACN,UAAU,EAEV,qBAAqB,GACtB,MAAM,gBAAgB,CAAC;AAGxB,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAEnE,OAAO,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AACvD,OAAO,EAAE,IAAI,EAAE,MAAM,2BAA2B,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAC3D,OAAO,EAAE,2BAA2B,EAAE,MAAM,oDAAoD,CAAC;AACjG,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AACvE,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAE/D,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAChE,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAEzD,0EAA0E;AAEnE,IAAM,cAAc,GAApB,MAAM,cAAc;IAuGN;IACA;IACA;IACA;IAzGnB,0FAA0F;IAC1F,6BAA6B;QAC3B,IAAI,IAAI,CAAC,EAAE,CAA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AC,KAAK,CAAC;YACpB,MAAM,EAAE,UAAU,CAAC,MAAM;YACzB,IAAI,EAAE,UAAU,CAAC,IAAI;YACrB,MAAM,EAAE,UAAU,CAAC,MAAM;YACzB,SAAS,EAAE,UAAU,CAAC,SAAS;SAChC,CAAC,CAAC;IACL,CAAC;IAEO,KAAK,CAAC,aAAa;QACzB,IAAI,cAAc,CAAC,GAAG,CAAC,MAAM,CAAC;YAAE,OAAO;QACvC,MAAM,IAAI,GAAG,cAAc,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QACtC,MAAM,SAAS,GAAG,cAAc,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;QAChD,IAAI,CAAC,IAAI,IAAI,CAAC,SAAS;YAAE,OAAO;QAEhC,MAAM,MAAM,GAAG,MAAM,YAAY,CAC/B,IAAI,CAAC,EAAE,EACP,KAAK,EAAE,EAAE,EAAE,EAAE,CACX,MAAM,EAAE,CAAC,OAAO,CAAC,MAAM,EAAE;YACvB,MAAM,EAAE,QAAQ;YAChB,IAAI;YACJ,SAAS;SACV,CAAC,CACL,CAAC;QACF,IAAI,CAAC,MAAM;YAAE,OAAO;QAEpB,eAAe,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC;IACpC,CAAC;CACF,CAAA;AAtMY,cAAc;IAD1B,UAAU,EAAE;IAuGR,WAAA,MAAM,CAAC,oBAAoB,CAAC,CAAA;6CAEI,cAAc;QACf,2BAA2B;QACtC,aAAa;GA1GzB,cAAc,CAsM1B"}
@@ -30,20 +30,20 @@ import { authServiceProviders } from "./infrastructure/auth-service.providers.js
30
30
  import { createAuthInstance } from "./infrastructure/create-auth-instance.js";
31
31
  import { AuthResolver } from "./resolvers/auth.resolver.js";
32
32
  import { MemberResolver } from "./resolvers/member.resolver.js";
33
+ import { MemberApiKeyResolver } from "./resolvers/member-api-key.resolver.js";
33
34
  import { SessionResolver } from "./resolvers/session.resolver.js";
34
35
  import { UserResolver } from "./resolvers/user.resolver.js";
35
36
  import { UserApiKeyResolver } from "./resolvers/user-api-key.resolver.js";
36
37
  import { WorkspaceResolver } from "./resolvers/workspace.resolver.js";
37
- import { WorkspaceApiKeyResolver } from "./resolvers/workspace-api-key.resolver.js";
38
38
  import { AccountService } from "./services/account.service.js";
39
39
  import { AuthService } from "./services/auth.service.js";
40
40
  import { MemberService } from "./services/member.service.js";
41
+ import { MemberApiKeyService } from "./services/member-api-key.service.js";
41
42
  import { SessionService } from "./services/session.service.js";
42
43
  import { UserService } from "./services/user.service.js";
43
44
  import { UserApiKeyService } from "./services/user-api-key.service.js";
44
45
  import { UserDeletionService } from "./services/user-deletion.service.js";
45
46
  import { WorkspaceService } from "./services/workspace.service.js";
46
- import { WorkspaceApiKeyService } from "./services/workspace-api-key.service.js";
47
47
  /**
48
48
  * Authentication module based on better-auth.
49
49
  *
@@ -118,13 +118,13 @@ AuthModule = __decorate([
118
118
  UserResolver,
119
119
  SessionResolver,
120
120
  UserApiKeyResolver,
121
- WorkspaceApiKeyResolver,
121
+ MemberApiKeyResolver,
122
122
  WorkspaceResolver,
123
123
  MemberResolver,
124
124
  InvitationResolver,
125
125
  ...authServiceProviders,
126
126
  UserApiKeyService,
127
- WorkspaceApiKeyService,
127
+ MemberApiKeyService,
128
128
  AccountService,
129
129
  ApiKeyUsageInterceptor,
130
130
  AuthService,
@@ -153,7 +153,7 @@ AuthModule = __decorate([
153
153
  MODULE_OPTIONS_TOKEN,
154
154
  UserService,
155
155
  UserApiKeyService,
156
- WorkspaceApiKeyService,
156
+ MemberApiKeyService,
157
157
  AuthGuard,
158
158
  AuthService,
159
159
  SessionService,
@@ -1 +1 @@
1
- {"version":3,"file":"auth.module.js","sourceRoot":"","sources":["../src/auth.module.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,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AGpB,cAAc;GAhEtC,UAAU,CA6FtB"}
@@ -1,8 +1,8 @@
1
1
  export * from "../features/invitations/invitation.connection-definition.js";
2
2
  export * from "./account.connection-definition.js";
3
3
  export * from "./member.connection-definition.js";
4
+ export * from "./member-api-key.connection-definition.js";
4
5
  export * from "./session.connection-definition.js";
5
6
  export * from "./user.connection-definition.js";
6
7
  export * from "./user-api-key.connection-definition.js";
7
8
  export * from "./workspace.connection-definition.js";
8
- export * from "./workspace-api-key.connection-definition.js";
@@ -1,9 +1,9 @@
1
1
  export * from "../features/invitations/invitation.connection-definition.js";
2
2
  export * from "./account.connection-definition.js";
3
3
  export * from "./member.connection-definition.js";
4
+ export * from "./member-api-key.connection-definition.js";
4
5
  export * from "./session.connection-definition.js";
5
6
  export * from "./user.connection-definition.js";
6
7
  export * from "./user-api-key.connection-definition.js";
7
8
  export * from "./workspace.connection-definition.js";
8
- export * from "./workspace-api-key.connection-definition.js";
9
9
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/connections/index.ts"],"names":[],"mappings":"AAAA,cAAc,6DAA6D,CAAC;AAC5E,cAAc,oCAAoC,CAAC;AACnD,cAAc,mCAAmC,CAAC;AAClD,cAAc,oCAAoC,CAAC;AACnD,cAAc,iCAAiC,CAAC;AAChD,cAAc,yCAAyC,CAAC;AACxD,cAAc,sCAAsC,CAAC;AACrD,cAAc,8CAA8C,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/connections/index.ts"],"names":[],"mappings":"AAAA,cAAc,6DAA6D,CAAC;AAC5E,cAAc,oCAAoC,CAAC;AACnD,cAAc,mCAAmC,CAAC;AAClD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,oCAAoC,CAAC;AACnD,cAAc,iCAAiC,CAAC;AAChD,cAAc,yCAAyC,CAAC;AACxD,cAAc,sCAAsC,CAAC"}
@@ -0,0 +1,13 @@
1
+ import { MemberApiKey } from "../entities/member-api-key.entity.js";
2
+ declare const Connection: import("@nestjs/common").Type<import("@nest-boot/graphql-connection").ConnectionInterface<MemberApiKey>>, ConnectionArgs: import("@nestjs/common").Type<import("@nest-boot/graphql-connection").ConnectionArgsInterface<MemberApiKey>>;
3
+ /**
4
+ * API key pagination arguments.
5
+ */
6
+ export declare class MemberApiKeyConnectionArgs extends ConnectionArgs {
7
+ }
8
+ /**
9
+ * A page of visible API keys.
10
+ */
11
+ export declare class MemberApiKeyConnection extends Connection {
12
+ }
13
+ export {};
@@ -6,8 +6,8 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
6
6
  };
7
7
  import { ArgsType, ObjectType } from "@nest-boot/graphql";
8
8
  import { ConnectionBuilder } from "@nest-boot/graphql-connection";
9
- import { WorkspaceApiKey } from "../entities/workspace-api-key.entity.js";
10
- const { Connection, ConnectionArgs } = new ConnectionBuilder(WorkspaceApiKey)
9
+ import { MemberApiKey } from "../entities/member-api-key.entity.js";
10
+ const { Connection, ConnectionArgs } = new ConnectionBuilder(MemberApiKey)
11
11
  .addField({
12
12
  field: "name",
13
13
  searchable: true,
@@ -42,19 +42,19 @@ const { Connection, ConnectionArgs } = new ConnectionBuilder(WorkspaceApiKey)
42
42
  /**
43
43
  * API key pagination arguments.
44
44
  */
45
- let WorkspaceApiKeyConnectionArgs = class WorkspaceApiKeyConnectionArgs extends ConnectionArgs {
45
+ let MemberApiKeyConnectionArgs = class MemberApiKeyConnectionArgs extends ConnectionArgs {
46
46
  };
47
- WorkspaceApiKeyConnectionArgs = __decorate([
47
+ MemberApiKeyConnectionArgs = __decorate([
48
48
  ArgsType()
49
- ], WorkspaceApiKeyConnectionArgs);
50
- export { WorkspaceApiKeyConnectionArgs };
49
+ ], MemberApiKeyConnectionArgs);
50
+ export { MemberApiKeyConnectionArgs };
51
51
  /**
52
52
  * A page of visible API keys.
53
53
  */
54
- let WorkspaceApiKeyConnection = class WorkspaceApiKeyConnection extends Connection {
54
+ let MemberApiKeyConnection = class MemberApiKeyConnection extends Connection {
55
55
  };
56
- WorkspaceApiKeyConnection = __decorate([
56
+ MemberApiKeyConnection = __decorate([
57
57
  ObjectType()
58
- ], WorkspaceApiKeyConnection);
59
- export { WorkspaceApiKeyConnection };
60
- //# sourceMappingURL=workspace-api-key.connection-definition.js.map
58
+ ], MemberApiKeyConnection);
59
+ export { MemberApiKeyConnection };
60
+ //# sourceMappingURL=member-api-key.connection-definition.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"member-api-key.connection-definition.js","sourceRoot":"","sources":["../../src/connections/member-api-key.connection-definition.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAElE,OAAO,EAAE,YAAY,EAAE,MAAM,sCAAsC,CAAC;AAEpE,MAAM,EAAE,UAAU,EAAE,cAAc,EAAE,GAAG,IAAI,iBAAiB,CAAC,YAAY,CAAC;KACvE,QAAQ,CAAC;IACR,KAAK,EAAE,MAAM;IACb,UAAU,EAAE,IAAI;IAChB,UAAU,EAAE,IAAI;IAChB,IAAI,EAAE,QAAQ;CACf,CAAC;KACD,QAAQ,CAAC;IACR,KAAK,EAAE,QAAQ;IACf,UAAU,EAAE,IAAI;IAChB,IAAI,EAAE,QAAQ;CACf,CAAC;KACD,QAAQ,CAAC;IACR,KAAK,EAAE,SAAS;IAChB,UAAU,EAAE,IAAI;IAChB,IAAI,EAAE,SAAS;CAChB,CAAC;KACD,QAAQ,CAAC;IACR,KAAK,EAAE,cAAc;IACrB,WAAW,EAAE,YAAY;IACzB,UAAU,EAAE,IAAI;IAChB,QAAQ,EAAE,IAAI;IACd,IAAI,EAAE,MAAM;CACb,CAAC;KACD,QAAQ,CAAC;IACR,KAAK,EAAE,YAAY;IACnB,WAAW,EAAE,WAAW;IACxB,UAAU,EAAE,IAAI;IAChB,QAAQ,EAAE,IAAI;IACd,IAAI,EAAE,MAAM;CACb,CAAC;KACD,KAAK,EAAE,CAAC;AAEX;;GAEG;AAEI,IAAM,0BAA0B,GAAhC,MAAM,0BAA2B,SAAQ,cAAc;CAAG,CAAA;AAApD,0BAA0B;IADtC,QAAQ,EAAE;GACE,0BAA0B,CAA0B;;AAEjE;;GAEG;AAEI,IAAM,sBAAsB,GAA5B,MAAM,sBAAuB,SAAQ,UAAU;CAAG,CAAA;AAA5C,sBAAsB;IADlC,UAAU,EAAE;GACA,sBAAsB,CAAsB"}
@@ -22,6 +22,7 @@ const { Connection, ConnectionArgs } = new ConnectionBuilder(Member)
22
22
  prefix: true,
23
23
  type: "string",
24
24
  })
25
+ .addField({ field: "type", filterable: true, type: "string" })
25
26
  .addField({
26
27
  field: "status",
27
28
  filterable: true,
@@ -1 +1 @@
1
- {"version":3,"file":"member.connection-definition.js","sourceRoot":"","sources":["../../src/connections/member.connection-definition.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAElE,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AAEtD,MAAM,EAAE,UAAU,EAAE,cAAc,EAAE,GAAG,IAAI,iBAAiB,CAAC,MAAM,CAAC;KACjE,QAAQ,CAAC;IACR,KAAK,EAAE,MAAM;IACb,UAAU,EAAE,IAAI;IAChB,UAAU,EAAE,IAAI;IAChB,MAAM,EAAE,IAAI;IACZ,IAAI,EAAE,QAAQ;CACf,CAAC;KACD,QAAQ,CAAC;IACR,KAAK,EAAE,OAAO;IACd,UAAU,EAAE,IAAI;IAChB,UAAU,EAAE,IAAI;IAChB,MAAM,EAAE,IAAI;IACZ,IAAI,EAAE,QAAQ;CACf,CAAC;KACD,QAAQ,CAAC;IACR,KAAK,EAAE,QAAQ;IACf,UAAU,EAAE,IAAI;IAChB,IAAI,EAAE,QAAQ;CACf,CAAC;KACD,QAAQ,CAAC;IACR,KAAK,EAAE,YAAY;IACnB,WAAW,EAAE,WAAW;IACxB,UAAU,EAAE,IAAI;IAChB,QAAQ,EAAE,IAAI;IACd,IAAI,EAAE,MAAM;CACb,CAAC;KACD,KAAK,EAAE,CAAC;AAEX,6CAA6C;AAEtC,IAAM,oBAAoB,GAA1B,MAAM,oBAAqB,SAAQ,cAAc;CAAG,CAAA;AAA9C,oBAAoB;IADhC,QAAQ,EAAE;GACE,oBAAoB,CAA0B;;AAE3D,2CAA2C;AAEpC,IAAM,gBAAgB,GAAtB,MAAM,gBAAiB,SAAQ,UAAU;CAAG,CAAA;AAAtC,gBAAgB;IAD5B,UAAU,EAAE;GACA,gBAAgB,CAAsB"}
1
+ {"version":3,"file":"member.connection-definition.js","sourceRoot":"","sources":["../../src/connections/member.connection-definition.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAElE,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AAEtD,MAAM,EAAE,UAAU,EAAE,cAAc,EAAE,GAAG,IAAI,iBAAiB,CAAC,MAAM,CAAC;KACjE,QAAQ,CAAC;IACR,KAAK,EAAE,MAAM;IACb,UAAU,EAAE,IAAI;IAChB,UAAU,EAAE,IAAI;IAChB,MAAM,EAAE,IAAI;IACZ,IAAI,EAAE,QAAQ;CACf,CAAC;KACD,QAAQ,CAAC;IACR,KAAK,EAAE,OAAO;IACd,UAAU,EAAE,IAAI;IAChB,UAAU,EAAE,IAAI;IAChB,MAAM,EAAE,IAAI;IACZ,IAAI,EAAE,QAAQ;CACf,CAAC;KACD,QAAQ,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;KAC7D,QAAQ,CAAC;IACR,KAAK,EAAE,QAAQ;IACf,UAAU,EAAE,IAAI;IAChB,IAAI,EAAE,QAAQ;CACf,CAAC;KACD,QAAQ,CAAC;IACR,KAAK,EAAE,YAAY;IACnB,WAAW,EAAE,WAAW;IACxB,UAAU,EAAE,IAAI;IAChB,QAAQ,EAAE,IAAI;IACd,IAAI,EAAE,MAAM;CACb,CAAC;KACD,KAAK,EAAE,CAAC;AAEX,6CAA6C;AAEtC,IAAM,oBAAoB,GAA1B,MAAM,oBAAqB,SAAQ,cAAc;CAAG,CAAA;AAA9C,oBAAoB;IADhC,QAAQ,EAAE;GACE,oBAAoB,CAA0B;;AAE3D,2CAA2C;AAEpC,IAAM,gBAAgB,GAAtB,MAAM,gBAAiB,SAAQ,UAAU;CAAG,CAAA;AAAtC,gBAAgB;IAD5B,UAAU,EAAE;GACA,gBAAgB,CAAsB"}
@@ -1,12 +1,12 @@
1
1
  import { Account } from "./account.entity.js";
2
2
  import { Invitation } from "./invitation.entity.js";
3
3
  import { Member } from "./member.entity.js";
4
+ import { MemberApiKey } from "./member-api-key.entity.js";
4
5
  import { Session } from "./session.entity.js";
5
6
  import { User } from "./user.entity.js";
6
7
  import { UserApiKey } from "./user-api-key.entity.js";
7
8
  import { Verification } from "./verification.entity.js";
8
9
  import { Workspace } from "./workspace.entity.js";
9
- import { WorkspaceApiKey } from "./workspace-api-key.entity.js";
10
10
  /** Internal Better Auth model-to-entity mapping. */
11
11
  export declare const authEntityMap: {
12
12
  user: typeof User;
@@ -17,5 +17,5 @@ export declare const authEntityMap: {
17
17
  member: typeof Member;
18
18
  invitation: typeof Invitation;
19
19
  userApiKey: typeof UserApiKey;
20
- workspaceApiKey: typeof WorkspaceApiKey;
20
+ memberApiKey: typeof MemberApiKey;
21
21
  };
@@ -1,12 +1,12 @@
1
1
  import { Account } from "./account.entity.js";
2
2
  import { Invitation } from "./invitation.entity.js";
3
3
  import { Member } from "./member.entity.js";
4
+ import { MemberApiKey } from "./member-api-key.entity.js";
4
5
  import { Session } from "./session.entity.js";
5
6
  import { User } from "./user.entity.js";
6
7
  import { UserApiKey } from "./user-api-key.entity.js";
7
8
  import { Verification } from "./verification.entity.js";
8
9
  import { Workspace } from "./workspace.entity.js";
9
- import { WorkspaceApiKey } from "./workspace-api-key.entity.js";
10
10
  /** Internal Better Auth model-to-entity mapping. */
11
11
  export const authEntityMap = {
12
12
  user: User,
@@ -17,6 +17,6 @@ export const authEntityMap = {
17
17
  member: Member,
18
18
  invitation: Invitation,
19
19
  userApiKey: UserApiKey,
20
- workspaceApiKey: WorkspaceApiKey,
20
+ memberApiKey: MemberApiKey,
21
21
  };
22
22
  //# sourceMappingURL=auth-entity-map.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"auth-entity-map.js","sourceRoot":"","sources":["../../src/entities/auth-entity-map.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,oDAAoD;AACpD,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,IAAI,EAAE,IAAI;IACV,OAAO,EAAE,OAAO;IAChB,OAAO,EAAE,OAAO;IAChB,YAAY,EAAE,YAAY;IAC1B,SAAS,EAAE,SAAS;IACpB,MAAM,EAAE,MAAM;IACd,UAAU,EAAE,UAAU;IACtB,UAAU,EAAE,UAAU;IACtB,eAAe,EAAE,eAAe;CACjC,CAAC"}
1
+ {"version":3,"file":"auth-entity-map.js","sourceRoot":"","sources":["../../src/entities/auth-entity-map.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,oDAAoD;AACpD,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,IAAI,EAAE,IAAI;IACV,OAAO,EAAE,OAAO;IAChB,OAAO,EAAE,OAAO;IAChB,YAAY,EAAE,YAAY;IAC1B,SAAS,EAAE,SAAS;IACpB,MAAM,EAAE,MAAM;IACd,UAAU,EAAE,UAAU;IACtB,UAAU,EAAE,UAAU;IACtB,YAAY,EAAE,YAAY;CAC3B,CAAC"}
@@ -1,19 +1,19 @@
1
1
  import { Account } from "./account.entity.js";
2
2
  import { Invitation } from "./invitation.entity.js";
3
3
  import { Member } from "./member.entity.js";
4
+ import { MemberApiKey } from "./member-api-key.entity.js";
4
5
  import { Session } from "./session.entity.js";
5
6
  import { UserApiKey } from "./user-api-key.entity.js";
6
7
  import { Verification } from "./verification.entity.js";
7
8
  import { Workspace } from "./workspace.entity.js";
8
- import { WorkspaceApiKey } from "./workspace-api-key.entity.js";
9
9
  export * from "./account.entity.js";
10
10
  export * from "./invitation.entity.js";
11
11
  export * from "./member.entity.js";
12
+ export * from "./member-api-key.entity.js";
12
13
  export * from "./session.entity.js";
13
14
  export * from "./user.entity.js";
14
15
  export * from "./user-api-key.entity.js";
15
16
  export * from "./verification.entity.js";
16
17
  export * from "./workspace.entity.js";
17
- export * from "./workspace-api-key.entity.js";
18
18
  /** Built-in authentication entities for MikroORM runtime and migration discovery. */
19
- export declare const entities: (typeof Workspace | typeof Member | typeof UserApiKey | typeof WorkspaceApiKey | typeof Invitation | typeof Session | typeof Account | typeof Verification)[];
19
+ export declare const entities: (typeof Member | typeof Workspace | typeof MemberApiKey | typeof UserApiKey | typeof Invitation | typeof Session | typeof Account | typeof Verification)[];