chartsSchemasオブジェクトに集約

This commit is contained in:
tamaina
2023-06-05 06:05:36 +00:00
parent 9530cb01b9
commit bb46030677
34 changed files with 191 additions and 228 deletions

View File

@@ -1,7 +1,7 @@
import Chart from '../../core.js';
import * as _ from 'misskey-js/built/schemas/charts/active-users.js';
export const name = _.name;
export const schema = _.schema;
import { chartsSchemas } from 'misskey-js/built/schemas/charts.js';
export const name = 'activeUsers' as const;
export const schema = chartsSchemas[name];
export const entity = Chart.schemaToEntity(name, schema);

View File

@@ -1,7 +1,7 @@
import Chart from '../../core.js';
import * as _ from 'misskey-js/built/schemas/charts/ap-request.js';
export const name = _.name;
export const schema = _.schema;
import { chartsSchemas } from 'misskey-js/built/schemas/charts.js';
export const name = 'apRequest' as const;
export const schema = chartsSchemas[name];
export const entity = Chart.schemaToEntity(name, schema);

View File

@@ -1,7 +1,7 @@
import Chart from '../../core.js';
import * as _ from 'misskey-js/built/schemas/charts/drive.js';
export const name = _.name;
export const schema = _.schema;
import { chartsSchemas } from 'misskey-js/built/schemas/charts.js';
export const name = 'drive' as const;
export const schema = chartsSchemas[name];
export const entity = Chart.schemaToEntity(name, schema);

View File

@@ -1,7 +1,7 @@
import Chart from '../../core.js';
import * as _ from 'misskey-js/built/schemas/charts/federation.js';
export const name = _.name;
export const schema = _.schema;
import { chartsSchemas } from 'misskey-js/built/schemas/charts.js';
export const name = 'federation' as const;
export const schema = chartsSchemas[name];
export const entity = Chart.schemaToEntity(name, schema);

View File

@@ -1,7 +1,7 @@
import Chart from '../../core.js';
import * as _ from 'misskey-js/built/schemas/charts/instance.js';
export const name = _.name;
export const schema = _.schema;
import { chartsSchemas } from 'misskey-js/built/schemas/charts.js';
export const name = 'instance' as const;
export const schema = chartsSchemas[name];
export const entity = Chart.schemaToEntity(name, schema, true);

View File

@@ -1,7 +1,7 @@
import Chart from '../../core.js';
import * as _ from 'misskey-js/built/schemas/charts/notes.js';
export const name = _.name;
export const schema = _.schema;
import { chartsSchemas } from 'misskey-js/built/schemas/charts.js';
export const name = 'notes' as const;
export const schema = chartsSchemas[name];
export const entity = Chart.schemaToEntity(name, schema);

View File

@@ -1,7 +1,7 @@
import Chart from '../../core.js';
import * as _ from 'misskey-js/built/schemas/charts/per-user-drive.js';
export const name = _.name;
export const schema = _.schema;
import { chartsSchemas } from 'misskey-js/built/schemas/charts.js';
export const name = 'perUserDrive' as const;
export const schema = chartsSchemas[name];
export const entity = Chart.schemaToEntity(name, schema, true);

View File

@@ -1,7 +1,7 @@
import Chart from '../../core.js';
import * as _ from 'misskey-js/built/schemas/charts/per-user-following.js';
export const name = _.name;
export const schema = _.schema;
import { chartsSchemas } from 'misskey-js/built/schemas/charts.js';
export const name = 'perUserFollowing' as const;
export const schema = chartsSchemas[name];
export const entity = Chart.schemaToEntity(name, schema, true);

View File

@@ -1,7 +1,7 @@
import Chart from '../../core.js';
import * as _ from 'misskey-js/built/schemas/charts/per-user-notes.js';
export const name = _.name;
export const schema = _.schema;
import { chartsSchemas } from 'misskey-js/built/schemas/charts.js';
export const name = 'perUserNotes' as const;
export const schema = chartsSchemas[name];
export const entity = Chart.schemaToEntity(name, schema, true);

View File

@@ -1,7 +1,7 @@
import Chart from '../../core.js';
import * as _ from 'misskey-js/built/schemas/charts/per-user-pv.js';
export const name = _.name;
export const schema = _.schema;
import { chartsSchemas } from 'misskey-js/built/schemas/charts.js';
export const name = 'perUserPv' as const;
export const schema = chartsSchemas[name];
export const entity = Chart.schemaToEntity(name, schema, true);

View File

@@ -1,7 +1,7 @@
import Chart from '../../core.js';
import * as _ from 'misskey-js/built/schemas/charts/per-user-reactions.js';
export const name = _.name;
export const schema = _.schema;
import { chartsSchemas } from 'misskey-js/built/schemas/charts.js';
export const name = 'perUserReactions' as const;
export const schema = chartsSchemas[name];
export const entity = Chart.schemaToEntity(name, schema, true);

View File

@@ -1,7 +1,7 @@
import Chart from '../../core.js';
import * as _ from 'misskey-js/built/schemas/charts/test-grouped.js';
export const name = _.name;
export const schema = _.schema;
import { chartsSchemas } from 'misskey-js/built/schemas/charts.js';
export const name = 'testGrouped';
export const schema = chartsSchemas[name];
export const entity = Chart.schemaToEntity(name, schema, true);

View File

@@ -1,7 +1,7 @@
import Chart from '../../core.js';
import * as _ from 'misskey-js/built/schemas/charts/test-intersection.js';
export const name = _.name;
export const schema = _.schema;
import { chartsSchemas } from 'misskey-js/built/schemas/charts.js';
export const name = 'testIntersection';
export const schema = chartsSchemas[name];
export const entity = Chart.schemaToEntity(name, schema);

View File

@@ -1,7 +1,7 @@
import Chart from '../../core.js';
import * as _ from 'misskey-js/built/schemas/charts/test-unique.js';
export const name = _.name;
export const schema = _.schema;
import { chartsSchemas } from 'misskey-js/built/schemas/charts.js';
export const name = 'testUnique';
export const schema = chartsSchemas[name];
export const entity = Chart.schemaToEntity(name, schema);

View File

@@ -1,7 +1,7 @@
import Chart from '../../core.js';
import * as _ from 'misskey-js/built/schemas/charts/test.js';
export const name = _.name;
export const schema = _.schema;
import { chartsSchemas } from 'misskey-js/built/schemas/charts.js';
export const name = 'test';
export const schema = chartsSchemas[name];
export const entity = Chart.schemaToEntity(name, schema);

View File

@@ -1,7 +1,7 @@
import Chart from '../../core.js';
import * as _ from 'misskey-js/built/schemas/charts/users.js';
export const name = _.name;
export const schema = _.schema;
import { chartsSchemas } from 'misskey-js/built/schemas/charts.js';
export const name = 'users';
export const schema = chartsSchemas[name];
export const entity = Chart.schemaToEntity(name, schema);