-
Notifications
You must be signed in to change notification settings - Fork 0
/
types.ts
115 lines (99 loc) · 2.08 KB
/
types.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
export type Maybe<T> = T | null
export interface OverridableTokenClientConfig {
prompt?: string
enable_serial_consent?: boolean
hint?: string
state?: string
}
export interface TokenClient {
callback?: (resp: TokenResponse) => void
requestAccessToken: (overrideConfig?: OverridableTokenClientConfig) => void
}
export interface TokenResponse {
access_token: string
expires_in: string
hd: string
prompt: string
token_type: string
scopes: string
state: string
error: string
error_description: string
error_uri: string
}
export type Table = {
name: string
distribution: Record<string, Record<string, number>>
cols: Array<string>
startRow: number
endRow: number
}
export type Addresser = {
epoch: (arg?: any) => string
top: (arg?: any) => string
guild: (arg?: any) => string
player: (arg?: any) => string
divided_by: (arg?: any) => string
distributed_to: (arg?: any) => string
} & ((arg: any | Array<any>) => string)
export type ElementSource = {
id: string
type?: string
}
export type SourceArg = ElementSource | Array<ElementSource>
export type DateRange = {
start: Date
end: Date
toString: () => string
}
export type Epoch = DateRange & {
top: Circle
circles: Record<string, Circle>
participants: Record<string, Participant>
}
export type CircleBase = {
type: 'circle'
id: string
name: string
actors: Array<Participant>
totals: Record<string, number>
}
export type UnresolvedCircle = CircleBase & {
distribution: Record<
string,
{
destination: string
allotments: Record<string, number>
}
>
actees: Array<string>
}
export type Circle = CircleBase & {
distribution: Record<
string,
{
destination: Circle | Participant
allotments: Record<string, number>
}
>
actees: Array<Participant | Circle>
}
export type Participant = {
type: 'participant'
id: string
name: string
address: string
}
export type NamedScore = {
name: string
score: number
}
export type CredScore = {
identity: {
name: string
}
cred: number
}
export type PapaResult = {
data: Array<any>
}