From feec3c302b893e28c4862fb44a7ad4455d30cf85 Mon Sep 17 00:00:00 2001 From: Mar0xy Date: Fri, 22 Sep 2023 21:05:42 +0200 Subject: upd: add backend for post editing --- .../backend/src/models/json-schema/note-edit.ts | 49 ++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 packages/backend/src/models/json-schema/note-edit.ts (limited to 'packages/backend/src/models/json-schema/note-edit.ts') diff --git a/packages/backend/src/models/json-schema/note-edit.ts b/packages/backend/src/models/json-schema/note-edit.ts new file mode 100644 index 0000000000..e877f3f946 --- /dev/null +++ b/packages/backend/src/models/json-schema/note-edit.ts @@ -0,0 +1,49 @@ +export const packedNoteEdit = { + type: "object", + properties: { + id: { + type: "string", + optional: false, + nullable: false, + format: "id", + example: "xxxxxxxxxx", + }, + updatedAt: { + type: "string", + optional: false, + nullable: false, + format: "date-time", + }, + note: { + type: "object", + optional: false, + nullable: false, + ref: "Note", + }, + noteId: { + type: "string", + optional: false, + nullable: false, + format: "id", + }, + text: { + type: "string", + optional: true, + nullable: true, + }, + cw: { + type: "string", + optional: true, + nullable: true, + }, + fileIds: { + type: "array", + optional: true, + nullable: true, + items: { + type: "string", + format: "id", + }, + }, + }, +} as const; -- cgit v1.2.3-freya