import * as BO from '@heduapp/book-objects/business-object'; import { BookType } from '@heduapp/book-objects/business-object'; import { IDecoder, IEncoder } from '@heduapp/book-objects/codec'; import Knex from 'knex'; import { ContentAuthor, ContentGroup, ContentLeaf, ContentLeafRelation } from '../db/model'; import { IBookInfo } from './db-codec-book-infos'; import { IObjectInfo } from './db-codec-find-book-types'; export declare type ChainID = string; export declare type UUID = string; export declare class DBCodec implements IEncoder, IDecoder { knex: Knex; constructor(dbConfig: Knex.Config); encode(businessObject: BO.AbstractBusinessObject, bookType?: BookType): Promise; encodeWorksheet(book: BO.Book, author: ContentAuthor): Promise; decode(id: ChainID | UUID): Promise; /** * @deprecated We are using DBCodec.bookType now */ isWorksheet(objectInfo: IObjectInfo): Promise; /** * Returns the first found bookType */ bookType(objectInfo: IObjectInfo): Promise; bookTypes(objectInfo: IObjectInfo): Promise; findRelations(source: UUID): Promise; bookInfos(id: ChainID | UUID): Promise; removeBusinessObject(id: ChainID | UUID): Promise; appendBusinessObject(parentID: ChainID | UUID, newChild: BO.AbstractBusinessObject, extendedFromID?: UUID): Promise; private encodeBusinessObject; private isPersistable; }