Create/detail updates

This commit is contained in:
Darren Clarke 2024-04-24 21:44:05 +02:00
parent b0fb643b6a
commit 0997e449bb
26 changed files with 684 additions and 108 deletions

View file

@ -1,8 +1,14 @@
import { PostgresDialect, CamelCasePlugin } from "kysely";
import type { GeneratedAlways } from "kysely";
import { Pool } from "pg";
import type { GeneratedAlways, Generated, ColumnType } from "kysely";
import { Pool, types } from "pg";
import { KyselyAuth } from "@auth/kysely-adapter";
type Timestamp = ColumnType<Date, Date | string>;
types.setTypeParser(types.builtins.TIMESTAMPTZ, (val) =>
new Date(val).toISOString(),
);
type GraphileJob = {
taskIdentifier: string;
payload: Record<string, any>;
@ -64,10 +70,18 @@ export interface Database {
FacebookBot: {
id: GeneratedAlways<string>;
name: string;
createdBy: string;
createdAt: Date;
updatedAt: Date;
name: string | null;
description: string | null;
token: string | null;
pageAccessToken: string | null;
appSecret: string | null;
verifyToken: string | null;
pageId: string | null;
appId: string | null;
userId: string | null;
isVerified: Generated<boolean>;
createdAt: GeneratedAlways<Timestamp>;
updatedAt: GeneratedAlways<Timestamp>;
};
VoiceLine: {