Threads hooks

Hand-written shim. Generated CRUD hooks via ./threads.gen. useMarkThreadRead stays hand-written (custom op).

Hooks

useCreateThread mutation

Create a thread.

TypeScript
useCreateThread(options?: MutationOpts<Thread, CreateThreadParams>)

Types: Thread · CreateThreadParams

useDeleteThread mutation

Delete a thread.

TypeScript
useDeleteThread(options?: MutationOpts<SuccessResponse, string>)

Types: SuccessResponse

useListThreads query

List threads.

TypeScript
useListThreads(params?: Omit<ListThreadsParams, | > & { filter?: ThreadFilter; orderBy?: ThreadOrderBy[]; } & ThreadShorthands, options?: QueryOpts<Page<Thread>>)

Types: ListThreadsParams · ThreadFilter · ThreadOrderBy · ThreadShorthands · Page · Thread

useMarkThreadRead composite

TypeScript
useMarkThreadRead(options?: MutationOpts<Thread, MarkThreadReadParams>)

Types: Thread · MarkThreadReadParams

usePurgeThread composite

Permanently delete a soft-deleted thread.

TypeScript
usePurgeThread(options?: MutationOpts<SuccessResponse, PurgeThreadParams>)

Types: SuccessResponse · PurgeThreadParams

useRestoreThread composite

Restore a thread.

TypeScript
useRestoreThread(options?: MutationOpts<Thread, string>)

Types: Thread

useRetrieveThread query

Get a thread by ID.

TypeScript
useRetrieveThread(id: string, options?: QueryOpts<Thread>)

Types: Thread

useUpdateThread mutation

Update a thread.

TypeScript
useUpdateThread(options?: MutationOpts<Thread, UpdateThreadParams>)

Types: Thread · UpdateThreadParams