1
0
Files
pawkey-sk/packages/backend/src/services/chart/charts/ap-request.ts
T
syuilo d071d18dd7 refactor: Use ESM (#8358)
* wip

* wip

* fix

* clean up

* Update tsconfig.json

* Update activitypub.ts

* wip
2022-02-27 11:07:39 +09:00

39 lines
777 B
TypeScript

import Chart, { KVs } from '../core.js';
import { name, schema } from './entities/ap-request.js';
/**
* Chart about ActivityPub requests
*/
// eslint-disable-next-line import/no-default-export
export default class ApRequestChart extends Chart<typeof schema> {
constructor() {
super(name, schema);
}
protected async tickMajor(): Promise<Partial<KVs<typeof schema>>> {
return {};
}
protected async tickMinor(): Promise<Partial<KVs<typeof schema>>> {
return {};
}
public async deliverSucc(): Promise<void> {
await this.commit({
'deliverSucceeded': 1,
});
}
public async deliverFail(): Promise<void> {
await this.commit({
'deliverFailed': 1,
});
}
public async inbox(): Promise<void> {
await this.commit({
'inboxReceived': 1,
});
}
}