summaryrefslogtreecommitdiff
path: root/packages/backend/src/models/json-schema/note-edit.ts
diff options
context:
space:
mode:
authorMar0xy <marie@kaifa.ch>2023-09-22 21:05:42 +0200
committerMar0xy <marie@kaifa.ch>2023-09-22 21:05:42 +0200
commitfeec3c302b893e28c4862fb44a7ad4455d30cf85 (patch)
tree860d2a153171b8a65aa1d00cd856370e1aee1451 /packages/backend/src/models/json-schema/note-edit.ts
parentmerge: develop branch (diff)
downloadsharkey-feec3c302b893e28c4862fb44a7ad4455d30cf85.tar.gz
sharkey-feec3c302b893e28c4862fb44a7ad4455d30cf85.tar.bz2
sharkey-feec3c302b893e28c4862fb44a7ad4455d30cf85.zip
upd: add backend for post editing
Diffstat (limited to 'packages/backend/src/models/json-schema/note-edit.ts')
-rw-r--r--packages/backend/src/models/json-schema/note-edit.ts49
1 files changed, 49 insertions, 0 deletions
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;