Skip to content

SuggestionEndpoints

reference
1 min readUpdated

Kind: Class

Source: atloria-monorepo/packages/api-client/src/endpoints/suggestions.ts

Suggestion endpoints

All routes are nested under the owning document (/documents/:documentId/suggestions/...) to match the API's SuggestionController — the old flat /suggestions/:id paths never existed server-side.

Methods

MethodSignatureReturns
listlist(documentId: string, params: Omit<SuggestionListParams, 'documentId'>)Promise<SuggestionWithUser[]>
getget(documentId: string, suggestionId: string)Promise<SuggestionWithUser>
createcreate(documentId: string, dto: CreateSuggestionDto)Promise<SuggestionWithUser>
updateupdate(suggestionId: string, dto: UpdateSuggestionDto)Promise<SuggestionWithUser>
deletedelete(documentId: string, suggestionId: string)Promise<void>
acceptaccept(documentId: string, suggestionId: string, reviewComment: string)Promise<SuggestionWithUser>
rejectreject(documentId: string, suggestionId: string, reviewComment: string)Promise<SuggestionWithUser>

Was this page helpful?

Download as PDF