clean-jsdoc-theme TypeDoc APIv0.0.0

RestResource

interface RestResource<T, TCreate = Omit<T, 'id'>, TUpdate = Partial<TCreate>> { create: ApiEndpoint<TCreate, T, void, void>; delete: ApiEndpoint<void, void, { id: string }, void>; get: ApiEndpoint<void, T, { id: string }, void>; list: ApiEndpoint<void, T[], void, QueryParams<T>>; update: ApiEndpoint<TUpdate, T, { id: string }, void>; }

Source: api.ts:393

REST resource endpoints

Type Parameters

  • T — Resource type
  • TCreate = Omit<T, "id"> — Create input type
  • TUpdate = Partial<TCreate> — Update input type

Properties

create: ApiEndpoint<TCreate, T, void, void>

Create resource

delete: ApiEndpoint<void, void, { id: string }, void>

Delete resource

get: ApiEndpoint<void, T, { id: string }, void>

Get single resource

list: ApiEndpoint<void, T[], void, QueryParams<T>>

List resources

update: ApiEndpoint<TUpdate, T, { id: string }, void>

Update resource