Add event_data base.

This commit is contained in:
Brian Cao 2023-03-20 13:21:16 -07:00
parent 72af76a417
commit 15c5cc065e
19 changed files with 395 additions and 45 deletions

View file

@ -1,10 +1,19 @@
import { NextApiRequest } from 'next';
import { ROLES } from './constants';
import { EVENT_DATA_TYPE, EVENT_TYPE, KAFKA_TOPIC, ROLES } from './constants';
type ObjectValues<T> = T[keyof T];
export type Roles = ObjectValues<typeof ROLES>;
export type EventTypes = ObjectValues<typeof EVENT_TYPE>;
export type EventDataTypes = ObjectValues<typeof EVENT_DATA_TYPE>;
export type KafkaTopics = ObjectValues<typeof KAFKA_TOPIC>;
export interface EventData {
[key: string]: number | string | EventData | number[] | string[] | EventData[];
}
export interface Auth {
user?: {
id: string;