forked from mirrors/misskey
wip
This commit is contained in:
13
packages/misskey-js/src/schemas/charts/active-users.ts
Normal file
13
packages/misskey-js/src/schemas/charts/active-users.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
export const name = 'activeUsers';
|
||||
|
||||
export const schema = {
|
||||
'readWrite': { intersection: ['read', 'write'] },
|
||||
'read': { uniqueIncrement: true },
|
||||
'write': { uniqueIncrement: true },
|
||||
'registeredWithinWeek': { uniqueIncrement: true },
|
||||
'registeredWithinMonth': { uniqueIncrement: true },
|
||||
'registeredWithinYear': { uniqueIncrement: true },
|
||||
'registeredOutsideWeek': { uniqueIncrement: true },
|
||||
'registeredOutsideMonth': { uniqueIncrement: true },
|
||||
'registeredOutsideYear': { uniqueIncrement: true },
|
||||
} as const;
|
||||
7
packages/misskey-js/src/schemas/charts/ap-request.ts
Normal file
7
packages/misskey-js/src/schemas/charts/ap-request.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
export const name = 'apRequest';
|
||||
|
||||
export const schema = {
|
||||
'deliverFailed': { },
|
||||
'deliverSucceeded': { },
|
||||
'inboxReceived': { },
|
||||
} as const;
|
||||
12
packages/misskey-js/src/schemas/charts/drive.ts
Normal file
12
packages/misskey-js/src/schemas/charts/drive.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
export const name = 'drive';
|
||||
|
||||
export const schema = {
|
||||
'local.incCount': {},
|
||||
'local.incSize': {}, // in kilobyte
|
||||
'local.decCount': {},
|
||||
'local.decSize': {}, // in kilobyte
|
||||
'remote.incCount': {},
|
||||
'remote.incSize': {}, // in kilobyte
|
||||
'remote.decCount': {},
|
||||
'remote.decSize': {}, // in kilobyte
|
||||
} as const;
|
||||
12
packages/misskey-js/src/schemas/charts/federation.ts
Normal file
12
packages/misskey-js/src/schemas/charts/federation.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
export const name = 'federation';
|
||||
|
||||
export const schema = {
|
||||
'deliveredInstances': { uniqueIncrement: true, range: 'small' },
|
||||
'inboxInstances': { uniqueIncrement: true, range: 'small' },
|
||||
'stalled': { uniqueIncrement: true, range: 'small' },
|
||||
'sub': { accumulate: true, range: 'small' },
|
||||
'pub': { accumulate: true, range: 'small' },
|
||||
'pubsub': { accumulate: true, range: 'small' },
|
||||
'subActive': { accumulate: true, range: 'small' },
|
||||
'pubActive': { accumulate: true, range: 'small' },
|
||||
} as const;
|
||||
28
packages/misskey-js/src/schemas/charts/instance.ts
Normal file
28
packages/misskey-js/src/schemas/charts/instance.ts
Normal file
@@ -0,0 +1,28 @@
|
||||
export const name = 'instance';
|
||||
|
||||
export const schema = {
|
||||
'requests.failed': { range: 'small' },
|
||||
'requests.succeeded': { range: 'small' },
|
||||
'requests.received': { range: 'small' },
|
||||
'notes.total': { accumulate: true },
|
||||
'notes.inc': {},
|
||||
'notes.dec': {},
|
||||
'notes.diffs.normal': {},
|
||||
'notes.diffs.reply': {},
|
||||
'notes.diffs.renote': {},
|
||||
'notes.diffs.withFile': {},
|
||||
'users.total': { accumulate: true },
|
||||
'users.inc': { range: 'small' },
|
||||
'users.dec': { range: 'small' },
|
||||
'following.total': { accumulate: true },
|
||||
'following.inc': { range: 'small' },
|
||||
'following.dec': { range: 'small' },
|
||||
'followers.total': { accumulate: true },
|
||||
'followers.inc': { range: 'small' },
|
||||
'followers.dec': { range: 'small' },
|
||||
'drive.totalFiles': { accumulate: true },
|
||||
'drive.incFiles': {},
|
||||
'drive.decFiles': {},
|
||||
'drive.incUsage': {}, // in kilobyte
|
||||
'drive.decUsage': {}, // in kilobyte
|
||||
} as const;
|
||||
18
packages/misskey-js/src/schemas/charts/notes.ts
Normal file
18
packages/misskey-js/src/schemas/charts/notes.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
export const name = 'notes';
|
||||
|
||||
export const schema = {
|
||||
'local.total': { accumulate: true },
|
||||
'local.inc': {},
|
||||
'local.dec': {},
|
||||
'local.diffs.normal': {},
|
||||
'local.diffs.reply': {},
|
||||
'local.diffs.renote': {},
|
||||
'local.diffs.withFile': {},
|
||||
'remote.total': { accumulate: true },
|
||||
'remote.inc': {},
|
||||
'remote.dec': {},
|
||||
'remote.diffs.normal': {},
|
||||
'remote.diffs.reply': {},
|
||||
'remote.diffs.renote': {},
|
||||
'remote.diffs.withFile': {},
|
||||
} as const;
|
||||
10
packages/misskey-js/src/schemas/charts/per-user-drive.ts
Normal file
10
packages/misskey-js/src/schemas/charts/per-user-drive.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
export const name = 'perUserDrive';
|
||||
|
||||
export const schema = {
|
||||
'totalCount': { accumulate: true },
|
||||
'totalSize': { accumulate: true }, // in kilobyte
|
||||
'incCount': { range: 'small' },
|
||||
'incSize': {}, // in kilobyte
|
||||
'decCount': { range: 'small' },
|
||||
'decSize': {}, // in kilobyte
|
||||
} as const;
|
||||
16
packages/misskey-js/src/schemas/charts/per-user-following.ts
Normal file
16
packages/misskey-js/src/schemas/charts/per-user-following.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
export const name = 'perUserFollowing';
|
||||
|
||||
export const schema = {
|
||||
'local.followings.total': { accumulate: true },
|
||||
'local.followings.inc': { range: 'small' },
|
||||
'local.followings.dec': { range: 'small' },
|
||||
'local.followers.total': { accumulate: true },
|
||||
'local.followers.inc': { range: 'small' },
|
||||
'local.followers.dec': { range: 'small' },
|
||||
'remote.followings.total': { accumulate: true },
|
||||
'remote.followings.inc': { range: 'small' },
|
||||
'remote.followings.dec': { range: 'small' },
|
||||
'remote.followers.total': { accumulate: true },
|
||||
'remote.followers.inc': { range: 'small' },
|
||||
'remote.followers.dec': { range: 'small' },
|
||||
} as const;
|
||||
11
packages/misskey-js/src/schemas/charts/per-user-notes.ts
Normal file
11
packages/misskey-js/src/schemas/charts/per-user-notes.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
export const name = 'perUserNotes';
|
||||
|
||||
export const schema = {
|
||||
'total': { accumulate: true },
|
||||
'inc': { range: 'small' },
|
||||
'dec': { range: 'small' },
|
||||
'diffs.normal': { range: 'small' },
|
||||
'diffs.reply': { range: 'small' },
|
||||
'diffs.renote': { range: 'small' },
|
||||
'diffs.withFile': { range: 'small' },
|
||||
} as const;
|
||||
8
packages/misskey-js/src/schemas/charts/per-user-pv.ts
Normal file
8
packages/misskey-js/src/schemas/charts/per-user-pv.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
export const name = 'perUserPv';
|
||||
|
||||
export const schema = {
|
||||
'upv.user': { uniqueIncrement: true, range: 'small' },
|
||||
'pv.user': { range: 'small' },
|
||||
'upv.visitor': { uniqueIncrement: true, range: 'small' },
|
||||
'pv.visitor': { range: 'small' },
|
||||
} as const;
|
||||
@@ -0,0 +1,6 @@
|
||||
export const name = 'perUserReaction';
|
||||
|
||||
export const schema = {
|
||||
'local.count': { range: 'small' },
|
||||
'remote.count': { range: 'small' },
|
||||
} as const;
|
||||
7
packages/misskey-js/src/schemas/charts/test-grouped.ts
Normal file
7
packages/misskey-js/src/schemas/charts/test-grouped.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
export const name = 'testGrouped';
|
||||
|
||||
export const schema = {
|
||||
'foo.total': { accumulate: true },
|
||||
'foo.inc': {},
|
||||
'foo.dec': {},
|
||||
} as const;
|
||||
@@ -0,0 +1,7 @@
|
||||
export const name = 'testIntersection';
|
||||
|
||||
export const schema = {
|
||||
'a': { uniqueIncrement: true },
|
||||
'b': { uniqueIncrement: true },
|
||||
'aAndB': { intersection: ['a', 'b'] },
|
||||
} as const;
|
||||
5
packages/misskey-js/src/schemas/charts/test-unique.ts
Normal file
5
packages/misskey-js/src/schemas/charts/test-unique.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
export const name = 'testUnique';
|
||||
|
||||
export const schema = {
|
||||
'foo': { uniqueIncrement: true },
|
||||
} as const;
|
||||
7
packages/misskey-js/src/schemas/charts/test.ts
Normal file
7
packages/misskey-js/src/schemas/charts/test.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
export const name = 'test';
|
||||
|
||||
export const schema = {
|
||||
'foo.total': { accumulate: true },
|
||||
'foo.inc': {},
|
||||
'foo.dec': {},
|
||||
} as const;
|
||||
10
packages/misskey-js/src/schemas/charts/users.ts
Normal file
10
packages/misskey-js/src/schemas/charts/users.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
export const name = 'users';
|
||||
|
||||
export const schema = {
|
||||
'local.total': { accumulate: true },
|
||||
'local.inc': { range: 'small' },
|
||||
'local.dec': { range: 'small' },
|
||||
'remote.total': { accumulate: true },
|
||||
'remote.inc': { range: 'small' },
|
||||
'remote.dec': { range: 'small' },
|
||||
} as const;
|
||||
Reference in New Issue
Block a user