Skip to content

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

Class: TenantRepository

Hierarchy

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new TenantRepository(dataSource, tenantConfigRepositoryGetter, userTenantRepositoryGetter, userRepositoryGetter, roleRepositoryGetter, groupRepositoryGetter, getCurrentUser)

Parameters

Name Type
dataSource DataSource
tenantConfigRepositoryGetter Getter<TenantConfigRepository>
userTenantRepositoryGetter Getter<UserTenantRepository>
userRepositoryGetter Getter<UserRepository>
roleRepositoryGetter Getter<RoleRepository>
groupRepositoryGetter Getter<GroupRepository>
getCurrentUser Getter<undefined | IAuthUserWithPermissions<string, string, string>>

Overrides

DefaultUserModifyCrudRepository< Tenant, typeof Tenant.prototype.id, TenantRelations \>.constructor

Defined in

services/user-tenant-service/src/repositories/tenant.repository.ts:62

Properties

getCurrentUser

Protected Readonly getCurrentUser: Getter<undefined | IAuthUserWithPermissions<string, string, string>>

Inherited from

DefaultUserModifyCrudRepository.getCurrentUser

Defined in

services/user-tenant-service/src/repositories/tenant.repository.ts:76


groupRepositoryGetter

Protected groupRepositoryGetter: Getter<GroupRepository>

Defined in

services/user-tenant-service/src/repositories/tenant.repository.ts:74


groups

Readonly groups: HasManyRepositoryFactory<Group<DataObject<Model>>, undefined | string>

Defined in

services/user-tenant-service/src/repositories/tenant.repository.ts:57


roleRepositoryGetter

Protected roleRepositoryGetter: Getter<RoleRepository>

Defined in

services/user-tenant-service/src/repositories/tenant.repository.ts:72


roles

Readonly roles: HasManyRepositoryFactory<Role, undefined | string>

Defined in

services/user-tenant-service/src/repositories/tenant.repository.ts:52


tenantConfigRepositoryGetter

Protected tenantConfigRepositoryGetter: Getter<TenantConfigRepository>

Defined in

services/user-tenant-service/src/repositories/tenant.repository.ts:66


tenantConfigs

Readonly tenantConfigs: HasManyRepositoryFactory<TenantConfig, undefined | string>

Defined in

services/user-tenant-service/src/repositories/tenant.repository.ts:37


userRepositoryGetter

Protected userRepositoryGetter: Getter<UserRepository>

Defined in

services/user-tenant-service/src/repositories/tenant.repository.ts:70


userTenantRepositoryGetter

Protected userTenantRepositoryGetter: Getter<UserTenantRepository>

Defined in

services/user-tenant-service/src/repositories/tenant.repository.ts:68


userTenants

Readonly userTenants: HasManyRepositoryFactory<UserTenant, undefined | string>

Defined in

services/user-tenant-service/src/repositories/tenant.repository.ts:42


users

Readonly users: HasManyRepositoryFactory<User<DataObject<Model>>, undefined | string>

Defined in

services/user-tenant-service/src/repositories/tenant.repository.ts:47

Methods

create

create(entity, options?): Promise<Tenant>

Parameters

Name Type
entity DataObject<Tenant>
options? Options

Returns

Promise<Tenant>

Inherited from

DefaultUserModifyCrudRepository.create

Defined in

packages/core/dist/repositories/default-user-modify-crud.repository.base.d.ts:11


createAll

createAll(entities, options?): Promise<Tenant[]>

Parameters

Name Type
entities DataObject<Tenant>[]
options? Options

Returns

Promise<Tenant[]>

Inherited from

DefaultUserModifyCrudRepository.createAll

Defined in

packages/core/dist/repositories/default-user-modify-crud.repository.base.d.ts:12


replaceById

replaceById(id, data, options?): Promise<void>

Parameters

Name Type
id undefined | string
data DataObject<Tenant>
options? Options

Returns

Promise<void>

Inherited from

DefaultUserModifyCrudRepository.replaceById

Defined in

packages/core/dist/repositories/default-user-modify-crud.repository.base.d.ts:17


save

save(entity, options?): Promise<Tenant>

Parameters

Name Type
entity Tenant
options? Options

Returns

Promise<Tenant>

Inherited from

DefaultUserModifyCrudRepository.save

Defined in

packages/core/dist/repositories/default-user-modify-crud.repository.base.d.ts:13


update

update(entity, options?): Promise<void>

Parameters

Name Type
entity Tenant
options? Options

Returns

Promise<void>

Inherited from

DefaultUserModifyCrudRepository.update

Defined in

packages/core/dist/repositories/default-user-modify-crud.repository.base.d.ts:14


updateAll

updateAll(data, where?, options?): Promise<Count>

Parameters

Name Type
data DataObject<Tenant>
where? Where<Tenant>
options? Options

Returns

Promise<Count>

Inherited from

DefaultUserModifyCrudRepository.updateAll

Defined in

packages/core/dist/repositories/default-user-modify-crud.repository.base.d.ts:15


updateById

updateById(id, data, options?): Promise<void>

Parameters

Name Type
id undefined | string
data DataObject<Tenant>
options? Options

Returns

Promise<void>

Inherited from

DefaultUserModifyCrudRepository.updateById

Defined in

packages/core/dist/repositories/default-user-modify-crud.repository.base.d.ts:16