UNPKG

@chubbyts/chubbyts-api

Version:

[![CI](https://github.com/chubbyts/chubbyts-api/workflows/CI/badge.svg?branch=master)](https://github.com/chubbyts/chubbyts-api/actions?query=workflow%3ACI) [![Coverage Status](https://coveralls.io/repos/github/chubbyts/chubbyts-api/badge.svg?branch=maste

6 lines (5 loc) 579 B
import type { ModelList, Model, InputModelSchema, InputModelListSchema, InputModelList } from './model.js'; export type ResolveModelList<IMS extends InputModelSchema, IMLS extends InputModelListSchema> = (inputModelList: InputModelList<IMLS>) => Promise<ModelList<IMS, IMLS>>; export type FindModelById<IMS extends InputModelSchema> = (id: string) => Promise<Model<IMS> | undefined>; export type PersistModel<IMS extends InputModelSchema> = (model: Model<IMS>) => Promise<Model<IMS>>; export type RemoveModel<IMS extends InputModelSchema> = (model: Model<IMS>) => Promise<void>;