This commit is contained in:
tamaina
2021-09-06 03:26:19 +09:00
parent 7ab97004d9
commit c86ac1c6ec
15 changed files with 84 additions and 84 deletions

View File

@@ -53,7 +53,7 @@ export const packedClipSchema = {
},
user: {
type: 'object' as const,
ref: 'User',
ref: 'User' as const,
optional: false as const, nullable: false as const,
},
name: {

View File

@@ -234,7 +234,7 @@ export const packedDriveFileSchema = {
folder: {
type: 'object' as const,
optional: true as const, nullable: true as const,
ref: 'DriveFolder'
ref: 'DriveFolder' as const,
},
userId: {
type: 'string' as const,
@@ -245,7 +245,7 @@ export const packedDriveFileSchema = {
user: {
type: 'object' as const,
optional: true as const, nullable: true as const,
ref: 'User'
ref: 'User' as const,
}
},
};

View File

@@ -87,7 +87,7 @@ export const packedDriveFolderSchema = {
parent: {
type: 'object' as const,
optional: true as const, nullable: true as const,
ref: 'DriveFolder'
ref: 'DriveFolder' as const,
},
},
};

View File

@@ -110,7 +110,7 @@ export const packedFollowingSchema = {
followee: {
type: 'object' as const,
optional: true as const, nullable: false as const,
ref: 'User',
ref: 'User' as const,
},
followerId: {
type: 'string' as const,
@@ -120,7 +120,7 @@ export const packedFollowingSchema = {
follower: {
type: 'object' as const,
optional: true as const, nullable: false as const,
ref: 'User',
ref: 'User' as const,
},
}
};

View File

@@ -1,6 +1,6 @@
import { EntityRepository, Repository } from 'typeorm';
import { GalleryPost } from '@/models/entities/gallery-post';
import { SchemaType } from '../../misc/schema';
import { SchemaType } from '@/misc/schema';
import { Users, DriveFiles, GalleryLikes } from '../index';
import { awaitAll } from '@/prelude/await-all';
import { User } from '@/models/entities/user';
@@ -76,7 +76,7 @@ export const packedGalleryPostSchema = {
},
user: {
type: 'object' as const,
ref: 'User',
ref: 'User' as const,
optional: false as const, nullable: false as const,
},
fileIds: {
@@ -94,7 +94,7 @@ export const packedGalleryPostSchema = {
items: {
type: 'object' as const,
optional: false as const, nullable: false as const,
ref: 'DriveFile'
ref: 'DriveFile' as const,
}
},
tags: {

View File

@@ -67,7 +67,7 @@ export const packedMessagingMessageSchema = {
},
user: {
type: 'object' as const,
ref: 'User',
ref: 'User' as const,
optional: true as const, nullable: false as const,
},
text: {
@@ -82,7 +82,7 @@ export const packedMessagingMessageSchema = {
file: {
type: 'object' as const,
optional: true as const, nullable: true as const,
ref: 'DriveFile',
ref: 'DriveFile' as const,
},
recipientId: {
type: 'string' as const,
@@ -92,7 +92,7 @@ export const packedMessagingMessageSchema = {
recipient: {
type: 'object' as const,
optional: true as const, nullable: true as const,
ref: 'User'
ref: 'User' as const,
},
groupId: {
type: 'string' as const,
@@ -102,7 +102,7 @@ export const packedMessagingMessageSchema = {
group: {
type: 'object' as const,
optional: true as const, nullable: true as const,
ref: 'UserGroup'
ref: 'UserGroup' as const,
},
isRead: {
type: 'boolean' as const,

View File

@@ -56,7 +56,7 @@ export const packedMutingSchema = {
mutee: {
type: 'object' as const,
optional: false as const, nullable: false as const,
ref: 'User',
ref: 'User' as const,
},
}
};

View File

@@ -45,7 +45,7 @@ export const packedNoteFavoriteSchema = {
note: {
type: 'object' as const,
optional: false as const, nullable: false as const,
ref: 'Note',
ref: 'Note' as const,
},
noteId: {
type: 'string' as const,

View File

@@ -42,7 +42,7 @@ export const packedNoteReactionSchema = {
user: {
type: 'object' as const,
optional: false as const, nullable: false as const,
ref: 'User',
ref: 'User' as const,
},
type: {
type: 'string' as const,

View File

@@ -3,7 +3,7 @@ import * as mfm from 'mfm-js';
import { Note } from '@/models/entities/note';
import { User } from '@/models/entities/user';
import { Users, PollVotes, DriveFiles, NoteReactions, Followings, Polls, Channels } from '../index';
import { SchemaType } from '@/misc/schema';
import { Schema, SchemaType } from '@/misc/schema';
import { nyaize } from '@/misc/nyaize';
import { awaitAll } from '@/prelude/await-all';
import { convertLegacyReaction, convertLegacyReactions, decodeReaction } from '@/misc/reaction-lib';
@@ -353,7 +353,7 @@ export const packedNoteSchema = {
},
user: {
type: 'object' as const,
ref: 'User',
ref: 'User' as const,
optional: false as const, nullable: false as const,
},
replyId: {
@@ -371,12 +371,12 @@ export const packedNoteSchema = {
reply: {
type: 'object' as const,
optional: true as const, nullable: true as const,
ref: 'Note'
ref: 'Note' as const,
},
renote: {
type: 'object' as const,
optional: true as const, nullable: true as const,
ref: 'Note'
ref: 'Note' as const,
},
viaMobile: {
type: 'boolean' as const,
@@ -423,7 +423,7 @@ export const packedNoteSchema = {
items: {
type: 'object' as const,
optional: false as const, nullable: false as const,
ref: 'DriveFile'
ref: 'DriveFile' as const,
}
},
tags: {
@@ -447,7 +447,7 @@ export const packedNoteSchema = {
channel: {
type: 'object' as const,
optional: true as const, nullable: true as const,
ref: 'Channel'
ref: 'Channel' as const,
},
localOnly: {
type: 'boolean' as const,

View File

@@ -136,7 +136,7 @@ export const packedNotificationSchema = {
},
user: {
type: 'object' as const,
ref: 'User',
ref: 'User' as const,
optional: true as const, nullable: true as const,
},
userId: {
@@ -159,7 +159,6 @@ export const packedNotificationSchema = {
},
invitation: {
type: 'object' as const,
ref: 'Note',
optional: true as const, nullable: true as const,
},
body: {

View File

@@ -137,7 +137,7 @@ export const packedPageSchema = {
},
user: {
type: 'object' as const,
ref: 'User',
ref: 'User' as const,
optional: false as const, nullable: false as const,
},
}

View File

@@ -520,7 +520,7 @@ export const packedUserSchema = {
items: {
type: 'object' as const,
nullable: false as const, optional: false as const,
ref: 'Note'
ref: 'Note' as const,
}
},
pinnedPageId: {
@@ -530,7 +530,7 @@ export const packedUserSchema = {
pinnedPage: {
type: 'object' as const,
nullable: true as const, optional: false as const,
ref: 'Page'
ref: 'Page' as const,
},
twoFactorEnabled: {
type: 'boolean' as const,