diff --git a/Card/Statistics.ts b/Card/Statistics.ts new file mode 100644 index 00000000..b39f724e --- /dev/null +++ b/Card/Statistics.ts @@ -0,0 +1,16 @@ +import { isoly } from "isoly" +import { Scheme } from "./Scheme" + +export namespace Statistics { + export type Request = { + scheme: Scheme + range: isoly.DateRange + options?: { limit: number; cursor?: string } + } + export type Response = { + new: number + old: number + withTransaction: number + cursor?: string + } +} diff --git a/Card/index.ts b/Card/index.ts index 004aba30..4653c690 100644 --- a/Card/index.ts +++ b/Card/index.ts @@ -13,6 +13,7 @@ import { Operation as CardOperation } from "./Operation" import { Preset as CardPreset } from "./Preset" import { Scheme as CardScheme } from "./Scheme" import { Stack as CardStack } from "./Stack" +import { Statistics as CardStatistics } from "./Statistics" export interface Card { id: string @@ -72,6 +73,7 @@ export namespace Card { export import Operation = CardOperation export import Scheme = CardScheme export import Stack = CardStack + export import Statistics = CardStatistics const csvMap: Record string | number | undefined> = { id: card => card.id, created: card => readableDate(card.created),