@sourceloop/ctrl-plane-tenant-management-service
Version:
Tenant Management microservice for SaaS control plane
24 lines (23 loc) • 1.76 kB
TypeScript
import { Getter } from '@loopback/core';
import { BelongsToAccessor, Entity, HasManyRepositoryFactory, juggler } from '@loopback/repository';
import { DefaultTransactionalUserModifyRepository, IAuthUserWithPermissions } from '@sourceloop/core';
import { Address, Contact, Lead, Resource, Tenant, TenantRelations } from '../models';
import { ContactRepository } from './contact.repository';
import { LeadRepository } from './lead.repository';
import { ResourceRepository } from './resource.repository';
import { AddressRepository } from './address.repository';
export declare class SaasTenantRepository<T extends Tenant = Tenant> extends DefaultTransactionalUserModifyRepository<T, typeof Tenant.prototype.id, TenantRelations> {
readonly getCurrentUser: Getter<IAuthUserWithPermissions>;
protected contactRepositoryGetter: Getter<ContactRepository>;
protected leadRepositoryGetter: Getter<LeadRepository>;
protected resourceRepositoryGetter: Getter<ResourceRepository>;
protected addressRepositoryGetter: Getter<AddressRepository>;
private readonly tenant;
readonly contacts: HasManyRepositoryFactory<Contact, typeof Tenant.prototype.id>;
readonly resources: HasManyRepositoryFactory<Resource, typeof Tenant.prototype.id>;
readonly lead: BelongsToAccessor<Lead, typeof Tenant.prototype.id>;
readonly address: BelongsToAccessor<Address, typeof Tenant.prototype.id>;
constructor(dataSource: juggler.DataSource, getCurrentUser: Getter<IAuthUserWithPermissions>, contactRepositoryGetter: Getter<ContactRepository>, leadRepositoryGetter: Getter<LeadRepository>, resourceRepositoryGetter: Getter<ResourceRepository>, addressRepositoryGetter: Getter<AddressRepository>, tenant: typeof Entity & {
prototype: T;
});
}