webpods
Version:
Append-only log service with OAuth authentication
66 lines • 1.4 kB
TypeScript
/**
* Database types that mirror the PostgreSQL schema
* All database columns use snake_case
*/
export type UserDbRow = {
id: string;
created_at: Date;
updated_at?: Date | null;
};
export type IdentityDbRow = {
id: string;
user_id: string;
provider: string;
provider_id: string;
email?: string | null;
name?: string | null;
metadata?: any;
created_at: Date;
updated_at?: Date | null;
};
export type PodDbRow = {
id: string;
pod_id: string;
created_at: Date;
};
export type StreamDbRow = {
id: string;
pod_id: string;
stream_id: string;
creator_id: string;
access_permission: string;
created_at: Date;
};
export type RecordDbRow = {
id?: string;
stream_id: string;
index: number;
content: string;
content_type: string;
hash: string;
previous_hash?: string | null;
author_id: string;
name?: string | null;
created_at: Date | string;
};
export type SessionDbRow = {
sid: string;
sess: any;
expire: Date;
};
export type OAuthStateDbRow = {
state: string;
code_verifier: string;
pod?: string | null;
redirect_url?: string | null;
expires_at: Date;
};
export type RateLimitDbRow = {
id?: string;
identifier: string;
action: string;
count: number;
window_start: Date;
window_end: Date;
};
//# sourceMappingURL=db-types.d.ts.map