2023-02-08 18:29:01 +08:00
|
|
|
const WORLD_REGIONS = Object.freeze({
|
2023-02-15 22:20:14 +08:00
|
|
|
northAmerica: "North America",
|
|
|
|
southAmerica: "South America",
|
|
|
|
asiaPacific: "Asia Pacific",
|
|
|
|
europe: "Europe",
|
|
|
|
africa: "Africa",
|
|
|
|
online: "Online",
|
|
|
|
tbd: "TBD",
|
|
|
|
} as const);
|
2023-02-08 18:29:01 +08:00
|
|
|
|
2023-02-15 22:20:14 +08:00
|
|
|
type WorldRegion = (typeof WORLD_REGIONS)[keyof typeof WORLD_REGIONS];
|
2023-02-08 18:29:01 +08:00
|
|
|
|
2023-03-14 00:28:18 +08:00
|
|
|
const WORLD_REGION_OPTIONS = [
|
2023-02-08 18:29:01 +08:00
|
|
|
WORLD_REGIONS.northAmerica,
|
|
|
|
WORLD_REGIONS.southAmerica,
|
|
|
|
WORLD_REGIONS.asiaPacific,
|
|
|
|
WORLD_REGIONS.europe,
|
|
|
|
WORLD_REGIONS.africa,
|
2023-02-15 22:20:14 +08:00
|
|
|
WORLD_REGIONS.online,
|
2023-03-14 00:28:18 +08:00
|
|
|
];
|
2023-02-08 18:29:01 +08:00
|
|
|
|
|
|
|
const COMMUNITY_EVENT_TYPES = Object.freeze({
|
2023-02-15 22:20:14 +08:00
|
|
|
hackathon: "Hackathon",
|
|
|
|
camp: "Camp",
|
|
|
|
industryEvent: "Industry Event",
|
|
|
|
openSource: "Open Source",
|
|
|
|
workshop: "Workshop",
|
|
|
|
challenge: "Challenge",
|
|
|
|
networking: "Networking",
|
|
|
|
talks: "Talks",
|
|
|
|
} as const);
|
2023-02-08 18:29:01 +08:00
|
|
|
|
2023-02-15 22:20:14 +08:00
|
|
|
type CommunityEventType =
|
|
|
|
(typeof COMMUNITY_EVENT_TYPES)[keyof typeof COMMUNITY_EVENT_TYPES];
|
2023-02-08 18:29:01 +08:00
|
|
|
|
|
|
|
type CommunityEvent = {
|
2023-02-15 22:20:14 +08:00
|
|
|
types: CommunityEventType[];
|
|
|
|
title: string;
|
|
|
|
image: string;
|
2023-02-08 18:29:01 +08:00
|
|
|
// TODO: We need to clarify if region and place have default values and what
|
|
|
|
// these are. Place and region may seem mandatory but human error is
|
|
|
|
// possible. In that case, what's the value of place and region?
|
|
|
|
//
|
|
|
|
// See also:
|
|
|
|
// https://github.com/Qiskit/qiskit.org/issues/527
|
2023-02-15 22:20:14 +08:00
|
|
|
location: string;
|
2023-06-01 22:22:05 +08:00
|
|
|
speaker: string;
|
2023-02-15 22:20:14 +08:00
|
|
|
regions: WorldRegion[];
|
|
|
|
date: string;
|
|
|
|
startDate: string;
|
2023-03-29 22:24:57 +08:00
|
|
|
startDateAndTime: string | null;
|
2023-02-15 22:20:14 +08:00
|
|
|
endDate: string;
|
|
|
|
to: string;
|
2023-04-06 21:16:04 +08:00
|
|
|
abstract?: string;
|
2023-02-15 22:20:14 +08:00
|
|
|
};
|
2023-02-08 18:29:01 +08:00
|
|
|
|
2023-02-15 22:20:14 +08:00
|
|
|
const COMMUNITY_EVENT_TYPE_OPTIONS = Object.values(
|
|
|
|
COMMUNITY_EVENT_TYPES
|
|
|
|
).sort();
|
2023-02-08 18:29:01 +08:00
|
|
|
|
|
|
|
export {
|
|
|
|
WorldRegion,
|
|
|
|
WORLD_REGIONS,
|
|
|
|
WORLD_REGION_OPTIONS,
|
|
|
|
CommunityEvent,
|
|
|
|
CommunityEventType,
|
|
|
|
COMMUNITY_EVENT_TYPES,
|
2023-02-15 22:20:14 +08:00
|
|
|
COMMUNITY_EVENT_TYPE_OPTIONS,
|
|
|
|
};
|