@punks/backend-entity-manager 0.0.68 → 0.0.69
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/dist/cjs/index.js +55 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/platforms/nest/__test__/server/app/auth/services/index.d.ts +4 -0
- package/dist/cjs/types/platforms/nest/__test__/server/entities/roles/role.query.d.ts +3 -2
- package/dist/cjs/types/platforms/nest/extensions/authentication/guards/index.d.ts +1 -0
- package/dist/cjs/types/platforms/nest/extensions/authentication/index.d.ts +1 -0
- package/dist/esm/index.js +56 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/platforms/nest/__test__/server/app/auth/services/index.d.ts +4 -0
- package/dist/esm/types/platforms/nest/__test__/server/entities/roles/role.query.d.ts +3 -2
- package/dist/esm/types/platforms/nest/extensions/authentication/guards/index.d.ts +1 -0
- package/dist/esm/types/platforms/nest/extensions/authentication/index.d.ts +1 -0
- package/dist/index.d.ts +15 -3
- package/package.json +1 -1
- /package/dist/cjs/types/platforms/nest/{__test__/server/infrastructure/authentication/guards/auth-guard/index.d.ts → extensions/authentication/guards/auth.d.ts} +0 -0
- /package/dist/esm/types/platforms/nest/{__test__/server/infrastructure/authentication/guards/auth-guard/index.d.ts → extensions/authentication/guards/auth.d.ts} +0 -0
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { AuthRolesService } from "./auth.roles.service";
|
|
2
|
+
import { AuthUserService } from "./auth.user.service";
|
|
3
|
+
import { AuthUserRolesService } from "./auth.userRoles.service";
|
|
4
|
+
export declare const AuthServices: (typeof AuthRolesService | typeof AuthUserService | typeof AuthUserRolesService)[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FindOptionsWhere } from "typeorm";
|
|
1
|
+
import { FindOptionsRelations, FindOptionsWhere } from "typeorm";
|
|
2
2
|
import { IAuthenticationContext, EntityManagerRegistry, NestTypeOrmQueryBuilder } from "../../../../../..";
|
|
3
3
|
import { RoleEntity } from "../../database/core/entities/role.entity";
|
|
4
4
|
import { RoleFacets, RoleSearchParameters, RoleSorting } from "./role.models";
|
|
@@ -6,6 +6,7 @@ import { AppAuthContext } from "../../infrastructure/authentication/types";
|
|
|
6
6
|
export declare class RoleQueryBuilder extends NestTypeOrmQueryBuilder<RoleEntity, RoleSearchParameters, RoleSorting, RoleFacets, AppAuthContext> {
|
|
7
7
|
constructor(registry: EntityManagerRegistry);
|
|
8
8
|
protected buildContextFilter(context?: IAuthenticationContext<AppAuthContext> | undefined): FindOptionsWhere<RoleEntity> | FindOptionsWhere<RoleEntity>[];
|
|
9
|
-
protected buildWhereClause(request: RoleSearchParameters): FindOptionsWhere<RoleEntity> | FindOptionsWhere<RoleEntity>[];
|
|
9
|
+
protected buildWhereClause(request: RoleSearchParameters, context?: IAuthenticationContext<AppAuthContext> | undefined): FindOptionsWhere<RoleEntity> | FindOptionsWhere<RoleEntity>[];
|
|
10
10
|
protected calculateFacets(request: RoleSearchParameters): Promise<RoleFacets | undefined>;
|
|
11
|
+
protected getRelationsToLoad(request: RoleSearchParameters, context?: IAuthenticationContext<AppAuthContext> | undefined): FindOptionsRelations<RoleEntity> | undefined;
|
|
11
12
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { AuthGuard } from "./auth";
|
package/dist/index.d.ts
CHANGED
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
/// <reference types="express" />
|
|
3
3
|
import * as _punks_backend_core from '@punks/backend-core';
|
|
4
4
|
import * as _nestjs_common from '@nestjs/common';
|
|
5
|
-
import { Type as Type$1, INestApplicationContext, NestModule, DynamicModule, MiddlewareConsumer, ExceptionFilter, ArgumentsHost, NestMiddleware } from '@nestjs/common';
|
|
5
|
+
import { Type as Type$1, INestApplicationContext, CanActivate, ExecutionContext, NestModule, DynamicModule, MiddlewareConsumer, ExceptionFilter, ArgumentsHost, NestMiddleware } from '@nestjs/common';
|
|
6
6
|
import { Module } from '@nestjs/core/injector/module';
|
|
7
7
|
import { ModulesContainer } from '@nestjs/core/injector/modules-container';
|
|
8
8
|
import { MetadataScanner } from '@nestjs/core/metadata-scanner';
|
|
9
|
+
import { Reflector, ModulesContainer as ModulesContainer$1 } from '@nestjs/core';
|
|
9
10
|
import { JwtService } from '@nestjs/jwt';
|
|
10
11
|
import { ObjectLiteral, FindOneOptions, FindManyOptions, Repository, ObjectId, FindOptionsWhere, FindOptionsRelations } from 'typeorm';
|
|
11
12
|
import { EventEmitter2 } from '@nestjs/event-emitter';
|
|
12
|
-
import { ModulesContainer as ModulesContainer$1 } from '@nestjs/core';
|
|
13
13
|
import * as express from 'express';
|
|
14
14
|
import { Request, Response, NextFunction } from 'express';
|
|
15
15
|
import * as qs from 'qs';
|
|
@@ -948,6 +948,18 @@ type UserPasswordResetCompletedEventPayload = {
|
|
|
948
948
|
profile: UserProfile;
|
|
949
949
|
};
|
|
950
950
|
|
|
951
|
+
declare class AuthGuard implements CanActivate {
|
|
952
|
+
private reflector;
|
|
953
|
+
constructor(reflector: Reflector);
|
|
954
|
+
canActivate(context: ExecutionContext): boolean;
|
|
955
|
+
private isRoleMatching;
|
|
956
|
+
private getIsForAllAuthenticated;
|
|
957
|
+
private getIsPublic;
|
|
958
|
+
private getAllowedRoles;
|
|
959
|
+
private getCurrentAuth;
|
|
960
|
+
private getMetadata;
|
|
961
|
+
}
|
|
962
|
+
|
|
951
963
|
interface UserDisableInput {
|
|
952
964
|
userId: string;
|
|
953
965
|
}
|
|
@@ -1536,4 +1548,4 @@ declare const renderHandlebarsTemplate: <TContext extends object>(input: {
|
|
|
1536
1548
|
|
|
1537
1549
|
declare const newUuid: () => string;
|
|
1538
1550
|
|
|
1539
|
-
export { AUTHENTICATION_EVENTS_NAMESPACE, AppExceptionsFilterBase, AppHashingService, AppInMemorySettings, AppSessionMiddleware, AppSessionService, Authenticated, AuthenticationEmailTemplates, AuthenticationError, AuthenticationEvents, AuthenticationExtensionSymbols, AuthenticationModule, AuthenticationModuleSettings, AuthenticationService, AwsEmailModule, AwsSesEmailTemplate, AwsSesEmailTemplateData, AwsSesSettings, BooleanFacet, BooleanFacetItem, EmailService, EmailTemplateProps, EmailVerifyEmailPayload, EmailVerifyTokenPayload, EntityActionsProps, EntityAdapterProps, EntityAuthMiddlewareProps, EntityConnectorProps, EntityConverterProps, EntityManagerConfigurationError, EntityManagerException, EntityManagerInitializer, EntityManagerModule, EntityManagerProps, EntityManagerRegistry, EntityManagerService, EntityManagerSymbols, EntityManagerUnauthorizedException, EntityNotFoundException, EntityOperationType, EntityOperationUnauthorizedException, EntityProps, EntityQueryBuilderProps, EntityRepositoryProps, EntitySeeder, EntitySeederProps, EventsService, EventsTrackerProps, FilterExpression, HtmlEmailInput, IAppCompany, IAppDivision, IAppOrganization, IAppRole, IAppTenant, IAppUser, IAppUserGroup, IAppUserProfile, IAuthRole, IAuthRoleService, IAuthService, IAuthUser, IAuthUserContext, IAuthUserOrganization, IAuthUserProfile, IAuthUserRolesService, IAuthUserService, IAuthUserTokenData, IAuthenticationContext, IAuthenticationContextProvider, IAuthorizationResult, IEmailProvider, IEmailTemplate, IEmailTemplatesCollection, IEntitiesQueryBuilder, IEntitiesSearchAction, IEntitiesSearchQuery, IEntitiesSearchResults, IEntitiesSearchResultsPaging, IEntityActions, IEntityAdapter, IEntityAuthorizationMiddleware, IEntityConverter, IEntityCreateAction, IEntityCreateCommand, IEntityDeleteAction, IEntityDeleteCommand, IEntityEventsManager, IEntityFacet, IEntityFacetItem, IEntityFacets, IEntityGetAction, IEntityGetQuery, IEntityManager, IEntityManagerServiceCollection, IEntityManagerServiceRoot, IEntityMapper, IEntityReplicaDeleteManager, IEntityReplicaSyncManager, IEntityRepository, IEntitySearchParameters, IEntitySearchResults, IEntityUpdateAction, IEntityUpdateCommand, IEntityUpsertAction, IEntityUpsertCommand, IEventLog, IEventsTracker, IReplicasConfiguration, ISearchFilters, ISearchOptions, ISearchRequestPaging, ISearchResultsPaging, ISearchSorting, ISearchSortingField, InvalidCredentialsError, LocalizedMap, LocalizedTexts, MemberOf, MessagingEmailSentPayload, ModulesContainerProvider, MultiTenancyModule, MultipleEntitiesFoundException, NestEntityActions, NestEntityAuthorizationMiddleware, NestEntityManager, NestTypeOrmEntitySeeder, NestTypeOrmQueryBuilder, NestTypeOrmRepository, NumericFacet, NumericFacetItem, OperationTokenMismatchError, PLATFORM_EVENT_NAMESPACE, PasswordResetEmailPayload, PlatformEvents, Public, QueryBuilderBase, RegistrationEmailPayload, ReplicaConfiguration, ReplicaOptions, ReplicationMode, Roles, RuntimeErrorInformation, SendgridEmailModule, SendgridEmailTemplate, SendgridEmailTemplateData, SendgridSettings, SendgridTemplateBaseData, SendgridTemplateType, SortDirection, SortingType, StringFacet, StringFacetItem, TemplatedEmailInput, TrackingService, UserDisableInput, UserEnableInput, UserLoginEventPayload, UserLoginInput, UserLoginResult, UserPasswordChangeInput, UserPasswordResetCompleteInput, UserPasswordResetCompletedEventPayload, UserPasswordResetRequestCallbackTemplate, UserPasswordResetRequestInput, UserPasswordResetRequestResult, UserPasswordResetStartedEventPayload, UserPasswordResetTokenPayload, UserProfile, UserRegisterCallbackTemplate, UserRegistrationCompletedEventPayload, UserRegistrationError, UserRegistrationInput, UserRegistrationResult, UserRegistrationStartedEventPayload, UserTokenVerifyInput, UserTokenVerifyResult, UserVerifyCompleteInput, UserVerifyRequestCallbackTemplate, UserVerifyRequestInput, UserVerifyRequestResult as UserVerifyResetRequestResult, WpAppInitializer, WpAwsSesEmailTemplate, WpEmailTemplate, WpEntity, WpEntityActions, WpEntityAdapter, WpEntityAuthMiddleware, WpEntityConnector, WpEntityConverter, WpEntityManager, WpEntityQueryBuilder, WpEntityRepository, WpEntitySeeder, WpEventsTracker, WpRolesService, WpSendgridEmailTemplate, WpUserRolesService, WpUserService, getLocalizedText, newUuid, renderHandlebarsTemplate };
|
|
1551
|
+
export { AUTHENTICATION_EVENTS_NAMESPACE, AppExceptionsFilterBase, AppHashingService, AppInMemorySettings, AppSessionMiddleware, AppSessionService, AuthGuard, Authenticated, AuthenticationEmailTemplates, AuthenticationError, AuthenticationEvents, AuthenticationExtensionSymbols, AuthenticationModule, AuthenticationModuleSettings, AuthenticationService, AwsEmailModule, AwsSesEmailTemplate, AwsSesEmailTemplateData, AwsSesSettings, BooleanFacet, BooleanFacetItem, EmailService, EmailTemplateProps, EmailVerifyEmailPayload, EmailVerifyTokenPayload, EntityActionsProps, EntityAdapterProps, EntityAuthMiddlewareProps, EntityConnectorProps, EntityConverterProps, EntityManagerConfigurationError, EntityManagerException, EntityManagerInitializer, EntityManagerModule, EntityManagerProps, EntityManagerRegistry, EntityManagerService, EntityManagerSymbols, EntityManagerUnauthorizedException, EntityNotFoundException, EntityOperationType, EntityOperationUnauthorizedException, EntityProps, EntityQueryBuilderProps, EntityRepositoryProps, EntitySeeder, EntitySeederProps, EventsService, EventsTrackerProps, FilterExpression, HtmlEmailInput, IAppCompany, IAppDivision, IAppOrganization, IAppRole, IAppTenant, IAppUser, IAppUserGroup, IAppUserProfile, IAuthRole, IAuthRoleService, IAuthService, IAuthUser, IAuthUserContext, IAuthUserOrganization, IAuthUserProfile, IAuthUserRolesService, IAuthUserService, IAuthUserTokenData, IAuthenticationContext, IAuthenticationContextProvider, IAuthorizationResult, IEmailProvider, IEmailTemplate, IEmailTemplatesCollection, IEntitiesQueryBuilder, IEntitiesSearchAction, IEntitiesSearchQuery, IEntitiesSearchResults, IEntitiesSearchResultsPaging, IEntityActions, IEntityAdapter, IEntityAuthorizationMiddleware, IEntityConverter, IEntityCreateAction, IEntityCreateCommand, IEntityDeleteAction, IEntityDeleteCommand, IEntityEventsManager, IEntityFacet, IEntityFacetItem, IEntityFacets, IEntityGetAction, IEntityGetQuery, IEntityManager, IEntityManagerServiceCollection, IEntityManagerServiceRoot, IEntityMapper, IEntityReplicaDeleteManager, IEntityReplicaSyncManager, IEntityRepository, IEntitySearchParameters, IEntitySearchResults, IEntityUpdateAction, IEntityUpdateCommand, IEntityUpsertAction, IEntityUpsertCommand, IEventLog, IEventsTracker, IReplicasConfiguration, ISearchFilters, ISearchOptions, ISearchRequestPaging, ISearchResultsPaging, ISearchSorting, ISearchSortingField, InvalidCredentialsError, LocalizedMap, LocalizedTexts, MemberOf, MessagingEmailSentPayload, ModulesContainerProvider, MultiTenancyModule, MultipleEntitiesFoundException, NestEntityActions, NestEntityAuthorizationMiddleware, NestEntityManager, NestTypeOrmEntitySeeder, NestTypeOrmQueryBuilder, NestTypeOrmRepository, NumericFacet, NumericFacetItem, OperationTokenMismatchError, PLATFORM_EVENT_NAMESPACE, PasswordResetEmailPayload, PlatformEvents, Public, QueryBuilderBase, RegistrationEmailPayload, ReplicaConfiguration, ReplicaOptions, ReplicationMode, Roles, RuntimeErrorInformation, SendgridEmailModule, SendgridEmailTemplate, SendgridEmailTemplateData, SendgridSettings, SendgridTemplateBaseData, SendgridTemplateType, SortDirection, SortingType, StringFacet, StringFacetItem, TemplatedEmailInput, TrackingService, UserDisableInput, UserEnableInput, UserLoginEventPayload, UserLoginInput, UserLoginResult, UserPasswordChangeInput, UserPasswordResetCompleteInput, UserPasswordResetCompletedEventPayload, UserPasswordResetRequestCallbackTemplate, UserPasswordResetRequestInput, UserPasswordResetRequestResult, UserPasswordResetStartedEventPayload, UserPasswordResetTokenPayload, UserProfile, UserRegisterCallbackTemplate, UserRegistrationCompletedEventPayload, UserRegistrationError, UserRegistrationInput, UserRegistrationResult, UserRegistrationStartedEventPayload, UserTokenVerifyInput, UserTokenVerifyResult, UserVerifyCompleteInput, UserVerifyRequestCallbackTemplate, UserVerifyRequestInput, UserVerifyRequestResult as UserVerifyResetRequestResult, WpAppInitializer, WpAwsSesEmailTemplate, WpEmailTemplate, WpEntity, WpEntityActions, WpEntityAdapter, WpEntityAuthMiddleware, WpEntityConnector, WpEntityConverter, WpEntityManager, WpEntityQueryBuilder, WpEntityRepository, WpEntitySeeder, WpEventsTracker, WpRolesService, WpSendgridEmailTemplate, WpUserRolesService, WpUserService, getLocalizedText, newUuid, renderHandlebarsTemplate };
|
package/package.json
CHANGED
|
File without changes
|