forked from FoundKeyGang/FoundKey
parent
6b897e562a
commit
952789cc1e
102 changed files with 853 additions and 966 deletions
|
@ -226,7 +226,7 @@
|
|||
"tslint": "5.15.0",
|
||||
"tslint-sonarts": "1.9.0",
|
||||
"typeorm": "0.2.16-rc.1",
|
||||
"typescript": "3.3.3333",
|
||||
"typescript": "3.5.2",
|
||||
"typescript-eslint-parser": "22.0.0",
|
||||
"uglify-es": "3.3.9",
|
||||
"ulid": "2.3.0",
|
||||
|
|
|
@ -1,17 +1,3 @@
|
|||
export const types = {
|
||||
boolean: 'boolean' as 'boolean',
|
||||
string: 'string' as 'string',
|
||||
number: 'number' as 'number',
|
||||
array: 'array' as 'array',
|
||||
object: 'object' as 'object',
|
||||
any: 'any' as 'any',
|
||||
};
|
||||
|
||||
export const bool = {
|
||||
true: true as true,
|
||||
false: false as false,
|
||||
};
|
||||
|
||||
export type Schema = {
|
||||
type: 'boolean' | 'number' | 'string' | 'array' | 'object' | 'any';
|
||||
nullable: boolean;
|
||||
|
|
|
@ -2,7 +2,7 @@ import { EntityRepository, Repository } from 'typeorm';
|
|||
import { App } from '../entities/app';
|
||||
import { AccessTokens } from '..';
|
||||
import { ensure } from '../../prelude/ensure';
|
||||
import { types, bool, SchemaType } from '../../misc/schema';
|
||||
import { SchemaType } from '../../misc/schema';
|
||||
|
||||
export type PackedApp = SchemaType<typeof packedAppSchema>;
|
||||
|
||||
|
@ -42,37 +42,37 @@ export class AppRepository extends Repository<App> {
|
|||
}
|
||||
|
||||
export const packedAppSchema = {
|
||||
type: types.object,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
properties: {
|
||||
id: {
|
||||
type: types.string,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
format: 'id',
|
||||
description: 'The unique identifier for this Note.',
|
||||
example: 'xxxxxxxxxx',
|
||||
},
|
||||
name: {
|
||||
type: types.string,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: 'アプリケーションの名前'
|
||||
},
|
||||
callbackUrl: {
|
||||
type: types.string,
|
||||
optional: bool.false, nullable: bool.true,
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: true as const,
|
||||
description: 'コールバックするURL'
|
||||
},
|
||||
permission: {
|
||||
type: types.array,
|
||||
optional: bool.true, nullable: bool.false,
|
||||
type: 'array' as const,
|
||||
optional: true as const, nullable: false as const,
|
||||
items: {
|
||||
type: types.string,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
}
|
||||
},
|
||||
secret: {
|
||||
type: types.string,
|
||||
optional: bool.true, nullable: bool.false,
|
||||
type: 'string' as const,
|
||||
optional: true as const, nullable: false as const,
|
||||
description: 'アプリケーションのシークレットキー'
|
||||
}
|
||||
},
|
||||
|
|
|
@ -3,7 +3,7 @@ import { Users } from '..';
|
|||
import { Blocking } from '../entities/blocking';
|
||||
import { ensure } from '../../prelude/ensure';
|
||||
import { awaitAll } from '../../prelude/await-all';
|
||||
import { SchemaType, types, bool } from '../../misc/schema';
|
||||
import { SchemaType } from '../../misc/schema';
|
||||
|
||||
export type PackedBlocking = SchemaType<typeof packedBlockingSchema>;
|
||||
|
||||
|
@ -34,30 +34,30 @@ export class BlockingRepository extends Repository<Blocking> {
|
|||
}
|
||||
|
||||
export const packedBlockingSchema = {
|
||||
type: types.object,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
properties: {
|
||||
id: {
|
||||
type: types.string,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
format: 'id',
|
||||
description: 'The unique identifier for this blocking.',
|
||||
example: 'xxxxxxxxxx',
|
||||
},
|
||||
createdAt: {
|
||||
type: types.string,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
format: 'date-time',
|
||||
description: 'The date that the blocking was created.'
|
||||
},
|
||||
blockeeId: {
|
||||
type: types.string,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
format: 'id',
|
||||
},
|
||||
blockee: {
|
||||
type: types.object,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
ref: 'User',
|
||||
description: 'The blockee.'
|
||||
},
|
||||
|
|
|
@ -5,7 +5,7 @@ import { User } from '../entities/user';
|
|||
import { toPuny } from '../../misc/convert-host';
|
||||
import { ensure } from '../../prelude/ensure';
|
||||
import { awaitAll } from '../../prelude/await-all';
|
||||
import { types, bool, SchemaType } from '../../misc/schema';
|
||||
import { SchemaType } from '../../misc/schema';
|
||||
|
||||
export type PackedDriveFile = SchemaType<typeof packedDriveFileSchema>;
|
||||
|
||||
|
@ -114,63 +114,63 @@ export class DriveFileRepository extends Repository<DriveFile> {
|
|||
}
|
||||
|
||||
export const packedDriveFileSchema = {
|
||||
type: types.object,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
properties: {
|
||||
id: {
|
||||
type: types.string,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
format: 'id',
|
||||
description: 'The unique identifier for this Drive file.',
|
||||
example: 'xxxxxxxxxx',
|
||||
},
|
||||
createdAt: {
|
||||
type: types.string,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
format: 'date-time',
|
||||
description: 'The date that the Drive file was created on Misskey.'
|
||||
},
|
||||
name: {
|
||||
type: types.string,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: 'The file name with extension.',
|
||||
example: 'lenna.jpg'
|
||||
},
|
||||
type: {
|
||||
type: types.string,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: 'The MIME type of this Drive file.',
|
||||
example: 'image/jpeg'
|
||||
},
|
||||
md5: {
|
||||
type: types.string,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
format: 'md5',
|
||||
description: 'The MD5 hash of this Drive file.',
|
||||
example: '15eca7fba0480996e2245f5185bf39f2'
|
||||
},
|
||||
size: {
|
||||
type: types.number,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'number' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: 'The size of this Drive file. (bytes)',
|
||||
example: 51469
|
||||
},
|
||||
url: {
|
||||
type: types.string,
|
||||
optional: bool.false, nullable: bool.true,
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: true as const,
|
||||
format: 'url',
|
||||
description: 'The URL of this Drive file.',
|
||||
},
|
||||
folderId: {
|
||||
type: types.string,
|
||||
optional: bool.false, nullable: bool.true,
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: true as const,
|
||||
format: 'id',
|
||||
description: 'The parent folder ID of this Drive file.',
|
||||
example: 'xxxxxxxxxx',
|
||||
},
|
||||
isSensitive: {
|
||||
type: types.boolean,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'boolean' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: 'Whether this Drive file is sensitive.',
|
||||
},
|
||||
},
|
||||
|
|
|
@ -3,7 +3,7 @@ import { DriveFolders, DriveFiles } from '..';
|
|||
import { DriveFolder } from '../entities/drive-folder';
|
||||
import { ensure } from '../../prelude/ensure';
|
||||
import { awaitAll } from '../../prelude/await-all';
|
||||
import { SchemaType, types, bool } from '../../misc/schema';
|
||||
import { SchemaType } from '../../misc/schema';
|
||||
|
||||
export type PackedDriveFolder = SchemaType<typeof packedDriveFolderSchema>;
|
||||
|
||||
|
@ -53,47 +53,47 @@ export class DriveFolderRepository extends Repository<DriveFolder> {
|
|||
}
|
||||
|
||||
export const packedDriveFolderSchema = {
|
||||
type: types.object,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
properties: {
|
||||
id: {
|
||||
type: types.string,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
format: 'id',
|
||||
description: 'The unique identifier for this Drive folder.',
|
||||
example: 'xxxxxxxxxx',
|
||||
},
|
||||
createdAt: {
|
||||
type: types.string,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
format: 'date-time',
|
||||
description: 'The date that the Drive folder was created.'
|
||||
},
|
||||
name: {
|
||||
type: types.string,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: 'The folder name.',
|
||||
},
|
||||
foldersCount: {
|
||||
type: types.number,
|
||||
optional: bool.true, nullable: bool.false,
|
||||
type: 'number' as const,
|
||||
optional: true as const, nullable: false as const,
|
||||
description: 'The count of child folders.',
|
||||
},
|
||||
filesCount: {
|
||||
type: types.number,
|
||||
optional: bool.true, nullable: bool.false,
|
||||
type: 'number' as const,
|
||||
optional: true as const, nullable: false as const,
|
||||
description: 'The count of child files.',
|
||||
},
|
||||
parentId: {
|
||||
type: types.string,
|
||||
optional: bool.false, nullable: bool.true,
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: true as const,
|
||||
format: 'id',
|
||||
description: 'The parent folder ID of this folder.',
|
||||
example: 'xxxxxxxxxx',
|
||||
},
|
||||
parent: {
|
||||
type: types.object,
|
||||
optional: bool.true, nullable: bool.true,
|
||||
type: 'object' as const,
|
||||
optional: true as const, nullable: true as const,
|
||||
ref: 'DriveFolder'
|
||||
},
|
||||
},
|
||||
|
|
|
@ -3,7 +3,7 @@ import { Users } from '..';
|
|||
import { Following } from '../entities/following';
|
||||
import { ensure } from '../../prelude/ensure';
|
||||
import { awaitAll } from '../../prelude/await-all';
|
||||
import { SchemaType, types, bool } from '../../misc/schema';
|
||||
import { SchemaType } from '../../misc/schema';
|
||||
|
||||
type LocalFollowerFollowing = Following & {
|
||||
followerHost: null;
|
||||
|
@ -88,41 +88,41 @@ export class FollowingRepository extends Repository<Following> {
|
|||
}
|
||||
|
||||
export const packedFollowingSchema = {
|
||||
type: types.object,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
properties: {
|
||||
id: {
|
||||
type: types.string,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
format: 'id',
|
||||
description: 'The unique identifier for this following.',
|
||||
example: 'xxxxxxxxxx',
|
||||
},
|
||||
createdAt: {
|
||||
type: types.string,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
format: 'date-time',
|
||||
description: 'The date that the following was created.'
|
||||
},
|
||||
followeeId: {
|
||||
type: types.string,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
format: 'id',
|
||||
},
|
||||
followee: {
|
||||
type: types.object,
|
||||
optional: bool.true, nullable: bool.false,
|
||||
type: 'object' as const,
|
||||
optional: true as const, nullable: false as const,
|
||||
ref: 'User',
|
||||
description: 'The followee.'
|
||||
},
|
||||
followerId: {
|
||||
type: types.string,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
format: 'id',
|
||||
},
|
||||
follower: {
|
||||
type: types.object,
|
||||
optional: bool.true, nullable: bool.false,
|
||||
type: 'object' as const,
|
||||
optional: true as const, nullable: false as const,
|
||||
ref: 'User',
|
||||
description: 'The follower.'
|
||||
},
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { EntityRepository, Repository } from 'typeorm';
|
||||
import { Hashtag } from '../entities/hashtag';
|
||||
import { SchemaType, types, bool } from '../../misc/schema';
|
||||
import { SchemaType } from '../../misc/schema';
|
||||
|
||||
export type PackedHashtag = SchemaType<typeof packedHashtagSchema>;
|
||||
|
||||
|
@ -28,43 +28,43 @@ export class HashtagRepository extends Repository<Hashtag> {
|
|||
}
|
||||
|
||||
export const packedHashtagSchema = {
|
||||
type: types.object,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
properties: {
|
||||
tag: {
|
||||
type: types.string,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: 'The hashtag name. No # prefixed.',
|
||||
example: 'misskey',
|
||||
},
|
||||
mentionedUsersCount: {
|
||||
type: types.number,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'number' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: 'Number of all users using this hashtag.'
|
||||
},
|
||||
mentionedLocalUsersCount: {
|
||||
type: types.number,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'number' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: 'Number of local users using this hashtag.'
|
||||
},
|
||||
mentionedRemoteUsersCount: {
|
||||
type: types.number,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'number' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: 'Number of remote users using this hashtag.'
|
||||
},
|
||||
attachedUsersCount: {
|
||||
type: types.number,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'number' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: 'Number of all users who attached this hashtag to profile.'
|
||||
},
|
||||
attachedLocalUsersCount: {
|
||||
type: types.number,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'number' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: 'Number of local users who attached this hashtag to profile.'
|
||||
},
|
||||
attachedRemoteUsersCount: {
|
||||
type: types.number,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'number' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: 'Number of remote users who attached this hashtag to profile.'
|
||||
},
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@ import { EntityRepository, Repository } from 'typeorm';
|
|||
import { MessagingMessage } from '../entities/messaging-message';
|
||||
import { Users, DriveFiles, UserGroups } from '..';
|
||||
import { ensure } from '../../prelude/ensure';
|
||||
import { types, bool, SchemaType } from '../../misc/schema';
|
||||
import { SchemaType } from '../../misc/schema';
|
||||
|
||||
export type PackedMessagingMessage = SchemaType<typeof packedMessagingMessageSchema>;
|
||||
|
||||
|
@ -46,76 +46,76 @@ export class MessagingMessageRepository extends Repository<MessagingMessage> {
|
|||
}
|
||||
|
||||
export const packedMessagingMessageSchema = {
|
||||
type: types.object,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
properties: {
|
||||
id: {
|
||||
type: types.string,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
format: 'id',
|
||||
description: 'The unique identifier for this MessagingMessage.',
|
||||
example: 'xxxxxxxxxx',
|
||||
},
|
||||
createdAt: {
|
||||
type: types.string,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
format: 'date-time',
|
||||
description: 'The date that the MessagingMessage was created.'
|
||||
},
|
||||
userId: {
|
||||
type: types.string,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
format: 'id',
|
||||
},
|
||||
user: {
|
||||
type: types.object,
|
||||
type: 'object' as const,
|
||||
ref: 'User',
|
||||
optional: bool.true, nullable: bool.false,
|
||||
optional: true as const, nullable: false as const,
|
||||
},
|
||||
text: {
|
||||
type: types.string,
|
||||
optional: bool.false, nullable: bool.true,
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: true as const,
|
||||
},
|
||||
fileId: {
|
||||
type: types.string,
|
||||
optional: bool.true, nullable: bool.true,
|
||||
type: 'string' as const,
|
||||
optional: true as const, nullable: true as const,
|
||||
format: 'id',
|
||||
},
|
||||
file: {
|
||||
type: types.object,
|
||||
optional: bool.true, nullable: bool.true,
|
||||
type: 'object' as const,
|
||||
optional: true as const, nullable: true as const,
|
||||
ref: 'DriveFile',
|
||||
},
|
||||
recipientId: {
|
||||
type: types.string,
|
||||
optional: bool.false, nullable: bool.true,
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: true as const,
|
||||
format: 'id',
|
||||
},
|
||||
recipient: {
|
||||
type: types.object,
|
||||
optional: bool.true, nullable: bool.true,
|
||||
type: 'object' as const,
|
||||
optional: true as const, nullable: true as const,
|
||||
ref: 'User'
|
||||
},
|
||||
groupId: {
|
||||
type: types.string,
|
||||
optional: bool.false, nullable: bool.true,
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: true as const,
|
||||
format: 'id',
|
||||
},
|
||||
group: {
|
||||
type: types.object,
|
||||
optional: bool.true, nullable: bool.true,
|
||||
type: 'object' as const,
|
||||
optional: true as const, nullable: true as const,
|
||||
ref: 'UserGroup'
|
||||
},
|
||||
isRead: {
|
||||
type: types.boolean,
|
||||
optional: bool.true, nullable: bool.false,
|
||||
type: 'boolean' as const,
|
||||
optional: true as const, nullable: false as const,
|
||||
},
|
||||
reads: {
|
||||
type: types.array,
|
||||
optional: bool.true, nullable: bool.false,
|
||||
type: 'array' as const,
|
||||
optional: true as const, nullable: false as const,
|
||||
items: {
|
||||
type: types.string,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
format: 'id'
|
||||
}
|
||||
},
|
||||
|
|
|
@ -3,7 +3,7 @@ import { Users } from '..';
|
|||
import { Muting } from '../entities/muting';
|
||||
import { ensure } from '../../prelude/ensure';
|
||||
import { awaitAll } from '../../prelude/await-all';
|
||||
import { types, bool, SchemaType } from '../../misc/schema';
|
||||
import { SchemaType } from '../../misc/schema';
|
||||
|
||||
export type PackedMuting = SchemaType<typeof packedMutingSchema>;
|
||||
|
||||
|
@ -34,30 +34,30 @@ export class MutingRepository extends Repository<Muting> {
|
|||
}
|
||||
|
||||
export const packedMutingSchema = {
|
||||
type: types.object,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
properties: {
|
||||
id: {
|
||||
type: types.string,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
format: 'id',
|
||||
description: 'The unique identifier for this muting.',
|
||||
example: 'xxxxxxxxxx',
|
||||
},
|
||||
createdAt: {
|
||||
type: types.string,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
format: 'date-time',
|
||||
description: 'The date that the muting was created.'
|
||||
},
|
||||
muteeId: {
|
||||
type: types.string,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
format: 'id',
|
||||
},
|
||||
mutee: {
|
||||
type: types.object,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
ref: 'User',
|
||||
description: 'The mutee.'
|
||||
},
|
||||
|
|
|
@ -2,7 +2,6 @@ import { EntityRepository, Repository } from 'typeorm';
|
|||
import { NoteFavorite } from '../entities/note-favorite';
|
||||
import { Notes } from '..';
|
||||
import { ensure } from '../../prelude/ensure';
|
||||
import { types, bool } from '../../misc/schema';
|
||||
|
||||
@EntityRepository(NoteFavorite)
|
||||
export class NoteFavoriteRepository extends Repository<NoteFavorite> {
|
||||
|
@ -29,30 +28,30 @@ export class NoteFavoriteRepository extends Repository<NoteFavorite> {
|
|||
}
|
||||
|
||||
export const packedNoteFavoriteSchema = {
|
||||
type: types.object,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
properties: {
|
||||
id: {
|
||||
type: types.string,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
format: 'id',
|
||||
description: 'The unique identifier for this favorite.',
|
||||
example: 'xxxxxxxxxx',
|
||||
},
|
||||
createdAt: {
|
||||
type: types.string,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
format: 'date-time',
|
||||
description: 'The date that the favorite was created.'
|
||||
},
|
||||
note: {
|
||||
type: types.object,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
ref: 'Note',
|
||||
},
|
||||
noteId: {
|
||||
type: types.string,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
format: 'id',
|
||||
},
|
||||
},
|
||||
|
|
|
@ -2,7 +2,7 @@ import { EntityRepository, Repository } from 'typeorm';
|
|||
import { NoteReaction } from '../entities/note-reaction';
|
||||
import { Users } from '..';
|
||||
import { ensure } from '../../prelude/ensure';
|
||||
import { types, bool, SchemaType } from '../../misc/schema';
|
||||
import { SchemaType } from '../../misc/schema';
|
||||
|
||||
export type PackedNoteReaction = SchemaType<typeof packedNoteReactionSchema>;
|
||||
|
||||
|
@ -24,31 +24,31 @@ export class NoteReactionRepository extends Repository<NoteReaction> {
|
|||
}
|
||||
|
||||
export const packedNoteReactionSchema = {
|
||||
type: types.object,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
properties: {
|
||||
id: {
|
||||
type: types.string,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
format: 'id',
|
||||
description: 'The unique identifier for this reaction.',
|
||||
example: 'xxxxxxxxxx',
|
||||
},
|
||||
createdAt: {
|
||||
type: types.string,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
format: 'date-time',
|
||||
description: 'The date that the reaction was created.'
|
||||
},
|
||||
user: {
|
||||
type: types.object,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
ref: 'User',
|
||||
description: 'User who performed this reaction.'
|
||||
},
|
||||
type: {
|
||||
type: types.string,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: 'The reaction type.'
|
||||
},
|
||||
},
|
||||
|
|
|
@ -5,7 +5,7 @@ import { unique, concat } from '../../prelude/array';
|
|||
import { nyaize } from '../../misc/nyaize';
|
||||
import { Emojis, Users, Apps, PollVotes, DriveFiles, NoteReactions, Followings, Polls } from '..';
|
||||
import { ensure } from '../../prelude/ensure';
|
||||
import { SchemaType, types, bool } from '../../misc/schema';
|
||||
import { SchemaType } from '../../misc/schema';
|
||||
import { awaitAll } from '../../prelude/await-all';
|
||||
|
||||
export type PackedNote = SchemaType<typeof packedNoteSchema>;
|
||||
|
@ -218,125 +218,125 @@ export class NoteRepository extends Repository<Note> {
|
|||
}
|
||||
|
||||
export const packedNoteSchema = {
|
||||
type: types.object,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
properties: {
|
||||
id: {
|
||||
type: types.string,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
format: 'id',
|
||||
description: 'The unique identifier for this Note.',
|
||||
example: 'xxxxxxxxxx',
|
||||
},
|
||||
createdAt: {
|
||||
type: types.string,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
format: 'date-time',
|
||||
description: 'The date that the Note was created on Misskey.'
|
||||
},
|
||||
text: {
|
||||
type: types.string,
|
||||
optional: bool.false, nullable: bool.true,
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: true as const,
|
||||
},
|
||||
cw: {
|
||||
type: types.string,
|
||||
optional: bool.true, nullable: bool.true,
|
||||
type: 'string' as const,
|
||||
optional: true as const, nullable: true as const,
|
||||
},
|
||||
userId: {
|
||||
type: types.string,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
format: 'id',
|
||||
},
|
||||
user: {
|
||||
type: types.object,
|
||||
type: 'object' as const,
|
||||
ref: 'User',
|
||||
optional: bool.false, nullable: bool.false,
|
||||
optional: false as const, nullable: false as const,
|
||||
},
|
||||
replyId: {
|
||||
type: types.string,
|
||||
optional: bool.true, nullable: bool.true,
|
||||
type: 'string' as const,
|
||||
optional: true as const, nullable: true as const,
|
||||
format: 'id',
|
||||
example: 'xxxxxxxxxx',
|
||||
},
|
||||
renoteId: {
|
||||
type: types.string,
|
||||
optional: bool.true, nullable: bool.true,
|
||||
type: 'string' as const,
|
||||
optional: true as const, nullable: true as const,
|
||||
format: 'id',
|
||||
example: 'xxxxxxxxxx',
|
||||
},
|
||||
reply: {
|
||||
type: types.object,
|
||||
optional: bool.true, nullable: bool.true,
|
||||
type: 'object' as const,
|
||||
optional: true as const, nullable: true as const,
|
||||
ref: 'Note'
|
||||
},
|
||||
renote: {
|
||||
type: types.object,
|
||||
optional: bool.true, nullable: bool.true,
|
||||
type: 'object' as const,
|
||||
optional: true as const, nullable: true as const,
|
||||
ref: 'Note'
|
||||
},
|
||||
viaMobile: {
|
||||
type: types.boolean,
|
||||
optional: bool.true, nullable: bool.false,
|
||||
type: 'boolean' as const,
|
||||
optional: true as const, nullable: false as const,
|
||||
},
|
||||
isHidden: {
|
||||
type: types.boolean,
|
||||
optional: bool.true, nullable: bool.false,
|
||||
type: 'boolean' as const,
|
||||
optional: true as const, nullable: false as const,
|
||||
},
|
||||
visibility: {
|
||||
type: types.string,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
},
|
||||
mentions: {
|
||||
type: types.array,
|
||||
optional: bool.true, nullable: bool.false,
|
||||
type: 'array' as const,
|
||||
optional: true as const, nullable: false as const,
|
||||
items: {
|
||||
type: types.string,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
format: 'id'
|
||||
}
|
||||
},
|
||||
visibleUserIds: {
|
||||
type: types.array,
|
||||
optional: bool.true, nullable: bool.false,
|
||||
type: 'array' as const,
|
||||
optional: true as const, nullable: false as const,
|
||||
items: {
|
||||
type: types.string,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
format: 'id'
|
||||
}
|
||||
},
|
||||
fileIds: {
|
||||
type: types.array,
|
||||
optional: bool.true, nullable: bool.false,
|
||||
type: 'array' as const,
|
||||
optional: true as const, nullable: false as const,
|
||||
items: {
|
||||
type: types.string,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
format: 'id'
|
||||
}
|
||||
},
|
||||
files: {
|
||||
type: types.array,
|
||||
optional: bool.true, nullable: bool.false,
|
||||
type: 'array' as const,
|
||||
optional: true as const, nullable: false as const,
|
||||
items: {
|
||||
type: types.object,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
ref: 'DriveFile'
|
||||
}
|
||||
},
|
||||
tags: {
|
||||
type: types.array,
|
||||
optional: bool.true, nullable: bool.false,
|
||||
type: 'array' as const,
|
||||
optional: true as const, nullable: false as const,
|
||||
items: {
|
||||
type: types.string,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
}
|
||||
},
|
||||
poll: {
|
||||
type: types.object,
|
||||
optional: bool.true, nullable: bool.true,
|
||||
type: 'object' as const,
|
||||
optional: true as const, nullable: true as const,
|
||||
},
|
||||
geo: {
|
||||
type: types.object,
|
||||
optional: bool.true, nullable: bool.true,
|
||||
type: 'object' as const,
|
||||
optional: true as const, nullable: true as const,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
|
|
@ -3,7 +3,7 @@ import { Users, Notes } from '..';
|
|||
import { Notification } from '../entities/notification';
|
||||
import { ensure } from '../../prelude/ensure';
|
||||
import { awaitAll } from '../../prelude/await-all';
|
||||
import { types, bool, SchemaType } from '../../misc/schema';
|
||||
import { SchemaType } from '../../misc/schema';
|
||||
|
||||
export type PackedNotification = SchemaType<typeof packedNotificationSchema>;
|
||||
|
||||
|
@ -51,37 +51,37 @@ export class NotificationRepository extends Repository<Notification> {
|
|||
}
|
||||
|
||||
export const packedNotificationSchema = {
|
||||
type: types.object,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
properties: {
|
||||
id: {
|
||||
type: types.string,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
format: 'id',
|
||||
description: 'The unique identifier for this notification.',
|
||||
example: 'xxxxxxxxxx',
|
||||
},
|
||||
createdAt: {
|
||||
type: types.string,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
format: 'date-time',
|
||||
description: 'The date that the notification was created.'
|
||||
},
|
||||
type: {
|
||||
type: types.string,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
enum: ['follow', 'receiveFollowRequest', 'mention', 'reply', 'renote', 'quote', 'reaction', 'pollVote'],
|
||||
description: 'The type of the notification.'
|
||||
},
|
||||
userId: {
|
||||
type: types.string,
|
||||
optional: bool.true, nullable: bool.true,
|
||||
type: 'string' as const,
|
||||
optional: true as const, nullable: true as const,
|
||||
format: 'id',
|
||||
},
|
||||
user: {
|
||||
type: types.object,
|
||||
type: 'object' as const,
|
||||
ref: 'User',
|
||||
optional: bool.true, nullable: bool.true,
|
||||
optional: true as const, nullable: true as const,
|
||||
},
|
||||
}
|
||||
};
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { EntityRepository, Repository } from 'typeorm';
|
||||
import { Page } from '../entities/page';
|
||||
import { SchemaType, types, bool } from '../../misc/schema';
|
||||
import { SchemaType } from '../../misc/schema';
|
||||
import { Users, DriveFiles, PageLikes } from '..';
|
||||
import { awaitAll } from '../../prelude/await-all';
|
||||
import { DriveFile } from '../entities/drive-file';
|
||||
|
@ -89,54 +89,54 @@ export class PageRepository extends Repository<Page> {
|
|||
}
|
||||
|
||||
export const packedPageSchema = {
|
||||
type: types.object,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
properties: {
|
||||
id: {
|
||||
type: types.string,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
format: 'id',
|
||||
example: 'xxxxxxxxxx',
|
||||
},
|
||||
createdAt: {
|
||||
type: types.string,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
format: 'date-time',
|
||||
},
|
||||
updatedAt: {
|
||||
type: types.string,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
format: 'date-time',
|
||||
},
|
||||
title: {
|
||||
type: types.string,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
},
|
||||
name: {
|
||||
type: types.string,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
},
|
||||
summary: {
|
||||
type: types.string,
|
||||
optional: bool.false, nullable: bool.true,
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: true as const,
|
||||
},
|
||||
content: {
|
||||
type: types.array,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'array' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
},
|
||||
variables: {
|
||||
type: types.array,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'array' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
},
|
||||
userId: {
|
||||
type: types.string,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
format: 'id',
|
||||
},
|
||||
user: {
|
||||
type: types.object,
|
||||
type: 'object' as const,
|
||||
ref: 'User',
|
||||
optional: bool.false, nullable: bool.false,
|
||||
optional: false as const, nullable: false as const,
|
||||
},
|
||||
}
|
||||
};
|
||||
|
|
|
@ -2,7 +2,7 @@ import { EntityRepository, Repository } from 'typeorm';
|
|||
import { UserGroup } from '../entities/user-group';
|
||||
import { ensure } from '../../prelude/ensure';
|
||||
import { UserGroupJoinings } from '..';
|
||||
import { bool, types, SchemaType } from '../../misc/schema';
|
||||
import { SchemaType } from '../../misc/schema';
|
||||
|
||||
export type PackedUserGroup = SchemaType<typeof packedUserGroupSchema>;
|
||||
|
||||
|
@ -28,38 +28,38 @@ export class UserGroupRepository extends Repository<UserGroup> {
|
|||
}
|
||||
|
||||
export const packedUserGroupSchema = {
|
||||
type: types.object,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
properties: {
|
||||
id: {
|
||||
type: types.string,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
format: 'id',
|
||||
description: 'The unique identifier for this UserGroup.',
|
||||
example: 'xxxxxxxxxx',
|
||||
},
|
||||
createdAt: {
|
||||
type: types.string,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
format: 'date-time',
|
||||
description: 'The date that the UserGroup was created.'
|
||||
},
|
||||
name: {
|
||||
type: types.string,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: 'The name of the UserGroup.'
|
||||
},
|
||||
ownerId: {
|
||||
type: types.string,
|
||||
nullable: bool.false, optional: bool.false,
|
||||
type: 'string' as const,
|
||||
nullable: false as const, optional: false as const,
|
||||
format: 'id',
|
||||
},
|
||||
userIds: {
|
||||
type: types.array,
|
||||
nullable: bool.false, optional: bool.true,
|
||||
type: 'array' as const,
|
||||
nullable: false as const, optional: true as const,
|
||||
items: {
|
||||
type: types.string,
|
||||
nullable: bool.false, optional: bool.false,
|
||||
type: 'string' as const,
|
||||
nullable: false as const, optional: false as const,
|
||||
format: 'id',
|
||||
}
|
||||
},
|
||||
|
|
|
@ -2,7 +2,7 @@ import { EntityRepository, Repository } from 'typeorm';
|
|||
import { UserList } from '../entities/user-list';
|
||||
import { ensure } from '../../prelude/ensure';
|
||||
import { UserListJoinings } from '..';
|
||||
import { bool, types, SchemaType } from '../../misc/schema';
|
||||
import { SchemaType } from '../../misc/schema';
|
||||
|
||||
export type PackedUserList = SchemaType<typeof packedUserListSchema>;
|
||||
|
||||
|
@ -27,33 +27,33 @@ export class UserListRepository extends Repository<UserList> {
|
|||
}
|
||||
|
||||
export const packedUserListSchema = {
|
||||
type: types.object,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
properties: {
|
||||
id: {
|
||||
type: types.string,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
format: 'id',
|
||||
description: 'The unique identifier for this UserList.',
|
||||
example: 'xxxxxxxxxx',
|
||||
},
|
||||
createdAt: {
|
||||
type: types.string,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
format: 'date-time',
|
||||
description: 'The date that the UserList was created.'
|
||||
},
|
||||
name: {
|
||||
type: types.string,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: 'The name of the UserList.'
|
||||
},
|
||||
userIds: {
|
||||
type: types.array,
|
||||
nullable: bool.false, optional: bool.true,
|
||||
type: 'array' as const,
|
||||
nullable: false as const, optional: true as const,
|
||||
items: {
|
||||
type: types.string,
|
||||
nullable: bool.false, optional: bool.false,
|
||||
type: 'string' as const,
|
||||
nullable: false as const, optional: false as const,
|
||||
format: 'id',
|
||||
}
|
||||
},
|
||||
|
|
|
@ -4,7 +4,7 @@ import { User, ILocalUser, IRemoteUser } from '../entities/user';
|
|||
import { Emojis, Notes, NoteUnreads, FollowRequests, Notifications, MessagingMessages, UserNotePinings, Followings, Blockings, Mutings, UserProfiles, UserGroupJoinings } from '..';
|
||||
import { ensure } from '../../prelude/ensure';
|
||||
import config from '../../config';
|
||||
import { SchemaType, bool, types } from '../../misc/schema';
|
||||
import { SchemaType } from '../../misc/schema';
|
||||
import { awaitAll } from '../../prelude/await-all';
|
||||
|
||||
export type PackedUser = SchemaType<typeof packedUserSchema>;
|
||||
|
@ -243,150 +243,150 @@ export class UserRepository extends Repository<User> {
|
|||
}
|
||||
|
||||
export const packedUserSchema = {
|
||||
type: types.object,
|
||||
nullable: bool.false, optional: bool.false,
|
||||
type: 'object' as const,
|
||||
nullable: false as const, optional: false as const,
|
||||
properties: {
|
||||
id: {
|
||||
type: types.string,
|
||||
nullable: bool.false, optional: bool.false,
|
||||
type: 'string' as const,
|
||||
nullable: false as const, optional: false as const,
|
||||
format: 'id',
|
||||
description: 'The unique identifier for this User.',
|
||||
example: 'xxxxxxxxxx',
|
||||
},
|
||||
username: {
|
||||
type: types.string,
|
||||
nullable: bool.false, optional: bool.false,
|
||||
type: 'string' as const,
|
||||
nullable: false as const, optional: false as const,
|
||||
description: 'The screen name, handle, or alias that this user identifies themselves with.',
|
||||
example: 'ai'
|
||||
},
|
||||
name: {
|
||||
type: types.string,
|
||||
nullable: bool.true, optional: bool.false,
|
||||
type: 'string' as const,
|
||||
nullable: true as const, optional: false as const,
|
||||
description: 'The name of the user, as they’ve defined it.',
|
||||
example: '藍'
|
||||
},
|
||||
url: {
|
||||
type: types.string,
|
||||
type: 'string' as const,
|
||||
format: 'url',
|
||||
nullable: bool.true, optional: bool.true,
|
||||
nullable: true as const, optional: true as const,
|
||||
},
|
||||
avatarUrl: {
|
||||
type: types.string,
|
||||
type: 'string' as const,
|
||||
format: 'url',
|
||||
nullable: bool.true, optional: bool.false,
|
||||
nullable: true as const, optional: false as const,
|
||||
},
|
||||
avatarColor: {
|
||||
type: types.any,
|
||||
nullable: bool.true, optional: bool.false,
|
||||
type: 'any' as const,
|
||||
nullable: true as const, optional: false as const,
|
||||
},
|
||||
bannerUrl: {
|
||||
type: types.string,
|
||||
type: 'string' as const,
|
||||
format: 'url',
|
||||
nullable: bool.true, optional: bool.true,
|
||||
nullable: true as const, optional: true as const,
|
||||
},
|
||||
bannerColor: {
|
||||
type: types.any,
|
||||
nullable: bool.true, optional: bool.true,
|
||||
type: 'any' as const,
|
||||
nullable: true as const, optional: true as const,
|
||||
},
|
||||
emojis: {
|
||||
type: types.any,
|
||||
nullable: bool.true, optional: bool.false,
|
||||
type: 'any' as const,
|
||||
nullable: true as const, optional: false as const,
|
||||
},
|
||||
host: {
|
||||
type: types.string,
|
||||
nullable: bool.true, optional: bool.false,
|
||||
type: 'string' as const,
|
||||
nullable: true as const, optional: false as const,
|
||||
example: 'misskey.example.com'
|
||||
},
|
||||
description: {
|
||||
type: types.string,
|
||||
nullable: bool.true, optional: bool.true,
|
||||
type: 'string' as const,
|
||||
nullable: true as const, optional: true as const,
|
||||
description: 'The user-defined UTF-8 string describing their account.',
|
||||
example: 'Hi masters, I am Ai!'
|
||||
},
|
||||
birthday: {
|
||||
type: types.string,
|
||||
nullable: bool.true, optional: bool.true,
|
||||
type: 'string' as const,
|
||||
nullable: true as const, optional: true as const,
|
||||
example: '2018-03-12'
|
||||
},
|
||||
createdAt: {
|
||||
type: types.string,
|
||||
nullable: bool.false, optional: bool.true,
|
||||
type: 'string' as const,
|
||||
nullable: false as const, optional: true as const,
|
||||
format: 'date-time',
|
||||
description: 'The date that the user account was created on Misskey.'
|
||||
},
|
||||
updatedAt: {
|
||||
type: types.string,
|
||||
nullable: bool.true, optional: bool.true,
|
||||
type: 'string' as const,
|
||||
nullable: true as const, optional: true as const,
|
||||
format: 'date-time',
|
||||
},
|
||||
location: {
|
||||
type: types.string,
|
||||
nullable: bool.true, optional: bool.true,
|
||||
type: 'string' as const,
|
||||
nullable: true as const, optional: true as const,
|
||||
},
|
||||
followersCount: {
|
||||
type: types.number,
|
||||
nullable: bool.false, optional: bool.true,
|
||||
type: 'number' as const,
|
||||
nullable: false as const, optional: true as const,
|
||||
description: 'The number of followers this account currently has.'
|
||||
},
|
||||
followingCount: {
|
||||
type: types.number,
|
||||
nullable: bool.false, optional: bool.true,
|
||||
type: 'number' as const,
|
||||
nullable: false as const, optional: true as const,
|
||||
description: 'The number of users this account is following.'
|
||||
},
|
||||
notesCount: {
|
||||
type: types.number,
|
||||
nullable: bool.false, optional: bool.true,
|
||||
type: 'number' as const,
|
||||
nullable: false as const, optional: true as const,
|
||||
description: 'The number of Notes (including renotes) issued by the user.'
|
||||
},
|
||||
isBot: {
|
||||
type: types.boolean,
|
||||
nullable: bool.false, optional: bool.true,
|
||||
type: 'boolean' as const,
|
||||
nullable: false as const, optional: true as const,
|
||||
description: 'Whether this account is a bot.'
|
||||
},
|
||||
pinnedNoteIds: {
|
||||
type: types.array,
|
||||
nullable: bool.false, optional: bool.true,
|
||||
type: 'array' as const,
|
||||
nullable: false as const, optional: true as const,
|
||||
items: {
|
||||
type: types.string,
|
||||
nullable: bool.false, optional: bool.false,
|
||||
type: 'string' as const,
|
||||
nullable: false as const, optional: false as const,
|
||||
format: 'id',
|
||||
}
|
||||
},
|
||||
pinnedNotes: {
|
||||
type: types.array,
|
||||
nullable: bool.false, optional: bool.true,
|
||||
type: 'array' as const,
|
||||
nullable: false as const, optional: true as const,
|
||||
items: {
|
||||
type: types.object,
|
||||
nullable: bool.false, optional: bool.false,
|
||||
type: 'object' as const,
|
||||
nullable: false as const, optional: false as const,
|
||||
ref: 'Note'
|
||||
}
|
||||
},
|
||||
isCat: {
|
||||
type: types.boolean,
|
||||
nullable: bool.false, optional: bool.true,
|
||||
type: 'boolean' as const,
|
||||
nullable: false as const, optional: true as const,
|
||||
description: 'Whether this account is a cat.'
|
||||
},
|
||||
isAdmin: {
|
||||
type: types.boolean,
|
||||
nullable: bool.false, optional: bool.true,
|
||||
type: 'boolean' as const,
|
||||
nullable: false as const, optional: true as const,
|
||||
description: 'Whether this account is the admin.'
|
||||
},
|
||||
isModerator: {
|
||||
type: types.boolean,
|
||||
nullable: bool.false, optional: bool.true,
|
||||
type: 'boolean' as const,
|
||||
nullable: false as const, optional: true as const,
|
||||
description: 'Whether this account is a moderator.'
|
||||
},
|
||||
isLocked: {
|
||||
type: types.boolean,
|
||||
nullable: bool.false, optional: bool.true,
|
||||
type: 'boolean' as const,
|
||||
nullable: false as const, optional: true as const,
|
||||
},
|
||||
hasUnreadSpecifiedNotes: {
|
||||
type: types.boolean,
|
||||
nullable: bool.false, optional: bool.true,
|
||||
type: 'boolean' as const,
|
||||
nullable: false as const, optional: true as const,
|
||||
},
|
||||
hasUnreadMentions: {
|
||||
type: types.boolean,
|
||||
nullable: bool.false, optional: bool.true,
|
||||
type: 'boolean' as const,
|
||||
nullable: false as const, optional: true as const,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
|
|
@ -4,7 +4,6 @@ import define from '../../define';
|
|||
import { Apps } from '../../../../models';
|
||||
import { genId } from '../../../../misc/gen-id';
|
||||
import { unique } from '../../../../prelude/array';
|
||||
import { types, bool } from '../../../../misc/schema';
|
||||
|
||||
export const meta = {
|
||||
tags: ['app'],
|
||||
|
@ -53,8 +52,8 @@ export const meta = {
|
|||
},
|
||||
|
||||
res: {
|
||||
type: types.object,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
ref: 'App',
|
||||
},
|
||||
};
|
||||
|
|
|
@ -3,7 +3,6 @@ import { ID } from '../../../../misc/cafy-id';
|
|||
import define from '../../define';
|
||||
import { ApiError } from '../../error';
|
||||
import { Apps } from '../../../../models';
|
||||
import { types, bool } from '../../../../misc/schema';
|
||||
|
||||
export const meta = {
|
||||
tags: ['app'],
|
||||
|
@ -15,8 +14,8 @@ export const meta = {
|
|||
},
|
||||
|
||||
res: {
|
||||
type: types.object,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
ref: 'App',
|
||||
},
|
||||
|
||||
|
|
|
@ -5,7 +5,6 @@ import define from '../../../define';
|
|||
import { ApiError } from '../../../error';
|
||||
import { Apps, AuthSessions } from '../../../../../models';
|
||||
import { genId } from '../../../../../misc/gen-id';
|
||||
import { types, bool } from '../../../../../misc/schema';
|
||||
|
||||
export const meta = {
|
||||
tags: ['auth'],
|
||||
|
@ -28,17 +27,17 @@ export const meta = {
|
|||
},
|
||||
|
||||
res: {
|
||||
type: types.object,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
properties: {
|
||||
token: {
|
||||
type: types.string,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: 'セッションのトークン'
|
||||
},
|
||||
url: {
|
||||
type: types.string,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
format: 'url',
|
||||
description: 'セッションのURL'
|
||||
},
|
||||
|
|
|
@ -3,7 +3,6 @@ import define from '../../../define';
|
|||
import { ApiError } from '../../../error';
|
||||
import { Apps, AuthSessions, AccessTokens, Users } from '../../../../../models';
|
||||
import { ensure } from '../../../../../prelude/ensure';
|
||||
import { types, bool } from '../../../../../misc/schema';
|
||||
|
||||
export const meta = {
|
||||
tags: ['auth'],
|
||||
|
@ -29,18 +28,18 @@ export const meta = {
|
|||
},
|
||||
|
||||
res: {
|
||||
type: types.object,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
properties: {
|
||||
accessToken: {
|
||||
type: types.string,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: 'ユーザーのアクセストークン',
|
||||
},
|
||||
|
||||
user: {
|
||||
type: types.object,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
ref: 'User',
|
||||
description: '認証したユーザー'
|
||||
},
|
||||
|
|
|
@ -3,7 +3,6 @@ import { ID } from '../../../../misc/cafy-id';
|
|||
import define from '../../define';
|
||||
import { Blockings } from '../../../../models';
|
||||
import { makePaginationQuery } from '../../common/make-pagination-query';
|
||||
import { types, bool } from '../../../../misc/schema';
|
||||
|
||||
export const meta = {
|
||||
desc: {
|
||||
|
@ -33,11 +32,11 @@ export const meta = {
|
|||
},
|
||||
|
||||
res: {
|
||||
type: types.array,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'array' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
items: {
|
||||
type: types.object,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
ref: 'Blocking',
|
||||
}
|
||||
},
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
import define from '../define';
|
||||
import { fetchMeta } from '../../../misc/fetch-meta';
|
||||
import { DriveFiles } from '../../../models';
|
||||
import { types, bool } from '../../../misc/schema';
|
||||
|
||||
export const meta = {
|
||||
desc: {
|
||||
|
@ -16,16 +15,16 @@ export const meta = {
|
|||
kind: 'read:drive',
|
||||
|
||||
res: {
|
||||
type: types.object,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
properties: {
|
||||
capacity: {
|
||||
type: types.number,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'number' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
},
|
||||
usage: {
|
||||
type: types.number,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'number' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,7 +3,6 @@ import { ID } from '../../../../misc/cafy-id';
|
|||
import define from '../../define';
|
||||
import { DriveFiles } from '../../../../models';
|
||||
import { makePaginationQuery } from '../../common/make-pagination-query';
|
||||
import { types, bool } from '../../../../misc/schema';
|
||||
|
||||
export const meta = {
|
||||
desc: {
|
||||
|
@ -42,11 +41,11 @@ export const meta = {
|
|||
},
|
||||
|
||||
res: {
|
||||
type: types.array,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'array' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
items: {
|
||||
type: types.object,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
ref: 'DriveFile',
|
||||
}
|
||||
},
|
||||
|
|
|
@ -3,7 +3,6 @@ import { ID } from '../../../../../misc/cafy-id';
|
|||
import define from '../../../define';
|
||||
import { ApiError } from '../../../error';
|
||||
import { DriveFiles, Notes } from '../../../../../models';
|
||||
import { types, bool } from '../../../../../misc/schema';
|
||||
|
||||
export const meta = {
|
||||
stability: 'stable',
|
||||
|
@ -30,11 +29,11 @@ export const meta = {
|
|||
},
|
||||
|
||||
res: {
|
||||
type: types.array,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'array' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
items: {
|
||||
type: types.object,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
ref: 'Note',
|
||||
}
|
||||
},
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
import $ from 'cafy';
|
||||
import define from '../../../define';
|
||||
import { DriveFiles } from '../../../../../models';
|
||||
import { types, bool } from '../../../../../misc/schema';
|
||||
|
||||
export const meta = {
|
||||
desc: {
|
||||
|
@ -25,8 +24,8 @@ export const meta = {
|
|||
},
|
||||
|
||||
res: {
|
||||
type: types.boolean,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'boolean' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
},
|
||||
};
|
||||
|
||||
|
|
|
@ -6,7 +6,6 @@ import define from '../../../define';
|
|||
import { apiLogger } from '../../../logger';
|
||||
import { ApiError } from '../../../error';
|
||||
import { DriveFiles } from '../../../../../models';
|
||||
import { types, bool } from '../../../../../misc/schema';
|
||||
|
||||
export const meta = {
|
||||
desc: {
|
||||
|
@ -57,8 +56,8 @@ export const meta = {
|
|||
},
|
||||
|
||||
res: {
|
||||
type: types.object,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
ref: 'DriveFile',
|
||||
},
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
import $ from 'cafy';
|
||||
import define from '../../../define';
|
||||
import { DriveFiles } from '../../../../../models';
|
||||
import { types, bool } from '../../../../../misc/schema';
|
||||
|
||||
export const meta = {
|
||||
desc: {
|
||||
|
@ -24,11 +23,11 @@ export const meta = {
|
|||
},
|
||||
|
||||
res: {
|
||||
type: types.array,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'array' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
items: {
|
||||
type: types.object,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
ref: 'DriveFile',
|
||||
}
|
||||
},
|
||||
|
|
|
@ -2,7 +2,6 @@ import $ from 'cafy';
|
|||
import { ID } from '../../../../../misc/cafy-id';
|
||||
import define from '../../../define';
|
||||
import { DriveFiles } from '../../../../../models';
|
||||
import { types, bool } from '../../../../../misc/schema';
|
||||
|
||||
export const meta = {
|
||||
requireCredential: true,
|
||||
|
@ -26,11 +25,11 @@ export const meta = {
|
|||
},
|
||||
|
||||
res: {
|
||||
type: types.array,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'array' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
items: {
|
||||
type: types.object,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
ref: 'DriveFile',
|
||||
}
|
||||
},
|
||||
|
|
|
@ -4,7 +4,6 @@ import define from '../../../define';
|
|||
import { ApiError } from '../../../error';
|
||||
import { DriveFile } from '../../../../../models/entities/drive-file';
|
||||
import { DriveFiles } from '../../../../../models';
|
||||
import { types, bool } from '../../../../../misc/schema';
|
||||
|
||||
export const meta = {
|
||||
stability: 'stable',
|
||||
|
@ -39,8 +38,8 @@ export const meta = {
|
|||
},
|
||||
|
||||
res: {
|
||||
type: types.object,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
ref: 'DriveFile',
|
||||
},
|
||||
|
||||
|
|
|
@ -3,7 +3,6 @@ import { ID } from '../../../../misc/cafy-id';
|
|||
import define from '../../define';
|
||||
import { DriveFolders } from '../../../../models';
|
||||
import { makePaginationQuery } from '../../common/make-pagination-query';
|
||||
import { types, bool } from '../../../../misc/schema';
|
||||
|
||||
export const meta = {
|
||||
desc: {
|
||||
|
@ -38,11 +37,11 @@ export const meta = {
|
|||
},
|
||||
|
||||
res: {
|
||||
type: types.array,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'array' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
items: {
|
||||
type: types.object,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
ref: 'DriveFolder',
|
||||
}
|
||||
},
|
||||
|
|
|
@ -2,7 +2,6 @@ import $ from 'cafy';
|
|||
import { ID } from '../../../../../misc/cafy-id';
|
||||
import define from '../../../define';
|
||||
import { DriveFolders } from '../../../../../models';
|
||||
import { types, bool } from '../../../../../misc/schema';
|
||||
|
||||
export const meta = {
|
||||
tags: ['drive'],
|
||||
|
@ -26,11 +25,11 @@ export const meta = {
|
|||
},
|
||||
|
||||
res: {
|
||||
type: types.array,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'array' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
items: {
|
||||
type: types.object,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
ref: 'DriveFolder',
|
||||
}
|
||||
},
|
||||
|
|
|
@ -3,7 +3,6 @@ import { ID } from '../../../../../misc/cafy-id';
|
|||
import define from '../../../define';
|
||||
import { ApiError } from '../../../error';
|
||||
import { DriveFolders } from '../../../../../models';
|
||||
import { types, bool } from '../../../../../misc/schema';
|
||||
|
||||
export const meta = {
|
||||
stability: 'stable',
|
||||
|
@ -30,8 +29,8 @@ export const meta = {
|
|||
},
|
||||
|
||||
res: {
|
||||
type: types.object,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
ref: 'DriveFolder',
|
||||
},
|
||||
|
||||
|
|
|
@ -3,7 +3,6 @@ import { ID } from '../../../../misc/cafy-id';
|
|||
import define from '../../define';
|
||||
import { DriveFiles } from '../../../../models';
|
||||
import { makePaginationQuery } from '../../common/make-pagination-query';
|
||||
import { types, bool } from '../../../../misc/schema';
|
||||
|
||||
export const meta = {
|
||||
tags: ['drive'],
|
||||
|
@ -32,11 +31,11 @@ export const meta = {
|
|||
},
|
||||
|
||||
res: {
|
||||
type: types.array,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'array' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
items: {
|
||||
type: types.object,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
ref: 'DriveFile',
|
||||
}
|
||||
},
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
import $ from 'cafy';
|
||||
import define from '../../define';
|
||||
import { Hashtags } from '../../../../models';
|
||||
import { types, bool } from '../../../../misc/schema';
|
||||
|
||||
export const meta = {
|
||||
tags: ['hashtags'],
|
||||
|
@ -48,11 +47,11 @@ export const meta = {
|
|||
},
|
||||
|
||||
res: {
|
||||
type: types.array,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'array' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
items: {
|
||||
type: types.object,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
ref: 'Hashtag',
|
||||
}
|
||||
},
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
import $ from 'cafy';
|
||||
import define from '../../define';
|
||||
import { Hashtags } from '../../../../models';
|
||||
import { types, bool } from '../../../../misc/schema';
|
||||
|
||||
export const meta = {
|
||||
desc: {
|
||||
|
@ -38,11 +37,11 @@ export const meta = {
|
|||
},
|
||||
|
||||
res: {
|
||||
type: types.array,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'array' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
items: {
|
||||
type: types.string,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
}
|
||||
},
|
||||
};
|
||||
|
|
|
@ -2,7 +2,6 @@ import $ from 'cafy';
|
|||
import define from '../../define';
|
||||
import { ApiError } from '../../error';
|
||||
import { Hashtags } from '../../../../models';
|
||||
import { types, bool } from '../../../../misc/schema';
|
||||
|
||||
export const meta = {
|
||||
desc: {
|
||||
|
@ -24,8 +23,8 @@ export const meta = {
|
|||
},
|
||||
|
||||
res: {
|
||||
type: types.object,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
ref: 'Hashtag',
|
||||
},
|
||||
|
||||
|
|
|
@ -2,7 +2,6 @@ import define from '../../define';
|
|||
import { fetchMeta } from '../../../../misc/fetch-meta';
|
||||
import { Notes } from '../../../../models';
|
||||
import { Note } from '../../../../models/entities/note';
|
||||
import { types, bool } from '../../../../misc/schema';
|
||||
|
||||
/*
|
||||
トレンドに載るためには「『直近a分間のユニーク投稿数が今からa分前~今からb分前の間のユニーク投稿数のn倍以上』のハッシュタグの上位5位以内に入る」ことが必要
|
||||
|
@ -24,27 +23,27 @@ export const meta = {
|
|||
requireCredential: false,
|
||||
|
||||
res: {
|
||||
type: types.array,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'array' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
items: {
|
||||
type: types.object,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
properties: {
|
||||
tag: {
|
||||
type: types.string,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
},
|
||||
chart: {
|
||||
type: types.array,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'array' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
items: {
|
||||
type: types.number,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'number' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
}
|
||||
},
|
||||
usersCount: {
|
||||
type: types.number,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'number' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
import $ from 'cafy';
|
||||
import define from '../../define';
|
||||
import { Users } from '../../../../models';
|
||||
import { types, bool } from '../../../../misc/schema';
|
||||
|
||||
export const meta = {
|
||||
requireCredential: false,
|
||||
|
@ -48,11 +47,11 @@ export const meta = {
|
|||
},
|
||||
|
||||
res: {
|
||||
type: types.array,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'array' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
items: {
|
||||
type: types.object,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
ref: 'User',
|
||||
}
|
||||
},
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import define from '../define';
|
||||
import { Users } from '../../../models';
|
||||
import { types, bool } from '../../../misc/schema';
|
||||
|
||||
export const meta = {
|
||||
stability: 'stable',
|
||||
|
@ -16,8 +15,8 @@ export const meta = {
|
|||
params: {},
|
||||
|
||||
res: {
|
||||
type: types.object,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
ref: 'User',
|
||||
},
|
||||
};
|
||||
|
|
|
@ -3,7 +3,6 @@ import { ID } from '../../../../misc/cafy-id';
|
|||
import define from '../../define';
|
||||
import { NoteFavorites } from '../../../../models';
|
||||
import { makePaginationQuery } from '../../common/make-pagination-query';
|
||||
import { types, bool } from '../../../../misc/schema';
|
||||
|
||||
export const meta = {
|
||||
desc: {
|
||||
|
@ -33,11 +32,11 @@ export const meta = {
|
|||
},
|
||||
|
||||
res: {
|
||||
type: types.array,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'array' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
items: {
|
||||
type: types.object,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
ref: 'NoteFavorite',
|
||||
}
|
||||
},
|
||||
|
|
|
@ -4,7 +4,6 @@ import { readNotification } from '../../common/read-notification';
|
|||
import define from '../../define';
|
||||
import { makePaginationQuery } from '../../common/make-pagination-query';
|
||||
import { Notifications, Followings, Mutings } from '../../../../models';
|
||||
import { types, bool } from '../../../../misc/schema';
|
||||
|
||||
export const meta = {
|
||||
desc: {
|
||||
|
@ -54,11 +53,11 @@ export const meta = {
|
|||
},
|
||||
|
||||
res: {
|
||||
type: types.array,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'array' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
items: {
|
||||
type: types.object,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
ref: 'Notification',
|
||||
}
|
||||
},
|
||||
|
|
|
@ -3,7 +3,6 @@ import define from '../../define';
|
|||
import { MessagingMessage } from '../../../../models/entities/messaging-message';
|
||||
import { MessagingMessages, Mutings, UserGroupJoinings } from '../../../../models';
|
||||
import { Brackets } from 'typeorm';
|
||||
import { types, bool } from '../../../../misc/schema';
|
||||
|
||||
export const meta = {
|
||||
desc: {
|
||||
|
@ -30,11 +29,11 @@ export const meta = {
|
|||
},
|
||||
|
||||
res: {
|
||||
type: types.array,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'array' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
items: {
|
||||
type: types.object,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
ref: 'MessagingMessage',
|
||||
}
|
||||
},
|
||||
|
|
|
@ -5,7 +5,6 @@ import { ApiError } from '../../error';
|
|||
import { getUser } from '../../common/getters';
|
||||
import { MessagingMessages, UserGroups, UserGroupJoinings } from '../../../../models';
|
||||
import { makePaginationQuery } from '../../common/make-pagination-query';
|
||||
import { types, bool } from '../../../../misc/schema';
|
||||
import { Brackets } from 'typeorm';
|
||||
import { readUserMessagingMessage, readGroupMessagingMessage } from '../../common/read-messaging-message';
|
||||
|
||||
|
@ -58,11 +57,11 @@ export const meta = {
|
|||
},
|
||||
|
||||
res: {
|
||||
type: types.array,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'array' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
items: {
|
||||
type: types.object,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
ref: 'MessagingMessage',
|
||||
}
|
||||
},
|
||||
|
|
|
@ -9,7 +9,6 @@ import { getUser } from '../../../common/getters';
|
|||
import { MessagingMessages, DriveFiles, Mutings, UserGroups, UserGroupJoinings } from '../../../../../models';
|
||||
import { MessagingMessage } from '../../../../../models/entities/messaging-message';
|
||||
import { genId } from '../../../../../misc/gen-id';
|
||||
import { types, bool } from '../../../../../misc/schema';
|
||||
import { User } from '../../../../../models/entities/user';
|
||||
import { UserGroup } from '../../../../../models/entities/user-group';
|
||||
import { Not } from 'typeorm';
|
||||
|
@ -53,8 +52,8 @@ export const meta = {
|
|||
},
|
||||
|
||||
res: {
|
||||
type: types.object,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
ref: 'MessagingMessage',
|
||||
},
|
||||
|
||||
|
|
|
@ -5,7 +5,6 @@ import define from '../define';
|
|||
import { fetchMeta } from '../../../misc/fetch-meta';
|
||||
import * as pkg from '../../../../package.json';
|
||||
import { Emojis } from '../../../models';
|
||||
import { types, bool } from '../../../misc/schema';
|
||||
import { getConnection } from 'typeorm';
|
||||
import redis from '../../../db/redis';
|
||||
|
||||
|
@ -29,40 +28,40 @@ export const meta = {
|
|||
},
|
||||
|
||||
res: {
|
||||
type: types.object,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
properties: {
|
||||
version: {
|
||||
type: types.string,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: 'The version of Misskey of this instance.',
|
||||
example: pkg.version
|
||||
},
|
||||
name: {
|
||||
type: types.string,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: 'The name of this instance.',
|
||||
},
|
||||
description: {
|
||||
type: types.string,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: 'The description of this instance.',
|
||||
},
|
||||
announcements: {
|
||||
type: types.array,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'array' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
items: {
|
||||
type: types.object,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
properties: {
|
||||
title: {
|
||||
type: types.string,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: 'The title of the announcement.',
|
||||
},
|
||||
text: {
|
||||
type: types.string,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: 'The text of the announcement. (can be HTML)',
|
||||
},
|
||||
}
|
||||
|
@ -70,23 +69,23 @@ export const meta = {
|
|||
description: 'The announcements of this instance.',
|
||||
},
|
||||
disableRegistration: {
|
||||
type: types.boolean,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'boolean' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: 'Whether disabled open registration.',
|
||||
},
|
||||
disableLocalTimeline: {
|
||||
type: types.boolean,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'boolean' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: 'Whether disabled LTL and STL.',
|
||||
},
|
||||
disableGlobalTimeline: {
|
||||
type: types.boolean,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'boolean' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: 'Whether disabled GTL.',
|
||||
},
|
||||
enableEmojiReaction: {
|
||||
type: types.boolean,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'boolean' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: 'Whether enabled emoji reaction.',
|
||||
},
|
||||
}
|
||||
|
|
|
@ -3,7 +3,6 @@ import { ID } from '../../../../misc/cafy-id';
|
|||
import define from '../../define';
|
||||
import { makePaginationQuery } from '../../common/make-pagination-query';
|
||||
import { Mutings } from '../../../../models';
|
||||
import { types, bool } from '../../../../misc/schema';
|
||||
|
||||
export const meta = {
|
||||
desc: {
|
||||
|
@ -33,11 +32,11 @@ export const meta = {
|
|||
},
|
||||
|
||||
res: {
|
||||
type: types.array,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'array' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
items: {
|
||||
type: types.object,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
ref: 'Muting',
|
||||
}
|
||||
},
|
||||
|
|
|
@ -3,7 +3,6 @@ import { ID } from '../../../misc/cafy-id';
|
|||
import define from '../define';
|
||||
import { makePaginationQuery } from '../common/make-pagination-query';
|
||||
import { Notes } from '../../../models';
|
||||
import { types, bool } from '../../../misc/schema';
|
||||
|
||||
export const meta = {
|
||||
desc: {
|
||||
|
@ -63,11 +62,11 @@ export const meta = {
|
|||
},
|
||||
|
||||
res: {
|
||||
type: types.array,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'array' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
items: {
|
||||
type: types.object,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
ref: 'Note',
|
||||
}
|
||||
},
|
||||
|
|
|
@ -6,7 +6,6 @@ import { generateVisibilityQuery } from '../../common/generate-visibility-query'
|
|||
import { generateMuteQuery } from '../../common/generate-mute-query';
|
||||
import { Brackets } from 'typeorm';
|
||||
import { Notes } from '../../../../models';
|
||||
import { types, bool } from '../../../../misc/schema';
|
||||
|
||||
export const meta = {
|
||||
desc: {
|
||||
|
@ -42,11 +41,11 @@ export const meta = {
|
|||
},
|
||||
|
||||
res: {
|
||||
type: types.array,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'array' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
items: {
|
||||
type: types.object,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
ref: 'Note',
|
||||
}
|
||||
},
|
||||
|
|
|
@ -5,7 +5,6 @@ import { ApiError } from '../../error';
|
|||
import { getNote } from '../../common/getters';
|
||||
import { Note } from '../../../../models/entities/note';
|
||||
import { Notes } from '../../../../models';
|
||||
import { types, bool } from '../../../../misc/schema';
|
||||
|
||||
export const meta = {
|
||||
desc: {
|
||||
|
@ -38,11 +37,11 @@ export const meta = {
|
|||
},
|
||||
|
||||
res: {
|
||||
type: types.array,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'array' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
items: {
|
||||
type: types.object,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
ref: 'Note',
|
||||
}
|
||||
},
|
||||
|
|
|
@ -10,7 +10,6 @@ import { User } from '../../../../models/entities/user';
|
|||
import { Users, DriveFiles, Notes } from '../../../../models';
|
||||
import { DriveFile } from '../../../../models/entities/drive-file';
|
||||
import { Note } from '../../../../models/entities/note';
|
||||
import { types, bool } from '../../../../misc/schema';
|
||||
|
||||
let maxNoteTextLength = 1000;
|
||||
|
||||
|
@ -175,12 +174,12 @@ export const meta = {
|
|||
},
|
||||
|
||||
res: {
|
||||
type: types.object,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
properties: {
|
||||
createdNote: {
|
||||
type: types.object,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
ref: 'Note',
|
||||
description: '作成した投稿'
|
||||
}
|
||||
|
|
|
@ -2,7 +2,6 @@ import $ from 'cafy';
|
|||
import define from '../../define';
|
||||
import { generateMuteQuery } from '../../common/generate-mute-query';
|
||||
import { Notes } from '../../../../models';
|
||||
import { types, bool } from '../../../../misc/schema';
|
||||
|
||||
export const meta = {
|
||||
desc: {
|
||||
|
@ -25,11 +24,11 @@ export const meta = {
|
|||
},
|
||||
|
||||
res: {
|
||||
type: types.array,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'array' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
items: {
|
||||
type: types.object,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
ref: 'Note',
|
||||
}
|
||||
},
|
||||
|
|
|
@ -7,7 +7,6 @@ import { makePaginationQuery } from '../../common/make-pagination-query';
|
|||
import { Notes } from '../../../../models';
|
||||
import { generateMuteQuery } from '../../common/generate-mute-query';
|
||||
import { activeUsersChart } from '../../../../services/chart';
|
||||
import { types, bool } from '../../../../misc/schema';
|
||||
|
||||
export const meta = {
|
||||
desc: {
|
||||
|
@ -47,11 +46,11 @@ export const meta = {
|
|||
},
|
||||
|
||||
res: {
|
||||
type: types.array,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'array' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
items: {
|
||||
type: types.object,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
ref: 'Note',
|
||||
}
|
||||
},
|
||||
|
|
|
@ -9,7 +9,6 @@ import { Brackets } from 'typeorm';
|
|||
import { generateVisibilityQuery } from '../../common/generate-visibility-query';
|
||||
import { generateMuteQuery } from '../../common/generate-mute-query';
|
||||
import { activeUsersChart } from '../../../../services/chart';
|
||||
import { types, bool } from '../../../../misc/schema';
|
||||
|
||||
export const meta = {
|
||||
desc: {
|
||||
|
@ -90,11 +89,11 @@ export const meta = {
|
|||
},
|
||||
|
||||
res: {
|
||||
type: types.array,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'array' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
items: {
|
||||
type: types.object,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
ref: 'Note',
|
||||
}
|
||||
},
|
||||
|
|
|
@ -9,7 +9,6 @@ import { makePaginationQuery } from '../../common/make-pagination-query';
|
|||
import { generateVisibilityQuery } from '../../common/generate-visibility-query';
|
||||
import { activeUsersChart } from '../../../../services/chart';
|
||||
import { Brackets } from 'typeorm';
|
||||
import { types, bool } from '../../../../misc/schema';
|
||||
|
||||
export const meta = {
|
||||
desc: {
|
||||
|
@ -64,11 +63,11 @@ export const meta = {
|
|||
},
|
||||
|
||||
res: {
|
||||
type: types.array,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'array' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
items: {
|
||||
type: types.object,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
ref: 'Note',
|
||||
}
|
||||
},
|
||||
|
|
|
@ -7,7 +7,6 @@ import { generateVisibilityQuery } from '../../common/generate-visibility-query'
|
|||
import { generateMuteQuery } from '../../common/generate-mute-query';
|
||||
import { makePaginationQuery } from '../../common/make-pagination-query';
|
||||
import { Brackets } from 'typeorm';
|
||||
import { types, bool } from '../../../../misc/schema';
|
||||
|
||||
export const meta = {
|
||||
desc: {
|
||||
|
@ -44,11 +43,11 @@ export const meta = {
|
|||
},
|
||||
|
||||
res: {
|
||||
type: types.array,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'array' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
items: {
|
||||
type: types.object,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
ref: 'Note',
|
||||
}
|
||||
},
|
||||
|
|
|
@ -4,7 +4,6 @@ import define from '../../define';
|
|||
import { getNote } from '../../common/getters';
|
||||
import { ApiError } from '../../error';
|
||||
import { NoteReactions } from '../../../../models';
|
||||
import { types, bool } from '../../../../misc/schema';
|
||||
|
||||
export const meta = {
|
||||
desc: {
|
||||
|
@ -45,11 +44,11 @@ export const meta = {
|
|||
},
|
||||
|
||||
res: {
|
||||
type: types.array,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'array' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
items: {
|
||||
type: types.object,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
ref: 'NoteReaction',
|
||||
}
|
||||
},
|
||||
|
|
|
@ -7,7 +7,6 @@ import { generateVisibilityQuery } from '../../common/generate-visibility-query'
|
|||
import { generateMuteQuery } from '../../common/generate-mute-query';
|
||||
import { makePaginationQuery } from '../../common/make-pagination-query';
|
||||
import { Notes } from '../../../../models';
|
||||
import { types, bool } from '../../../../misc/schema';
|
||||
|
||||
export const meta = {
|
||||
desc: {
|
||||
|
@ -43,11 +42,11 @@ export const meta = {
|
|||
},
|
||||
|
||||
res: {
|
||||
type: types.array,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'array' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
items: {
|
||||
type: types.object,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
ref: 'Note',
|
||||
}
|
||||
},
|
||||
|
|
|
@ -5,7 +5,6 @@ import { Notes } from '../../../../models';
|
|||
import { makePaginationQuery } from '../../common/make-pagination-query';
|
||||
import { generateVisibilityQuery } from '../../common/generate-visibility-query';
|
||||
import { generateMuteQuery } from '../../common/generate-mute-query';
|
||||
import { types, bool } from '../../../../misc/schema';
|
||||
|
||||
export const meta = {
|
||||
desc: {
|
||||
|
@ -47,11 +46,11 @@ export const meta = {
|
|||
},
|
||||
|
||||
res: {
|
||||
type: types.array,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'array' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
items: {
|
||||
type: types.object,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
ref: 'Note',
|
||||
}
|
||||
},
|
||||
|
|
|
@ -6,7 +6,6 @@ import { Notes } from '../../../../models';
|
|||
import { generateMuteQuery } from '../../common/generate-mute-query';
|
||||
import { generateVisibilityQuery } from '../../common/generate-visibility-query';
|
||||
import { Brackets } from 'typeorm';
|
||||
import { types, bool } from '../../../../misc/schema';
|
||||
|
||||
export const meta = {
|
||||
desc: {
|
||||
|
@ -82,11 +81,11 @@ export const meta = {
|
|||
},
|
||||
|
||||
res: {
|
||||
type: types.array,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'array' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
items: {
|
||||
type: types.object,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
ref: 'Note',
|
||||
}
|
||||
},
|
||||
|
|
|
@ -4,7 +4,6 @@ import define from '../../define';
|
|||
import { ApiError } from '../../error';
|
||||
import { Notes } from '../../../../models';
|
||||
import { In } from 'typeorm';
|
||||
import { types, bool } from '../../../../misc/schema';
|
||||
import { ID } from '../../../../misc/cafy-id';
|
||||
|
||||
export const meta = {
|
||||
|
@ -44,11 +43,11 @@ export const meta = {
|
|||
},
|
||||
|
||||
res: {
|
||||
type: types.array,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'array' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
items: {
|
||||
type: types.object,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
ref: 'Note',
|
||||
}
|
||||
},
|
||||
|
|
|
@ -4,7 +4,6 @@ import define from '../../define';
|
|||
import { getNote } from '../../common/getters';
|
||||
import { ApiError } from '../../error';
|
||||
import { Notes } from '../../../../models';
|
||||
import { types, bool } from '../../../../misc/schema';
|
||||
|
||||
export const meta = {
|
||||
stability: 'stable',
|
||||
|
@ -29,8 +28,8 @@ export const meta = {
|
|||
},
|
||||
|
||||
res: {
|
||||
type: types.object,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
ref: 'Note',
|
||||
},
|
||||
|
||||
|
|
|
@ -7,7 +7,6 @@ import { generateVisibilityQuery } from '../../common/generate-visibility-query'
|
|||
import { generateMuteQuery } from '../../common/generate-mute-query';
|
||||
import { activeUsersChart } from '../../../../services/chart';
|
||||
import { Brackets } from 'typeorm';
|
||||
import { types, bool } from '../../../../misc/schema';
|
||||
|
||||
export const meta = {
|
||||
desc: {
|
||||
|
@ -89,11 +88,11 @@ export const meta = {
|
|||
},
|
||||
|
||||
res: {
|
||||
type: types.array,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'array' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
items: {
|
||||
type: types.object,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
ref: 'Note',
|
||||
}
|
||||
},
|
||||
|
|
|
@ -6,7 +6,6 @@ import { UserLists, UserListJoinings, Notes } from '../../../../models';
|
|||
import { makePaginationQuery } from '../../common/make-pagination-query';
|
||||
import { generateVisibilityQuery } from '../../common/generate-visibility-query';
|
||||
import { activeUsersChart } from '../../../../services/chart';
|
||||
import { types, bool } from '../../../../misc/schema';
|
||||
|
||||
export const meta = {
|
||||
desc: {
|
||||
|
@ -95,11 +94,11 @@ export const meta = {
|
|||
},
|
||||
|
||||
res: {
|
||||
type: types.array,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'array' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
items: {
|
||||
type: types.object,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
ref: 'Note',
|
||||
}
|
||||
},
|
||||
|
|
|
@ -2,7 +2,6 @@ import $ from 'cafy';
|
|||
import * as ms from 'ms';
|
||||
import define from '../../define';
|
||||
import { ID } from '../../../../misc/cafy-id';
|
||||
import { types, bool } from '../../../../misc/schema';
|
||||
import { Pages, DriveFiles } from '../../../../models';
|
||||
import { genId } from '../../../../misc/gen-id';
|
||||
import { Page } from '../../../../models/entities/page';
|
||||
|
@ -61,8 +60,8 @@ export const meta = {
|
|||
},
|
||||
|
||||
res: {
|
||||
type: types.object,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
ref: 'Page',
|
||||
},
|
||||
|
||||
|
|
|
@ -2,7 +2,6 @@ import $ from 'cafy';
|
|||
import define from '../../define';
|
||||
import { ApiError } from '../../error';
|
||||
import { Pages, Users } from '../../../../models';
|
||||
import { types, bool } from '../../../../misc/schema';
|
||||
import { ID } from '../../../../misc/cafy-id';
|
||||
import { Page } from '../../../../models/entities/page';
|
||||
|
||||
|
@ -34,8 +33,8 @@ export const meta = {
|
|||
},
|
||||
|
||||
res: {
|
||||
type: types.object,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
ref: 'Page',
|
||||
},
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import define from '../define';
|
||||
import { Users } from '../../../models';
|
||||
import { types, bool } from '../../../misc/schema';
|
||||
import { fetchMeta } from '../../../misc/fetch-meta';
|
||||
import parseAcct from '../../../misc/acct/parse';
|
||||
import { User } from '../../../models/entities/user';
|
||||
|
@ -14,11 +13,11 @@ export const meta = {
|
|||
},
|
||||
|
||||
res: {
|
||||
type: types.array,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'array' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
items: {
|
||||
type: types.object,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
ref: 'User',
|
||||
}
|
||||
},
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
import define from '../define';
|
||||
import { Notes, Users } from '../../../models';
|
||||
import { federationChart, driveChart } from '../../../services/chart';
|
||||
import { bool, types } from '../../../misc/schema';
|
||||
|
||||
export const meta = {
|
||||
requireCredential: false,
|
||||
|
@ -16,32 +15,32 @@ export const meta = {
|
|||
},
|
||||
|
||||
res: {
|
||||
type: types.object,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
properties: {
|
||||
notesCount: {
|
||||
type: types.number,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'number' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: 'The count of all (local/remote) notes of this instance.',
|
||||
},
|
||||
originalNotesCount: {
|
||||
type: types.number,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'number' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: 'The count of all local notes of this instance.',
|
||||
},
|
||||
usersCount: {
|
||||
type: types.number,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'number' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: 'The count of all (local/remote) accounts of this instance.',
|
||||
},
|
||||
originalUsersCount: {
|
||||
type: types.number,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'number' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: 'The count of all local accounts of this instance.',
|
||||
},
|
||||
instances: {
|
||||
type: types.number,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'number' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: 'The count of federated instances.',
|
||||
},
|
||||
}
|
||||
|
|
|
@ -2,7 +2,6 @@ import $ from 'cafy';
|
|||
import define from '../define';
|
||||
import { Users } from '../../../models';
|
||||
import { generateMuteQueryForUsers } from '../common/generate-mute-query';
|
||||
import { types, bool } from '../../../misc/schema';
|
||||
|
||||
export const meta = {
|
||||
tags: ['users'],
|
||||
|
@ -53,11 +52,11 @@ export const meta = {
|
|||
},
|
||||
|
||||
res: {
|
||||
type: types.array,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'array' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
items: {
|
||||
type: types.object,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
ref: 'User',
|
||||
}
|
||||
},
|
||||
|
|
|
@ -5,7 +5,6 @@ import { ApiError } from '../../error';
|
|||
import { Users, Followings } from '../../../../models';
|
||||
import { makePaginationQuery } from '../../common/make-pagination-query';
|
||||
import { toPunyNullable } from '../../../../misc/convert-host';
|
||||
import { types, bool } from '../../../../misc/schema';
|
||||
|
||||
export const meta = {
|
||||
desc: {
|
||||
|
@ -49,11 +48,11 @@ export const meta = {
|
|||
},
|
||||
|
||||
res: {
|
||||
type: types.array,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'array' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
items: {
|
||||
type: types.object,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
ref: 'Following',
|
||||
}
|
||||
},
|
||||
|
|
|
@ -5,7 +5,6 @@ import { ApiError } from '../../error';
|
|||
import { Users, Followings } from '../../../../models';
|
||||
import { makePaginationQuery } from '../../common/make-pagination-query';
|
||||
import { toPunyNullable } from '../../../../misc/convert-host';
|
||||
import { types, bool } from '../../../../misc/schema';
|
||||
|
||||
export const meta = {
|
||||
desc: {
|
||||
|
@ -49,11 +48,11 @@ export const meta = {
|
|||
},
|
||||
|
||||
res: {
|
||||
type: types.array,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'array' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
items: {
|
||||
type: types.object,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
ref: 'Following',
|
||||
}
|
||||
},
|
||||
|
|
|
@ -6,7 +6,6 @@ import { ApiError } from '../../error';
|
|||
import { getUser } from '../../common/getters';
|
||||
import { Not, In, IsNull } from 'typeorm';
|
||||
import { Notes, Users } from '../../../../models';
|
||||
import { types, bool } from '../../../../misc/schema';
|
||||
|
||||
export const meta = {
|
||||
tags: ['users'],
|
||||
|
@ -29,11 +28,11 @@ export const meta = {
|
|||
},
|
||||
|
||||
res: {
|
||||
type: types.array,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'array' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
items: {
|
||||
type: types.object,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
ref: 'User',
|
||||
}
|
||||
},
|
||||
|
|
|
@ -3,7 +3,6 @@ import define from '../../../define';
|
|||
import { UserGroups, UserGroupJoinings } from '../../../../../models';
|
||||
import { genId } from '../../../../../misc/gen-id';
|
||||
import { UserGroup } from '../../../../../models/entities/user-group';
|
||||
import { types, bool } from '../../../../../misc/schema';
|
||||
import { UserGroupJoining } from '../../../../../models/entities/user-group-joining';
|
||||
|
||||
export const meta = {
|
||||
|
@ -25,8 +24,8 @@ export const meta = {
|
|||
},
|
||||
|
||||
res: {
|
||||
type: types.object,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
ref: 'UserGroup',
|
||||
},
|
||||
};
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import define from '../../../define';
|
||||
import { UserGroups, UserGroupJoinings } from '../../../../../models';
|
||||
import { types, bool } from '../../../../../misc/schema';
|
||||
import { Not, In } from 'typeorm';
|
||||
|
||||
export const meta = {
|
||||
|
@ -15,11 +14,11 @@ export const meta = {
|
|||
kind: 'read:user-groups',
|
||||
|
||||
res: {
|
||||
type: types.array,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'array' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
items: {
|
||||
type: types.object,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
ref: 'UserGroup',
|
||||
}
|
||||
},
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import define from '../../../define';
|
||||
import { UserGroups } from '../../../../../models';
|
||||
import { types, bool } from '../../../../../misc/schema';
|
||||
|
||||
export const meta = {
|
||||
desc: {
|
||||
|
@ -14,11 +13,11 @@ export const meta = {
|
|||
kind: 'read:user-groups',
|
||||
|
||||
res: {
|
||||
type: types.array,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'array' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
items: {
|
||||
type: types.object,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
ref: 'UserGroup',
|
||||
}
|
||||
},
|
||||
|
|
|
@ -3,7 +3,6 @@ import { ID } from '../../../../../misc/cafy-id';
|
|||
import define from '../../../define';
|
||||
import { ApiError } from '../../../error';
|
||||
import { UserGroups, UserGroupJoinings } from '../../../../../models';
|
||||
import { types, bool } from '../../../../../misc/schema';
|
||||
|
||||
export const meta = {
|
||||
desc: {
|
||||
|
@ -24,8 +23,8 @@ export const meta = {
|
|||
},
|
||||
|
||||
res: {
|
||||
type: types.object,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
ref: 'UserGroup',
|
||||
},
|
||||
|
||||
|
|
|
@ -4,7 +4,6 @@ import define from '../../../define';
|
|||
import { ApiError } from '../../../error';
|
||||
import { getUser } from '../../../common/getters';
|
||||
import { UserGroups, UserGroupJoinings } from '../../../../../models';
|
||||
import { types, bool } from '../../../../../misc/schema';
|
||||
|
||||
export const meta = {
|
||||
desc: {
|
||||
|
@ -33,8 +32,8 @@ export const meta = {
|
|||
},
|
||||
|
||||
res: {
|
||||
type: types.object,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
ref: 'UserGroup',
|
||||
},
|
||||
|
||||
|
|
|
@ -3,7 +3,6 @@ import { ID } from '../../../../../misc/cafy-id';
|
|||
import define from '../../../define';
|
||||
import { ApiError } from '../../../error';
|
||||
import { UserGroups } from '../../../../../models';
|
||||
import { types, bool } from '../../../../../misc/schema';
|
||||
|
||||
export const meta = {
|
||||
desc: {
|
||||
|
@ -36,8 +35,8 @@ export const meta = {
|
|||
},
|
||||
|
||||
res: {
|
||||
type: types.object,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
ref: 'UserGroup',
|
||||
},
|
||||
|
||||
|
|
|
@ -3,7 +3,6 @@ import define from '../../../define';
|
|||
import { UserLists } from '../../../../../models';
|
||||
import { genId } from '../../../../../misc/gen-id';
|
||||
import { UserList } from '../../../../../models/entities/user-list';
|
||||
import { types, bool } from '../../../../../misc/schema';
|
||||
|
||||
export const meta = {
|
||||
desc: {
|
||||
|
@ -24,8 +23,8 @@ export const meta = {
|
|||
},
|
||||
|
||||
res: {
|
||||
type: types.object,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
ref: 'UserList',
|
||||
},
|
||||
};
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import define from '../../../define';
|
||||
import { UserLists } from '../../../../../models';
|
||||
import { types, bool } from '../../../../../misc/schema';
|
||||
|
||||
export const meta = {
|
||||
desc: {
|
||||
|
@ -14,11 +13,11 @@ export const meta = {
|
|||
kind: 'read:account',
|
||||
|
||||
res: {
|
||||
type: types.array,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'array' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
items: {
|
||||
type: types.object,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
ref: 'UserList',
|
||||
}
|
||||
},
|
||||
|
|
|
@ -3,7 +3,6 @@ import { ID } from '../../../../../misc/cafy-id';
|
|||
import define from '../../../define';
|
||||
import { ApiError } from '../../../error';
|
||||
import { UserLists } from '../../../../../models';
|
||||
import { types, bool } from '../../../../../misc/schema';
|
||||
|
||||
export const meta = {
|
||||
desc: {
|
||||
|
@ -24,8 +23,8 @@ export const meta = {
|
|||
},
|
||||
|
||||
res: {
|
||||
type: types.object,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
ref: 'UserList',
|
||||
},
|
||||
|
||||
|
|
|
@ -8,7 +8,6 @@ import { generateVisibilityQuery } from '../../common/generate-visibility-query'
|
|||
import { Notes } from '../../../../models';
|
||||
import { generateMuteQuery } from '../../common/generate-mute-query';
|
||||
import { Brackets } from 'typeorm';
|
||||
import { types, bool } from '../../../../misc/schema';
|
||||
|
||||
export const meta = {
|
||||
desc: {
|
||||
|
@ -120,11 +119,11 @@ export const meta = {
|
|||
},
|
||||
|
||||
res: {
|
||||
type: types.array,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'array' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
items: {
|
||||
type: types.object,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
ref: 'Note',
|
||||
}
|
||||
},
|
||||
|
|
|
@ -3,7 +3,6 @@ import $ from 'cafy';
|
|||
import define from '../../define';
|
||||
import { Users, Followings } from '../../../../models';
|
||||
import { generateMuteQueryForUsers } from '../../common/generate-mute-query';
|
||||
import { types, bool } from '../../../../misc/schema';
|
||||
|
||||
export const meta = {
|
||||
desc: {
|
||||
|
@ -29,11 +28,11 @@ export const meta = {
|
|||
},
|
||||
|
||||
res: {
|
||||
type: types.array,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'array' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
items: {
|
||||
type: types.object,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
ref: 'User',
|
||||
}
|
||||
},
|
||||
|
|
|
@ -2,7 +2,6 @@ import $ from 'cafy';
|
|||
import define from '../../define';
|
||||
import { Users } from '../../../../models';
|
||||
import { User } from '../../../../models/entities/user';
|
||||
import { bool, types } from '../../../../misc/schema';
|
||||
|
||||
export const meta = {
|
||||
desc: {
|
||||
|
@ -55,11 +54,11 @@ export const meta = {
|
|||
},
|
||||
|
||||
res: {
|
||||
type: types.array,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'array' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
items: {
|
||||
type: types.object,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
ref: 'User',
|
||||
}
|
||||
},
|
||||
|
|
|
@ -6,7 +6,6 @@ import { ApiError } from '../../error';
|
|||
import { ID } from '../../../../misc/cafy-id';
|
||||
import { Users } from '../../../../models';
|
||||
import { In } from 'typeorm';
|
||||
import { bool, types } from '../../../../misc/schema';
|
||||
|
||||
export const meta = {
|
||||
desc: {
|
||||
|
@ -43,8 +42,8 @@ export const meta = {
|
|||
},
|
||||
|
||||
res: {
|
||||
type: types.object,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
ref: 'User',
|
||||
},
|
||||
|
||||
|
|
|
@ -1,12 +1,10 @@
|
|||
import { types, bool } from '../../../../misc/schema';
|
||||
|
||||
export const logSchema = {
|
||||
/**
|
||||
* アクティブユーザー数
|
||||
*/
|
||||
count: {
|
||||
type: types.number,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'number' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: 'アクティブユーザー数',
|
||||
},
|
||||
};
|
||||
|
@ -15,17 +13,17 @@ export const logSchema = {
|
|||
* アクティブユーザーに関するチャート
|
||||
*/
|
||||
export const schema = {
|
||||
type: types.object,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
properties: {
|
||||
local: {
|
||||
type: types.object,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
properties: logSchema
|
||||
},
|
||||
remote: {
|
||||
type: types.object,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
properties: logSchema
|
||||
},
|
||||
}
|
||||
|
|
|
@ -1,12 +1,10 @@
|
|||
import { types, bool } from '../../../../misc/schema';
|
||||
|
||||
const logSchema = {
|
||||
/**
|
||||
* 集計期間時点での、全ドライブファイル数
|
||||
*/
|
||||
totalCount: {
|
||||
type: types.number,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'number' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: '集計期間時点での、全ドライブファイル数'
|
||||
},
|
||||
|
||||
|
@ -14,8 +12,8 @@ const logSchema = {
|
|||
* 集計期間時点での、全ドライブファイルの合計サイズ
|
||||
*/
|
||||
totalSize: {
|
||||
type: types.number,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'number' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: '集計期間時点での、全ドライブファイルの合計サイズ'
|
||||
},
|
||||
|
||||
|
@ -23,8 +21,8 @@ const logSchema = {
|
|||
* 増加したドライブファイル数
|
||||
*/
|
||||
incCount: {
|
||||
type: types.number,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'number' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: '増加したドライブファイル数'
|
||||
},
|
||||
|
||||
|
@ -32,8 +30,8 @@ const logSchema = {
|
|||
* 増加したドライブ使用量
|
||||
*/
|
||||
incSize: {
|
||||
type: types.number,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'number' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: '増加したドライブ使用量'
|
||||
},
|
||||
|
||||
|
@ -41,8 +39,8 @@ const logSchema = {
|
|||
* 減少したドライブファイル数
|
||||
*/
|
||||
decCount: {
|
||||
type: types.number,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'number' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: '減少したドライブファイル数'
|
||||
},
|
||||
|
||||
|
@ -50,24 +48,24 @@ const logSchema = {
|
|||
* 減少したドライブ使用量
|
||||
*/
|
||||
decSize: {
|
||||
type: types.number,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'number' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: '減少したドライブ使用量'
|
||||
},
|
||||
};
|
||||
|
||||
export const schema = {
|
||||
type: types.object,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
properties: {
|
||||
local: {
|
||||
type: types.object,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
properties: logSchema
|
||||
},
|
||||
remote: {
|
||||
type: types.object,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
properties: logSchema
|
||||
},
|
||||
}
|
||||
|
|
|
@ -1,29 +1,27 @@
|
|||
import { types, bool } from '../../../../misc/schema';
|
||||
|
||||
/**
|
||||
* フェデレーションに関するチャート
|
||||
*/
|
||||
export const schema = {
|
||||
type: types.object,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
properties: {
|
||||
instance: {
|
||||
type: types.object,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
properties: {
|
||||
total: {
|
||||
type: types.number,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'number' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: 'インスタンス数の合計'
|
||||
},
|
||||
inc: {
|
||||
type: types.number,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'number' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: '増加インスタンス数'
|
||||
},
|
||||
dec: {
|
||||
type: types.number,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'number' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: '減少インスタンス数'
|
||||
},
|
||||
}
|
||||
|
|
|
@ -1,12 +1,10 @@
|
|||
import { types, bool } from '../../../../misc/schema';
|
||||
|
||||
export const logSchema = {
|
||||
/**
|
||||
* 投稿された数
|
||||
*/
|
||||
count: {
|
||||
type: types.number,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'number' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: '投稿された数',
|
||||
},
|
||||
};
|
||||
|
@ -15,17 +13,17 @@ export const logSchema = {
|
|||
* ハッシュタグに関するチャート
|
||||
*/
|
||||
export const schema = {
|
||||
type: types.object,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
properties: {
|
||||
local: {
|
||||
type: types.object,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
properties: logSchema
|
||||
},
|
||||
remote: {
|
||||
type: types.object,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
properties: logSchema
|
||||
},
|
||||
}
|
||||
|
|
|
@ -1,73 +1,71 @@
|
|||
import { types, bool } from '../../../../misc/schema';
|
||||
|
||||
/**
|
||||
* インスタンスごとのチャート
|
||||
*/
|
||||
export const schema = {
|
||||
type: types.object,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
properties: {
|
||||
requests: {
|
||||
type: types.object,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
properties: {
|
||||
failed: {
|
||||
type: types.number,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'number' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: '失敗したリクエスト数'
|
||||
},
|
||||
succeeded: {
|
||||
type: types.number,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'number' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: '成功したリクエスト数'
|
||||
},
|
||||
received: {
|
||||
type: types.number,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'number' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: '受信したリクエスト数'
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
notes: {
|
||||
type: types.object,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
properties: {
|
||||
total: {
|
||||
type: types.number,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'number' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: '集計期間時点での、全投稿数'
|
||||
},
|
||||
inc: {
|
||||
type: types.number,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'number' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: '増加した投稿数'
|
||||
},
|
||||
dec: {
|
||||
type: types.number,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'number' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: '減少した投稿数'
|
||||
},
|
||||
|
||||
diffs: {
|
||||
type: types.object,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
properties: {
|
||||
normal: {
|
||||
type: types.number,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'number' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: '通常の投稿数の差分'
|
||||
},
|
||||
|
||||
reply: {
|
||||
type: types.number,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'number' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: 'リプライの投稿数の差分'
|
||||
},
|
||||
|
||||
renote: {
|
||||
type: types.number,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'number' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: 'Renoteの投稿数の差分'
|
||||
},
|
||||
}
|
||||
|
@ -76,103 +74,103 @@ export const schema = {
|
|||
},
|
||||
|
||||
users: {
|
||||
type: types.object,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
properties: {
|
||||
total: {
|
||||
type: types.number,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'number' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: '集計期間時点での、全ユーザー数'
|
||||
},
|
||||
inc: {
|
||||
type: types.number,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'number' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: '増加したユーザー数'
|
||||
},
|
||||
dec: {
|
||||
type: types.number,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'number' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: '減少したユーザー数'
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
following: {
|
||||
type: types.object,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
properties: {
|
||||
total: {
|
||||
type: types.number,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'number' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: '集計期間時点での、全フォロー数'
|
||||
},
|
||||
inc: {
|
||||
type: types.number,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'number' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: '増加したフォロー数'
|
||||
},
|
||||
dec: {
|
||||
type: types.number,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'number' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: '減少したフォロー数'
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
followers: {
|
||||
type: types.object,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
properties: {
|
||||
total: {
|
||||
type: types.number,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'number' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: '集計期間時点での、全フォロワー数'
|
||||
},
|
||||
inc: {
|
||||
type: types.number,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'number' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: '増加したフォロワー数'
|
||||
},
|
||||
dec: {
|
||||
type: types.number,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'number' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: '減少したフォロワー数'
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
drive: {
|
||||
type: types.object,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
properties: {
|
||||
totalFiles: {
|
||||
type: types.number,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'number' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: '集計期間時点での、全ドライブファイル数'
|
||||
},
|
||||
totalUsage: {
|
||||
type: types.number,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'number' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: '集計期間時点での、全ドライブファイルの合計サイズ'
|
||||
},
|
||||
incFiles: {
|
||||
type: types.number,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'number' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: '増加したドライブファイル数'
|
||||
},
|
||||
incUsage: {
|
||||
type: types.number,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'number' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: '増加したドライブ使用量'
|
||||
},
|
||||
decFiles: {
|
||||
type: types.number,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'number' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: '減少したドライブファイル数'
|
||||
},
|
||||
decUsage: {
|
||||
type: types.number,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'number' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: '減少したドライブ使用量'
|
||||
},
|
||||
}
|
||||
|
|
|
@ -1,35 +1,33 @@
|
|||
import { types, bool } from '../../../../misc/schema';
|
||||
|
||||
/**
|
||||
* ネットワークに関するチャート
|
||||
*/
|
||||
export const schema = {
|
||||
type: types.object,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
properties: {
|
||||
incomingRequests: {
|
||||
type: types.number,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'number' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: '受信したリクエスト数'
|
||||
},
|
||||
outgoingRequests: {
|
||||
type: types.number,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'number' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: '送信したリクエスト数'
|
||||
},
|
||||
totalTime: {
|
||||
type: types.number,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'number' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: '応答時間の合計' // TIP: (totalTime / incomingRequests) でひとつのリクエストに平均でどれくらいの時間がかかったか知れる
|
||||
},
|
||||
incomingBytes: {
|
||||
type: types.number,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'number' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: '合計受信データ量'
|
||||
},
|
||||
outgoingBytes: {
|
||||
type: types.number,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'number' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: '合計送信データ量'
|
||||
},
|
||||
}
|
||||
|
|
|
@ -1,43 +1,41 @@
|
|||
import { types, bool } from '../../../../misc/schema';
|
||||
|
||||
const logSchema = {
|
||||
total: {
|
||||
type: types.number,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'number' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: '集計期間時点での、全投稿数'
|
||||
},
|
||||
|
||||
inc: {
|
||||
type: types.number,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'number' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: '増加した投稿数'
|
||||
},
|
||||
|
||||
dec: {
|
||||
type: types.number,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'number' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: '減少した投稿数'
|
||||
},
|
||||
|
||||
diffs: {
|
||||
type: types.object,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
properties: {
|
||||
normal: {
|
||||
type: types.number,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'number' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: '通常の投稿数の差分'
|
||||
},
|
||||
|
||||
reply: {
|
||||
type: types.number,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'number' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: 'リプライの投稿数の差分'
|
||||
},
|
||||
|
||||
renote: {
|
||||
type: types.number,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'number' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: 'Renoteの投稿数の差分'
|
||||
},
|
||||
}
|
||||
|
@ -45,17 +43,17 @@ const logSchema = {
|
|||
};
|
||||
|
||||
export const schema = {
|
||||
type: types.object,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
properties: {
|
||||
local: {
|
||||
type: types.object,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
properties: logSchema
|
||||
},
|
||||
remote: {
|
||||
type: types.object,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
properties: logSchema
|
||||
},
|
||||
}
|
||||
|
|
|
@ -1,15 +1,13 @@
|
|||
import { types, bool } from '../../../../misc/schema';
|
||||
|
||||
export const schema = {
|
||||
type: types.object,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
properties: {
|
||||
/**
|
||||
* 集計期間時点での、全ドライブファイル数
|
||||
*/
|
||||
totalCount: {
|
||||
type: types.number,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'number' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: '集計期間時点での、全ドライブファイル数'
|
||||
},
|
||||
|
||||
|
@ -17,8 +15,8 @@ export const schema = {
|
|||
* 集計期間時点での、全ドライブファイルの合計サイズ
|
||||
*/
|
||||
totalSize: {
|
||||
type: types.number,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'number' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: '集計期間時点での、全ドライブファイルの合計サイズ'
|
||||
},
|
||||
|
||||
|
@ -26,8 +24,8 @@ export const schema = {
|
|||
* 増加したドライブファイル数
|
||||
*/
|
||||
incCount: {
|
||||
type: types.number,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'number' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: '増加したドライブファイル数'
|
||||
},
|
||||
|
||||
|
@ -35,8 +33,8 @@ export const schema = {
|
|||
* 増加したドライブ使用量
|
||||
*/
|
||||
incSize: {
|
||||
type: types.number,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'number' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: '増加したドライブ使用量'
|
||||
},
|
||||
|
||||
|
@ -44,8 +42,8 @@ export const schema = {
|
|||
* 減少したドライブファイル数
|
||||
*/
|
||||
decCount: {
|
||||
type: types.number,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'number' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: '減少したドライブファイル数'
|
||||
},
|
||||
|
||||
|
@ -53,8 +51,8 @@ export const schema = {
|
|||
* 減少したドライブ使用量
|
||||
*/
|
||||
decSize: {
|
||||
type: types.number,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'number' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: '減少したドライブ使用量'
|
||||
},
|
||||
}
|
||||
|
|
|
@ -1,19 +1,17 @@
|
|||
import { types, bool } from '../../../../misc/schema';
|
||||
|
||||
export const logSchema = {
|
||||
/**
|
||||
* フォローしている
|
||||
*/
|
||||
followings: {
|
||||
type: types.object,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
properties: {
|
||||
/**
|
||||
* フォローしている合計
|
||||
*/
|
||||
total: {
|
||||
type: types.number,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'number' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: 'フォローしている合計',
|
||||
},
|
||||
|
||||
|
@ -21,8 +19,8 @@ export const logSchema = {
|
|||
* フォローした数
|
||||
*/
|
||||
inc: {
|
||||
type: types.number,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'number' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: 'フォローした数',
|
||||
},
|
||||
|
||||
|
@ -30,8 +28,8 @@ export const logSchema = {
|
|||
* フォロー解除した数
|
||||
*/
|
||||
dec: {
|
||||
type: types.number,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'number' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: 'フォロー解除した数',
|
||||
},
|
||||
}
|
||||
|
@ -41,15 +39,15 @@ export const logSchema = {
|
|||
* フォローされている
|
||||
*/
|
||||
followers: {
|
||||
type: types.object,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
properties: {
|
||||
/**
|
||||
* フォローされている合計
|
||||
*/
|
||||
total: {
|
||||
type: types.number,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'number' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: 'フォローされている合計',
|
||||
},
|
||||
|
||||
|
@ -57,8 +55,8 @@ export const logSchema = {
|
|||
* フォローされた数
|
||||
*/
|
||||
inc: {
|
||||
type: types.number,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'number' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: 'フォローされた数',
|
||||
},
|
||||
|
||||
|
@ -66,8 +64,8 @@ export const logSchema = {
|
|||
* フォロー解除された数
|
||||
*/
|
||||
dec: {
|
||||
type: types.number,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'number' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: 'フォロー解除された数',
|
||||
},
|
||||
}
|
||||
|
@ -75,17 +73,17 @@ export const logSchema = {
|
|||
};
|
||||
|
||||
export const schema = {
|
||||
type: types.object,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
properties: {
|
||||
local: {
|
||||
type: types.object,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
properties: logSchema
|
||||
},
|
||||
remote: {
|
||||
type: types.object,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
properties: logSchema
|
||||
},
|
||||
}
|
||||
|
|
|
@ -1,46 +1,44 @@
|
|||
import { types, bool } from '../../../../misc/schema';
|
||||
|
||||
export const schema = {
|
||||
type: types.object,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
properties: {
|
||||
total: {
|
||||
type: types.number,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'number' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: '集計期間時点での、全投稿数'
|
||||
},
|
||||
|
||||
inc: {
|
||||
type: types.number,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'number' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: '増加した投稿数'
|
||||
},
|
||||
|
||||
dec: {
|
||||
type: types.number,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'number' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: '減少した投稿数'
|
||||
},
|
||||
|
||||
diffs: {
|
||||
type: types.object,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
properties: {
|
||||
normal: {
|
||||
type: types.number,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'number' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: '通常の投稿数の差分'
|
||||
},
|
||||
|
||||
reply: {
|
||||
type: types.number,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'number' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: 'リプライの投稿数の差分'
|
||||
},
|
||||
|
||||
renote: {
|
||||
type: types.number,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'number' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: 'Renoteの投稿数の差分'
|
||||
},
|
||||
}
|
||||
|
|
|
@ -1,12 +1,10 @@
|
|||
import { types, bool } from '../../../../misc/schema';
|
||||
|
||||
export const logSchema = {
|
||||
/**
|
||||
* フォローしている合計
|
||||
*/
|
||||
count: {
|
||||
type: types.number,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'number' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: 'リアクションされた数',
|
||||
},
|
||||
};
|
||||
|
@ -15,17 +13,17 @@ export const logSchema = {
|
|||
* ユーザーごとのリアクションに関するチャート
|
||||
*/
|
||||
export const schema = {
|
||||
type: types.object,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
properties: {
|
||||
local: {
|
||||
type: types.object,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
properties: logSchema
|
||||
},
|
||||
remote: {
|
||||
type: types.object,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
properties: logSchema
|
||||
},
|
||||
}
|
||||
|
|
|
@ -1,28 +1,26 @@
|
|||
import { types, bool } from '../../../../misc/schema';
|
||||
|
||||
export const schema = {
|
||||
type: types.object,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
properties: {
|
||||
foo: {
|
||||
type: types.object,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
properties: {
|
||||
total: {
|
||||
type: types.number,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'number' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: ''
|
||||
},
|
||||
|
||||
inc: {
|
||||
type: types.number,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'number' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: ''
|
||||
},
|
||||
|
||||
dec: {
|
||||
type: types.number,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'number' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: ''
|
||||
},
|
||||
}
|
||||
|
|
|
@ -1,12 +1,10 @@
|
|||
import { types, bool } from '../../../../misc/schema';
|
||||
|
||||
export const schema = {
|
||||
type: types.object,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
properties: {
|
||||
foo: {
|
||||
type: types.number,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'number' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: ''
|
||||
},
|
||||
}
|
||||
|
|
|
@ -1,28 +1,26 @@
|
|||
import { types, bool } from '../../../../misc/schema';
|
||||
|
||||
export const schema = {
|
||||
type: types.object,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
properties: {
|
||||
foo: {
|
||||
type: types.object,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
properties: {
|
||||
total: {
|
||||
type: types.number,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'number' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: ''
|
||||
},
|
||||
|
||||
inc: {
|
||||
type: types.number,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'number' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: ''
|
||||
},
|
||||
|
||||
dec: {
|
||||
type: types.number,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
type: 'number' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
description: ''
|
||||
},
|
||||
}
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue