Skip to content

@sourceloop/user-tenant-service / Exports / UserOperationsService

Class: UserOperationsService

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new UserOperationsService(roleRepository, userRepository, userViewRepository, tenantRepository, userGroupRepository, userTenantRepository, getCurrentUser, logger)

Parameters

Name Type
roleRepository RoleRepository
userRepository UserRepository
userViewRepository UserViewRepository
tenantRepository TenantRepository
userGroupRepository UserGroupRepository
userTenantRepository UserTenantRepository
getCurrentUser Getter<IAuthUserWithPermissions<string, string, string>>
logger ILogger

Defined in

services/user-tenant-service/src/services/user-operations.service.ts:30

Properties

getCurrentUser

Readonly getCurrentUser: Getter<IAuthUserWithPermissions<string, string, string>>

Defined in

services/user-tenant-service/src/services/user-operations.service.ts:41


logger

Private Readonly logger: ILogger

Defined in

services/user-tenant-service/src/services/user-operations.service.ts:42


roleRepository

Readonly roleRepository: RoleRepository

Defined in

services/user-tenant-service/src/services/user-operations.service.ts:31


tenantRepository

Readonly tenantRepository: TenantRepository

Defined in

services/user-tenant-service/src/services/user-operations.service.ts:35


userGroupRepository

Readonly userGroupRepository: UserGroupRepository

Defined in

services/user-tenant-service/src/services/user-operations.service.ts:37


userRepository

Readonly userRepository: UserRepository

Defined in

services/user-tenant-service/src/services/user-operations.service.ts:32


userTenantRepository

Readonly userTenantRepository: UserTenantRepository

Defined in

services/user-tenant-service/src/services/user-operations.service.ts:39


userViewRepository

Readonly userViewRepository: UserViewRepository

Defined in

services/user-tenant-service/src/services/user-operations.service.ts:34

Methods

_validateUserCreation

Private _validateUserCreation(userDtoData, tenant): Promise<void>

Parameters

Name Type
userDtoData UserDto
tenant Tenant

Returns

Promise<void>

Defined in

services/user-tenant-service/src/services/user-operations.service.ts:224


create

create(userDtoData, tenantId): Promise<User<DataObject<Model>>>

Parameters

Name Type
userDtoData UserDto
tenantId string

Returns

Promise<User<DataObject<Model>>>

Defined in

services/user-tenant-service/src/services/user-operations.service.ts:45


deleteById

deleteById(id, tenantId): Promise<void>

Parameters

Name Type
id string
tenantId string

Returns

Promise<void>

Defined in

services/user-tenant-service/src/services/user-operations.service.ts:193


find

find(tenantId, filter?, permissions?): Promise<UserView<DataObject<Model>>[]>

Parameters

Name Type
tenantId string
filter? Filter<UserView<DataObject<Model>>>
permissions? string[]

Returns

Promise<UserView<DataObject<Model>>[]>

Defined in

services/user-tenant-service/src/services/user-operations.service.ts:105


updateById

updateById(userData, userId, tenantId): Promise<void>

Parameters

Name Type
userData Omit<UserView<DataObject<Model>>, "id" | "authClientIds" | "lastLogin" | "status" | "tenantId">
userId string
tenantId string

Returns

Promise<void>

Defined in

services/user-tenant-service/src/services/user-operations.service.ts:138


updateUserTenant

updateUserTenant(userData, id, currentUser): Promise<void>

Parameters

Name Type
userData Partial<UserDto>
id string
currentUser IAuthUserWithPermissions<string, string, string>

Returns

Promise<void>

Defined in

services/user-tenant-service/src/services/user-operations.service.ts:173