@nest-boot/auth 8.0.3-beta.0 → 8.0.3-beta.2
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/create-custom-adapter.js +13 -22
- package/dist/adapters/mikro-orm/create-custom-adapter.js.map +1 -1
- 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 +5 -3
- 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 +21 -6
- package/dist/auth.middleware.js +124 -36
- 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 +184 -12
- package/dist/index.js +183 -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 +14 -0
- package/dist/interfaces/scope-policy-options.interface.js +2 -0
- package/dist/interfaces/scope-policy-options.interface.js.map +1 -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 +4 -0
- package/dist/policies/create-scope-policy.js +38 -0
- package/dist/policies/create-scope-policy.js.map +1 -0
- package/dist/policies/index.d.ts +2 -0
- package/dist/policies/index.js +3 -0
- package/dist/policies/index.js.map +1 -0
- package/dist/policies/user-scope.policy.d.ts +11 -0
- package/dist/policies/user-scope.policy.js +13 -0
- package/dist/policies/user-scope.policy.js.map +1 -0
- package/dist/policies/workspace-scope.policy.d.ts +11 -0
- package/dist/policies/workspace-scope.policy.js +13 -0
- package/dist/policies/workspace-scope.policy.js.map +1 -0
- 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 +6 -0
- package/dist/utils/run-auth-query.js +51 -0
- package/dist/utils/run-auth-query.js.map +1 -0
- 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 +41 -19
- 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 -336
- 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 -171
- package/dist/session.service.js.map +0 -1
- package/dist/user-deletion.service.d.ts +0 -19
- package/dist/user-deletion.service.js +0 -103
- package/dist/user-deletion.service.js.map +0 -1
- package/dist/user.service.d.ts +0 -54
- package/dist/user.service.js +0 -386
- package/dist/user.service.js.map +0 -1
- package/dist/workspace.service.d.ts +0 -59
- package/dist/workspace.service.js +0 -611
- package/dist/workspace.service.js.map +0 -1
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
7
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
-
};
|
|
10
|
-
import { randomUUID } from "node:crypto";
|
|
11
|
-
import { BaseEntity, t } from "@mikro-orm/core";
|
|
12
|
-
import { Entity, ManyToOne, PrimaryKey, Property, Unique, } from "@mikro-orm/decorators/legacy";
|
|
13
|
-
import { resolveAuthRelationTarget } from "./resolve-auth-relation-target.js";
|
|
14
|
-
import { BaseUser } from "./user.entity.js";
|
|
15
|
-
import { BaseWorkspace } from "./workspace.entity.js";
|
|
16
|
-
let BaseApiKey = class BaseApiKey extends BaseEntity {
|
|
17
|
-
id = randomUUID();
|
|
18
|
-
name;
|
|
19
|
-
start = null;
|
|
20
|
-
prefix = null;
|
|
21
|
-
key;
|
|
22
|
-
enabled = true;
|
|
23
|
-
permissions = [];
|
|
24
|
-
createdAt = new Date();
|
|
25
|
-
updatedAt = new Date();
|
|
26
|
-
lastUsedAt = null;
|
|
27
|
-
expiresAt = null;
|
|
28
|
-
owner;
|
|
29
|
-
};
|
|
30
|
-
__decorate([
|
|
31
|
-
PrimaryKey({ type: t.uuid }),
|
|
32
|
-
__metadata("design:type", Object)
|
|
33
|
-
], BaseApiKey.prototype, "id", void 0);
|
|
34
|
-
__decorate([
|
|
35
|
-
Property({ type: t.text }),
|
|
36
|
-
__metadata("design:type", String)
|
|
37
|
-
], BaseApiKey.prototype, "name", void 0);
|
|
38
|
-
__decorate([
|
|
39
|
-
Property({ type: t.text, nullable: true }),
|
|
40
|
-
__metadata("design:type", Object)
|
|
41
|
-
], BaseApiKey.prototype, "start", void 0);
|
|
42
|
-
__decorate([
|
|
43
|
-
Property({ type: t.text, nullable: true }),
|
|
44
|
-
__metadata("design:type", Object)
|
|
45
|
-
], BaseApiKey.prototype, "prefix", void 0);
|
|
46
|
-
__decorate([
|
|
47
|
-
Property({ type: t.text }),
|
|
48
|
-
Unique(),
|
|
49
|
-
__metadata("design:type", String)
|
|
50
|
-
], BaseApiKey.prototype, "key", void 0);
|
|
51
|
-
__decorate([
|
|
52
|
-
Property({ type: t.boolean, default: true }),
|
|
53
|
-
__metadata("design:type", Object)
|
|
54
|
-
], BaseApiKey.prototype, "enabled", void 0);
|
|
55
|
-
__decorate([
|
|
56
|
-
Property({ type: t.array }),
|
|
57
|
-
__metadata("design:type", Object)
|
|
58
|
-
], BaseApiKey.prototype, "permissions", void 0);
|
|
59
|
-
__decorate([
|
|
60
|
-
Property({ type: t.datetime, defaultRaw: "now()" }),
|
|
61
|
-
__metadata("design:type", Object)
|
|
62
|
-
], BaseApiKey.prototype, "createdAt", void 0);
|
|
63
|
-
__decorate([
|
|
64
|
-
Property({
|
|
65
|
-
type: t.datetime,
|
|
66
|
-
defaultRaw: "now()",
|
|
67
|
-
onUpdate: () => new Date(),
|
|
68
|
-
}),
|
|
69
|
-
__metadata("design:type", Object)
|
|
70
|
-
], BaseApiKey.prototype, "updatedAt", void 0);
|
|
71
|
-
__decorate([
|
|
72
|
-
Property({ type: t.datetime, nullable: true }),
|
|
73
|
-
__metadata("design:type", Object)
|
|
74
|
-
], BaseApiKey.prototype, "lastUsedAt", void 0);
|
|
75
|
-
__decorate([
|
|
76
|
-
Property({ type: t.datetime, nullable: true }),
|
|
77
|
-
__metadata("design:type", Object)
|
|
78
|
-
], BaseApiKey.prototype, "expiresAt", void 0);
|
|
79
|
-
__decorate([
|
|
80
|
-
ManyToOne({
|
|
81
|
-
entity: () => [
|
|
82
|
-
resolveAuthRelationTarget(BaseUser, "User"),
|
|
83
|
-
resolveAuthRelationTarget(BaseWorkspace, "Workspace"),
|
|
84
|
-
],
|
|
85
|
-
}),
|
|
86
|
-
__metadata("design:type", Object)
|
|
87
|
-
], BaseApiKey.prototype, "owner", void 0);
|
|
88
|
-
BaseApiKey = __decorate([
|
|
89
|
-
Entity({ abstract: true })
|
|
90
|
-
], BaseApiKey);
|
|
91
|
-
export { BaseApiKey };
|
|
92
|
-
//# sourceMappingURL=api-key.entity.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"api-key.entity.js","sourceRoot":"","sources":["../../src/entities/api-key.entity.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,OAAO,EAAE,UAAU,EAAsB,CAAC,EAAE,MAAM,iBAAiB,CAAC;AACpE,OAAO,EACL,MAAM,EACN,SAAS,EACT,UAAU,EACV,QAAQ,EACR,MAAM,GACP,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EAAE,yBAAyB,EAAE,MAAM,mCAAmC,CAAC;AAC9E,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAU/C,IAAM,UAAU,GAAhB,MAAM,UAAW,SAAQ,UAAU;IAGxC,EAAE,GAAgB,UAAU,EAAE,CAAC;IAI/B,IAAI,CAAU;IAId,KAAK,GAAwB,IAAI,CAAC;IAIlC,MAAM,GAAwB,IAAI,CAAC;IAKnC,GAAG,CAAU;IAIb,OAAO,GAAiB,IAAI,CAAC;IAI7B,WAAW,GAAkB,EAAE,CAAC;IAIhC,SAAS,GAAc,IAAI,IAAI,EAAE,CAAC;IAQlC,SAAS,GAAc,IAAI,IAAI,EAAE,CAAC;IAIlC,UAAU,GAAsB,IAAI,CAAC;IAIrC,SAAS,GAAsB,IAAI,CAAC;IAUpC,KAAK,CAAiC;CACvC,CAAA;AAxDC;IADC,UAAU,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;;sCACE;AAI/B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;;wCACb;AAId;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;yCACT;AAIlC;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;0CACR;AAKnC;IAFC,QAAQ,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;IAC1B,MAAM,EAAE;;uCACI;AAIb;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;;2CAChB;AAI7B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,KAAK,EAAE,CAAC;;+CACI;AAIhC;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,QAAQ,EAAE,UAAU,EAAE,OAAO,EAAE,CAAC;;6CAClB;AAQlC;IALC,QAAQ,CAAC;QACR,IAAI,EAAE,CAAC,CAAC,QAAQ;QAChB,UAAU,EAAE,OAAO;QACnB,QAAQ,EAAE,GAAG,EAAE,CAAC,IAAI,IAAI,EAAE;KAC3B,CAAC;;6CACgC;AAIlC;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;8CACV;AAIrC;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;6CACX;AAUpC;IAPC,SAAS,CAAC;QACT,MAAM,EAAE,GAAG,EAAE,CACX;YACE,yBAAyB,CAAC,QAAQ,EAAE,MAAM,CAAC;YAC3C,yBAAyB,CAAC,aAAa,EAAE,WAAW,CAAC;SAC/C;KACX,CAAC;;yCACoC;AA1D3B,UAAU;IADtB,MAAM,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;GACd,UAAU,CA2DtB"}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { type Constructor, type EntityClass } from "@mikro-orm/core";
|
|
2
|
-
export declare function configureAuthRelationTargets(entries: Iterable<readonly [Constructor<object>, EntityClass<object>]>): void;
|
|
3
|
-
export declare function resolveAuthRelationTarget<Entity extends object>(baseEntity: Constructor<Entity>, conventionalName: string): EntityClass<Entity> | string;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { MetadataStorage, } from "@mikro-orm/core";
|
|
2
|
-
let configuredTargets = new Map();
|
|
3
|
-
export function configureAuthRelationTargets(entries) {
|
|
4
|
-
configuredTargets = new Map(entries);
|
|
5
|
-
}
|
|
6
|
-
export function resolveAuthRelationTarget(baseEntity, conventionalName) {
|
|
7
|
-
const configuredTarget = configuredTargets.get(baseEntity);
|
|
8
|
-
if (configuredTarget)
|
|
9
|
-
return configuredTarget;
|
|
10
|
-
const candidates = new Set();
|
|
11
|
-
for (const metadata of Object.values(MetadataStorage.getMetadata())) {
|
|
12
|
-
const entity = metadata.class;
|
|
13
|
-
if (metadata.name &&
|
|
14
|
-
entity &&
|
|
15
|
-
entity !== baseEntity &&
|
|
16
|
-
entity.prototype instanceof baseEntity) {
|
|
17
|
-
candidates.add(entity);
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
const conventionalEntity = [...candidates].find((entity) => entity.name === conventionalName);
|
|
21
|
-
if (conventionalEntity)
|
|
22
|
-
return conventionalEntity;
|
|
23
|
-
const [onlyCandidate] = candidates;
|
|
24
|
-
if (candidates.size === 1 && onlyCandidate)
|
|
25
|
-
return onlyCandidate;
|
|
26
|
-
if (candidates.size === 0)
|
|
27
|
-
return conventionalName;
|
|
28
|
-
throw new Error(`Multiple concrete entities extend ${baseEntity.name}; unable to resolve the auth relation target`);
|
|
29
|
-
}
|
|
30
|
-
//# sourceMappingURL=resolve-auth-relation-target.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"resolve-auth-relation-target.js","sourceRoot":"","sources":["../../src/entities/resolve-auth-relation-target.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,eAAe,GAChB,MAAM,iBAAiB,CAAC;AAEzB,IAAI,iBAAiB,GAAG,IAAI,GAAG,EAA4C,CAAC;AAG5E,MAAM,UAAU,4BAA4B,CAC1C,OAAsE;IAEtE,iBAAiB,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC,CAAC;AACvC,CAAC;AAGD,MAAM,UAAU,yBAAyB,CACvC,UAA+B,EAC/B,gBAAwB;IAExB,MAAM,gBAAgB,GAAG,iBAAiB,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;IAC3D,IAAI,gBAAgB;QAAE,OAAO,gBAAuC,CAAC;IAErE,MAAM,UAAU,GAAG,IAAI,GAAG,EAAuB,CAAC;IAElD,KAAK,MAAM,QAAQ,IAAI,MAAM,CAAC,MAAM,CAAC,eAAe,CAAC,WAAW,EAAE,CAAC,EAAE,CAAC;QACpE,MAAM,MAAM,GAAG,QAAQ,CAAC,KAAwC,CAAC;QACjE,IACE,QAAQ,CAAC,IAAI;YACb,MAAM;YACN,MAAM,KAAK,UAAU;YACrB,MAAM,CAAC,SAAS,YAAY,UAAU,EACtC,CAAC;YACD,UAAU,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;QACzB,CAAC;IACH,CAAC;IAED,MAAM,kBAAkB,GAAG,CAAC,GAAG,UAAU,CAAC,CAAC,IAAI,CAC7C,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,KAAK,gBAAgB,CAC7C,CAAC;IACF,IAAI,kBAAkB;QAAE,OAAO,kBAAkB,CAAC;IAClD,MAAM,CAAC,aAAa,CAAC,GAAG,UAAU,CAAC;IACnC,IAAI,UAAU,CAAC,IAAI,KAAK,CAAC,IAAI,aAAa;QAAE,OAAO,aAAa,CAAC;IACjE,IAAI,UAAU,CAAC,IAAI,KAAK,CAAC;QAAE,OAAO,gBAAgB,CAAC;IAEnD,MAAM,IAAI,KAAK,CACb,qCAAqC,UAAU,CAAC,IAAI,8CAA8C,CACnG,CAAC;AACJ,CAAC"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { BaseEntity, type Opt, type Ref } from "@mikro-orm/core";
|
|
2
|
-
import { BaseUser } from "./user.entity.js";
|
|
3
|
-
import { BaseWorkspace } from "./workspace.entity.js";
|
|
4
|
-
export type AuthWorkspaceInvitationStatus = "accepted" | "canceled" | "pending" | "rejected";
|
|
5
|
-
export declare class BaseWorkspaceInvitation extends BaseEntity {
|
|
6
|
-
id: Opt<string>;
|
|
7
|
-
email: string;
|
|
8
|
-
roles: Opt<string[]>;
|
|
9
|
-
status: Opt<AuthWorkspaceInvitationStatus>;
|
|
10
|
-
expiresAt: Date;
|
|
11
|
-
createdAt: Opt<Date>;
|
|
12
|
-
inviter: Ref<BaseUser>;
|
|
13
|
-
workspace: Ref<BaseWorkspace>;
|
|
14
|
-
}
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
7
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
-
};
|
|
10
|
-
import { randomUUID } from "node:crypto";
|
|
11
|
-
import { BaseEntity, t } from "@mikro-orm/core";
|
|
12
|
-
import { Entity, ManyToOne, PrimaryKey, Property, Unique, } from "@mikro-orm/decorators/legacy";
|
|
13
|
-
import { resolveAuthRelationTarget } from "./resolve-auth-relation-target.js";
|
|
14
|
-
import { BaseUser } from "./user.entity.js";
|
|
15
|
-
import { BaseWorkspace } from "./workspace.entity.js";
|
|
16
|
-
let BaseWorkspaceInvitation = class BaseWorkspaceInvitation extends BaseEntity {
|
|
17
|
-
id = randomUUID();
|
|
18
|
-
email;
|
|
19
|
-
roles = ["member"];
|
|
20
|
-
status = "pending";
|
|
21
|
-
expiresAt;
|
|
22
|
-
createdAt = new Date();
|
|
23
|
-
inviter;
|
|
24
|
-
workspace;
|
|
25
|
-
};
|
|
26
|
-
__decorate([
|
|
27
|
-
PrimaryKey({ type: t.uuid }),
|
|
28
|
-
__metadata("design:type", Object)
|
|
29
|
-
], BaseWorkspaceInvitation.prototype, "id", void 0);
|
|
30
|
-
__decorate([
|
|
31
|
-
Property({ type: t.text }),
|
|
32
|
-
__metadata("design:type", String)
|
|
33
|
-
], BaseWorkspaceInvitation.prototype, "email", void 0);
|
|
34
|
-
__decorate([
|
|
35
|
-
Property({ type: t.array }),
|
|
36
|
-
__metadata("design:type", Object)
|
|
37
|
-
], BaseWorkspaceInvitation.prototype, "roles", void 0);
|
|
38
|
-
__decorate([
|
|
39
|
-
Property({ type: t.string, default: "pending" }),
|
|
40
|
-
__metadata("design:type", Object)
|
|
41
|
-
], BaseWorkspaceInvitation.prototype, "status", void 0);
|
|
42
|
-
__decorate([
|
|
43
|
-
Property({ type: t.datetime }),
|
|
44
|
-
__metadata("design:type", Date)
|
|
45
|
-
], BaseWorkspaceInvitation.prototype, "expiresAt", void 0);
|
|
46
|
-
__decorate([
|
|
47
|
-
Property({ type: t.datetime, defaultRaw: "now()" }),
|
|
48
|
-
__metadata("design:type", Object)
|
|
49
|
-
], BaseWorkspaceInvitation.prototype, "createdAt", void 0);
|
|
50
|
-
__decorate([
|
|
51
|
-
ManyToOne({
|
|
52
|
-
entity: () => resolveAuthRelationTarget(BaseUser, "User"),
|
|
53
|
-
updateRule: "cascade",
|
|
54
|
-
deleteRule: "cascade",
|
|
55
|
-
}),
|
|
56
|
-
__metadata("design:type", Object)
|
|
57
|
-
], BaseWorkspaceInvitation.prototype, "inviter", void 0);
|
|
58
|
-
__decorate([
|
|
59
|
-
ManyToOne({
|
|
60
|
-
entity: () => resolveAuthRelationTarget(BaseWorkspace, "Workspace"),
|
|
61
|
-
updateRule: "cascade",
|
|
62
|
-
deleteRule: "cascade",
|
|
63
|
-
}),
|
|
64
|
-
__metadata("design:type", Object)
|
|
65
|
-
], BaseWorkspaceInvitation.prototype, "workspace", void 0);
|
|
66
|
-
BaseWorkspaceInvitation = __decorate([
|
|
67
|
-
Entity({ abstract: true }),
|
|
68
|
-
Unique({
|
|
69
|
-
properties: ["email", "workspace"],
|
|
70
|
-
where: { status: "pending" },
|
|
71
|
-
})
|
|
72
|
-
], BaseWorkspaceInvitation);
|
|
73
|
-
export { BaseWorkspaceInvitation };
|
|
74
|
-
//# sourceMappingURL=workspace-invitation.entity.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"workspace-invitation.entity.js","sourceRoot":"","sources":["../../src/entities/workspace-invitation.entity.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,OAAO,EAAE,UAAU,EAAsB,CAAC,EAAE,MAAM,iBAAiB,CAAC;AACpE,OAAO,EACL,MAAM,EACN,SAAS,EACT,UAAU,EACV,QAAQ,EACR,MAAM,GACP,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EAAE,yBAAyB,EAAE,MAAM,mCAAmC,CAAC;AAC9E,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAqB/C,IAAM,uBAAuB,GAA7B,MAAM,uBAAwB,SAAQ,UAAU;IAGrD,EAAE,GAAgB,UAAU,EAAE,CAAC;IAI/B,KAAK,CAAU;IAIf,KAAK,GAAkB,CAAC,QAAQ,CAAC,CAAC;IAKlC,MAAM,GAAuC,SAAS,CAAC;IAIvD,SAAS,CAAQ;IAIjB,SAAS,GAAc,IAAI,IAAI,EAAE,CAAC;IAQlC,OAAO,CAAiB;IAQxB,SAAS,CAAsB;CAChC,CAAA;AAtCC;IADC,UAAU,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;;mDACE;AAI/B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;;sDACZ;AAIf;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,KAAK,EAAE,CAAC;;sDACM;AAKlC;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC;;uDACM;AAIvD;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC;8BACnB,IAAI;0DAAC;AAIjB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,QAAQ,EAAE,UAAU,EAAE,OAAO,EAAE,CAAC;;0DAClB;AAQlC;IALC,SAAS,CAAC;QACT,MAAM,EAAE,GAAG,EAAE,CAAC,yBAAyB,CAAC,QAAQ,EAAE,MAAM,CAAQ;QAChE,UAAU,EAAE,SAAS;QACrB,UAAU,EAAE,SAAS;KACtB,CAAC;;wDACsB;AAQxB;IALC,SAAS,CAAC;QACT,MAAM,EAAE,GAAG,EAAE,CAAC,yBAAyB,CAAC,aAAa,EAAE,WAAW,CAAQ;QAC1E,UAAU,EAAE,SAAS;QACrB,UAAU,EAAE,SAAS;KACtB,CAAC;;0DAC6B;AAxCpB,uBAAuB;IALnC,MAAM,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IAC1B,MAAM,CAAC;QACN,UAAU,EAAE,CAAC,OAAO,EAAE,WAAW,CAAC;QAClC,KAAK,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE;KAC7B,CAAC;GACW,uBAAuB,CAyCnC"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { BaseEntity, type Opt, type Ref } from "@mikro-orm/core";
|
|
2
|
-
import { BaseUser } from "./user.entity.js";
|
|
3
|
-
import { BaseWorkspace } from "./workspace.entity.js";
|
|
4
|
-
export type AuthWorkspaceMemberStatus = "ACTIVE" | "DISABLED";
|
|
5
|
-
export declare class BaseWorkspaceMember extends BaseEntity {
|
|
6
|
-
id: Opt<string>;
|
|
7
|
-
name: string;
|
|
8
|
-
email?: Opt<string> | null;
|
|
9
|
-
roles: Opt<string[]>;
|
|
10
|
-
status: Opt<AuthWorkspaceMemberStatus>;
|
|
11
|
-
permissions: Opt<string[]>;
|
|
12
|
-
createdAt: Opt<Date>;
|
|
13
|
-
updatedAt: Opt<Date>;
|
|
14
|
-
user?: Ref<BaseUser> | null;
|
|
15
|
-
workspace: Ref<BaseWorkspace>;
|
|
16
|
-
}
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
7
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
-
};
|
|
10
|
-
import { randomUUID } from "node:crypto";
|
|
11
|
-
import { BaseEntity, t } from "@mikro-orm/core";
|
|
12
|
-
import { Entity, ManyToOne, PrimaryKey, Property, Unique, } from "@mikro-orm/decorators/legacy";
|
|
13
|
-
import { resolveAuthRelationTarget } from "./resolve-auth-relation-target.js";
|
|
14
|
-
import { BaseUser } from "./user.entity.js";
|
|
15
|
-
import { BaseWorkspace } from "./workspace.entity.js";
|
|
16
|
-
let BaseWorkspaceMember = class BaseWorkspaceMember extends BaseEntity {
|
|
17
|
-
id = randomUUID();
|
|
18
|
-
name;
|
|
19
|
-
email = null;
|
|
20
|
-
roles = ["member"];
|
|
21
|
-
status = "ACTIVE";
|
|
22
|
-
permissions = [];
|
|
23
|
-
createdAt = new Date();
|
|
24
|
-
updatedAt = new Date();
|
|
25
|
-
user;
|
|
26
|
-
workspace;
|
|
27
|
-
};
|
|
28
|
-
__decorate([
|
|
29
|
-
PrimaryKey({ type: t.uuid }),
|
|
30
|
-
__metadata("design:type", Object)
|
|
31
|
-
], BaseWorkspaceMember.prototype, "id", void 0);
|
|
32
|
-
__decorate([
|
|
33
|
-
Property({ type: t.text }),
|
|
34
|
-
__metadata("design:type", String)
|
|
35
|
-
], BaseWorkspaceMember.prototype, "name", void 0);
|
|
36
|
-
__decorate([
|
|
37
|
-
Property({ type: t.text, nullable: true }),
|
|
38
|
-
__metadata("design:type", Object)
|
|
39
|
-
], BaseWorkspaceMember.prototype, "email", void 0);
|
|
40
|
-
__decorate([
|
|
41
|
-
Property({ type: t.array }),
|
|
42
|
-
__metadata("design:type", Object)
|
|
43
|
-
], BaseWorkspaceMember.prototype, "roles", void 0);
|
|
44
|
-
__decorate([
|
|
45
|
-
Property({ type: t.string, default: "ACTIVE" }),
|
|
46
|
-
__metadata("design:type", Object)
|
|
47
|
-
], BaseWorkspaceMember.prototype, "status", void 0);
|
|
48
|
-
__decorate([
|
|
49
|
-
Property({ type: t.array }),
|
|
50
|
-
__metadata("design:type", Object)
|
|
51
|
-
], BaseWorkspaceMember.prototype, "permissions", void 0);
|
|
52
|
-
__decorate([
|
|
53
|
-
Property({ type: t.datetime, defaultRaw: "now()" }),
|
|
54
|
-
__metadata("design:type", Object)
|
|
55
|
-
], BaseWorkspaceMember.prototype, "createdAt", void 0);
|
|
56
|
-
__decorate([
|
|
57
|
-
Property({
|
|
58
|
-
type: t.datetime,
|
|
59
|
-
defaultRaw: "now()",
|
|
60
|
-
onUpdate: () => new Date(),
|
|
61
|
-
}),
|
|
62
|
-
__metadata("design:type", Object)
|
|
63
|
-
], BaseWorkspaceMember.prototype, "updatedAt", void 0);
|
|
64
|
-
__decorate([
|
|
65
|
-
ManyToOne({
|
|
66
|
-
entity: () => resolveAuthRelationTarget(BaseUser, "User"),
|
|
67
|
-
nullable: true,
|
|
68
|
-
updateRule: "cascade",
|
|
69
|
-
deleteRule: "cascade",
|
|
70
|
-
}),
|
|
71
|
-
__metadata("design:type", Object)
|
|
72
|
-
], BaseWorkspaceMember.prototype, "user", void 0);
|
|
73
|
-
__decorate([
|
|
74
|
-
ManyToOne({
|
|
75
|
-
entity: () => resolveAuthRelationTarget(BaseWorkspace, "Workspace"),
|
|
76
|
-
updateRule: "cascade",
|
|
77
|
-
deleteRule: "cascade",
|
|
78
|
-
}),
|
|
79
|
-
__metadata("design:type", Object)
|
|
80
|
-
], BaseWorkspaceMember.prototype, "workspace", void 0);
|
|
81
|
-
BaseWorkspaceMember = __decorate([
|
|
82
|
-
Entity({ abstract: true }),
|
|
83
|
-
Unique({ properties: ["user", "workspace"] })
|
|
84
|
-
], BaseWorkspaceMember);
|
|
85
|
-
export { BaseWorkspaceMember };
|
|
86
|
-
//# sourceMappingURL=workspace-member.entity.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"workspace-member.entity.js","sourceRoot":"","sources":["../../src/entities/workspace-member.entity.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,OAAO,EAAE,UAAU,EAAsB,CAAC,EAAE,MAAM,iBAAiB,CAAC;AACpE,OAAO,EACL,MAAM,EACN,SAAS,EACT,UAAU,EACV,QAAQ,EACR,MAAM,GACP,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EAAE,yBAAyB,EAAE,MAAM,mCAAmC,CAAC;AAC9E,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAc/C,IAAM,mBAAmB,GAAzB,MAAM,mBAAoB,SAAQ,UAAU;IAGjD,EAAE,GAAgB,UAAU,EAAE,CAAC;IAI/B,IAAI,CAAU;IAId,KAAK,GAAwB,IAAI,CAAC;IAIlC,KAAK,GAAkB,CAAC,QAAQ,CAAC,CAAC;IAKlC,MAAM,GAAmC,QAAQ,CAAC;IAIlD,WAAW,GAAkB,EAAE,CAAC;IAIhC,SAAS,GAAc,IAAI,IAAI,EAAE,CAAC;IAQlC,SAAS,GAAc,IAAI,IAAI,EAAE,CAAC;IASlC,IAAI,CAAwB;IAQ5B,SAAS,CAAsB;CAChC,CAAA;AAnDC;IADC,UAAU,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;;+CACE;AAI/B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;;iDACb;AAId;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;kDACT;AAIlC;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,KAAK,EAAE,CAAC;;kDACM;AAKlC;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC;;mDACE;AAIlD;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,KAAK,EAAE,CAAC;;wDACI;AAIhC;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,QAAQ,EAAE,UAAU,EAAE,OAAO,EAAE,CAAC;;sDAClB;AAQlC;IALC,QAAQ,CAAC;QACR,IAAI,EAAE,CAAC,CAAC,QAAQ;QAChB,UAAU,EAAE,OAAO;QACnB,QAAQ,EAAE,GAAG,EAAE,CAAC,IAAI,IAAI,EAAE;KAC3B,CAAC;;sDACgC;AASlC;IANC,SAAS,CAAC;QACT,MAAM,EAAE,GAAG,EAAE,CAAC,yBAAyB,CAAC,QAAQ,EAAE,MAAM,CAAQ;QAChE,QAAQ,EAAE,IAAI;QACd,UAAU,EAAE,SAAS;QACrB,UAAU,EAAE,SAAS;KACtB,CAAC;;iDAC0B;AAQ5B;IALC,SAAS,CAAC;QACT,MAAM,EAAE,GAAG,EAAE,CAAC,yBAAyB,CAAC,aAAa,EAAE,WAAW,CAAQ;QAC1E,UAAU,EAAE,SAAS;QACrB,UAAU,EAAE,SAAS;KACtB,CAAC;;sDAC6B;AArDpB,mBAAmB;IAF/B,MAAM,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IAC1B,MAAM,CAAC,EAAE,UAAU,EAAE,CAAC,MAAM,EAAE,WAAW,CAAC,EAAE,CAAC;GACjC,mBAAmB,CAsD/B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"auth-role.interface.js","sourceRoot":"","sources":["../../src/interfaces/auth-role.interface.ts"],"names":[],"mappings":""}
|
|
@@ -1,160 +0,0 @@
|
|
|
1
|
-
export interface AuthUser {
|
|
2
|
-
id: string;
|
|
3
|
-
name: string;
|
|
4
|
-
email: string;
|
|
5
|
-
emailVerified: boolean;
|
|
6
|
-
image?: string | null;
|
|
7
|
-
createdAt: Date;
|
|
8
|
-
updatedAt: Date;
|
|
9
|
-
[field: string]: unknown;
|
|
10
|
-
}
|
|
11
|
-
export interface SignUpOptions {
|
|
12
|
-
name: string;
|
|
13
|
-
email: string;
|
|
14
|
-
password: string;
|
|
15
|
-
image?: string;
|
|
16
|
-
callbackURL?: string;
|
|
17
|
-
rememberMe?: boolean;
|
|
18
|
-
}
|
|
19
|
-
export interface SignUpResult<User extends AuthUser = AuthUser> {
|
|
20
|
-
token: string | null;
|
|
21
|
-
user: User;
|
|
22
|
-
}
|
|
23
|
-
export interface SignInOptions {
|
|
24
|
-
email: string;
|
|
25
|
-
password: string;
|
|
26
|
-
callbackURL?: string;
|
|
27
|
-
rememberMe?: boolean;
|
|
28
|
-
}
|
|
29
|
-
export interface SignInResult<User extends AuthUser = AuthUser> {
|
|
30
|
-
redirect: boolean;
|
|
31
|
-
token: string;
|
|
32
|
-
url: string | null;
|
|
33
|
-
user: User;
|
|
34
|
-
}
|
|
35
|
-
export interface AuthSocialProvider {
|
|
36
|
-
id: string;
|
|
37
|
-
name: string;
|
|
38
|
-
}
|
|
39
|
-
export interface SignInSocialOptions {
|
|
40
|
-
provider: string;
|
|
41
|
-
callbackURL?: string;
|
|
42
|
-
newUserCallbackURL?: string;
|
|
43
|
-
errorCallbackURL?: string;
|
|
44
|
-
disableRedirect?: boolean;
|
|
45
|
-
scopes?: string[];
|
|
46
|
-
requestSignUp?: boolean;
|
|
47
|
-
loginHint?: string;
|
|
48
|
-
additionalParams?: Record<string, string>;
|
|
49
|
-
additionalData?: Record<string, unknown>;
|
|
50
|
-
}
|
|
51
|
-
export interface SignInSocialResult<User extends AuthUser = AuthUser> {
|
|
52
|
-
redirect: boolean;
|
|
53
|
-
url: string | null;
|
|
54
|
-
token: string | null;
|
|
55
|
-
user: User | null;
|
|
56
|
-
}
|
|
57
|
-
export interface SendVerificationEmailOptions {
|
|
58
|
-
email: string;
|
|
59
|
-
callbackURL?: string;
|
|
60
|
-
}
|
|
61
|
-
export interface RequestPasswordResetOptions {
|
|
62
|
-
email: string;
|
|
63
|
-
redirectTo?: string;
|
|
64
|
-
}
|
|
65
|
-
export interface RequestPasswordResetResult {
|
|
66
|
-
status: boolean;
|
|
67
|
-
message: string;
|
|
68
|
-
}
|
|
69
|
-
export interface ResetPasswordOptions {
|
|
70
|
-
newPassword: string;
|
|
71
|
-
token: string;
|
|
72
|
-
}
|
|
73
|
-
export interface UpdateAuthUserOptions {
|
|
74
|
-
name?: string;
|
|
75
|
-
image?: string | null;
|
|
76
|
-
}
|
|
77
|
-
export interface ChangeAuthEmailOptions {
|
|
78
|
-
newEmail: string;
|
|
79
|
-
callbackURL?: string;
|
|
80
|
-
}
|
|
81
|
-
export interface ChangeAuthPasswordOptions {
|
|
82
|
-
currentPassword: string;
|
|
83
|
-
newPassword: string;
|
|
84
|
-
revokeOtherSessions?: boolean;
|
|
85
|
-
}
|
|
86
|
-
export interface ChangeAuthPasswordResult {
|
|
87
|
-
token: string | null;
|
|
88
|
-
}
|
|
89
|
-
export interface DeleteAuthUserOptions {
|
|
90
|
-
callbackURL?: string;
|
|
91
|
-
password?: string;
|
|
92
|
-
token?: string;
|
|
93
|
-
}
|
|
94
|
-
export interface DeleteAuthUserResult {
|
|
95
|
-
message: string;
|
|
96
|
-
success: boolean;
|
|
97
|
-
}
|
|
98
|
-
export interface AuthAccount {
|
|
99
|
-
id: string;
|
|
100
|
-
accountId: string;
|
|
101
|
-
issuer: string;
|
|
102
|
-
providerId: string;
|
|
103
|
-
userId: string;
|
|
104
|
-
scopes: string[];
|
|
105
|
-
createdAt: Date;
|
|
106
|
-
updatedAt: Date;
|
|
107
|
-
}
|
|
108
|
-
export type AuthAccountSelector = {
|
|
109
|
-
accountId: string;
|
|
110
|
-
userId?: string;
|
|
111
|
-
} | {
|
|
112
|
-
useAccountCookie: true;
|
|
113
|
-
userId?: string;
|
|
114
|
-
};
|
|
115
|
-
export interface AuthAccessToken {
|
|
116
|
-
accessToken: string;
|
|
117
|
-
accessTokenExpiresAt: Date | null;
|
|
118
|
-
scopes: string[];
|
|
119
|
-
idToken: string | null;
|
|
120
|
-
}
|
|
121
|
-
export interface AuthRefreshedToken {
|
|
122
|
-
accessToken: string | null;
|
|
123
|
-
refreshToken: string;
|
|
124
|
-
accessTokenExpiresAt: Date | null;
|
|
125
|
-
refreshTokenExpiresAt: Date | null;
|
|
126
|
-
scope: string | null;
|
|
127
|
-
idToken: string | null;
|
|
128
|
-
providerId: string;
|
|
129
|
-
accountId: string;
|
|
130
|
-
}
|
|
131
|
-
export interface AuthProviderUserInfo {
|
|
132
|
-
name?: string;
|
|
133
|
-
email?: string | null;
|
|
134
|
-
emailVerified: boolean;
|
|
135
|
-
image?: string;
|
|
136
|
-
[field: string]: unknown;
|
|
137
|
-
}
|
|
138
|
-
export interface AuthAccountInfo<UserInfo extends AuthProviderUserInfo = AuthProviderUserInfo, Data extends object = Record<string, unknown>> {
|
|
139
|
-
account: Pick<AuthAccount, "id" | "providerId" | "issuer" | "accountId">;
|
|
140
|
-
user: UserInfo;
|
|
141
|
-
data: Data;
|
|
142
|
-
}
|
|
143
|
-
export interface UnlinkAuthAccountOptions {
|
|
144
|
-
accountId: string;
|
|
145
|
-
}
|
|
146
|
-
export interface LinkAuthSocialAccountOptions {
|
|
147
|
-
provider: string;
|
|
148
|
-
callbackURL?: string;
|
|
149
|
-
errorCallbackURL?: string;
|
|
150
|
-
disableRedirect?: boolean;
|
|
151
|
-
requestSignUp?: boolean;
|
|
152
|
-
scopes?: string[];
|
|
153
|
-
loginHint?: string;
|
|
154
|
-
additionalParams?: Record<string, string>;
|
|
155
|
-
additionalData?: Record<string, unknown>;
|
|
156
|
-
}
|
|
157
|
-
export interface LinkAuthSocialAccountResult {
|
|
158
|
-
url: string;
|
|
159
|
-
redirect: boolean;
|
|
160
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"auth-service.interface.js","sourceRoot":"","sources":["../../src/interfaces/auth-service.interface.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"session-service.interface.js","sourceRoot":"","sources":["../../src/interfaces/session-service.interface.ts"],"names":[],"mappings":""}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import type { BaseUser } from "../entities/index.js";
|
|
2
|
-
export interface CreateUserOptions {
|
|
3
|
-
email: string;
|
|
4
|
-
name: string;
|
|
5
|
-
password: string;
|
|
6
|
-
roles?: string[];
|
|
7
|
-
permissions?: string[];
|
|
8
|
-
data?: Record<string, unknown>;
|
|
9
|
-
}
|
|
10
|
-
export interface UpdateUserOptions {
|
|
11
|
-
email?: string;
|
|
12
|
-
emailVerified?: boolean;
|
|
13
|
-
image?: string | null;
|
|
14
|
-
name?: string;
|
|
15
|
-
}
|
|
16
|
-
export interface ListUsersOptions {
|
|
17
|
-
searchField?: "email" | "name";
|
|
18
|
-
searchOperator?: "contains" | "ends_with" | "starts_with";
|
|
19
|
-
searchValue?: string;
|
|
20
|
-
limit?: number;
|
|
21
|
-
offset?: number;
|
|
22
|
-
sortBy?: string;
|
|
23
|
-
sortDirection?: "asc" | "desc";
|
|
24
|
-
filterField?: string;
|
|
25
|
-
filterOperator?: "contains" | "eq" | "gt" | "gte" | "lt" | "lte" | "ne";
|
|
26
|
-
filterValue?: boolean | number | string;
|
|
27
|
-
}
|
|
28
|
-
export interface ListUsersResult<User extends BaseUser = BaseUser> {
|
|
29
|
-
users: User[];
|
|
30
|
-
total: number;
|
|
31
|
-
limit: number | null;
|
|
32
|
-
offset: number | null;
|
|
33
|
-
}
|
|
34
|
-
export interface BanUserOptions {
|
|
35
|
-
banReason?: string;
|
|
36
|
-
banExpiresIn?: number;
|
|
37
|
-
}
|
|
38
|
-
export interface ImpersonationOptions {
|
|
39
|
-
ipAddress?: string;
|
|
40
|
-
userAgent?: string;
|
|
41
|
-
}
|
|
42
|
-
export interface UserHasPermissionOptions {
|
|
43
|
-
permissions: Record<string, string[]>;
|
|
44
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"user-service.interface.js","sourceRoot":"","sources":["../../src/interfaces/user-service.interface.ts"],"names":[],"mappings":""}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import type { AuthWorkspaceMemberStatus, BaseWorkspace, BaseWorkspaceInvitation, BaseWorkspaceMember } from "../entities/index.js";
|
|
2
|
-
export interface CreateWorkspaceOptions {
|
|
3
|
-
name: string;
|
|
4
|
-
}
|
|
5
|
-
export interface UpdateWorkspaceOptions {
|
|
6
|
-
name?: string;
|
|
7
|
-
}
|
|
8
|
-
export interface AddWorkspaceMemberOptions {
|
|
9
|
-
roles?: string[];
|
|
10
|
-
permissions?: string[];
|
|
11
|
-
}
|
|
12
|
-
export interface CreateWorkspaceServiceAccountOptions extends AddWorkspaceMemberOptions {
|
|
13
|
-
name: string;
|
|
14
|
-
data?: Record<string, unknown>;
|
|
15
|
-
}
|
|
16
|
-
export interface UpdateWorkspaceMemberOptions {
|
|
17
|
-
name?: string;
|
|
18
|
-
email?: string | null;
|
|
19
|
-
status?: Extract<AuthWorkspaceMemberStatus, "ACTIVE" | "DISABLED">;
|
|
20
|
-
}
|
|
21
|
-
export interface CreateWorkspaceInvitationOptions {
|
|
22
|
-
email: string;
|
|
23
|
-
roles?: string[];
|
|
24
|
-
expiresIn?: number;
|
|
25
|
-
}
|
|
26
|
-
export interface AcceptWorkspaceInvitationResult<WorkspaceInvitation extends BaseWorkspaceInvitation = BaseWorkspaceInvitation, WorkspaceMember extends BaseWorkspaceMember = BaseWorkspaceMember> {
|
|
27
|
-
invitation: WorkspaceInvitation;
|
|
28
|
-
member: WorkspaceMember;
|
|
29
|
-
}
|
|
30
|
-
export interface FullWorkspace<Workspace extends BaseWorkspace = BaseWorkspace, WorkspaceMember extends BaseWorkspaceMember = BaseWorkspaceMember, WorkspaceInvitation extends BaseWorkspaceInvitation = BaseWorkspaceInvitation> {
|
|
31
|
-
workspace: Workspace;
|
|
32
|
-
members: WorkspaceMember[];
|
|
33
|
-
invitations: WorkspaceInvitation[];
|
|
34
|
-
}
|
|
35
|
-
export interface WorkspaceHasPermissionOptions {
|
|
36
|
-
permissions: Record<string, string[]>;
|
|
37
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"workspace-service.interface.js","sourceRoot":"","sources":["../../src/interfaces/workspace-service.interface.ts"],"names":[],"mappings":""}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { EntityManager } from "@mikro-orm/core";
|
|
2
|
-
import type { AuthModuleOptions } from "./auth-module-options.interface.js";
|
|
3
|
-
import type { BaseSession, BaseUser } from "./entities/index.js";
|
|
4
|
-
import type { AuthenticatedSession } from "./interfaces/session-service.interface.js";
|
|
5
|
-
export declare class SessionService {
|
|
6
|
-
private readonly em;
|
|
7
|
-
private readonly options;
|
|
8
|
-
constructor(auth: unknown, em: EntityManager, options: AuthModuleOptions);
|
|
9
|
-
private readonly auth;
|
|
10
|
-
getSession<User extends BaseUser = BaseUser, Session extends BaseSession = BaseSession>(): Promise<AuthenticatedSession<User, Session> | null>;
|
|
11
|
-
private resolveSession;
|
|
12
|
-
listSessions<Session extends BaseSession = BaseSession>(): Promise<Session[]>;
|
|
13
|
-
revokeSession(id: string): Promise<boolean>;
|
|
14
|
-
revokeOtherSessions(): Promise<boolean>;
|
|
15
|
-
revokeSessions(): Promise<boolean>;
|
|
16
|
-
setSession(sessionToken: string): Promise<void>;
|
|
17
|
-
private runUnrestricted;
|
|
18
|
-
}
|