summaryrefslogtreecommitdiff
path: root/packages/backend/src/models
diff options
context:
space:
mode:
Diffstat (limited to 'packages/backend/src/models')
-rw-r--r--packages/backend/src/models/schema/emoji.ts36
1 files changed, 31 insertions, 5 deletions
diff --git a/packages/backend/src/models/schema/emoji.ts b/packages/backend/src/models/schema/emoji.ts
index 143f25373c..c00c3dac1d 100644
--- a/packages/backend/src/models/schema/emoji.ts
+++ b/packages/backend/src/models/schema/emoji.ts
@@ -1,11 +1,37 @@
-export const packedEmojiSchema = {
+export const packedEmojiSimpleSchema = {
+ type: 'object',
+ properties: {
+ aliases: {
+ type: 'array',
+ optional: false, nullable: false,
+ items: {
+ type: 'string',
+ optional: false, nullable: false,
+ format: 'id',
+ },
+ },
+ name: {
+ type: 'string',
+ optional: false, nullable: false,
+ },
+ category: {
+ type: 'string',
+ optional: false, nullable: true,
+ },
+ url: {
+ type: 'string',
+ optional: false, nullable: false,
+ },
+ },
+} as const;
+
+export const packedEmojiDetailedSchema = {
type: 'object',
properties: {
id: {
type: 'string',
- optional: true, nullable: false,
+ optional: false, nullable: false,
format: 'id',
- example: 'xxxxxxxxxx',
},
aliases: {
type: 'array',
@@ -26,12 +52,12 @@ export const packedEmojiSchema = {
},
host: {
type: 'string',
- optional: true, nullable: true,
+ optional: false, nullable: true,
description: 'The local host is represented with `null`.',
},
url: {
type: 'string',
- optional: true, nullable: false,
+ optional: false, nullable: false,
},
},
} as const;