From ef2d2d2af00300d56772b70133dced26f08dd241 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 7 Oct 2026 11:15:53 +0000 Subject: [PATCH] Document restricted sort options on documents.viewed The documents.viewed endpoint now sorts by the view record rather than the document, limiting the sort field to updatedAt or createdAt with a default of updatedAt and direction defaulting to DESC. Co-Authored-By: Claude Opus 4.8 Claude-Session: https://claude.ai/code/session_01DcHFf6NC3154BwgEXvEMRU --- spec3.json | 22 +++++++++++++++++++++- spec3.yml | 18 +++++++++++++++++- 2 files changed, 38 insertions(+), 2 deletions(-) diff --git a/spec3.json b/spec3.json index c2ab087..009637f 100644 --- a/spec3.json +++ b/spec3.json @@ -4167,7 +4167,27 @@ "$ref": "#/components/schemas/Pagination" }, { - "$ref": "#/components/schemas/Sorting" + "type": "object", + "properties": { + "sort": { + "type": "string", + "description": "The field to sort by. Note that sorting is by a column of the view record, not the document itself.", + "default": "updatedAt", + "enum": [ + "updatedAt", + "createdAt" + ] + }, + "direction": { + "type": "string", + "example": "DESC", + "default": "DESC", + "enum": [ + "ASC", + "DESC" + ] + } + } } ] } diff --git a/spec3.yml b/spec3.yml index 5607153..398d5e4 100644 --- a/spec3.yml +++ b/spec3.yml @@ -3013,7 +3013,23 @@ paths: schema: allOf: - "$ref": "#/components/schemas/Pagination" - - "$ref": "#/components/schemas/Sorting" + - type: object + properties: + sort: + type: string + description: The field to sort by. Note that sorting is by a + column of the view record, not the document itself. + default: updatedAt + enum: + - updatedAt + - createdAt + direction: + type: string + example: DESC + default: DESC + enum: + - ASC + - DESC responses: "200": description: OK