Webpages Types

UploadWebpageRequest

interface UploadWebpageRequest {
  ext: WebsiteExt;

  content: string;

  title?: string;
  link?: string;
}

Webpage

interface WebpageHighlight {
  highlightId: string;
  type: 1;
  marker: {
    meta: {
      textBefore: string;
      textAfter: string;
    };
  };
  text: string;
}

interface Webpage {
  title: string;
  excerpt: string;
  liked: boolean;
  link?: string;
  ext: WebsiteExt;
  id: string;
  size: number;
  read: boolean;
  highlights: WebpageHighlight[];
  firstAddTime: number;
  createTime: number;
}

WebsiteExt

enum WebsiteExt {
  mhtml = "mhtml",
  webarchive = "webarchive",
  html = "html",
}

WebpagesList

interface WebpagesList {
  webpages: WebPage[];
}

WebpagesSearchOptions

interface WebpagesSearchOptions {
  q: string;

  liked?: boolean;

  read?: boolean;

  annotated?: boolean;

  host?: string | string[];

  ext?: WebsiteExt | WebsiteExt[];
  /**
   * @default 30
   */
  per_page?: number;
  /**
   * @default 1
   */
  page?: number;
}

WebpagesListOptions

interface WebpagesListOptions {
  liked?: boolean;
  read?: boolean;
  annotated?: boolean;
  host?: string | string[];
  ext?: WebsiteExt | WebsiteExt[];
  /**
   * @default 30
   */
  per_page?: number;
  /**
   * @default 1
   */
  page?: number;

  sort?:
    | "title_asc"
    | "title_desc"
    | "first_add_time_asc"
    | "first_add_time_desc"
    | "annotate_count_asc"
    | "annotate_count_desc";
}

PatchWebPageRequest

interface PatchWebPageRequest {
  excerpt?: string;

  title?: string;

  link?: string;

  liked?: boolean;

  read?: boolean;
}
Last Updated: