-
-
Notifications
You must be signed in to change notification settings - Fork 158
Expand file tree
/
Copy pathtypes.ts
More file actions
113 lines (107 loc) · 2.17 KB
/
types.ts
File metadata and controls
113 lines (107 loc) · 2.17 KB
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
import { Literal as L, Record, Static, Union } from "runtypes"
import { z } from "zod"
export const Role = Union(
L("user"),
L("admin"),
L("legislator"),
L("pendingUpgrade"),
L("organization")
)
export type Role = Static<typeof Role>
export const ZRole = z.enum([
"user",
"admin",
"legislator",
"pendingUpgrade",
"organization"
])
/** Custom-claim payload used for authorization. */
export const Claim = Record({
role: Role
})
export type Claim = Static<typeof Claim>
export const Frequency = Union(L("Weekly"), L("Monthly"), L("None"))
export type Frequency = Static<typeof Frequency>
export const OrgCategory = Union(
L("Agriculture"),
L("Animal Rights"),
L("Automotive"),
L("Civil Rights"),
L("Communications"),
L("Consumer Goods"),
L("Criminal Justice"),
L("Prison Reform"),
L("Education"),
L("Elder Care"),
L("Employment/Labor"),
L("Environment"),
L("Financial"),
L("Food"),
L("Good Government"),
L("Human Rights"),
L("Children's Rights"),
L("Death Penalty"),
L("Disabeled Rights"),
L("LGBTQ+ Rights"),
L("Housing"),
L("Immigration"),
L("Insurance"),
L("Internet & Technology"),
L("Legal"),
L("Medical/Health"),
L("Poverty"),
L("Privacy"),
L("Racial Justice"),
L("Regional"),
L("Refugee"),
L("Reproductive Health"),
L("Pharmaceuticals"),
L("Small & Local Business"),
L("Taxes"),
L("Water"),
L("Women's Rights"),
L("Multi-issue"),
L("Other")
)
export type OrgCategory = Static<typeof OrgCategory>
export const OrgCategories = [
"Agriculture",
"Animal Rights",
"Automotive",
"Civil Rights",
"Communications",
"Consumer Goods",
"Criminal Justice",
"Prison Reform",
"Education",
"Elder Care",
"Employment/Labor",
"Environment",
"Financial",
"Food",
"Good Government",
"Human Rights",
"Children's Rights",
"Death Penalty",
"Disabeled Rights",
"LGBTQ+ Rights",
"Housing",
"Immigration",
"Insurance",
"Internet & Technology",
"Legal",
"Medical/Health",
"Poverty",
"Privacy",
"Racial Justice",
"Regional",
"Refugee",
"Reproductive Health",
"Pharmaceuticals",
"Small & Local Business",
"Taxes",
"Water",
"Women's Rights",
"Multi-issue",
"Other"
]