UNPKG

@becomes/cms-cloud-client

Version:

SDK for accessing BCMS Cloud API

12 lines (11 loc) 752 B
import type { FSDBRepository } from '@becomes/purple-cheetah-mod-fsdb/types'; import type { MongoDBRepository } from '@becomes/purple-cheetah-mod-mongodb/types'; import type { Module } from '@becomes/purple-cheetah/types'; import { InstanceDomain } from '../models'; export interface InstanceDomainRepoMethods { findAllByInstanceId(instanceId: string): Promise<InstanceDomain[]>; findByIdAndInstanceId(id: string, instanceId: string): Promise<InstanceDomain | null>; countByInstanceId(instanceId: string): Promise<number>; } export type InstanceDomainRepo = MongoDBRepository<InstanceDomain, InstanceDomainRepoMethods> | FSDBRepository<InstanceDomain, InstanceDomainRepoMethods>; export declare function createInstanceDomainRepo(): Module;