Options
All
  • Public
  • Public/Protected
  • All
Menu

Class FolderApi

目录相关 api

Hierarchy

  • FolderApi

Index

Constructors

constructor

Methods

create

  • create(param: RequiredField<Partial<FolderProperties>, "title">): Promise<FolderCreateRes>
  • Parameters

    • param: RequiredField<Partial<FolderProperties>, "title">

    Returns Promise<FolderCreateRes>

get

  • get(id: string): Promise<FolderGetRes>

list

  • list(): Promise<PageRes<FolderListRes>>
  • list<K>(pageParam: PageParam<FolderProperties> & FieldsParam<K>): Promise<PageRes<Pick<FolderProperties, K>>>
  • Returns Promise<PageRes<FolderListRes>>

  • Type parameters

    • K: keyof FolderProperties = "id" | "title" | "parent_id"

    Parameters

    • pageParam: PageParam<FolderProperties> & FieldsParam<K>

    Returns Promise<PageRes<Pick<FolderProperties, K>>>

listAll

  • listAll(): Promise<FolderListAllRes[]>
  • 使用特殊的 as_tree 参数来恢复旧的行为

    Returns Promise<FolderListAllRes[]>

notesByFolderId

  • notesByFolderId(id: string): Promise<NoteGetRes[]>
  • notesByFolderId<K>(id: string, fields: K[]): Promise<Pick<NoteProperties, K>[]>
  • Parameters

    • id: string

    Returns Promise<NoteGetRes[]>

  • Type parameters

    • K: keyof NoteProperties = "id" | "title" | "parent_id"

    Parameters

    • id: string
    • fields: K[]

    Returns Promise<Pick<NoteProperties, K>[]>

remove

  • remove(id: string): Promise<string>

update

  • update(param: RequiredField<Partial<FolderProperties>, "id">): Promise<FolderUpdateRes>
  • Parameters

    • param: RequiredField<Partial<FolderProperties>, "id">

    Returns Promise<FolderUpdateRes>

Generated using TypeDoc