@nest-boot/auth 8.0.9-beta.1 → 8.0.9-beta.3

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 (269) hide show
  1. package/dist/adapters/mikro-orm/adapter-config.d.ts +5 -0
  2. package/dist/adapters/mikro-orm/adapter-config.js +5 -0
  3. package/dist/adapters/mikro-orm/adapter-config.js.map +1 -1
  4. package/dist/adapters/mikro-orm/create-custom-adapter.d.ts +9 -0
  5. package/dist/adapters/mikro-orm/create-custom-adapter.js +9 -0
  6. package/dist/adapters/mikro-orm/create-custom-adapter.js.map +1 -1
  7. package/dist/adapters/mikro-orm/entity-metadata-resolver.d.ts +7 -0
  8. package/dist/adapters/mikro-orm/entity-metadata-resolver.js +7 -0
  9. package/dist/adapters/mikro-orm/entity-metadata-resolver.js.map +1 -1
  10. package/dist/adapters/mikro-orm/where-compiler.d.ts +7 -0
  11. package/dist/adapters/mikro-orm/where-compiler.js +11 -0
  12. package/dist/adapters/mikro-orm/where-compiler.js.map +1 -1
  13. package/dist/api-key-usage.interceptor.d.ts +10 -2
  14. package/dist/api-key-usage.interceptor.js +10 -2
  15. package/dist/api-key-usage.interceptor.js.map +1 -1
  16. package/dist/auth-handler.middleware.d.ts +14 -3
  17. package/dist/auth-handler.middleware.js +14 -3
  18. package/dist/auth-handler.middleware.js.map +1 -1
  19. package/dist/auth.ability.d.ts +11 -2
  20. package/dist/auth.ability.js +11 -2
  21. package/dist/auth.ability.js.map +1 -1
  22. package/dist/auth.constants.d.ts +4 -1
  23. package/dist/auth.constants.js +4 -1
  24. package/dist/auth.constants.js.map +1 -1
  25. package/dist/auth.guard.d.ts +0 -4
  26. package/dist/auth.guard.js +0 -4
  27. package/dist/auth.guard.js.map +1 -1
  28. package/dist/auth.middleware.d.ts +24 -4
  29. package/dist/auth.middleware.js +24 -4
  30. package/dist/auth.middleware.js.map +1 -1
  31. package/dist/auth.module.d.ts +0 -1
  32. package/dist/auth.module.js +0 -1
  33. package/dist/auth.module.js.map +1 -1
  34. package/dist/decorators/can.decorator.d.ts +6 -1
  35. package/dist/decorators/can.decorator.js +6 -1
  36. package/dist/decorators/can.decorator.js.map +1 -1
  37. package/dist/decorators/public.decorator.d.ts +5 -1
  38. package/dist/decorators/public.decorator.js +5 -1
  39. package/dist/decorators/public.decorator.js.map +1 -1
  40. package/dist/entities/account.entity.d.ts +4 -1
  41. package/dist/entities/account.entity.js +4 -1
  42. package/dist/entities/account.entity.js.map +1 -1
  43. package/dist/entities/invitation.entity.d.ts +4 -1
  44. package/dist/entities/invitation.entity.js +4 -1
  45. package/dist/entities/invitation.entity.js.map +1 -1
  46. package/dist/entities/member-api-key.entity.d.ts +8 -2
  47. package/dist/entities/member-api-key.entity.js +8 -2
  48. package/dist/entities/member-api-key.entity.js.map +1 -1
  49. package/dist/entities/member.entity.d.ts +4 -1
  50. package/dist/entities/member.entity.js +4 -1
  51. package/dist/entities/member.entity.js.map +1 -1
  52. package/dist/features/invitations/invitation.resolver.d.ts +43 -8
  53. package/dist/features/invitations/invitation.resolver.js +43 -8
  54. package/dist/features/invitations/invitation.resolver.js.map +1 -1
  55. package/dist/features/invitations/invitation.service.d.ts +75 -12
  56. package/dist/features/invitations/invitation.service.js +75 -12
  57. package/dist/features/invitations/invitation.service.js.map +1 -1
  58. package/dist/infrastructure/api-key-authentication.service.d.ts +20 -4
  59. package/dist/infrastructure/api-key-authentication.service.js +20 -4
  60. package/dist/infrastructure/api-key-authentication.service.js.map +1 -1
  61. package/dist/infrastructure/api-key-lifecycle.d.ts +31 -5
  62. package/dist/infrastructure/api-key-lifecycle.js +31 -5
  63. package/dist/infrastructure/api-key-lifecycle.js.map +1 -1
  64. package/dist/infrastructure/auth-ability.factory.d.ts +14 -3
  65. package/dist/infrastructure/auth-ability.factory.js +14 -3
  66. package/dist/infrastructure/auth-ability.factory.js.map +1 -1
  67. package/dist/infrastructure/auth-enum-registry.d.ts +4 -1
  68. package/dist/infrastructure/auth-enum-registry.js +4 -1
  69. package/dist/infrastructure/auth-enum-registry.js.map +1 -1
  70. package/dist/infrastructure/auth-service.providers.d.ts +4 -1
  71. package/dist/infrastructure/auth-service.providers.js +4 -1
  72. package/dist/infrastructure/auth-service.providers.js.map +1 -1
  73. package/dist/infrastructure/better-auth-adapter.d.ts +6 -1
  74. package/dist/infrastructure/better-auth-adapter.js +2 -0
  75. package/dist/infrastructure/better-auth-adapter.js.map +1 -1
  76. package/dist/infrastructure/create-auth-instance.d.ts +20 -2
  77. package/dist/infrastructure/create-auth-instance.js +29 -2
  78. package/dist/infrastructure/create-auth-instance.js.map +1 -1
  79. package/dist/infrastructure/create-contextual-auth-service.d.ts +4 -0
  80. package/dist/infrastructure/create-contextual-auth-service.js +4 -0
  81. package/dist/infrastructure/create-contextual-auth-service.js.map +1 -1
  82. package/dist/infrastructure/request-identity.d.ts +88 -19
  83. package/dist/infrastructure/request-identity.js +88 -19
  84. package/dist/infrastructure/request-identity.js.map +1 -1
  85. package/dist/infrastructure/revoked-authentication.exception.d.ts +4 -1
  86. package/dist/infrastructure/revoked-authentication.exception.js +4 -1
  87. package/dist/infrastructure/revoked-authentication.exception.js.map +1 -1
  88. package/dist/interfaces/request-identity-patch.interface.d.ts +4 -1
  89. package/dist/interfaces/request-permissions.interface.d.ts +4 -1
  90. package/dist/policies/create-scope-policy.d.ts +7 -1
  91. package/dist/policies/create-scope-policy.js +7 -1
  92. package/dist/policies/create-scope-policy.js.map +1 -1
  93. package/dist/policies/user-scope.policy.d.ts +2 -0
  94. package/dist/policies/user-scope.policy.js +2 -0
  95. package/dist/policies/user-scope.policy.js.map +1 -1
  96. package/dist/policies/workspace-scope.policy.d.ts +2 -0
  97. package/dist/policies/workspace-scope.policy.js +2 -0
  98. package/dist/policies/workspace-scope.policy.js.map +1 -1
  99. package/dist/resolvers/auth.resolver.d.ts +85 -18
  100. package/dist/resolvers/auth.resolver.js +90 -18
  101. package/dist/resolvers/auth.resolver.js.map +1 -1
  102. package/dist/resolvers/member-api-key.resolver.d.ts +26 -5
  103. package/dist/resolvers/member-api-key.resolver.js +26 -5
  104. package/dist/resolvers/member-api-key.resolver.js.map +1 -1
  105. package/dist/resolvers/member.resolver.d.ts +26 -11
  106. package/dist/resolvers/member.resolver.js +26 -11
  107. package/dist/resolvers/member.resolver.js.map +1 -1
  108. package/dist/resolvers/session.resolver.d.ts +59 -12
  109. package/dist/resolvers/session.resolver.js +59 -12
  110. package/dist/resolvers/session.resolver.js.map +1 -1
  111. package/dist/resolvers/user-api-key.resolver.d.ts +26 -5
  112. package/dist/resolvers/user-api-key.resolver.js +26 -5
  113. package/dist/resolvers/user-api-key.resolver.js.map +1 -1
  114. package/dist/resolvers/user.resolver.d.ts +114 -19
  115. package/dist/resolvers/user.resolver.js +114 -19
  116. package/dist/resolvers/user.resolver.js.map +1 -1
  117. package/dist/resolvers/workspace.resolver.d.ts +33 -11
  118. package/dist/resolvers/workspace.resolver.js +33 -11
  119. package/dist/resolvers/workspace.resolver.js.map +1 -1
  120. package/dist/services/account.service.d.ts +11 -2
  121. package/dist/services/account.service.js +11 -2
  122. package/dist/services/account.service.js.map +1 -1
  123. package/dist/services/auth.service.d.ts +132 -27
  124. package/dist/services/auth.service.js +132 -27
  125. package/dist/services/auth.service.js.map +1 -1
  126. package/dist/services/member-api-key.service.d.ts +40 -7
  127. package/dist/services/member-api-key.service.js +40 -7
  128. package/dist/services/member-api-key.service.js.map +1 -1
  129. package/dist/services/member.service.d.ts +108 -19
  130. package/dist/services/member.service.js +108 -19
  131. package/dist/services/member.service.js.map +1 -1
  132. package/dist/services/session.service.d.ts +37 -10
  133. package/dist/services/session.service.js +69 -10
  134. package/dist/services/session.service.js.map +1 -1
  135. package/dist/services/user-api-key.service.d.ts +40 -7
  136. package/dist/services/user-api-key.service.js +40 -7
  137. package/dist/services/user-api-key.service.js.map +1 -1
  138. package/dist/services/user-deletion.service.d.ts +7 -1
  139. package/dist/services/user-deletion.service.js +7 -1
  140. package/dist/services/user-deletion.service.js.map +1 -1
  141. package/dist/services/user.service.d.ts +109 -20
  142. package/dist/services/user.service.js +109 -20
  143. package/dist/services/user.service.js.map +1 -1
  144. package/dist/services/workspace.service.d.ts +50 -9
  145. package/dist/services/workspace.service.js +50 -9
  146. package/dist/services/workspace.service.js.map +1 -1
  147. package/dist/tsconfig.tsbuildinfo +1 -1
  148. package/dist/types/lowercase-identifier.type.d.ts +4 -1
  149. package/dist/utils/api-key-credential.util.d.ts +12 -2
  150. package/dist/utils/api-key-credential.util.js +12 -2
  151. package/dist/utils/api-key-credential.util.js.map +1 -1
  152. package/dist/utils/api-key-permissions.util.d.ts +14 -2
  153. package/dist/utils/api-key-permissions.util.js +14 -2
  154. package/dist/utils/api-key-permissions.util.js.map +1 -1
  155. package/dist/utils/append-metadata.util.d.ts +6 -1
  156. package/dist/utils/append-metadata.util.js +6 -1
  157. package/dist/utils/append-metadata.util.js.map +1 -1
  158. package/dist/utils/apply-auth-response-cookies.util.d.ts +4 -1
  159. package/dist/utils/apply-auth-response-cookies.util.js +4 -1
  160. package/dist/utils/apply-auth-response-cookies.util.js.map +1 -1
  161. package/dist/utils/auth-role.util.d.ts +50 -8
  162. package/dist/utils/auth-role.util.js +50 -8
  163. package/dist/utils/auth-role.util.js.map +1 -1
  164. package/dist/utils/authorize.util.d.ts +6 -1
  165. package/dist/utils/authorize.util.js +6 -1
  166. package/dist/utils/authorize.util.js.map +1 -1
  167. package/dist/utils/build-request-ability.util.d.ts +5 -1
  168. package/dist/utils/build-request-ability.util.js +5 -1
  169. package/dist/utils/build-request-ability.util.js.map +1 -1
  170. package/dist/utils/can.util.d.ts +7 -1
  171. package/dist/utils/can.util.js +7 -1
  172. package/dist/utils/can.util.js.map +1 -1
  173. package/dist/utils/create-email-and-password-config.d.ts +8 -0
  174. package/dist/utils/create-email-and-password-config.js +8 -0
  175. package/dist/utils/create-email-and-password-config.js.map +1 -1
  176. package/dist/utils/create-email-verification-config.d.ts +6 -1
  177. package/dist/utils/create-email-verification-config.js +6 -1
  178. package/dist/utils/create-email-verification-config.js.map +1 -1
  179. package/dist/utils/create-generic-oauth-config.d.ts +7 -1
  180. package/dist/utils/create-generic-oauth-config.js +7 -1
  181. package/dist/utils/create-generic-oauth-config.js.map +1 -1
  182. package/dist/utils/create-oidc-config.d.ts +5 -0
  183. package/dist/utils/create-oidc-config.js +5 -0
  184. package/dist/utils/create-oidc-config.js.map +1 -1
  185. package/dist/utils/create-permission-enum.util.d.ts +5 -1
  186. package/dist/utils/create-permission-enum.util.js +5 -1
  187. package/dist/utils/create-permission-enum.util.js.map +1 -1
  188. package/dist/utils/create-social-provider-config.d.ts +7 -0
  189. package/dist/utils/create-social-provider-config.js +7 -0
  190. package/dist/utils/create-social-provider-config.js.map +1 -1
  191. package/dist/utils/create-social-providers-config.d.ts +6 -0
  192. package/dist/utils/create-social-providers-config.js +6 -0
  193. package/dist/utils/create-social-providers-config.js.map +1 -1
  194. package/dist/utils/create-user-config.d.ts +7 -1
  195. package/dist/utils/create-user-config.js +7 -1
  196. package/dist/utils/create-user-config.js.map +1 -1
  197. package/dist/utils/estimate-entropy.d.ts +0 -1
  198. package/dist/utils/estimate-entropy.js +0 -1
  199. package/dist/utils/estimate-entropy.js.map +1 -1
  200. package/dist/utils/extend-ability.util.d.ts +9 -1
  201. package/dist/utils/extend-ability.util.js +24 -1
  202. package/dist/utils/extend-ability.util.js.map +1 -1
  203. package/dist/utils/extract-api-key.util.d.ts +5 -1
  204. package/dist/utils/extract-api-key.util.js +5 -1
  205. package/dist/utils/extract-api-key.util.js.map +1 -1
  206. package/dist/utils/get-auth-ability.util.d.ts +1 -0
  207. package/dist/utils/get-auth-ability.util.js +1 -0
  208. package/dist/utils/get-auth-ability.util.js.map +1 -1
  209. package/dist/utils/get-current-api-key.util.d.ts +5 -1
  210. package/dist/utils/get-current-api-key.util.js +5 -1
  211. package/dist/utils/get-current-api-key.util.js.map +1 -1
  212. package/dist/utils/has-oidc-env-config.d.ts +4 -0
  213. package/dist/utils/has-oidc-env-config.js +4 -0
  214. package/dist/utils/has-oidc-env-config.js.map +1 -1
  215. package/dist/utils/has-social-provider-credential-env-config.d.ts +5 -0
  216. package/dist/utils/has-social-provider-credential-env-config.js +5 -0
  217. package/dist/utils/has-social-provider-credential-env-config.js.map +1 -1
  218. package/dist/utils/has-social-provider-env-config.d.ts +5 -0
  219. package/dist/utils/has-social-provider-env-config.js +5 -0
  220. package/dist/utils/has-social-provider-env-config.js.map +1 -1
  221. package/dist/utils/is-env-true.d.ts +5 -0
  222. package/dist/utils/is-env-true.js +5 -0
  223. package/dist/utils/is-env-true.js.map +1 -1
  224. package/dist/utils/omit-credentials.util.d.ts +7 -1
  225. package/dist/utils/omit-credentials.util.js +7 -1
  226. package/dist/utils/omit-credentials.util.js.map +1 -1
  227. package/dist/utils/permission-grants.util.d.ts +28 -4
  228. package/dist/utils/permission-grants.util.js +28 -4
  229. package/dist/utils/permission-grants.util.js.map +1 -1
  230. package/dist/utils/resolve-auth-catalog.util.d.ts +6 -1
  231. package/dist/utils/resolve-auth-catalog.util.js +6 -1
  232. package/dist/utils/resolve-auth-catalog.util.js.map +1 -1
  233. package/dist/utils/resolve-effective-permissions.util.d.ts +21 -3
  234. package/dist/utils/resolve-effective-permissions.util.js +21 -3
  235. package/dist/utils/resolve-effective-permissions.util.js.map +1 -1
  236. package/dist/utils/resolve-oidc-prompt.d.ts +4 -0
  237. package/dist/utils/resolve-oidc-prompt.js +4 -0
  238. package/dist/utils/resolve-oidc-prompt.js.map +1 -1
  239. package/dist/utils/resolve-oidc-scopes.d.ts +4 -0
  240. package/dist/utils/resolve-oidc-scopes.js +4 -0
  241. package/dist/utils/resolve-oidc-scopes.js.map +1 -1
  242. package/dist/utils/resolve-request-member.util.d.ts +5 -1
  243. package/dist/utils/resolve-request-member.util.js +5 -1
  244. package/dist/utils/resolve-request-member.util.js.map +1 -1
  245. package/dist/utils/resolve-request-permissions.util.d.ts +10 -2
  246. package/dist/utils/resolve-request-permissions.util.js +10 -2
  247. package/dist/utils/resolve-request-permissions.util.js.map +1 -1
  248. package/dist/utils/resolve-required-oidc-env.d.ts +5 -0
  249. package/dist/utils/resolve-required-oidc-env.js +5 -0
  250. package/dist/utils/resolve-required-oidc-env.js.map +1 -1
  251. package/dist/utils/resolve-required-social-provider-env.d.ts +6 -0
  252. package/dist/utils/resolve-required-social-provider-env.js +6 -0
  253. package/dist/utils/resolve-required-social-provider-env.js.map +1 -1
  254. package/dist/utils/resolve-secret.d.ts +5 -0
  255. package/dist/utils/resolve-secret.js +5 -0
  256. package/dist/utils/resolve-secret.js.map +1 -1
  257. package/dist/utils/resolve-social-provider-enabled.d.ts +5 -0
  258. package/dist/utils/resolve-social-provider-enabled.js +5 -0
  259. package/dist/utils/resolve-social-provider-enabled.js.map +1 -1
  260. package/dist/utils/run-auth-query.d.ts +3 -0
  261. package/dist/utils/run-auth-query.js +3 -0
  262. package/dist/utils/run-auth-query.js.map +1 -1
  263. package/dist/utils/serialize-ability-rules.util.d.ts +5 -1
  264. package/dist/utils/serialize-ability-rules.util.js +15 -1
  265. package/dist/utils/serialize-ability-rules.util.js.map +1 -1
  266. package/dist/utils/split-auth-providers.d.ts +5 -1
  267. package/dist/utils/split-auth-providers.js +6 -4
  268. package/dist/utils/split-auth-providers.js.map +1 -1
  269. package/package.json +21 -27
@@ -40,64 +40,169 @@ export declare class AuthService {
40
40
  /**
41
41
  * Creates a new AuthService instance.
42
42
  * @param auth - Internal Better Auth instance.
43
+ * @param authMiddleware - Middleware that populates the request identity.
44
+ * @param userService - Service for user profiles and permissions.
45
+ * @param sessionService - Service for session queries and revocation.
43
46
  */
44
47
  constructor(auth: unknown, authMiddleware: AuthMiddleware, userService: UserService, sessionService: SessionService);
45
48
  private readonly auth;
46
- /** Returns the public credential password policy. */
49
+ /**
50
+ * Returns the public credential password policy.
51
+ * @returns Configured minimum and maximum password lengths.
52
+ */
47
53
  getPasswordPolicy(): PasswordPolicy;
48
- /** Starts impersonation and adopts its identity before returning application fields. */
54
+ /**
55
+ * Starts impersonation and adopts its identity before returning application fields.
56
+ * @param id - Identifier of the record to access.
57
+ * @returns User represented by the new impersonation session.
58
+ */
49
59
  impersonateUser(id: string): Promise<User>;
50
- /** Restores the administrator and its abilities/RLS scope in the same request. */
60
+ /**
61
+ * Restores the administrator and its abilities/RLS scope in the same request.
62
+ * @returns Restored administrator, or null when there was no impersonation session.
63
+ */
51
64
  stopImpersonating(): Promise<User | null>;
52
65
  private adoptSession;
53
- /** Registers a user without exposing relations that require a session. */
66
+ /**
67
+ * Registers a user without exposing relations that require a session.
68
+ * @param options - Configuration for this operation.
69
+ * @returns Created user's identifier and optional session token.
70
+ */
54
71
  signUpPayload(options: SignUpOptions): Promise<SignUpPayload>;
55
- /** Signs in and establishes the new identity for nested GraphQL selections. */
72
+ /**
73
+ * Signs in and establishes the new identity for nested GraphQL selections.
74
+ * @param options - Configuration for this operation.
75
+ * @returns Sign-in response with the persisted user entity.
76
+ */
56
77
  signInEntity(options: SignInOptions): Promise<SignInEntityResult>;
57
- /** Returns a redirect payload or the authenticated application user. */
78
+ /**
79
+ * Returns a redirect payload or the authenticated application user.
80
+ * @param options - Configuration for this operation.
81
+ * @returns Social sign-in response with a persisted user when available.
82
+ */
58
83
  signInSocialEntity(options: SignInSocialOptions): Promise<SignInSocialEntityResult>;
59
84
  private resolveResultUser;
60
- /** Returns the current user, rejecting principals without a user identity. */
85
+ /**
86
+ * Returns the current user, rejecting principals without a user identity.
87
+ * @returns Authenticated user from the current request.
88
+ */
61
89
  getCurrentUser(): User;
62
- /** Lists social and generic OAuth providers currently enabled. */
90
+ /**
91
+ * Lists social and generic OAuth providers currently enabled.
92
+ * @returns Provider identifiers and display names available for sign-in.
93
+ */
63
94
  listSocialProviders(): Promise<AuthSocialProvider[]>;
64
- /** Signs up a user with an email address and password. */
95
+ /**
96
+ * Signs up a user with an email address and password.
97
+ * @param options - Configuration for this operation.
98
+ * @returns User registration response and optional session token.
99
+ */
65
100
  signUp(options: SignUpOptions): Promise<SignUpResult>;
66
- /** Signs in a user with an email address and password. */
101
+ /**
102
+ * Signs in a user with an email address and password.
103
+ * @param options - Configuration for this operation.
104
+ * @returns Normalized password sign-in response.
105
+ */
67
106
  signIn(options: SignInOptions): Promise<SignInResult>;
68
- /** Starts a social or generic OAuth sign-in flow. */
107
+ /**
108
+ * Starts a social or generic OAuth sign-in flow.
109
+ * @param options - Configuration for this operation.
110
+ * @returns Normalized social sign-in response.
111
+ */
69
112
  signInSocial(options: SignInSocialOptions): Promise<SignInSocialResult>;
70
- /** Signs out the session represented by the current request context. */
113
+ /**
114
+ * Signs out the session represented by the current request context.
115
+ * @returns Whether the current session was signed out successfully.
116
+ */
71
117
  signOut(): Promise<boolean>;
72
- /** Sends an email-verification link to an unverified email address. */
118
+ /**
119
+ * Sends an email-verification link to an unverified email address.
120
+ * @param options - Configuration for this operation.
121
+ * @returns Whether the verification email request succeeded.
122
+ */
73
123
  sendVerificationEmail(options: SendVerificationEmailOptions): Promise<boolean>;
74
- /** Requests an enumeration-safe password-reset email. */
124
+ /**
125
+ * Requests an enumeration-safe password-reset email.
126
+ * @param options - Configuration for this operation.
127
+ * @returns Password reset request status and message.
128
+ */
75
129
  requestPasswordReset(options: RequestPasswordResetOptions): Promise<RequestPasswordResetResult>;
76
- /** Resets a credential password using a password-reset token. */
130
+ /**
131
+ * Resets a credential password using a password-reset token.
132
+ * @param options - Configuration for this operation.
133
+ * @returns Whether the password was reset successfully.
134
+ */
77
135
  resetPassword(options: ResetPasswordOptions): Promise<boolean>;
78
- /** Verifies the authenticated user's credential password. */
136
+ /**
137
+ * Verifies the authenticated user's credential password.
138
+ * @param password - Plaintext password to verify.
139
+ * @returns Whether password verification succeeded.
140
+ */
79
141
  verifyCurrentUserPassword(password: string): Promise<boolean>;
80
- /** Updates the authenticated user's profile and refreshes its request identity. */
142
+ /**
143
+ * Updates the authenticated user's profile and refreshes its request identity.
144
+ * @param options - Configuration for this operation.
145
+ * @returns Whether the profile update succeeded.
146
+ */
81
147
  updateCurrentUser(options: UpdateAuthUserOptions): Promise<boolean>;
82
- /** Starts or completes the authenticated user's configured email-change flow. */
148
+ /**
149
+ * Starts or completes the authenticated user's configured email-change flow.
150
+ * @param options - Configuration for this operation.
151
+ * @returns Whether the email change request succeeded.
152
+ */
83
153
  changeCurrentUserEmail(options: ChangeAuthEmailOptions): Promise<boolean>;
84
- /** Changes the authenticated user's credential password. */
154
+ /**
155
+ * Changes the authenticated user's credential password.
156
+ * @param options - Configuration for this operation.
157
+ * @returns Replacement session token, when the password change issues one.
158
+ */
85
159
  changeCurrentUserPassword(options: ChangeAuthPasswordOptions): Promise<ChangeAuthPasswordResult>;
86
- /** Adds a credential password to an authenticated account that has none. */
160
+ /**
161
+ * Adds a credential password to an authenticated account that has none.
162
+ * @param newPassword - New plaintext password to validate and store.
163
+ * @returns Whether the credential password was set successfully.
164
+ */
87
165
  setCurrentUserPassword(newPassword: string): Promise<boolean>;
88
- /** Requests deletion of the authenticated user's account. */
166
+ /**
167
+ * Requests deletion of the authenticated user's account.
168
+ * @param options - Configuration for this operation.
169
+ * @returns Account deletion status and any redirect information.
170
+ */
89
171
  deleteCurrentUser(options?: DeleteAuthUserOptions): Promise<DeleteAuthUserResult>;
90
- /** Lists safe summaries of authentication accounts linked to the current user. */
172
+ /**
173
+ * Lists safe summaries of authentication accounts linked to the current user.
174
+ * @returns Provider accounts linked to the authenticated user.
175
+ */
91
176
  listCurrentUserAccounts(): Promise<AuthAccount[]>;
92
- /** Starts a social or OpenID Connect account-linking flow. */
177
+ /**
178
+ * Starts a social or OpenID Connect account-linking flow.
179
+ * @param options - Configuration for this operation.
180
+ * @returns Account linking response and any provider redirect URL.
181
+ */
93
182
  linkCurrentUserAccount(options: LinkAuthSocialAccountOptions): Promise<LinkAuthSocialAccountResult>;
94
- /** Unlinks an authentication account from the current user. */
183
+ /**
184
+ * Unlinks an authentication account from the current user.
185
+ * @param options - Configuration for this operation.
186
+ * @returns Whether the provider account was unlinked successfully.
187
+ */
95
188
  unlinkCurrentUserAccount(options: UnlinkAuthAccountOptions): Promise<boolean>;
96
- /** Returns a usable provider access token for a linked account. */
189
+ /**
190
+ * Returns a usable provider access token for a linked account.
191
+ * @param selector - Fields that identify the provider account.
192
+ * @returns Provider access token with expiration and scope metadata.
193
+ */
97
194
  getAccessToken(selector: AuthAccountSelector): Promise<AuthAccessToken>;
98
- /** Refreshes provider credentials for a linked account. */
195
+ /**
196
+ * Refreshes provider credentials for a linked account.
197
+ * @param selector - Fields that identify the provider account.
198
+ * @returns Refreshed provider tokens and their expiration metadata.
199
+ */
99
200
  refreshToken(selector: AuthAccountSelector): Promise<AuthRefreshedToken>;
100
- /** Returns provider identity and metadata for a linked account. */
201
+ /**
202
+ * Returns provider identity and metadata for a linked account.
203
+ * @param selector - Fields that identify the provider account.
204
+ * @returns Information returned by the selected provider account.
205
+ */
101
206
  getAccountInfo<UserInfo extends AuthProviderUserInfo = AuthProviderUserInfo, Data extends object = Record<string, unknown>>(selector: AuthAccountSelector): Promise<AuthAccountInfo<UserInfo, Data>>;
102
207
  private normalizeSignInResult;
103
208
  private normalizeSignInSocialResult;
@@ -28,6 +28,9 @@ let AuthService = class AuthService {
28
28
  /**
29
29
  * Creates a new AuthService instance.
30
30
  * @param auth - Internal Better Auth instance.
31
+ * @param authMiddleware - Middleware that populates the request identity.
32
+ * @param userService - Service for user profiles and permissions.
33
+ * @param sessionService - Service for session queries and revocation.
31
34
  */
32
35
  constructor(auth, authMiddleware, userService, sessionService) {
33
36
  this.authMiddleware = authMiddleware;
@@ -36,17 +39,27 @@ let AuthService = class AuthService {
36
39
  this.auth = adaptBetterAuth(auth);
37
40
  }
38
41
  auth;
39
- /** Returns the public credential password policy. */
42
+ /**
43
+ * Returns the public credential password policy.
44
+ * @returns Configured minimum and maximum password lengths.
45
+ */
40
46
  getPasswordPolicy() {
41
47
  return this.userService.getPasswordPolicy();
42
48
  }
43
- /** Starts impersonation and adopts its identity before returning application fields. */
49
+ /**
50
+ * Starts impersonation and adopts its identity before returning application fields.
51
+ * @param id - Identifier of the record to access.
52
+ * @returns User represented by the new impersonation session.
53
+ */
44
54
  async impersonateUser(id) {
45
55
  this.authMiddleware.assertAuthenticationCanChange();
46
56
  const result = await this.userService.impersonateUser(this.getCurrentUser(), id);
47
57
  return await this.adoptSession(result.session.token);
48
58
  }
49
- /** Restores the administrator and its abilities/RLS scope in the same request. */
59
+ /**
60
+ * Restores the administrator and its abilities/RLS scope in the same request.
61
+ * @returns Restored administrator, or null when there was no impersonation session.
62
+ */
50
63
  async stopImpersonating() {
51
64
  this.authMiddleware.assertAuthenticationCanChange();
52
65
  const session = RequestContext.isActive()
@@ -62,7 +75,11 @@ let AuthService = class AuthService {
62
75
  await this.sessionService.setSessionCookie(token);
63
76
  return user;
64
77
  }
65
- /** Registers a user without exposing relations that require a session. */
78
+ /**
79
+ * Registers a user without exposing relations that require a session.
80
+ * @param options - Configuration for this operation.
81
+ * @returns Created user's identifier and optional session token.
82
+ */
66
83
  async signUpPayload(options) {
67
84
  const result = await this.signUp(options);
68
85
  if (result.token) {
@@ -70,7 +87,11 @@ let AuthService = class AuthService {
70
87
  }
71
88
  return { id: result.user.id, token: result.token };
72
89
  }
73
- /** Signs in and establishes the new identity for nested GraphQL selections. */
90
+ /**
91
+ * Signs in and establishes the new identity for nested GraphQL selections.
92
+ * @param options - Configuration for this operation.
93
+ * @returns Sign-in response with the persisted user entity.
94
+ */
74
95
  async signInEntity(options) {
75
96
  const result = await this.signIn(options);
76
97
  return {
@@ -78,7 +99,11 @@ let AuthService = class AuthService {
78
99
  user: await this.resolveResultUser(result.user, result.token),
79
100
  };
80
101
  }
81
- /** Returns a redirect payload or the authenticated application user. */
102
+ /**
103
+ * Returns a redirect payload or the authenticated application user.
104
+ * @param options - Configuration for this operation.
105
+ * @returns Social sign-in response with a persisted user when available.
106
+ */
82
107
  async signInSocialEntity(options) {
83
108
  const result = await this.signInSocial(options);
84
109
  return {
@@ -97,14 +122,20 @@ let AuthService = class AuthService {
97
122
  // load the exact user returned by the successful registration operation.
98
123
  return await this.authMiddleware.resolveRegisteredUser(user.id);
99
124
  }
100
- /** Returns the current user, rejecting principals without a user identity. */
125
+ /**
126
+ * Returns the current user, rejecting principals without a user identity.
127
+ * @returns Authenticated user from the current request.
128
+ */
101
129
  getCurrentUser() {
102
130
  const user = RequestContext.isActive() ? RequestContext.get(User) : null;
103
131
  if (!user)
104
132
  throw new ForbiddenException("A user identity is required");
105
133
  return user;
106
134
  }
107
- /** Lists social and generic OAuth providers currently enabled. */
135
+ /**
136
+ * Lists social and generic OAuth providers currently enabled.
137
+ * @returns Provider identifiers and display names available for sign-in.
138
+ */
108
139
  async listSocialProviders() {
109
140
  const context = await this.auth.$context;
110
141
  return context.socialProviders.map(({ id, name }) => ({
@@ -112,7 +143,11 @@ let AuthService = class AuthService {
112
143
  name,
113
144
  }));
114
145
  }
115
- /** Signs up a user with an email address and password. */
146
+ /**
147
+ * Signs up a user with an email address and password.
148
+ * @param options - Configuration for this operation.
149
+ * @returns User registration response and optional session token.
150
+ */
116
151
  async signUp(options) {
117
152
  this.authMiddleware.assertAuthenticationCanChange();
118
153
  const result = await this.auth.api.signUpEmail({
@@ -123,7 +158,11 @@ let AuthService = class AuthService {
123
158
  applyAuthResponseCookies(result.headers);
124
159
  return result.response;
125
160
  }
126
- /** Signs in a user with an email address and password. */
161
+ /**
162
+ * Signs in a user with an email address and password.
163
+ * @param options - Configuration for this operation.
164
+ * @returns Normalized password sign-in response.
165
+ */
127
166
  async signIn(options) {
128
167
  this.authMiddleware.assertAuthenticationCanChange();
129
168
  const result = await this.auth.api.signInEmail({
@@ -134,7 +173,11 @@ let AuthService = class AuthService {
134
173
  applyAuthResponseCookies(result.headers);
135
174
  return this.normalizeSignInResult(result.response);
136
175
  }
137
- /** Starts a social or generic OAuth sign-in flow. */
176
+ /**
177
+ * Starts a social or generic OAuth sign-in flow.
178
+ * @param options - Configuration for this operation.
179
+ * @returns Normalized social sign-in response.
180
+ */
138
181
  async signInSocial(options) {
139
182
  this.authMiddleware.assertAuthenticationCanChange();
140
183
  const result = await this.auth.api.signInSocial({
@@ -145,7 +188,10 @@ let AuthService = class AuthService {
145
188
  applyAuthResponseCookies(result.headers);
146
189
  return this.normalizeSignInSocialResult(result.response);
147
190
  }
148
- /** Signs out the session represented by the current request context. */
191
+ /**
192
+ * Signs out the session represented by the current request context.
193
+ * @returns Whether the current session was signed out successfully.
194
+ */
149
195
  async signOut() {
150
196
  this.authMiddleware.assertAuthenticationCanChange();
151
197
  const result = await this.auth.api.signOut({
@@ -157,16 +203,28 @@ let AuthService = class AuthService {
157
203
  applyAuthResponseCookies(result.headers);
158
204
  return result.response.success;
159
205
  }
160
- /** Sends an email-verification link to an unverified email address. */
206
+ /**
207
+ * Sends an email-verification link to an unverified email address.
208
+ * @param options - Configuration for this operation.
209
+ * @returns Whether the verification email request succeeded.
210
+ */
161
211
  async sendVerificationEmail(options) {
162
212
  const result = await this.auth.api.sendVerificationEmail({ body: options });
163
213
  return result.status;
164
214
  }
165
- /** Requests an enumeration-safe password-reset email. */
215
+ /**
216
+ * Requests an enumeration-safe password-reset email.
217
+ * @param options - Configuration for this operation.
218
+ * @returns Password reset request status and message.
219
+ */
166
220
  async requestPasswordReset(options) {
167
221
  return await this.auth.api.requestPasswordReset({ body: options });
168
222
  }
169
- /** Resets a credential password using a password-reset token. */
223
+ /**
224
+ * Resets a credential password using a password-reset token.
225
+ * @param options - Configuration for this operation.
226
+ * @returns Whether the password was reset successfully.
227
+ */
170
228
  async resetPassword(options) {
171
229
  this.authMiddleware.assertAuthenticationCanChange();
172
230
  const result = await this.auth.api.resetPassword({ body: options });
@@ -174,7 +232,11 @@ let AuthService = class AuthService {
174
232
  await this.authMiddleware.revalidateCurrentSession();
175
233
  return result.status;
176
234
  }
177
- /** Verifies the authenticated user's credential password. */
235
+ /**
236
+ * Verifies the authenticated user's credential password.
237
+ * @param password - Plaintext password to verify.
238
+ * @returns Whether password verification succeeded.
239
+ */
178
240
  async verifyCurrentUserPassword(password) {
179
241
  const result = await this.auth.api.verifyPassword({
180
242
  body: { password },
@@ -182,7 +244,11 @@ let AuthService = class AuthService {
182
244
  });
183
245
  return result.status;
184
246
  }
185
- /** Updates the authenticated user's profile and refreshes its request identity. */
247
+ /**
248
+ * Updates the authenticated user's profile and refreshes its request identity.
249
+ * @param options - Configuration for this operation.
250
+ * @returns Whether the profile update succeeded.
251
+ */
186
252
  async updateCurrentUser(options) {
187
253
  this.authMiddleware.assertAuthenticationCanChange();
188
254
  const result = await this.auth.api.updateUser({
@@ -195,7 +261,11 @@ let AuthService = class AuthService {
195
261
  applyAuthResponseCookies(result.headers);
196
262
  return result.response.status;
197
263
  }
198
- /** Starts or completes the authenticated user's configured email-change flow. */
264
+ /**
265
+ * Starts or completes the authenticated user's configured email-change flow.
266
+ * @param options - Configuration for this operation.
267
+ * @returns Whether the email change request succeeded.
268
+ */
199
269
  async changeCurrentUserEmail(options) {
200
270
  this.authMiddleware.assertAuthenticationCanChange();
201
271
  const result = await this.auth.api.changeEmail({
@@ -209,7 +279,11 @@ let AuthService = class AuthService {
209
279
  applyAuthResponseCookies(result.headers);
210
280
  return result.response.status;
211
281
  }
212
- /** Changes the authenticated user's credential password. */
282
+ /**
283
+ * Changes the authenticated user's credential password.
284
+ * @param options - Configuration for this operation.
285
+ * @returns Replacement session token, when the password change issues one.
286
+ */
213
287
  async changeCurrentUserPassword(options) {
214
288
  if (options.revokeOtherSessions)
215
289
  this.authMiddleware.assertAuthenticationCanChange();
@@ -231,7 +305,11 @@ let AuthService = class AuthService {
231
305
  applyAuthResponseCookies(result.headers);
232
306
  return { token: result.response.token };
233
307
  }
234
- /** Adds a credential password to an authenticated account that has none. */
308
+ /**
309
+ * Adds a credential password to an authenticated account that has none.
310
+ * @param newPassword - New plaintext password to validate and store.
311
+ * @returns Whether the credential password was set successfully.
312
+ */
235
313
  async setCurrentUserPassword(newPassword) {
236
314
  const result = await this.auth.api.setPassword({
237
315
  body: { newPassword },
@@ -239,7 +317,11 @@ let AuthService = class AuthService {
239
317
  });
240
318
  return result.status;
241
319
  }
242
- /** Requests deletion of the authenticated user's account. */
320
+ /**
321
+ * Requests deletion of the authenticated user's account.
322
+ * @param options - Configuration for this operation.
323
+ * @returns Account deletion status and any redirect information.
324
+ */
243
325
  async deleteCurrentUser(options) {
244
326
  this.authMiddleware.assertAuthenticationCanChange();
245
327
  const result = await this.auth.api.deleteUser({
@@ -253,11 +335,18 @@ let AuthService = class AuthService {
253
335
  applyAuthResponseCookies(result.headers);
254
336
  return result.response;
255
337
  }
256
- /** Lists safe summaries of authentication accounts linked to the current user. */
338
+ /**
339
+ * Lists safe summaries of authentication accounts linked to the current user.
340
+ * @returns Provider accounts linked to the authenticated user.
341
+ */
257
342
  async listCurrentUserAccounts() {
258
343
  return await this.auth.api.listUserAccounts({ headers: headers() });
259
344
  }
260
- /** Starts a social or OpenID Connect account-linking flow. */
345
+ /**
346
+ * Starts a social or OpenID Connect account-linking flow.
347
+ * @param options - Configuration for this operation.
348
+ * @returns Account linking response and any provider redirect URL.
349
+ */
261
350
  async linkCurrentUserAccount(options) {
262
351
  const result = await this.auth.api.linkSocialAccount({
263
352
  body: options,
@@ -267,7 +356,11 @@ let AuthService = class AuthService {
267
356
  applyAuthResponseCookies(result.headers);
268
357
  return result.response;
269
358
  }
270
- /** Unlinks an authentication account from the current user. */
359
+ /**
360
+ * Unlinks an authentication account from the current user.
361
+ * @param options - Configuration for this operation.
362
+ * @returns Whether the provider account was unlinked successfully.
363
+ */
271
364
  async unlinkCurrentUserAccount(options) {
272
365
  const result = await this.auth.api.unlinkAccount({
273
366
  body: options,
@@ -275,7 +368,11 @@ let AuthService = class AuthService {
275
368
  });
276
369
  return result.status;
277
370
  }
278
- /** Returns a usable provider access token for a linked account. */
371
+ /**
372
+ * Returns a usable provider access token for a linked account.
373
+ * @param selector - Fields that identify the provider account.
374
+ * @returns Provider access token with expiration and scope metadata.
375
+ */
279
376
  async getAccessToken(selector) {
280
377
  const result = await this.auth.api.getAccessToken({
281
378
  body: selector,
@@ -288,7 +385,11 @@ let AuthService = class AuthService {
288
385
  idToken: result.idToken ?? null,
289
386
  };
290
387
  }
291
- /** Refreshes provider credentials for a linked account. */
388
+ /**
389
+ * Refreshes provider credentials for a linked account.
390
+ * @param selector - Fields that identify the provider account.
391
+ * @returns Refreshed provider tokens and their expiration metadata.
392
+ */
292
393
  async refreshToken(selector) {
293
394
  const result = await this.auth.api.refreshToken({
294
395
  body: selector,
@@ -305,7 +406,11 @@ let AuthService = class AuthService {
305
406
  accountId: result.accountId,
306
407
  };
307
408
  }
308
- /** Returns provider identity and metadata for a linked account. */
409
+ /**
410
+ * Returns provider identity and metadata for a linked account.
411
+ * @param selector - Fields that identify the provider account.
412
+ * @returns Information returned by the selected provider account.
413
+ */
309
414
  async getAccountInfo(selector) {
310
415
  return (await this.auth.api.accountInfo({
311
416
  query: selector,
@@ -1 +1 @@
1
- {"version":3,"file":"auth.service.js","sourceRoot":"","sources":["../../src/services/auth.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AACrE,OAAO,EAAE,kBAAkB,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAExE,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AACxD,OAAO,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAClD,OAAO,EACL,eAAe,GAEhB,MAAM,0CAA0C,CAAC;AAgClD,OAAO,EAAE,wBAAwB,EAAE,MAAM,8CAA8C,CAAC;AACxF,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD,qEAAqE;AAE9D,IAAM,WAAW,GAAjB,MA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AC,IAAI,CAAC,GAAG,CAAC,WAAW,CAAC;YACtC,KAAK,EAAE,QAAQ;YACf,OAAO,EAAE,OAAO,EAAE;SACnB,CAAC,CAAoC,CAAC;IACzC,CAAC;IAEO,qBAAqB,CAC3B,MAAoD;QAEpD,OAAO;YACL,GAAG,MAAM;YACT,GAAG,EAAE,MAAM,CAAC,GAAG,IAAI,IAAI;SACxB,CAAC;IACJ,CAAC;IAEO,2BAA2B,CAAC,MAKnC;QACC,OAAO;YACL,QAAQ,EAAE,MAAM,CAAC,QAAQ;YACzB,GAAG,EAAE,MAAM,CAAC,GAAG,IAAI,IAAI;YACvB,KAAK,EAAE,MAAM,CAAC,KAAK,IAAI,IAAI;YAC3B,IAAI,EAAE,MAAM,CAAC,IAAI,IAAI,IAAI;SAC1B,CAAC;IACJ,CAAC;CACF,CAAA;AA1dY,WAAW;IADvB,UAAU,EAAE;IAUR,WAAA,MAAM,CAAC,UAAU,CAAC,CAAA;6CACc,cAAc;QACjB,WAAW;QACR,cAAc;GAZtC,WAAW,CA0dvB"}
@@ -15,21 +15,54 @@ export declare class MemberApiKeyService {
15
15
  protected readonly em: EntityManager;
16
16
  private readonly authOptions;
17
17
  private readonly logger;
18
- /** Creates an API-key domain service. */
18
+ /**
19
+ * Creates an API-key domain service.
20
+ * @param em - Entity manager used for persistence.
21
+ * @param authOptions - Authentication module configuration.
22
+ */
19
23
  constructor(
20
24
  /** MikroORM entity manager used for API-key persistence. */
21
25
  em: EntityManager, authOptions: AuthModuleOptions);
22
- /** Lists API-key grants available to the caller in the selected workspace. */
26
+ /**
27
+ * Lists API-key grants available to the caller in the selected workspace.
28
+ * @param workspace - The workspace that scopes this operation.
29
+ * @returns Member API key permission choices with defaults and grant availability.
30
+ */
23
31
  getMemberApiKeyPermissions(workspace: Workspace): MemberApiKeyPermissionOption[];
24
- /** Returns a member-owned key in the selected workspace and within the caller's scope. */
32
+ /**
33
+ * Returns a member-owned key in the selected workspace and within the caller's scope.
34
+ * @param id - Identifier of the record to access.
35
+ * @param workspace - The workspace that scopes this operation.
36
+ * @returns Matching API key metadata with the credential hash omitted, or null.
37
+ */
25
38
  getMemberApiKey(id: string, workspace: Workspace): Promise<ApiKeyMetadata<MemberApiKey> | null>;
26
- /** Paginates all selected-workspace member keys within the caller's permission ceilings. */
39
+ /**
40
+ * Paginates all selected-workspace member keys within the caller's permission ceilings.
41
+ * @param workspace - The workspace that scopes this operation.
42
+ * @param args - Pagination, filtering, and ordering arguments.
43
+ * @param info - GraphQL selection information used to shape the query.
44
+ * @returns Paginated member API key metadata with credential hashes omitted.
45
+ */
27
46
  getMemberApiKeyConnection(workspace: Workspace, args: ConnectionArgsInterface<MemberApiKey>, info?: GraphQLResolveInfo): Promise<ConnectionResult<ApiKeyMetadata<MemberApiKey>>>;
28
- /** Creates an API key owned by a workspace member. */
47
+ /**
48
+ * Creates an API key owned by a workspace member.
49
+ * @param workspace - The workspace that scopes this operation.
50
+ * @param options - Configuration for this operation.
51
+ * @returns Created key metadata and its one-time plaintext credential.
52
+ */
29
53
  createMemberApiKey(workspace: Workspace, options: CreateMemberApiKeyOptions): Promise<CreatedApiKey<MemberApiKey>>;
30
- /** Updates a member-owned key in the selected workspace. */
54
+ /**
55
+ * Updates a member-owned key in the selected workspace.
56
+ * @param id - Identifier of the record to access.
57
+ * @param input - Requested field values for the operation.
58
+ * @returns Updated API key metadata without the stored credential hash.
59
+ */
31
60
  updateMemberApiKey(id: string, input: UpdateApiKeyOptions): Promise<ApiKeyMetadata<MemberApiKey>>;
32
- /** Deletes a member-owned key in the selected workspace. */
61
+ /**
62
+ * Deletes a member-owned key in the selected workspace.
63
+ * @param id - Identifier of the record to access.
64
+ * @returns Deleted API key metadata without the stored credential hash.
65
+ */
33
66
  deleteMemberApiKey(id: string): Promise<ApiKeyMetadata<MemberApiKey>>;
34
67
  private getCreationMember;
35
68
  private createKey;