1
0
mirror of https://github.com/MisskeyIO/misskey synced 2024-11-24 07:06:22 +09:00

Improve doc

This commit is contained in:
syuilo 2019-02-24 10:08:09 +09:00
parent 97b99867f2
commit ac0390fec3
No known key found for this signature in database
GPG Key ID: BDC4C49D06AB9D69
2 changed files with 52 additions and 35 deletions

View File

@ -1,7 +1,8 @@
import $ from 'cafy';
import define from '../../../define';
import perUserDriveChart from '../../../../../services/chart/per-user-drive';
import perUserDriveChart, { perUserDriveLogSchema } from '../../../../../services/chart/per-user-drive';
import ID, { transform } from '../../../../../misc/cafy-id';
import { convertLog } from '../../../../../services/chart';
export const meta = {
stability: 'stable',
@ -38,12 +39,7 @@ export const meta = {
}
},
res: {
type: 'array',
items: {
type: 'object',
},
},
res: convertLog(perUserDriveLogSchema),
};
export default define(meta, async (ps) => {

View File

@ -1,42 +1,63 @@
import autobind from 'autobind-decorator';
import Chart, { Obj } from './';
import DriveFile, { IDriveFile } from '../../models/drive-file';
import { SchemaType } from '../../prelude/schema';
/**
*
*/
type PerUserDriveLog = {
/**
*
*/
totalCount: number;
export const perUserDriveLogSchema = {
type: 'object' as 'object',
properties: {
/**
*
*/
totalCount: {
type: 'number' as 'number',
description: '集計期間時点での、全ドライブファイル数'
},
/**
*
*/
totalSize: number;
/**
*
*/
totalSize: {
type: 'number' as 'number',
description: '集計期間時点での、全ドライブファイルの合計サイズ'
},
/**
*
*/
incCount: number;
/**
*
*/
incCount: {
type: 'number' as 'number',
description: '増加したドライブファイル数'
},
/**
* 使
*/
incSize: number;
/**
* 使
*/
incSize: {
type: 'number' as 'number',
description: '増加したドライブ使用量'
},
/**
*
*/
decCount: number;
/**
*
*/
decCount: {
type: 'number' as 'number',
description: '減少したドライブファイル数'
},
/**
* 使
*/
decSize: number;
/**
* 使
*/
decSize: {
type: 'number' as 'number',
description: '減少したドライブ使用量'
},
}
};
type PerUserDriveLog = SchemaType<typeof perUserDriveLogSchema>;
class PerUserDriveChart extends Chart<PerUserDriveLog> {
constructor() {
super('perUserDrive', true);