@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,211 @@
|
|
|
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
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
11
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
12
|
+
};
|
|
13
|
+
import { Args, ID, Mutation, Parent, Query, ResolveField, Resolver, } from "@nest-boot/graphql";
|
|
14
|
+
import { InvitationConnection, InvitationConnectionArgs, } from "../connections/invitation.connection-definition.js";
|
|
15
|
+
import { MemberConnection, MemberConnectionArgs, } from "../connections/member.connection-definition.js";
|
|
16
|
+
import { WorkspaceApiKeyConnection, WorkspaceApiKeyConnectionArgs, } from "../connections/workspace-api-key.connection-definition.js";
|
|
17
|
+
import { CurrentMember } from "../decorators/current-member.decorator.js";
|
|
18
|
+
import { CurrentUser } from "../decorators/current-user.decorator.js";
|
|
19
|
+
import { Member } from "../entities/member.entity.js";
|
|
20
|
+
import { User } from "../entities/user.entity.js";
|
|
21
|
+
import { Workspace } from "../entities/workspace.entity.js";
|
|
22
|
+
import { WorkspaceApiKey } from "../entities/workspace-api-key.entity.js";
|
|
23
|
+
import { CreateWorkspaceInput } from "../inputs/create-workspace.input.js";
|
|
24
|
+
import { UpdateWorkspaceInput } from "../inputs/update-workspace.input.js";
|
|
25
|
+
import { CreateWorkspacePayload } from "../objects/create-workspace-payload.object.js";
|
|
26
|
+
import { DeleteWorkspacePayload } from "../objects/delete-workspace-payload.object.js";
|
|
27
|
+
import { LeaveWorkspacePayload } from "../objects/leave-workspace-payload.object.js";
|
|
28
|
+
import { UpdateWorkspacePayload } from "../objects/update-workspace-payload.object.js";
|
|
29
|
+
import { InvitationService } from "../services/invitation.service.js";
|
|
30
|
+
import { MemberService } from "../services/member.service.js";
|
|
31
|
+
import { WorkspaceService } from "../services/workspace.service.js";
|
|
32
|
+
import { WorkspaceApiKeyService } from "../services/workspace-api-key.service.js";
|
|
33
|
+
/**
|
|
34
|
+
* GraphQL operations for querying, creating, updating, and deleting workspaces.
|
|
35
|
+
*/
|
|
36
|
+
let WorkspaceResolver = class WorkspaceResolver {
|
|
37
|
+
workspaceService;
|
|
38
|
+
apiKeyService;
|
|
39
|
+
memberService;
|
|
40
|
+
invitationService;
|
|
41
|
+
/**
|
|
42
|
+
* Creates the workspace resolver.
|
|
43
|
+
*
|
|
44
|
+
* @param workspaceService - Workspace domain service.
|
|
45
|
+
* @param apiKeyService - API key domain service.
|
|
46
|
+
* @param memberService - Workspace member domain service.
|
|
47
|
+
* @param invitationService - Workspace invitation domain service.
|
|
48
|
+
*/
|
|
49
|
+
constructor(workspaceService, apiKeyService, memberService, invitationService) {
|
|
50
|
+
this.workspaceService = workspaceService;
|
|
51
|
+
this.apiKeyService = apiKeyService;
|
|
52
|
+
this.memberService = memberService;
|
|
53
|
+
this.invitationService = invitationService;
|
|
54
|
+
}
|
|
55
|
+
/** Paginates members of the parent workspace. */
|
|
56
|
+
async members(workspace, args) {
|
|
57
|
+
return await this.memberService.getMemberConnectionByWorkspace(workspace, args);
|
|
58
|
+
}
|
|
59
|
+
/** Returns an accessible API key owned by the parent workspace. */
|
|
60
|
+
async apiKey(workspace, id) {
|
|
61
|
+
return await this.apiKeyService.getWorkspaceApiKey(id, workspace);
|
|
62
|
+
}
|
|
63
|
+
/** Paginates API keys owned by the parent workspace. */
|
|
64
|
+
async apiKeys(workspace, args) {
|
|
65
|
+
return await this.apiKeyService.getWorkspaceApiKeyConnection(workspace, args);
|
|
66
|
+
}
|
|
67
|
+
/** Paginates workspace invitations with authorization and querying handled by the service. */
|
|
68
|
+
async invitations(workspace, args) {
|
|
69
|
+
return await this.invitationService.getInvitationConnectionByWorkspace(workspace, args);
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Returns the workspace selected for the current request.
|
|
73
|
+
*
|
|
74
|
+
* @returns Current workspace, or null when none is selected.
|
|
75
|
+
*/
|
|
76
|
+
currentWorkspace() {
|
|
77
|
+
return this.workspaceService.getCurrentWorkspace();
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Returns a workspace by ID.
|
|
81
|
+
*
|
|
82
|
+
* @param id - Workspace identifier.
|
|
83
|
+
* @returns Matching workspace, or null when not found.
|
|
84
|
+
*/
|
|
85
|
+
async workspace(id, user) {
|
|
86
|
+
return await this.workspaceService.getUserWorkspace(id, user);
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Creates a workspace for the current user.
|
|
90
|
+
*
|
|
91
|
+
* @param user - Currently authenticated user.
|
|
92
|
+
* @param input - Workspace creation input.
|
|
93
|
+
* @returns Created workspace identifier; subsequent requests must explicitly select it.
|
|
94
|
+
*/
|
|
95
|
+
async createWorkspace(user, input) {
|
|
96
|
+
const workspace = await this.workspaceService.createWorkspace(user, input);
|
|
97
|
+
return { id: workspace.id };
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Updates the current workspace.
|
|
101
|
+
*
|
|
102
|
+
* @param id - Current workspace identifier.
|
|
103
|
+
* @param input - Workspace update input.
|
|
104
|
+
* @returns Updated workspace identifier.
|
|
105
|
+
*/
|
|
106
|
+
async updateWorkspace(id, input) {
|
|
107
|
+
const workspace = await this.workspaceService.updateWorkspace(id, input);
|
|
108
|
+
return { id: workspace.id };
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Soft-deletes the current workspace.
|
|
112
|
+
*
|
|
113
|
+
* @param id - Current workspace identifier.
|
|
114
|
+
* @returns Identifier of the permanently deleted workspace.
|
|
115
|
+
*/
|
|
116
|
+
async deleteWorkspace(id) {
|
|
117
|
+
const workspace = await this.workspaceService.deleteWorkspace(id);
|
|
118
|
+
return { id: workspace.id };
|
|
119
|
+
}
|
|
120
|
+
/** Leaves the workspace and returns the removed member's ID. */
|
|
121
|
+
async leaveWorkspace(member) {
|
|
122
|
+
const removed = await this.memberService.leaveWorkspace(member);
|
|
123
|
+
return { memberId: removed.id };
|
|
124
|
+
}
|
|
125
|
+
};
|
|
126
|
+
__decorate([
|
|
127
|
+
ResolveField(() => MemberConnection),
|
|
128
|
+
__param(0, Parent()),
|
|
129
|
+
__param(1, Args({ type: () => MemberConnectionArgs })),
|
|
130
|
+
__metadata("design:type", Function),
|
|
131
|
+
__metadata("design:paramtypes", [Workspace, Object]),
|
|
132
|
+
__metadata("design:returntype", Promise)
|
|
133
|
+
], WorkspaceResolver.prototype, "members", null);
|
|
134
|
+
__decorate([
|
|
135
|
+
ResolveField(() => WorkspaceApiKey, { nullable: true }),
|
|
136
|
+
__param(0, Parent()),
|
|
137
|
+
__param(1, Args("id", { type: () => ID })),
|
|
138
|
+
__metadata("design:type", Function),
|
|
139
|
+
__metadata("design:paramtypes", [Workspace, String]),
|
|
140
|
+
__metadata("design:returntype", Promise)
|
|
141
|
+
], WorkspaceResolver.prototype, "apiKey", null);
|
|
142
|
+
__decorate([
|
|
143
|
+
ResolveField(() => WorkspaceApiKeyConnection),
|
|
144
|
+
__param(0, Parent()),
|
|
145
|
+
__param(1, Args({ type: () => WorkspaceApiKeyConnectionArgs })),
|
|
146
|
+
__metadata("design:type", Function),
|
|
147
|
+
__metadata("design:paramtypes", [Workspace, Object]),
|
|
148
|
+
__metadata("design:returntype", Promise)
|
|
149
|
+
], WorkspaceResolver.prototype, "apiKeys", null);
|
|
150
|
+
__decorate([
|
|
151
|
+
ResolveField(() => InvitationConnection),
|
|
152
|
+
__param(0, Parent()),
|
|
153
|
+
__param(1, Args({ type: () => InvitationConnectionArgs })),
|
|
154
|
+
__metadata("design:type", Function),
|
|
155
|
+
__metadata("design:paramtypes", [Workspace, Object]),
|
|
156
|
+
__metadata("design:returntype", Promise)
|
|
157
|
+
], WorkspaceResolver.prototype, "invitations", null);
|
|
158
|
+
__decorate([
|
|
159
|
+
Query(() => Workspace, { nullable: true }),
|
|
160
|
+
__metadata("design:type", Function),
|
|
161
|
+
__metadata("design:paramtypes", []),
|
|
162
|
+
__metadata("design:returntype", Object)
|
|
163
|
+
], WorkspaceResolver.prototype, "currentWorkspace", null);
|
|
164
|
+
__decorate([
|
|
165
|
+
Query(() => Workspace, { nullable: true }),
|
|
166
|
+
__param(0, Args({ name: "id", type: () => ID })),
|
|
167
|
+
__param(1, CurrentUser()),
|
|
168
|
+
__metadata("design:type", Function),
|
|
169
|
+
__metadata("design:paramtypes", [String, User]),
|
|
170
|
+
__metadata("design:returntype", Promise)
|
|
171
|
+
], WorkspaceResolver.prototype, "workspace", null);
|
|
172
|
+
__decorate([
|
|
173
|
+
Mutation(() => CreateWorkspacePayload),
|
|
174
|
+
__param(0, CurrentUser()),
|
|
175
|
+
__param(1, Args("input")),
|
|
176
|
+
__metadata("design:type", Function),
|
|
177
|
+
__metadata("design:paramtypes", [User,
|
|
178
|
+
CreateWorkspaceInput]),
|
|
179
|
+
__metadata("design:returntype", Promise)
|
|
180
|
+
], WorkspaceResolver.prototype, "createWorkspace", null);
|
|
181
|
+
__decorate([
|
|
182
|
+
Mutation(() => UpdateWorkspacePayload),
|
|
183
|
+
__param(0, Args("id", { type: () => ID })),
|
|
184
|
+
__param(1, Args("input")),
|
|
185
|
+
__metadata("design:type", Function),
|
|
186
|
+
__metadata("design:paramtypes", [String, UpdateWorkspaceInput]),
|
|
187
|
+
__metadata("design:returntype", Promise)
|
|
188
|
+
], WorkspaceResolver.prototype, "updateWorkspace", null);
|
|
189
|
+
__decorate([
|
|
190
|
+
Mutation(() => DeleteWorkspacePayload),
|
|
191
|
+
__param(0, Args("id", { type: () => ID })),
|
|
192
|
+
__metadata("design:type", Function),
|
|
193
|
+
__metadata("design:paramtypes", [String]),
|
|
194
|
+
__metadata("design:returntype", Promise)
|
|
195
|
+
], WorkspaceResolver.prototype, "deleteWorkspace", null);
|
|
196
|
+
__decorate([
|
|
197
|
+
Mutation(() => LeaveWorkspacePayload),
|
|
198
|
+
__param(0, CurrentMember()),
|
|
199
|
+
__metadata("design:type", Function),
|
|
200
|
+
__metadata("design:paramtypes", [Member]),
|
|
201
|
+
__metadata("design:returntype", Promise)
|
|
202
|
+
], WorkspaceResolver.prototype, "leaveWorkspace", null);
|
|
203
|
+
WorkspaceResolver = __decorate([
|
|
204
|
+
Resolver(() => Workspace),
|
|
205
|
+
__metadata("design:paramtypes", [WorkspaceService,
|
|
206
|
+
WorkspaceApiKeyService,
|
|
207
|
+
MemberService,
|
|
208
|
+
InvitationService])
|
|
209
|
+
], WorkspaceResolver);
|
|
210
|
+
export { WorkspaceResolver };
|
|
211
|
+
//# sourceMappingURL=workspace.resolver.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workspace.resolver.js","sourceRoot":"","sources":["../../src/resolvers/workspace.resolver.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EACL,IAAI,EACJ,EAAE,EACF,QAAQ,EACR,MAAM,EACN,KAAK,EACL,YAAY,EACZ,QAAQ,GACT,MAAM,oBAAoB,CAAC;AAG5B,OAAO,EACL,oBAAoB,EACpB,wBAAwB,GACzB,MAAM,oDAAoD,CAAC;AAC5D,OAAO,EACL,gBAAgB,EAChB,oBAAoB,GACrB,MAAM,gDAAgD,CAAC;AACxD,OAAO,EACL,yBAAyB,EACzB,6BAA6B,GAC9B,MAAM,2DAA2D,CAAC;AACnE,OAAO,EAAE,aAAa,EAAE,MAAM,2CAA2C,CAAC;AAC1E,OAAO,EAAE,WAAW,EAAE,MAAM,yCAAyC,CAAC;AAEtE,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AACtD,OAAO,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,yCAAyC,CAAC;AAC1E,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAA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AExC,WAAA,IAAI,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC,CAAA;IACpC,WAAA,WAAW,EAAE,CAAA;;6CAAO,IAAI;;kDAG1B;AAUK;IADL,QAAQ,CAAC,GAAG,EAAE,CAAC,sBAAsB,CAAC;IAEpC,WAAA,WAAW,EAAE,CAAA;IACb,WAAA,IAAI,CAAC,OAAO,CAAC,CAAA;;qCADO,IAAI;QACH,oBAAoB;;wDAI3C;AAUK;IADL,QAAQ,CAAC,GAAG,EAAE,CAAC,sBAAsB,CAAC;IAEpC,WAAA,IAAI,CAAC,IAAI,EAAE,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC,CAAA;IAC9B,WAAA,IAAI,CAAC,OAAO,CAAC,CAAA;;6CAAQ,oBAAoB;;wDAI3C;AASK;IADL,QAAQ,CAAC,GAAG,EAAE,CAAC,sBAAsB,CAAC;IAEpC,WAAA,IAAI,CAAC,IAAI,EAAE,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC,CAAA;;;;wDAIhC;AAIK;IADL,QAAQ,CAAC,GAAG,EAAE,CAAC,qBAAqB,CAAC;IAEnC,WAAA,aAAa,EAAE,CAAA;;qCAAS,MAAM;;uDAIhC;AA7IU,iBAAiB;IAD7B,QAAQ,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC;qCAWK,gBAAgB;QACnB,sBAAsB;QACtB,aAAa;QACT,iBAAiB;GAbpC,iBAAiB,CA8I7B"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import type { Subject } from "@casl/ability";
|
|
2
|
+
import { UserAbility } from "../abilities/user.ability.js";
|
|
3
|
+
import { WorkspaceAbility } from "../abilities/workspace.ability.js";
|
|
4
|
+
import type { AuthModuleOptions } from "../auth-module-options.interface.js";
|
|
5
|
+
import { Member } from "../entities/member.entity.js";
|
|
6
|
+
import { Session } from "../entities/session.entity.js";
|
|
7
|
+
import { User } from "../entities/user.entity.js";
|
|
8
|
+
import { Workspace } from "../entities/workspace.entity.js";
|
|
9
|
+
import type { ApiKey } from "../types/api-key.type.js";
|
|
10
|
+
/** Enforces user and workspace permissions prepared for the current request. */
|
|
11
|
+
export declare class AccessControlService {
|
|
12
|
+
private readonly options;
|
|
13
|
+
/** Creates the authorization service. */
|
|
14
|
+
constructor(options: AuthModuleOptions);
|
|
15
|
+
/** Returns whether the current principal may perform a user-scoped action. */
|
|
16
|
+
userCan(action: string, subject: Subject): boolean;
|
|
17
|
+
/** Returns the prepared ability only while its user identity is available. */
|
|
18
|
+
getUserAbility(): UserAbility | null;
|
|
19
|
+
/** Throws unless the current principal may perform a user-scoped action. */
|
|
20
|
+
assertUserCan(action: string, subject: Subject): void;
|
|
21
|
+
/** Returns whether the current principal may perform a workspace action. */
|
|
22
|
+
workspaceCan(action: string, subject: Subject): boolean;
|
|
23
|
+
/** Returns the prepared ability only while its workspace identity is available. */
|
|
24
|
+
getWorkspaceAbility(): WorkspaceAbility | null;
|
|
25
|
+
/** Throws unless the current principal may perform a workspace action. */
|
|
26
|
+
assertWorkspaceCan(action: string, subject: Subject): void;
|
|
27
|
+
/** Throws unless the supplied user is the authenticated user. */
|
|
28
|
+
assertCurrentUser(user: User): void;
|
|
29
|
+
/** Throws unless the supplied session is the authenticated session. */
|
|
30
|
+
assertCurrentSession(session: Session): void;
|
|
31
|
+
/** Throws unless the supplied workspace is selected for the current request. */
|
|
32
|
+
assertCurrentWorkspace(workspace: Workspace): void;
|
|
33
|
+
/** Throws unless the supplied member is the current workspace member. */
|
|
34
|
+
assertCurrentMember(member: Member | null | undefined): void;
|
|
35
|
+
/** Throws when a user grant exceeds the current principal's permissions. */
|
|
36
|
+
assertCanGrantUserPermissions(requestedPermissions: readonly string[]): void;
|
|
37
|
+
/** Checks the same grant ceiling used when assigning user permissions. */
|
|
38
|
+
canGrantUserPermissions(requestedPermissions: readonly string[]): boolean;
|
|
39
|
+
private getUserGrantPermissions;
|
|
40
|
+
/** Throws when a workspace grant exceeds the current principal's permissions. */
|
|
41
|
+
assertCanGrantWorkspacePermissions(requestedPermissions: readonly string[]): void;
|
|
42
|
+
/** Checks the same grant ceiling used when assigning workspace permissions. */
|
|
43
|
+
canGrantWorkspacePermissions(requestedPermissions: readonly string[]): boolean;
|
|
44
|
+
private getWorkspaceGrantPermissions;
|
|
45
|
+
/** Rejects access to or delegation of credentials broader than the authenticating API key. */
|
|
46
|
+
assertApiKeyPermissionCeiling(permissions: readonly string[]): void;
|
|
47
|
+
/** Returns the credential ceiling shared by API-key queries, options, and writes. */
|
|
48
|
+
getApiKeyPermissionCeiling(): readonly string[] | null;
|
|
49
|
+
/** Checks API-key ownership independently of the application's database policies. */
|
|
50
|
+
assertApiKeyOwner(apiKey: ApiKey): void;
|
|
51
|
+
private isWorkspaceApiKey;
|
|
52
|
+
}
|
|
@@ -0,0 +1,201 @@
|
|
|
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
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
11
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
12
|
+
};
|
|
13
|
+
import { Reference } from "@mikro-orm/core";
|
|
14
|
+
import { RequestContext } from "@nest-boot/request-context";
|
|
15
|
+
import { ForbiddenException, Inject, Injectable } from "@nestjs/common";
|
|
16
|
+
import { UserAbility } from "../abilities/user.ability.js";
|
|
17
|
+
import { WorkspaceAbility } from "../abilities/workspace.ability.js";
|
|
18
|
+
import { MODULE_OPTIONS_TOKEN } from "../auth.module-definition.js";
|
|
19
|
+
import { Member } from "../entities/member.entity.js";
|
|
20
|
+
import { Session } from "../entities/session.entity.js";
|
|
21
|
+
import { User } from "../entities/user.entity.js";
|
|
22
|
+
import { UserApiKey } from "../entities/user-api-key.entity.js";
|
|
23
|
+
import { Workspace } from "../entities/workspace.entity.js";
|
|
24
|
+
import { WorkspaceApiKey } from "../entities/workspace-api-key.entity.js";
|
|
25
|
+
import { getCurrentApiKey } from "../utils/get-current-api-key.util.js";
|
|
26
|
+
import { resolveRequestPermissions } from "../utils/resolve-request-permissions.util.js";
|
|
27
|
+
/** Enforces user and workspace permissions prepared for the current request. */
|
|
28
|
+
let AccessControlService = class AccessControlService {
|
|
29
|
+
options;
|
|
30
|
+
/** Creates the authorization service. */
|
|
31
|
+
constructor(options) {
|
|
32
|
+
this.options = options;
|
|
33
|
+
}
|
|
34
|
+
/** Returns whether the current principal may perform a user-scoped action. */
|
|
35
|
+
userCan(action, subject) {
|
|
36
|
+
return this.getUserAbility()?.can(action, subject) ?? false;
|
|
37
|
+
}
|
|
38
|
+
/** Returns the prepared ability only while its user identity is available. */
|
|
39
|
+
getUserAbility() {
|
|
40
|
+
if (!RequestContext.isActive())
|
|
41
|
+
return null;
|
|
42
|
+
const user = RequestContext.get(User);
|
|
43
|
+
const apiKey = getCurrentApiKey();
|
|
44
|
+
if (!user || (apiKey && this.isWorkspaceApiKey(apiKey)))
|
|
45
|
+
return null;
|
|
46
|
+
return RequestContext.get(UserAbility) ?? null;
|
|
47
|
+
}
|
|
48
|
+
/** Throws unless the current principal may perform a user-scoped action. */
|
|
49
|
+
assertUserCan(action, subject) {
|
|
50
|
+
if (!this.userCan(action, subject)) {
|
|
51
|
+
throw new ForbiddenException(`You are not allowed to ${action} this user-scoped resource`);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
/** Returns whether the current principal may perform a workspace action. */
|
|
55
|
+
workspaceCan(action, subject) {
|
|
56
|
+
return this.getWorkspaceAbility()?.can(action, subject) ?? false;
|
|
57
|
+
}
|
|
58
|
+
/** Returns the prepared ability only while its workspace identity is available. */
|
|
59
|
+
getWorkspaceAbility() {
|
|
60
|
+
if (!RequestContext.isActive() || !RequestContext.get(Workspace))
|
|
61
|
+
return null;
|
|
62
|
+
const apiKey = getCurrentApiKey();
|
|
63
|
+
const workspaceApiKey = apiKey && this.isWorkspaceApiKey(apiKey);
|
|
64
|
+
const member = RequestContext.get(Member);
|
|
65
|
+
if (!workspaceApiKey && !member)
|
|
66
|
+
return null;
|
|
67
|
+
return RequestContext.get(WorkspaceAbility) ?? null;
|
|
68
|
+
}
|
|
69
|
+
/** Throws unless the current principal may perform a workspace action. */
|
|
70
|
+
assertWorkspaceCan(action, subject) {
|
|
71
|
+
if (!this.workspaceCan(action, subject)) {
|
|
72
|
+
throw new ForbiddenException(`You are not allowed to ${action} this workspace resource`);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
/** Throws unless the supplied user is the authenticated user. */
|
|
76
|
+
assertCurrentUser(user) {
|
|
77
|
+
const currentUser = RequestContext.isActive()
|
|
78
|
+
? RequestContext.get(User)
|
|
79
|
+
: undefined;
|
|
80
|
+
if (!currentUser || String(currentUser.id) !== String(user.id)) {
|
|
81
|
+
throw new ForbiddenException("The operation belongs to another user");
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
/** Throws unless the supplied session is the authenticated session. */
|
|
85
|
+
assertCurrentSession(session) {
|
|
86
|
+
const currentSession = RequestContext.isActive()
|
|
87
|
+
? RequestContext.get(Session)
|
|
88
|
+
: undefined;
|
|
89
|
+
if (currentSession?.token !== session.token) {
|
|
90
|
+
throw new ForbiddenException("The operation belongs to another session");
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
/** Throws unless the supplied workspace is selected for the current request. */
|
|
94
|
+
assertCurrentWorkspace(workspace) {
|
|
95
|
+
const currentWorkspace = RequestContext.isActive()
|
|
96
|
+
? RequestContext.get(Workspace)
|
|
97
|
+
: undefined;
|
|
98
|
+
if (!currentWorkspace ||
|
|
99
|
+
String(currentWorkspace.id) !== String(workspace.id)) {
|
|
100
|
+
throw new ForbiddenException("The operation belongs to another workspace");
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
/** Throws unless the supplied member is the current workspace member. */
|
|
104
|
+
assertCurrentMember(member) {
|
|
105
|
+
const currentMember = RequestContext.isActive()
|
|
106
|
+
? RequestContext.get(Member)
|
|
107
|
+
: undefined;
|
|
108
|
+
if (!member ||
|
|
109
|
+
!currentMember ||
|
|
110
|
+
String(currentMember.id) !== String(member.id)) {
|
|
111
|
+
throw new ForbiddenException("The operation belongs to another workspace member");
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
/** Throws when a user grant exceeds the current principal's permissions. */
|
|
115
|
+
assertCanGrantUserPermissions(requestedPermissions) {
|
|
116
|
+
const allowed = new Set(this.getUserGrantPermissions());
|
|
117
|
+
const excessive = requestedPermissions.filter((permission) => !allowed.has(permission));
|
|
118
|
+
if (excessive.length > 0) {
|
|
119
|
+
throw new ForbiddenException(`User permissions exceed issuer permissions: ${excessive.join(", ")}`);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
/** Checks the same grant ceiling used when assigning user permissions. */
|
|
123
|
+
canGrantUserPermissions(requestedPermissions) {
|
|
124
|
+
const allowed = new Set(this.getUserGrantPermissions());
|
|
125
|
+
return requestedPermissions.every((permission) => allowed.has(permission));
|
|
126
|
+
}
|
|
127
|
+
getUserGrantPermissions() {
|
|
128
|
+
return resolveRequestPermissions(this.options).user;
|
|
129
|
+
}
|
|
130
|
+
/** Throws when a workspace grant exceeds the current principal's permissions. */
|
|
131
|
+
assertCanGrantWorkspacePermissions(requestedPermissions) {
|
|
132
|
+
const allowed = new Set(this.getWorkspaceGrantPermissions());
|
|
133
|
+
const excessive = requestedPermissions.filter((permission) => !allowed.has(permission));
|
|
134
|
+
if (excessive.length > 0) {
|
|
135
|
+
throw new ForbiddenException(`Workspace permissions exceed issuer permissions: ${excessive.join(", ")}`);
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
/** Checks the same grant ceiling used when assigning workspace permissions. */
|
|
139
|
+
canGrantWorkspacePermissions(requestedPermissions) {
|
|
140
|
+
const allowed = new Set(this.getWorkspaceGrantPermissions());
|
|
141
|
+
return requestedPermissions.every((permission) => allowed.has(permission));
|
|
142
|
+
}
|
|
143
|
+
getWorkspaceGrantPermissions() {
|
|
144
|
+
return resolveRequestPermissions(this.options).workspace;
|
|
145
|
+
}
|
|
146
|
+
/** Rejects access to or delegation of credentials broader than the authenticating API key. */
|
|
147
|
+
assertApiKeyPermissionCeiling(permissions) {
|
|
148
|
+
const ceiling = this.getApiKeyPermissionCeiling();
|
|
149
|
+
if (ceiling === null)
|
|
150
|
+
return;
|
|
151
|
+
const allowed = new Set(ceiling);
|
|
152
|
+
const excessive = permissions.filter((permission) => !allowed.has(permission));
|
|
153
|
+
if (excessive.length > 0) {
|
|
154
|
+
throw new ForbiddenException(`API key permissions exceed authenticating API key permissions: ${excessive.join(", ")}`);
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
/** Returns the credential ceiling shared by API-key queries, options, and writes. */
|
|
158
|
+
getApiKeyPermissionCeiling() {
|
|
159
|
+
return resolveRequestPermissions(this.options).apiKey;
|
|
160
|
+
}
|
|
161
|
+
/** Checks API-key ownership independently of the application's database policies. */
|
|
162
|
+
assertApiKeyOwner(apiKey) {
|
|
163
|
+
const ownerReference = apiKey instanceof UserApiKey ? apiKey.user : apiKey.workspace;
|
|
164
|
+
if (!ownerReference) {
|
|
165
|
+
throw new ForbiddenException("API key owner is missing");
|
|
166
|
+
}
|
|
167
|
+
const owner = Reference.unwrapReference(ownerReference);
|
|
168
|
+
if (owner instanceof User) {
|
|
169
|
+
this.assertCurrentUser(owner);
|
|
170
|
+
return;
|
|
171
|
+
}
|
|
172
|
+
if (!(owner instanceof Workspace)) {
|
|
173
|
+
throw new ForbiddenException("Unknown API key owner");
|
|
174
|
+
}
|
|
175
|
+
this.assertCurrentWorkspace(owner);
|
|
176
|
+
const currentKey = RequestContext.isActive() ? getCurrentApiKey() : null;
|
|
177
|
+
if (currentKey instanceof WorkspaceApiKey) {
|
|
178
|
+
if (String(currentKey.workspace?.id) !== String(owner.id)) {
|
|
179
|
+
throw new ForbiddenException("API key belongs to another workspace");
|
|
180
|
+
}
|
|
181
|
+
return;
|
|
182
|
+
}
|
|
183
|
+
const member = RequestContext.isActive()
|
|
184
|
+
? RequestContext.get(Member)
|
|
185
|
+
: null;
|
|
186
|
+
if (member?.status !== "ACTIVE" ||
|
|
187
|
+
String(member.workspace.id) !== String(owner.id)) {
|
|
188
|
+
throw new ForbiddenException("An active workspace member is required");
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
isWorkspaceApiKey(apiKey) {
|
|
192
|
+
return apiKey instanceof WorkspaceApiKey;
|
|
193
|
+
}
|
|
194
|
+
};
|
|
195
|
+
AccessControlService = __decorate([
|
|
196
|
+
Injectable(),
|
|
197
|
+
__param(0, Inject(MODULE_OPTIONS_TOKEN)),
|
|
198
|
+
__metadata("design:paramtypes", [Object])
|
|
199
|
+
], AccessControlService);
|
|
200
|
+
export { AccessControlService };
|
|
201
|
+
//# sourceMappingURL=access-control.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"access-control.service.js","sourceRoot":"","sources":["../../src/services/access-control.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,EAAE,UA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,CAAC;IAEO,iBAAiB,CAAC,MAAc;QACtC,OAAO,MAAM,YAAY,eAAe,CAAC;IAC3C,CAAC;CACF,CAAA;AA3NY,oBAAoB;IADhC,UAAU,EAAE;IAIR,WAAA,MAAM,CAAC,oBAAoB,CAAC,CAAA;;GAHpB,oBAAoB,CA2NhC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { EntityManager } from "@mikro-orm/core";
|
|
2
|
+
import { type ConnectionArgsInterface, type ConnectionInterface } from "@nest-boot/graphql-connection";
|
|
3
|
+
import { type Account } from "../entities/account.entity.js";
|
|
4
|
+
import { type User } from "../entities/user.entity.js";
|
|
5
|
+
import { AccessControlService } from "./access-control.service.js";
|
|
6
|
+
/** Safe account queries scoped to the current user session and application RLS. */
|
|
7
|
+
export declare class AccountService {
|
|
8
|
+
private readonly em;
|
|
9
|
+
private readonly accessControlService;
|
|
10
|
+
/** Creates the account query service. */
|
|
11
|
+
constructor(em: EntityManager, accessControlService: AccessControlService);
|
|
12
|
+
/** Paginates the current session user's accounts without loading credentials. */
|
|
13
|
+
getAccountConnectionByUser(user: User, args: ConnectionArgsInterface<Account>): Promise<ConnectionInterface<Account>>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
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 { EntityManager } from "@mikro-orm/core";
|
|
11
|
+
import { ConnectionManager, } from "@nest-boot/graphql-connection";
|
|
12
|
+
import { ForbiddenException, Injectable } from "@nestjs/common";
|
|
13
|
+
import { AccountConnection } from "../connections/account.connection-definition.js";
|
|
14
|
+
import { getCurrentApiKey } from "../utils/get-current-api-key.util.js";
|
|
15
|
+
import { AccessControlService } from "./access-control.service.js";
|
|
16
|
+
/** Safe account queries scoped to the current user session and application RLS. */
|
|
17
|
+
let AccountService = class AccountService {
|
|
18
|
+
em;
|
|
19
|
+
accessControlService;
|
|
20
|
+
/** Creates the account query service. */
|
|
21
|
+
constructor(em, accessControlService) {
|
|
22
|
+
this.em = em;
|
|
23
|
+
this.accessControlService = accessControlService;
|
|
24
|
+
}
|
|
25
|
+
/** Paginates the current session user's accounts without loading credentials. */
|
|
26
|
+
async getAccountConnectionByUser(user, args) {
|
|
27
|
+
this.accessControlService.assertCurrentUser(user);
|
|
28
|
+
if (getCurrentApiKey()) {
|
|
29
|
+
throw new ForbiddenException("Account inspection requires a user session");
|
|
30
|
+
}
|
|
31
|
+
return await new ConnectionManager(this.em).find(AccountConnection, args, {
|
|
32
|
+
where: { user: String(user.id) },
|
|
33
|
+
exclude: ["password", "accessToken", "refreshToken", "idToken"],
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
AccountService = __decorate([
|
|
38
|
+
Injectable(),
|
|
39
|
+
__metadata("design:paramtypes", [EntityManager,
|
|
40
|
+
AccessControlService])
|
|
41
|
+
], AccountService);
|
|
42
|
+
export { AccountService };
|
|
43
|
+
//# sourceMappingURL=account.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"account.service.js","sourceRoot":"","sources":["../../src/services/account.service.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,aAAa,EAAoB,MAAM,iBAAiB,CAAC;AAElE,OAAO,EAGL,i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