Options
All
  • Public
  • Public/Protected
  • All
Menu

Class NoteApi

TODO 可以考虑使用 fields() 方法设置然后产生一个新的 Api 实例

Hierarchy

  • NoteApi

Index

Constructors

constructor

Methods

create

  • create(param: RequiredField<Partial<NoteProperties>, "title">): Promise<NoteCreateRes>
  • Parameters

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

    Returns Promise<NoteCreateRes>

get

  • get(id: string): Promise<NoteGetRes & CommonType>
  • get<K>(id: string, fields?: K[]): Promise<Pick<NoteProperties, K> & CommonType>
  • Parameters

    • id: string

    Returns Promise<NoteGetRes & CommonType>

  • Type parameters

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

    Parameters

    • id: string
    • Optional fields: K[]

    Returns Promise<Pick<NoteProperties, K> & CommonType>

list

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

  • Type parameters

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

    Parameters

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

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

remove

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

resourcesById

  • resourcesById(id: string): Promise<ResourceGetRes[]>
  • resourcesById<K>(id: string, fields: K[]): Promise<(Pick<ResourceProperties, K> & CommonType)[]>
  • Parameters

    • id: string

    Returns Promise<ResourceGetRes[]>

  • Type parameters

    • K: keyof ResourceProperties = "id" | "title"

    Parameters

    • id: string
    • fields: K[]

    Returns Promise<(Pick<ResourceProperties, K> & CommonType)[]>

tagsById

  • tagsById(id: string): Promise<TagGetRes[]>

update

  • update(param: RequiredField<Partial<NoteProperties>, "id">): Promise<NoteUpdateRes>
  • Parameters

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

    Returns Promise<NoteUpdateRes>

Generated using TypeDoc