ionian/packages/dbtype/api.ts
monoid 8fece9090f BREAKING: Rework (#6)
다시 작업. 디자인도 바꾸고 서버도 바꿈.

Co-authored-by: monoid <jaeung@prelude.duckdns.org>
Reviewed-on: https://git.prelude.duckdns.org/monoid/ionian/pulls/6
2024-04-17 01:45:36 +09:00

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;
};