UNPKG

@becomes/cms-cloud-client

Version:

SDK for accessing BCMS Cloud API

14 lines (13 loc) 928 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 { InstanceFJE, InstanceFJEType } from '../models'; export interface InstanceFJERepoMethods { findAllByInstanceId(instanceId: string): Promise<InstanceFJE[]>; findAllByInstanceIdAndType(instanceId: string, type: InstanceFJEType): Promise<InstanceFJE[]>; findByIdAndInstanceId(id: string, instanceId: string): Promise<InstanceFJE | null>; countByInstanceId(instanceId: string): Promise<number>; countByInstanceIdAndType(instanceId: string, type: InstanceFJEType): Promise<number>; } export type InstanceFJERepo = MongoDBRepository<InstanceFJE, InstanceFJERepoMethods> | FSDBRepository<InstanceFJE, InstanceFJERepoMethods>; export declare function createInstanceFJERepo(): Module;