@nest-boot/auth 8.0.3-beta.1 → 8.0.4-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +538 -2
- package/dist/abilities/user.ability.d.ts +3 -0
- package/dist/abilities/user.ability.js +2 -0
- package/dist/abilities/user.ability.js.map +1 -1
- package/dist/abilities/workspace.ability.d.ts +3 -0
- package/dist/abilities/workspace.ability.js +2 -0
- package/dist/abilities/workspace.ability.js.map +1 -1
- package/dist/adapters/mikro-orm/adapter-config.js +1 -0
- package/dist/adapters/mikro-orm/adapter-config.js.map +1 -1
- package/dist/adapters/mikro-orm/create-custom-adapter.d.ts +3 -2
- package/dist/adapters/mikro-orm/entity-metadata-resolver.d.ts +2 -2
- package/dist/adapters/mikro-orm/entity-metadata-resolver.js +22 -0
- package/dist/adapters/mikro-orm/entity-metadata-resolver.js.map +1 -1
- package/dist/adapters/mikro-orm/where-compiler.d.ts +24 -24
- package/dist/adapters/mikro-orm-adapter.d.ts +6 -2
- package/dist/adapters/mikro-orm-adapter.js +2 -1
- package/dist/adapters/mikro-orm-adapter.js.map +1 -1
- package/dist/api-key-usage.interceptor.d.ts +5 -2
- package/dist/api-key-usage.interceptor.js +10 -8
- package/dist/api-key-usage.interceptor.js.map +1 -1
- package/dist/auth-handler.middleware.d.ts +3 -0
- package/dist/auth-handler.middleware.js +3 -0
- package/dist/auth-handler.middleware.js.map +1 -1
- package/dist/auth-module-options.interface.d.ts +31 -338
- package/dist/auth.constants.d.ts +4 -0
- package/dist/auth.constants.js +4 -0
- package/dist/auth.constants.js.map +1 -1
- package/dist/auth.guard.d.ts +31 -9
- package/dist/auth.guard.js +49 -106
- package/dist/auth.guard.js.map +1 -1
- package/dist/auth.middleware.d.ts +20 -6
- package/dist/auth.middleware.js +119 -48
- package/dist/auth.middleware.js.map +1 -1
- package/dist/auth.module-definition.d.ts +1 -1
- package/dist/auth.module.d.ts +28 -5
- package/dist/auth.module.js +87 -64
- package/dist/auth.module.js.map +1 -1
- package/dist/connections/account.connection-definition.d.ts +9 -0
- package/dist/connections/account.connection-definition.js +38 -0
- package/dist/connections/account.connection-definition.js.map +1 -0
- package/dist/connections/index.d.ts +8 -0
- package/dist/connections/index.js +9 -0
- package/dist/connections/index.js.map +1 -0
- package/dist/connections/invitation.connection-definition.d.ts +9 -0
- package/dist/connections/invitation.connection-definition.js +40 -0
- package/dist/connections/invitation.connection-definition.js.map +1 -0
- package/dist/connections/member.connection-definition.d.ts +9 -0
- package/dist/connections/member.connection-definition.js +52 -0
- package/dist/connections/member.connection-definition.js.map +1 -0
- package/dist/connections/session.connection-definition.d.ts +9 -0
- package/dist/connections/session.connection-definition.js +32 -0
- package/dist/connections/session.connection-definition.js.map +1 -0
- package/dist/connections/user-api-key.connection-definition.d.ts +13 -0
- package/dist/connections/user-api-key.connection-definition.js +60 -0
- package/dist/connections/user-api-key.connection-definition.js.map +1 -0
- package/dist/connections/user.connection-definition.d.ts +9 -0
- package/dist/connections/user.connection-definition.js +46 -0
- package/dist/connections/user.connection-definition.js.map +1 -0
- package/dist/connections/workspace-api-key.connection-definition.d.ts +13 -0
- package/dist/connections/workspace-api-key.connection-definition.js +60 -0
- package/dist/connections/workspace-api-key.connection-definition.js.map +1 -0
- package/dist/connections/workspace.connection-definition.d.ts +13 -0
- package/dist/connections/workspace.connection-definition.js +43 -0
- package/dist/connections/workspace.connection-definition.js.map +1 -0
- package/dist/decorators/can.decorator.d.ts +8 -0
- package/dist/decorators/can.decorator.js +8 -0
- package/dist/decorators/can.decorator.js.map +1 -1
- package/dist/decorators/current-api-key.decorator.d.ts +1 -0
- package/dist/decorators/current-api-key.decorator.js +3 -3
- package/dist/decorators/current-api-key.decorator.js.map +1 -1
- package/dist/decorators/current-member.decorator.d.ts +2 -0
- package/dist/decorators/current-member.decorator.js +6 -0
- package/dist/decorators/current-member.decorator.js.map +1 -0
- package/dist/decorators/current-session.decorator.d.ts +1 -0
- package/dist/decorators/current-session.decorator.js +3 -2
- package/dist/decorators/current-session.decorator.js.map +1 -1
- package/dist/decorators/current-user.decorator.d.ts +1 -0
- package/dist/decorators/current-user.decorator.js +3 -2
- package/dist/decorators/current-user.decorator.js.map +1 -1
- package/dist/decorators/current-workspace.decorator.d.ts +1 -0
- package/dist/decorators/current-workspace.decorator.js +3 -2
- package/dist/decorators/current-workspace.decorator.js.map +1 -1
- package/dist/decorators/index.d.ts +1 -1
- package/dist/decorators/index.js +1 -1
- package/dist/decorators/index.js.map +1 -1
- package/dist/decorators/public.decorator.d.ts +1 -0
- package/dist/decorators/public.decorator.js +1 -0
- package/dist/decorators/public.decorator.js.map +1 -1
- package/dist/decorators/user-can.decorator.d.ts +8 -0
- package/dist/decorators/user-can.decorator.js +8 -0
- package/dist/decorators/user-can.decorator.js.map +1 -1
- package/dist/decorators/workspace-can.decorator.d.ts +8 -0
- package/dist/decorators/workspace-can.decorator.js +8 -0
- package/dist/decorators/workspace-can.decorator.js.map +1 -1
- package/dist/entities/account.entity.d.ts +21 -3
- package/dist/entities/account.entity.js +67 -29
- package/dist/entities/account.entity.js.map +1 -1
- package/dist/entities/auth-entity-map.d.ts +21 -0
- package/dist/entities/auth-entity-map.js +22 -0
- package/dist/entities/auth-entity-map.js.map +1 -0
- package/dist/entities/index.d.ts +14 -3
- package/dist/entities/index.js +25 -3
- package/dist/entities/index.js.map +1 -1
- package/dist/entities/invitation.entity.d.ts +24 -0
- package/dist/entities/invitation.entity.js +117 -0
- package/dist/entities/invitation.entity.js.map +1 -0
- package/dist/entities/member.entity.d.ts +28 -0
- package/dist/entities/member.entity.js +126 -0
- package/dist/entities/member.entity.js.map +1 -0
- package/dist/entities/session.entity.d.ts +16 -6
- package/dist/entities/session.entity.js +57 -27
- package/dist/entities/session.entity.js.map +1 -1
- package/dist/entities/user-api-key.entity.d.ts +29 -0
- package/dist/entities/user-api-key.entity.js +147 -0
- package/dist/entities/user-api-key.entity.js.map +1 -0
- package/dist/entities/user.entity.d.ts +18 -2
- package/dist/entities/user.entity.js +104 -29
- package/dist/entities/user.entity.js.map +1 -1
- package/dist/entities/verification.entity.d.ts +8 -1
- package/dist/entities/verification.entity.js +27 -11
- package/dist/entities/verification.entity.js.map +1 -1
- package/dist/entities/workspace-api-key.entity.d.ts +29 -0
- package/dist/entities/workspace-api-key.entity.js +147 -0
- package/dist/entities/workspace-api-key.entity.js.map +1 -0
- package/dist/entities/workspace.entity.d.ts +10 -3
- package/dist/entities/workspace.entity.js +51 -20
- package/dist/entities/workspace.entity.js.map +1 -1
- package/dist/enums/index.d.ts +8 -0
- package/dist/enums/index.js +9 -0
- package/dist/enums/index.js.map +1 -0
- package/dist/enums/invitation-status.enum.d.ts +11 -0
- package/dist/enums/invitation-status.enum.js +17 -0
- package/dist/enums/invitation-status.enum.js.map +1 -0
- package/dist/enums/member-status.enum.d.ts +9 -0
- package/dist/enums/member-status.enum.js +15 -0
- package/dist/enums/member-status.enum.js.map +1 -0
- package/dist/enums/user-api-key-permission.enum.d.ts +4 -0
- package/dist/enums/user-api-key-permission.enum.js +11 -0
- package/dist/enums/user-api-key-permission.enum.js.map +1 -0
- package/dist/enums/user-permission.enum.d.ts +4 -0
- package/dist/enums/user-permission.enum.js +7 -0
- package/dist/enums/user-permission.enum.js.map +1 -0
- package/dist/enums/user-role.enum.d.ts +4 -0
- package/dist/enums/user-role.enum.js +6 -0
- package/dist/enums/user-role.enum.js.map +1 -0
- package/dist/enums/workspace-api-key-permission.enum.d.ts +4 -0
- package/dist/enums/workspace-api-key-permission.enum.js +11 -0
- package/dist/enums/workspace-api-key-permission.enum.js.map +1 -0
- package/dist/enums/workspace-permission.enum.d.ts +4 -0
- package/dist/enums/workspace-permission.enum.js +7 -0
- package/dist/enums/workspace-permission.enum.js.map +1 -0
- package/dist/enums/workspace-role.enum.d.ts +4 -0
- package/dist/enums/workspace-role.enum.js +9 -0
- package/dist/enums/workspace-role.enum.js.map +1 -0
- package/dist/index.d.ts +182 -12
- package/dist/index.js +181 -12
- package/dist/index.js.map +1 -1
- package/dist/infrastructure/api-key-authentication.service.d.ts +14 -0
- package/dist/infrastructure/api-key-authentication.service.js +78 -0
- package/dist/infrastructure/api-key-authentication.service.js.map +1 -0
- package/dist/infrastructure/auth-ability.factory.d.ts +15 -0
- package/dist/infrastructure/auth-ability.factory.js +91 -0
- package/dist/infrastructure/auth-ability.factory.js.map +1 -0
- package/dist/infrastructure/auth-enum-registry.d.ts +8 -0
- package/dist/infrastructure/auth-enum-registry.js +48 -0
- package/dist/infrastructure/auth-enum-registry.js.map +1 -0
- package/dist/infrastructure/auth-service.providers.d.ts +3 -0
- package/dist/infrastructure/auth-service.providers.js +72 -0
- package/dist/infrastructure/auth-service.providers.js.map +1 -0
- package/dist/infrastructure/create-contextual-auth-service.d.ts +10 -0
- package/dist/infrastructure/create-contextual-auth-service.js +50 -0
- package/dist/infrastructure/create-contextual-auth-service.js.map +1 -0
- package/dist/infrastructure/request-identity.d.ts +34 -0
- package/dist/infrastructure/request-identity.js +174 -0
- package/dist/infrastructure/request-identity.js.map +1 -0
- package/dist/infrastructure/revoked-authentication.exception.d.ts +4 -0
- package/dist/infrastructure/revoked-authentication.exception.js +5 -0
- package/dist/infrastructure/revoked-authentication.exception.js.map +1 -0
- package/dist/inputs/add-member.input.d.ts +5 -0
- package/dist/inputs/add-member.input.js +26 -0
- package/dist/inputs/add-member.input.js.map +1 -0
- package/dist/inputs/auth-change-email.input.d.ts +7 -0
- package/dist/inputs/auth-change-email.input.js +33 -0
- package/dist/inputs/auth-change-email.input.js.map +1 -0
- package/dist/inputs/auth-change-password.input.d.ts +9 -0
- package/dist/inputs/auth-change-password.input.js +40 -0
- package/dist/inputs/auth-change-password.input.js.map +1 -0
- package/dist/inputs/auth-delete-user.input.d.ts +9 -0
- package/dist/inputs/auth-delete-user.input.js +40 -0
- package/dist/inputs/auth-delete-user.input.js.map +1 -0
- package/dist/inputs/auth-link-social-account.input.d.ts +13 -0
- package/dist/inputs/auth-link-social-account.input.js +54 -0
- package/dist/inputs/auth-link-social-account.input.js.map +1 -0
- package/dist/inputs/auth-request-password-reset.input.d.ts +7 -0
- package/dist/inputs/auth-request-password-reset.input.js +33 -0
- package/dist/inputs/auth-request-password-reset.input.js.map +1 -0
- package/dist/inputs/auth-reset-password.input.d.ts +7 -0
- package/dist/inputs/auth-reset-password.input.js +33 -0
- package/dist/inputs/auth-reset-password.input.js.map +1 -0
- package/dist/inputs/auth-send-verification-email.input.d.ts +7 -0
- package/dist/inputs/auth-send-verification-email.input.js +33 -0
- package/dist/inputs/auth-send-verification-email.input.js.map +1 -0
- package/dist/inputs/auth-sign-in-social.input.d.ts +17 -0
- package/dist/inputs/auth-sign-in-social.input.js +68 -0
- package/dist/inputs/auth-sign-in-social.input.js.map +1 -0
- package/dist/inputs/auth-sign-in.input.d.ts +11 -0
- package/dist/inputs/auth-sign-in.input.js +47 -0
- package/dist/inputs/auth-sign-in.input.js.map +1 -0
- package/dist/inputs/auth-sign-up.input.d.ts +15 -0
- package/dist/inputs/auth-sign-up.input.js +61 -0
- package/dist/inputs/auth-sign-up.input.js.map +1 -0
- package/dist/inputs/auth-update-user.input.d.ts +7 -0
- package/dist/inputs/auth-update-user.input.js +33 -0
- package/dist/inputs/auth-update-user.input.js.map +1 -0
- package/dist/inputs/ban-user.input.d.ts +7 -0
- package/dist/inputs/ban-user.input.js +33 -0
- package/dist/inputs/ban-user.input.js.map +1 -0
- package/dist/inputs/create-invitation.input.d.ts +10 -0
- package/dist/inputs/create-invitation.input.js +41 -0
- package/dist/inputs/create-invitation.input.js.map +1 -0
- package/dist/inputs/create-user-api-key.input.d.ts +14 -0
- package/dist/inputs/create-user-api-key.input.js +55 -0
- package/dist/inputs/create-user-api-key.input.js.map +1 -0
- package/dist/inputs/create-user.input.d.ts +15 -0
- package/dist/inputs/create-user.input.js +56 -0
- package/dist/inputs/create-user.input.js.map +1 -0
- package/dist/inputs/create-workspace-api-key.input.d.ts +14 -0
- package/dist/inputs/create-workspace-api-key.input.js +55 -0
- package/dist/inputs/create-workspace-api-key.input.js.map +1 -0
- package/dist/inputs/create-workspace.input.d.ts +7 -0
- package/dist/inputs/create-workspace.input.js +28 -0
- package/dist/inputs/create-workspace.input.js.map +1 -0
- package/dist/inputs/set-member-permissions.input.d.ts +6 -0
- package/dist/inputs/set-member-permissions.input.js +27 -0
- package/dist/inputs/set-member-permissions.input.js.map +1 -0
- package/dist/inputs/set-member-roles.input.d.ts +6 -0
- package/dist/inputs/set-member-roles.input.js +27 -0
- package/dist/inputs/set-member-roles.input.js.map +1 -0
- package/dist/inputs/set-user-password.input.d.ts +5 -0
- package/dist/inputs/set-user-password.input.js +26 -0
- package/dist/inputs/set-user-password.input.js.map +1 -0
- package/dist/inputs/set-user-permissions.input.d.ts +6 -0
- package/dist/inputs/set-user-permissions.input.js +27 -0
- package/dist/inputs/set-user-permissions.input.js.map +1 -0
- package/dist/inputs/set-user-roles.input.d.ts +6 -0
- package/dist/inputs/set-user-roles.input.js +27 -0
- package/dist/inputs/set-user-roles.input.js.map +1 -0
- package/dist/inputs/update-member.input.d.ts +10 -0
- package/dist/inputs/update-member.input.js +43 -0
- package/dist/inputs/update-member.input.js.map +1 -0
- package/dist/inputs/update-user-api-key.input.d.ts +14 -0
- package/dist/inputs/update-user-api-key.input.js +50 -0
- package/dist/inputs/update-user-api-key.input.js.map +1 -0
- package/dist/inputs/update-user.input.d.ts +11 -0
- package/dist/inputs/update-user.input.js +47 -0
- package/dist/inputs/update-user.input.js.map +1 -0
- package/dist/inputs/update-workspace-api-key.input.d.ts +14 -0
- package/dist/inputs/update-workspace-api-key.input.js +50 -0
- package/dist/inputs/update-workspace-api-key.input.js.map +1 -0
- package/dist/inputs/update-workspace.input.d.ts +7 -0
- package/dist/inputs/update-workspace.input.js +28 -0
- package/dist/inputs/update-workspace.input.js.map +1 -0
- package/dist/inputs/user-id.input.d.ts +5 -0
- package/dist/inputs/user-id.input.js +26 -0
- package/dist/inputs/user-id.input.js.map +1 -0
- package/dist/interfaces/ability-rules.interface.d.ts +8 -0
- package/dist/interfaces/ability-rules.interface.js +2 -0
- package/dist/interfaces/ability-rules.interface.js.map +1 -0
- package/dist/interfaces/accept-invitation-result.interface.d.ts +9 -0
- package/dist/interfaces/accept-invitation-result.interface.js +2 -0
- package/dist/interfaces/accept-invitation-result.interface.js.map +1 -0
- package/dist/interfaces/add-member-options.interface.d.ts +7 -0
- package/dist/interfaces/add-member-options.interface.js +2 -0
- package/dist/interfaces/add-member-options.interface.js.map +1 -0
- package/dist/interfaces/auth-access-token.interface.d.ts +11 -0
- package/dist/interfaces/auth-access-token.interface.js +2 -0
- package/dist/interfaces/auth-access-token.interface.js.map +1 -0
- package/dist/interfaces/auth-account-info.interface.d.ts +11 -0
- package/dist/interfaces/auth-account-info.interface.js +2 -0
- package/dist/interfaces/auth-account-info.interface.js.map +1 -0
- package/dist/interfaces/auth-account.interface.d.ts +19 -0
- package/dist/interfaces/auth-account.interface.js +2 -0
- package/dist/interfaces/auth-account.interface.js.map +1 -0
- package/dist/interfaces/auth-change-email-confirmation-data.interface.d.ts +12 -0
- package/dist/interfaces/auth-change-email-confirmation-data.interface.js +2 -0
- package/dist/interfaces/auth-change-email-confirmation-data.interface.js.map +1 -0
- package/dist/interfaces/auth-delete-account-verification-data.interface.d.ts +10 -0
- package/dist/interfaces/auth-delete-account-verification-data.interface.js +2 -0
- package/dist/interfaces/auth-delete-account-verification-data.interface.js.map +1 -0
- package/dist/interfaces/auth-email-verification-data.interface.d.ts +10 -0
- package/dist/interfaces/auth-email-verification-data.interface.js +2 -0
- package/dist/interfaces/auth-email-verification-data.interface.js.map +1 -0
- package/dist/interfaces/auth-invitation-email-data.interface.d.ts +18 -0
- package/dist/interfaces/auth-invitation-email-data.interface.js +2 -0
- package/dist/interfaces/auth-invitation-email-data.interface.js.map +1 -0
- package/dist/interfaces/auth-module-account-linking-options.interface.d.ts +18 -0
- package/dist/interfaces/auth-module-account-linking-options.interface.js +2 -0
- package/dist/interfaces/auth-module-account-linking-options.interface.js.map +1 -0
- package/dist/interfaces/auth-module-account-options.interface.d.ts +16 -0
- package/dist/interfaces/auth-module-account-options.interface.js +2 -0
- package/dist/interfaces/auth-module-account-options.interface.js.map +1 -0
- package/dist/interfaces/auth-module-api-key-options.interface.d.ts +15 -0
- package/dist/interfaces/auth-module-api-key-options.interface.js +2 -0
- package/dist/interfaces/auth-module-api-key-options.interface.js.map +1 -0
- package/dist/interfaces/auth-module-change-email-options.interface.d.ts +10 -0
- package/dist/interfaces/auth-module-change-email-options.interface.js +2 -0
- package/dist/interfaces/auth-module-change-email-options.interface.js.map +1 -0
- package/dist/interfaces/auth-module-delete-user-options.interface.d.ts +15 -0
- package/dist/interfaces/auth-module-delete-user-options.interface.js +2 -0
- package/dist/interfaces/auth-module-delete-user-options.interface.js.map +1 -0
- package/dist/interfaces/auth-module-email-and-password-options.interface.d.ts +34 -0
- package/dist/interfaces/auth-module-email-and-password-options.interface.js +2 -0
- package/dist/interfaces/auth-module-email-and-password-options.interface.js.map +1 -0
- package/dist/interfaces/auth-module-email-verification-options.interface.d.ts +19 -0
- package/dist/interfaces/auth-module-email-verification-options.interface.js +2 -0
- package/dist/interfaces/auth-module-email-verification-options.interface.js.map +1 -0
- package/dist/interfaces/auth-module-middleware-options.interface.d.ts +11 -0
- package/dist/interfaces/auth-module-middleware-options.interface.js +2 -0
- package/dist/interfaces/auth-module-middleware-options.interface.js.map +1 -0
- package/dist/interfaces/auth-module-oauth-provider.interface.d.ts +91 -0
- package/dist/interfaces/auth-module-oauth-provider.interface.js +2 -0
- package/dist/interfaces/auth-module-oauth-provider.interface.js.map +1 -0
- package/dist/interfaces/auth-module-password-options.interface.d.ts +10 -0
- package/dist/interfaces/auth-module-password-options.interface.js +2 -0
- package/dist/interfaces/auth-module-password-options.interface.js.map +1 -0
- package/dist/interfaces/auth-module-session-cookie-cache-options.interface.d.ts +14 -0
- package/dist/interfaces/auth-module-session-cookie-cache-options.interface.js +2 -0
- package/dist/interfaces/auth-module-session-cookie-cache-options.interface.js.map +1 -0
- package/dist/interfaces/auth-module-session-cookie-cache-refresh-options.interface.d.ts +5 -0
- package/dist/interfaces/auth-module-session-cookie-cache-refresh-options.interface.js +2 -0
- package/dist/interfaces/auth-module-session-cookie-cache-refresh-options.interface.js.map +1 -0
- package/dist/interfaces/auth-module-session-options.interface.d.ts +16 -0
- package/dist/interfaces/auth-module-session-options.interface.js +2 -0
- package/dist/interfaces/auth-module-session-options.interface.js.map +1 -0
- package/dist/interfaces/auth-module-social-provider.interface.d.ts +109 -0
- package/dist/interfaces/auth-module-social-provider.interface.js +2 -0
- package/dist/interfaces/auth-module-social-provider.interface.js.map +1 -0
- package/dist/interfaces/auth-module-user-options.interface.d.ts +22 -0
- package/dist/interfaces/auth-module-user-options.interface.js +2 -0
- package/dist/interfaces/auth-module-user-options.interface.js.map +1 -0
- package/dist/interfaces/auth-module-workspace-options.interface.d.ts +19 -0
- package/dist/interfaces/auth-module-workspace-options.interface.js +2 -0
- package/dist/interfaces/auth-module-workspace-options.interface.js.map +1 -0
- package/dist/interfaces/auth-oauth-basic-token-endpoint-auth.interface.d.ts +5 -0
- package/dist/interfaces/auth-oauth-basic-token-endpoint-auth.interface.js +2 -0
- package/dist/interfaces/auth-oauth-basic-token-endpoint-auth.interface.js.map +1 -0
- package/dist/interfaces/auth-oauth-client-assertion-context.interface.d.ts +9 -0
- package/dist/interfaces/auth-oauth-client-assertion-context.interface.js +2 -0
- package/dist/interfaces/auth-oauth-client-assertion-context.interface.js.map +1 -0
- package/dist/interfaces/auth-oauth-custom-token-endpoint-auth.interface.d.ts +8 -0
- package/dist/interfaces/auth-oauth-custom-token-endpoint-auth.interface.js +2 -0
- package/dist/interfaces/auth-oauth-custom-token-endpoint-auth.interface.js.map +1 -0
- package/dist/interfaces/auth-oauth-mapped-user.interface.d.ts +15 -0
- package/dist/interfaces/auth-oauth-mapped-user.interface.js +2 -0
- package/dist/interfaces/auth-oauth-mapped-user.interface.js.map +1 -0
- package/dist/interfaces/auth-oauth-no-token-endpoint-auth.interface.d.ts +5 -0
- package/dist/interfaces/auth-oauth-no-token-endpoint-auth.interface.js +2 -0
- package/dist/interfaces/auth-oauth-no-token-endpoint-auth.interface.js.map +1 -0
- package/dist/interfaces/auth-oauth-post-token-endpoint-auth.interface.d.ts +5 -0
- package/dist/interfaces/auth-oauth-post-token-endpoint-auth.interface.js +2 -0
- package/dist/interfaces/auth-oauth-post-token-endpoint-auth.interface.js.map +1 -0
- package/dist/interfaces/auth-oauth-private-key-jwt-token-endpoint-auth.interface.d.ts +9 -0
- package/dist/interfaces/auth-oauth-private-key-jwt-token-endpoint-auth.interface.js +2 -0
- package/dist/interfaces/auth-oauth-private-key-jwt-token-endpoint-auth.interface.js.map +1 -0
- package/dist/interfaces/auth-oauth-profile.interface.d.ts +9 -0
- package/dist/interfaces/auth-oauth-profile.interface.js +2 -0
- package/dist/interfaces/auth-oauth-profile.interface.js.map +1 -0
- package/dist/interfaces/auth-oauth-refresh-context.interface.d.ts +7 -0
- package/dist/interfaces/auth-oauth-refresh-context.interface.js +2 -0
- package/dist/interfaces/auth-oauth-refresh-context.interface.js.map +1 -0
- package/dist/interfaces/auth-oauth-token-request-client-options.interface.d.ts +7 -0
- package/dist/interfaces/auth-oauth-token-request-client-options.interface.js +2 -0
- package/dist/interfaces/auth-oauth-token-request-client-options.interface.js.map +1 -0
- package/dist/interfaces/auth-oauth-token-request-context.interface.d.ts +15 -0
- package/dist/interfaces/auth-oauth-token-request-context.interface.js +2 -0
- package/dist/interfaces/auth-oauth-token-request-context.interface.js.map +1 -0
- package/dist/interfaces/auth-oauth-tokens.interface.d.ts +19 -0
- package/dist/interfaces/auth-oauth-tokens.interface.js +2 -0
- package/dist/interfaces/auth-oauth-tokens.interface.js.map +1 -0
- package/dist/interfaces/auth-oauth-user-info.interface.d.ts +13 -0
- package/dist/interfaces/auth-oauth-user-info.interface.js +2 -0
- package/dist/interfaces/auth-oauth-user-info.interface.js.map +1 -0
- package/dist/interfaces/auth-provider-user-info.interface.d.ts +13 -0
- package/dist/interfaces/auth-provider-user-info.interface.js +2 -0
- package/dist/interfaces/auth-provider-user-info.interface.js.map +1 -0
- package/dist/interfaces/auth-refreshed-token.interface.d.ts +19 -0
- package/dist/interfaces/auth-refreshed-token.interface.js +2 -0
- package/dist/interfaces/auth-refreshed-token.interface.js.map +1 -0
- package/dist/interfaces/auth-reset-password-data.interface.d.ts +10 -0
- package/dist/interfaces/auth-reset-password-data.interface.js +2 -0
- package/dist/interfaces/auth-reset-password-data.interface.js.map +1 -0
- package/dist/interfaces/auth-social-provider-user-info.interface.d.ts +8 -0
- package/dist/interfaces/auth-social-provider-user-info.interface.js +2 -0
- package/dist/interfaces/auth-social-provider-user-info.interface.js.map +1 -0
- package/dist/interfaces/auth-social-provider.interface.d.ts +7 -0
- package/dist/interfaces/auth-social-provider.interface.js +2 -0
- package/dist/interfaces/auth-social-provider.interface.js.map +1 -0
- package/dist/interfaces/auth-user.interface.d.ts +19 -0
- package/dist/interfaces/auth-user.interface.js +2 -0
- package/dist/interfaces/auth-user.interface.js.map +1 -0
- package/dist/interfaces/authenticated-session.interface.d.ts +9 -0
- package/dist/interfaces/authenticated-session.interface.js +2 -0
- package/dist/interfaces/authenticated-session.interface.js.map +1 -0
- package/dist/interfaces/ban-user-options.interface.d.ts +7 -0
- package/dist/interfaces/ban-user-options.interface.js +2 -0
- package/dist/interfaces/ban-user-options.interface.js.map +1 -0
- package/dist/interfaces/can-options.interface.d.ts +2 -0
- package/dist/interfaces/change-auth-email-options.interface.d.ts +7 -0
- package/dist/interfaces/change-auth-email-options.interface.js +2 -0
- package/dist/interfaces/change-auth-email-options.interface.js.map +1 -0
- package/dist/interfaces/change-auth-password-options.interface.d.ts +9 -0
- package/dist/interfaces/change-auth-password-options.interface.js +2 -0
- package/dist/interfaces/change-auth-password-options.interface.js.map +1 -0
- package/dist/interfaces/change-auth-password-result.interface.d.ts +5 -0
- package/dist/interfaces/change-auth-password-result.interface.js +2 -0
- package/dist/interfaces/change-auth-password-result.interface.js.map +1 -0
- package/dist/interfaces/create-api-key-options.interface.d.ts +14 -0
- package/dist/interfaces/create-api-key-options.interface.js +2 -0
- package/dist/interfaces/create-api-key-options.interface.js.map +1 -0
- package/dist/interfaces/create-invitation-options.interface.d.ts +9 -0
- package/dist/interfaces/create-invitation-options.interface.js +2 -0
- package/dist/interfaces/create-invitation-options.interface.js.map +1 -0
- package/dist/interfaces/create-user-options.interface.d.ts +13 -0
- package/dist/interfaces/create-user-options.interface.js +2 -0
- package/dist/interfaces/create-user-options.interface.js.map +1 -0
- package/dist/interfaces/create-workspace-options.interface.d.ts +5 -0
- package/dist/interfaces/create-workspace-options.interface.js +2 -0
- package/dist/interfaces/create-workspace-options.interface.js.map +1 -0
- package/dist/interfaces/created-api-key.interface.d.ts +8 -0
- package/dist/interfaces/created-api-key.interface.js +2 -0
- package/dist/interfaces/created-api-key.interface.js.map +1 -0
- package/dist/interfaces/delete-auth-user-options.interface.d.ts +9 -0
- package/dist/interfaces/delete-auth-user-options.interface.js +2 -0
- package/dist/interfaces/delete-auth-user-options.interface.js.map +1 -0
- package/dist/interfaces/delete-auth-user-result.interface.d.ts +7 -0
- package/dist/interfaces/delete-auth-user-result.interface.js +2 -0
- package/dist/interfaces/delete-auth-user-result.interface.js.map +1 -0
- package/dist/interfaces/impersonation-options.interface.d.ts +7 -0
- package/dist/interfaces/impersonation-options.interface.js +2 -0
- package/dist/interfaces/impersonation-options.interface.js.map +1 -0
- package/dist/interfaces/link-auth-social-account-options.interface.d.ts +21 -0
- package/dist/interfaces/link-auth-social-account-options.interface.js +2 -0
- package/dist/interfaces/link-auth-social-account-options.interface.js.map +1 -0
- package/dist/interfaces/link-auth-social-account-result.interface.d.ts +7 -0
- package/dist/interfaces/link-auth-social-account-result.interface.js +2 -0
- package/dist/interfaces/link-auth-social-account-result.interface.js.map +1 -0
- package/dist/interfaces/request-identity-patch.interface.d.ts +13 -0
- package/dist/interfaces/request-identity-patch.interface.js +2 -0
- package/dist/interfaces/request-identity-patch.interface.js.map +1 -0
- package/dist/interfaces/request-password-reset-options.interface.d.ts +7 -0
- package/dist/interfaces/request-password-reset-options.interface.js +2 -0
- package/dist/interfaces/request-password-reset-options.interface.js.map +1 -0
- package/dist/interfaces/request-password-reset-result.interface.d.ts +7 -0
- package/dist/interfaces/request-password-reset-result.interface.js +2 -0
- package/dist/interfaces/request-password-reset-result.interface.js.map +1 -0
- package/dist/interfaces/request-permissions.interface.d.ts +7 -0
- package/dist/interfaces/request-permissions.interface.js +2 -0
- package/dist/interfaces/request-permissions.interface.js.map +1 -0
- package/dist/interfaces/reset-password-options.interface.d.ts +7 -0
- package/dist/interfaces/reset-password-options.interface.js +2 -0
- package/dist/interfaces/reset-password-options.interface.js.map +1 -0
- package/dist/interfaces/route-argument-metadata-value.interface.d.ts +4 -0
- package/dist/interfaces/scope-policy-options.interface.d.ts +6 -0
- package/dist/interfaces/send-verification-email-options.interface.d.ts +7 -0
- package/dist/interfaces/send-verification-email-options.interface.js +2 -0
- package/dist/interfaces/send-verification-email-options.interface.js.map +1 -0
- package/dist/interfaces/serialized-ability-rule.interface.d.ts +7 -0
- package/dist/interfaces/sign-in-entity-result.interface.d.ts +7 -0
- package/dist/interfaces/sign-in-entity-result.interface.js +2 -0
- package/dist/interfaces/sign-in-entity-result.interface.js.map +1 -0
- package/dist/interfaces/sign-in-options.interface.d.ts +11 -0
- package/dist/interfaces/sign-in-options.interface.js +2 -0
- package/dist/interfaces/sign-in-options.interface.js.map +1 -0
- package/dist/interfaces/sign-in-result.interface.d.ts +12 -0
- package/dist/interfaces/sign-in-result.interface.js +2 -0
- package/dist/interfaces/sign-in-result.interface.js.map +1 -0
- package/dist/interfaces/sign-in-social-entity-result.interface.d.ts +7 -0
- package/dist/interfaces/sign-in-social-entity-result.interface.js +2 -0
- package/dist/interfaces/sign-in-social-entity-result.interface.js.map +1 -0
- package/dist/interfaces/sign-in-social-options.interface.d.ts +23 -0
- package/dist/interfaces/sign-in-social-options.interface.js +2 -0
- package/dist/interfaces/sign-in-social-options.interface.js.map +1 -0
- package/dist/interfaces/sign-in-social-result.interface.d.ts +12 -0
- package/dist/interfaces/sign-in-social-result.interface.js +2 -0
- package/dist/interfaces/sign-in-social-result.interface.js.map +1 -0
- package/dist/interfaces/sign-up-options.interface.d.ts +15 -0
- package/dist/interfaces/sign-up-options.interface.js +2 -0
- package/dist/interfaces/sign-up-options.interface.js.map +1 -0
- package/dist/interfaces/sign-up-result.interface.d.ts +8 -0
- package/dist/interfaces/sign-up-result.interface.js +2 -0
- package/dist/interfaces/sign-up-result.interface.js.map +1 -0
- package/dist/interfaces/unlink-auth-account-options.interface.d.ts +5 -0
- package/dist/interfaces/unlink-auth-account-options.interface.js +2 -0
- package/dist/interfaces/unlink-auth-account-options.interface.js.map +1 -0
- package/dist/interfaces/update-api-key-options.interface.d.ts +14 -0
- package/dist/interfaces/update-api-key-options.interface.js +2 -0
- package/dist/interfaces/update-api-key-options.interface.js.map +1 -0
- package/dist/interfaces/update-auth-user-options.interface.d.ts +7 -0
- package/dist/interfaces/update-auth-user-options.interface.js +2 -0
- package/dist/interfaces/update-auth-user-options.interface.js.map +1 -0
- package/dist/interfaces/update-member-options.interface.d.ts +10 -0
- package/dist/interfaces/update-member-options.interface.js +2 -0
- package/dist/interfaces/update-member-options.interface.js.map +1 -0
- package/dist/interfaces/update-user-options.interface.d.ts +11 -0
- package/dist/interfaces/update-user-options.interface.js +2 -0
- package/dist/interfaces/update-user-options.interface.js.map +1 -0
- package/dist/interfaces/update-workspace-options.interface.d.ts +5 -0
- package/dist/interfaces/update-workspace-options.interface.js +2 -0
- package/dist/interfaces/update-workspace-options.interface.js.map +1 -0
- package/dist/interfaces/user-api-key-validation.interface.d.ts +11 -0
- package/dist/interfaces/user-api-key-validation.interface.js +2 -0
- package/dist/interfaces/user-api-key-validation.interface.js.map +1 -0
- package/dist/interfaces/user-can-metadata.interface.d.ts +3 -0
- package/dist/interfaces/user-has-permissions-options.interface.d.ts +5 -0
- package/dist/interfaces/user-has-permissions-options.interface.js +2 -0
- package/dist/interfaces/user-has-permissions-options.interface.js.map +1 -0
- package/dist/interfaces/workspace-api-key-validation.interface.d.ts +11 -0
- package/dist/interfaces/workspace-api-key-validation.interface.js +2 -0
- package/dist/interfaces/workspace-api-key-validation.interface.js.map +1 -0
- package/dist/interfaces/workspace-can-metadata.interface.d.ts +3 -0
- package/dist/interfaces/workspace-has-permissions-options.interface.d.ts +5 -0
- package/dist/interfaces/workspace-has-permissions-options.interface.js +2 -0
- package/dist/interfaces/workspace-has-permissions-options.interface.js.map +1 -0
- package/dist/objects/accept-invitation-payload.object.d.ts +9 -0
- package/dist/objects/accept-invitation-payload.object.js +36 -0
- package/dist/objects/accept-invitation-payload.object.js.map +1 -0
- package/dist/objects/add-member-payload.object.d.ts +5 -0
- package/dist/objects/add-member-payload.object.js +24 -0
- package/dist/objects/add-member-payload.object.js.map +1 -0
- package/dist/objects/auth-ability-rule.object.d.ts +15 -0
- package/dist/objects/auth-ability-rule.object.js +55 -0
- package/dist/objects/auth-ability-rule.object.js.map +1 -0
- package/dist/objects/auth-change-password-result.object.d.ts +5 -0
- package/dist/objects/auth-change-password-result.object.js +24 -0
- package/dist/objects/auth-change-password-result.object.js.map +1 -0
- package/dist/objects/auth-delete-user-result.object.d.ts +7 -0
- package/dist/objects/auth-delete-user-result.object.js +30 -0
- package/dist/objects/auth-delete-user-result.object.js.map +1 -0
- package/dist/objects/auth-link-social-account-result.object.d.ts +7 -0
- package/dist/objects/auth-link-social-account-result.object.js +30 -0
- package/dist/objects/auth-link-social-account-result.object.js.map +1 -0
- package/dist/objects/auth-request-password-reset-result.object.d.ts +7 -0
- package/dist/objects/auth-request-password-reset-result.object.js +30 -0
- package/dist/objects/auth-request-password-reset-result.object.js.map +1 -0
- package/dist/objects/auth-sign-in-result.object.d.ts +12 -0
- package/dist/objects/auth-sign-in-result.object.js +43 -0
- package/dist/objects/auth-sign-in-result.object.js.map +1 -0
- package/dist/objects/auth-sign-in-social-result.object.d.ts +12 -0
- package/dist/objects/auth-sign-in-social-result.object.js +43 -0
- package/dist/objects/auth-sign-in-social-result.object.js.map +1 -0
- package/dist/objects/auth-social-provider.object.d.ts +7 -0
- package/dist/objects/auth-social-provider.object.js +30 -0
- package/dist/objects/auth-social-provider.object.js.map +1 -0
- package/dist/objects/ban-user-payload.object.d.ts +5 -0
- package/dist/objects/ban-user-payload.object.js +24 -0
- package/dist/objects/ban-user-payload.object.js.map +1 -0
- package/dist/objects/cancel-invitation-payload.object.d.ts +5 -0
- package/dist/objects/cancel-invitation-payload.object.js +24 -0
- package/dist/objects/cancel-invitation-payload.object.js.map +1 -0
- package/dist/objects/create-invitation-payload.object.d.ts +5 -0
- package/dist/objects/create-invitation-payload.object.js +24 -0
- package/dist/objects/create-invitation-payload.object.js.map +1 -0
- package/dist/objects/create-user-api-key-result.object.d.ts +10 -0
- package/dist/objects/create-user-api-key-result.object.js +33 -0
- package/dist/objects/create-user-api-key-result.object.js.map +1 -0
- package/dist/objects/create-user-payload.object.d.ts +5 -0
- package/dist/objects/create-user-payload.object.js +24 -0
- package/dist/objects/create-user-payload.object.js.map +1 -0
- package/dist/objects/create-workspace-api-key-result.object.d.ts +10 -0
- package/dist/objects/create-workspace-api-key-result.object.js +33 -0
- package/dist/objects/create-workspace-api-key-result.object.js.map +1 -0
- package/dist/objects/create-workspace-payload.object.d.ts +5 -0
- package/dist/objects/create-workspace-payload.object.js +24 -0
- package/dist/objects/create-workspace-payload.object.js.map +1 -0
- package/dist/objects/delete-user-payload.object.d.ts +5 -0
- package/dist/objects/delete-user-payload.object.js +24 -0
- package/dist/objects/delete-user-payload.object.js.map +1 -0
- package/dist/objects/delete-workspace-payload.object.d.ts +5 -0
- package/dist/objects/delete-workspace-payload.object.js +24 -0
- package/dist/objects/delete-workspace-payload.object.js.map +1 -0
- package/dist/objects/leave-workspace-payload.object.d.ts +5 -0
- package/dist/objects/leave-workspace-payload.object.js +24 -0
- package/dist/objects/leave-workspace-payload.object.js.map +1 -0
- package/dist/objects/reject-invitation-payload.object.d.ts +5 -0
- package/dist/objects/reject-invitation-payload.object.js +24 -0
- package/dist/objects/reject-invitation-payload.object.js.map +1 -0
- package/dist/objects/remove-member-payload.object.d.ts +5 -0
- package/dist/objects/remove-member-payload.object.js +24 -0
- package/dist/objects/remove-member-payload.object.js.map +1 -0
- package/dist/objects/set-member-permissions-payload.object.d.ts +5 -0
- package/dist/objects/set-member-permissions-payload.object.js +24 -0
- package/dist/objects/set-member-permissions-payload.object.js.map +1 -0
- package/dist/objects/set-member-roles-payload.object.d.ts +5 -0
- package/dist/objects/set-member-roles-payload.object.js +24 -0
- package/dist/objects/set-member-roles-payload.object.js.map +1 -0
- package/dist/objects/set-user-permissions-payload.object.d.ts +5 -0
- package/dist/objects/set-user-permissions-payload.object.js +24 -0
- package/dist/objects/set-user-permissions-payload.object.js.map +1 -0
- package/dist/objects/set-user-roles-payload.object.d.ts +5 -0
- package/dist/objects/set-user-roles-payload.object.js +24 -0
- package/dist/objects/set-user-roles-payload.object.js.map +1 -0
- package/dist/objects/sign-up-payload.object.d.ts +7 -0
- package/dist/objects/sign-up-payload.object.js +30 -0
- package/dist/objects/sign-up-payload.object.js.map +1 -0
- package/dist/objects/unban-user-payload.object.d.ts +5 -0
- package/dist/objects/unban-user-payload.object.js +24 -0
- package/dist/objects/unban-user-payload.object.js.map +1 -0
- package/dist/objects/update-member-payload.object.d.ts +5 -0
- package/dist/objects/update-member-payload.object.js +24 -0
- package/dist/objects/update-member-payload.object.js.map +1 -0
- package/dist/objects/update-user-payload.object.d.ts +5 -0
- package/dist/objects/update-user-payload.object.js +24 -0
- package/dist/objects/update-user-payload.object.js.map +1 -0
- package/dist/objects/update-workspace-payload.object.d.ts +5 -0
- package/dist/objects/update-workspace-payload.object.js +24 -0
- package/dist/objects/update-workspace-payload.object.js.map +1 -0
- package/dist/objects/user-api-key-permission-option.object.d.ts +8 -0
- package/dist/objects/user-api-key-permission-option.object.js +31 -0
- package/dist/objects/user-api-key-permission-option.object.js.map +1 -0
- package/dist/objects/user-permission-option.object.d.ts +8 -0
- package/dist/objects/user-permission-option.object.js +31 -0
- package/dist/objects/user-permission-option.object.js.map +1 -0
- package/dist/objects/user-role-option.object.d.ts +8 -0
- package/dist/objects/user-role-option.object.js +31 -0
- package/dist/objects/user-role-option.object.js.map +1 -0
- package/dist/objects/workspace-api-key-permission-option.object.d.ts +8 -0
- package/dist/objects/workspace-api-key-permission-option.object.js +31 -0
- package/dist/objects/workspace-api-key-permission-option.object.js.map +1 -0
- package/dist/objects/workspace-permission-option.object.d.ts +8 -0
- package/dist/objects/workspace-permission-option.object.js +31 -0
- package/dist/objects/workspace-permission-option.object.js.map +1 -0
- package/dist/objects/workspace-role-option.object.d.ts +8 -0
- package/dist/objects/workspace-role-option.object.js +31 -0
- package/dist/objects/workspace-role-option.object.js.map +1 -0
- package/dist/permission.constants.d.ts +23 -0
- package/dist/permission.constants.js +23 -0
- package/dist/permission.constants.js.map +1 -1
- package/dist/policies/create-scope-policy.d.ts +1 -0
- package/dist/policies/create-scope-policy.js +2 -1
- package/dist/policies/create-scope-policy.js.map +1 -1
- package/dist/policies/user-scope.policy.d.ts +8 -0
- package/dist/policies/user-scope.policy.js +8 -0
- package/dist/policies/user-scope.policy.js.map +1 -1
- package/dist/policies/workspace-scope.policy.d.ts +8 -0
- package/dist/policies/workspace-scope.policy.js +8 -0
- package/dist/policies/workspace-scope.policy.js.map +1 -1
- package/dist/resolvers/auth.resolver.d.ts +67 -0
- package/dist/resolvers/auth.resolver.js +279 -0
- package/dist/resolvers/auth.resolver.js.map +1 -0
- package/dist/resolvers/invitation.resolver.d.ts +32 -0
- package/dist/resolvers/invitation.resolver.js +134 -0
- package/dist/resolvers/invitation.resolver.js.map +1 -0
- package/dist/resolvers/member.resolver.d.ts +73 -0
- package/dist/resolvers/member.resolver.js +191 -0
- package/dist/resolvers/member.resolver.js.map +1 -0
- package/dist/resolvers/session.resolver.d.ts +33 -0
- package/dist/resolvers/session.resolver.js +156 -0
- package/dist/resolvers/session.resolver.js.map +1 -0
- package/dist/resolvers/user-api-key.resolver.d.ts +24 -0
- package/dist/resolvers/user-api-key.resolver.js +84 -0
- package/dist/resolvers/user-api-key.resolver.js.map +1 -0
- package/dist/resolvers/user.resolver.d.ts +75 -0
- package/dist/resolvers/user.resolver.js +289 -0
- package/dist/resolvers/user.resolver.js.map +1 -0
- package/dist/resolvers/workspace-api-key.resolver.d.ts +24 -0
- package/dist/resolvers/workspace-api-key.resolver.js +84 -0
- package/dist/resolvers/workspace-api-key.resolver.js.map +1 -0
- package/dist/resolvers/workspace.resolver.d.ts +80 -0
- package/dist/resolvers/workspace.resolver.js +211 -0
- package/dist/resolvers/workspace.resolver.js.map +1 -0
- package/dist/services/access-control.service.d.ts +52 -0
- package/dist/services/access-control.service.js +201 -0
- package/dist/services/access-control.service.js.map +1 -0
- package/dist/services/account.service.d.ts +14 -0
- package/dist/services/account.service.js +43 -0
- package/dist/services/account.service.js.map +1 -0
- package/dist/services/auth.service.d.ts +101 -0
- package/dist/services/auth.service.js +333 -0
- package/dist/services/auth.service.js.map +1 -0
- package/dist/services/invitation.service.d.ts +58 -0
- package/dist/services/invitation.service.js +386 -0
- package/dist/services/invitation.service.js.map +1 -0
- package/dist/services/member.service.d.ts +75 -0
- package/dist/services/member.service.js +390 -0
- package/dist/services/member.service.js.map +1 -0
- package/dist/services/session.service.d.ts +58 -0
- package/dist/services/session.service.js +313 -0
- package/dist/services/session.service.js.map +1 -0
- package/dist/services/user-api-key.service.d.ts +48 -0
- package/dist/services/user-api-key.service.js +260 -0
- package/dist/services/user-api-key.service.js.map +1 -0
- package/dist/services/user-deletion.service.d.ts +15 -0
- package/dist/services/user-deletion.service.js +50 -0
- package/dist/services/user-deletion.service.js.map +1 -0
- package/dist/services/user.service.d.ts +81 -0
- package/dist/services/user.service.js +479 -0
- package/dist/services/user.service.js.map +1 -0
- package/dist/services/workspace-api-key.service.d.ts +49 -0
- package/dist/services/workspace-api-key.service.js +272 -0
- package/dist/services/workspace-api-key.service.js.map +1 -0
- package/dist/services/workspace.service.d.ts +40 -0
- package/dist/services/workspace.service.js +202 -0
- package/dist/services/workspace.service.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/api-key-validation.type.d.ts +4 -0
- package/dist/types/api-key-validation.type.js +2 -0
- package/dist/types/api-key-validation.type.js.map +1 -0
- package/dist/types/api-key.type.d.ts +4 -0
- package/dist/types/api-key.type.js +2 -0
- package/dist/types/api-key.type.js.map +1 -0
- package/dist/types/auth-account-selector.type.d.ts +12 -0
- package/dist/types/auth-account-selector.type.js +2 -0
- package/dist/types/auth-account-selector.type.js.map +1 -0
- package/dist/types/auth-invitation-email-inviter.type.d.ts +7 -0
- package/dist/types/auth-invitation-email-inviter.type.js +2 -0
- package/dist/types/auth-invitation-email-inviter.type.js.map +1 -0
- package/dist/types/auth-maybe-promise.type.d.ts +2 -0
- package/dist/types/auth-maybe-promise.type.js +2 -0
- package/dist/types/auth-maybe-promise.type.js.map +1 -0
- package/dist/types/auth-module-provider.type.d.ts +4 -0
- package/dist/types/auth-module-provider.type.js +2 -0
- package/dist/types/auth-module-provider.type.js.map +1 -0
- package/dist/types/auth-module-roles.type.d.ts +3 -1
- package/dist/types/auth-module-social-provider-id.type.d.ts +2 -0
- package/dist/types/auth-module-social-provider-id.type.js +2 -0
- package/dist/types/auth-module-social-provider-id.type.js.map +1 -0
- package/dist/types/auth-oauth-token-endpoint-auth.type.d.ts +7 -0
- package/dist/types/auth-oauth-token-endpoint-auth.type.js +2 -0
- package/dist/types/auth-oauth-token-endpoint-auth.type.js.map +1 -0
- package/dist/types/auth-send-invitation-email.type.d.ts +7 -0
- package/dist/types/auth-send-invitation-email.type.js +2 -0
- package/dist/types/auth-send-invitation-email.type.js.map +1 -0
- package/dist/types/auth-send-reset-password.type.d.ts +7 -0
- package/dist/types/auth-send-reset-password.type.js +2 -0
- package/dist/types/auth-send-reset-password.type.js.map +1 -0
- package/dist/types/auth-send-verification-email.type.d.ts +7 -0
- package/dist/types/auth-send-verification-email.type.js +2 -0
- package/dist/types/auth-send-verification-email.type.js.map +1 -0
- package/dist/types/build-user-ability-callback.type.d.ts +10 -4
- package/dist/types/build-workspace-ability-callback.type.d.ts +10 -4
- package/dist/types/can-subject-factory.type.d.ts +1 -0
- package/dist/types/can-subject.type.d.ts +1 -0
- package/dist/types/lowercase-identifier.type.d.ts +6 -0
- package/dist/types/lowercase-identifier.type.js +2 -0
- package/dist/types/lowercase-identifier.type.js.map +1 -0
- package/dist/types/permission-name.type.d.ts +3 -0
- package/dist/types/permission-name.type.js +2 -0
- package/dist/types/permission-name.type.js.map +1 -0
- package/dist/types/role-name.type.d.ts +3 -0
- package/dist/types/role-name.type.js +2 -0
- package/dist/types/role-name.type.js.map +1 -0
- package/dist/types/route-argument-metadata.type.d.ts +1 -0
- package/dist/user.constants.d.ts +8 -2
- package/dist/user.constants.js +24 -14
- package/dist/user.constants.js.map +1 -1
- package/dist/utils/api-key-credential.util.d.ts +4 -0
- package/dist/utils/api-key-credential.util.js +16 -0
- package/dist/utils/api-key-credential.util.js.map +1 -0
- package/dist/utils/api-key-permissions.util.d.ts +6 -0
- package/dist/utils/api-key-permissions.util.js +16 -0
- package/dist/utils/api-key-permissions.util.js.map +1 -0
- package/dist/utils/append-metadata.util.d.ts +1 -0
- package/dist/utils/append-metadata.util.js +1 -0
- package/dist/utils/append-metadata.util.js.map +1 -1
- package/dist/utils/apply-auth-response-cookies.util.d.ts +1 -0
- package/dist/utils/apply-auth-response-cookies.util.js +1 -0
- package/dist/utils/apply-auth-response-cookies.util.js.map +1 -1
- package/dist/utils/auth-role.util.d.ts +8 -2
- package/dist/utils/auth-role.util.js +22 -6
- package/dist/utils/auth-role.util.js.map +1 -1
- package/dist/utils/build-request-ability.util.d.ts +7 -0
- package/dist/utils/build-request-ability.util.js +25 -0
- package/dist/utils/build-request-ability.util.js.map +1 -0
- package/dist/utils/can.util.d.ts +1 -0
- package/dist/utils/can.util.js +1 -0
- package/dist/utils/can.util.js.map +1 -1
- package/dist/utils/create-email-verification-config.d.ts +1 -0
- package/dist/utils/create-email-verification-config.js +1 -0
- package/dist/utils/create-email-verification-config.js.map +1 -1
- package/dist/utils/create-generic-oauth-config.d.ts +1 -0
- package/dist/utils/create-generic-oauth-config.js +1 -0
- package/dist/utils/create-generic-oauth-config.js.map +1 -1
- package/dist/utils/create-permission-enum.util.d.ts +2 -0
- package/dist/utils/create-permission-enum.util.js +16 -0
- package/dist/utils/create-permission-enum.util.js.map +1 -0
- package/dist/utils/create-user-config.d.ts +2 -1
- package/dist/utils/create-user-config.js +1 -0
- package/dist/utils/create-user-config.js.map +1 -1
- package/dist/utils/estimate-entropy.d.ts +7 -0
- package/dist/utils/estimate-entropy.js +7 -0
- package/dist/utils/estimate-entropy.js.map +1 -1
- package/dist/utils/extend-ability.util.d.ts +4 -0
- package/dist/utils/extend-ability.util.js +62 -0
- package/dist/utils/extend-ability.util.js.map +1 -0
- package/dist/utils/extract-api-key.util.d.ts +1 -0
- package/dist/utils/extract-api-key.util.js +1 -0
- package/dist/utils/extract-api-key.util.js.map +1 -1
- package/dist/utils/get-current-api-key.util.d.ts +3 -0
- package/dist/utils/get-current-api-key.util.js +9 -0
- package/dist/utils/get-current-api-key.util.js.map +1 -0
- package/dist/utils/get-user-ability.util.d.ts +2 -1
- package/dist/utils/get-user-ability.util.js +5 -2
- package/dist/utils/get-user-ability.util.js.map +1 -1
- package/dist/utils/get-workspace-ability.util.d.ts +2 -1
- package/dist/utils/get-workspace-ability.util.js +5 -2
- package/dist/utils/get-workspace-ability.util.js.map +1 -1
- package/dist/utils/resolve-auth-catalog.util.d.ts +7 -0
- package/dist/utils/resolve-auth-catalog.util.js +34 -0
- package/dist/utils/resolve-auth-catalog.util.js.map +1 -0
- package/dist/utils/resolve-effective-permissions.util.d.ts +9 -0
- package/dist/utils/resolve-effective-permissions.util.js +18 -0
- package/dist/utils/resolve-effective-permissions.util.js.map +1 -0
- package/dist/utils/resolve-request-permissions.util.d.ts +6 -0
- package/dist/utils/resolve-request-permissions.util.js +44 -0
- package/dist/utils/resolve-request-permissions.util.js.map +1 -0
- package/dist/utils/run-auth-query.d.ts +4 -0
- package/dist/utils/run-auth-query.js +32 -2
- package/dist/utils/run-auth-query.js.map +1 -1
- package/dist/utils/serialize-ability-rules.util.d.ts +1 -0
- package/dist/utils/serialize-ability-rules.util.js +2 -1
- package/dist/utils/serialize-ability-rules.util.js.map +1 -1
- package/dist/utils/split-auth-providers.d.ts +2 -1
- package/dist/utils/split-auth-providers.js +1 -0
- package/dist/utils/split-auth-providers.js.map +1 -1
- package/dist/utils/user-can.util.d.ts +1 -0
- package/dist/utils/user-can.util.js +3 -12
- package/dist/utils/user-can.util.js.map +1 -1
- package/dist/utils/workspace-can.util.d.ts +1 -0
- package/dist/utils/workspace-can.util.js +4 -12
- package/dist/utils/workspace-can.util.js.map +1 -1
- package/dist/workspace.constants.d.ts +10 -3
- package/dist/workspace.constants.js +24 -13
- package/dist/workspace.constants.js.map +1 -1
- package/package.json +36 -13
- package/dist/access-control.service.d.ts +0 -18
- package/dist/access-control.service.js +0 -153
- package/dist/access-control.service.js.map +0 -1
- package/dist/api-key.service.d.ts +0 -75
- package/dist/api-key.service.js +0 -332
- package/dist/api-key.service.js.map +0 -1
- package/dist/auth.service.d.ts +0 -27
- package/dist/auth.service.js +0 -199
- package/dist/auth.service.js.map +0 -1
- package/dist/decorators/current-workspace-member.decorator.d.ts +0 -1
- package/dist/decorators/current-workspace-member.decorator.js +0 -5
- package/dist/decorators/current-workspace-member.decorator.js.map +0 -1
- package/dist/entities/api-key.entity.d.ts +0 -17
- package/dist/entities/api-key.entity.js +0 -92
- package/dist/entities/api-key.entity.js.map +0 -1
- package/dist/entities/resolve-auth-relation-target.d.ts +0 -3
- package/dist/entities/resolve-auth-relation-target.js +0 -30
- package/dist/entities/resolve-auth-relation-target.js.map +0 -1
- package/dist/entities/workspace-invitation.entity.d.ts +0 -14
- package/dist/entities/workspace-invitation.entity.js +0 -74
- package/dist/entities/workspace-invitation.entity.js.map +0 -1
- package/dist/entities/workspace-member.entity.d.ts +0 -16
- package/dist/entities/workspace-member.entity.js +0 -86
- package/dist/entities/workspace-member.entity.js.map +0 -1
- package/dist/interfaces/auth-role.interface.d.ts +0 -4
- package/dist/interfaces/auth-role.interface.js +0 -2
- package/dist/interfaces/auth-role.interface.js.map +0 -1
- package/dist/interfaces/auth-service.interface.d.ts +0 -160
- package/dist/interfaces/auth-service.interface.js +0 -2
- package/dist/interfaces/auth-service.interface.js.map +0 -1
- package/dist/interfaces/session-service.interface.d.ts +0 -5
- package/dist/interfaces/session-service.interface.js +0 -2
- package/dist/interfaces/session-service.interface.js.map +0 -1
- package/dist/interfaces/user-service.interface.d.ts +0 -44
- package/dist/interfaces/user-service.interface.js +0 -2
- package/dist/interfaces/user-service.interface.js.map +0 -1
- package/dist/interfaces/workspace-service.interface.d.ts +0 -37
- package/dist/interfaces/workspace-service.interface.js +0 -2
- package/dist/interfaces/workspace-service.interface.js.map +0 -1
- package/dist/session.service.d.ts +0 -18
- package/dist/session.service.js +0 -165
- package/dist/session.service.js.map +0 -1
- package/dist/user-deletion.service.d.ts +0 -19
- package/dist/user-deletion.service.js +0 -96
- package/dist/user-deletion.service.js.map +0 -1
- package/dist/user.service.d.ts +0 -54
- package/dist/user.service.js +0 -384
- package/dist/user.service.js.map +0 -1
- package/dist/workspace.service.d.ts +0 -59
- package/dist/workspace.service.js +0 -618
- package/dist/workspace.service.js.map +0 -1
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/** API-key permission defaults and grant limits owned by AuthModule. */
|
|
2
|
+
export interface AuthModuleApiKeyOptions<Permission extends string = string> {
|
|
3
|
+
/**
|
|
4
|
+
* Permissions assigned when key creation omits `permissions`.
|
|
5
|
+
* Shared by user and workspace keys, so values must belong to the workspace
|
|
6
|
+
* catalog and allowedPermissions. Defaults to an empty list. User-only grants
|
|
7
|
+
* and invitation:create must be supplied explicitly when creating a user key.
|
|
8
|
+
*/
|
|
9
|
+
defaultPermissions?: readonly Permission[];
|
|
10
|
+
/**
|
|
11
|
+
* Permissions that may be granted to any API key.
|
|
12
|
+
* Defaults to the combined user and workspace permission catalogs.
|
|
13
|
+
*/
|
|
14
|
+
allowedPermissions?: readonly Permission[];
|
|
15
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth-module-api-key-options.interface.js","sourceRoot":"","sources":["../../src/interfaces/auth-module-api-key-options.interface.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { AuthChangeEmailConfirmationData } from "./auth-change-email-confirmation-data.interface.js";
|
|
2
|
+
/** Email-change lifecycle options. */
|
|
3
|
+
export interface AuthModuleChangeEmailOptions {
|
|
4
|
+
/** Whether changing email addresses is enabled. */
|
|
5
|
+
enabled: boolean;
|
|
6
|
+
/** Sends confirmation to the current email address. */
|
|
7
|
+
sendChangeEmailConfirmation?: (data: AuthChangeEmailConfirmationData, request?: Request) => Promise<void>;
|
|
8
|
+
/** Allows an unverified user to replace its email without verification. */
|
|
9
|
+
updateEmailWithoutVerification?: boolean;
|
|
10
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth-module-change-email-options.interface.js","sourceRoot":"","sources":["../../src/interfaces/auth-module-change-email-options.interface.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { AuthDeleteAccountVerificationData } from "./auth-delete-account-verification-data.interface.js";
|
|
2
|
+
import type { AuthUser } from "./auth-user.interface.js";
|
|
3
|
+
/** User-deletion lifecycle options. */
|
|
4
|
+
export interface AuthModuleDeleteUserOptions {
|
|
5
|
+
/** Whether self-service user deletion is enabled. */
|
|
6
|
+
enabled?: boolean;
|
|
7
|
+
/** Sends an account-deletion verification message. */
|
|
8
|
+
sendDeleteAccountVerification?: (data: AuthDeleteAccountVerificationData, request?: Request) => Promise<void>;
|
|
9
|
+
/** Runs before coordinated user deletion. */
|
|
10
|
+
beforeDelete?: (user: AuthUser, request?: Request) => Promise<void>;
|
|
11
|
+
/** Runs after coordinated user deletion. */
|
|
12
|
+
afterDelete?: (user: AuthUser, request?: Request) => Promise<void>;
|
|
13
|
+
/** Account-deletion token lifetime in seconds. */
|
|
14
|
+
deleteTokenExpiresIn?: number;
|
|
15
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth-module-delete-user-options.interface.js","sourceRoot":"","sources":["../../src/interfaces/auth-module-delete-user-options.interface.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { AuthSendResetPassword } from "../types/auth-send-reset-password.type.js";
|
|
2
|
+
import type { AuthModulePasswordOptions } from "./auth-module-password-options.interface.js";
|
|
3
|
+
import type { AuthUser } from "./auth-user.interface.js";
|
|
4
|
+
/** Email and password authentication options owned by AuthModule. */
|
|
5
|
+
export interface AuthModuleEmailAndPasswordOptions {
|
|
6
|
+
/** Whether email and password authentication is enabled. Defaults to true. */
|
|
7
|
+
enabled?: boolean;
|
|
8
|
+
/** Whether new email/password registrations are disabled. */
|
|
9
|
+
disableSignUp?: boolean;
|
|
10
|
+
/** Whether users must verify their email before signing in. Defaults to true. */
|
|
11
|
+
requireEmailVerification?: boolean;
|
|
12
|
+
/** Maximum accepted password length. Defaults to 128. */
|
|
13
|
+
maxPasswordLength?: number;
|
|
14
|
+
/** Minimum accepted password length. Defaults to 8. */
|
|
15
|
+
minPasswordLength?: number;
|
|
16
|
+
/** Custom password reset sender. Defaults to the injected Mailer implementation. */
|
|
17
|
+
sendResetPassword?: AuthSendResetPassword;
|
|
18
|
+
/** Password-reset token lifetime in seconds. */
|
|
19
|
+
resetPasswordTokenExpiresIn?: number;
|
|
20
|
+
/** Runs after a password has been reset successfully. */
|
|
21
|
+
onPasswordReset?: (data: {
|
|
22
|
+
user: AuthUser;
|
|
23
|
+
}, request?: Request) => Promise<void>;
|
|
24
|
+
/** Password hashing and verification callbacks. */
|
|
25
|
+
password?: AuthModulePasswordOptions;
|
|
26
|
+
/** Whether a successful registration creates a session automatically. */
|
|
27
|
+
autoSignIn?: boolean;
|
|
28
|
+
/** Whether password reset revokes every existing session. */
|
|
29
|
+
revokeSessionsOnPasswordReset?: boolean;
|
|
30
|
+
/** Runs when registration is attempted for an existing email address. */
|
|
31
|
+
onExistingUserSignUp?: (data: {
|
|
32
|
+
user: AuthUser;
|
|
33
|
+
}, request?: Request) => Promise<void>;
|
|
34
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth-module-email-and-password-options.interface.js","sourceRoot":"","sources":["../../src/interfaces/auth-module-email-and-password-options.interface.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { AuthSendVerificationEmail } from "../types/auth-send-verification-email.type.js";
|
|
2
|
+
import type { AuthUser } from "./auth-user.interface.js";
|
|
3
|
+
/** Email verification options owned by AuthModule. */
|
|
4
|
+
export interface AuthModuleEmailVerificationOptions {
|
|
5
|
+
/** Custom verification sender. Defaults to the injected Mailer implementation. */
|
|
6
|
+
sendVerificationEmail?: AuthSendVerificationEmail;
|
|
7
|
+
/** Whether registration sends a verification email automatically. */
|
|
8
|
+
sendOnSignUp?: boolean;
|
|
9
|
+
/** Whether sign-in sends a verification email for an unverified address. */
|
|
10
|
+
sendOnSignIn?: boolean;
|
|
11
|
+
/** Whether successful verification creates a session automatically. */
|
|
12
|
+
autoSignInAfterVerification?: boolean;
|
|
13
|
+
/** Verification-token lifetime in seconds. */
|
|
14
|
+
expiresIn?: number;
|
|
15
|
+
/** Runs immediately before an email address is verified. */
|
|
16
|
+
beforeEmailVerification?: (user: AuthUser, request?: Request) => Promise<void>;
|
|
17
|
+
/** Runs after an email address has been verified. */
|
|
18
|
+
afterEmailVerification?: (user: AuthUser, request?: Request) => Promise<void>;
|
|
19
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth-module-email-verification-options.interface.js","sourceRoot":"","sources":["../../src/interfaces/auth-module-email-verification-options.interface.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Type } from "@nestjs/common";
|
|
2
|
+
import type { RouteInfo } from "@nestjs/common/interfaces/middleware/middleware-configuration.interface.js";
|
|
3
|
+
/** Options for configuring auth middleware route registration. */
|
|
4
|
+
export interface AuthModuleMiddlewareOptions {
|
|
5
|
+
/** Whether to register the auth middleware (defaults to true). */
|
|
6
|
+
register?: boolean;
|
|
7
|
+
/** Routes to include in auth middleware processing. */
|
|
8
|
+
includeRoutes?: (string | RouteInfo | Type)[];
|
|
9
|
+
/** Routes to exclude from auth middleware processing. */
|
|
10
|
+
excludeRoutes?: (string | RouteInfo)[];
|
|
11
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth-module-middleware-options.interface.js","sourceRoot":"","sources":["../../src/interfaces/auth-module-middleware-options.interface.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import type { AuthMaybePromise } from "../types/auth-maybe-promise.type.js";
|
|
2
|
+
import type { AuthOAuthTokenEndpointAuth } from "../types/auth-oauth-token-endpoint-auth.type.js";
|
|
3
|
+
import type { AuthOAuthMappedUser } from "./auth-oauth-mapped-user.interface.js";
|
|
4
|
+
import type { AuthOAuthProfile } from "./auth-oauth-profile.interface.js";
|
|
5
|
+
import type { AuthOAuthRefreshContext } from "./auth-oauth-refresh-context.interface.js";
|
|
6
|
+
import type { AuthOAuthTokens } from "./auth-oauth-tokens.interface.js";
|
|
7
|
+
/** One custom OAuth 2.0 or OpenID Connect provider. */
|
|
8
|
+
export interface AuthModuleOAuthProvider {
|
|
9
|
+
/** Custom provider identifier. */
|
|
10
|
+
id: string;
|
|
11
|
+
/** Human-readable provider name. */
|
|
12
|
+
name?: string;
|
|
13
|
+
/** Resolves the provider's stable account subject. */
|
|
14
|
+
accountSubject?: (context: {
|
|
15
|
+
tokens: AuthOAuthTokens;
|
|
16
|
+
profile: AuthOAuthProfile;
|
|
17
|
+
}) => AuthMaybePromise<string | number>;
|
|
18
|
+
/** OAuth or OpenID Connect discovery document URL. */
|
|
19
|
+
discoveryUrl?: string;
|
|
20
|
+
/** Requires discovery metadata sufficient for ID-token verification. */
|
|
21
|
+
requireIdTokenVerification?: boolean;
|
|
22
|
+
/** OAuth authorization endpoint URL. */
|
|
23
|
+
authorizationUrl?: string;
|
|
24
|
+
/** OAuth token endpoint URL. */
|
|
25
|
+
tokenUrl?: string;
|
|
26
|
+
/** OAuth user-info endpoint URL. */
|
|
27
|
+
userInfoUrl?: string;
|
|
28
|
+
/** OpenID Connect logout endpoint URL. */
|
|
29
|
+
endSessionEndpoint?: string;
|
|
30
|
+
/** Redirect URL after provider logout. */
|
|
31
|
+
postLogoutRedirectURI?: string;
|
|
32
|
+
/** Disables provider logout when the local session is cleared. */
|
|
33
|
+
disableProviderLogout?: boolean;
|
|
34
|
+
/** OAuth client identifier. */
|
|
35
|
+
clientId: string;
|
|
36
|
+
/** OAuth client secret. */
|
|
37
|
+
clientSecret?: string;
|
|
38
|
+
/** Token-endpoint authentication strategy. */
|
|
39
|
+
tokenEndpointAuth?: AuthOAuthTokenEndpointAuth;
|
|
40
|
+
/** OAuth scopes. */
|
|
41
|
+
scopes?: string[];
|
|
42
|
+
/** Custom callback URL. */
|
|
43
|
+
redirectURI?: string;
|
|
44
|
+
/** OAuth response type. */
|
|
45
|
+
responseType?: string;
|
|
46
|
+
/** OAuth response mode. */
|
|
47
|
+
responseMode?: "query" | "form_post";
|
|
48
|
+
/** Authorization prompt. */
|
|
49
|
+
prompt?: "none" | "login" | "create" | "consent" | "select_account" | "select_account consent" | "login consent";
|
|
50
|
+
/** Enables PKCE. */
|
|
51
|
+
pkce?: boolean;
|
|
52
|
+
/** Authorization access type. */
|
|
53
|
+
accessType?: string;
|
|
54
|
+
/** Fallback access-token lifetime in seconds. */
|
|
55
|
+
accessTokenExpiresIn?: number;
|
|
56
|
+
/** Exchanges an authorization code for tokens. */
|
|
57
|
+
getToken?: (data: {
|
|
58
|
+
code: string;
|
|
59
|
+
redirectURI: string;
|
|
60
|
+
codeVerifier?: string;
|
|
61
|
+
deviceId?: string;
|
|
62
|
+
}) => Promise<AuthOAuthTokens>;
|
|
63
|
+
/** Fetches the raw provider profile. */
|
|
64
|
+
getUserInfo?: (tokens: AuthOAuthTokens) => Promise<AuthOAuthProfile | null>;
|
|
65
|
+
/** Maps a raw provider profile to local user fields. */
|
|
66
|
+
mapProfileToUser?: (profile: AuthOAuthProfile) => AuthMaybePromise<AuthOAuthMappedUser>;
|
|
67
|
+
/** Additional authorization request parameters. */
|
|
68
|
+
authorizationUrlParams?: Record<string, string>;
|
|
69
|
+
/** Additional token request parameters. */
|
|
70
|
+
tokenUrlParams?: Record<string, string>;
|
|
71
|
+
/** Additional refresh-token request parameters. */
|
|
72
|
+
refreshTokenParams?: Record<string, string> | ((context?: AuthOAuthRefreshContext) => AuthMaybePromise<Record<string, string> | undefined>);
|
|
73
|
+
/** Requires an explicit sign-up request for new identities. */
|
|
74
|
+
disableImplicitSignUp?: boolean;
|
|
75
|
+
/** Disables sign-up through this provider. */
|
|
76
|
+
disableSignUp?: boolean;
|
|
77
|
+
/** Legacy token-endpoint authentication strategy. */
|
|
78
|
+
authentication?: "basic" | "post";
|
|
79
|
+
/** Discovery request headers. */
|
|
80
|
+
discoveryHeaders?: Record<string, string>;
|
|
81
|
+
/** Authorization request headers. */
|
|
82
|
+
authorizationHeaders?: Record<string, string>;
|
|
83
|
+
/** Updates local user information from the provider. */
|
|
84
|
+
overrideUserInfo?: boolean;
|
|
85
|
+
/** Requires a verified email before creating a session. */
|
|
86
|
+
requireEmailVerification?: boolean;
|
|
87
|
+
/** Accepts provider-initiated OAuth flows. */
|
|
88
|
+
allowIdpInitiated?: boolean;
|
|
89
|
+
/** Disables OpenID Connect nonce binding. */
|
|
90
|
+
disableIdTokenNonceBinding?: boolean;
|
|
91
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth-module-oauth-provider.interface.js","sourceRoot":"","sources":["../../src/interfaces/auth-module-oauth-provider.interface.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** Password hashing callbacks used by email authentication. */
|
|
2
|
+
export interface AuthModulePasswordOptions {
|
|
3
|
+
/** Hashes a plain-text password. Defaults to the injected HashService. */
|
|
4
|
+
hash?: (password: string) => Promise<string>;
|
|
5
|
+
/** Verifies a plain-text password against its stored hash. */
|
|
6
|
+
verify?: (data: {
|
|
7
|
+
hash: string;
|
|
8
|
+
password: string;
|
|
9
|
+
}) => Promise<boolean>;
|
|
10
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth-module-password-options.interface.js","sourceRoot":"","sources":["../../src/interfaces/auth-module-password-options.interface.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { AuthModuleSessionCookieCacheRefreshOptions } from "./auth-module-session-cookie-cache-refresh-options.interface.js";
|
|
2
|
+
/** Session Cookie cache options. */
|
|
3
|
+
export interface AuthModuleSessionCookieCacheOptions {
|
|
4
|
+
/** Whether session Cookie caching is enabled. */
|
|
5
|
+
enabled?: boolean;
|
|
6
|
+
/** Cached session lifetime in seconds. */
|
|
7
|
+
maxAge?: number;
|
|
8
|
+
/** Cookie cache encoding strategy. */
|
|
9
|
+
strategy?: "compact" | "jwe" | "jwt";
|
|
10
|
+
/** Enables or configures stateless cache refresh. */
|
|
11
|
+
refreshCache?: boolean | AuthModuleSessionCookieCacheRefreshOptions;
|
|
12
|
+
/** Cache version used to invalidate previously issued values. */
|
|
13
|
+
version?: string | ((session: Record<string, unknown>, user: Record<string, unknown>) => string) | ((session: Record<string, unknown>, user: Record<string, unknown>) => Promise<string>);
|
|
14
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth-module-session-cookie-cache-options.interface.js","sourceRoot":"","sources":["../../src/interfaces/auth-module-session-cookie-cache-options.interface.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth-module-session-cookie-cache-refresh-options.interface.js","sourceRoot":"","sources":["../../src/interfaces/auth-module-session-cookie-cache-refresh-options.interface.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { AuthModuleSessionCookieCacheOptions } from "./auth-module-session-cookie-cache-options.interface.js";
|
|
2
|
+
/** Session lifecycle and Cookie cache options. */
|
|
3
|
+
export interface AuthModuleSessionOptions {
|
|
4
|
+
/** Session lifetime in seconds. */
|
|
5
|
+
expiresIn?: number;
|
|
6
|
+
/** Session refresh interval in seconds. */
|
|
7
|
+
updateAge?: number;
|
|
8
|
+
/** Disables automatic session refresh. */
|
|
9
|
+
disableSessionRefresh?: boolean;
|
|
10
|
+
/** Defers session refresh writes to POST requests. */
|
|
11
|
+
deferSessionRefresh?: boolean;
|
|
12
|
+
/** Session Cookie cache configuration. */
|
|
13
|
+
cookieCache?: AuthModuleSessionCookieCacheOptions;
|
|
14
|
+
/** Maximum session age considered fresh for sensitive operations. */
|
|
15
|
+
freshAge?: number;
|
|
16
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth-module-session-options.interface.js","sourceRoot":"","sources":["../../src/interfaces/auth-module-session-options.interface.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import type { AuthMaybePromise } from "../types/auth-maybe-promise.type.js";
|
|
2
|
+
import type { AuthModuleSocialProviderId } from "../types/auth-module-social-provider-id.type.js";
|
|
3
|
+
import type { AuthOAuthClientAssertionContext } from "./auth-oauth-client-assertion-context.interface.js";
|
|
4
|
+
import type { AuthOAuthMappedUser } from "./auth-oauth-mapped-user.interface.js";
|
|
5
|
+
import type { AuthOAuthTokens } from "./auth-oauth-tokens.interface.js";
|
|
6
|
+
import type { AuthSocialProviderUserInfo } from "./auth-social-provider-user-info.interface.js";
|
|
7
|
+
/** One built-in social provider registered through AuthModule. */
|
|
8
|
+
export interface AuthModuleSocialProvider {
|
|
9
|
+
/** Built-in provider identifier. */
|
|
10
|
+
id: AuthModuleSocialProviderId;
|
|
11
|
+
/** OAuth client identifier. */
|
|
12
|
+
clientId?: string | string[];
|
|
13
|
+
/** OAuth client secret. */
|
|
14
|
+
clientSecret?: string;
|
|
15
|
+
/** Provider scopes. */
|
|
16
|
+
scope?: string[];
|
|
17
|
+
/** Removes the provider's default scopes. */
|
|
18
|
+
disableDefaultScope?: boolean;
|
|
19
|
+
/** Custom callback URL. */
|
|
20
|
+
redirectURI?: string;
|
|
21
|
+
/** Custom authorization endpoint URL. */
|
|
22
|
+
authorizationEndpoint?: string;
|
|
23
|
+
/** Client key used by providers such as TikTok. */
|
|
24
|
+
clientKey?: string;
|
|
25
|
+
/** Disables client-submitted ID-token sign-in. */
|
|
26
|
+
disableIdTokenSignIn?: boolean;
|
|
27
|
+
/** Verifies a client-submitted ID token. */
|
|
28
|
+
verifyIdToken?: (token: string, nonce?: string, context?: unknown) => Promise<boolean>;
|
|
29
|
+
/** Fetches provider user information. */
|
|
30
|
+
getUserInfo?: (tokens: AuthOAuthTokens) => Promise<AuthSocialProviderUserInfo | null>;
|
|
31
|
+
/** Refreshes provider tokens. */
|
|
32
|
+
refreshAccessToken?: (refreshToken: string) => Promise<AuthOAuthTokens>;
|
|
33
|
+
/** Maps a raw provider profile to local user fields. */
|
|
34
|
+
mapProfileToUser?: (profile: Record<string, unknown>) => AuthMaybePromise<AuthOAuthMappedUser>;
|
|
35
|
+
/** Requires an explicit sign-up request for new identities. */
|
|
36
|
+
disableImplicitSignUp?: boolean;
|
|
37
|
+
/** Disables sign-up through this provider. */
|
|
38
|
+
disableSignUp?: boolean;
|
|
39
|
+
/** Authorization prompt. */
|
|
40
|
+
prompt?: "select_account" | "consent" | "login" | "none" | "select_account consent";
|
|
41
|
+
/** Authorization response mode. */
|
|
42
|
+
responseMode?: "query" | "form_post";
|
|
43
|
+
/** Updates local user information from the provider during sign-in. */
|
|
44
|
+
overrideUserInfoOnSignIn?: boolean;
|
|
45
|
+
/** Requires a verified email before creating a session. */
|
|
46
|
+
requireEmailVerification?: boolean;
|
|
47
|
+
/** Explicitly enables or disables this provider. */
|
|
48
|
+
enabled?: boolean;
|
|
49
|
+
/** Apple application bundle identifier. */
|
|
50
|
+
appBundleIdentifier?: string;
|
|
51
|
+
/** Apple token audience. */
|
|
52
|
+
audience?: string | string[];
|
|
53
|
+
/** Cognito hosted UI domain. */
|
|
54
|
+
domain?: string;
|
|
55
|
+
/** Cognito AWS region. */
|
|
56
|
+
region?: string;
|
|
57
|
+
/** Cognito user pool identifier. */
|
|
58
|
+
userPoolId?: string;
|
|
59
|
+
/** Whether Cognito client authentication requires a secret. */
|
|
60
|
+
requireClientSecret?: boolean;
|
|
61
|
+
/** Cognito identity-provider hint. */
|
|
62
|
+
identityProvider?: string;
|
|
63
|
+
/** Discord application permissions bit field. */
|
|
64
|
+
permissions?: number;
|
|
65
|
+
/** Provider-specific access type. */
|
|
66
|
+
accessType?: "offline" | "online" | "legacy";
|
|
67
|
+
/** Facebook user profile fields. */
|
|
68
|
+
fields?: string[];
|
|
69
|
+
/** Facebook OAuth configuration identifier. */
|
|
70
|
+
configId?: string;
|
|
71
|
+
/** GitLab or Paybin issuer URL. */
|
|
72
|
+
issuer?: string;
|
|
73
|
+
/** Google authorization display mode. */
|
|
74
|
+
display?: "page" | "popup" | "touch" | "wap";
|
|
75
|
+
/** Required Google Workspace hosted domain. */
|
|
76
|
+
hd?: string;
|
|
77
|
+
/** Enables Google's incremental authorization. */
|
|
78
|
+
includeGrantedScopes?: boolean;
|
|
79
|
+
/** Microsoft tenant identifier. */
|
|
80
|
+
tenantId?: string;
|
|
81
|
+
/** Microsoft authentication authority URL. */
|
|
82
|
+
authority?: string;
|
|
83
|
+
/** Creates a Microsoft private-key JWT client assertion. */
|
|
84
|
+
clientAssertion?: (context: AuthOAuthClientAssertionContext) => AuthMaybePromise<string>;
|
|
85
|
+
/** Microsoft profile photo size. */
|
|
86
|
+
profilePhotoSize?: 48 | 64 | 96 | 120 | 240 | 360 | 432 | 504 | 648;
|
|
87
|
+
/** Disables loading the Microsoft profile photo. */
|
|
88
|
+
disableProfilePhoto?: boolean;
|
|
89
|
+
/** PayPal or Salesforce environment. */
|
|
90
|
+
environment?: "sandbox" | "live" | "production";
|
|
91
|
+
/** Requests a PayPal shipping address. */
|
|
92
|
+
requestShippingAddress?: boolean;
|
|
93
|
+
/** Reddit access-token duration. */
|
|
94
|
+
duration?: string;
|
|
95
|
+
/** Salesforce login URL. */
|
|
96
|
+
loginUrl?: string;
|
|
97
|
+
/** Twitch claims. */
|
|
98
|
+
claims?: string[];
|
|
99
|
+
/** VK color scheme. */
|
|
100
|
+
scheme?: "light" | "dark";
|
|
101
|
+
/** WeChat platform type. */
|
|
102
|
+
platformType?: "WebsiteApp";
|
|
103
|
+
/** WeChat authorization page language. */
|
|
104
|
+
lang?: "cn" | "en";
|
|
105
|
+
/** Enables PKCE for providers that make it configurable. */
|
|
106
|
+
pkce?: boolean;
|
|
107
|
+
/** Cloudflare token-endpoint authentication method. */
|
|
108
|
+
tokenEndpointAuthMethod?: "client_secret_basic" | "client_secret_post" | "none";
|
|
109
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth-module-social-provider.interface.js","sourceRoot":"","sources":["../../src/interfaces/auth-module-social-provider.interface.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { AuthModuleRoles } from "../types/auth-module-roles.type.js";
|
|
2
|
+
import type { BuildUserAbilityCallback } from "../types/build-user-ability-callback.type.js";
|
|
3
|
+
import type { PermissionName } from "../types/permission-name.type.js";
|
|
4
|
+
import type { AuthModuleChangeEmailOptions } from "./auth-module-change-email-options.interface.js";
|
|
5
|
+
import type { AuthModuleDeleteUserOptions } from "./auth-module-delete-user-options.interface.js";
|
|
6
|
+
/** User lifecycle and authorization options owned by AuthModule. */
|
|
7
|
+
export interface AuthModuleUserOptions<Permission extends string = string, Role extends string = string> {
|
|
8
|
+
/** Role assigned to users when none is supplied. Defaults to `user`. */
|
|
9
|
+
defaultRole?: NoInfer<Role>;
|
|
10
|
+
/** Roles classified as administrators. Defaults to `admin`. */
|
|
11
|
+
adminRoles?: readonly NoInfer<Role>[];
|
|
12
|
+
/** Additional user permission names, merged with `DEFAULT_USER_PERMISSIONS`. */
|
|
13
|
+
permissions?: readonly (Permission & (string extends Permission ? unknown : PermissionName<Permission>))[];
|
|
14
|
+
/** Additional roles and grants; same-name roles extend `DEFAULT_USER_ROLES`. */
|
|
15
|
+
roles?: Partial<AuthModuleRoles<NoInfer<Permission>, Role>>;
|
|
16
|
+
/** Synchronously adds permission-bound business grants or restrictions; auth builds the final ability. */
|
|
17
|
+
buildAbility?: BuildUserAbilityCallback<Permission>;
|
|
18
|
+
/** Email-change lifecycle configuration. */
|
|
19
|
+
changeEmail?: AuthModuleChangeEmailOptions;
|
|
20
|
+
/** User-deletion lifecycle configuration. */
|
|
21
|
+
deleteUser?: AuthModuleDeleteUserOptions;
|
|
22
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth-module-user-options.interface.js","sourceRoot":"","sources":["../../src/interfaces/auth-module-user-options.interface.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { AuthModuleRoles } from "../types/auth-module-roles.type.js";
|
|
2
|
+
import type { AuthSendInvitationEmail } from "../types/auth-send-invitation-email.type.js";
|
|
3
|
+
import type { BuildWorkspaceAbilityCallback } from "../types/build-workspace-ability-callback.type.js";
|
|
4
|
+
import type { PermissionName } from "../types/permission-name.type.js";
|
|
5
|
+
/** Workspace lifecycle options owned by AuthModule. */
|
|
6
|
+
export interface AuthModuleWorkspaceOptions<Permission extends string = string, Role extends string = string> {
|
|
7
|
+
/** Role assigned to members and invitations when none is supplied. Defaults to `member`. */
|
|
8
|
+
defaultRole?: NoInfer<Role>;
|
|
9
|
+
/** Role assigned to a workspace creator. Defaults to `owner`. */
|
|
10
|
+
creatorRole?: NoInfer<Role>;
|
|
11
|
+
/** Additional workspace permission names, merged with `DEFAULT_WORKSPACE_PERMISSIONS`. */
|
|
12
|
+
permissions?: readonly (Permission & (string extends Permission ? unknown : PermissionName<Permission>))[];
|
|
13
|
+
/** Additional roles and grants; same-name roles extend `DEFAULT_WORKSPACE_ROLES`. */
|
|
14
|
+
roles?: Partial<AuthModuleRoles<NoInfer<Permission>, Role>>;
|
|
15
|
+
/** Synchronously adds permission-bound business grants or restrictions; auth builds the final ability. */
|
|
16
|
+
buildAbility?: BuildWorkspaceAbilityCallback<Permission>;
|
|
17
|
+
/** Sends the invitation link through an application-defined delivery flow. */
|
|
18
|
+
sendInvitationEmail?: AuthSendInvitationEmail;
|
|
19
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth-module-workspace-options.interface.js","sourceRoot":"","sources":["../../src/interfaces/auth-module-workspace-options.interface.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth-oauth-basic-token-endpoint-auth.interface.js","sourceRoot":"","sources":["../../src/interfaces/auth-oauth-basic-token-endpoint-auth.interface.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** Context supplied to private-key JWT client authentication. */
|
|
2
|
+
export interface AuthOAuthClientAssertionContext {
|
|
3
|
+
/** OAuth client identifier. */
|
|
4
|
+
clientId: string;
|
|
5
|
+
/** Token endpoint URL. */
|
|
6
|
+
tokenEndpoint: string;
|
|
7
|
+
/** OAuth grant being authenticated. */
|
|
8
|
+
grantType: "authorization_code" | "refresh_token" | "client_credentials";
|
|
9
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth-oauth-client-assertion-context.interface.js","sourceRoot":"","sources":["../../src/interfaces/auth-oauth-client-assertion-context.interface.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { AuthOAuthTokenRequestContext } from "./auth-oauth-token-request-context.interface.js";
|
|
2
|
+
/** Token endpoint authenticated by an application-defined request hook. */
|
|
3
|
+
export interface AuthOAuthCustomTokenEndpointAuth {
|
|
4
|
+
/** Authentication method. */
|
|
5
|
+
method: "custom";
|
|
6
|
+
/** Mutates the token request after standard grant fields are populated. */
|
|
7
|
+
customizeRequest: (context: AuthOAuthTokenRequestContext) => void | Promise<void>;
|
|
8
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth-oauth-custom-token-endpoint-auth.interface.js","sourceRoot":"","sources":["../../src/interfaces/auth-oauth-custom-token-endpoint-auth.interface.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/** Local user attributes mapped from an OAuth provider profile. */
|
|
2
|
+
export interface AuthOAuthMappedUser {
|
|
3
|
+
/** Provider identity is resolved separately and cannot replace the local ID. */
|
|
4
|
+
id?: never;
|
|
5
|
+
/** Display name. */
|
|
6
|
+
name?: string;
|
|
7
|
+
/** Email address. */
|
|
8
|
+
email?: string | null;
|
|
9
|
+
/** Profile image URL. */
|
|
10
|
+
image?: string;
|
|
11
|
+
/** Whether the email address is verified. */
|
|
12
|
+
emailVerified?: boolean;
|
|
13
|
+
/** Explicit application-owned profile fields. */
|
|
14
|
+
[key: string]: unknown;
|
|
15
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth-oauth-mapped-user.interface.js","sourceRoot":"","sources":["../../src/interfaces/auth-oauth-mapped-user.interface.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth-oauth-no-token-endpoint-auth.interface.js","sourceRoot":"","sources":["../../src/interfaces/auth-oauth-no-token-endpoint-auth.interface.ts"],"names":[],"mappings":""}
|