forked from FoundKeyGang/FoundKey
docs: fix schema definitions
This commit is contained in:
parent
68c0fa91bc
commit
5aa5344f2e
7 changed files with 44 additions and 3 deletions
|
@ -22,6 +22,7 @@ import { packedNoteReactionSchema } from '@/models/schema/note-reaction.js';
|
|||
import { packedHashtagSchema } from '@/models/schema/hashtag.js';
|
||||
import { packedPageSchema } from '@/models/schema/page.js';
|
||||
import { packedUserGroupSchema } from '@/models/schema/user-group.js';
|
||||
import { packedUserGroupInvitationSchema } from '@/models/schema/user-group-invitation.js';
|
||||
import { packedNoteFavoriteSchema } from '@/models/schema/note-favorite.js';
|
||||
import { packedChannelSchema } from '@/models/schema/channel.js';
|
||||
import { packedAntennaSchema } from '@/models/schema/antenna.js';
|
||||
|
@ -41,6 +42,7 @@ export const refs = {
|
|||
|
||||
UserList: packedUserListSchema,
|
||||
UserGroup: packedUserGroupSchema,
|
||||
UserGroupInvitation: packedUserGroupInvitationSchema,
|
||||
App: packedAppSchema,
|
||||
MessagingMessage: packedMessagingMessageSchema,
|
||||
Note: packedNoteSchema,
|
||||
|
|
|
@ -163,16 +163,20 @@ export const packedNoteSchema = {
|
|||
optional: false, nullable: false,
|
||||
},
|
||||
uri: {
|
||||
description: 'ActivityPub `id` of this Note',
|
||||
type: 'string',
|
||||
optional: true, nullable: false,
|
||||
},
|
||||
url: {
|
||||
description: 'URL to a presentation form intended for humans, if available',
|
||||
type: 'string',
|
||||
optional: true, nullable: false,
|
||||
},
|
||||
|
||||
myReaction: {
|
||||
type: 'object',
|
||||
description: 'Textual representation of the authenticated users reaction, if they reacted.',
|
||||
example: ':blobfox@.:',
|
||||
type: 'string',
|
||||
optional: true, nullable: true,
|
||||
},
|
||||
},
|
||||
|
|
|
@ -48,6 +48,7 @@ export const packedNotificationSchema = {
|
|||
},
|
||||
invitation: {
|
||||
type: 'object',
|
||||
ref: 'UserGroupInvitation',
|
||||
optional: true, nullable: true,
|
||||
},
|
||||
body: {
|
||||
|
|
16
packages/backend/src/models/schema/user-group-invitation.ts
Normal file
16
packages/backend/src/models/schema/user-group-invitation.ts
Normal file
|
@ -0,0 +1,16 @@
|
|||
export const packedUserGroupInvitationSchema = {
|
||||
type: 'object',
|
||||
properties: {
|
||||
id: {
|
||||
type: 'string',
|
||||
optional: false, nullable: false,
|
||||
format: 'id',
|
||||
example: 'xxxxxxxxxx',
|
||||
},
|
||||
group: {
|
||||
type: 'object',
|
||||
optional: false, nullable: false,
|
||||
ref: 'UserGroup',
|
||||
},
|
||||
},
|
||||
} as const;
|
|
@ -403,6 +403,24 @@ export const packedMeDetailedOnlySchema = {
|
|||
items: {
|
||||
type: 'object',
|
||||
nullable: false, optional: false,
|
||||
properties: {
|
||||
id: {
|
||||
type: 'string',
|
||||
optional: false,
|
||||
nullable: false,
|
||||
},
|
||||
name: {
|
||||
type: 'string',
|
||||
optional: false,
|
||||
nullable: false,
|
||||
},
|
||||
lastUsed: {
|
||||
type: 'string',
|
||||
optional: false,
|
||||
nullable: false,
|
||||
example: '1970-01-01T00:00:00Z',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
//#endregion
|
||||
|
|
|
@ -52,7 +52,7 @@ export const meta = {
|
|||
},
|
||||
bannerUrl: {
|
||||
type: 'string',
|
||||
optional: false, nullable: false,
|
||||
optional: false, nullable: true,
|
||||
},
|
||||
iconUrl: {
|
||||
type: 'string',
|
||||
|
|
|
@ -114,7 +114,7 @@ export const meta = {
|
|||
},
|
||||
bannerUrl: {
|
||||
type: 'string',
|
||||
optional: false, nullable: false,
|
||||
optional: false, nullable: true,
|
||||
},
|
||||
iconUrl: {
|
||||
type: 'string',
|
||||
|
|
Loading…
Reference in a new issue