53 lines
881 B
TypeScript
53 lines
881 B
TypeScript
|
import type { JSONMap } from './jsonmap';
|
||
|
|
||
|
export interface DocumentBody {
|
||
|
title: string;
|
||
|
content_type: string;
|
||
|
basepath: string;
|
||
|
filename: string;
|
||
|
modified_at: number;
|
||
|
content_hash: string | null;
|
||
|
additional: JSONMap;
|
||
|
tags: string[]; // eager loading
|
||
|
}
|
||
|
|
||
|
export interface Document extends DocumentBody {
|
||
|
readonly id: number;
|
||
|
readonly created_at: number;
|
||
|
readonly deleted_at: number | null;
|
||
|
}
|
||
|
|
||
|
export type QueryListOption = {
|
||
|
/**
|
||
|
* search word
|
||
|
*/
|
||
|
word?: string;
|
||
|
allow_tag?: string[];
|
||
|
/**
|
||
|
* limit of list
|
||
|
* @default 20
|
||
|
*/
|
||
|
limit?: number;
|
||
|
/**
|
||
|
* use offset if true, otherwise
|
||
|
* @default false
|
||
|
*/
|
||
|
use_offset?: boolean;
|
||
|
/**
|
||
|
* cursor of documents
|
||
|
*/
|
||
|
cursor?: number;
|
||
|
/**
|
||
|
* offset of documents
|
||
|
*/
|
||
|
offset?: number;
|
||
|
/**
|
||
|
* tag eager loading
|
||
|
* @default true
|
||
|
*/
|
||
|
eager_loading?: boolean;
|
||
|
/**
|
||
|
* content type
|
||
|
*/
|
||
|
content_type?: string;
|
||
|
};
|