diff options
Diffstat (limited to 'bskylink/src/db/schema.ts')
-rw-r--r-- | bskylink/src/db/schema.ts | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/bskylink/src/db/schema.ts b/bskylink/src/db/schema.ts index 8d97f5800..d13a28038 100644 --- a/bskylink/src/db/schema.ts +++ b/bskylink/src/db/schema.ts @@ -1,7 +1,10 @@ -import {Selectable} from 'kysely' +import {type ToolsOzoneSafelinkDefs} from '@atproto/api' +import {type Selectable} from 'kysely' export type DbSchema = { link: Link + safelink_rule: SafelinkRule + safelink_cursor: SafelinkCursor } export interface Link { @@ -14,4 +17,21 @@ export enum LinkType { StarterPack = 1, } +export interface SafelinkRule { + id: number + eventType: ToolsOzoneSafelinkDefs.EventType + url: string + pattern: ToolsOzoneSafelinkDefs.PatternType + action: ToolsOzoneSafelinkDefs.ActionType + createdAt: string +} + +export interface SafelinkCursor { + id: number + cursor: string + updatedAt: Date +} + export type LinkEntry = Selectable<Link> +export type SafelinkRuleEntry = Selectable<SafelinkRule> +export type SafelinkCursorEntry = Selectable<SafelinkCursor> |