Setu-TS
    Preparing search index...

    Interface ITenantRepository<Entity, Id>

    Tenant-scoped repository — delegates CRUD to the data store the multi-tenancy plugin was configured with (ITenantDataStore, declared in that plugin), while threading the resolved tenant id.

    0.1.0

    interface ITenantRepository<Entity, Id = string> {
        create(data: Readonly<Record<string, unknown>>): Promise<Entity>;
        delete(id: Id): Promise<boolean>;
        find(filter: Readonly<Record<string, unknown>>): Promise<readonly Entity[]>;
        findAll(): Promise<readonly Entity[]>;
        findById(id: Id): Promise<Entity | null>;
        update(
            id: Id,
            data: Readonly<Record<string, unknown>>,
        ): Promise<Entity | null>;
    }

    Type Parameters

    • Entity
    • Id = string
    Index