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
export function parseNotionDateDoc(obj): DateMeDoc {
return {
Id: obj.id,
Name: obj.properties["Name"]?.title?.[0]?.plain_text,
Profile: obj.properties["Profile"]?.url,
Gender: obj.properties["Gender"]?.multi_select?.map((g) => g.name),
Age: JSON.stringify(obj.properties["Age"]?.number),
Contact: obj.properties["Contact "]?.rich_text[0]?.plain_text,
LastUpdated: obj.last_edited_time,
InterestedIn: obj.properties["Interested In"]?.multi_select?.map((i) => i.name),
Location: obj.properties["Location"]?.multi_select?.map((l) => l.name),
Style: obj.properties["Style"]?.multi_select?.map((s) => s.name),
WantsKids: obj.properties["Wants Kids"]?.select?.name,
LocationFlexibility: obj.properties["Location flexibility"]?.select?.name,
Community: obj.properties["Community"]?.multi_select?.map((c) => c.name),
};
}
type Location =
| "San Francisco Bay Area"
| "NYC"
| "DC"
| "Chicago"
| "WI"
| "Western US"
| "Seattle"
| "Boston"
| "Portland"
| "Los Angeles"
| "London"
| "UK"
| "Toronto"
| "Berlin"
| "Canada"
| "Vancouver"
| "NY"
| "Central Europe"
| "TX"
| "South Bay"
| "Brighton"
| "NJ"
| "Brazil"
| "PA"
| "Southern US"
| "Somerville"
| "Cambridge"
| "MA"
| "WA"
| "Dubai"
| "Berkeley"
| "South of France"
| "Amsterdam"
| "Flexible"
| "Austin"
| "North America"
| "Kansas City"
| "Sacramento"
| "Idaho"
| "Asia"
| "Nebraska"
| "Philadelphia"
| "North Carolina"
| "Oxford"
| "Ohio"
| "Indianapolis"
| "Seoul"
| "Oregon"
| "Colorado"
| "CT"
| "New Haven"
| "Denver"
| "Georgia"
| "Ladysmith BC"
| "Lubbock"
| "Asheville"
| "Vancouver Island"
| "Collingswood"
| "Ewing"
| "Ribeirão Bonito"
| "Hackney"
| "Madison";
interface DateMeDoc {
Id: string;
Name: string;
Profile: string;
Gender: "F" | "M" | "NF" | ("F" | "M" | "NF")[];
InterestedIn?: "F" | "M" | "NF" | ("F" | "M" | "NF")[];
Age: string;
Location?: Location[];
Style?: string[];
WantsKids?: string;
LocationFlexibility?: "Flexible" | "Some" | "None";
Community?: "EA" | "Tech" | "Rationalism" | ("EA" | "Tech" | "Rationalism")[];
Contact?: string;
LastUpdated?: string;
}
Val Town is a social website to write and deploy JavaScript.
Build APIs and schedule functions from your browser.
Comments
Nobody has commented on this val yet: be the first!
December 27, 2023