UNPKG

860 BTypeScriptView Raw
1import { AllHostiesQuery, HostieFragment, SubscribeHostieSubscription } from '../../generated-schemas/hostie-schema';
2import { Db } from '../db';
3import { Store } from '../store';
4export declare type Hostie = Partial<HostieFragment>;
5export declare class HostieStore extends Store<Hostie, AllHostiesQuery, SubscribeHostieSubscription> {
6 protected db: Db;
7 constructor(db: Db);
8 /**
9 * @param newHostie
10 */
11 create(newHostie: {
12 name: string;
13 token: string;
14 ownerId?: string;
15 }): Promise<Hostie>;
16 /**
17 * delete
18 * @param id
19 */
20 delete(id: string): Promise<Hostie>;
21 /**
22 * update will only change the specified fields in documents it affects;
23 * unspecified fields will be left untouched.
24 * @param updateHostie
25 */
26 update(id: string, props: Hostie): Promise<Hostie>;
27}