Skip to content

There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.

927 B
Raw Blame
/* auto-generated by NAPI-RS */
/* eslint-disable */
export declare class Tokenizer {
  count(content: string, allowedSpecial?: Array<string> | undefined | null): number
}

export declare function fromModelName(modelName: string): Tokenizer | null

export declare function getMime(input: Uint8Array): string

export declare function htmlSanitize(input: string): string

/**
 * Merge updates in form like `Y.applyUpdate(doc, update)` way and return the
 * result binary.
 */
export declare function mergeUpdatesInApplyWay(updates: Array<Buffer>): Buffer

export declare function mintChallengeResponse(resource: string, bits?: number | undefined | null): Promise<string>

export declare function parseDoc(filePath: string, doc: Buffer): Promise<{ name: string, chunks: Array<{index: number, content: string}> }>

export declare function verifyChallengeResponse(response: string, bits: number, resource: string): Promise<boolean>