mirror of
https://github.com/kokonect-link/cherrypick
synced 2024-10-31 07:11:47 +09:00
Improve doc
This commit is contained in:
parent
a55d5516a6
commit
97b99867f2
@ -1,7 +1,8 @@
|
|||||||
import $ from 'cafy';
|
import $ from 'cafy';
|
||||||
import define from '../../../define';
|
import define from '../../../define';
|
||||||
import perUserNotesChart from '../../../../../services/chart/per-user-notes';
|
import perUserNotesChart, { perUserNotesLogSchema } from '../../../../../services/chart/per-user-notes';
|
||||||
import ID, { transform } from '../../../../../misc/cafy-id';
|
import ID, { transform } from '../../../../../misc/cafy-id';
|
||||||
|
import { convertLog } from '../../../../../services/chart';
|
||||||
|
|
||||||
export const meta = {
|
export const meta = {
|
||||||
stability: 'stable',
|
stability: 'stable',
|
||||||
@ -38,12 +39,7 @@ export const meta = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
res: {
|
res: convertLog(perUserNotesLogSchema),
|
||||||
type: 'array',
|
|
||||||
items: {
|
|
||||||
type: 'object',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export default define(meta, async (ps) => {
|
export default define(meta, async (ps) => {
|
||||||
|
@ -2,44 +2,50 @@ import autobind from 'autobind-decorator';
|
|||||||
import Chart, { Obj } from './';
|
import Chart, { Obj } from './';
|
||||||
import Note, { INote } from '../../models/note';
|
import Note, { INote } from '../../models/note';
|
||||||
import { IUser } from '../../models/user';
|
import { IUser } from '../../models/user';
|
||||||
|
import { SchemaType } from '../../prelude/schema';
|
||||||
|
|
||||||
/**
|
export const perUserNotesLogSchema = {
|
||||||
* ユーザーごとの投稿に関するチャート
|
type: 'object' as 'object',
|
||||||
*/
|
properties: {
|
||||||
type PerUserNotesLog = {
|
total: {
|
||||||
/**
|
type: 'number' as 'number',
|
||||||
* 集計期間時点での、全投稿数
|
description: '集計期間時点での、全投稿数'
|
||||||
*/
|
},
|
||||||
total: number;
|
|
||||||
|
|
||||||
/**
|
inc: {
|
||||||
* 増加した投稿数
|
type: 'number' as 'number',
|
||||||
*/
|
description: '増加した投稿数'
|
||||||
inc: number;
|
},
|
||||||
|
|
||||||
/**
|
dec: {
|
||||||
* 減少した投稿数
|
type: 'number' as 'number',
|
||||||
*/
|
description: '減少した投稿数'
|
||||||
dec: number;
|
},
|
||||||
|
|
||||||
diffs: {
|
diffs: {
|
||||||
/**
|
type: 'object' as 'object',
|
||||||
* 通常の投稿数の差分
|
properties: {
|
||||||
*/
|
normal: {
|
||||||
normal: number;
|
type: 'number' as 'number',
|
||||||
|
description: '通常の投稿数の差分'
|
||||||
|
},
|
||||||
|
|
||||||
/**
|
reply: {
|
||||||
* リプライの投稿数の差分
|
type: 'number' as 'number',
|
||||||
*/
|
description: 'リプライの投稿数の差分'
|
||||||
reply: number;
|
},
|
||||||
|
|
||||||
/**
|
renote: {
|
||||||
* Renoteの投稿数の差分
|
type: 'number' as 'number',
|
||||||
*/
|
description: 'Renoteの投稿数の差分'
|
||||||
renote: number;
|
},
|
||||||
};
|
}
|
||||||
|
},
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
type PerUserNotesLog = SchemaType<typeof perUserNotesLogSchema>;
|
||||||
|
|
||||||
class PerUserNotesChart extends Chart<PerUserNotesLog> {
|
class PerUserNotesChart extends Chart<PerUserNotesLog> {
|
||||||
constructor() {
|
constructor() {
|
||||||
super('perUserNotes', true);
|
super('perUserNotes', true);
|
||||||
|
Loading…
Reference in New Issue
Block a user