From b19cecff4efbe5409353cb96171e5cdd8204a8e6 Mon Sep 17 00:00:00 2001 From: Mike Wu Date: Fri, 1 Nov 2024 10:06:47 +0900 Subject: [PATCH] fix(PullRequest): not updating due to external integer id overflow --- .../save-merged-pull-request.test.ts | 2 +- ...omie-pull-request-change-ids-to-strings.ts | 78 + src/database/schema/zapatos/.eslintrc.json | 6 +- src/database/schema/zapatos/schema.d.ts | 14862 ++++++---------- .../get-fetch-pull-request-detail-tool.ts | 4 +- ...et-list-commits-deployed-to-branch-tool.ts | 2 +- src/lib/github/save-merged-pull-request.ts | 2 +- src/lib/gitlab/save-merged-merge-request.ts | 4 +- src/queue/jobs/close-merge-request.ts | 6 +- src/queue/jobs/close-pull-requests.ts | 4 +- src/queue/jobs/reopen-merge-request.ts | 6 +- src/queue/jobs/reopen-pull-request.ts | 4 +- src/queue/jobs/save-opened-merge-request.ts | 4 +- src/queue/jobs/save-opened-pull-request.ts | 2 +- 14 files changed, 5615 insertions(+), 9371 deletions(-) create mode 100644 src/database/migrations/1730422903834_update-homie-pull-request-change-ids-to-strings.ts diff --git a/src/app/api/github/webhook/__tests__/save-merged-pull-request.test.ts b/src/app/api/github/webhook/__tests__/save-merged-pull-request.test.ts index c55e06b3..4d6fe5ed 100644 --- a/src/app/api/github/webhook/__tests__/save-merged-pull-request.test.ts +++ b/src/app/api/github/webhook/__tests__/save-merged-pull-request.test.ts @@ -184,7 +184,7 @@ it('should create and embed a pr', async () => { const pullRequest = await dbClient .selectFrom('homie.pull_request') - .where('ext_gh_pull_request_id', '=', 8282) + .where('ext_gh_pull_request_id', '=', '8282') .selectAll() .executeTakeFirstOrThrow() expect(pullRequest.title).toBe('My test closed PR') diff --git a/src/database/migrations/1730422903834_update-homie-pull-request-change-ids-to-strings.ts b/src/database/migrations/1730422903834_update-homie-pull-request-change-ids-to-strings.ts new file mode 100644 index 00000000..e4c7ebde --- /dev/null +++ b/src/database/migrations/1730422903834_update-homie-pull-request-change-ids-to-strings.ts @@ -0,0 +1,78 @@ +/* eslint-disable @typescript-eslint/naming-convention */ +import { MigrationBuilder, ColumnDefinitions } from 'node-pg-migrate' + +export const shorthands: ColumnDefinitions | undefined = undefined + +export async function up(pgm: MigrationBuilder): Promise { + pgm.alterColumn( + { + schema: 'homie', + name: 'pull_request', + }, + 'ext_gh_pull_request_id', + { + type: 'text', + notNull: false, + }, + ) + + pgm.alterColumn( + { + schema: 'homie', + name: 'pull_request', + }, + 'ext_gitlab_merge_request_id', + { + type: 'text', + notNull: false, + }, + ) + pgm.alterColumn( + { + schema: 'homie', + name: 'pull_request', + }, + 'ext_gitlab_merge_request_iid', + { + type: 'text', + notNull: false, + }, + ) +} + +export async function down(pgm: MigrationBuilder): Promise { + pgm.alterColumn( + { + schema: 'homie', + name: 'pull_request', + }, + 'ext_gh_pull_request_id', + { + type: 'integer', + notNull: false, + }, + ) + + pgm.alterColumn( + { + schema: 'homie', + name: 'pull_request', + }, + 'ext_gitlab_merge_request_id', + { + type: 'integer', + notNull: false, + }, + ) + pgm.alterColumn( + { + schema: 'homie', + name: 'pull_request', + }, + 'ext_gitlab_merge_request_iid', + { + type: 'integer', + notNull: false, + }, + ) +} diff --git a/src/database/schema/zapatos/.eslintrc.json b/src/database/schema/zapatos/.eslintrc.json index f66885a6..eee87941 100644 --- a/src/database/schema/zapatos/.eslintrc.json +++ b/src/database/schema/zapatos/.eslintrc.json @@ -1,3 +1,5 @@ { - "ignorePatterns": ["*"] -} + "ignorePatterns": [ + "*" + ] +} \ No newline at end of file diff --git a/src/database/schema/zapatos/schema.d.ts b/src/database/schema/zapatos/schema.d.ts index f0400818..c63602c2 100644 --- a/src/database/schema/zapatos/schema.d.ts +++ b/src/database/schema/zapatos/schema.d.ts @@ -8,9809 +8,5973 @@ Released under the MIT licence: see LICENCE file */ declare module 'zapatos/schema' { - import type * as db from 'zapatos/db' + + import type * as db from 'zapatos/db'; // got a type error on schemaVersionCanary below? update by running `npx zapatos` - export interface schemaVersionCanary extends db.SchemaVersionCanary { - version: 104 - } + export interface schemaVersionCanary extends db.SchemaVersionCanary { version: 104 } + /* === schema: homie === */ export namespace homie { + /* --- enums --- */ /* (none) */ - + /* --- tables --- */ - + /** * **homie.contributor** * - Table in database */ export namespace contributor { - export type Table = 'homie.contributor' + export type Table = 'homie.contributor'; export interface Selectable { /** - * **homie.contributor.created_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - created_at: Date - /** - * **homie.contributor.ext_asana_user_id** - * - `text` in database - * - Nullable, no default - */ - ext_asana_user_id: string | null - /** - * **homie.contributor.ext_gh_user_id** - * - `int4` in database - * - Nullable, no default - */ - ext_gh_user_id: number | null - /** - * **homie.contributor.ext_gitlab_author_id** - * - `int4` in database - * - Nullable, no default - */ - ext_gitlab_author_id: number | null - /** - * **homie.contributor.ext_slack_member_id** - * - `text` in database - * - Nullable, no default - */ - ext_slack_member_id: string | null - /** - * **homie.contributor.ext_trello_member_id** - * - `text` in database - * - Nullable, no default - */ - ext_trello_member_id: string | null - /** - * **homie.contributor.id** - * - `int4` in database - * - `NOT NULL`, default: `nextval('homie.contributor_id_seq'::regclass)` - */ - id: number - /** - * **homie.contributor.organization_id** - * - `int4` in database - * - `NOT NULL`, no default - */ - organization_id: number - /** - * **homie.contributor.updated_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - updated_at: Date - /** - * **homie.contributor.username** - * - `text` in database - * - `NOT NULL`, no default - */ - username: string + * **homie.contributor.created_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + created_at: Date; + /** + * **homie.contributor.ext_asana_user_id** + * - `text` in database + * - Nullable, no default + */ + ext_asana_user_id: string | null; + /** + * **homie.contributor.ext_gh_user_id** + * - `int4` in database + * - Nullable, no default + */ + ext_gh_user_id: number | null; + /** + * **homie.contributor.ext_gitlab_author_id** + * - `int4` in database + * - Nullable, no default + */ + ext_gitlab_author_id: number | null; + /** + * **homie.contributor.ext_slack_member_id** + * - `text` in database + * - Nullable, no default + */ + ext_slack_member_id: string | null; + /** + * **homie.contributor.ext_trello_member_id** + * - `text` in database + * - Nullable, no default + */ + ext_trello_member_id: string | null; + /** + * **homie.contributor.id** + * - `int4` in database + * - `NOT NULL`, default: `nextval('homie.contributor_id_seq'::regclass)` + */ + id: number; + /** + * **homie.contributor.organization_id** + * - `int4` in database + * - `NOT NULL`, no default + */ + organization_id: number; + /** + * **homie.contributor.updated_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + updated_at: Date; + /** + * **homie.contributor.username** + * - `text` in database + * - `NOT NULL`, no default + */ + username: string; } export interface JSONSelectable { /** - * **homie.contributor.created_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - created_at: db.TimestampTzString - /** - * **homie.contributor.ext_asana_user_id** - * - `text` in database - * - Nullable, no default - */ - ext_asana_user_id: string | null - /** - * **homie.contributor.ext_gh_user_id** - * - `int4` in database - * - Nullable, no default - */ - ext_gh_user_id: number | null - /** - * **homie.contributor.ext_gitlab_author_id** - * - `int4` in database - * - Nullable, no default - */ - ext_gitlab_author_id: number | null - /** - * **homie.contributor.ext_slack_member_id** - * - `text` in database - * - Nullable, no default - */ - ext_slack_member_id: string | null - /** - * **homie.contributor.ext_trello_member_id** - * - `text` in database - * - Nullable, no default - */ - ext_trello_member_id: string | null - /** - * **homie.contributor.id** - * - `int4` in database - * - `NOT NULL`, default: `nextval('homie.contributor_id_seq'::regclass)` - */ - id: number - /** - * **homie.contributor.organization_id** - * - `int4` in database - * - `NOT NULL`, no default - */ - organization_id: number - /** - * **homie.contributor.updated_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - updated_at: db.TimestampTzString - /** - * **homie.contributor.username** - * - `text` in database - * - `NOT NULL`, no default - */ - username: string + * **homie.contributor.created_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + created_at: db.TimestampTzString; + /** + * **homie.contributor.ext_asana_user_id** + * - `text` in database + * - Nullable, no default + */ + ext_asana_user_id: string | null; + /** + * **homie.contributor.ext_gh_user_id** + * - `int4` in database + * - Nullable, no default + */ + ext_gh_user_id: number | null; + /** + * **homie.contributor.ext_gitlab_author_id** + * - `int4` in database + * - Nullable, no default + */ + ext_gitlab_author_id: number | null; + /** + * **homie.contributor.ext_slack_member_id** + * - `text` in database + * - Nullable, no default + */ + ext_slack_member_id: string | null; + /** + * **homie.contributor.ext_trello_member_id** + * - `text` in database + * - Nullable, no default + */ + ext_trello_member_id: string | null; + /** + * **homie.contributor.id** + * - `int4` in database + * - `NOT NULL`, default: `nextval('homie.contributor_id_seq'::regclass)` + */ + id: number; + /** + * **homie.contributor.organization_id** + * - `int4` in database + * - `NOT NULL`, no default + */ + organization_id: number; + /** + * **homie.contributor.updated_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + updated_at: db.TimestampTzString; + /** + * **homie.contributor.username** + * - `text` in database + * - `NOT NULL`, no default + */ + username: string; } export interface Whereable { /** - * **homie.contributor.created_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - created_at?: - | (db.TimestampTzString | Date) - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - | (db.TimestampTzString | Date) - | db.Parameter - | db.SQLFragment - | db.ParentColumn - > - /** - * **homie.contributor.ext_asana_user_id** - * - `text` in database - * - Nullable, no default - */ - ext_asana_user_id?: - | string - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - string | db.Parameter | db.SQLFragment | db.ParentColumn - > - /** - * **homie.contributor.ext_gh_user_id** - * - `int4` in database - * - Nullable, no default - */ - ext_gh_user_id?: - | number - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - number | db.Parameter | db.SQLFragment | db.ParentColumn - > - /** - * **homie.contributor.ext_gitlab_author_id** - * - `int4` in database - * - Nullable, no default - */ - ext_gitlab_author_id?: - | number - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - number | db.Parameter | db.SQLFragment | db.ParentColumn - > - /** - * **homie.contributor.ext_slack_member_id** - * - `text` in database - * - Nullable, no default - */ - ext_slack_member_id?: - | string - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - string | db.Parameter | db.SQLFragment | db.ParentColumn - > - /** - * **homie.contributor.ext_trello_member_id** - * - `text` in database - * - Nullable, no default - */ - ext_trello_member_id?: - | string - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - string | db.Parameter | db.SQLFragment | db.ParentColumn - > - /** - * **homie.contributor.id** - * - `int4` in database - * - `NOT NULL`, default: `nextval('homie.contributor_id_seq'::regclass)` - */ - id?: - | number - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - number | db.Parameter | db.SQLFragment | db.ParentColumn - > - /** - * **homie.contributor.organization_id** - * - `int4` in database - * - `NOT NULL`, no default - */ - organization_id?: - | number - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - number | db.Parameter | db.SQLFragment | db.ParentColumn - > - /** - * **homie.contributor.updated_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - updated_at?: - | (db.TimestampTzString | Date) - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - | (db.TimestampTzString | Date) - | db.Parameter - | db.SQLFragment - | db.ParentColumn - > - /** - * **homie.contributor.username** - * - `text` in database - * - `NOT NULL`, no default - */ - username?: - | string - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - string | db.Parameter | db.SQLFragment | db.ParentColumn - > + * **homie.contributor.created_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + created_at?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **homie.contributor.ext_asana_user_id** + * - `text` in database + * - Nullable, no default + */ + ext_asana_user_id?: string | db.Parameter | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **homie.contributor.ext_gh_user_id** + * - `int4` in database + * - Nullable, no default + */ + ext_gh_user_id?: number | db.Parameter | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **homie.contributor.ext_gitlab_author_id** + * - `int4` in database + * - Nullable, no default + */ + ext_gitlab_author_id?: number | db.Parameter | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **homie.contributor.ext_slack_member_id** + * - `text` in database + * - Nullable, no default + */ + ext_slack_member_id?: string | db.Parameter | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **homie.contributor.ext_trello_member_id** + * - `text` in database + * - Nullable, no default + */ + ext_trello_member_id?: string | db.Parameter | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **homie.contributor.id** + * - `int4` in database + * - `NOT NULL`, default: `nextval('homie.contributor_id_seq'::regclass)` + */ + id?: number | db.Parameter | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **homie.contributor.organization_id** + * - `int4` in database + * - `NOT NULL`, no default + */ + organization_id?: number | db.Parameter | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **homie.contributor.updated_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + updated_at?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **homie.contributor.username** + * - `text` in database + * - `NOT NULL`, no default + */ + username?: string | db.Parameter | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; } export interface Insertable { /** - * **homie.contributor.created_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - created_at?: - | (db.TimestampTzString | Date) - | db.Parameter - | db.DefaultType - | db.SQLFragment - /** - * **homie.contributor.ext_asana_user_id** - * - `text` in database - * - Nullable, no default - */ - ext_asana_user_id?: - | string - | db.Parameter - | null - | db.DefaultType - | db.SQLFragment - /** - * **homie.contributor.ext_gh_user_id** - * - `int4` in database - * - Nullable, no default - */ - ext_gh_user_id?: - | number - | db.Parameter - | null - | db.DefaultType - | db.SQLFragment - /** - * **homie.contributor.ext_gitlab_author_id** - * - `int4` in database - * - Nullable, no default - */ - ext_gitlab_author_id?: - | number - | db.Parameter - | null - | db.DefaultType - | db.SQLFragment - /** - * **homie.contributor.ext_slack_member_id** - * - `text` in database - * - Nullable, no default - */ - ext_slack_member_id?: - | string - | db.Parameter - | null - | db.DefaultType - | db.SQLFragment - /** - * **homie.contributor.ext_trello_member_id** - * - `text` in database - * - Nullable, no default - */ - ext_trello_member_id?: - | string - | db.Parameter - | null - | db.DefaultType - | db.SQLFragment - /** - * **homie.contributor.id** - * - `int4` in database - * - `NOT NULL`, default: `nextval('homie.contributor_id_seq'::regclass)` - */ - id?: number | db.Parameter | db.DefaultType | db.SQLFragment - /** - * **homie.contributor.organization_id** - * - `int4` in database - * - `NOT NULL`, no default - */ - organization_id: number | db.Parameter | db.SQLFragment - /** - * **homie.contributor.updated_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - updated_at?: - | (db.TimestampTzString | Date) - | db.Parameter - | db.DefaultType - | db.SQLFragment - /** - * **homie.contributor.username** - * - `text` in database - * - `NOT NULL`, no default - */ - username: string | db.Parameter | db.SQLFragment + * **homie.contributor.created_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + created_at?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | db.DefaultType | db.SQLFragment; + /** + * **homie.contributor.ext_asana_user_id** + * - `text` in database + * - Nullable, no default + */ + ext_asana_user_id?: string | db.Parameter | null | db.DefaultType | db.SQLFragment; + /** + * **homie.contributor.ext_gh_user_id** + * - `int4` in database + * - Nullable, no default + */ + ext_gh_user_id?: number | db.Parameter | null | db.DefaultType | db.SQLFragment; + /** + * **homie.contributor.ext_gitlab_author_id** + * - `int4` in database + * - Nullable, no default + */ + ext_gitlab_author_id?: number | db.Parameter | null | db.DefaultType | db.SQLFragment; + /** + * **homie.contributor.ext_slack_member_id** + * - `text` in database + * - Nullable, no default + */ + ext_slack_member_id?: string | db.Parameter | null | db.DefaultType | db.SQLFragment; + /** + * **homie.contributor.ext_trello_member_id** + * - `text` in database + * - Nullable, no default + */ + ext_trello_member_id?: string | db.Parameter | null | db.DefaultType | db.SQLFragment; + /** + * **homie.contributor.id** + * - `int4` in database + * - `NOT NULL`, default: `nextval('homie.contributor_id_seq'::regclass)` + */ + id?: number | db.Parameter | db.DefaultType | db.SQLFragment; + /** + * **homie.contributor.organization_id** + * - `int4` in database + * - `NOT NULL`, no default + */ + organization_id: number | db.Parameter | db.SQLFragment; + /** + * **homie.contributor.updated_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + updated_at?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | db.DefaultType | db.SQLFragment; + /** + * **homie.contributor.username** + * - `text` in database + * - `NOT NULL`, no default + */ + username: string | db.Parameter | db.SQLFragment; } export interface Updatable { /** - * **homie.contributor.created_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - created_at?: - | (db.TimestampTzString | Date) - | db.Parameter - | db.DefaultType - | db.SQLFragment - | db.SQLFragment< - any, - | (db.TimestampTzString | Date) - | db.Parameter - | db.DefaultType - | db.SQLFragment - > - /** - * **homie.contributor.ext_asana_user_id** - * - `text` in database - * - Nullable, no default - */ - ext_asana_user_id?: - | string - | db.Parameter - | null - | db.DefaultType - | db.SQLFragment - | db.SQLFragment< - any, - | string - | db.Parameter - | null - | db.DefaultType - | db.SQLFragment - > - /** - * **homie.contributor.ext_gh_user_id** - * - `int4` in database - * - Nullable, no default - */ - ext_gh_user_id?: - | number - | db.Parameter - | null - | db.DefaultType - | db.SQLFragment - | db.SQLFragment< - any, - | number - | db.Parameter - | null - | db.DefaultType - | db.SQLFragment - > - /** - * **homie.contributor.ext_gitlab_author_id** - * - `int4` in database - * - Nullable, no default - */ - ext_gitlab_author_id?: - | number - | db.Parameter - | null - | db.DefaultType - | db.SQLFragment - | db.SQLFragment< - any, - | number - | db.Parameter - | null - | db.DefaultType - | db.SQLFragment - > - /** - * **homie.contributor.ext_slack_member_id** - * - `text` in database - * - Nullable, no default - */ - ext_slack_member_id?: - | string - | db.Parameter - | null - | db.DefaultType - | db.SQLFragment - | db.SQLFragment< - any, - | string - | db.Parameter - | null - | db.DefaultType - | db.SQLFragment - > - /** - * **homie.contributor.ext_trello_member_id** - * - `text` in database - * - Nullable, no default - */ - ext_trello_member_id?: - | string - | db.Parameter - | null - | db.DefaultType - | db.SQLFragment - | db.SQLFragment< - any, - | string - | db.Parameter - | null - | db.DefaultType - | db.SQLFragment - > - /** - * **homie.contributor.id** - * - `int4` in database - * - `NOT NULL`, default: `nextval('homie.contributor_id_seq'::regclass)` - */ - id?: - | number - | db.Parameter - | db.DefaultType - | db.SQLFragment - | db.SQLFragment< - any, - number | db.Parameter | db.DefaultType | db.SQLFragment - > - /** - * **homie.contributor.organization_id** - * - `int4` in database - * - `NOT NULL`, no default - */ - organization_id?: - | number - | db.Parameter - | db.SQLFragment - | db.SQLFragment | db.SQLFragment> - /** - * **homie.contributor.updated_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - updated_at?: - | (db.TimestampTzString | Date) - | db.Parameter - | db.DefaultType - | db.SQLFragment - | db.SQLFragment< - any, - | (db.TimestampTzString | Date) - | db.Parameter - | db.DefaultType - | db.SQLFragment - > - /** - * **homie.contributor.username** - * - `text` in database - * - `NOT NULL`, no default - */ - username?: - | string - | db.Parameter - | db.SQLFragment - | db.SQLFragment | db.SQLFragment> + * **homie.contributor.created_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + created_at?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | db.DefaultType | db.SQLFragment | db.SQLFragment | db.DefaultType | db.SQLFragment>; + /** + * **homie.contributor.ext_asana_user_id** + * - `text` in database + * - Nullable, no default + */ + ext_asana_user_id?: string | db.Parameter | null | db.DefaultType | db.SQLFragment | db.SQLFragment | null | db.DefaultType | db.SQLFragment>; + /** + * **homie.contributor.ext_gh_user_id** + * - `int4` in database + * - Nullable, no default + */ + ext_gh_user_id?: number | db.Parameter | null | db.DefaultType | db.SQLFragment | db.SQLFragment | null | db.DefaultType | db.SQLFragment>; + /** + * **homie.contributor.ext_gitlab_author_id** + * - `int4` in database + * - Nullable, no default + */ + ext_gitlab_author_id?: number | db.Parameter | null | db.DefaultType | db.SQLFragment | db.SQLFragment | null | db.DefaultType | db.SQLFragment>; + /** + * **homie.contributor.ext_slack_member_id** + * - `text` in database + * - Nullable, no default + */ + ext_slack_member_id?: string | db.Parameter | null | db.DefaultType | db.SQLFragment | db.SQLFragment | null | db.DefaultType | db.SQLFragment>; + /** + * **homie.contributor.ext_trello_member_id** + * - `text` in database + * - Nullable, no default + */ + ext_trello_member_id?: string | db.Parameter | null | db.DefaultType | db.SQLFragment | db.SQLFragment | null | db.DefaultType | db.SQLFragment>; + /** + * **homie.contributor.id** + * - `int4` in database + * - `NOT NULL`, default: `nextval('homie.contributor_id_seq'::regclass)` + */ + id?: number | db.Parameter | db.DefaultType | db.SQLFragment | db.SQLFragment | db.DefaultType | db.SQLFragment>; + /** + * **homie.contributor.organization_id** + * - `int4` in database + * - `NOT NULL`, no default + */ + organization_id?: number | db.Parameter | db.SQLFragment | db.SQLFragment | db.SQLFragment>; + /** + * **homie.contributor.updated_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + updated_at?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | db.DefaultType | db.SQLFragment | db.SQLFragment | db.DefaultType | db.SQLFragment>; + /** + * **homie.contributor.username** + * - `text` in database + * - `NOT NULL`, no default + */ + username?: string | db.Parameter | db.SQLFragment | db.SQLFragment | db.SQLFragment>; } - export type UniqueIndex = - | 'contributor_ext_asana_user_id_key' - | 'contributor_ext_gh_user_id_key' - | 'contributor_ext_gitlab_author_id_key' - | 'contributor_ext_trello_member_id_key' - | 'contributor_pkey' - export type Column = keyof Selectable - export type OnlyCols = Pick< - Selectable, - T[number] - > - export type SQLExpression = - | Table - | db.ColumnNames - | db.ColumnValues - | Whereable - | Column - | db.ParentColumn - | db.GenericSQLExpression - export type SQL = SQLExpression | SQLExpression[] + export type UniqueIndex = 'contributor_ext_asana_user_id_key' | 'contributor_ext_gh_user_id_key' | 'contributor_ext_gitlab_author_id_key' | 'contributor_ext_trello_member_id_key' | 'contributor_pkey'; + export type Column = keyof Selectable; + export type OnlyCols = Pick; + export type SQLExpression = Table | db.ColumnNames | db.ColumnValues | Whereable | Column | db.ParentColumn | db.GenericSQLExpression; + export type SQL = SQLExpression | SQLExpression[]; } - + /** * **homie.contributor_task** * - Table in database */ export namespace contributor_task { - export type Table = 'homie.contributor_task' + export type Table = 'homie.contributor_task'; export interface Selectable { /** - * **homie.contributor_task.contributor_id** - * - `int4` in database - * - `NOT NULL`, no default - */ - contributor_id: number - /** - * **homie.contributor_task.created_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - created_at: Date - /** - * **homie.contributor_task.id** - * - `int4` in database - * - `NOT NULL`, default: `nextval('homie.contributor_task_id_seq'::regclass)` - */ - id: number - /** - * **homie.contributor_task.task_id** - * - `int4` in database - * - `NOT NULL`, no default - */ - task_id: number - /** - * **homie.contributor_task.updated_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - updated_at: Date + * **homie.contributor_task.contributor_id** + * - `int4` in database + * - `NOT NULL`, no default + */ + contributor_id: number; + /** + * **homie.contributor_task.created_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + created_at: Date; + /** + * **homie.contributor_task.id** + * - `int4` in database + * - `NOT NULL`, default: `nextval('homie.contributor_task_id_seq'::regclass)` + */ + id: number; + /** + * **homie.contributor_task.task_id** + * - `int4` in database + * - `NOT NULL`, no default + */ + task_id: number; + /** + * **homie.contributor_task.updated_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + updated_at: Date; } export interface JSONSelectable { /** - * **homie.contributor_task.contributor_id** - * - `int4` in database - * - `NOT NULL`, no default - */ - contributor_id: number - /** - * **homie.contributor_task.created_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - created_at: db.TimestampTzString - /** - * **homie.contributor_task.id** - * - `int4` in database - * - `NOT NULL`, default: `nextval('homie.contributor_task_id_seq'::regclass)` - */ - id: number - /** - * **homie.contributor_task.task_id** - * - `int4` in database - * - `NOT NULL`, no default - */ - task_id: number - /** - * **homie.contributor_task.updated_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - updated_at: db.TimestampTzString + * **homie.contributor_task.contributor_id** + * - `int4` in database + * - `NOT NULL`, no default + */ + contributor_id: number; + /** + * **homie.contributor_task.created_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + created_at: db.TimestampTzString; + /** + * **homie.contributor_task.id** + * - `int4` in database + * - `NOT NULL`, default: `nextval('homie.contributor_task_id_seq'::regclass)` + */ + id: number; + /** + * **homie.contributor_task.task_id** + * - `int4` in database + * - `NOT NULL`, no default + */ + task_id: number; + /** + * **homie.contributor_task.updated_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + updated_at: db.TimestampTzString; } export interface Whereable { /** - * **homie.contributor_task.contributor_id** - * - `int4` in database - * - `NOT NULL`, no default - */ - contributor_id?: - | number - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - number | db.Parameter | db.SQLFragment | db.ParentColumn - > - /** - * **homie.contributor_task.created_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - created_at?: - | (db.TimestampTzString | Date) - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - | (db.TimestampTzString | Date) - | db.Parameter - | db.SQLFragment - | db.ParentColumn - > - /** - * **homie.contributor_task.id** - * - `int4` in database - * - `NOT NULL`, default: `nextval('homie.contributor_task_id_seq'::regclass)` - */ - id?: - | number - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - number | db.Parameter | db.SQLFragment | db.ParentColumn - > - /** - * **homie.contributor_task.task_id** - * - `int4` in database - * - `NOT NULL`, no default - */ - task_id?: - | number - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - number | db.Parameter | db.SQLFragment | db.ParentColumn - > - /** - * **homie.contributor_task.updated_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - updated_at?: - | (db.TimestampTzString | Date) - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - | (db.TimestampTzString | Date) - | db.Parameter - | db.SQLFragment - | db.ParentColumn - > + * **homie.contributor_task.contributor_id** + * - `int4` in database + * - `NOT NULL`, no default + */ + contributor_id?: number | db.Parameter | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **homie.contributor_task.created_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + created_at?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **homie.contributor_task.id** + * - `int4` in database + * - `NOT NULL`, default: `nextval('homie.contributor_task_id_seq'::regclass)` + */ + id?: number | db.Parameter | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **homie.contributor_task.task_id** + * - `int4` in database + * - `NOT NULL`, no default + */ + task_id?: number | db.Parameter | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **homie.contributor_task.updated_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + updated_at?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; } export interface Insertable { /** - * **homie.contributor_task.contributor_id** - * - `int4` in database - * - `NOT NULL`, no default - */ - contributor_id: number | db.Parameter | db.SQLFragment - /** - * **homie.contributor_task.created_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - created_at?: - | (db.TimestampTzString | Date) - | db.Parameter - | db.DefaultType - | db.SQLFragment - /** - * **homie.contributor_task.id** - * - `int4` in database - * - `NOT NULL`, default: `nextval('homie.contributor_task_id_seq'::regclass)` - */ - id?: number | db.Parameter | db.DefaultType | db.SQLFragment - /** - * **homie.contributor_task.task_id** - * - `int4` in database - * - `NOT NULL`, no default - */ - task_id: number | db.Parameter | db.SQLFragment - /** - * **homie.contributor_task.updated_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - updated_at?: - | (db.TimestampTzString | Date) - | db.Parameter - | db.DefaultType - | db.SQLFragment + * **homie.contributor_task.contributor_id** + * - `int4` in database + * - `NOT NULL`, no default + */ + contributor_id: number | db.Parameter | db.SQLFragment; + /** + * **homie.contributor_task.created_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + created_at?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | db.DefaultType | db.SQLFragment; + /** + * **homie.contributor_task.id** + * - `int4` in database + * - `NOT NULL`, default: `nextval('homie.contributor_task_id_seq'::regclass)` + */ + id?: number | db.Parameter | db.DefaultType | db.SQLFragment; + /** + * **homie.contributor_task.task_id** + * - `int4` in database + * - `NOT NULL`, no default + */ + task_id: number | db.Parameter | db.SQLFragment; + /** + * **homie.contributor_task.updated_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + updated_at?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | db.DefaultType | db.SQLFragment; } export interface Updatable { /** - * **homie.contributor_task.contributor_id** - * - `int4` in database - * - `NOT NULL`, no default - */ - contributor_id?: - | number - | db.Parameter - | db.SQLFragment - | db.SQLFragment | db.SQLFragment> - /** - * **homie.contributor_task.created_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - created_at?: - | (db.TimestampTzString | Date) - | db.Parameter - | db.DefaultType - | db.SQLFragment - | db.SQLFragment< - any, - | (db.TimestampTzString | Date) - | db.Parameter - | db.DefaultType - | db.SQLFragment - > - /** - * **homie.contributor_task.id** - * - `int4` in database - * - `NOT NULL`, default: `nextval('homie.contributor_task_id_seq'::regclass)` - */ - id?: - | number - | db.Parameter - | db.DefaultType - | db.SQLFragment - | db.SQLFragment< - any, - number | db.Parameter | db.DefaultType | db.SQLFragment - > - /** - * **homie.contributor_task.task_id** - * - `int4` in database - * - `NOT NULL`, no default - */ - task_id?: - | number - | db.Parameter - | db.SQLFragment - | db.SQLFragment | db.SQLFragment> - /** - * **homie.contributor_task.updated_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - updated_at?: - | (db.TimestampTzString | Date) - | db.Parameter - | db.DefaultType - | db.SQLFragment - | db.SQLFragment< - any, - | (db.TimestampTzString | Date) - | db.Parameter - | db.DefaultType - | db.SQLFragment - > + * **homie.contributor_task.contributor_id** + * - `int4` in database + * - `NOT NULL`, no default + */ + contributor_id?: number | db.Parameter | db.SQLFragment | db.SQLFragment | db.SQLFragment>; + /** + * **homie.contributor_task.created_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + created_at?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | db.DefaultType | db.SQLFragment | db.SQLFragment | db.DefaultType | db.SQLFragment>; + /** + * **homie.contributor_task.id** + * - `int4` in database + * - `NOT NULL`, default: `nextval('homie.contributor_task_id_seq'::regclass)` + */ + id?: number | db.Parameter | db.DefaultType | db.SQLFragment | db.SQLFragment | db.DefaultType | db.SQLFragment>; + /** + * **homie.contributor_task.task_id** + * - `int4` in database + * - `NOT NULL`, no default + */ + task_id?: number | db.Parameter | db.SQLFragment | db.SQLFragment | db.SQLFragment>; + /** + * **homie.contributor_task.updated_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + updated_at?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | db.DefaultType | db.SQLFragment | db.SQLFragment | db.DefaultType | db.SQLFragment>; } - export type UniqueIndex = - | 'contributor_task_pkey' - | 'uniq_contributor_task_contributor_id_task_id' - export type Column = keyof Selectable - export type OnlyCols = Pick< - Selectable, - T[number] - > - export type SQLExpression = - | Table - | db.ColumnNames - | db.ColumnValues - | Whereable - | Column - | db.ParentColumn - | db.GenericSQLExpression - export type SQL = SQLExpression | SQLExpression[] + export type UniqueIndex = 'contributor_task_pkey' | 'uniq_contributor_task_contributor_id_task_id'; + export type Column = keyof Selectable; + export type OnlyCols = Pick; + export type SQLExpression = Table | db.ColumnNames | db.ColumnValues | Whereable | Column | db.ParentColumn | db.GenericSQLExpression; + export type SQL = SQLExpression | SQLExpression[]; } - + /** * **homie.duplicate_task_notification** * - Table in database */ export namespace duplicate_task_notification { - export type Table = 'homie.duplicate_task_notification' + export type Table = 'homie.duplicate_task_notification'; export interface Selectable { /** - * **homie.duplicate_task_notification.created_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - created_at: Date - /** - * **homie.duplicate_task_notification.duplicate_task_id** - * - `int4` in database - * - `NOT NULL`, no default - */ - duplicate_task_id: number - /** - * **homie.duplicate_task_notification.id** - * - `int4` in database - * - `NOT NULL`, default: `nextval('homie.duplicate_task_notification_id_seq'::regclass)` - */ - id: number - /** - * **homie.duplicate_task_notification.target_task_id** - * - `int4` in database - * - `NOT NULL`, no default - */ - target_task_id: number - /** - * **homie.duplicate_task_notification.updated_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - updated_at: Date + * **homie.duplicate_task_notification.created_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + created_at: Date; + /** + * **homie.duplicate_task_notification.duplicate_task_id** + * - `int4` in database + * - `NOT NULL`, no default + */ + duplicate_task_id: number; + /** + * **homie.duplicate_task_notification.id** + * - `int4` in database + * - `NOT NULL`, default: `nextval('homie.duplicate_task_notification_id_seq'::regclass)` + */ + id: number; + /** + * **homie.duplicate_task_notification.target_task_id** + * - `int4` in database + * - `NOT NULL`, no default + */ + target_task_id: number; + /** + * **homie.duplicate_task_notification.updated_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + updated_at: Date; } export interface JSONSelectable { /** - * **homie.duplicate_task_notification.created_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - created_at: db.TimestampTzString - /** - * **homie.duplicate_task_notification.duplicate_task_id** - * - `int4` in database - * - `NOT NULL`, no default - */ - duplicate_task_id: number - /** - * **homie.duplicate_task_notification.id** - * - `int4` in database - * - `NOT NULL`, default: `nextval('homie.duplicate_task_notification_id_seq'::regclass)` - */ - id: number - /** - * **homie.duplicate_task_notification.target_task_id** - * - `int4` in database - * - `NOT NULL`, no default - */ - target_task_id: number - /** - * **homie.duplicate_task_notification.updated_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - updated_at: db.TimestampTzString + * **homie.duplicate_task_notification.created_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + created_at: db.TimestampTzString; + /** + * **homie.duplicate_task_notification.duplicate_task_id** + * - `int4` in database + * - `NOT NULL`, no default + */ + duplicate_task_id: number; + /** + * **homie.duplicate_task_notification.id** + * - `int4` in database + * - `NOT NULL`, default: `nextval('homie.duplicate_task_notification_id_seq'::regclass)` + */ + id: number; + /** + * **homie.duplicate_task_notification.target_task_id** + * - `int4` in database + * - `NOT NULL`, no default + */ + target_task_id: number; + /** + * **homie.duplicate_task_notification.updated_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + updated_at: db.TimestampTzString; } export interface Whereable { /** - * **homie.duplicate_task_notification.created_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - created_at?: - | (db.TimestampTzString | Date) - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - | (db.TimestampTzString | Date) - | db.Parameter - | db.SQLFragment - | db.ParentColumn - > - /** - * **homie.duplicate_task_notification.duplicate_task_id** - * - `int4` in database - * - `NOT NULL`, no default - */ - duplicate_task_id?: - | number - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - number | db.Parameter | db.SQLFragment | db.ParentColumn - > - /** - * **homie.duplicate_task_notification.id** - * - `int4` in database - * - `NOT NULL`, default: `nextval('homie.duplicate_task_notification_id_seq'::regclass)` - */ - id?: - | number - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - number | db.Parameter | db.SQLFragment | db.ParentColumn - > - /** - * **homie.duplicate_task_notification.target_task_id** - * - `int4` in database - * - `NOT NULL`, no default - */ - target_task_id?: - | number - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - number | db.Parameter | db.SQLFragment | db.ParentColumn - > - /** - * **homie.duplicate_task_notification.updated_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - updated_at?: - | (db.TimestampTzString | Date) - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - | (db.TimestampTzString | Date) - | db.Parameter - | db.SQLFragment - | db.ParentColumn - > + * **homie.duplicate_task_notification.created_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + created_at?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **homie.duplicate_task_notification.duplicate_task_id** + * - `int4` in database + * - `NOT NULL`, no default + */ + duplicate_task_id?: number | db.Parameter | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **homie.duplicate_task_notification.id** + * - `int4` in database + * - `NOT NULL`, default: `nextval('homie.duplicate_task_notification_id_seq'::regclass)` + */ + id?: number | db.Parameter | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **homie.duplicate_task_notification.target_task_id** + * - `int4` in database + * - `NOT NULL`, no default + */ + target_task_id?: number | db.Parameter | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **homie.duplicate_task_notification.updated_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + updated_at?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; } export interface Insertable { /** - * **homie.duplicate_task_notification.created_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - created_at?: - | (db.TimestampTzString | Date) - | db.Parameter - | db.DefaultType - | db.SQLFragment - /** - * **homie.duplicate_task_notification.duplicate_task_id** - * - `int4` in database - * - `NOT NULL`, no default - */ - duplicate_task_id: number | db.Parameter | db.SQLFragment - /** - * **homie.duplicate_task_notification.id** - * - `int4` in database - * - `NOT NULL`, default: `nextval('homie.duplicate_task_notification_id_seq'::regclass)` - */ - id?: number | db.Parameter | db.DefaultType | db.SQLFragment - /** - * **homie.duplicate_task_notification.target_task_id** - * - `int4` in database - * - `NOT NULL`, no default - */ - target_task_id: number | db.Parameter | db.SQLFragment - /** - * **homie.duplicate_task_notification.updated_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - updated_at?: - | (db.TimestampTzString | Date) - | db.Parameter - | db.DefaultType - | db.SQLFragment + * **homie.duplicate_task_notification.created_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + created_at?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | db.DefaultType | db.SQLFragment; + /** + * **homie.duplicate_task_notification.duplicate_task_id** + * - `int4` in database + * - `NOT NULL`, no default + */ + duplicate_task_id: number | db.Parameter | db.SQLFragment; + /** + * **homie.duplicate_task_notification.id** + * - `int4` in database + * - `NOT NULL`, default: `nextval('homie.duplicate_task_notification_id_seq'::regclass)` + */ + id?: number | db.Parameter | db.DefaultType | db.SQLFragment; + /** + * **homie.duplicate_task_notification.target_task_id** + * - `int4` in database + * - `NOT NULL`, no default + */ + target_task_id: number | db.Parameter | db.SQLFragment; + /** + * **homie.duplicate_task_notification.updated_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + updated_at?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | db.DefaultType | db.SQLFragment; } export interface Updatable { /** - * **homie.duplicate_task_notification.created_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - created_at?: - | (db.TimestampTzString | Date) - | db.Parameter - | db.DefaultType - | db.SQLFragment - | db.SQLFragment< - any, - | (db.TimestampTzString | Date) - | db.Parameter - | db.DefaultType - | db.SQLFragment - > - /** - * **homie.duplicate_task_notification.duplicate_task_id** - * - `int4` in database - * - `NOT NULL`, no default - */ - duplicate_task_id?: - | number - | db.Parameter - | db.SQLFragment - | db.SQLFragment | db.SQLFragment> - /** - * **homie.duplicate_task_notification.id** - * - `int4` in database - * - `NOT NULL`, default: `nextval('homie.duplicate_task_notification_id_seq'::regclass)` - */ - id?: - | number - | db.Parameter - | db.DefaultType - | db.SQLFragment - | db.SQLFragment< - any, - number | db.Parameter | db.DefaultType | db.SQLFragment - > - /** - * **homie.duplicate_task_notification.target_task_id** - * - `int4` in database - * - `NOT NULL`, no default - */ - target_task_id?: - | number - | db.Parameter - | db.SQLFragment - | db.SQLFragment | db.SQLFragment> - /** - * **homie.duplicate_task_notification.updated_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - updated_at?: - | (db.TimestampTzString | Date) - | db.Parameter - | db.DefaultType - | db.SQLFragment - | db.SQLFragment< - any, - | (db.TimestampTzString | Date) - | db.Parameter - | db.DefaultType - | db.SQLFragment - > + * **homie.duplicate_task_notification.created_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + created_at?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | db.DefaultType | db.SQLFragment | db.SQLFragment | db.DefaultType | db.SQLFragment>; + /** + * **homie.duplicate_task_notification.duplicate_task_id** + * - `int4` in database + * - `NOT NULL`, no default + */ + duplicate_task_id?: number | db.Parameter | db.SQLFragment | db.SQLFragment | db.SQLFragment>; + /** + * **homie.duplicate_task_notification.id** + * - `int4` in database + * - `NOT NULL`, default: `nextval('homie.duplicate_task_notification_id_seq'::regclass)` + */ + id?: number | db.Parameter | db.DefaultType | db.SQLFragment | db.SQLFragment | db.DefaultType | db.SQLFragment>; + /** + * **homie.duplicate_task_notification.target_task_id** + * - `int4` in database + * - `NOT NULL`, no default + */ + target_task_id?: number | db.Parameter | db.SQLFragment | db.SQLFragment | db.SQLFragment>; + /** + * **homie.duplicate_task_notification.updated_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + updated_at?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | db.DefaultType | db.SQLFragment | db.SQLFragment | db.DefaultType | db.SQLFragment>; } - export type UniqueIndex = 'duplicate_task_notification_pkey' - export type Column = keyof Selectable - export type OnlyCols = Pick< - Selectable, - T[number] - > - export type SQLExpression = - | Table - | db.ColumnNames - | db.ColumnValues - | Whereable - | Column - | db.ParentColumn - | db.GenericSQLExpression - export type SQL = SQLExpression | SQLExpression[] + export type UniqueIndex = 'duplicate_task_notification_pkey'; + export type Column = keyof Selectable; + export type OnlyCols = Pick; + export type SQLExpression = Table | db.ColumnNames | db.ColumnValues | Whereable | Column | db.ParentColumn | db.GenericSQLExpression; + export type SQL = SQLExpression | SQLExpression[]; } - + /** * **homie.organization** * - Table in database */ export namespace organization { - export type Table = 'homie.organization' + export type Table = 'homie.organization'; export interface Selectable { /** - * **homie.organization.complexity_score_per_day** - * - `int4` in database - * - Nullable, no default - */ - complexity_score_per_day: number | null - /** - * **homie.organization.created_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - created_at: Date - /** - * **homie.organization.ext_clerk_user_id** - * - `text` in database - * - `NOT NULL`, no default - */ - ext_clerk_user_id: string - /** - * **homie.organization.ext_stripe_customer_id** - * - `text` in database - * - Nullable, no default - */ - ext_stripe_customer_id: string | null - /** - * **homie.organization.has_completed_setup** - * - `bool` in database - * - `NOT NULL`, default: `false` - */ - has_completed_setup: boolean - /** - * **homie.organization.has_unlimited_usage** - * - `bool` in database - * - Nullable, default: `false` - */ - has_unlimited_usage: boolean | null - /** - * **homie.organization.homie_expectation** - * - `text` in database - * - Nullable, no default - */ - homie_expectation: string | null - /** - * **homie.organization.id** - * - `int4` in database - * - `NOT NULL`, default: `nextval('homie.organization_id_seq'::regclass)` - */ - id: number - /** - * **homie.organization.is_persona_enabled** - * - `bool` in database - * - `NOT NULL`, default: `false` - */ - is_persona_enabled: boolean - /** - * **homie.organization.mailchimp_subscriber_hash** - * - `text` in database - * - Nullable, no default - */ - mailchimp_subscriber_hash: string | null - /** - * **homie.organization.owner_name** - * - `text` in database - * - Nullable, no default - */ - owner_name: string | null - /** - * **homie.organization.persona_affection_level** - * - `int4` in database - * - `NOT NULL`, default: `10` - */ - persona_affection_level: number - /** - * **homie.organization.persona_emoji_level** - * - `int4` in database - * - `NOT NULL`, default: `10` - */ - persona_emoji_level: number - /** - * **homie.organization.persona_g_level** - * - `int4` in database - * - `NOT NULL`, default: `10` - */ - persona_g_level: number - /** - * **homie.organization.persona_positivity_level** - * - `int4` in database - * - `NOT NULL`, default: `10` - */ - persona_positivity_level: number - /** - * **homie.organization.referral_source** - * - `text` in database - * - Nullable, no default - */ - referral_source: string | null - /** - * **homie.organization.send_daily_report_enabled** - * - `bool` in database - * - `NOT NULL`, default: `true` - */ - send_daily_report_enabled: boolean - /** - * **homie.organization.send_daily_report_time** - * - `text` in database - * - `NOT NULL`, default: `'12:00'::text` - */ - send_daily_report_time: string - /** - * **homie.organization.target_features** - * - `text` in database - * - Nullable, no default - */ - target_features: string | null - /** - * **homie.organization.team_size** - * - `text` in database - * - Nullable, no default - */ - team_size: string | null - /** - * **homie.organization.trial_ends_at** - * - `timestamptz` in database - * - Nullable, no default - */ - trial_ends_at: Date | null - /** - * **homie.organization.updated_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - updated_at: Date + * **homie.organization.complexity_score_per_day** + * - `int4` in database + * - Nullable, no default + */ + complexity_score_per_day: number | null; + /** + * **homie.organization.created_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + created_at: Date; + /** + * **homie.organization.ext_clerk_user_id** + * - `text` in database + * - `NOT NULL`, no default + */ + ext_clerk_user_id: string; + /** + * **homie.organization.ext_stripe_customer_id** + * - `text` in database + * - Nullable, no default + */ + ext_stripe_customer_id: string | null; + /** + * **homie.organization.has_completed_setup** + * - `bool` in database + * - `NOT NULL`, default: `false` + */ + has_completed_setup: boolean; + /** + * **homie.organization.has_unlimited_usage** + * - `bool` in database + * - Nullable, default: `false` + */ + has_unlimited_usage: boolean | null; + /** + * **homie.organization.homie_expectation** + * - `text` in database + * - Nullable, no default + */ + homie_expectation: string | null; + /** + * **homie.organization.id** + * - `int4` in database + * - `NOT NULL`, default: `nextval('homie.organization_id_seq'::regclass)` + */ + id: number; + /** + * **homie.organization.is_persona_enabled** + * - `bool` in database + * - `NOT NULL`, default: `false` + */ + is_persona_enabled: boolean; + /** + * **homie.organization.mailchimp_subscriber_hash** + * - `text` in database + * - Nullable, no default + */ + mailchimp_subscriber_hash: string | null; + /** + * **homie.organization.owner_name** + * - `text` in database + * - Nullable, no default + */ + owner_name: string | null; + /** + * **homie.organization.persona_affection_level** + * - `int4` in database + * - `NOT NULL`, default: `10` + */ + persona_affection_level: number; + /** + * **homie.organization.persona_emoji_level** + * - `int4` in database + * - `NOT NULL`, default: `10` + */ + persona_emoji_level: number; + /** + * **homie.organization.persona_g_level** + * - `int4` in database + * - `NOT NULL`, default: `10` + */ + persona_g_level: number; + /** + * **homie.organization.persona_positivity_level** + * - `int4` in database + * - `NOT NULL`, default: `10` + */ + persona_positivity_level: number; + /** + * **homie.organization.referral_source** + * - `text` in database + * - Nullable, no default + */ + referral_source: string | null; + /** + * **homie.organization.send_daily_report_enabled** + * - `bool` in database + * - `NOT NULL`, default: `true` + */ + send_daily_report_enabled: boolean; + /** + * **homie.organization.send_daily_report_time** + * - `text` in database + * - `NOT NULL`, default: `'12:00'::text` + */ + send_daily_report_time: string; + /** + * **homie.organization.target_features** + * - `text` in database + * - Nullable, no default + */ + target_features: string | null; + /** + * **homie.organization.team_size** + * - `text` in database + * - Nullable, no default + */ + team_size: string | null; + /** + * **homie.organization.trial_ends_at** + * - `timestamptz` in database + * - Nullable, no default + */ + trial_ends_at: Date | null; + /** + * **homie.organization.updated_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + updated_at: Date; } export interface JSONSelectable { /** - * **homie.organization.complexity_score_per_day** - * - `int4` in database - * - Nullable, no default - */ - complexity_score_per_day: number | null - /** - * **homie.organization.created_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - created_at: db.TimestampTzString - /** - * **homie.organization.ext_clerk_user_id** - * - `text` in database - * - `NOT NULL`, no default - */ - ext_clerk_user_id: string - /** - * **homie.organization.ext_stripe_customer_id** - * - `text` in database - * - Nullable, no default - */ - ext_stripe_customer_id: string | null - /** - * **homie.organization.has_completed_setup** - * - `bool` in database - * - `NOT NULL`, default: `false` - */ - has_completed_setup: boolean - /** - * **homie.organization.has_unlimited_usage** - * - `bool` in database - * - Nullable, default: `false` - */ - has_unlimited_usage: boolean | null - /** - * **homie.organization.homie_expectation** - * - `text` in database - * - Nullable, no default - */ - homie_expectation: string | null - /** - * **homie.organization.id** - * - `int4` in database - * - `NOT NULL`, default: `nextval('homie.organization_id_seq'::regclass)` - */ - id: number - /** - * **homie.organization.is_persona_enabled** - * - `bool` in database - * - `NOT NULL`, default: `false` - */ - is_persona_enabled: boolean - /** - * **homie.organization.mailchimp_subscriber_hash** - * - `text` in database - * - Nullable, no default - */ - mailchimp_subscriber_hash: string | null - /** - * **homie.organization.owner_name** - * - `text` in database - * - Nullable, no default - */ - owner_name: string | null - /** - * **homie.organization.persona_affection_level** - * - `int4` in database - * - `NOT NULL`, default: `10` - */ - persona_affection_level: number - /** - * **homie.organization.persona_emoji_level** - * - `int4` in database - * - `NOT NULL`, default: `10` - */ - persona_emoji_level: number - /** - * **homie.organization.persona_g_level** - * - `int4` in database - * - `NOT NULL`, default: `10` - */ - persona_g_level: number - /** - * **homie.organization.persona_positivity_level** - * - `int4` in database - * - `NOT NULL`, default: `10` - */ - persona_positivity_level: number - /** - * **homie.organization.referral_source** - * - `text` in database - * - Nullable, no default - */ - referral_source: string | null - /** - * **homie.organization.send_daily_report_enabled** - * - `bool` in database - * - `NOT NULL`, default: `true` - */ - send_daily_report_enabled: boolean - /** - * **homie.organization.send_daily_report_time** - * - `text` in database - * - `NOT NULL`, default: `'12:00'::text` - */ - send_daily_report_time: string - /** - * **homie.organization.target_features** - * - `text` in database - * - Nullable, no default - */ - target_features: string | null - /** - * **homie.organization.team_size** - * - `text` in database - * - Nullable, no default - */ - team_size: string | null - /** - * **homie.organization.trial_ends_at** - * - `timestamptz` in database - * - Nullable, no default - */ - trial_ends_at: db.TimestampTzString | null - /** - * **homie.organization.updated_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - updated_at: db.TimestampTzString + * **homie.organization.complexity_score_per_day** + * - `int4` in database + * - Nullable, no default + */ + complexity_score_per_day: number | null; + /** + * **homie.organization.created_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + created_at: db.TimestampTzString; + /** + * **homie.organization.ext_clerk_user_id** + * - `text` in database + * - `NOT NULL`, no default + */ + ext_clerk_user_id: string; + /** + * **homie.organization.ext_stripe_customer_id** + * - `text` in database + * - Nullable, no default + */ + ext_stripe_customer_id: string | null; + /** + * **homie.organization.has_completed_setup** + * - `bool` in database + * - `NOT NULL`, default: `false` + */ + has_completed_setup: boolean; + /** + * **homie.organization.has_unlimited_usage** + * - `bool` in database + * - Nullable, default: `false` + */ + has_unlimited_usage: boolean | null; + /** + * **homie.organization.homie_expectation** + * - `text` in database + * - Nullable, no default + */ + homie_expectation: string | null; + /** + * **homie.organization.id** + * - `int4` in database + * - `NOT NULL`, default: `nextval('homie.organization_id_seq'::regclass)` + */ + id: number; + /** + * **homie.organization.is_persona_enabled** + * - `bool` in database + * - `NOT NULL`, default: `false` + */ + is_persona_enabled: boolean; + /** + * **homie.organization.mailchimp_subscriber_hash** + * - `text` in database + * - Nullable, no default + */ + mailchimp_subscriber_hash: string | null; + /** + * **homie.organization.owner_name** + * - `text` in database + * - Nullable, no default + */ + owner_name: string | null; + /** + * **homie.organization.persona_affection_level** + * - `int4` in database + * - `NOT NULL`, default: `10` + */ + persona_affection_level: number; + /** + * **homie.organization.persona_emoji_level** + * - `int4` in database + * - `NOT NULL`, default: `10` + */ + persona_emoji_level: number; + /** + * **homie.organization.persona_g_level** + * - `int4` in database + * - `NOT NULL`, default: `10` + */ + persona_g_level: number; + /** + * **homie.organization.persona_positivity_level** + * - `int4` in database + * - `NOT NULL`, default: `10` + */ + persona_positivity_level: number; + /** + * **homie.organization.referral_source** + * - `text` in database + * - Nullable, no default + */ + referral_source: string | null; + /** + * **homie.organization.send_daily_report_enabled** + * - `bool` in database + * - `NOT NULL`, default: `true` + */ + send_daily_report_enabled: boolean; + /** + * **homie.organization.send_daily_report_time** + * - `text` in database + * - `NOT NULL`, default: `'12:00'::text` + */ + send_daily_report_time: string; + /** + * **homie.organization.target_features** + * - `text` in database + * - Nullable, no default + */ + target_features: string | null; + /** + * **homie.organization.team_size** + * - `text` in database + * - Nullable, no default + */ + team_size: string | null; + /** + * **homie.organization.trial_ends_at** + * - `timestamptz` in database + * - Nullable, no default + */ + trial_ends_at: db.TimestampTzString | null; + /** + * **homie.organization.updated_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + updated_at: db.TimestampTzString; } export interface Whereable { /** - * **homie.organization.complexity_score_per_day** - * - `int4` in database - * - Nullable, no default - */ - complexity_score_per_day?: - | number - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - number | db.Parameter | db.SQLFragment | db.ParentColumn - > - /** - * **homie.organization.created_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - created_at?: - | (db.TimestampTzString | Date) - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - | (db.TimestampTzString | Date) - | db.Parameter - | db.SQLFragment - | db.ParentColumn - > - /** - * **homie.organization.ext_clerk_user_id** - * - `text` in database - * - `NOT NULL`, no default - */ - ext_clerk_user_id?: - | string - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - string | db.Parameter | db.SQLFragment | db.ParentColumn - > - /** - * **homie.organization.ext_stripe_customer_id** - * - `text` in database - * - Nullable, no default - */ - ext_stripe_customer_id?: - | string - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - string | db.Parameter | db.SQLFragment | db.ParentColumn - > - /** - * **homie.organization.has_completed_setup** - * - `bool` in database - * - `NOT NULL`, default: `false` - */ - has_completed_setup?: - | boolean - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - boolean | db.Parameter | db.SQLFragment | db.ParentColumn - > - /** - * **homie.organization.has_unlimited_usage** - * - `bool` in database - * - Nullable, default: `false` - */ - has_unlimited_usage?: - | boolean - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - boolean | db.Parameter | db.SQLFragment | db.ParentColumn - > - /** - * **homie.organization.homie_expectation** - * - `text` in database - * - Nullable, no default - */ - homie_expectation?: - | string - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - string | db.Parameter | db.SQLFragment | db.ParentColumn - > - /** - * **homie.organization.id** - * - `int4` in database - * - `NOT NULL`, default: `nextval('homie.organization_id_seq'::regclass)` - */ - id?: - | number - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - number | db.Parameter | db.SQLFragment | db.ParentColumn - > - /** - * **homie.organization.is_persona_enabled** - * - `bool` in database - * - `NOT NULL`, default: `false` - */ - is_persona_enabled?: - | boolean - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - boolean | db.Parameter | db.SQLFragment | db.ParentColumn - > - /** - * **homie.organization.mailchimp_subscriber_hash** - * - `text` in database - * - Nullable, no default - */ - mailchimp_subscriber_hash?: - | string - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - string | db.Parameter | db.SQLFragment | db.ParentColumn - > - /** - * **homie.organization.owner_name** - * - `text` in database - * - Nullable, no default - */ - owner_name?: - | string - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - string | db.Parameter | db.SQLFragment | db.ParentColumn - > - /** - * **homie.organization.persona_affection_level** - * - `int4` in database - * - `NOT NULL`, default: `10` - */ - persona_affection_level?: - | number - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - number | db.Parameter | db.SQLFragment | db.ParentColumn - > - /** - * **homie.organization.persona_emoji_level** - * - `int4` in database - * - `NOT NULL`, default: `10` - */ - persona_emoji_level?: - | number - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - number | db.Parameter | db.SQLFragment | db.ParentColumn - > - /** - * **homie.organization.persona_g_level** - * - `int4` in database - * - `NOT NULL`, default: `10` - */ - persona_g_level?: - | number - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - number | db.Parameter | db.SQLFragment | db.ParentColumn - > - /** - * **homie.organization.persona_positivity_level** - * - `int4` in database - * - `NOT NULL`, default: `10` - */ - persona_positivity_level?: - | number - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - number | db.Parameter | db.SQLFragment | db.ParentColumn - > - /** - * **homie.organization.referral_source** - * - `text` in database - * - Nullable, no default - */ - referral_source?: - | string - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - string | db.Parameter | db.SQLFragment | db.ParentColumn - > - /** - * **homie.organization.send_daily_report_enabled** - * - `bool` in database - * - `NOT NULL`, default: `true` - */ - send_daily_report_enabled?: - | boolean - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - boolean | db.Parameter | db.SQLFragment | db.ParentColumn - > - /** - * **homie.organization.send_daily_report_time** - * - `text` in database - * - `NOT NULL`, default: `'12:00'::text` - */ - send_daily_report_time?: - | string - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - string | db.Parameter | db.SQLFragment | db.ParentColumn - > - /** - * **homie.organization.target_features** - * - `text` in database - * - Nullable, no default - */ - target_features?: - | string - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - string | db.Parameter | db.SQLFragment | db.ParentColumn - > - /** - * **homie.organization.team_size** - * - `text` in database - * - Nullable, no default - */ - team_size?: - | string - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - string | db.Parameter | db.SQLFragment | db.ParentColumn - > - /** - * **homie.organization.trial_ends_at** - * - `timestamptz` in database - * - Nullable, no default - */ - trial_ends_at?: - | (db.TimestampTzString | Date) - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - | (db.TimestampTzString | Date) - | db.Parameter - | db.SQLFragment - | db.ParentColumn - > - /** - * **homie.organization.updated_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - updated_at?: - | (db.TimestampTzString | Date) - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - | (db.TimestampTzString | Date) - | db.Parameter - | db.SQLFragment - | db.ParentColumn - > + * **homie.organization.complexity_score_per_day** + * - `int4` in database + * - Nullable, no default + */ + complexity_score_per_day?: number | db.Parameter | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **homie.organization.created_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + created_at?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **homie.organization.ext_clerk_user_id** + * - `text` in database + * - `NOT NULL`, no default + */ + ext_clerk_user_id?: string | db.Parameter | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **homie.organization.ext_stripe_customer_id** + * - `text` in database + * - Nullable, no default + */ + ext_stripe_customer_id?: string | db.Parameter | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **homie.organization.has_completed_setup** + * - `bool` in database + * - `NOT NULL`, default: `false` + */ + has_completed_setup?: boolean | db.Parameter | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **homie.organization.has_unlimited_usage** + * - `bool` in database + * - Nullable, default: `false` + */ + has_unlimited_usage?: boolean | db.Parameter | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **homie.organization.homie_expectation** + * - `text` in database + * - Nullable, no default + */ + homie_expectation?: string | db.Parameter | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **homie.organization.id** + * - `int4` in database + * - `NOT NULL`, default: `nextval('homie.organization_id_seq'::regclass)` + */ + id?: number | db.Parameter | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **homie.organization.is_persona_enabled** + * - `bool` in database + * - `NOT NULL`, default: `false` + */ + is_persona_enabled?: boolean | db.Parameter | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **homie.organization.mailchimp_subscriber_hash** + * - `text` in database + * - Nullable, no default + */ + mailchimp_subscriber_hash?: string | db.Parameter | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **homie.organization.owner_name** + * - `text` in database + * - Nullable, no default + */ + owner_name?: string | db.Parameter | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **homie.organization.persona_affection_level** + * - `int4` in database + * - `NOT NULL`, default: `10` + */ + persona_affection_level?: number | db.Parameter | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **homie.organization.persona_emoji_level** + * - `int4` in database + * - `NOT NULL`, default: `10` + */ + persona_emoji_level?: number | db.Parameter | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **homie.organization.persona_g_level** + * - `int4` in database + * - `NOT NULL`, default: `10` + */ + persona_g_level?: number | db.Parameter | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **homie.organization.persona_positivity_level** + * - `int4` in database + * - `NOT NULL`, default: `10` + */ + persona_positivity_level?: number | db.Parameter | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **homie.organization.referral_source** + * - `text` in database + * - Nullable, no default + */ + referral_source?: string | db.Parameter | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **homie.organization.send_daily_report_enabled** + * - `bool` in database + * - `NOT NULL`, default: `true` + */ + send_daily_report_enabled?: boolean | db.Parameter | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **homie.organization.send_daily_report_time** + * - `text` in database + * - `NOT NULL`, default: `'12:00'::text` + */ + send_daily_report_time?: string | db.Parameter | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **homie.organization.target_features** + * - `text` in database + * - Nullable, no default + */ + target_features?: string | db.Parameter | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **homie.organization.team_size** + * - `text` in database + * - Nullable, no default + */ + team_size?: string | db.Parameter | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **homie.organization.trial_ends_at** + * - `timestamptz` in database + * - Nullable, no default + */ + trial_ends_at?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **homie.organization.updated_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + updated_at?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; } export interface Insertable { /** - * **homie.organization.complexity_score_per_day** - * - `int4` in database - * - Nullable, no default - */ - complexity_score_per_day?: - | number - | db.Parameter - | null - | db.DefaultType - | db.SQLFragment - /** - * **homie.organization.created_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - created_at?: - | (db.TimestampTzString | Date) - | db.Parameter - | db.DefaultType - | db.SQLFragment - /** - * **homie.organization.ext_clerk_user_id** - * - `text` in database - * - `NOT NULL`, no default - */ - ext_clerk_user_id: string | db.Parameter | db.SQLFragment - /** - * **homie.organization.ext_stripe_customer_id** - * - `text` in database - * - Nullable, no default - */ - ext_stripe_customer_id?: - | string - | db.Parameter - | null - | db.DefaultType - | db.SQLFragment - /** - * **homie.organization.has_completed_setup** - * - `bool` in database - * - `NOT NULL`, default: `false` - */ - has_completed_setup?: - | boolean - | db.Parameter - | db.DefaultType - | db.SQLFragment - /** - * **homie.organization.has_unlimited_usage** - * - `bool` in database - * - Nullable, default: `false` - */ - has_unlimited_usage?: - | boolean - | db.Parameter - | null - | db.DefaultType - | db.SQLFragment - /** - * **homie.organization.homie_expectation** - * - `text` in database - * - Nullable, no default - */ - homie_expectation?: - | string - | db.Parameter - | null - | db.DefaultType - | db.SQLFragment - /** - * **homie.organization.id** - * - `int4` in database - * - `NOT NULL`, default: `nextval('homie.organization_id_seq'::regclass)` - */ - id?: number | db.Parameter | db.DefaultType | db.SQLFragment - /** - * **homie.organization.is_persona_enabled** - * - `bool` in database - * - `NOT NULL`, default: `false` - */ - is_persona_enabled?: - | boolean - | db.Parameter - | db.DefaultType - | db.SQLFragment - /** - * **homie.organization.mailchimp_subscriber_hash** - * - `text` in database - * - Nullable, no default - */ - mailchimp_subscriber_hash?: - | string - | db.Parameter - | null - | db.DefaultType - | db.SQLFragment - /** - * **homie.organization.owner_name** - * - `text` in database - * - Nullable, no default - */ - owner_name?: - | string - | db.Parameter - | null - | db.DefaultType - | db.SQLFragment - /** - * **homie.organization.persona_affection_level** - * - `int4` in database - * - `NOT NULL`, default: `10` - */ - persona_affection_level?: - | number - | db.Parameter - | db.DefaultType - | db.SQLFragment - /** - * **homie.organization.persona_emoji_level** - * - `int4` in database - * - `NOT NULL`, default: `10` - */ - persona_emoji_level?: - | number - | db.Parameter - | db.DefaultType - | db.SQLFragment - /** - * **homie.organization.persona_g_level** - * - `int4` in database - * - `NOT NULL`, default: `10` - */ - persona_g_level?: - | number - | db.Parameter - | db.DefaultType - | db.SQLFragment - /** - * **homie.organization.persona_positivity_level** - * - `int4` in database - * - `NOT NULL`, default: `10` - */ - persona_positivity_level?: - | number - | db.Parameter - | db.DefaultType - | db.SQLFragment - /** - * **homie.organization.referral_source** - * - `text` in database - * - Nullable, no default - */ - referral_source?: - | string - | db.Parameter - | null - | db.DefaultType - | db.SQLFragment - /** - * **homie.organization.send_daily_report_enabled** - * - `bool` in database - * - `NOT NULL`, default: `true` - */ - send_daily_report_enabled?: - | boolean - | db.Parameter - | db.DefaultType - | db.SQLFragment - /** - * **homie.organization.send_daily_report_time** - * - `text` in database - * - `NOT NULL`, default: `'12:00'::text` - */ - send_daily_report_time?: - | string - | db.Parameter - | db.DefaultType - | db.SQLFragment - /** - * **homie.organization.target_features** - * - `text` in database - * - Nullable, no default - */ - target_features?: - | string - | db.Parameter - | null - | db.DefaultType - | db.SQLFragment - /** - * **homie.organization.team_size** - * - `text` in database - * - Nullable, no default - */ - team_size?: - | string - | db.Parameter - | null - | db.DefaultType - | db.SQLFragment - /** - * **homie.organization.trial_ends_at** - * - `timestamptz` in database - * - Nullable, no default - */ - trial_ends_at?: - | (db.TimestampTzString | Date) - | db.Parameter - | null - | db.DefaultType - | db.SQLFragment - /** - * **homie.organization.updated_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - updated_at?: - | (db.TimestampTzString | Date) - | db.Parameter - | db.DefaultType - | db.SQLFragment + * **homie.organization.complexity_score_per_day** + * - `int4` in database + * - Nullable, no default + */ + complexity_score_per_day?: number | db.Parameter | null | db.DefaultType | db.SQLFragment; + /** + * **homie.organization.created_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + created_at?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | db.DefaultType | db.SQLFragment; + /** + * **homie.organization.ext_clerk_user_id** + * - `text` in database + * - `NOT NULL`, no default + */ + ext_clerk_user_id: string | db.Parameter | db.SQLFragment; + /** + * **homie.organization.ext_stripe_customer_id** + * - `text` in database + * - Nullable, no default + */ + ext_stripe_customer_id?: string | db.Parameter | null | db.DefaultType | db.SQLFragment; + /** + * **homie.organization.has_completed_setup** + * - `bool` in database + * - `NOT NULL`, default: `false` + */ + has_completed_setup?: boolean | db.Parameter | db.DefaultType | db.SQLFragment; + /** + * **homie.organization.has_unlimited_usage** + * - `bool` in database + * - Nullable, default: `false` + */ + has_unlimited_usage?: boolean | db.Parameter | null | db.DefaultType | db.SQLFragment; + /** + * **homie.organization.homie_expectation** + * - `text` in database + * - Nullable, no default + */ + homie_expectation?: string | db.Parameter | null | db.DefaultType | db.SQLFragment; + /** + * **homie.organization.id** + * - `int4` in database + * - `NOT NULL`, default: `nextval('homie.organization_id_seq'::regclass)` + */ + id?: number | db.Parameter | db.DefaultType | db.SQLFragment; + /** + * **homie.organization.is_persona_enabled** + * - `bool` in database + * - `NOT NULL`, default: `false` + */ + is_persona_enabled?: boolean | db.Parameter | db.DefaultType | db.SQLFragment; + /** + * **homie.organization.mailchimp_subscriber_hash** + * - `text` in database + * - Nullable, no default + */ + mailchimp_subscriber_hash?: string | db.Parameter | null | db.DefaultType | db.SQLFragment; + /** + * **homie.organization.owner_name** + * - `text` in database + * - Nullable, no default + */ + owner_name?: string | db.Parameter | null | db.DefaultType | db.SQLFragment; + /** + * **homie.organization.persona_affection_level** + * - `int4` in database + * - `NOT NULL`, default: `10` + */ + persona_affection_level?: number | db.Parameter | db.DefaultType | db.SQLFragment; + /** + * **homie.organization.persona_emoji_level** + * - `int4` in database + * - `NOT NULL`, default: `10` + */ + persona_emoji_level?: number | db.Parameter | db.DefaultType | db.SQLFragment; + /** + * **homie.organization.persona_g_level** + * - `int4` in database + * - `NOT NULL`, default: `10` + */ + persona_g_level?: number | db.Parameter | db.DefaultType | db.SQLFragment; + /** + * **homie.organization.persona_positivity_level** + * - `int4` in database + * - `NOT NULL`, default: `10` + */ + persona_positivity_level?: number | db.Parameter | db.DefaultType | db.SQLFragment; + /** + * **homie.organization.referral_source** + * - `text` in database + * - Nullable, no default + */ + referral_source?: string | db.Parameter | null | db.DefaultType | db.SQLFragment; + /** + * **homie.organization.send_daily_report_enabled** + * - `bool` in database + * - `NOT NULL`, default: `true` + */ + send_daily_report_enabled?: boolean | db.Parameter | db.DefaultType | db.SQLFragment; + /** + * **homie.organization.send_daily_report_time** + * - `text` in database + * - `NOT NULL`, default: `'12:00'::text` + */ + send_daily_report_time?: string | db.Parameter | db.DefaultType | db.SQLFragment; + /** + * **homie.organization.target_features** + * - `text` in database + * - Nullable, no default + */ + target_features?: string | db.Parameter | null | db.DefaultType | db.SQLFragment; + /** + * **homie.organization.team_size** + * - `text` in database + * - Nullable, no default + */ + team_size?: string | db.Parameter | null | db.DefaultType | db.SQLFragment; + /** + * **homie.organization.trial_ends_at** + * - `timestamptz` in database + * - Nullable, no default + */ + trial_ends_at?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | null | db.DefaultType | db.SQLFragment; + /** + * **homie.organization.updated_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + updated_at?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | db.DefaultType | db.SQLFragment; } export interface Updatable { /** - * **homie.organization.complexity_score_per_day** - * - `int4` in database - * - Nullable, no default - */ - complexity_score_per_day?: - | number - | db.Parameter - | null - | db.DefaultType - | db.SQLFragment - | db.SQLFragment< - any, - | number - | db.Parameter - | null - | db.DefaultType - | db.SQLFragment - > - /** - * **homie.organization.created_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - created_at?: - | (db.TimestampTzString | Date) - | db.Parameter - | db.DefaultType - | db.SQLFragment - | db.SQLFragment< - any, - | (db.TimestampTzString | Date) - | db.Parameter - | db.DefaultType - | db.SQLFragment - > - /** - * **homie.organization.ext_clerk_user_id** - * - `text` in database - * - `NOT NULL`, no default - */ - ext_clerk_user_id?: - | string - | db.Parameter - | db.SQLFragment - | db.SQLFragment | db.SQLFragment> - /** - * **homie.organization.ext_stripe_customer_id** - * - `text` in database - * - Nullable, no default - */ - ext_stripe_customer_id?: - | string - | db.Parameter - | null - | db.DefaultType - | db.SQLFragment - | db.SQLFragment< - any, - | string - | db.Parameter - | null - | db.DefaultType - | db.SQLFragment - > - /** - * **homie.organization.has_completed_setup** - * - `bool` in database - * - `NOT NULL`, default: `false` - */ - has_completed_setup?: - | boolean - | db.Parameter - | db.DefaultType - | db.SQLFragment - | db.SQLFragment< - any, - boolean | db.Parameter | db.DefaultType | db.SQLFragment - > - /** - * **homie.organization.has_unlimited_usage** - * - `bool` in database - * - Nullable, default: `false` - */ - has_unlimited_usage?: - | boolean - | db.Parameter - | null - | db.DefaultType - | db.SQLFragment - | db.SQLFragment< - any, - | boolean - | db.Parameter - | null - | db.DefaultType - | db.SQLFragment - > - /** - * **homie.organization.homie_expectation** - * - `text` in database - * - Nullable, no default - */ - homie_expectation?: - | string - | db.Parameter - | null - | db.DefaultType - | db.SQLFragment - | db.SQLFragment< - any, - | string - | db.Parameter - | null - | db.DefaultType - | db.SQLFragment - > - /** - * **homie.organization.id** - * - `int4` in database - * - `NOT NULL`, default: `nextval('homie.organization_id_seq'::regclass)` - */ - id?: - | number - | db.Parameter - | db.DefaultType - | db.SQLFragment - | db.SQLFragment< - any, - number | db.Parameter | db.DefaultType | db.SQLFragment - > - /** - * **homie.organization.is_persona_enabled** - * - `bool` in database - * - `NOT NULL`, default: `false` - */ - is_persona_enabled?: - | boolean - | db.Parameter - | db.DefaultType - | db.SQLFragment - | db.SQLFragment< - any, - boolean | db.Parameter | db.DefaultType | db.SQLFragment - > - /** - * **homie.organization.mailchimp_subscriber_hash** - * - `text` in database - * - Nullable, no default - */ - mailchimp_subscriber_hash?: - | string - | db.Parameter - | null - | db.DefaultType - | db.SQLFragment - | db.SQLFragment< - any, - | string - | db.Parameter - | null - | db.DefaultType - | db.SQLFragment - > - /** - * **homie.organization.owner_name** - * - `text` in database - * - Nullable, no default - */ - owner_name?: - | string - | db.Parameter - | null - | db.DefaultType - | db.SQLFragment - | db.SQLFragment< - any, - | string - | db.Parameter - | null - | db.DefaultType - | db.SQLFragment - > - /** - * **homie.organization.persona_affection_level** - * - `int4` in database - * - `NOT NULL`, default: `10` - */ - persona_affection_level?: - | number - | db.Parameter - | db.DefaultType - | db.SQLFragment - | db.SQLFragment< - any, - number | db.Parameter | db.DefaultType | db.SQLFragment - > - /** - * **homie.organization.persona_emoji_level** - * - `int4` in database - * - `NOT NULL`, default: `10` - */ - persona_emoji_level?: - | number - | db.Parameter - | db.DefaultType - | db.SQLFragment - | db.SQLFragment< - any, - number | db.Parameter | db.DefaultType | db.SQLFragment - > - /** - * **homie.organization.persona_g_level** - * - `int4` in database - * - `NOT NULL`, default: `10` - */ - persona_g_level?: - | number - | db.Parameter - | db.DefaultType - | db.SQLFragment - | db.SQLFragment< - any, - number | db.Parameter | db.DefaultType | db.SQLFragment - > - /** - * **homie.organization.persona_positivity_level** - * - `int4` in database - * - `NOT NULL`, default: `10` - */ - persona_positivity_level?: - | number - | db.Parameter - | db.DefaultType - | db.SQLFragment - | db.SQLFragment< - any, - number | db.Parameter | db.DefaultType | db.SQLFragment - > - /** - * **homie.organization.referral_source** - * - `text` in database - * - Nullable, no default - */ - referral_source?: - | string - | db.Parameter - | null - | db.DefaultType - | db.SQLFragment - | db.SQLFragment< - any, - | string - | db.Parameter - | null - | db.DefaultType - | db.SQLFragment - > - /** - * **homie.organization.send_daily_report_enabled** - * - `bool` in database - * - `NOT NULL`, default: `true` - */ - send_daily_report_enabled?: - | boolean - | db.Parameter - | db.DefaultType - | db.SQLFragment - | db.SQLFragment< - any, - boolean | db.Parameter | db.DefaultType | db.SQLFragment - > - /** - * **homie.organization.send_daily_report_time** - * - `text` in database - * - `NOT NULL`, default: `'12:00'::text` - */ - send_daily_report_time?: - | string - | db.Parameter - | db.DefaultType - | db.SQLFragment - | db.SQLFragment< - any, - string | db.Parameter | db.DefaultType | db.SQLFragment - > - /** - * **homie.organization.target_features** - * - `text` in database - * - Nullable, no default - */ - target_features?: - | string - | db.Parameter - | null - | db.DefaultType - | db.SQLFragment - | db.SQLFragment< - any, - | string - | db.Parameter - | null - | db.DefaultType - | db.SQLFragment - > - /** - * **homie.organization.team_size** - * - `text` in database - * - Nullable, no default - */ - team_size?: - | string - | db.Parameter - | null - | db.DefaultType - | db.SQLFragment - | db.SQLFragment< - any, - | string - | db.Parameter - | null - | db.DefaultType - | db.SQLFragment - > - /** - * **homie.organization.trial_ends_at** - * - `timestamptz` in database - * - Nullable, no default - */ - trial_ends_at?: - | (db.TimestampTzString | Date) - | db.Parameter - | null - | db.DefaultType - | db.SQLFragment - | db.SQLFragment< - any, - | (db.TimestampTzString | Date) - | db.Parameter - | null - | db.DefaultType - | db.SQLFragment - > - /** - * **homie.organization.updated_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - updated_at?: - | (db.TimestampTzString | Date) - | db.Parameter - | db.DefaultType - | db.SQLFragment - | db.SQLFragment< - any, - | (db.TimestampTzString | Date) - | db.Parameter - | db.DefaultType - | db.SQLFragment - > + * **homie.organization.complexity_score_per_day** + * - `int4` in database + * - Nullable, no default + */ + complexity_score_per_day?: number | db.Parameter | null | db.DefaultType | db.SQLFragment | db.SQLFragment | null | db.DefaultType | db.SQLFragment>; + /** + * **homie.organization.created_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + created_at?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | db.DefaultType | db.SQLFragment | db.SQLFragment | db.DefaultType | db.SQLFragment>; + /** + * **homie.organization.ext_clerk_user_id** + * - `text` in database + * - `NOT NULL`, no default + */ + ext_clerk_user_id?: string | db.Parameter | db.SQLFragment | db.SQLFragment | db.SQLFragment>; + /** + * **homie.organization.ext_stripe_customer_id** + * - `text` in database + * - Nullable, no default + */ + ext_stripe_customer_id?: string | db.Parameter | null | db.DefaultType | db.SQLFragment | db.SQLFragment | null | db.DefaultType | db.SQLFragment>; + /** + * **homie.organization.has_completed_setup** + * - `bool` in database + * - `NOT NULL`, default: `false` + */ + has_completed_setup?: boolean | db.Parameter | db.DefaultType | db.SQLFragment | db.SQLFragment | db.DefaultType | db.SQLFragment>; + /** + * **homie.organization.has_unlimited_usage** + * - `bool` in database + * - Nullable, default: `false` + */ + has_unlimited_usage?: boolean | db.Parameter | null | db.DefaultType | db.SQLFragment | db.SQLFragment | null | db.DefaultType | db.SQLFragment>; + /** + * **homie.organization.homie_expectation** + * - `text` in database + * - Nullable, no default + */ + homie_expectation?: string | db.Parameter | null | db.DefaultType | db.SQLFragment | db.SQLFragment | null | db.DefaultType | db.SQLFragment>; + /** + * **homie.organization.id** + * - `int4` in database + * - `NOT NULL`, default: `nextval('homie.organization_id_seq'::regclass)` + */ + id?: number | db.Parameter | db.DefaultType | db.SQLFragment | db.SQLFragment | db.DefaultType | db.SQLFragment>; + /** + * **homie.organization.is_persona_enabled** + * - `bool` in database + * - `NOT NULL`, default: `false` + */ + is_persona_enabled?: boolean | db.Parameter | db.DefaultType | db.SQLFragment | db.SQLFragment | db.DefaultType | db.SQLFragment>; + /** + * **homie.organization.mailchimp_subscriber_hash** + * - `text` in database + * - Nullable, no default + */ + mailchimp_subscriber_hash?: string | db.Parameter | null | db.DefaultType | db.SQLFragment | db.SQLFragment | null | db.DefaultType | db.SQLFragment>; + /** + * **homie.organization.owner_name** + * - `text` in database + * - Nullable, no default + */ + owner_name?: string | db.Parameter | null | db.DefaultType | db.SQLFragment | db.SQLFragment | null | db.DefaultType | db.SQLFragment>; + /** + * **homie.organization.persona_affection_level** + * - `int4` in database + * - `NOT NULL`, default: `10` + */ + persona_affection_level?: number | db.Parameter | db.DefaultType | db.SQLFragment | db.SQLFragment | db.DefaultType | db.SQLFragment>; + /** + * **homie.organization.persona_emoji_level** + * - `int4` in database + * - `NOT NULL`, default: `10` + */ + persona_emoji_level?: number | db.Parameter | db.DefaultType | db.SQLFragment | db.SQLFragment | db.DefaultType | db.SQLFragment>; + /** + * **homie.organization.persona_g_level** + * - `int4` in database + * - `NOT NULL`, default: `10` + */ + persona_g_level?: number | db.Parameter | db.DefaultType | db.SQLFragment | db.SQLFragment | db.DefaultType | db.SQLFragment>; + /** + * **homie.organization.persona_positivity_level** + * - `int4` in database + * - `NOT NULL`, default: `10` + */ + persona_positivity_level?: number | db.Parameter | db.DefaultType | db.SQLFragment | db.SQLFragment | db.DefaultType | db.SQLFragment>; + /** + * **homie.organization.referral_source** + * - `text` in database + * - Nullable, no default + */ + referral_source?: string | db.Parameter | null | db.DefaultType | db.SQLFragment | db.SQLFragment | null | db.DefaultType | db.SQLFragment>; + /** + * **homie.organization.send_daily_report_enabled** + * - `bool` in database + * - `NOT NULL`, default: `true` + */ + send_daily_report_enabled?: boolean | db.Parameter | db.DefaultType | db.SQLFragment | db.SQLFragment | db.DefaultType | db.SQLFragment>; + /** + * **homie.organization.send_daily_report_time** + * - `text` in database + * - `NOT NULL`, default: `'12:00'::text` + */ + send_daily_report_time?: string | db.Parameter | db.DefaultType | db.SQLFragment | db.SQLFragment | db.DefaultType | db.SQLFragment>; + /** + * **homie.organization.target_features** + * - `text` in database + * - Nullable, no default + */ + target_features?: string | db.Parameter | null | db.DefaultType | db.SQLFragment | db.SQLFragment | null | db.DefaultType | db.SQLFragment>; + /** + * **homie.organization.team_size** + * - `text` in database + * - Nullable, no default + */ + team_size?: string | db.Parameter | null | db.DefaultType | db.SQLFragment | db.SQLFragment | null | db.DefaultType | db.SQLFragment>; + /** + * **homie.organization.trial_ends_at** + * - `timestamptz` in database + * - Nullable, no default + */ + trial_ends_at?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | null | db.DefaultType | db.SQLFragment | db.SQLFragment | null | db.DefaultType | db.SQLFragment>; + /** + * **homie.organization.updated_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + updated_at?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | db.DefaultType | db.SQLFragment | db.SQLFragment | db.DefaultType | db.SQLFragment>; } - export type UniqueIndex = - | 'organization_ext_clerk_user_id_key' - | 'organization_ext_stripe_customer_id_key' - | 'organization_pkey' - export type Column = keyof Selectable - export type OnlyCols = Pick< - Selectable, - T[number] - > - export type SQLExpression = - | Table - | db.ColumnNames - | db.ColumnValues - | Whereable - | Column - | db.ParentColumn - | db.GenericSQLExpression - export type SQL = SQLExpression | SQLExpression[] + export type UniqueIndex = 'organization_ext_clerk_user_id_key' | 'organization_ext_stripe_customer_id_key' | 'organization_pkey'; + export type Column = keyof Selectable; + export type OnlyCols = Pick; + export type SQLExpression = Table | db.ColumnNames | db.ColumnValues | Whereable | Column | db.ParentColumn | db.GenericSQLExpression; + export type SQL = SQLExpression | SQLExpression[]; } - + /** * **homie.plan** * - Table in database */ export namespace plan { - export type Table = 'homie.plan' + export type Table = 'homie.plan'; export interface Selectable { /** - * **homie.plan.billing_interval** - * - `text` in database - * - `NOT NULL`, no default - */ - billing_interval: string - /** - * **homie.plan.created_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - created_at: Date - /** - * **homie.plan.ext_stripe_price_id** - * - `text` in database - * - `NOT NULL`, no default - */ - ext_stripe_price_id: string - /** - * **homie.plan.id** - * - `int4` in database - * - `NOT NULL`, default: `nextval('homie.plan_id_seq'::regclass)` - */ - id: number - /** - * **homie.plan.name** - * - `text` in database - * - `NOT NULL`, no default - */ - name: string - /** - * **homie.plan.updated_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - updated_at: Date + * **homie.plan.billing_interval** + * - `text` in database + * - `NOT NULL`, no default + */ + billing_interval: string; + /** + * **homie.plan.created_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + created_at: Date; + /** + * **homie.plan.ext_stripe_price_id** + * - `text` in database + * - `NOT NULL`, no default + */ + ext_stripe_price_id: string; + /** + * **homie.plan.id** + * - `int4` in database + * - `NOT NULL`, default: `nextval('homie.plan_id_seq'::regclass)` + */ + id: number; + /** + * **homie.plan.name** + * - `text` in database + * - `NOT NULL`, no default + */ + name: string; + /** + * **homie.plan.updated_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + updated_at: Date; } export interface JSONSelectable { /** - * **homie.plan.billing_interval** - * - `text` in database - * - `NOT NULL`, no default - */ - billing_interval: string - /** - * **homie.plan.created_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - created_at: db.TimestampTzString - /** - * **homie.plan.ext_stripe_price_id** - * - `text` in database - * - `NOT NULL`, no default - */ - ext_stripe_price_id: string - /** - * **homie.plan.id** - * - `int4` in database - * - `NOT NULL`, default: `nextval('homie.plan_id_seq'::regclass)` - */ - id: number - /** - * **homie.plan.name** - * - `text` in database - * - `NOT NULL`, no default - */ - name: string - /** - * **homie.plan.updated_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - updated_at: db.TimestampTzString + * **homie.plan.billing_interval** + * - `text` in database + * - `NOT NULL`, no default + */ + billing_interval: string; + /** + * **homie.plan.created_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + created_at: db.TimestampTzString; + /** + * **homie.plan.ext_stripe_price_id** + * - `text` in database + * - `NOT NULL`, no default + */ + ext_stripe_price_id: string; + /** + * **homie.plan.id** + * - `int4` in database + * - `NOT NULL`, default: `nextval('homie.plan_id_seq'::regclass)` + */ + id: number; + /** + * **homie.plan.name** + * - `text` in database + * - `NOT NULL`, no default + */ + name: string; + /** + * **homie.plan.updated_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + updated_at: db.TimestampTzString; } export interface Whereable { /** - * **homie.plan.billing_interval** - * - `text` in database - * - `NOT NULL`, no default - */ - billing_interval?: - | string - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - string | db.Parameter | db.SQLFragment | db.ParentColumn - > - /** - * **homie.plan.created_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - created_at?: - | (db.TimestampTzString | Date) - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - | (db.TimestampTzString | Date) - | db.Parameter - | db.SQLFragment - | db.ParentColumn - > - /** - * **homie.plan.ext_stripe_price_id** - * - `text` in database - * - `NOT NULL`, no default - */ - ext_stripe_price_id?: - | string - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - string | db.Parameter | db.SQLFragment | db.ParentColumn - > - /** - * **homie.plan.id** - * - `int4` in database - * - `NOT NULL`, default: `nextval('homie.plan_id_seq'::regclass)` - */ - id?: - | number - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - number | db.Parameter | db.SQLFragment | db.ParentColumn - > - /** - * **homie.plan.name** - * - `text` in database - * - `NOT NULL`, no default - */ - name?: - | string - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - string | db.Parameter | db.SQLFragment | db.ParentColumn - > - /** - * **homie.plan.updated_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - updated_at?: - | (db.TimestampTzString | Date) - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - | (db.TimestampTzString | Date) - | db.Parameter - | db.SQLFragment - | db.ParentColumn - > + * **homie.plan.billing_interval** + * - `text` in database + * - `NOT NULL`, no default + */ + billing_interval?: string | db.Parameter | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **homie.plan.created_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + created_at?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **homie.plan.ext_stripe_price_id** + * - `text` in database + * - `NOT NULL`, no default + */ + ext_stripe_price_id?: string | db.Parameter | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **homie.plan.id** + * - `int4` in database + * - `NOT NULL`, default: `nextval('homie.plan_id_seq'::regclass)` + */ + id?: number | db.Parameter | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **homie.plan.name** + * - `text` in database + * - `NOT NULL`, no default + */ + name?: string | db.Parameter | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **homie.plan.updated_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + updated_at?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; } export interface Insertable { /** - * **homie.plan.billing_interval** - * - `text` in database - * - `NOT NULL`, no default - */ - billing_interval: string | db.Parameter | db.SQLFragment - /** - * **homie.plan.created_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - created_at?: - | (db.TimestampTzString | Date) - | db.Parameter - | db.DefaultType - | db.SQLFragment - /** - * **homie.plan.ext_stripe_price_id** - * - `text` in database - * - `NOT NULL`, no default - */ - ext_stripe_price_id: string | db.Parameter | db.SQLFragment - /** - * **homie.plan.id** - * - `int4` in database - * - `NOT NULL`, default: `nextval('homie.plan_id_seq'::regclass)` - */ - id?: number | db.Parameter | db.DefaultType | db.SQLFragment - /** - * **homie.plan.name** - * - `text` in database - * - `NOT NULL`, no default - */ - name: string | db.Parameter | db.SQLFragment - /** - * **homie.plan.updated_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - updated_at?: - | (db.TimestampTzString | Date) - | db.Parameter - | db.DefaultType - | db.SQLFragment + * **homie.plan.billing_interval** + * - `text` in database + * - `NOT NULL`, no default + */ + billing_interval: string | db.Parameter | db.SQLFragment; + /** + * **homie.plan.created_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + created_at?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | db.DefaultType | db.SQLFragment; + /** + * **homie.plan.ext_stripe_price_id** + * - `text` in database + * - `NOT NULL`, no default + */ + ext_stripe_price_id: string | db.Parameter | db.SQLFragment; + /** + * **homie.plan.id** + * - `int4` in database + * - `NOT NULL`, default: `nextval('homie.plan_id_seq'::regclass)` + */ + id?: number | db.Parameter | db.DefaultType | db.SQLFragment; + /** + * **homie.plan.name** + * - `text` in database + * - `NOT NULL`, no default + */ + name: string | db.Parameter | db.SQLFragment; + /** + * **homie.plan.updated_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + updated_at?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | db.DefaultType | db.SQLFragment; } export interface Updatable { /** - * **homie.plan.billing_interval** - * - `text` in database - * - `NOT NULL`, no default - */ - billing_interval?: - | string - | db.Parameter - | db.SQLFragment - | db.SQLFragment | db.SQLFragment> - /** - * **homie.plan.created_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - created_at?: - | (db.TimestampTzString | Date) - | db.Parameter - | db.DefaultType - | db.SQLFragment - | db.SQLFragment< - any, - | (db.TimestampTzString | Date) - | db.Parameter - | db.DefaultType - | db.SQLFragment - > - /** - * **homie.plan.ext_stripe_price_id** - * - `text` in database - * - `NOT NULL`, no default - */ - ext_stripe_price_id?: - | string - | db.Parameter - | db.SQLFragment - | db.SQLFragment | db.SQLFragment> - /** - * **homie.plan.id** - * - `int4` in database - * - `NOT NULL`, default: `nextval('homie.plan_id_seq'::regclass)` - */ - id?: - | number - | db.Parameter - | db.DefaultType - | db.SQLFragment - | db.SQLFragment< - any, - number | db.Parameter | db.DefaultType | db.SQLFragment - > - /** - * **homie.plan.name** - * - `text` in database - * - `NOT NULL`, no default - */ - name?: - | string - | db.Parameter - | db.SQLFragment - | db.SQLFragment | db.SQLFragment> - /** - * **homie.plan.updated_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - updated_at?: - | (db.TimestampTzString | Date) - | db.Parameter - | db.DefaultType - | db.SQLFragment - | db.SQLFragment< - any, - | (db.TimestampTzString | Date) - | db.Parameter - | db.DefaultType - | db.SQLFragment - > + * **homie.plan.billing_interval** + * - `text` in database + * - `NOT NULL`, no default + */ + billing_interval?: string | db.Parameter | db.SQLFragment | db.SQLFragment | db.SQLFragment>; + /** + * **homie.plan.created_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + created_at?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | db.DefaultType | db.SQLFragment | db.SQLFragment | db.DefaultType | db.SQLFragment>; + /** + * **homie.plan.ext_stripe_price_id** + * - `text` in database + * - `NOT NULL`, no default + */ + ext_stripe_price_id?: string | db.Parameter | db.SQLFragment | db.SQLFragment | db.SQLFragment>; + /** + * **homie.plan.id** + * - `int4` in database + * - `NOT NULL`, default: `nextval('homie.plan_id_seq'::regclass)` + */ + id?: number | db.Parameter | db.DefaultType | db.SQLFragment | db.SQLFragment | db.DefaultType | db.SQLFragment>; + /** + * **homie.plan.name** + * - `text` in database + * - `NOT NULL`, no default + */ + name?: string | db.Parameter | db.SQLFragment | db.SQLFragment | db.SQLFragment>; + /** + * **homie.plan.updated_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + updated_at?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | db.DefaultType | db.SQLFragment | db.SQLFragment | db.DefaultType | db.SQLFragment>; } - export type UniqueIndex = - | 'plan_ext_stripe_price_id_key' - | 'plan_name_billing_interval' - | 'plan_pkey' - export type Column = keyof Selectable - export type OnlyCols = Pick< - Selectable, - T[number] - > - export type SQLExpression = - | Table - | db.ColumnNames - | db.ColumnValues - | Whereable - | Column - | db.ParentColumn - | db.GenericSQLExpression - export type SQL = SQLExpression | SQLExpression[] + export type UniqueIndex = 'plan_ext_stripe_price_id_key' | 'plan_name_billing_interval' | 'plan_pkey'; + export type Column = keyof Selectable; + export type OnlyCols = Pick; + export type SQLExpression = Table | db.ColumnNames | db.ColumnValues | Whereable | Column | db.ParentColumn | db.GenericSQLExpression; + export type SQL = SQLExpression | SQLExpression[]; } - + /** * **homie.pull_request** * - Table in database */ export namespace pull_request { - export type Table = 'homie.pull_request' + export type Table = 'homie.pull_request'; export interface Selectable { /** - * **homie.pull_request.body** - * - `text` in database - * - `NOT NULL`, no default - */ - body: string - /** - * **homie.pull_request.closed_at** - * - `timestamptz` in database - * - Nullable, no default - */ - closed_at: Date | null - /** - * **homie.pull_request.complexity_score** - * - `int4` in database - * - `NOT NULL`, default: `0` - */ - complexity_score: number - /** - * **homie.pull_request.contributor_id** - * - `int4` in database - * - `NOT NULL`, no default - */ - contributor_id: number - /** - * **homie.pull_request.created_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - created_at: Date - /** - * **homie.pull_request.embed_metadata** - * - `json` in database - * - Nullable, no default - */ - embed_metadata: db.JSONValue | null - /** - * **homie.pull_request.embed_value** - * - `text` in database - * - Nullable, no default - */ - embed_value: string | null - /** - * **homie.pull_request.ext_gh_pull_request_id** - * - `int4` in database - * - Nullable, no default - */ - ext_gh_pull_request_id: number | null - /** - * **homie.pull_request.ext_gitlab_merge_request_id** - * - `int4` in database - * - Nullable, no default - */ - ext_gitlab_merge_request_id: number | null - /** - * **homie.pull_request.ext_gitlab_merge_request_iid** - * - `int4` in database - * - Nullable, no default - */ - ext_gitlab_merge_request_iid: number | null - /** - * **homie.pull_request.github_repo_id** - * - `int4` in database - * - Nullable, no default - */ - github_repo_id: number | null - /** - * **homie.pull_request.gitlab_project_id** - * - `int4` in database - * - Nullable, no default - */ - gitlab_project_id: number | null - /** - * **homie.pull_request.html_url** - * - `text` in database - * - `NOT NULL`, no default - */ - html_url: string - /** - * **homie.pull_request.id** - * - `int4` in database - * - `NOT NULL`, default: `nextval('homie.pull_request_id_seq'::regclass)` - */ - id: number - /** - * **homie.pull_request.merged_at** - * - `timestamptz` in database - * - Nullable, no default - */ - merged_at: Date | null - /** - * **homie.pull_request.number** - * - `int4` in database - * - `NOT NULL`, no default - */ - number: number - /** - * **homie.pull_request.organization_id** - * - `int4` in database - * - `NOT NULL`, no default - */ - organization_id: number - /** - * **homie.pull_request.source_branch** - * - `text` in database - * - Nullable, no default - */ - source_branch: string | null - /** - * **homie.pull_request.target_branch** - * - `text` in database - * - Nullable, no default - */ - target_branch: string | null - /** - * **homie.pull_request.title** - * - `text` in database - * - `NOT NULL`, no default - */ - title: string - /** - * **homie.pull_request.updated_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - updated_at: Date - /** - * **homie.pull_request.was_merged_to_default_branch** - * - `bool` in database - * - `NOT NULL`, default: `false` - */ - was_merged_to_default_branch: boolean + * **homie.pull_request.body** + * - `text` in database + * - `NOT NULL`, no default + */ + body: string; + /** + * **homie.pull_request.closed_at** + * - `timestamptz` in database + * - Nullable, no default + */ + closed_at: Date | null; + /** + * **homie.pull_request.complexity_score** + * - `int4` in database + * - `NOT NULL`, default: `0` + */ + complexity_score: number; + /** + * **homie.pull_request.contributor_id** + * - `int4` in database + * - `NOT NULL`, no default + */ + contributor_id: number; + /** + * **homie.pull_request.created_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + created_at: Date; + /** + * **homie.pull_request.embed_metadata** + * - `json` in database + * - Nullable, no default + */ + embed_metadata: db.JSONValue | null; + /** + * **homie.pull_request.embed_value** + * - `text` in database + * - Nullable, no default + */ + embed_value: string | null; + /** + * **homie.pull_request.ext_gh_pull_request_id** + * - `text` in database + * - Nullable, no default + */ + ext_gh_pull_request_id: string | null; + /** + * **homie.pull_request.ext_gitlab_merge_request_id** + * - `text` in database + * - Nullable, no default + */ + ext_gitlab_merge_request_id: string | null; + /** + * **homie.pull_request.ext_gitlab_merge_request_iid** + * - `text` in database + * - Nullable, no default + */ + ext_gitlab_merge_request_iid: string | null; + /** + * **homie.pull_request.github_repo_id** + * - `int4` in database + * - Nullable, no default + */ + github_repo_id: number | null; + /** + * **homie.pull_request.gitlab_project_id** + * - `int4` in database + * - Nullable, no default + */ + gitlab_project_id: number | null; + /** + * **homie.pull_request.html_url** + * - `text` in database + * - `NOT NULL`, no default + */ + html_url: string; + /** + * **homie.pull_request.id** + * - `int4` in database + * - `NOT NULL`, default: `nextval('homie.pull_request_id_seq'::regclass)` + */ + id: number; + /** + * **homie.pull_request.merged_at** + * - `timestamptz` in database + * - Nullable, no default + */ + merged_at: Date | null; + /** + * **homie.pull_request.number** + * - `int4` in database + * - `NOT NULL`, no default + */ + number: number; + /** + * **homie.pull_request.organization_id** + * - `int4` in database + * - `NOT NULL`, no default + */ + organization_id: number; + /** + * **homie.pull_request.source_branch** + * - `text` in database + * - Nullable, no default + */ + source_branch: string | null; + /** + * **homie.pull_request.target_branch** + * - `text` in database + * - Nullable, no default + */ + target_branch: string | null; + /** + * **homie.pull_request.title** + * - `text` in database + * - `NOT NULL`, no default + */ + title: string; + /** + * **homie.pull_request.updated_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + updated_at: Date; + /** + * **homie.pull_request.was_merged_to_default_branch** + * - `bool` in database + * - `NOT NULL`, default: `false` + */ + was_merged_to_default_branch: boolean; } export interface JSONSelectable { /** - * **homie.pull_request.body** - * - `text` in database - * - `NOT NULL`, no default - */ - body: string - /** - * **homie.pull_request.closed_at** - * - `timestamptz` in database - * - Nullable, no default - */ - closed_at: db.TimestampTzString | null - /** - * **homie.pull_request.complexity_score** - * - `int4` in database - * - `NOT NULL`, default: `0` - */ - complexity_score: number - /** - * **homie.pull_request.contributor_id** - * - `int4` in database - * - `NOT NULL`, no default - */ - contributor_id: number - /** - * **homie.pull_request.created_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - created_at: db.TimestampTzString - /** - * **homie.pull_request.embed_metadata** - * - `json` in database - * - Nullable, no default - */ - embed_metadata: db.JSONValue | null - /** - * **homie.pull_request.embed_value** - * - `text` in database - * - Nullable, no default - */ - embed_value: string | null - /** - * **homie.pull_request.ext_gh_pull_request_id** - * - `int4` in database - * - Nullable, no default - */ - ext_gh_pull_request_id: number | null - /** - * **homie.pull_request.ext_gitlab_merge_request_id** - * - `int4` in database - * - Nullable, no default - */ - ext_gitlab_merge_request_id: number | null - /** - * **homie.pull_request.ext_gitlab_merge_request_iid** - * - `int4` in database - * - Nullable, no default - */ - ext_gitlab_merge_request_iid: number | null - /** - * **homie.pull_request.github_repo_id** - * - `int4` in database - * - Nullable, no default - */ - github_repo_id: number | null - /** - * **homie.pull_request.gitlab_project_id** - * - `int4` in database - * - Nullable, no default - */ - gitlab_project_id: number | null - /** - * **homie.pull_request.html_url** - * - `text` in database - * - `NOT NULL`, no default - */ - html_url: string - /** - * **homie.pull_request.id** - * - `int4` in database - * - `NOT NULL`, default: `nextval('homie.pull_request_id_seq'::regclass)` - */ - id: number - /** - * **homie.pull_request.merged_at** - * - `timestamptz` in database - * - Nullable, no default - */ - merged_at: db.TimestampTzString | null - /** - * **homie.pull_request.number** - * - `int4` in database - * - `NOT NULL`, no default - */ - number: number - /** - * **homie.pull_request.organization_id** - * - `int4` in database - * - `NOT NULL`, no default - */ - organization_id: number - /** - * **homie.pull_request.source_branch** - * - `text` in database - * - Nullable, no default - */ - source_branch: string | null - /** - * **homie.pull_request.target_branch** - * - `text` in database - * - Nullable, no default - */ - target_branch: string | null - /** - * **homie.pull_request.title** - * - `text` in database - * - `NOT NULL`, no default - */ - title: string - /** - * **homie.pull_request.updated_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - updated_at: db.TimestampTzString - /** - * **homie.pull_request.was_merged_to_default_branch** - * - `bool` in database - * - `NOT NULL`, default: `false` - */ - was_merged_to_default_branch: boolean + * **homie.pull_request.body** + * - `text` in database + * - `NOT NULL`, no default + */ + body: string; + /** + * **homie.pull_request.closed_at** + * - `timestamptz` in database + * - Nullable, no default + */ + closed_at: db.TimestampTzString | null; + /** + * **homie.pull_request.complexity_score** + * - `int4` in database + * - `NOT NULL`, default: `0` + */ + complexity_score: number; + /** + * **homie.pull_request.contributor_id** + * - `int4` in database + * - `NOT NULL`, no default + */ + contributor_id: number; + /** + * **homie.pull_request.created_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + created_at: db.TimestampTzString; + /** + * **homie.pull_request.embed_metadata** + * - `json` in database + * - Nullable, no default + */ + embed_metadata: db.JSONValue | null; + /** + * **homie.pull_request.embed_value** + * - `text` in database + * - Nullable, no default + */ + embed_value: string | null; + /** + * **homie.pull_request.ext_gh_pull_request_id** + * - `text` in database + * - Nullable, no default + */ + ext_gh_pull_request_id: string | null; + /** + * **homie.pull_request.ext_gitlab_merge_request_id** + * - `text` in database + * - Nullable, no default + */ + ext_gitlab_merge_request_id: string | null; + /** + * **homie.pull_request.ext_gitlab_merge_request_iid** + * - `text` in database + * - Nullable, no default + */ + ext_gitlab_merge_request_iid: string | null; + /** + * **homie.pull_request.github_repo_id** + * - `int4` in database + * - Nullable, no default + */ + github_repo_id: number | null; + /** + * **homie.pull_request.gitlab_project_id** + * - `int4` in database + * - Nullable, no default + */ + gitlab_project_id: number | null; + /** + * **homie.pull_request.html_url** + * - `text` in database + * - `NOT NULL`, no default + */ + html_url: string; + /** + * **homie.pull_request.id** + * - `int4` in database + * - `NOT NULL`, default: `nextval('homie.pull_request_id_seq'::regclass)` + */ + id: number; + /** + * **homie.pull_request.merged_at** + * - `timestamptz` in database + * - Nullable, no default + */ + merged_at: db.TimestampTzString | null; + /** + * **homie.pull_request.number** + * - `int4` in database + * - `NOT NULL`, no default + */ + number: number; + /** + * **homie.pull_request.organization_id** + * - `int4` in database + * - `NOT NULL`, no default + */ + organization_id: number; + /** + * **homie.pull_request.source_branch** + * - `text` in database + * - Nullable, no default + */ + source_branch: string | null; + /** + * **homie.pull_request.target_branch** + * - `text` in database + * - Nullable, no default + */ + target_branch: string | null; + /** + * **homie.pull_request.title** + * - `text` in database + * - `NOT NULL`, no default + */ + title: string; + /** + * **homie.pull_request.updated_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + updated_at: db.TimestampTzString; + /** + * **homie.pull_request.was_merged_to_default_branch** + * - `bool` in database + * - `NOT NULL`, default: `false` + */ + was_merged_to_default_branch: boolean; } export interface Whereable { /** - * **homie.pull_request.body** - * - `text` in database - * - `NOT NULL`, no default - */ - body?: - | string - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - string | db.Parameter | db.SQLFragment | db.ParentColumn - > - /** - * **homie.pull_request.closed_at** - * - `timestamptz` in database - * - Nullable, no default - */ - closed_at?: - | (db.TimestampTzString | Date) - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - | (db.TimestampTzString | Date) - | db.Parameter - | db.SQLFragment - | db.ParentColumn - > - /** - * **homie.pull_request.complexity_score** - * - `int4` in database - * - `NOT NULL`, default: `0` - */ - complexity_score?: - | number - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - number | db.Parameter | db.SQLFragment | db.ParentColumn - > - /** - * **homie.pull_request.contributor_id** - * - `int4` in database - * - `NOT NULL`, no default - */ - contributor_id?: - | number - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - number | db.Parameter | db.SQLFragment | db.ParentColumn - > - /** - * **homie.pull_request.created_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - created_at?: - | (db.TimestampTzString | Date) - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - | (db.TimestampTzString | Date) - | db.Parameter - | db.SQLFragment - | db.ParentColumn - > - /** - * **homie.pull_request.embed_metadata** - * - `json` in database - * - Nullable, no default - */ - embed_metadata?: - | db.JSONValue - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - | db.JSONValue - | db.Parameter - | db.SQLFragment - | db.ParentColumn - > - /** - * **homie.pull_request.embed_value** - * - `text` in database - * - Nullable, no default - */ - embed_value?: - | string - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - string | db.Parameter | db.SQLFragment | db.ParentColumn - > - /** - * **homie.pull_request.ext_gh_pull_request_id** - * - `int4` in database - * - Nullable, no default - */ - ext_gh_pull_request_id?: - | number - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - number | db.Parameter | db.SQLFragment | db.ParentColumn - > - /** - * **homie.pull_request.ext_gitlab_merge_request_id** - * - `int4` in database - * - Nullable, no default - */ - ext_gitlab_merge_request_id?: - | number - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - number | db.Parameter | db.SQLFragment | db.ParentColumn - > - /** - * **homie.pull_request.ext_gitlab_merge_request_iid** - * - `int4` in database - * - Nullable, no default - */ - ext_gitlab_merge_request_iid?: - | number - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - number | db.Parameter | db.SQLFragment | db.ParentColumn - > - /** - * **homie.pull_request.github_repo_id** - * - `int4` in database - * - Nullable, no default - */ - github_repo_id?: - | number - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - number | db.Parameter | db.SQLFragment | db.ParentColumn - > - /** - * **homie.pull_request.gitlab_project_id** - * - `int4` in database - * - Nullable, no default - */ - gitlab_project_id?: - | number - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - number | db.Parameter | db.SQLFragment | db.ParentColumn - > - /** - * **homie.pull_request.html_url** - * - `text` in database - * - `NOT NULL`, no default - */ - html_url?: - | string - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - string | db.Parameter | db.SQLFragment | db.ParentColumn - > - /** - * **homie.pull_request.id** - * - `int4` in database - * - `NOT NULL`, default: `nextval('homie.pull_request_id_seq'::regclass)` - */ - id?: - | number - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - number | db.Parameter | db.SQLFragment | db.ParentColumn - > - /** - * **homie.pull_request.merged_at** - * - `timestamptz` in database - * - Nullable, no default - */ - merged_at?: - | (db.TimestampTzString | Date) - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - | (db.TimestampTzString | Date) - | db.Parameter - | db.SQLFragment - | db.ParentColumn - > - /** - * **homie.pull_request.number** - * - `int4` in database - * - `NOT NULL`, no default - */ - number?: - | number - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - number | db.Parameter | db.SQLFragment | db.ParentColumn - > - /** - * **homie.pull_request.organization_id** - * - `int4` in database - * - `NOT NULL`, no default - */ - organization_id?: - | number - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - number | db.Parameter | db.SQLFragment | db.ParentColumn - > - /** - * **homie.pull_request.source_branch** - * - `text` in database - * - Nullable, no default - */ - source_branch?: - | string - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - string | db.Parameter | db.SQLFragment | db.ParentColumn - > - /** - * **homie.pull_request.target_branch** - * - `text` in database - * - Nullable, no default - */ - target_branch?: - | string - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - string | db.Parameter | db.SQLFragment | db.ParentColumn - > - /** - * **homie.pull_request.title** - * - `text` in database - * - `NOT NULL`, no default - */ - title?: - | string - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - string | db.Parameter | db.SQLFragment | db.ParentColumn - > - /** - * **homie.pull_request.updated_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - updated_at?: - | (db.TimestampTzString | Date) - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - | (db.TimestampTzString | Date) - | db.Parameter - | db.SQLFragment - | db.ParentColumn - > - /** - * **homie.pull_request.was_merged_to_default_branch** - * - `bool` in database - * - `NOT NULL`, default: `false` - */ - was_merged_to_default_branch?: - | boolean - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - boolean | db.Parameter | db.SQLFragment | db.ParentColumn - > + * **homie.pull_request.body** + * - `text` in database + * - `NOT NULL`, no default + */ + body?: string | db.Parameter | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **homie.pull_request.closed_at** + * - `timestamptz` in database + * - Nullable, no default + */ + closed_at?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **homie.pull_request.complexity_score** + * - `int4` in database + * - `NOT NULL`, default: `0` + */ + complexity_score?: number | db.Parameter | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **homie.pull_request.contributor_id** + * - `int4` in database + * - `NOT NULL`, no default + */ + contributor_id?: number | db.Parameter | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **homie.pull_request.created_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + created_at?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **homie.pull_request.embed_metadata** + * - `json` in database + * - Nullable, no default + */ + embed_metadata?: db.JSONValue | db.Parameter | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **homie.pull_request.embed_value** + * - `text` in database + * - Nullable, no default + */ + embed_value?: string | db.Parameter | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **homie.pull_request.ext_gh_pull_request_id** + * - `text` in database + * - Nullable, no default + */ + ext_gh_pull_request_id?: string | db.Parameter | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **homie.pull_request.ext_gitlab_merge_request_id** + * - `text` in database + * - Nullable, no default + */ + ext_gitlab_merge_request_id?: string | db.Parameter | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **homie.pull_request.ext_gitlab_merge_request_iid** + * - `text` in database + * - Nullable, no default + */ + ext_gitlab_merge_request_iid?: string | db.Parameter | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **homie.pull_request.github_repo_id** + * - `int4` in database + * - Nullable, no default + */ + github_repo_id?: number | db.Parameter | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **homie.pull_request.gitlab_project_id** + * - `int4` in database + * - Nullable, no default + */ + gitlab_project_id?: number | db.Parameter | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **homie.pull_request.html_url** + * - `text` in database + * - `NOT NULL`, no default + */ + html_url?: string | db.Parameter | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **homie.pull_request.id** + * - `int4` in database + * - `NOT NULL`, default: `nextval('homie.pull_request_id_seq'::regclass)` + */ + id?: number | db.Parameter | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **homie.pull_request.merged_at** + * - `timestamptz` in database + * - Nullable, no default + */ + merged_at?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **homie.pull_request.number** + * - `int4` in database + * - `NOT NULL`, no default + */ + number?: number | db.Parameter | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **homie.pull_request.organization_id** + * - `int4` in database + * - `NOT NULL`, no default + */ + organization_id?: number | db.Parameter | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **homie.pull_request.source_branch** + * - `text` in database + * - Nullable, no default + */ + source_branch?: string | db.Parameter | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **homie.pull_request.target_branch** + * - `text` in database + * - Nullable, no default + */ + target_branch?: string | db.Parameter | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **homie.pull_request.title** + * - `text` in database + * - `NOT NULL`, no default + */ + title?: string | db.Parameter | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **homie.pull_request.updated_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + updated_at?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **homie.pull_request.was_merged_to_default_branch** + * - `bool` in database + * - `NOT NULL`, default: `false` + */ + was_merged_to_default_branch?: boolean | db.Parameter | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; } export interface Insertable { /** - * **homie.pull_request.body** - * - `text` in database - * - `NOT NULL`, no default - */ - body: string | db.Parameter | db.SQLFragment - /** - * **homie.pull_request.closed_at** - * - `timestamptz` in database - * - Nullable, no default - */ - closed_at?: - | (db.TimestampTzString | Date) - | db.Parameter - | null - | db.DefaultType - | db.SQLFragment - /** - * **homie.pull_request.complexity_score** - * - `int4` in database - * - `NOT NULL`, default: `0` - */ - complexity_score?: - | number - | db.Parameter - | db.DefaultType - | db.SQLFragment - /** - * **homie.pull_request.contributor_id** - * - `int4` in database - * - `NOT NULL`, no default - */ - contributor_id: number | db.Parameter | db.SQLFragment - /** - * **homie.pull_request.created_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - created_at?: - | (db.TimestampTzString | Date) - | db.Parameter - | db.DefaultType - | db.SQLFragment - /** - * **homie.pull_request.embed_metadata** - * - `json` in database - * - Nullable, no default - */ - embed_metadata?: - | db.JSONValue - | db.Parameter - | null - | db.DefaultType - | db.SQLFragment - /** - * **homie.pull_request.embed_value** - * - `text` in database - * - Nullable, no default - */ - embed_value?: - | string - | db.Parameter - | null - | db.DefaultType - | db.SQLFragment - /** - * **homie.pull_request.ext_gh_pull_request_id** - * - `int4` in database - * - Nullable, no default - */ - ext_gh_pull_request_id?: - | number - | db.Parameter - | null - | db.DefaultType - | db.SQLFragment - /** - * **homie.pull_request.ext_gitlab_merge_request_id** - * - `int4` in database - * - Nullable, no default - */ - ext_gitlab_merge_request_id?: - | number - | db.Parameter - | null - | db.DefaultType - | db.SQLFragment - /** - * **homie.pull_request.ext_gitlab_merge_request_iid** - * - `int4` in database - * - Nullable, no default - */ - ext_gitlab_merge_request_iid?: - | number - | db.Parameter - | null - | db.DefaultType - | db.SQLFragment - /** - * **homie.pull_request.github_repo_id** - * - `int4` in database - * - Nullable, no default - */ - github_repo_id?: - | number - | db.Parameter - | null - | db.DefaultType - | db.SQLFragment - /** - * **homie.pull_request.gitlab_project_id** - * - `int4` in database - * - Nullable, no default - */ - gitlab_project_id?: - | number - | db.Parameter - | null - | db.DefaultType - | db.SQLFragment - /** - * **homie.pull_request.html_url** - * - `text` in database - * - `NOT NULL`, no default - */ - html_url: string | db.Parameter | db.SQLFragment - /** - * **homie.pull_request.id** - * - `int4` in database - * - `NOT NULL`, default: `nextval('homie.pull_request_id_seq'::regclass)` - */ - id?: number | db.Parameter | db.DefaultType | db.SQLFragment - /** - * **homie.pull_request.merged_at** - * - `timestamptz` in database - * - Nullable, no default - */ - merged_at?: - | (db.TimestampTzString | Date) - | db.Parameter - | null - | db.DefaultType - | db.SQLFragment - /** - * **homie.pull_request.number** - * - `int4` in database - * - `NOT NULL`, no default - */ - number: number | db.Parameter | db.SQLFragment - /** - * **homie.pull_request.organization_id** - * - `int4` in database - * - `NOT NULL`, no default - */ - organization_id: number | db.Parameter | db.SQLFragment - /** - * **homie.pull_request.source_branch** - * - `text` in database - * - Nullable, no default - */ - source_branch?: - | string - | db.Parameter - | null - | db.DefaultType - | db.SQLFragment - /** - * **homie.pull_request.target_branch** - * - `text` in database - * - Nullable, no default - */ - target_branch?: - | string - | db.Parameter - | null - | db.DefaultType - | db.SQLFragment - /** - * **homie.pull_request.title** - * - `text` in database - * - `NOT NULL`, no default - */ - title: string | db.Parameter | db.SQLFragment - /** - * **homie.pull_request.updated_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - updated_at?: - | (db.TimestampTzString | Date) - | db.Parameter - | db.DefaultType - | db.SQLFragment - /** - * **homie.pull_request.was_merged_to_default_branch** - * - `bool` in database - * - `NOT NULL`, default: `false` - */ - was_merged_to_default_branch?: - | boolean - | db.Parameter - | db.DefaultType - | db.SQLFragment + * **homie.pull_request.body** + * - `text` in database + * - `NOT NULL`, no default + */ + body: string | db.Parameter | db.SQLFragment; + /** + * **homie.pull_request.closed_at** + * - `timestamptz` in database + * - Nullable, no default + */ + closed_at?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | null | db.DefaultType | db.SQLFragment; + /** + * **homie.pull_request.complexity_score** + * - `int4` in database + * - `NOT NULL`, default: `0` + */ + complexity_score?: number | db.Parameter | db.DefaultType | db.SQLFragment; + /** + * **homie.pull_request.contributor_id** + * - `int4` in database + * - `NOT NULL`, no default + */ + contributor_id: number | db.Parameter | db.SQLFragment; + /** + * **homie.pull_request.created_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + created_at?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | db.DefaultType | db.SQLFragment; + /** + * **homie.pull_request.embed_metadata** + * - `json` in database + * - Nullable, no default + */ + embed_metadata?: db.JSONValue | db.Parameter | null | db.DefaultType | db.SQLFragment; + /** + * **homie.pull_request.embed_value** + * - `text` in database + * - Nullable, no default + */ + embed_value?: string | db.Parameter | null | db.DefaultType | db.SQLFragment; + /** + * **homie.pull_request.ext_gh_pull_request_id** + * - `text` in database + * - Nullable, no default + */ + ext_gh_pull_request_id?: string | db.Parameter | null | db.DefaultType | db.SQLFragment; + /** + * **homie.pull_request.ext_gitlab_merge_request_id** + * - `text` in database + * - Nullable, no default + */ + ext_gitlab_merge_request_id?: string | db.Parameter | null | db.DefaultType | db.SQLFragment; + /** + * **homie.pull_request.ext_gitlab_merge_request_iid** + * - `text` in database + * - Nullable, no default + */ + ext_gitlab_merge_request_iid?: string | db.Parameter | null | db.DefaultType | db.SQLFragment; + /** + * **homie.pull_request.github_repo_id** + * - `int4` in database + * - Nullable, no default + */ + github_repo_id?: number | db.Parameter | null | db.DefaultType | db.SQLFragment; + /** + * **homie.pull_request.gitlab_project_id** + * - `int4` in database + * - Nullable, no default + */ + gitlab_project_id?: number | db.Parameter | null | db.DefaultType | db.SQLFragment; + /** + * **homie.pull_request.html_url** + * - `text` in database + * - `NOT NULL`, no default + */ + html_url: string | db.Parameter | db.SQLFragment; + /** + * **homie.pull_request.id** + * - `int4` in database + * - `NOT NULL`, default: `nextval('homie.pull_request_id_seq'::regclass)` + */ + id?: number | db.Parameter | db.DefaultType | db.SQLFragment; + /** + * **homie.pull_request.merged_at** + * - `timestamptz` in database + * - Nullable, no default + */ + merged_at?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | null | db.DefaultType | db.SQLFragment; + /** + * **homie.pull_request.number** + * - `int4` in database + * - `NOT NULL`, no default + */ + number: number | db.Parameter | db.SQLFragment; + /** + * **homie.pull_request.organization_id** + * - `int4` in database + * - `NOT NULL`, no default + */ + organization_id: number | db.Parameter | db.SQLFragment; + /** + * **homie.pull_request.source_branch** + * - `text` in database + * - Nullable, no default + */ + source_branch?: string | db.Parameter | null | db.DefaultType | db.SQLFragment; + /** + * **homie.pull_request.target_branch** + * - `text` in database + * - Nullable, no default + */ + target_branch?: string | db.Parameter | null | db.DefaultType | db.SQLFragment; + /** + * **homie.pull_request.title** + * - `text` in database + * - `NOT NULL`, no default + */ + title: string | db.Parameter | db.SQLFragment; + /** + * **homie.pull_request.updated_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + updated_at?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | db.DefaultType | db.SQLFragment; + /** + * **homie.pull_request.was_merged_to_default_branch** + * - `bool` in database + * - `NOT NULL`, default: `false` + */ + was_merged_to_default_branch?: boolean | db.Parameter | db.DefaultType | db.SQLFragment; } export interface Updatable { /** - * **homie.pull_request.body** - * - `text` in database - * - `NOT NULL`, no default - */ - body?: - | string - | db.Parameter - | db.SQLFragment - | db.SQLFragment | db.SQLFragment> - /** - * **homie.pull_request.closed_at** - * - `timestamptz` in database - * - Nullable, no default - */ - closed_at?: - | (db.TimestampTzString | Date) - | db.Parameter - | null - | db.DefaultType - | db.SQLFragment - | db.SQLFragment< - any, - | (db.TimestampTzString | Date) - | db.Parameter - | null - | db.DefaultType - | db.SQLFragment - > - /** - * **homie.pull_request.complexity_score** - * - `int4` in database - * - `NOT NULL`, default: `0` - */ - complexity_score?: - | number - | db.Parameter - | db.DefaultType - | db.SQLFragment - | db.SQLFragment< - any, - number | db.Parameter | db.DefaultType | db.SQLFragment - > - /** - * **homie.pull_request.contributor_id** - * - `int4` in database - * - `NOT NULL`, no default - */ - contributor_id?: - | number - | db.Parameter - | db.SQLFragment - | db.SQLFragment | db.SQLFragment> - /** - * **homie.pull_request.created_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - created_at?: - | (db.TimestampTzString | Date) - | db.Parameter - | db.DefaultType - | db.SQLFragment - | db.SQLFragment< - any, - | (db.TimestampTzString | Date) - | db.Parameter - | db.DefaultType - | db.SQLFragment - > - /** - * **homie.pull_request.embed_metadata** - * - `json` in database - * - Nullable, no default - */ - embed_metadata?: - | db.JSONValue - | db.Parameter - | null - | db.DefaultType - | db.SQLFragment - | db.SQLFragment< - any, - | db.JSONValue - | db.Parameter - | null - | db.DefaultType - | db.SQLFragment - > - /** - * **homie.pull_request.embed_value** - * - `text` in database - * - Nullable, no default - */ - embed_value?: - | string - | db.Parameter - | null - | db.DefaultType - | db.SQLFragment - | db.SQLFragment< - any, - | string - | db.Parameter - | null - | db.DefaultType - | db.SQLFragment - > - /** - * **homie.pull_request.ext_gh_pull_request_id** - * - `int4` in database - * - Nullable, no default - */ - ext_gh_pull_request_id?: - | number - | db.Parameter - | null - | db.DefaultType - | db.SQLFragment - | db.SQLFragment< - any, - | number - | db.Parameter - | null - | db.DefaultType - | db.SQLFragment - > - /** - * **homie.pull_request.ext_gitlab_merge_request_id** - * - `int4` in database - * - Nullable, no default - */ - ext_gitlab_merge_request_id?: - | number - | db.Parameter - | null - | db.DefaultType - | db.SQLFragment - | db.SQLFragment< - any, - | number - | db.Parameter - | null - | db.DefaultType - | db.SQLFragment - > - /** - * **homie.pull_request.ext_gitlab_merge_request_iid** - * - `int4` in database - * - Nullable, no default - */ - ext_gitlab_merge_request_iid?: - | number - | db.Parameter - | null - | db.DefaultType - | db.SQLFragment - | db.SQLFragment< - any, - | number - | db.Parameter - | null - | db.DefaultType - | db.SQLFragment - > - /** - * **homie.pull_request.github_repo_id** - * - `int4` in database - * - Nullable, no default - */ - github_repo_id?: - | number - | db.Parameter - | null - | db.DefaultType - | db.SQLFragment - | db.SQLFragment< - any, - | number - | db.Parameter - | null - | db.DefaultType - | db.SQLFragment - > - /** - * **homie.pull_request.gitlab_project_id** - * - `int4` in database - * - Nullable, no default - */ - gitlab_project_id?: - | number - | db.Parameter - | null - | db.DefaultType - | db.SQLFragment - | db.SQLFragment< - any, - | number - | db.Parameter - | null - | db.DefaultType - | db.SQLFragment - > - /** - * **homie.pull_request.html_url** - * - `text` in database - * - `NOT NULL`, no default - */ - html_url?: - | string - | db.Parameter - | db.SQLFragment - | db.SQLFragment | db.SQLFragment> - /** - * **homie.pull_request.id** - * - `int4` in database - * - `NOT NULL`, default: `nextval('homie.pull_request_id_seq'::regclass)` - */ - id?: - | number - | db.Parameter - | db.DefaultType - | db.SQLFragment - | db.SQLFragment< - any, - number | db.Parameter | db.DefaultType | db.SQLFragment - > - /** - * **homie.pull_request.merged_at** - * - `timestamptz` in database - * - Nullable, no default - */ - merged_at?: - | (db.TimestampTzString | Date) - | db.Parameter - | null - | db.DefaultType - | db.SQLFragment - | db.SQLFragment< - any, - | (db.TimestampTzString | Date) - | db.Parameter - | null - | db.DefaultType - | db.SQLFragment - > - /** - * **homie.pull_request.number** - * - `int4` in database - * - `NOT NULL`, no default - */ - number?: - | number - | db.Parameter - | db.SQLFragment - | db.SQLFragment | db.SQLFragment> - /** - * **homie.pull_request.organization_id** - * - `int4` in database - * - `NOT NULL`, no default - */ - organization_id?: - | number - | db.Parameter - | db.SQLFragment - | db.SQLFragment | db.SQLFragment> - /** - * **homie.pull_request.source_branch** - * - `text` in database - * - Nullable, no default - */ - source_branch?: - | string - | db.Parameter - | null - | db.DefaultType - | db.SQLFragment - | db.SQLFragment< - any, - | string - | db.Parameter - | null - | db.DefaultType - | db.SQLFragment - > - /** - * **homie.pull_request.target_branch** - * - `text` in database - * - Nullable, no default - */ - target_branch?: - | string - | db.Parameter - | null - | db.DefaultType - | db.SQLFragment - | db.SQLFragment< - any, - | string - | db.Parameter - | null - | db.DefaultType - | db.SQLFragment - > - /** - * **homie.pull_request.title** - * - `text` in database - * - `NOT NULL`, no default - */ - title?: - | string - | db.Parameter - | db.SQLFragment - | db.SQLFragment | db.SQLFragment> - /** - * **homie.pull_request.updated_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - updated_at?: - | (db.TimestampTzString | Date) - | db.Parameter - | db.DefaultType - | db.SQLFragment - | db.SQLFragment< - any, - | (db.TimestampTzString | Date) - | db.Parameter - | db.DefaultType - | db.SQLFragment - > - /** - * **homie.pull_request.was_merged_to_default_branch** - * - `bool` in database - * - `NOT NULL`, default: `false` - */ - was_merged_to_default_branch?: - | boolean - | db.Parameter - | db.DefaultType - | db.SQLFragment - | db.SQLFragment< - any, - boolean | db.Parameter | db.DefaultType | db.SQLFragment - > + * **homie.pull_request.body** + * - `text` in database + * - `NOT NULL`, no default + */ + body?: string | db.Parameter | db.SQLFragment | db.SQLFragment | db.SQLFragment>; + /** + * **homie.pull_request.closed_at** + * - `timestamptz` in database + * - Nullable, no default + */ + closed_at?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | null | db.DefaultType | db.SQLFragment | db.SQLFragment | null | db.DefaultType | db.SQLFragment>; + /** + * **homie.pull_request.complexity_score** + * - `int4` in database + * - `NOT NULL`, default: `0` + */ + complexity_score?: number | db.Parameter | db.DefaultType | db.SQLFragment | db.SQLFragment | db.DefaultType | db.SQLFragment>; + /** + * **homie.pull_request.contributor_id** + * - `int4` in database + * - `NOT NULL`, no default + */ + contributor_id?: number | db.Parameter | db.SQLFragment | db.SQLFragment | db.SQLFragment>; + /** + * **homie.pull_request.created_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + created_at?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | db.DefaultType | db.SQLFragment | db.SQLFragment | db.DefaultType | db.SQLFragment>; + /** + * **homie.pull_request.embed_metadata** + * - `json` in database + * - Nullable, no default + */ + embed_metadata?: db.JSONValue | db.Parameter | null | db.DefaultType | db.SQLFragment | db.SQLFragment | null | db.DefaultType | db.SQLFragment>; + /** + * **homie.pull_request.embed_value** + * - `text` in database + * - Nullable, no default + */ + embed_value?: string | db.Parameter | null | db.DefaultType | db.SQLFragment | db.SQLFragment | null | db.DefaultType | db.SQLFragment>; + /** + * **homie.pull_request.ext_gh_pull_request_id** + * - `text` in database + * - Nullable, no default + */ + ext_gh_pull_request_id?: string | db.Parameter | null | db.DefaultType | db.SQLFragment | db.SQLFragment | null | db.DefaultType | db.SQLFragment>; + /** + * **homie.pull_request.ext_gitlab_merge_request_id** + * - `text` in database + * - Nullable, no default + */ + ext_gitlab_merge_request_id?: string | db.Parameter | null | db.DefaultType | db.SQLFragment | db.SQLFragment | null | db.DefaultType | db.SQLFragment>; + /** + * **homie.pull_request.ext_gitlab_merge_request_iid** + * - `text` in database + * - Nullable, no default + */ + ext_gitlab_merge_request_iid?: string | db.Parameter | null | db.DefaultType | db.SQLFragment | db.SQLFragment | null | db.DefaultType | db.SQLFragment>; + /** + * **homie.pull_request.github_repo_id** + * - `int4` in database + * - Nullable, no default + */ + github_repo_id?: number | db.Parameter | null | db.DefaultType | db.SQLFragment | db.SQLFragment | null | db.DefaultType | db.SQLFragment>; + /** + * **homie.pull_request.gitlab_project_id** + * - `int4` in database + * - Nullable, no default + */ + gitlab_project_id?: number | db.Parameter | null | db.DefaultType | db.SQLFragment | db.SQLFragment | null | db.DefaultType | db.SQLFragment>; + /** + * **homie.pull_request.html_url** + * - `text` in database + * - `NOT NULL`, no default + */ + html_url?: string | db.Parameter | db.SQLFragment | db.SQLFragment | db.SQLFragment>; + /** + * **homie.pull_request.id** + * - `int4` in database + * - `NOT NULL`, default: `nextval('homie.pull_request_id_seq'::regclass)` + */ + id?: number | db.Parameter | db.DefaultType | db.SQLFragment | db.SQLFragment | db.DefaultType | db.SQLFragment>; + /** + * **homie.pull_request.merged_at** + * - `timestamptz` in database + * - Nullable, no default + */ + merged_at?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | null | db.DefaultType | db.SQLFragment | db.SQLFragment | null | db.DefaultType | db.SQLFragment>; + /** + * **homie.pull_request.number** + * - `int4` in database + * - `NOT NULL`, no default + */ + number?: number | db.Parameter | db.SQLFragment | db.SQLFragment | db.SQLFragment>; + /** + * **homie.pull_request.organization_id** + * - `int4` in database + * - `NOT NULL`, no default + */ + organization_id?: number | db.Parameter | db.SQLFragment | db.SQLFragment | db.SQLFragment>; + /** + * **homie.pull_request.source_branch** + * - `text` in database + * - Nullable, no default + */ + source_branch?: string | db.Parameter | null | db.DefaultType | db.SQLFragment | db.SQLFragment | null | db.DefaultType | db.SQLFragment>; + /** + * **homie.pull_request.target_branch** + * - `text` in database + * - Nullable, no default + */ + target_branch?: string | db.Parameter | null | db.DefaultType | db.SQLFragment | db.SQLFragment | null | db.DefaultType | db.SQLFragment>; + /** + * **homie.pull_request.title** + * - `text` in database + * - `NOT NULL`, no default + */ + title?: string | db.Parameter | db.SQLFragment | db.SQLFragment | db.SQLFragment>; + /** + * **homie.pull_request.updated_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + updated_at?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | db.DefaultType | db.SQLFragment | db.SQLFragment | db.DefaultType | db.SQLFragment>; + /** + * **homie.pull_request.was_merged_to_default_branch** + * - `bool` in database + * - `NOT NULL`, default: `false` + */ + was_merged_to_default_branch?: boolean | db.Parameter | db.DefaultType | db.SQLFragment | db.SQLFragment | db.DefaultType | db.SQLFragment>; } - export type UniqueIndex = - | 'pull_request_ext_gh_pull_request_id_key' - | 'pull_request_ext_gitlab_merge_request_id_key' - | 'pull_request_pkey' - export type Column = keyof Selectable - export type OnlyCols = Pick< - Selectable, - T[number] - > - export type SQLExpression = - | Table - | db.ColumnNames - | db.ColumnValues - | Whereable - | Column - | db.ParentColumn - | db.GenericSQLExpression - export type SQL = SQLExpression | SQLExpression[] + export type UniqueIndex = 'pull_request_ext_gh_pull_request_id_key' | 'pull_request_ext_gitlab_merge_request_id_key' | 'pull_request_pkey'; + export type Column = keyof Selectable; + export type OnlyCols = Pick; + export type SQLExpression = Table | db.ColumnNames | db.ColumnValues | Whereable | Column | db.ParentColumn | db.GenericSQLExpression; + export type SQL = SQLExpression | SQLExpression[]; } - + /** * **homie.subscription** * - Table in database */ export namespace subscription { - export type Table = 'homie.subscription' + export type Table = 'homie.subscription'; export interface Selectable { /** - * **homie.subscription.created_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - created_at: Date - /** - * **homie.subscription.ends_at** - * - `timestamptz` in database - * - Nullable, no default - */ - ends_at: Date | null - /** - * **homie.subscription.ext_stripe_subscription_id** - * - `text` in database - * - `NOT NULL`, no default - */ - ext_stripe_subscription_id: string - /** - * **homie.subscription.id** - * - `int4` in database - * - `NOT NULL`, default: `nextval('homie.subscription_id_seq'::regclass)` - */ - id: number - /** - * **homie.subscription.name** - * - `text` in database - * - `NOT NULL`, no default - */ - name: string - /** - * **homie.subscription.organization_id** - * - `int4` in database - * - `NOT NULL`, no default - */ - organization_id: number - /** - * **homie.subscription.plan_id** - * - `int4` in database - * - `NOT NULL`, no default - */ - plan_id: number - /** - * **homie.subscription.quantity** - * - `int4` in database - * - `NOT NULL`, default: `1` - */ - quantity: number - /** - * **homie.subscription.stripe_status** - * - `text` in database - * - `NOT NULL`, no default - */ - stripe_status: string - /** - * **homie.subscription.trial_ends_at** - * - `timestamptz` in database - * - Nullable, no default - */ - trial_ends_at: Date | null - /** - * **homie.subscription.updated_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - updated_at: Date + * **homie.subscription.created_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + created_at: Date; + /** + * **homie.subscription.ends_at** + * - `timestamptz` in database + * - Nullable, no default + */ + ends_at: Date | null; + /** + * **homie.subscription.ext_stripe_subscription_id** + * - `text` in database + * - `NOT NULL`, no default + */ + ext_stripe_subscription_id: string; + /** + * **homie.subscription.id** + * - `int4` in database + * - `NOT NULL`, default: `nextval('homie.subscription_id_seq'::regclass)` + */ + id: number; + /** + * **homie.subscription.name** + * - `text` in database + * - `NOT NULL`, no default + */ + name: string; + /** + * **homie.subscription.organization_id** + * - `int4` in database + * - `NOT NULL`, no default + */ + organization_id: number; + /** + * **homie.subscription.plan_id** + * - `int4` in database + * - `NOT NULL`, no default + */ + plan_id: number; + /** + * **homie.subscription.quantity** + * - `int4` in database + * - `NOT NULL`, default: `1` + */ + quantity: number; + /** + * **homie.subscription.stripe_status** + * - `text` in database + * - `NOT NULL`, no default + */ + stripe_status: string; + /** + * **homie.subscription.trial_ends_at** + * - `timestamptz` in database + * - Nullable, no default + */ + trial_ends_at: Date | null; + /** + * **homie.subscription.updated_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + updated_at: Date; } export interface JSONSelectable { /** - * **homie.subscription.created_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - created_at: db.TimestampTzString - /** - * **homie.subscription.ends_at** - * - `timestamptz` in database - * - Nullable, no default - */ - ends_at: db.TimestampTzString | null - /** - * **homie.subscription.ext_stripe_subscription_id** - * - `text` in database - * - `NOT NULL`, no default - */ - ext_stripe_subscription_id: string - /** - * **homie.subscription.id** - * - `int4` in database - * - `NOT NULL`, default: `nextval('homie.subscription_id_seq'::regclass)` - */ - id: number - /** - * **homie.subscription.name** - * - `text` in database - * - `NOT NULL`, no default - */ - name: string - /** - * **homie.subscription.organization_id** - * - `int4` in database - * - `NOT NULL`, no default - */ - organization_id: number - /** - * **homie.subscription.plan_id** - * - `int4` in database - * - `NOT NULL`, no default - */ - plan_id: number - /** - * **homie.subscription.quantity** - * - `int4` in database - * - `NOT NULL`, default: `1` - */ - quantity: number - /** - * **homie.subscription.stripe_status** - * - `text` in database - * - `NOT NULL`, no default - */ - stripe_status: string - /** - * **homie.subscription.trial_ends_at** - * - `timestamptz` in database - * - Nullable, no default - */ - trial_ends_at: db.TimestampTzString | null - /** - * **homie.subscription.updated_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - updated_at: db.TimestampTzString + * **homie.subscription.created_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + created_at: db.TimestampTzString; + /** + * **homie.subscription.ends_at** + * - `timestamptz` in database + * - Nullable, no default + */ + ends_at: db.TimestampTzString | null; + /** + * **homie.subscription.ext_stripe_subscription_id** + * - `text` in database + * - `NOT NULL`, no default + */ + ext_stripe_subscription_id: string; + /** + * **homie.subscription.id** + * - `int4` in database + * - `NOT NULL`, default: `nextval('homie.subscription_id_seq'::regclass)` + */ + id: number; + /** + * **homie.subscription.name** + * - `text` in database + * - `NOT NULL`, no default + */ + name: string; + /** + * **homie.subscription.organization_id** + * - `int4` in database + * - `NOT NULL`, no default + */ + organization_id: number; + /** + * **homie.subscription.plan_id** + * - `int4` in database + * - `NOT NULL`, no default + */ + plan_id: number; + /** + * **homie.subscription.quantity** + * - `int4` in database + * - `NOT NULL`, default: `1` + */ + quantity: number; + /** + * **homie.subscription.stripe_status** + * - `text` in database + * - `NOT NULL`, no default + */ + stripe_status: string; + /** + * **homie.subscription.trial_ends_at** + * - `timestamptz` in database + * - Nullable, no default + */ + trial_ends_at: db.TimestampTzString | null; + /** + * **homie.subscription.updated_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + updated_at: db.TimestampTzString; } export interface Whereable { /** - * **homie.subscription.created_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - created_at?: - | (db.TimestampTzString | Date) - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - | (db.TimestampTzString | Date) - | db.Parameter - | db.SQLFragment - | db.ParentColumn - > - /** - * **homie.subscription.ends_at** - * - `timestamptz` in database - * - Nullable, no default - */ - ends_at?: - | (db.TimestampTzString | Date) - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - | (db.TimestampTzString | Date) - | db.Parameter - | db.SQLFragment - | db.ParentColumn - > - /** - * **homie.subscription.ext_stripe_subscription_id** - * - `text` in database - * - `NOT NULL`, no default - */ - ext_stripe_subscription_id?: - | string - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - string | db.Parameter | db.SQLFragment | db.ParentColumn - > - /** - * **homie.subscription.id** - * - `int4` in database - * - `NOT NULL`, default: `nextval('homie.subscription_id_seq'::regclass)` - */ - id?: - | number - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - number | db.Parameter | db.SQLFragment | db.ParentColumn - > - /** - * **homie.subscription.name** - * - `text` in database - * - `NOT NULL`, no default - */ - name?: - | string - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - string | db.Parameter | db.SQLFragment | db.ParentColumn - > - /** - * **homie.subscription.organization_id** - * - `int4` in database - * - `NOT NULL`, no default - */ - organization_id?: - | number - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - number | db.Parameter | db.SQLFragment | db.ParentColumn - > - /** - * **homie.subscription.plan_id** - * - `int4` in database - * - `NOT NULL`, no default - */ - plan_id?: - | number - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - number | db.Parameter | db.SQLFragment | db.ParentColumn - > - /** - * **homie.subscription.quantity** - * - `int4` in database - * - `NOT NULL`, default: `1` - */ - quantity?: - | number - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - number | db.Parameter | db.SQLFragment | db.ParentColumn - > - /** - * **homie.subscription.stripe_status** - * - `text` in database - * - `NOT NULL`, no default - */ - stripe_status?: - | string - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - string | db.Parameter | db.SQLFragment | db.ParentColumn - > - /** - * **homie.subscription.trial_ends_at** - * - `timestamptz` in database - * - Nullable, no default - */ - trial_ends_at?: - | (db.TimestampTzString | Date) - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - | (db.TimestampTzString | Date) - | db.Parameter - | db.SQLFragment - | db.ParentColumn - > - /** - * **homie.subscription.updated_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - updated_at?: - | (db.TimestampTzString | Date) - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - | (db.TimestampTzString | Date) - | db.Parameter - | db.SQLFragment - | db.ParentColumn - > + * **homie.subscription.created_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + created_at?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **homie.subscription.ends_at** + * - `timestamptz` in database + * - Nullable, no default + */ + ends_at?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **homie.subscription.ext_stripe_subscription_id** + * - `text` in database + * - `NOT NULL`, no default + */ + ext_stripe_subscription_id?: string | db.Parameter | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **homie.subscription.id** + * - `int4` in database + * - `NOT NULL`, default: `nextval('homie.subscription_id_seq'::regclass)` + */ + id?: number | db.Parameter | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **homie.subscription.name** + * - `text` in database + * - `NOT NULL`, no default + */ + name?: string | db.Parameter | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **homie.subscription.organization_id** + * - `int4` in database + * - `NOT NULL`, no default + */ + organization_id?: number | db.Parameter | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **homie.subscription.plan_id** + * - `int4` in database + * - `NOT NULL`, no default + */ + plan_id?: number | db.Parameter | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **homie.subscription.quantity** + * - `int4` in database + * - `NOT NULL`, default: `1` + */ + quantity?: number | db.Parameter | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **homie.subscription.stripe_status** + * - `text` in database + * - `NOT NULL`, no default + */ + stripe_status?: string | db.Parameter | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **homie.subscription.trial_ends_at** + * - `timestamptz` in database + * - Nullable, no default + */ + trial_ends_at?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **homie.subscription.updated_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + updated_at?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; } export interface Insertable { /** - * **homie.subscription.created_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - created_at?: - | (db.TimestampTzString | Date) - | db.Parameter - | db.DefaultType - | db.SQLFragment - /** - * **homie.subscription.ends_at** - * - `timestamptz` in database - * - Nullable, no default - */ - ends_at?: - | (db.TimestampTzString | Date) - | db.Parameter - | null - | db.DefaultType - | db.SQLFragment - /** - * **homie.subscription.ext_stripe_subscription_id** - * - `text` in database - * - `NOT NULL`, no default - */ - ext_stripe_subscription_id: - | string - | db.Parameter - | db.SQLFragment - /** - * **homie.subscription.id** - * - `int4` in database - * - `NOT NULL`, default: `nextval('homie.subscription_id_seq'::regclass)` - */ - id?: number | db.Parameter | db.DefaultType | db.SQLFragment - /** - * **homie.subscription.name** - * - `text` in database - * - `NOT NULL`, no default - */ - name: string | db.Parameter | db.SQLFragment - /** - * **homie.subscription.organization_id** - * - `int4` in database - * - `NOT NULL`, no default - */ - organization_id: number | db.Parameter | db.SQLFragment - /** - * **homie.subscription.plan_id** - * - `int4` in database - * - `NOT NULL`, no default - */ - plan_id: number | db.Parameter | db.SQLFragment - /** - * **homie.subscription.quantity** - * - `int4` in database - * - `NOT NULL`, default: `1` - */ - quantity?: - | number - | db.Parameter - | db.DefaultType - | db.SQLFragment - /** - * **homie.subscription.stripe_status** - * - `text` in database - * - `NOT NULL`, no default - */ - stripe_status: string | db.Parameter | db.SQLFragment - /** - * **homie.subscription.trial_ends_at** - * - `timestamptz` in database - * - Nullable, no default - */ - trial_ends_at?: - | (db.TimestampTzString | Date) - | db.Parameter - | null - | db.DefaultType - | db.SQLFragment - /** - * **homie.subscription.updated_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - updated_at?: - | (db.TimestampTzString | Date) - | db.Parameter - | db.DefaultType - | db.SQLFragment + * **homie.subscription.created_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + created_at?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | db.DefaultType | db.SQLFragment; + /** + * **homie.subscription.ends_at** + * - `timestamptz` in database + * - Nullable, no default + */ + ends_at?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | null | db.DefaultType | db.SQLFragment; + /** + * **homie.subscription.ext_stripe_subscription_id** + * - `text` in database + * - `NOT NULL`, no default + */ + ext_stripe_subscription_id: string | db.Parameter | db.SQLFragment; + /** + * **homie.subscription.id** + * - `int4` in database + * - `NOT NULL`, default: `nextval('homie.subscription_id_seq'::regclass)` + */ + id?: number | db.Parameter | db.DefaultType | db.SQLFragment; + /** + * **homie.subscription.name** + * - `text` in database + * - `NOT NULL`, no default + */ + name: string | db.Parameter | db.SQLFragment; + /** + * **homie.subscription.organization_id** + * - `int4` in database + * - `NOT NULL`, no default + */ + organization_id: number | db.Parameter | db.SQLFragment; + /** + * **homie.subscription.plan_id** + * - `int4` in database + * - `NOT NULL`, no default + */ + plan_id: number | db.Parameter | db.SQLFragment; + /** + * **homie.subscription.quantity** + * - `int4` in database + * - `NOT NULL`, default: `1` + */ + quantity?: number | db.Parameter | db.DefaultType | db.SQLFragment; + /** + * **homie.subscription.stripe_status** + * - `text` in database + * - `NOT NULL`, no default + */ + stripe_status: string | db.Parameter | db.SQLFragment; + /** + * **homie.subscription.trial_ends_at** + * - `timestamptz` in database + * - Nullable, no default + */ + trial_ends_at?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | null | db.DefaultType | db.SQLFragment; + /** + * **homie.subscription.updated_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + updated_at?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | db.DefaultType | db.SQLFragment; } export interface Updatable { /** - * **homie.subscription.created_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - created_at?: - | (db.TimestampTzString | Date) - | db.Parameter - | db.DefaultType - | db.SQLFragment - | db.SQLFragment< - any, - | (db.TimestampTzString | Date) - | db.Parameter - | db.DefaultType - | db.SQLFragment - > - /** - * **homie.subscription.ends_at** - * - `timestamptz` in database - * - Nullable, no default - */ - ends_at?: - | (db.TimestampTzString | Date) - | db.Parameter - | null - | db.DefaultType - | db.SQLFragment - | db.SQLFragment< - any, - | (db.TimestampTzString | Date) - | db.Parameter - | null - | db.DefaultType - | db.SQLFragment - > - /** - * **homie.subscription.ext_stripe_subscription_id** - * - `text` in database - * - `NOT NULL`, no default - */ - ext_stripe_subscription_id?: - | string - | db.Parameter - | db.SQLFragment - | db.SQLFragment | db.SQLFragment> - /** - * **homie.subscription.id** - * - `int4` in database - * - `NOT NULL`, default: `nextval('homie.subscription_id_seq'::regclass)` - */ - id?: - | number - | db.Parameter - | db.DefaultType - | db.SQLFragment - | db.SQLFragment< - any, - number | db.Parameter | db.DefaultType | db.SQLFragment - > - /** - * **homie.subscription.name** - * - `text` in database - * - `NOT NULL`, no default - */ - name?: - | string - | db.Parameter - | db.SQLFragment - | db.SQLFragment | db.SQLFragment> - /** - * **homie.subscription.organization_id** - * - `int4` in database - * - `NOT NULL`, no default - */ - organization_id?: - | number - | db.Parameter - | db.SQLFragment - | db.SQLFragment | db.SQLFragment> - /** - * **homie.subscription.plan_id** - * - `int4` in database - * - `NOT NULL`, no default - */ - plan_id?: - | number - | db.Parameter - | db.SQLFragment - | db.SQLFragment | db.SQLFragment> - /** - * **homie.subscription.quantity** - * - `int4` in database - * - `NOT NULL`, default: `1` - */ - quantity?: - | number - | db.Parameter - | db.DefaultType - | db.SQLFragment - | db.SQLFragment< - any, - number | db.Parameter | db.DefaultType | db.SQLFragment - > - /** - * **homie.subscription.stripe_status** - * - `text` in database - * - `NOT NULL`, no default - */ - stripe_status?: - | string - | db.Parameter - | db.SQLFragment - | db.SQLFragment | db.SQLFragment> - /** - * **homie.subscription.trial_ends_at** - * - `timestamptz` in database - * - Nullable, no default - */ - trial_ends_at?: - | (db.TimestampTzString | Date) - | db.Parameter - | null - | db.DefaultType - | db.SQLFragment - | db.SQLFragment< - any, - | (db.TimestampTzString | Date) - | db.Parameter - | null - | db.DefaultType - | db.SQLFragment - > - /** - * **homie.subscription.updated_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - updated_at?: - | (db.TimestampTzString | Date) - | db.Parameter - | db.DefaultType - | db.SQLFragment - | db.SQLFragment< - any, - | (db.TimestampTzString | Date) - | db.Parameter - | db.DefaultType - | db.SQLFragment - > + * **homie.subscription.created_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + created_at?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | db.DefaultType | db.SQLFragment | db.SQLFragment | db.DefaultType | db.SQLFragment>; + /** + * **homie.subscription.ends_at** + * - `timestamptz` in database + * - Nullable, no default + */ + ends_at?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | null | db.DefaultType | db.SQLFragment | db.SQLFragment | null | db.DefaultType | db.SQLFragment>; + /** + * **homie.subscription.ext_stripe_subscription_id** + * - `text` in database + * - `NOT NULL`, no default + */ + ext_stripe_subscription_id?: string | db.Parameter | db.SQLFragment | db.SQLFragment | db.SQLFragment>; + /** + * **homie.subscription.id** + * - `int4` in database + * - `NOT NULL`, default: `nextval('homie.subscription_id_seq'::regclass)` + */ + id?: number | db.Parameter | db.DefaultType | db.SQLFragment | db.SQLFragment | db.DefaultType | db.SQLFragment>; + /** + * **homie.subscription.name** + * - `text` in database + * - `NOT NULL`, no default + */ + name?: string | db.Parameter | db.SQLFragment | db.SQLFragment | db.SQLFragment>; + /** + * **homie.subscription.organization_id** + * - `int4` in database + * - `NOT NULL`, no default + */ + organization_id?: number | db.Parameter | db.SQLFragment | db.SQLFragment | db.SQLFragment>; + /** + * **homie.subscription.plan_id** + * - `int4` in database + * - `NOT NULL`, no default + */ + plan_id?: number | db.Parameter | db.SQLFragment | db.SQLFragment | db.SQLFragment>; + /** + * **homie.subscription.quantity** + * - `int4` in database + * - `NOT NULL`, default: `1` + */ + quantity?: number | db.Parameter | db.DefaultType | db.SQLFragment | db.SQLFragment | db.DefaultType | db.SQLFragment>; + /** + * **homie.subscription.stripe_status** + * - `text` in database + * - `NOT NULL`, no default + */ + stripe_status?: string | db.Parameter | db.SQLFragment | db.SQLFragment | db.SQLFragment>; + /** + * **homie.subscription.trial_ends_at** + * - `timestamptz` in database + * - Nullable, no default + */ + trial_ends_at?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | null | db.DefaultType | db.SQLFragment | db.SQLFragment | null | db.DefaultType | db.SQLFragment>; + /** + * **homie.subscription.updated_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + updated_at?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | db.DefaultType | db.SQLFragment | db.SQLFragment | db.DefaultType | db.SQLFragment>; } - export type UniqueIndex = - | 'subscription_organization_id_key' - | 'subscription_pkey' - export type Column = keyof Selectable - export type OnlyCols = Pick< - Selectable, - T[number] - > - export type SQLExpression = - | Table - | db.ColumnNames - | db.ColumnValues - | Whereable - | Column - | db.ParentColumn - | db.GenericSQLExpression - export type SQL = SQLExpression | SQLExpression[] + export type UniqueIndex = 'subscription_organization_id_key' | 'subscription_pkey'; + export type Column = keyof Selectable; + export type OnlyCols = Pick; + export type SQLExpression = Table | db.ColumnNames | db.ColumnValues | Whereable | Column | db.ParentColumn | db.GenericSQLExpression; + export type SQL = SQLExpression | SQLExpression[]; } - + /** * **homie.task** * - Table in database */ export namespace task { - export type Table = 'homie.task' + export type Table = 'homie.task'; export interface Selectable { /** - * **homie.task.completed_at** - * - `timestamptz` in database - * - Nullable, no default - */ - completed_at: Date | null - /** - * **homie.task.complexity_score** - * - `int4` in database - * - `NOT NULL`, default: `0` - */ - complexity_score: number - /** - * **homie.task.created_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - created_at: Date - /** - * **homie.task.description** - * - `text` in database - * - `NOT NULL`, no default - */ - description: string - /** - * **homie.task.due_date** - * - `timestamptz` in database - * - Nullable, no default - */ - due_date: Date | null - /** - * **homie.task.estimated_completion_date** - * - `timestamptz` in database - * - Nullable, no default - */ - estimated_completion_date: Date | null - /** - * **homie.task.estimated_days_to_complete** - * - `int4` in database - * - Nullable, no default - */ - estimated_days_to_complete: number | null - /** - * **homie.task.ext_asana_task_id** - * - `text` in database - * - Nullable, no default - */ - ext_asana_task_id: string | null - /** - * **homie.task.ext_gh_issue_id** - * - `text` in database - * - Nullable, no default - */ - ext_gh_issue_id: string | null - /** - * **homie.task.ext_gh_issue_number** - * - `int4` in database - * - Nullable, no default - */ - ext_gh_issue_number: number | null - /** - * **homie.task.ext_trello_card_id** - * - `text` in database - * - Nullable, no default - */ - ext_trello_card_id: string | null - /** - * **homie.task.github_repo_id** - * - `int4` in database - * - Nullable, no default - */ - github_repo_id: number | null - /** - * **homie.task.has_received_similar_pull_requests** - * - `bool` in database - * - `NOT NULL`, default: `false` - */ - has_received_similar_pull_requests: boolean - /** - * **homie.task.html_url** - * - `text` in database - * - `NOT NULL`, no default - */ - html_url: string - /** - * **homie.task.id** - * - `int4` in database - * - `NOT NULL`, default: `nextval('homie.task_id_seq'::regclass)` - */ - id: number - /** - * **homie.task.is_stale** - * - `bool` in database - * - `NOT NULL`, default: `false` - */ - is_stale: boolean - /** - * **homie.task.name** - * - `text` in database - * - `NOT NULL`, no default - */ - name: string - /** - * **homie.task.organization_id** - * - `int4` in database - * - `NOT NULL`, no default - */ - organization_id: number - /** - * **homie.task.priority_level** - * - `int4` in database - * - `NOT NULL`, no default - */ - priority_level: number - /** - * **homie.task.task_status_id** - * - `int4` in database - * - `NOT NULL`, no default - */ - task_status_id: number - /** - * **homie.task.task_type_id** - * - `int4` in database - * - `NOT NULL`, no default - */ - task_type_id: number - /** - * **homie.task.updated_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - updated_at: Date + * **homie.task.completed_at** + * - `timestamptz` in database + * - Nullable, no default + */ + completed_at: Date | null; + /** + * **homie.task.complexity_score** + * - `int4` in database + * - `NOT NULL`, default: `0` + */ + complexity_score: number; + /** + * **homie.task.created_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + created_at: Date; + /** + * **homie.task.description** + * - `text` in database + * - `NOT NULL`, no default + */ + description: string; + /** + * **homie.task.due_date** + * - `timestamptz` in database + * - Nullable, no default + */ + due_date: Date | null; + /** + * **homie.task.estimated_completion_date** + * - `timestamptz` in database + * - Nullable, no default + */ + estimated_completion_date: Date | null; + /** + * **homie.task.estimated_days_to_complete** + * - `int4` in database + * - Nullable, no default + */ + estimated_days_to_complete: number | null; + /** + * **homie.task.ext_asana_task_id** + * - `text` in database + * - Nullable, no default + */ + ext_asana_task_id: string | null; + /** + * **homie.task.ext_gh_issue_id** + * - `text` in database + * - Nullable, no default + */ + ext_gh_issue_id: string | null; + /** + * **homie.task.ext_gh_issue_number** + * - `int4` in database + * - Nullable, no default + */ + ext_gh_issue_number: number | null; + /** + * **homie.task.ext_trello_card_id** + * - `text` in database + * - Nullable, no default + */ + ext_trello_card_id: string | null; + /** + * **homie.task.github_repo_id** + * - `int4` in database + * - Nullable, no default + */ + github_repo_id: number | null; + /** + * **homie.task.has_received_similar_pull_requests** + * - `bool` in database + * - `NOT NULL`, default: `false` + */ + has_received_similar_pull_requests: boolean; + /** + * **homie.task.html_url** + * - `text` in database + * - `NOT NULL`, no default + */ + html_url: string; + /** + * **homie.task.id** + * - `int4` in database + * - `NOT NULL`, default: `nextval('homie.task_id_seq'::regclass)` + */ + id: number; + /** + * **homie.task.is_stale** + * - `bool` in database + * - `NOT NULL`, default: `false` + */ + is_stale: boolean; + /** + * **homie.task.name** + * - `text` in database + * - `NOT NULL`, no default + */ + name: string; + /** + * **homie.task.organization_id** + * - `int4` in database + * - `NOT NULL`, no default + */ + organization_id: number; + /** + * **homie.task.priority_level** + * - `int4` in database + * - `NOT NULL`, no default + */ + priority_level: number; + /** + * **homie.task.task_status_id** + * - `int4` in database + * - `NOT NULL`, no default + */ + task_status_id: number; + /** + * **homie.task.task_type_id** + * - `int4` in database + * - `NOT NULL`, no default + */ + task_type_id: number; + /** + * **homie.task.updated_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + updated_at: Date; } export interface JSONSelectable { /** - * **homie.task.completed_at** - * - `timestamptz` in database - * - Nullable, no default - */ - completed_at: db.TimestampTzString | null - /** - * **homie.task.complexity_score** - * - `int4` in database - * - `NOT NULL`, default: `0` - */ - complexity_score: number - /** - * **homie.task.created_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - created_at: db.TimestampTzString - /** - * **homie.task.description** - * - `text` in database - * - `NOT NULL`, no default - */ - description: string - /** - * **homie.task.due_date** - * - `timestamptz` in database - * - Nullable, no default - */ - due_date: db.TimestampTzString | null - /** - * **homie.task.estimated_completion_date** - * - `timestamptz` in database - * - Nullable, no default - */ - estimated_completion_date: db.TimestampTzString | null - /** - * **homie.task.estimated_days_to_complete** - * - `int4` in database - * - Nullable, no default - */ - estimated_days_to_complete: number | null - /** - * **homie.task.ext_asana_task_id** - * - `text` in database - * - Nullable, no default - */ - ext_asana_task_id: string | null - /** - * **homie.task.ext_gh_issue_id** - * - `text` in database - * - Nullable, no default - */ - ext_gh_issue_id: string | null - /** - * **homie.task.ext_gh_issue_number** - * - `int4` in database - * - Nullable, no default - */ - ext_gh_issue_number: number | null - /** - * **homie.task.ext_trello_card_id** - * - `text` in database - * - Nullable, no default - */ - ext_trello_card_id: string | null - /** - * **homie.task.github_repo_id** - * - `int4` in database - * - Nullable, no default - */ - github_repo_id: number | null - /** - * **homie.task.has_received_similar_pull_requests** - * - `bool` in database - * - `NOT NULL`, default: `false` - */ - has_received_similar_pull_requests: boolean - /** - * **homie.task.html_url** - * - `text` in database - * - `NOT NULL`, no default - */ - html_url: string - /** - * **homie.task.id** - * - `int4` in database - * - `NOT NULL`, default: `nextval('homie.task_id_seq'::regclass)` - */ - id: number - /** - * **homie.task.is_stale** - * - `bool` in database - * - `NOT NULL`, default: `false` - */ - is_stale: boolean - /** - * **homie.task.name** - * - `text` in database - * - `NOT NULL`, no default - */ - name: string - /** - * **homie.task.organization_id** - * - `int4` in database - * - `NOT NULL`, no default - */ - organization_id: number - /** - * **homie.task.priority_level** - * - `int4` in database - * - `NOT NULL`, no default - */ - priority_level: number - /** - * **homie.task.task_status_id** - * - `int4` in database - * - `NOT NULL`, no default - */ - task_status_id: number - /** - * **homie.task.task_type_id** - * - `int4` in database - * - `NOT NULL`, no default - */ - task_type_id: number - /** - * **homie.task.updated_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - updated_at: db.TimestampTzString + * **homie.task.completed_at** + * - `timestamptz` in database + * - Nullable, no default + */ + completed_at: db.TimestampTzString | null; + /** + * **homie.task.complexity_score** + * - `int4` in database + * - `NOT NULL`, default: `0` + */ + complexity_score: number; + /** + * **homie.task.created_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + created_at: db.TimestampTzString; + /** + * **homie.task.description** + * - `text` in database + * - `NOT NULL`, no default + */ + description: string; + /** + * **homie.task.due_date** + * - `timestamptz` in database + * - Nullable, no default + */ + due_date: db.TimestampTzString | null; + /** + * **homie.task.estimated_completion_date** + * - `timestamptz` in database + * - Nullable, no default + */ + estimated_completion_date: db.TimestampTzString | null; + /** + * **homie.task.estimated_days_to_complete** + * - `int4` in database + * - Nullable, no default + */ + estimated_days_to_complete: number | null; + /** + * **homie.task.ext_asana_task_id** + * - `text` in database + * - Nullable, no default + */ + ext_asana_task_id: string | null; + /** + * **homie.task.ext_gh_issue_id** + * - `text` in database + * - Nullable, no default + */ + ext_gh_issue_id: string | null; + /** + * **homie.task.ext_gh_issue_number** + * - `int4` in database + * - Nullable, no default + */ + ext_gh_issue_number: number | null; + /** + * **homie.task.ext_trello_card_id** + * - `text` in database + * - Nullable, no default + */ + ext_trello_card_id: string | null; + /** + * **homie.task.github_repo_id** + * - `int4` in database + * - Nullable, no default + */ + github_repo_id: number | null; + /** + * **homie.task.has_received_similar_pull_requests** + * - `bool` in database + * - `NOT NULL`, default: `false` + */ + has_received_similar_pull_requests: boolean; + /** + * **homie.task.html_url** + * - `text` in database + * - `NOT NULL`, no default + */ + html_url: string; + /** + * **homie.task.id** + * - `int4` in database + * - `NOT NULL`, default: `nextval('homie.task_id_seq'::regclass)` + */ + id: number; + /** + * **homie.task.is_stale** + * - `bool` in database + * - `NOT NULL`, default: `false` + */ + is_stale: boolean; + /** + * **homie.task.name** + * - `text` in database + * - `NOT NULL`, no default + */ + name: string; + /** + * **homie.task.organization_id** + * - `int4` in database + * - `NOT NULL`, no default + */ + organization_id: number; + /** + * **homie.task.priority_level** + * - `int4` in database + * - `NOT NULL`, no default + */ + priority_level: number; + /** + * **homie.task.task_status_id** + * - `int4` in database + * - `NOT NULL`, no default + */ + task_status_id: number; + /** + * **homie.task.task_type_id** + * - `int4` in database + * - `NOT NULL`, no default + */ + task_type_id: number; + /** + * **homie.task.updated_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + updated_at: db.TimestampTzString; } export interface Whereable { /** - * **homie.task.completed_at** - * - `timestamptz` in database - * - Nullable, no default - */ - completed_at?: - | (db.TimestampTzString | Date) - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - | (db.TimestampTzString | Date) - | db.Parameter - | db.SQLFragment - | db.ParentColumn - > - /** - * **homie.task.complexity_score** - * - `int4` in database - * - `NOT NULL`, default: `0` - */ - complexity_score?: - | number - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - number | db.Parameter | db.SQLFragment | db.ParentColumn - > - /** - * **homie.task.created_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - created_at?: - | (db.TimestampTzString | Date) - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - | (db.TimestampTzString | Date) - | db.Parameter - | db.SQLFragment - | db.ParentColumn - > - /** - * **homie.task.description** - * - `text` in database - * - `NOT NULL`, no default - */ - description?: - | string - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - string | db.Parameter | db.SQLFragment | db.ParentColumn - > - /** - * **homie.task.due_date** - * - `timestamptz` in database - * - Nullable, no default - */ - due_date?: - | (db.TimestampTzString | Date) - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - | (db.TimestampTzString | Date) - | db.Parameter - | db.SQLFragment - | db.ParentColumn - > - /** - * **homie.task.estimated_completion_date** - * - `timestamptz` in database - * - Nullable, no default - */ - estimated_completion_date?: - | (db.TimestampTzString | Date) - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - | (db.TimestampTzString | Date) - | db.Parameter - | db.SQLFragment - | db.ParentColumn - > - /** - * **homie.task.estimated_days_to_complete** - * - `int4` in database - * - Nullable, no default - */ - estimated_days_to_complete?: - | number - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - number | db.Parameter | db.SQLFragment | db.ParentColumn - > - /** - * **homie.task.ext_asana_task_id** - * - `text` in database - * - Nullable, no default - */ - ext_asana_task_id?: - | string - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - string | db.Parameter | db.SQLFragment | db.ParentColumn - > - /** - * **homie.task.ext_gh_issue_id** - * - `text` in database - * - Nullable, no default - */ - ext_gh_issue_id?: - | string - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - string | db.Parameter | db.SQLFragment | db.ParentColumn - > - /** - * **homie.task.ext_gh_issue_number** - * - `int4` in database - * - Nullable, no default - */ - ext_gh_issue_number?: - | number - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - number | db.Parameter | db.SQLFragment | db.ParentColumn - > - /** - * **homie.task.ext_trello_card_id** - * - `text` in database - * - Nullable, no default - */ - ext_trello_card_id?: - | string - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - string | db.Parameter | db.SQLFragment | db.ParentColumn - > - /** - * **homie.task.github_repo_id** - * - `int4` in database - * - Nullable, no default - */ - github_repo_id?: - | number - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - number | db.Parameter | db.SQLFragment | db.ParentColumn - > - /** - * **homie.task.has_received_similar_pull_requests** - * - `bool` in database - * - `NOT NULL`, default: `false` - */ - has_received_similar_pull_requests?: - | boolean - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - boolean | db.Parameter | db.SQLFragment | db.ParentColumn - > - /** - * **homie.task.html_url** - * - `text` in database - * - `NOT NULL`, no default - */ - html_url?: - | string - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - string | db.Parameter | db.SQLFragment | db.ParentColumn - > - /** - * **homie.task.id** - * - `int4` in database - * - `NOT NULL`, default: `nextval('homie.task_id_seq'::regclass)` - */ - id?: - | number - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - number | db.Parameter | db.SQLFragment | db.ParentColumn - > - /** - * **homie.task.is_stale** - * - `bool` in database - * - `NOT NULL`, default: `false` - */ - is_stale?: - | boolean - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - boolean | db.Parameter | db.SQLFragment | db.ParentColumn - > - /** - * **homie.task.name** - * - `text` in database - * - `NOT NULL`, no default - */ - name?: - | string - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - string | db.Parameter | db.SQLFragment | db.ParentColumn - > - /** - * **homie.task.organization_id** - * - `int4` in database - * - `NOT NULL`, no default - */ - organization_id?: - | number - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - number | db.Parameter | db.SQLFragment | db.ParentColumn - > - /** - * **homie.task.priority_level** - * - `int4` in database - * - `NOT NULL`, no default - */ - priority_level?: - | number - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - number | db.Parameter | db.SQLFragment | db.ParentColumn - > - /** - * **homie.task.task_status_id** - * - `int4` in database - * - `NOT NULL`, no default - */ - task_status_id?: - | number - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - number | db.Parameter | db.SQLFragment | db.ParentColumn - > - /** - * **homie.task.task_type_id** - * - `int4` in database - * - `NOT NULL`, no default - */ - task_type_id?: - | number - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - number | db.Parameter | db.SQLFragment | db.ParentColumn - > - /** - * **homie.task.updated_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - updated_at?: - | (db.TimestampTzString | Date) - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - | (db.TimestampTzString | Date) - | db.Parameter - | db.SQLFragment - | db.ParentColumn - > + * **homie.task.completed_at** + * - `timestamptz` in database + * - Nullable, no default + */ + completed_at?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **homie.task.complexity_score** + * - `int4` in database + * - `NOT NULL`, default: `0` + */ + complexity_score?: number | db.Parameter | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **homie.task.created_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + created_at?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **homie.task.description** + * - `text` in database + * - `NOT NULL`, no default + */ + description?: string | db.Parameter | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **homie.task.due_date** + * - `timestamptz` in database + * - Nullable, no default + */ + due_date?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **homie.task.estimated_completion_date** + * - `timestamptz` in database + * - Nullable, no default + */ + estimated_completion_date?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **homie.task.estimated_days_to_complete** + * - `int4` in database + * - Nullable, no default + */ + estimated_days_to_complete?: number | db.Parameter | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **homie.task.ext_asana_task_id** + * - `text` in database + * - Nullable, no default + */ + ext_asana_task_id?: string | db.Parameter | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **homie.task.ext_gh_issue_id** + * - `text` in database + * - Nullable, no default + */ + ext_gh_issue_id?: string | db.Parameter | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **homie.task.ext_gh_issue_number** + * - `int4` in database + * - Nullable, no default + */ + ext_gh_issue_number?: number | db.Parameter | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **homie.task.ext_trello_card_id** + * - `text` in database + * - Nullable, no default + */ + ext_trello_card_id?: string | db.Parameter | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **homie.task.github_repo_id** + * - `int4` in database + * - Nullable, no default + */ + github_repo_id?: number | db.Parameter | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **homie.task.has_received_similar_pull_requests** + * - `bool` in database + * - `NOT NULL`, default: `false` + */ + has_received_similar_pull_requests?: boolean | db.Parameter | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **homie.task.html_url** + * - `text` in database + * - `NOT NULL`, no default + */ + html_url?: string | db.Parameter | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **homie.task.id** + * - `int4` in database + * - `NOT NULL`, default: `nextval('homie.task_id_seq'::regclass)` + */ + id?: number | db.Parameter | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **homie.task.is_stale** + * - `bool` in database + * - `NOT NULL`, default: `false` + */ + is_stale?: boolean | db.Parameter | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **homie.task.name** + * - `text` in database + * - `NOT NULL`, no default + */ + name?: string | db.Parameter | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **homie.task.organization_id** + * - `int4` in database + * - `NOT NULL`, no default + */ + organization_id?: number | db.Parameter | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **homie.task.priority_level** + * - `int4` in database + * - `NOT NULL`, no default + */ + priority_level?: number | db.Parameter | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **homie.task.task_status_id** + * - `int4` in database + * - `NOT NULL`, no default + */ + task_status_id?: number | db.Parameter | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **homie.task.task_type_id** + * - `int4` in database + * - `NOT NULL`, no default + */ + task_type_id?: number | db.Parameter | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **homie.task.updated_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + updated_at?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; } export interface Insertable { /** - * **homie.task.completed_at** - * - `timestamptz` in database - * - Nullable, no default - */ - completed_at?: - | (db.TimestampTzString | Date) - | db.Parameter - | null - | db.DefaultType - | db.SQLFragment - /** - * **homie.task.complexity_score** - * - `int4` in database - * - `NOT NULL`, default: `0` - */ - complexity_score?: - | number - | db.Parameter - | db.DefaultType - | db.SQLFragment - /** - * **homie.task.created_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - created_at?: - | (db.TimestampTzString | Date) - | db.Parameter - | db.DefaultType - | db.SQLFragment - /** - * **homie.task.description** - * - `text` in database - * - `NOT NULL`, no default - */ - description: string | db.Parameter | db.SQLFragment - /** - * **homie.task.due_date** - * - `timestamptz` in database - * - Nullable, no default - */ - due_date?: - | (db.TimestampTzString | Date) - | db.Parameter - | null - | db.DefaultType - | db.SQLFragment - /** - * **homie.task.estimated_completion_date** - * - `timestamptz` in database - * - Nullable, no default - */ - estimated_completion_date?: - | (db.TimestampTzString | Date) - | db.Parameter - | null - | db.DefaultType - | db.SQLFragment - /** - * **homie.task.estimated_days_to_complete** - * - `int4` in database - * - Nullable, no default - */ - estimated_days_to_complete?: - | number - | db.Parameter - | null - | db.DefaultType - | db.SQLFragment - /** - * **homie.task.ext_asana_task_id** - * - `text` in database - * - Nullable, no default - */ - ext_asana_task_id?: - | string - | db.Parameter - | null - | db.DefaultType - | db.SQLFragment - /** - * **homie.task.ext_gh_issue_id** - * - `text` in database - * - Nullable, no default - */ - ext_gh_issue_id?: - | string - | db.Parameter - | null - | db.DefaultType - | db.SQLFragment - /** - * **homie.task.ext_gh_issue_number** - * - `int4` in database - * - Nullable, no default - */ - ext_gh_issue_number?: - | number - | db.Parameter - | null - | db.DefaultType - | db.SQLFragment - /** - * **homie.task.ext_trello_card_id** - * - `text` in database - * - Nullable, no default - */ - ext_trello_card_id?: - | string - | db.Parameter - | null - | db.DefaultType - | db.SQLFragment - /** - * **homie.task.github_repo_id** - * - `int4` in database - * - Nullable, no default - */ - github_repo_id?: - | number - | db.Parameter - | null - | db.DefaultType - | db.SQLFragment - /** - * **homie.task.has_received_similar_pull_requests** - * - `bool` in database - * - `NOT NULL`, default: `false` - */ - has_received_similar_pull_requests?: - | boolean - | db.Parameter - | db.DefaultType - | db.SQLFragment - /** - * **homie.task.html_url** - * - `text` in database - * - `NOT NULL`, no default - */ - html_url: string | db.Parameter | db.SQLFragment - /** - * **homie.task.id** - * - `int4` in database - * - `NOT NULL`, default: `nextval('homie.task_id_seq'::regclass)` - */ - id?: number | db.Parameter | db.DefaultType | db.SQLFragment - /** - * **homie.task.is_stale** - * - `bool` in database - * - `NOT NULL`, default: `false` - */ - is_stale?: - | boolean - | db.Parameter - | db.DefaultType - | db.SQLFragment - /** - * **homie.task.name** - * - `text` in database - * - `NOT NULL`, no default - */ - name: string | db.Parameter | db.SQLFragment - /** - * **homie.task.organization_id** - * - `int4` in database - * - `NOT NULL`, no default - */ - organization_id: number | db.Parameter | db.SQLFragment - /** - * **homie.task.priority_level** - * - `int4` in database - * - `NOT NULL`, no default - */ - priority_level: number | db.Parameter | db.SQLFragment - /** - * **homie.task.task_status_id** - * - `int4` in database - * - `NOT NULL`, no default - */ - task_status_id: number | db.Parameter | db.SQLFragment - /** - * **homie.task.task_type_id** - * - `int4` in database - * - `NOT NULL`, no default - */ - task_type_id: number | db.Parameter | db.SQLFragment - /** - * **homie.task.updated_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - updated_at?: - | (db.TimestampTzString | Date) - | db.Parameter - | db.DefaultType - | db.SQLFragment + * **homie.task.completed_at** + * - `timestamptz` in database + * - Nullable, no default + */ + completed_at?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | null | db.DefaultType | db.SQLFragment; + /** + * **homie.task.complexity_score** + * - `int4` in database + * - `NOT NULL`, default: `0` + */ + complexity_score?: number | db.Parameter | db.DefaultType | db.SQLFragment; + /** + * **homie.task.created_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + created_at?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | db.DefaultType | db.SQLFragment; + /** + * **homie.task.description** + * - `text` in database + * - `NOT NULL`, no default + */ + description: string | db.Parameter | db.SQLFragment; + /** + * **homie.task.due_date** + * - `timestamptz` in database + * - Nullable, no default + */ + due_date?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | null | db.DefaultType | db.SQLFragment; + /** + * **homie.task.estimated_completion_date** + * - `timestamptz` in database + * - Nullable, no default + */ + estimated_completion_date?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | null | db.DefaultType | db.SQLFragment; + /** + * **homie.task.estimated_days_to_complete** + * - `int4` in database + * - Nullable, no default + */ + estimated_days_to_complete?: number | db.Parameter | null | db.DefaultType | db.SQLFragment; + /** + * **homie.task.ext_asana_task_id** + * - `text` in database + * - Nullable, no default + */ + ext_asana_task_id?: string | db.Parameter | null | db.DefaultType | db.SQLFragment; + /** + * **homie.task.ext_gh_issue_id** + * - `text` in database + * - Nullable, no default + */ + ext_gh_issue_id?: string | db.Parameter | null | db.DefaultType | db.SQLFragment; + /** + * **homie.task.ext_gh_issue_number** + * - `int4` in database + * - Nullable, no default + */ + ext_gh_issue_number?: number | db.Parameter | null | db.DefaultType | db.SQLFragment; + /** + * **homie.task.ext_trello_card_id** + * - `text` in database + * - Nullable, no default + */ + ext_trello_card_id?: string | db.Parameter | null | db.DefaultType | db.SQLFragment; + /** + * **homie.task.github_repo_id** + * - `int4` in database + * - Nullable, no default + */ + github_repo_id?: number | db.Parameter | null | db.DefaultType | db.SQLFragment; + /** + * **homie.task.has_received_similar_pull_requests** + * - `bool` in database + * - `NOT NULL`, default: `false` + */ + has_received_similar_pull_requests?: boolean | db.Parameter | db.DefaultType | db.SQLFragment; + /** + * **homie.task.html_url** + * - `text` in database + * - `NOT NULL`, no default + */ + html_url: string | db.Parameter | db.SQLFragment; + /** + * **homie.task.id** + * - `int4` in database + * - `NOT NULL`, default: `nextval('homie.task_id_seq'::regclass)` + */ + id?: number | db.Parameter | db.DefaultType | db.SQLFragment; + /** + * **homie.task.is_stale** + * - `bool` in database + * - `NOT NULL`, default: `false` + */ + is_stale?: boolean | db.Parameter | db.DefaultType | db.SQLFragment; + /** + * **homie.task.name** + * - `text` in database + * - `NOT NULL`, no default + */ + name: string | db.Parameter | db.SQLFragment; + /** + * **homie.task.organization_id** + * - `int4` in database + * - `NOT NULL`, no default + */ + organization_id: number | db.Parameter | db.SQLFragment; + /** + * **homie.task.priority_level** + * - `int4` in database + * - `NOT NULL`, no default + */ + priority_level: number | db.Parameter | db.SQLFragment; + /** + * **homie.task.task_status_id** + * - `int4` in database + * - `NOT NULL`, no default + */ + task_status_id: number | db.Parameter | db.SQLFragment; + /** + * **homie.task.task_type_id** + * - `int4` in database + * - `NOT NULL`, no default + */ + task_type_id: number | db.Parameter | db.SQLFragment; + /** + * **homie.task.updated_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + updated_at?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | db.DefaultType | db.SQLFragment; } export interface Updatable { /** - * **homie.task.completed_at** - * - `timestamptz` in database - * - Nullable, no default - */ - completed_at?: - | (db.TimestampTzString | Date) - | db.Parameter - | null - | db.DefaultType - | db.SQLFragment - | db.SQLFragment< - any, - | (db.TimestampTzString | Date) - | db.Parameter - | null - | db.DefaultType - | db.SQLFragment - > - /** - * **homie.task.complexity_score** - * - `int4` in database - * - `NOT NULL`, default: `0` - */ - complexity_score?: - | number - | db.Parameter - | db.DefaultType - | db.SQLFragment - | db.SQLFragment< - any, - number | db.Parameter | db.DefaultType | db.SQLFragment - > - /** - * **homie.task.created_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - created_at?: - | (db.TimestampTzString | Date) - | db.Parameter - | db.DefaultType - | db.SQLFragment - | db.SQLFragment< - any, - | (db.TimestampTzString | Date) - | db.Parameter - | db.DefaultType - | db.SQLFragment - > - /** - * **homie.task.description** - * - `text` in database - * - `NOT NULL`, no default - */ - description?: - | string - | db.Parameter - | db.SQLFragment - | db.SQLFragment | db.SQLFragment> - /** - * **homie.task.due_date** - * - `timestamptz` in database - * - Nullable, no default - */ - due_date?: - | (db.TimestampTzString | Date) - | db.Parameter - | null - | db.DefaultType - | db.SQLFragment - | db.SQLFragment< - any, - | (db.TimestampTzString | Date) - | db.Parameter - | null - | db.DefaultType - | db.SQLFragment - > - /** - * **homie.task.estimated_completion_date** - * - `timestamptz` in database - * - Nullable, no default - */ - estimated_completion_date?: - | (db.TimestampTzString | Date) - | db.Parameter - | null - | db.DefaultType - | db.SQLFragment - | db.SQLFragment< - any, - | (db.TimestampTzString | Date) - | db.Parameter - | null - | db.DefaultType - | db.SQLFragment - > - /** - * **homie.task.estimated_days_to_complete** - * - `int4` in database - * - Nullable, no default - */ - estimated_days_to_complete?: - | number - | db.Parameter - | null - | db.DefaultType - | db.SQLFragment - | db.SQLFragment< - any, - | number - | db.Parameter - | null - | db.DefaultType - | db.SQLFragment - > - /** - * **homie.task.ext_asana_task_id** - * - `text` in database - * - Nullable, no default - */ - ext_asana_task_id?: - | string - | db.Parameter - | null - | db.DefaultType - | db.SQLFragment - | db.SQLFragment< - any, - | string - | db.Parameter - | null - | db.DefaultType - | db.SQLFragment - > - /** - * **homie.task.ext_gh_issue_id** - * - `text` in database - * - Nullable, no default - */ - ext_gh_issue_id?: - | string - | db.Parameter - | null - | db.DefaultType - | db.SQLFragment - | db.SQLFragment< - any, - | string - | db.Parameter - | null - | db.DefaultType - | db.SQLFragment - > - /** - * **homie.task.ext_gh_issue_number** - * - `int4` in database - * - Nullable, no default - */ - ext_gh_issue_number?: - | number - | db.Parameter - | null - | db.DefaultType - | db.SQLFragment - | db.SQLFragment< - any, - | number - | db.Parameter - | null - | db.DefaultType - | db.SQLFragment - > - /** - * **homie.task.ext_trello_card_id** - * - `text` in database - * - Nullable, no default - */ - ext_trello_card_id?: - | string - | db.Parameter - | null - | db.DefaultType - | db.SQLFragment - | db.SQLFragment< - any, - | string - | db.Parameter - | null - | db.DefaultType - | db.SQLFragment - > - /** - * **homie.task.github_repo_id** - * - `int4` in database - * - Nullable, no default - */ - github_repo_id?: - | number - | db.Parameter - | null - | db.DefaultType - | db.SQLFragment - | db.SQLFragment< - any, - | number - | db.Parameter - | null - | db.DefaultType - | db.SQLFragment - > - /** - * **homie.task.has_received_similar_pull_requests** - * - `bool` in database - * - `NOT NULL`, default: `false` - */ - has_received_similar_pull_requests?: - | boolean - | db.Parameter - | db.DefaultType - | db.SQLFragment - | db.SQLFragment< - any, - boolean | db.Parameter | db.DefaultType | db.SQLFragment - > - /** - * **homie.task.html_url** - * - `text` in database - * - `NOT NULL`, no default - */ - html_url?: - | string - | db.Parameter - | db.SQLFragment - | db.SQLFragment | db.SQLFragment> - /** - * **homie.task.id** - * - `int4` in database - * - `NOT NULL`, default: `nextval('homie.task_id_seq'::regclass)` - */ - id?: - | number - | db.Parameter - | db.DefaultType - | db.SQLFragment - | db.SQLFragment< - any, - number | db.Parameter | db.DefaultType | db.SQLFragment - > - /** - * **homie.task.is_stale** - * - `bool` in database - * - `NOT NULL`, default: `false` - */ - is_stale?: - | boolean - | db.Parameter - | db.DefaultType - | db.SQLFragment - | db.SQLFragment< - any, - boolean | db.Parameter | db.DefaultType | db.SQLFragment - > - /** - * **homie.task.name** - * - `text` in database - * - `NOT NULL`, no default - */ - name?: - | string - | db.Parameter - | db.SQLFragment - | db.SQLFragment | db.SQLFragment> - /** - * **homie.task.organization_id** - * - `int4` in database - * - `NOT NULL`, no default - */ - organization_id?: - | number - | db.Parameter - | db.SQLFragment - | db.SQLFragment | db.SQLFragment> - /** - * **homie.task.priority_level** - * - `int4` in database - * - `NOT NULL`, no default - */ - priority_level?: - | number - | db.Parameter - | db.SQLFragment - | db.SQLFragment | db.SQLFragment> - /** - * **homie.task.task_status_id** - * - `int4` in database - * - `NOT NULL`, no default - */ - task_status_id?: - | number - | db.Parameter - | db.SQLFragment - | db.SQLFragment | db.SQLFragment> - /** - * **homie.task.task_type_id** - * - `int4` in database - * - `NOT NULL`, no default - */ - task_type_id?: - | number - | db.Parameter - | db.SQLFragment - | db.SQLFragment | db.SQLFragment> - /** - * **homie.task.updated_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - updated_at?: - | (db.TimestampTzString | Date) - | db.Parameter - | db.DefaultType - | db.SQLFragment - | db.SQLFragment< - any, - | (db.TimestampTzString | Date) - | db.Parameter - | db.DefaultType - | db.SQLFragment - > + * **homie.task.completed_at** + * - `timestamptz` in database + * - Nullable, no default + */ + completed_at?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | null | db.DefaultType | db.SQLFragment | db.SQLFragment | null | db.DefaultType | db.SQLFragment>; + /** + * **homie.task.complexity_score** + * - `int4` in database + * - `NOT NULL`, default: `0` + */ + complexity_score?: number | db.Parameter | db.DefaultType | db.SQLFragment | db.SQLFragment | db.DefaultType | db.SQLFragment>; + /** + * **homie.task.created_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + created_at?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | db.DefaultType | db.SQLFragment | db.SQLFragment | db.DefaultType | db.SQLFragment>; + /** + * **homie.task.description** + * - `text` in database + * - `NOT NULL`, no default + */ + description?: string | db.Parameter | db.SQLFragment | db.SQLFragment | db.SQLFragment>; + /** + * **homie.task.due_date** + * - `timestamptz` in database + * - Nullable, no default + */ + due_date?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | null | db.DefaultType | db.SQLFragment | db.SQLFragment | null | db.DefaultType | db.SQLFragment>; + /** + * **homie.task.estimated_completion_date** + * - `timestamptz` in database + * - Nullable, no default + */ + estimated_completion_date?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | null | db.DefaultType | db.SQLFragment | db.SQLFragment | null | db.DefaultType | db.SQLFragment>; + /** + * **homie.task.estimated_days_to_complete** + * - `int4` in database + * - Nullable, no default + */ + estimated_days_to_complete?: number | db.Parameter | null | db.DefaultType | db.SQLFragment | db.SQLFragment | null | db.DefaultType | db.SQLFragment>; + /** + * **homie.task.ext_asana_task_id** + * - `text` in database + * - Nullable, no default + */ + ext_asana_task_id?: string | db.Parameter | null | db.DefaultType | db.SQLFragment | db.SQLFragment | null | db.DefaultType | db.SQLFragment>; + /** + * **homie.task.ext_gh_issue_id** + * - `text` in database + * - Nullable, no default + */ + ext_gh_issue_id?: string | db.Parameter | null | db.DefaultType | db.SQLFragment | db.SQLFragment | null | db.DefaultType | db.SQLFragment>; + /** + * **homie.task.ext_gh_issue_number** + * - `int4` in database + * - Nullable, no default + */ + ext_gh_issue_number?: number | db.Parameter | null | db.DefaultType | db.SQLFragment | db.SQLFragment | null | db.DefaultType | db.SQLFragment>; + /** + * **homie.task.ext_trello_card_id** + * - `text` in database + * - Nullable, no default + */ + ext_trello_card_id?: string | db.Parameter | null | db.DefaultType | db.SQLFragment | db.SQLFragment | null | db.DefaultType | db.SQLFragment>; + /** + * **homie.task.github_repo_id** + * - `int4` in database + * - Nullable, no default + */ + github_repo_id?: number | db.Parameter | null | db.DefaultType | db.SQLFragment | db.SQLFragment | null | db.DefaultType | db.SQLFragment>; + /** + * **homie.task.has_received_similar_pull_requests** + * - `bool` in database + * - `NOT NULL`, default: `false` + */ + has_received_similar_pull_requests?: boolean | db.Parameter | db.DefaultType | db.SQLFragment | db.SQLFragment | db.DefaultType | db.SQLFragment>; + /** + * **homie.task.html_url** + * - `text` in database + * - `NOT NULL`, no default + */ + html_url?: string | db.Parameter | db.SQLFragment | db.SQLFragment | db.SQLFragment>; + /** + * **homie.task.id** + * - `int4` in database + * - `NOT NULL`, default: `nextval('homie.task_id_seq'::regclass)` + */ + id?: number | db.Parameter | db.DefaultType | db.SQLFragment | db.SQLFragment | db.DefaultType | db.SQLFragment>; + /** + * **homie.task.is_stale** + * - `bool` in database + * - `NOT NULL`, default: `false` + */ + is_stale?: boolean | db.Parameter | db.DefaultType | db.SQLFragment | db.SQLFragment | db.DefaultType | db.SQLFragment>; + /** + * **homie.task.name** + * - `text` in database + * - `NOT NULL`, no default + */ + name?: string | db.Parameter | db.SQLFragment | db.SQLFragment | db.SQLFragment>; + /** + * **homie.task.organization_id** + * - `int4` in database + * - `NOT NULL`, no default + */ + organization_id?: number | db.Parameter | db.SQLFragment | db.SQLFragment | db.SQLFragment>; + /** + * **homie.task.priority_level** + * - `int4` in database + * - `NOT NULL`, no default + */ + priority_level?: number | db.Parameter | db.SQLFragment | db.SQLFragment | db.SQLFragment>; + /** + * **homie.task.task_status_id** + * - `int4` in database + * - `NOT NULL`, no default + */ + task_status_id?: number | db.Parameter | db.SQLFragment | db.SQLFragment | db.SQLFragment>; + /** + * **homie.task.task_type_id** + * - `int4` in database + * - `NOT NULL`, no default + */ + task_type_id?: number | db.Parameter | db.SQLFragment | db.SQLFragment | db.SQLFragment>; + /** + * **homie.task.updated_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + updated_at?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | db.DefaultType | db.SQLFragment | db.SQLFragment | db.DefaultType | db.SQLFragment>; } - export type UniqueIndex = - | 'task_ext_asana_task_id_key' - | 'task_ext_gh_issue_id_key' - | 'task_ext_trello_card_id_key' - | 'task_pkey' - export type Column = keyof Selectable - export type OnlyCols = Pick< - Selectable, - T[number] - > - export type SQLExpression = - | Table - | db.ColumnNames - | db.ColumnValues - | Whereable - | Column - | db.ParentColumn - | db.GenericSQLExpression - export type SQL = SQLExpression | SQLExpression[] + export type UniqueIndex = 'task_ext_asana_task_id_key' | 'task_ext_gh_issue_id_key' | 'task_ext_trello_card_id_key' | 'task_pkey'; + export type Column = keyof Selectable; + export type OnlyCols = Pick; + export type SQLExpression = Table | db.ColumnNames | db.ColumnValues | Whereable | Column | db.ParentColumn | db.GenericSQLExpression; + export type SQL = SQLExpression | SQLExpression[]; } - + /** * **homie.task_status** * - Table in database */ export namespace task_status { - export type Table = 'homie.task_status' + export type Table = 'homie.task_status'; export interface Selectable { /** - * **homie.task_status.created_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - created_at: Date - /** - * **homie.task_status.id** - * - `int4` in database - * - `NOT NULL`, default: `nextval('homie.task_status_id_seq'::regclass)` - */ - id: number - /** - * **homie.task_status.name** - * - `text` in database - * - `NOT NULL`, no default - */ - name: string - /** - * **homie.task_status.updated_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - updated_at: Date + * **homie.task_status.created_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + created_at: Date; + /** + * **homie.task_status.id** + * - `int4` in database + * - `NOT NULL`, default: `nextval('homie.task_status_id_seq'::regclass)` + */ + id: number; + /** + * **homie.task_status.name** + * - `text` in database + * - `NOT NULL`, no default + */ + name: string; + /** + * **homie.task_status.updated_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + updated_at: Date; } export interface JSONSelectable { /** - * **homie.task_status.created_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - created_at: db.TimestampTzString - /** - * **homie.task_status.id** - * - `int4` in database - * - `NOT NULL`, default: `nextval('homie.task_status_id_seq'::regclass)` - */ - id: number - /** - * **homie.task_status.name** - * - `text` in database - * - `NOT NULL`, no default - */ - name: string - /** - * **homie.task_status.updated_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - updated_at: db.TimestampTzString + * **homie.task_status.created_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + created_at: db.TimestampTzString; + /** + * **homie.task_status.id** + * - `int4` in database + * - `NOT NULL`, default: `nextval('homie.task_status_id_seq'::regclass)` + */ + id: number; + /** + * **homie.task_status.name** + * - `text` in database + * - `NOT NULL`, no default + */ + name: string; + /** + * **homie.task_status.updated_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + updated_at: db.TimestampTzString; } export interface Whereable { /** - * **homie.task_status.created_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - created_at?: - | (db.TimestampTzString | Date) - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - | (db.TimestampTzString | Date) - | db.Parameter - | db.SQLFragment - | db.ParentColumn - > - /** - * **homie.task_status.id** - * - `int4` in database - * - `NOT NULL`, default: `nextval('homie.task_status_id_seq'::regclass)` - */ - id?: - | number - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - number | db.Parameter | db.SQLFragment | db.ParentColumn - > - /** - * **homie.task_status.name** - * - `text` in database - * - `NOT NULL`, no default - */ - name?: - | string - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - string | db.Parameter | db.SQLFragment | db.ParentColumn - > - /** - * **homie.task_status.updated_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - updated_at?: - | (db.TimestampTzString | Date) - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - | (db.TimestampTzString | Date) - | db.Parameter - | db.SQLFragment - | db.ParentColumn - > + * **homie.task_status.created_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + created_at?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **homie.task_status.id** + * - `int4` in database + * - `NOT NULL`, default: `nextval('homie.task_status_id_seq'::regclass)` + */ + id?: number | db.Parameter | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **homie.task_status.name** + * - `text` in database + * - `NOT NULL`, no default + */ + name?: string | db.Parameter | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **homie.task_status.updated_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + updated_at?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; } export interface Insertable { /** - * **homie.task_status.created_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - created_at?: - | (db.TimestampTzString | Date) - | db.Parameter - | db.DefaultType - | db.SQLFragment - /** - * **homie.task_status.id** - * - `int4` in database - * - `NOT NULL`, default: `nextval('homie.task_status_id_seq'::regclass)` - */ - id?: number | db.Parameter | db.DefaultType | db.SQLFragment - /** - * **homie.task_status.name** - * - `text` in database - * - `NOT NULL`, no default - */ - name: string | db.Parameter | db.SQLFragment - /** - * **homie.task_status.updated_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - updated_at?: - | (db.TimestampTzString | Date) - | db.Parameter - | db.DefaultType - | db.SQLFragment + * **homie.task_status.created_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + created_at?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | db.DefaultType | db.SQLFragment; + /** + * **homie.task_status.id** + * - `int4` in database + * - `NOT NULL`, default: `nextval('homie.task_status_id_seq'::regclass)` + */ + id?: number | db.Parameter | db.DefaultType | db.SQLFragment; + /** + * **homie.task_status.name** + * - `text` in database + * - `NOT NULL`, no default + */ + name: string | db.Parameter | db.SQLFragment; + /** + * **homie.task_status.updated_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + updated_at?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | db.DefaultType | db.SQLFragment; } export interface Updatable { /** - * **homie.task_status.created_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - created_at?: - | (db.TimestampTzString | Date) - | db.Parameter - | db.DefaultType - | db.SQLFragment - | db.SQLFragment< - any, - | (db.TimestampTzString | Date) - | db.Parameter - | db.DefaultType - | db.SQLFragment - > - /** - * **homie.task_status.id** - * - `int4` in database - * - `NOT NULL`, default: `nextval('homie.task_status_id_seq'::regclass)` - */ - id?: - | number - | db.Parameter - | db.DefaultType - | db.SQLFragment - | db.SQLFragment< - any, - number | db.Parameter | db.DefaultType | db.SQLFragment - > - /** - * **homie.task_status.name** - * - `text` in database - * - `NOT NULL`, no default - */ - name?: - | string - | db.Parameter - | db.SQLFragment - | db.SQLFragment | db.SQLFragment> - /** - * **homie.task_status.updated_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - updated_at?: - | (db.TimestampTzString | Date) - | db.Parameter - | db.DefaultType - | db.SQLFragment - | db.SQLFragment< - any, - | (db.TimestampTzString | Date) - | db.Parameter - | db.DefaultType - | db.SQLFragment - > + * **homie.task_status.created_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + created_at?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | db.DefaultType | db.SQLFragment | db.SQLFragment | db.DefaultType | db.SQLFragment>; + /** + * **homie.task_status.id** + * - `int4` in database + * - `NOT NULL`, default: `nextval('homie.task_status_id_seq'::regclass)` + */ + id?: number | db.Parameter | db.DefaultType | db.SQLFragment | db.SQLFragment | db.DefaultType | db.SQLFragment>; + /** + * **homie.task_status.name** + * - `text` in database + * - `NOT NULL`, no default + */ + name?: string | db.Parameter | db.SQLFragment | db.SQLFragment | db.SQLFragment>; + /** + * **homie.task_status.updated_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + updated_at?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | db.DefaultType | db.SQLFragment | db.SQLFragment | db.DefaultType | db.SQLFragment>; } - export type UniqueIndex = 'task_status_pkey' - export type Column = keyof Selectable - export type OnlyCols = Pick< - Selectable, - T[number] - > - export type SQLExpression = - | Table - | db.ColumnNames - | db.ColumnValues - | Whereable - | Column - | db.ParentColumn - | db.GenericSQLExpression - export type SQL = SQLExpression | SQLExpression[] + export type UniqueIndex = 'task_status_pkey'; + export type Column = keyof Selectable; + export type OnlyCols = Pick; + export type SQLExpression = Table | db.ColumnNames | db.ColumnValues | Whereable | Column | db.ParentColumn | db.GenericSQLExpression; + export type SQL = SQLExpression | SQLExpression[]; } - + /** * **homie.task_type** * - Table in database */ export namespace task_type { - export type Table = 'homie.task_type' + export type Table = 'homie.task_type'; export interface Selectable { /** - * **homie.task_type.created_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - created_at: Date - /** - * **homie.task_type.id** - * - `int4` in database - * - `NOT NULL`, default: `nextval('homie.task_type_id_seq'::regclass)` - */ - id: number - /** - * **homie.task_type.name** - * - `text` in database - * - `NOT NULL`, no default - */ - name: string - /** - * **homie.task_type.updated_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - updated_at: Date + * **homie.task_type.created_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + created_at: Date; + /** + * **homie.task_type.id** + * - `int4` in database + * - `NOT NULL`, default: `nextval('homie.task_type_id_seq'::regclass)` + */ + id: number; + /** + * **homie.task_type.name** + * - `text` in database + * - `NOT NULL`, no default + */ + name: string; + /** + * **homie.task_type.updated_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + updated_at: Date; } export interface JSONSelectable { /** - * **homie.task_type.created_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - created_at: db.TimestampTzString - /** - * **homie.task_type.id** - * - `int4` in database - * - `NOT NULL`, default: `nextval('homie.task_type_id_seq'::regclass)` - */ - id: number - /** - * **homie.task_type.name** - * - `text` in database - * - `NOT NULL`, no default - */ - name: string - /** - * **homie.task_type.updated_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - updated_at: db.TimestampTzString + * **homie.task_type.created_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + created_at: db.TimestampTzString; + /** + * **homie.task_type.id** + * - `int4` in database + * - `NOT NULL`, default: `nextval('homie.task_type_id_seq'::regclass)` + */ + id: number; + /** + * **homie.task_type.name** + * - `text` in database + * - `NOT NULL`, no default + */ + name: string; + /** + * **homie.task_type.updated_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + updated_at: db.TimestampTzString; } export interface Whereable { /** - * **homie.task_type.created_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - created_at?: - | (db.TimestampTzString | Date) - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - | (db.TimestampTzString | Date) - | db.Parameter - | db.SQLFragment - | db.ParentColumn - > - /** - * **homie.task_type.id** - * - `int4` in database - * - `NOT NULL`, default: `nextval('homie.task_type_id_seq'::regclass)` - */ - id?: - | number - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - number | db.Parameter | db.SQLFragment | db.ParentColumn - > - /** - * **homie.task_type.name** - * - `text` in database - * - `NOT NULL`, no default - */ - name?: - | string - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - string | db.Parameter | db.SQLFragment | db.ParentColumn - > - /** - * **homie.task_type.updated_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - updated_at?: - | (db.TimestampTzString | Date) - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - | (db.TimestampTzString | Date) - | db.Parameter - | db.SQLFragment - | db.ParentColumn - > + * **homie.task_type.created_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + created_at?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **homie.task_type.id** + * - `int4` in database + * - `NOT NULL`, default: `nextval('homie.task_type_id_seq'::regclass)` + */ + id?: number | db.Parameter | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **homie.task_type.name** + * - `text` in database + * - `NOT NULL`, no default + */ + name?: string | db.Parameter | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **homie.task_type.updated_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + updated_at?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; } export interface Insertable { /** - * **homie.task_type.created_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - created_at?: - | (db.TimestampTzString | Date) - | db.Parameter - | db.DefaultType - | db.SQLFragment - /** - * **homie.task_type.id** - * - `int4` in database - * - `NOT NULL`, default: `nextval('homie.task_type_id_seq'::regclass)` - */ - id?: number | db.Parameter | db.DefaultType | db.SQLFragment - /** - * **homie.task_type.name** - * - `text` in database - * - `NOT NULL`, no default - */ - name: string | db.Parameter | db.SQLFragment - /** - * **homie.task_type.updated_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - updated_at?: - | (db.TimestampTzString | Date) - | db.Parameter - | db.DefaultType - | db.SQLFragment + * **homie.task_type.created_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + created_at?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | db.DefaultType | db.SQLFragment; + /** + * **homie.task_type.id** + * - `int4` in database + * - `NOT NULL`, default: `nextval('homie.task_type_id_seq'::regclass)` + */ + id?: number | db.Parameter | db.DefaultType | db.SQLFragment; + /** + * **homie.task_type.name** + * - `text` in database + * - `NOT NULL`, no default + */ + name: string | db.Parameter | db.SQLFragment; + /** + * **homie.task_type.updated_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + updated_at?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | db.DefaultType | db.SQLFragment; } export interface Updatable { /** - * **homie.task_type.created_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - created_at?: - | (db.TimestampTzString | Date) - | db.Parameter - | db.DefaultType - | db.SQLFragment - | db.SQLFragment< - any, - | (db.TimestampTzString | Date) - | db.Parameter - | db.DefaultType - | db.SQLFragment - > - /** - * **homie.task_type.id** - * - `int4` in database - * - `NOT NULL`, default: `nextval('homie.task_type_id_seq'::regclass)` - */ - id?: - | number - | db.Parameter - | db.DefaultType - | db.SQLFragment - | db.SQLFragment< - any, - number | db.Parameter | db.DefaultType | db.SQLFragment - > - /** - * **homie.task_type.name** - * - `text` in database - * - `NOT NULL`, no default - */ - name?: - | string - | db.Parameter - | db.SQLFragment - | db.SQLFragment | db.SQLFragment> - /** - * **homie.task_type.updated_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - updated_at?: - | (db.TimestampTzString | Date) - | db.Parameter - | db.DefaultType - | db.SQLFragment - | db.SQLFragment< - any, - | (db.TimestampTzString | Date) - | db.Parameter - | db.DefaultType - | db.SQLFragment - > + * **homie.task_type.created_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + created_at?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | db.DefaultType | db.SQLFragment | db.SQLFragment | db.DefaultType | db.SQLFragment>; + /** + * **homie.task_type.id** + * - `int4` in database + * - `NOT NULL`, default: `nextval('homie.task_type_id_seq'::regclass)` + */ + id?: number | db.Parameter | db.DefaultType | db.SQLFragment | db.SQLFragment | db.DefaultType | db.SQLFragment>; + /** + * **homie.task_type.name** + * - `text` in database + * - `NOT NULL`, no default + */ + name?: string | db.Parameter | db.SQLFragment | db.SQLFragment | db.SQLFragment>; + /** + * **homie.task_type.updated_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + updated_at?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | db.DefaultType | db.SQLFragment | db.SQLFragment | db.DefaultType | db.SQLFragment>; } - export type UniqueIndex = 'task_type_pkey' - export type Column = keyof Selectable - export type OnlyCols = Pick< - Selectable, - T[number] - > - export type SQLExpression = - | Table - | db.ColumnNames - | db.ColumnValues - | Whereable - | Column - | db.ParentColumn - | db.GenericSQLExpression - export type SQL = SQLExpression | SQLExpression[] + export type UniqueIndex = 'task_type_pkey'; + export type Column = keyof Selectable; + export type OnlyCols = Pick; + export type SQLExpression = Table | db.ColumnNames | db.ColumnValues | Whereable | Column | db.ParentColumn | db.GenericSQLExpression; + export type SQL = SQLExpression | SQLExpression[]; } - + /* --- aggregate types --- */ - - export type Table = - | contributor.Table - | contributor_task.Table - | duplicate_task_notification.Table - | organization.Table - | plan.Table - | pull_request.Table - | subscription.Table - | task.Table - | task_status.Table - | task_type.Table - export type Selectable = - | contributor.Selectable - | contributor_task.Selectable - | duplicate_task_notification.Selectable - | organization.Selectable - | plan.Selectable - | pull_request.Selectable - | subscription.Selectable - | task.Selectable - | task_status.Selectable - | task_type.Selectable - export type JSONSelectable = - | contributor.JSONSelectable - | contributor_task.JSONSelectable - | duplicate_task_notification.JSONSelectable - | organization.JSONSelectable - | plan.JSONSelectable - | pull_request.JSONSelectable - | subscription.JSONSelectable - | task.JSONSelectable - | task_status.JSONSelectable - | task_type.JSONSelectable - export type Whereable = - | contributor.Whereable - | contributor_task.Whereable - | duplicate_task_notification.Whereable - | organization.Whereable - | plan.Whereable - | pull_request.Whereable - | subscription.Whereable - | task.Whereable - | task_status.Whereable - | task_type.Whereable - export type Insertable = - | contributor.Insertable - | contributor_task.Insertable - | duplicate_task_notification.Insertable - | organization.Insertable - | plan.Insertable - | pull_request.Insertable - | subscription.Insertable - | task.Insertable - | task_status.Insertable - | task_type.Insertable - export type Updatable = - | contributor.Updatable - | contributor_task.Updatable - | duplicate_task_notification.Updatable - | organization.Updatable - | plan.Updatable - | pull_request.Updatable - | subscription.Updatable - | task.Updatable - | task_status.Updatable - | task_type.Updatable - export type UniqueIndex = - | contributor.UniqueIndex - | contributor_task.UniqueIndex - | duplicate_task_notification.UniqueIndex - | organization.UniqueIndex - | plan.UniqueIndex - | pull_request.UniqueIndex - | subscription.UniqueIndex - | task.UniqueIndex - | task_status.UniqueIndex - | task_type.UniqueIndex - export type Column = - | contributor.Column - | contributor_task.Column - | duplicate_task_notification.Column - | organization.Column - | plan.Column - | pull_request.Column - | subscription.Column - | task.Column - | task_status.Column - | task_type.Column - - export type AllBaseTables = [ - contributor.Table, - contributor_task.Table, - duplicate_task_notification.Table, - organization.Table, - plan.Table, - pull_request.Table, - subscription.Table, - task.Table, - task_status.Table, - task_type.Table, - ] - export type AllForeignTables = [] - export type AllViews = [] - export type AllMaterializedViews = [] - export type AllTablesAndViews = [ - contributor.Table, - contributor_task.Table, - duplicate_task_notification.Table, - organization.Table, - plan.Table, - pull_request.Table, - subscription.Table, - task.Table, - task_status.Table, - task_type.Table, - ] + + export type Table = contributor.Table | contributor_task.Table | duplicate_task_notification.Table | organization.Table | plan.Table | pull_request.Table | subscription.Table | task.Table | task_status.Table | task_type.Table; + export type Selectable = contributor.Selectable | contributor_task.Selectable | duplicate_task_notification.Selectable | organization.Selectable | plan.Selectable | pull_request.Selectable | subscription.Selectable | task.Selectable | task_status.Selectable | task_type.Selectable; + export type JSONSelectable = contributor.JSONSelectable | contributor_task.JSONSelectable | duplicate_task_notification.JSONSelectable | organization.JSONSelectable | plan.JSONSelectable | pull_request.JSONSelectable | subscription.JSONSelectable | task.JSONSelectable | task_status.JSONSelectable | task_type.JSONSelectable; + export type Whereable = contributor.Whereable | contributor_task.Whereable | duplicate_task_notification.Whereable | organization.Whereable | plan.Whereable | pull_request.Whereable | subscription.Whereable | task.Whereable | task_status.Whereable | task_type.Whereable; + export type Insertable = contributor.Insertable | contributor_task.Insertable | duplicate_task_notification.Insertable | organization.Insertable | plan.Insertable | pull_request.Insertable | subscription.Insertable | task.Insertable | task_status.Insertable | task_type.Insertable; + export type Updatable = contributor.Updatable | contributor_task.Updatable | duplicate_task_notification.Updatable | organization.Updatable | plan.Updatable | pull_request.Updatable | subscription.Updatable | task.Updatable | task_status.Updatable | task_type.Updatable; + export type UniqueIndex = contributor.UniqueIndex | contributor_task.UniqueIndex | duplicate_task_notification.UniqueIndex | organization.UniqueIndex | plan.UniqueIndex | pull_request.UniqueIndex | subscription.UniqueIndex | task.UniqueIndex | task_status.UniqueIndex | task_type.UniqueIndex; + export type Column = contributor.Column | contributor_task.Column | duplicate_task_notification.Column | organization.Column | plan.Column | pull_request.Column | subscription.Column | task.Column | task_status.Column | task_type.Column; + + export type AllBaseTables = [contributor.Table, contributor_task.Table, duplicate_task_notification.Table, organization.Table, plan.Table, pull_request.Table, subscription.Table, task.Table, task_status.Table, task_type.Table]; + export type AllForeignTables = []; + export type AllViews = []; + export type AllMaterializedViews = []; + export type AllTablesAndViews = [contributor.Table, contributor_task.Table, duplicate_task_notification.Table, organization.Table, plan.Table, pull_request.Table, subscription.Table, task.Table, task_status.Table, task_type.Table]; } + /* === schema: github === */ export namespace github { + /* --- enums --- */ /* (none) */ - + /* --- tables --- */ - + /** * **github.organization** * - Table in database */ export namespace organization { - export type Table = 'github.organization' + export type Table = 'github.organization'; export interface Selectable { /** - * **github.organization.created_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - created_at: Date - /** - * **github.organization.ext_gh_install_id** - * - `int4` in database - * - `NOT NULL`, no default - */ - ext_gh_install_id: number - /** - * **github.organization.id** - * - `int4` in database - * - `NOT NULL`, default: `nextval('github.organization_id_seq'::regclass)` - */ - id: number - /** - * **github.organization.organization_id** - * - `int4` in database - * - `NOT NULL`, no default - */ - organization_id: number - /** - * **github.organization.updated_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - updated_at: Date + * **github.organization.created_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + created_at: Date; + /** + * **github.organization.ext_gh_install_id** + * - `int4` in database + * - `NOT NULL`, no default + */ + ext_gh_install_id: number; + /** + * **github.organization.id** + * - `int4` in database + * - `NOT NULL`, default: `nextval('github.organization_id_seq'::regclass)` + */ + id: number; + /** + * **github.organization.organization_id** + * - `int4` in database + * - `NOT NULL`, no default + */ + organization_id: number; + /** + * **github.organization.updated_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + updated_at: Date; } export interface JSONSelectable { /** - * **github.organization.created_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - created_at: db.TimestampTzString - /** - * **github.organization.ext_gh_install_id** - * - `int4` in database - * - `NOT NULL`, no default - */ - ext_gh_install_id: number - /** - * **github.organization.id** - * - `int4` in database - * - `NOT NULL`, default: `nextval('github.organization_id_seq'::regclass)` - */ - id: number - /** - * **github.organization.organization_id** - * - `int4` in database - * - `NOT NULL`, no default - */ - organization_id: number - /** - * **github.organization.updated_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - updated_at: db.TimestampTzString + * **github.organization.created_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + created_at: db.TimestampTzString; + /** + * **github.organization.ext_gh_install_id** + * - `int4` in database + * - `NOT NULL`, no default + */ + ext_gh_install_id: number; + /** + * **github.organization.id** + * - `int4` in database + * - `NOT NULL`, default: `nextval('github.organization_id_seq'::regclass)` + */ + id: number; + /** + * **github.organization.organization_id** + * - `int4` in database + * - `NOT NULL`, no default + */ + organization_id: number; + /** + * **github.organization.updated_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + updated_at: db.TimestampTzString; } export interface Whereable { /** - * **github.organization.created_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - created_at?: - | (db.TimestampTzString | Date) - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - | (db.TimestampTzString | Date) - | db.Parameter - | db.SQLFragment - | db.ParentColumn - > - /** - * **github.organization.ext_gh_install_id** - * - `int4` in database - * - `NOT NULL`, no default - */ - ext_gh_install_id?: - | number - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - number | db.Parameter | db.SQLFragment | db.ParentColumn - > - /** - * **github.organization.id** - * - `int4` in database - * - `NOT NULL`, default: `nextval('github.organization_id_seq'::regclass)` - */ - id?: - | number - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - number | db.Parameter | db.SQLFragment | db.ParentColumn - > - /** - * **github.organization.organization_id** - * - `int4` in database - * - `NOT NULL`, no default - */ - organization_id?: - | number - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - number | db.Parameter | db.SQLFragment | db.ParentColumn - > - /** - * **github.organization.updated_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - updated_at?: - | (db.TimestampTzString | Date) - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - | (db.TimestampTzString | Date) - | db.Parameter - | db.SQLFragment - | db.ParentColumn - > + * **github.organization.created_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + created_at?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **github.organization.ext_gh_install_id** + * - `int4` in database + * - `NOT NULL`, no default + */ + ext_gh_install_id?: number | db.Parameter | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **github.organization.id** + * - `int4` in database + * - `NOT NULL`, default: `nextval('github.organization_id_seq'::regclass)` + */ + id?: number | db.Parameter | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **github.organization.organization_id** + * - `int4` in database + * - `NOT NULL`, no default + */ + organization_id?: number | db.Parameter | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **github.organization.updated_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + updated_at?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; } export interface Insertable { /** - * **github.organization.created_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - created_at?: - | (db.TimestampTzString | Date) - | db.Parameter - | db.DefaultType - | db.SQLFragment - /** - * **github.organization.ext_gh_install_id** - * - `int4` in database - * - `NOT NULL`, no default - */ - ext_gh_install_id: number | db.Parameter | db.SQLFragment - /** - * **github.organization.id** - * - `int4` in database - * - `NOT NULL`, default: `nextval('github.organization_id_seq'::regclass)` - */ - id?: number | db.Parameter | db.DefaultType | db.SQLFragment - /** - * **github.organization.organization_id** - * - `int4` in database - * - `NOT NULL`, no default - */ - organization_id: number | db.Parameter | db.SQLFragment - /** - * **github.organization.updated_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - updated_at?: - | (db.TimestampTzString | Date) - | db.Parameter - | db.DefaultType - | db.SQLFragment + * **github.organization.created_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + created_at?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | db.DefaultType | db.SQLFragment; + /** + * **github.organization.ext_gh_install_id** + * - `int4` in database + * - `NOT NULL`, no default + */ + ext_gh_install_id: number | db.Parameter | db.SQLFragment; + /** + * **github.organization.id** + * - `int4` in database + * - `NOT NULL`, default: `nextval('github.organization_id_seq'::regclass)` + */ + id?: number | db.Parameter | db.DefaultType | db.SQLFragment; + /** + * **github.organization.organization_id** + * - `int4` in database + * - `NOT NULL`, no default + */ + organization_id: number | db.Parameter | db.SQLFragment; + /** + * **github.organization.updated_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + updated_at?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | db.DefaultType | db.SQLFragment; } export interface Updatable { /** - * **github.organization.created_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - created_at?: - | (db.TimestampTzString | Date) - | db.Parameter - | db.DefaultType - | db.SQLFragment - | db.SQLFragment< - any, - | (db.TimestampTzString | Date) - | db.Parameter - | db.DefaultType - | db.SQLFragment - > - /** - * **github.organization.ext_gh_install_id** - * - `int4` in database - * - `NOT NULL`, no default - */ - ext_gh_install_id?: - | number - | db.Parameter - | db.SQLFragment - | db.SQLFragment | db.SQLFragment> - /** - * **github.organization.id** - * - `int4` in database - * - `NOT NULL`, default: `nextval('github.organization_id_seq'::regclass)` - */ - id?: - | number - | db.Parameter - | db.DefaultType - | db.SQLFragment - | db.SQLFragment< - any, - number | db.Parameter | db.DefaultType | db.SQLFragment - > - /** - * **github.organization.organization_id** - * - `int4` in database - * - `NOT NULL`, no default - */ - organization_id?: - | number - | db.Parameter - | db.SQLFragment - | db.SQLFragment | db.SQLFragment> - /** - * **github.organization.updated_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - updated_at?: - | (db.TimestampTzString | Date) - | db.Parameter - | db.DefaultType - | db.SQLFragment - | db.SQLFragment< - any, - | (db.TimestampTzString | Date) - | db.Parameter - | db.DefaultType - | db.SQLFragment - > + * **github.organization.created_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + created_at?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | db.DefaultType | db.SQLFragment | db.SQLFragment | db.DefaultType | db.SQLFragment>; + /** + * **github.organization.ext_gh_install_id** + * - `int4` in database + * - `NOT NULL`, no default + */ + ext_gh_install_id?: number | db.Parameter | db.SQLFragment | db.SQLFragment | db.SQLFragment>; + /** + * **github.organization.id** + * - `int4` in database + * - `NOT NULL`, default: `nextval('github.organization_id_seq'::regclass)` + */ + id?: number | db.Parameter | db.DefaultType | db.SQLFragment | db.SQLFragment | db.DefaultType | db.SQLFragment>; + /** + * **github.organization.organization_id** + * - `int4` in database + * - `NOT NULL`, no default + */ + organization_id?: number | db.Parameter | db.SQLFragment | db.SQLFragment | db.SQLFragment>; + /** + * **github.organization.updated_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + updated_at?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | db.DefaultType | db.SQLFragment | db.SQLFragment | db.DefaultType | db.SQLFragment>; } - export type UniqueIndex = - | 'organization_ext_gh_install_id_key' - | 'organization_organization_id_key' - | 'organization_pkey' - export type Column = keyof Selectable - export type OnlyCols = Pick< - Selectable, - T[number] - > - export type SQLExpression = - | Table - | db.ColumnNames - | db.ColumnValues - | Whereable - | Column - | db.ParentColumn - | db.GenericSQLExpression - export type SQL = SQLExpression | SQLExpression[] + export type UniqueIndex = 'organization_ext_gh_install_id_key' | 'organization_organization_id_key' | 'organization_pkey'; + export type Column = keyof Selectable; + export type OnlyCols = Pick; + export type SQLExpression = Table | db.ColumnNames | db.ColumnValues | Whereable | Column | db.ParentColumn | db.GenericSQLExpression; + export type SQL = SQLExpression | SQLExpression[]; } - + /** * **github.repo** * - Table in database */ export namespace repo { - export type Table = 'github.repo' + export type Table = 'github.repo'; export interface Selectable { /** - * **github.repo.created_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - created_at: Date - /** - * **github.repo.ext_gh_repo_id** - * - `int4` in database - * - `NOT NULL`, no default - */ - ext_gh_repo_id: number - /** - * **github.repo.html_url** - * - `text` in database - * - `NOT NULL`, no default - */ - html_url: string - /** - * **github.repo.id** - * - `int4` in database - * - `NOT NULL`, default: `nextval('github.repo_id_seq'::regclass)` - */ - id: number - /** - * **github.repo.name** - * - `text` in database - * - `NOT NULL`, no default - */ - name: string - /** - * **github.repo.organization_id** - * - `int4` in database - * - `NOT NULL`, no default - */ - organization_id: number - /** - * **github.repo.owner** - * - `text` in database - * - Nullable, no default - */ - owner: string | null - /** - * **github.repo.updated_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - updated_at: Date + * **github.repo.created_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + created_at: Date; + /** + * **github.repo.ext_gh_repo_id** + * - `int4` in database + * - `NOT NULL`, no default + */ + ext_gh_repo_id: number; + /** + * **github.repo.html_url** + * - `text` in database + * - `NOT NULL`, no default + */ + html_url: string; + /** + * **github.repo.id** + * - `int4` in database + * - `NOT NULL`, default: `nextval('github.repo_id_seq'::regclass)` + */ + id: number; + /** + * **github.repo.name** + * - `text` in database + * - `NOT NULL`, no default + */ + name: string; + /** + * **github.repo.organization_id** + * - `int4` in database + * - `NOT NULL`, no default + */ + organization_id: number; + /** + * **github.repo.owner** + * - `text` in database + * - Nullable, no default + */ + owner: string | null; + /** + * **github.repo.updated_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + updated_at: Date; } export interface JSONSelectable { /** - * **github.repo.created_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - created_at: db.TimestampTzString - /** - * **github.repo.ext_gh_repo_id** - * - `int4` in database - * - `NOT NULL`, no default - */ - ext_gh_repo_id: number - /** - * **github.repo.html_url** - * - `text` in database - * - `NOT NULL`, no default - */ - html_url: string - /** - * **github.repo.id** - * - `int4` in database - * - `NOT NULL`, default: `nextval('github.repo_id_seq'::regclass)` - */ - id: number - /** - * **github.repo.name** - * - `text` in database - * - `NOT NULL`, no default - */ - name: string - /** - * **github.repo.organization_id** - * - `int4` in database - * - `NOT NULL`, no default - */ - organization_id: number - /** - * **github.repo.owner** - * - `text` in database - * - Nullable, no default - */ - owner: string | null - /** - * **github.repo.updated_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - updated_at: db.TimestampTzString + * **github.repo.created_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + created_at: db.TimestampTzString; + /** + * **github.repo.ext_gh_repo_id** + * - `int4` in database + * - `NOT NULL`, no default + */ + ext_gh_repo_id: number; + /** + * **github.repo.html_url** + * - `text` in database + * - `NOT NULL`, no default + */ + html_url: string; + /** + * **github.repo.id** + * - `int4` in database + * - `NOT NULL`, default: `nextval('github.repo_id_seq'::regclass)` + */ + id: number; + /** + * **github.repo.name** + * - `text` in database + * - `NOT NULL`, no default + */ + name: string; + /** + * **github.repo.organization_id** + * - `int4` in database + * - `NOT NULL`, no default + */ + organization_id: number; + /** + * **github.repo.owner** + * - `text` in database + * - Nullable, no default + */ + owner: string | null; + /** + * **github.repo.updated_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + updated_at: db.TimestampTzString; } export interface Whereable { /** - * **github.repo.created_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - created_at?: - | (db.TimestampTzString | Date) - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - | (db.TimestampTzString | Date) - | db.Parameter - | db.SQLFragment - | db.ParentColumn - > - /** - * **github.repo.ext_gh_repo_id** - * - `int4` in database - * - `NOT NULL`, no default - */ - ext_gh_repo_id?: - | number - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - number | db.Parameter | db.SQLFragment | db.ParentColumn - > - /** - * **github.repo.html_url** - * - `text` in database - * - `NOT NULL`, no default - */ - html_url?: - | string - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - string | db.Parameter | db.SQLFragment | db.ParentColumn - > - /** - * **github.repo.id** - * - `int4` in database - * - `NOT NULL`, default: `nextval('github.repo_id_seq'::regclass)` - */ - id?: - | number - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - number | db.Parameter | db.SQLFragment | db.ParentColumn - > - /** - * **github.repo.name** - * - `text` in database - * - `NOT NULL`, no default - */ - name?: - | string - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - string | db.Parameter | db.SQLFragment | db.ParentColumn - > - /** - * **github.repo.organization_id** - * - `int4` in database - * - `NOT NULL`, no default - */ - organization_id?: - | number - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - number | db.Parameter | db.SQLFragment | db.ParentColumn - > - /** - * **github.repo.owner** - * - `text` in database - * - Nullable, no default - */ - owner?: - | string - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - string | db.Parameter | db.SQLFragment | db.ParentColumn - > - /** - * **github.repo.updated_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - updated_at?: - | (db.TimestampTzString | Date) - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - | (db.TimestampTzString | Date) - | db.Parameter - | db.SQLFragment - | db.ParentColumn - > + * **github.repo.created_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + created_at?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **github.repo.ext_gh_repo_id** + * - `int4` in database + * - `NOT NULL`, no default + */ + ext_gh_repo_id?: number | db.Parameter | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **github.repo.html_url** + * - `text` in database + * - `NOT NULL`, no default + */ + html_url?: string | db.Parameter | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **github.repo.id** + * - `int4` in database + * - `NOT NULL`, default: `nextval('github.repo_id_seq'::regclass)` + */ + id?: number | db.Parameter | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **github.repo.name** + * - `text` in database + * - `NOT NULL`, no default + */ + name?: string | db.Parameter | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **github.repo.organization_id** + * - `int4` in database + * - `NOT NULL`, no default + */ + organization_id?: number | db.Parameter | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **github.repo.owner** + * - `text` in database + * - Nullable, no default + */ + owner?: string | db.Parameter | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **github.repo.updated_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + updated_at?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; } export interface Insertable { /** - * **github.repo.created_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - created_at?: - | (db.TimestampTzString | Date) - | db.Parameter - | db.DefaultType - | db.SQLFragment - /** - * **github.repo.ext_gh_repo_id** - * - `int4` in database - * - `NOT NULL`, no default - */ - ext_gh_repo_id: number | db.Parameter | db.SQLFragment - /** - * **github.repo.html_url** - * - `text` in database - * - `NOT NULL`, no default - */ - html_url: string | db.Parameter | db.SQLFragment - /** - * **github.repo.id** - * - `int4` in database - * - `NOT NULL`, default: `nextval('github.repo_id_seq'::regclass)` - */ - id?: number | db.Parameter | db.DefaultType | db.SQLFragment - /** - * **github.repo.name** - * - `text` in database - * - `NOT NULL`, no default - */ - name: string | db.Parameter | db.SQLFragment - /** - * **github.repo.organization_id** - * - `int4` in database - * - `NOT NULL`, no default - */ - organization_id: number | db.Parameter | db.SQLFragment - /** - * **github.repo.owner** - * - `text` in database - * - Nullable, no default - */ - owner?: - | string - | db.Parameter - | null - | db.DefaultType - | db.SQLFragment - /** - * **github.repo.updated_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - updated_at?: - | (db.TimestampTzString | Date) - | db.Parameter - | db.DefaultType - | db.SQLFragment + * **github.repo.created_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + created_at?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | db.DefaultType | db.SQLFragment; + /** + * **github.repo.ext_gh_repo_id** + * - `int4` in database + * - `NOT NULL`, no default + */ + ext_gh_repo_id: number | db.Parameter | db.SQLFragment; + /** + * **github.repo.html_url** + * - `text` in database + * - `NOT NULL`, no default + */ + html_url: string | db.Parameter | db.SQLFragment; + /** + * **github.repo.id** + * - `int4` in database + * - `NOT NULL`, default: `nextval('github.repo_id_seq'::regclass)` + */ + id?: number | db.Parameter | db.DefaultType | db.SQLFragment; + /** + * **github.repo.name** + * - `text` in database + * - `NOT NULL`, no default + */ + name: string | db.Parameter | db.SQLFragment; + /** + * **github.repo.organization_id** + * - `int4` in database + * - `NOT NULL`, no default + */ + organization_id: number | db.Parameter | db.SQLFragment; + /** + * **github.repo.owner** + * - `text` in database + * - Nullable, no default + */ + owner?: string | db.Parameter | null | db.DefaultType | db.SQLFragment; + /** + * **github.repo.updated_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + updated_at?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | db.DefaultType | db.SQLFragment; } export interface Updatable { /** - * **github.repo.created_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - created_at?: - | (db.TimestampTzString | Date) - | db.Parameter - | db.DefaultType - | db.SQLFragment - | db.SQLFragment< - any, - | (db.TimestampTzString | Date) - | db.Parameter - | db.DefaultType - | db.SQLFragment - > - /** - * **github.repo.ext_gh_repo_id** - * - `int4` in database - * - `NOT NULL`, no default - */ - ext_gh_repo_id?: - | number - | db.Parameter - | db.SQLFragment - | db.SQLFragment | db.SQLFragment> - /** - * **github.repo.html_url** - * - `text` in database - * - `NOT NULL`, no default - */ - html_url?: - | string - | db.Parameter - | db.SQLFragment - | db.SQLFragment | db.SQLFragment> - /** - * **github.repo.id** - * - `int4` in database - * - `NOT NULL`, default: `nextval('github.repo_id_seq'::regclass)` - */ - id?: - | number - | db.Parameter - | db.DefaultType - | db.SQLFragment - | db.SQLFragment< - any, - number | db.Parameter | db.DefaultType | db.SQLFragment - > - /** - * **github.repo.name** - * - `text` in database - * - `NOT NULL`, no default - */ - name?: - | string - | db.Parameter - | db.SQLFragment - | db.SQLFragment | db.SQLFragment> - /** - * **github.repo.organization_id** - * - `int4` in database - * - `NOT NULL`, no default - */ - organization_id?: - | number - | db.Parameter - | db.SQLFragment - | db.SQLFragment | db.SQLFragment> - /** - * **github.repo.owner** - * - `text` in database - * - Nullable, no default - */ - owner?: - | string - | db.Parameter - | null - | db.DefaultType - | db.SQLFragment - | db.SQLFragment< - any, - | string - | db.Parameter - | null - | db.DefaultType - | db.SQLFragment - > - /** - * **github.repo.updated_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - updated_at?: - | (db.TimestampTzString | Date) - | db.Parameter - | db.DefaultType - | db.SQLFragment - | db.SQLFragment< - any, - | (db.TimestampTzString | Date) - | db.Parameter - | db.DefaultType - | db.SQLFragment - > + * **github.repo.created_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + created_at?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | db.DefaultType | db.SQLFragment | db.SQLFragment | db.DefaultType | db.SQLFragment>; + /** + * **github.repo.ext_gh_repo_id** + * - `int4` in database + * - `NOT NULL`, no default + */ + ext_gh_repo_id?: number | db.Parameter | db.SQLFragment | db.SQLFragment | db.SQLFragment>; + /** + * **github.repo.html_url** + * - `text` in database + * - `NOT NULL`, no default + */ + html_url?: string | db.Parameter | db.SQLFragment | db.SQLFragment | db.SQLFragment>; + /** + * **github.repo.id** + * - `int4` in database + * - `NOT NULL`, default: `nextval('github.repo_id_seq'::regclass)` + */ + id?: number | db.Parameter | db.DefaultType | db.SQLFragment | db.SQLFragment | db.DefaultType | db.SQLFragment>; + /** + * **github.repo.name** + * - `text` in database + * - `NOT NULL`, no default + */ + name?: string | db.Parameter | db.SQLFragment | db.SQLFragment | db.SQLFragment>; + /** + * **github.repo.organization_id** + * - `int4` in database + * - `NOT NULL`, no default + */ + organization_id?: number | db.Parameter | db.SQLFragment | db.SQLFragment | db.SQLFragment>; + /** + * **github.repo.owner** + * - `text` in database + * - Nullable, no default + */ + owner?: string | db.Parameter | null | db.DefaultType | db.SQLFragment | db.SQLFragment | null | db.DefaultType | db.SQLFragment>; + /** + * **github.repo.updated_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + updated_at?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | db.DefaultType | db.SQLFragment | db.SQLFragment | db.DefaultType | db.SQLFragment>; } - export type UniqueIndex = 'repo_ext_gh_repo_id_key' | 'repo_pkey' - export type Column = keyof Selectable - export type OnlyCols = Pick< - Selectable, - T[number] - > - export type SQLExpression = - | Table - | db.ColumnNames - | db.ColumnValues - | Whereable - | Column - | db.ParentColumn - | db.GenericSQLExpression - export type SQL = SQLExpression | SQLExpression[] + export type UniqueIndex = 'repo_ext_gh_repo_id_key' | 'repo_pkey'; + export type Column = keyof Selectable; + export type OnlyCols = Pick; + export type SQLExpression = Table | db.ColumnNames | db.ColumnValues | Whereable | Column | db.ParentColumn | db.GenericSQLExpression; + export type SQL = SQLExpression | SQLExpression[]; } - + /* --- aggregate types --- */ - - export type Table = organization.Table | repo.Table - export type Selectable = organization.Selectable | repo.Selectable - export type JSONSelectable = - | organization.JSONSelectable - | repo.JSONSelectable - export type Whereable = organization.Whereable | repo.Whereable - export type Insertable = organization.Insertable | repo.Insertable - export type Updatable = organization.Updatable | repo.Updatable - export type UniqueIndex = organization.UniqueIndex | repo.UniqueIndex - export type Column = organization.Column | repo.Column - - export type AllBaseTables = [organization.Table, repo.Table] - export type AllForeignTables = [] - export type AllViews = [] - export type AllMaterializedViews = [] - export type AllTablesAndViews = [organization.Table, repo.Table] + + export type Table = organization.Table | repo.Table; + export type Selectable = organization.Selectable | repo.Selectable; + export type JSONSelectable = organization.JSONSelectable | repo.JSONSelectable; + export type Whereable = organization.Whereable | repo.Whereable; + export type Insertable = organization.Insertable | repo.Insertable; + export type Updatable = organization.Updatable | repo.Updatable; + export type UniqueIndex = organization.UniqueIndex | repo.UniqueIndex; + export type Column = organization.Column | repo.Column; + + export type AllBaseTables = [organization.Table, repo.Table]; + export type AllForeignTables = []; + export type AllViews = []; + export type AllMaterializedViews = []; + export type AllTablesAndViews = [organization.Table, repo.Table]; } + /* === schema: slack === */ export namespace slack { + /* --- enums --- */ /* (none) */ - + /* --- tables --- */ - + /** * **slack.workspace** * - Table in database */ export namespace workspace { - export type Table = 'slack.workspace' + export type Table = 'slack.workspace'; export interface Selectable { /** - * **slack.workspace.created_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - created_at: Date - /** - * **slack.workspace.ext_slack_bot_user_id** - * - `text` in database - * - `NOT NULL`, no default - */ - ext_slack_bot_user_id: string - /** - * **slack.workspace.ext_slack_team_id** - * - `text` in database - * - `NOT NULL`, no default - */ - ext_slack_team_id: string - /** - * **slack.workspace.ext_slack_webhook_channel_id** - * - `text` in database - * - `NOT NULL`, no default - */ - ext_slack_webhook_channel_id: string - /** - * **slack.workspace.id** - * - `int4` in database - * - `NOT NULL`, default: `nextval('slack.workspace_id_seq'::regclass)` - */ - id: number - /** - * **slack.workspace.organization_id** - * - `int4` in database - * - `NOT NULL`, no default - */ - organization_id: number - /** - * **slack.workspace.slack_access_token** - * - `text` in database - * - `NOT NULL`, no default - */ - slack_access_token: string - /** - * **slack.workspace.updated_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - updated_at: Date - /** - * **slack.workspace.webhook_url** - * - `text` in database - * - `NOT NULL`, no default - */ - webhook_url: string + * **slack.workspace.created_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + created_at: Date; + /** + * **slack.workspace.ext_slack_bot_user_id** + * - `text` in database + * - `NOT NULL`, no default + */ + ext_slack_bot_user_id: string; + /** + * **slack.workspace.ext_slack_team_id** + * - `text` in database + * - `NOT NULL`, no default + */ + ext_slack_team_id: string; + /** + * **slack.workspace.ext_slack_webhook_channel_id** + * - `text` in database + * - `NOT NULL`, no default + */ + ext_slack_webhook_channel_id: string; + /** + * **slack.workspace.id** + * - `int4` in database + * - `NOT NULL`, default: `nextval('slack.workspace_id_seq'::regclass)` + */ + id: number; + /** + * **slack.workspace.organization_id** + * - `int4` in database + * - `NOT NULL`, no default + */ + organization_id: number; + /** + * **slack.workspace.slack_access_token** + * - `text` in database + * - `NOT NULL`, no default + */ + slack_access_token: string; + /** + * **slack.workspace.updated_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + updated_at: Date; + /** + * **slack.workspace.webhook_url** + * - `text` in database + * - `NOT NULL`, no default + */ + webhook_url: string; } export interface JSONSelectable { /** - * **slack.workspace.created_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - created_at: db.TimestampTzString - /** - * **slack.workspace.ext_slack_bot_user_id** - * - `text` in database - * - `NOT NULL`, no default - */ - ext_slack_bot_user_id: string - /** - * **slack.workspace.ext_slack_team_id** - * - `text` in database - * - `NOT NULL`, no default - */ - ext_slack_team_id: string - /** - * **slack.workspace.ext_slack_webhook_channel_id** - * - `text` in database - * - `NOT NULL`, no default - */ - ext_slack_webhook_channel_id: string - /** - * **slack.workspace.id** - * - `int4` in database - * - `NOT NULL`, default: `nextval('slack.workspace_id_seq'::regclass)` - */ - id: number - /** - * **slack.workspace.organization_id** - * - `int4` in database - * - `NOT NULL`, no default - */ - organization_id: number - /** - * **slack.workspace.slack_access_token** - * - `text` in database - * - `NOT NULL`, no default - */ - slack_access_token: string - /** - * **slack.workspace.updated_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - updated_at: db.TimestampTzString - /** - * **slack.workspace.webhook_url** - * - `text` in database - * - `NOT NULL`, no default - */ - webhook_url: string + * **slack.workspace.created_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + created_at: db.TimestampTzString; + /** + * **slack.workspace.ext_slack_bot_user_id** + * - `text` in database + * - `NOT NULL`, no default + */ + ext_slack_bot_user_id: string; + /** + * **slack.workspace.ext_slack_team_id** + * - `text` in database + * - `NOT NULL`, no default + */ + ext_slack_team_id: string; + /** + * **slack.workspace.ext_slack_webhook_channel_id** + * - `text` in database + * - `NOT NULL`, no default + */ + ext_slack_webhook_channel_id: string; + /** + * **slack.workspace.id** + * - `int4` in database + * - `NOT NULL`, default: `nextval('slack.workspace_id_seq'::regclass)` + */ + id: number; + /** + * **slack.workspace.organization_id** + * - `int4` in database + * - `NOT NULL`, no default + */ + organization_id: number; + /** + * **slack.workspace.slack_access_token** + * - `text` in database + * - `NOT NULL`, no default + */ + slack_access_token: string; + /** + * **slack.workspace.updated_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + updated_at: db.TimestampTzString; + /** + * **slack.workspace.webhook_url** + * - `text` in database + * - `NOT NULL`, no default + */ + webhook_url: string; } export interface Whereable { /** - * **slack.workspace.created_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - created_at?: - | (db.TimestampTzString | Date) - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - | (db.TimestampTzString | Date) - | db.Parameter - | db.SQLFragment - | db.ParentColumn - > - /** - * **slack.workspace.ext_slack_bot_user_id** - * - `text` in database - * - `NOT NULL`, no default - */ - ext_slack_bot_user_id?: - | string - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - string | db.Parameter | db.SQLFragment | db.ParentColumn - > - /** - * **slack.workspace.ext_slack_team_id** - * - `text` in database - * - `NOT NULL`, no default - */ - ext_slack_team_id?: - | string - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - string | db.Parameter | db.SQLFragment | db.ParentColumn - > - /** - * **slack.workspace.ext_slack_webhook_channel_id** - * - `text` in database - * - `NOT NULL`, no default - */ - ext_slack_webhook_channel_id?: - | string - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - string | db.Parameter | db.SQLFragment | db.ParentColumn - > - /** - * **slack.workspace.id** - * - `int4` in database - * - `NOT NULL`, default: `nextval('slack.workspace_id_seq'::regclass)` - */ - id?: - | number - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - number | db.Parameter | db.SQLFragment | db.ParentColumn - > - /** - * **slack.workspace.organization_id** - * - `int4` in database - * - `NOT NULL`, no default - */ - organization_id?: - | number - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - number | db.Parameter | db.SQLFragment | db.ParentColumn - > - /** - * **slack.workspace.slack_access_token** - * - `text` in database - * - `NOT NULL`, no default - */ - slack_access_token?: - | string - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - string | db.Parameter | db.SQLFragment | db.ParentColumn - > - /** - * **slack.workspace.updated_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - updated_at?: - | (db.TimestampTzString | Date) - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - | (db.TimestampTzString | Date) - | db.Parameter - | db.SQLFragment - | db.ParentColumn - > - /** - * **slack.workspace.webhook_url** - * - `text` in database - * - `NOT NULL`, no default - */ - webhook_url?: - | string - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - string | db.Parameter | db.SQLFragment | db.ParentColumn - > + * **slack.workspace.created_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + created_at?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **slack.workspace.ext_slack_bot_user_id** + * - `text` in database + * - `NOT NULL`, no default + */ + ext_slack_bot_user_id?: string | db.Parameter | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **slack.workspace.ext_slack_team_id** + * - `text` in database + * - `NOT NULL`, no default + */ + ext_slack_team_id?: string | db.Parameter | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **slack.workspace.ext_slack_webhook_channel_id** + * - `text` in database + * - `NOT NULL`, no default + */ + ext_slack_webhook_channel_id?: string | db.Parameter | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **slack.workspace.id** + * - `int4` in database + * - `NOT NULL`, default: `nextval('slack.workspace_id_seq'::regclass)` + */ + id?: number | db.Parameter | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **slack.workspace.organization_id** + * - `int4` in database + * - `NOT NULL`, no default + */ + organization_id?: number | db.Parameter | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **slack.workspace.slack_access_token** + * - `text` in database + * - `NOT NULL`, no default + */ + slack_access_token?: string | db.Parameter | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **slack.workspace.updated_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + updated_at?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **slack.workspace.webhook_url** + * - `text` in database + * - `NOT NULL`, no default + */ + webhook_url?: string | db.Parameter | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; } export interface Insertable { /** - * **slack.workspace.created_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - created_at?: - | (db.TimestampTzString | Date) - | db.Parameter - | db.DefaultType - | db.SQLFragment - /** - * **slack.workspace.ext_slack_bot_user_id** - * - `text` in database - * - `NOT NULL`, no default - */ - ext_slack_bot_user_id: string | db.Parameter | db.SQLFragment - /** - * **slack.workspace.ext_slack_team_id** - * - `text` in database - * - `NOT NULL`, no default - */ - ext_slack_team_id: string | db.Parameter | db.SQLFragment - /** - * **slack.workspace.ext_slack_webhook_channel_id** - * - `text` in database - * - `NOT NULL`, no default - */ - ext_slack_webhook_channel_id: - | string - | db.Parameter - | db.SQLFragment - /** - * **slack.workspace.id** - * - `int4` in database - * - `NOT NULL`, default: `nextval('slack.workspace_id_seq'::regclass)` - */ - id?: number | db.Parameter | db.DefaultType | db.SQLFragment - /** - * **slack.workspace.organization_id** - * - `int4` in database - * - `NOT NULL`, no default - */ - organization_id: number | db.Parameter | db.SQLFragment - /** - * **slack.workspace.slack_access_token** - * - `text` in database - * - `NOT NULL`, no default - */ - slack_access_token: string | db.Parameter | db.SQLFragment - /** - * **slack.workspace.updated_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - updated_at?: - | (db.TimestampTzString | Date) - | db.Parameter - | db.DefaultType - | db.SQLFragment - /** - * **slack.workspace.webhook_url** - * - `text` in database - * - `NOT NULL`, no default - */ - webhook_url: string | db.Parameter | db.SQLFragment + * **slack.workspace.created_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + created_at?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | db.DefaultType | db.SQLFragment; + /** + * **slack.workspace.ext_slack_bot_user_id** + * - `text` in database + * - `NOT NULL`, no default + */ + ext_slack_bot_user_id: string | db.Parameter | db.SQLFragment; + /** + * **slack.workspace.ext_slack_team_id** + * - `text` in database + * - `NOT NULL`, no default + */ + ext_slack_team_id: string | db.Parameter | db.SQLFragment; + /** + * **slack.workspace.ext_slack_webhook_channel_id** + * - `text` in database + * - `NOT NULL`, no default + */ + ext_slack_webhook_channel_id: string | db.Parameter | db.SQLFragment; + /** + * **slack.workspace.id** + * - `int4` in database + * - `NOT NULL`, default: `nextval('slack.workspace_id_seq'::regclass)` + */ + id?: number | db.Parameter | db.DefaultType | db.SQLFragment; + /** + * **slack.workspace.organization_id** + * - `int4` in database + * - `NOT NULL`, no default + */ + organization_id: number | db.Parameter | db.SQLFragment; + /** + * **slack.workspace.slack_access_token** + * - `text` in database + * - `NOT NULL`, no default + */ + slack_access_token: string | db.Parameter | db.SQLFragment; + /** + * **slack.workspace.updated_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + updated_at?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | db.DefaultType | db.SQLFragment; + /** + * **slack.workspace.webhook_url** + * - `text` in database + * - `NOT NULL`, no default + */ + webhook_url: string | db.Parameter | db.SQLFragment; } export interface Updatable { /** - * **slack.workspace.created_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - created_at?: - | (db.TimestampTzString | Date) - | db.Parameter - | db.DefaultType - | db.SQLFragment - | db.SQLFragment< - any, - | (db.TimestampTzString | Date) - | db.Parameter - | db.DefaultType - | db.SQLFragment - > - /** - * **slack.workspace.ext_slack_bot_user_id** - * - `text` in database - * - `NOT NULL`, no default - */ - ext_slack_bot_user_id?: - | string - | db.Parameter - | db.SQLFragment - | db.SQLFragment | db.SQLFragment> - /** - * **slack.workspace.ext_slack_team_id** - * - `text` in database - * - `NOT NULL`, no default - */ - ext_slack_team_id?: - | string - | db.Parameter - | db.SQLFragment - | db.SQLFragment | db.SQLFragment> - /** - * **slack.workspace.ext_slack_webhook_channel_id** - * - `text` in database - * - `NOT NULL`, no default - */ - ext_slack_webhook_channel_id?: - | string - | db.Parameter - | db.SQLFragment - | db.SQLFragment | db.SQLFragment> - /** - * **slack.workspace.id** - * - `int4` in database - * - `NOT NULL`, default: `nextval('slack.workspace_id_seq'::regclass)` - */ - id?: - | number - | db.Parameter - | db.DefaultType - | db.SQLFragment - | db.SQLFragment< - any, - number | db.Parameter | db.DefaultType | db.SQLFragment - > - /** - * **slack.workspace.organization_id** - * - `int4` in database - * - `NOT NULL`, no default - */ - organization_id?: - | number - | db.Parameter - | db.SQLFragment - | db.SQLFragment | db.SQLFragment> - /** - * **slack.workspace.slack_access_token** - * - `text` in database - * - `NOT NULL`, no default - */ - slack_access_token?: - | string - | db.Parameter - | db.SQLFragment - | db.SQLFragment | db.SQLFragment> - /** - * **slack.workspace.updated_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - updated_at?: - | (db.TimestampTzString | Date) - | db.Parameter - | db.DefaultType - | db.SQLFragment - | db.SQLFragment< - any, - | (db.TimestampTzString | Date) - | db.Parameter - | db.DefaultType - | db.SQLFragment - > - /** - * **slack.workspace.webhook_url** - * - `text` in database - * - `NOT NULL`, no default - */ - webhook_url?: - | string - | db.Parameter - | db.SQLFragment - | db.SQLFragment | db.SQLFragment> + * **slack.workspace.created_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + created_at?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | db.DefaultType | db.SQLFragment | db.SQLFragment | db.DefaultType | db.SQLFragment>; + /** + * **slack.workspace.ext_slack_bot_user_id** + * - `text` in database + * - `NOT NULL`, no default + */ + ext_slack_bot_user_id?: string | db.Parameter | db.SQLFragment | db.SQLFragment | db.SQLFragment>; + /** + * **slack.workspace.ext_slack_team_id** + * - `text` in database + * - `NOT NULL`, no default + */ + ext_slack_team_id?: string | db.Parameter | db.SQLFragment | db.SQLFragment | db.SQLFragment>; + /** + * **slack.workspace.ext_slack_webhook_channel_id** + * - `text` in database + * - `NOT NULL`, no default + */ + ext_slack_webhook_channel_id?: string | db.Parameter | db.SQLFragment | db.SQLFragment | db.SQLFragment>; + /** + * **slack.workspace.id** + * - `int4` in database + * - `NOT NULL`, default: `nextval('slack.workspace_id_seq'::regclass)` + */ + id?: number | db.Parameter | db.DefaultType | db.SQLFragment | db.SQLFragment | db.DefaultType | db.SQLFragment>; + /** + * **slack.workspace.organization_id** + * - `int4` in database + * - `NOT NULL`, no default + */ + organization_id?: number | db.Parameter | db.SQLFragment | db.SQLFragment | db.SQLFragment>; + /** + * **slack.workspace.slack_access_token** + * - `text` in database + * - `NOT NULL`, no default + */ + slack_access_token?: string | db.Parameter | db.SQLFragment | db.SQLFragment | db.SQLFragment>; + /** + * **slack.workspace.updated_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + updated_at?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | db.DefaultType | db.SQLFragment | db.SQLFragment | db.DefaultType | db.SQLFragment>; + /** + * **slack.workspace.webhook_url** + * - `text` in database + * - `NOT NULL`, no default + */ + webhook_url?: string | db.Parameter | db.SQLFragment | db.SQLFragment | db.SQLFragment>; } - export type UniqueIndex = - | 'workspace_ext_slack_team_id_key' - | 'workspace_organization_id_key' - | 'workspace_pkey' - export type Column = keyof Selectable - export type OnlyCols = Pick< - Selectable, - T[number] - > - export type SQLExpression = - | Table - | db.ColumnNames - | db.ColumnValues - | Whereable - | Column - | db.ParentColumn - | db.GenericSQLExpression - export type SQL = SQLExpression | SQLExpression[] + export type UniqueIndex = 'workspace_ext_slack_team_id_key' | 'workspace_organization_id_key' | 'workspace_pkey'; + export type Column = keyof Selectable; + export type OnlyCols = Pick; + export type SQLExpression = Table | db.ColumnNames | db.ColumnValues | Whereable | Column | db.ParentColumn | db.GenericSQLExpression; + export type SQL = SQLExpression | SQLExpression[]; } - + /* --- aggregate types --- */ - - export type Table = workspace.Table - export type Selectable = workspace.Selectable - export type JSONSelectable = workspace.JSONSelectable - export type Whereable = workspace.Whereable - export type Insertable = workspace.Insertable - export type Updatable = workspace.Updatable - export type UniqueIndex = workspace.UniqueIndex - export type Column = workspace.Column - - export type AllBaseTables = [workspace.Table] - export type AllForeignTables = [] - export type AllViews = [] - export type AllMaterializedViews = [] - export type AllTablesAndViews = [workspace.Table] + + export type Table = workspace.Table; + export type Selectable = workspace.Selectable; + export type JSONSelectable = workspace.JSONSelectable; + export type Whereable = workspace.Whereable; + export type Insertable = workspace.Insertable; + export type Updatable = workspace.Updatable; + export type UniqueIndex = workspace.UniqueIndex; + export type Column = workspace.Column; + + export type AllBaseTables = [workspace.Table]; + export type AllForeignTables = []; + export type AllViews = []; + export type AllMaterializedViews = []; + export type AllTablesAndViews = [workspace.Table]; } + /* === schema: trello === */ export namespace trello { + /* --- enums --- */ /* (none) */ - + /* --- tables --- */ - + /** * **trello.workspace** * - Table in database */ export namespace workspace { - export type Table = 'trello.workspace' + export type Table = 'trello.workspace'; export interface Selectable { /** - * **trello.workspace.created_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - created_at: Date - /** - * **trello.workspace.ext_trello_board_id** - * - `text` in database - * - Nullable, no default - */ - ext_trello_board_id: string | null - /** - * **trello.workspace.ext_trello_done_task_list_id** - * - `text` in database - * - Nullable, no default - */ - ext_trello_done_task_list_id: string | null - /** - * **trello.workspace.ext_trello_new_task_list_id** - * - `text` in database - * - Nullable, no default - */ - ext_trello_new_task_list_id: string | null - /** - * **trello.workspace.id** - * - `int4` in database - * - `NOT NULL`, default: `nextval('trello.workspace_id_seq'::regclass)` - */ - id: number - /** - * **trello.workspace.organization_id** - * - `int4` in database - * - `NOT NULL`, no default - */ - organization_id: number - /** - * **trello.workspace.trello_access_token** - * - `text` in database - * - `NOT NULL`, no default - */ - trello_access_token: string - /** - * **trello.workspace.updated_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - updated_at: Date + * **trello.workspace.created_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + created_at: Date; + /** + * **trello.workspace.ext_trello_board_id** + * - `text` in database + * - Nullable, no default + */ + ext_trello_board_id: string | null; + /** + * **trello.workspace.ext_trello_done_task_list_id** + * - `text` in database + * - Nullable, no default + */ + ext_trello_done_task_list_id: string | null; + /** + * **trello.workspace.ext_trello_new_task_list_id** + * - `text` in database + * - Nullable, no default + */ + ext_trello_new_task_list_id: string | null; + /** + * **trello.workspace.id** + * - `int4` in database + * - `NOT NULL`, default: `nextval('trello.workspace_id_seq'::regclass)` + */ + id: number; + /** + * **trello.workspace.organization_id** + * - `int4` in database + * - `NOT NULL`, no default + */ + organization_id: number; + /** + * **trello.workspace.trello_access_token** + * - `text` in database + * - `NOT NULL`, no default + */ + trello_access_token: string; + /** + * **trello.workspace.updated_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + updated_at: Date; } export interface JSONSelectable { /** - * **trello.workspace.created_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - created_at: db.TimestampTzString - /** - * **trello.workspace.ext_trello_board_id** - * - `text` in database - * - Nullable, no default - */ - ext_trello_board_id: string | null - /** - * **trello.workspace.ext_trello_done_task_list_id** - * - `text` in database - * - Nullable, no default - */ - ext_trello_done_task_list_id: string | null - /** - * **trello.workspace.ext_trello_new_task_list_id** - * - `text` in database - * - Nullable, no default - */ - ext_trello_new_task_list_id: string | null - /** - * **trello.workspace.id** - * - `int4` in database - * - `NOT NULL`, default: `nextval('trello.workspace_id_seq'::regclass)` - */ - id: number - /** - * **trello.workspace.organization_id** - * - `int4` in database - * - `NOT NULL`, no default - */ - organization_id: number - /** - * **trello.workspace.trello_access_token** - * - `text` in database - * - `NOT NULL`, no default - */ - trello_access_token: string - /** - * **trello.workspace.updated_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - updated_at: db.TimestampTzString + * **trello.workspace.created_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + created_at: db.TimestampTzString; + /** + * **trello.workspace.ext_trello_board_id** + * - `text` in database + * - Nullable, no default + */ + ext_trello_board_id: string | null; + /** + * **trello.workspace.ext_trello_done_task_list_id** + * - `text` in database + * - Nullable, no default + */ + ext_trello_done_task_list_id: string | null; + /** + * **trello.workspace.ext_trello_new_task_list_id** + * - `text` in database + * - Nullable, no default + */ + ext_trello_new_task_list_id: string | null; + /** + * **trello.workspace.id** + * - `int4` in database + * - `NOT NULL`, default: `nextval('trello.workspace_id_seq'::regclass)` + */ + id: number; + /** + * **trello.workspace.organization_id** + * - `int4` in database + * - `NOT NULL`, no default + */ + organization_id: number; + /** + * **trello.workspace.trello_access_token** + * - `text` in database + * - `NOT NULL`, no default + */ + trello_access_token: string; + /** + * **trello.workspace.updated_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + updated_at: db.TimestampTzString; } export interface Whereable { /** - * **trello.workspace.created_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - created_at?: - | (db.TimestampTzString | Date) - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - | (db.TimestampTzString | Date) - | db.Parameter - | db.SQLFragment - | db.ParentColumn - > - /** - * **trello.workspace.ext_trello_board_id** - * - `text` in database - * - Nullable, no default - */ - ext_trello_board_id?: - | string - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - string | db.Parameter | db.SQLFragment | db.ParentColumn - > - /** - * **trello.workspace.ext_trello_done_task_list_id** - * - `text` in database - * - Nullable, no default - */ - ext_trello_done_task_list_id?: - | string - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - string | db.Parameter | db.SQLFragment | db.ParentColumn - > - /** - * **trello.workspace.ext_trello_new_task_list_id** - * - `text` in database - * - Nullable, no default - */ - ext_trello_new_task_list_id?: - | string - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - string | db.Parameter | db.SQLFragment | db.ParentColumn - > - /** - * **trello.workspace.id** - * - `int4` in database - * - `NOT NULL`, default: `nextval('trello.workspace_id_seq'::regclass)` - */ - id?: - | number - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - number | db.Parameter | db.SQLFragment | db.ParentColumn - > - /** - * **trello.workspace.organization_id** - * - `int4` in database - * - `NOT NULL`, no default - */ - organization_id?: - | number - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - number | db.Parameter | db.SQLFragment | db.ParentColumn - > - /** - * **trello.workspace.trello_access_token** - * - `text` in database - * - `NOT NULL`, no default - */ - trello_access_token?: - | string - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - string | db.Parameter | db.SQLFragment | db.ParentColumn - > - /** - * **trello.workspace.updated_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - updated_at?: - | (db.TimestampTzString | Date) - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - | (db.TimestampTzString | Date) - | db.Parameter - | db.SQLFragment - | db.ParentColumn - > + * **trello.workspace.created_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + created_at?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **trello.workspace.ext_trello_board_id** + * - `text` in database + * - Nullable, no default + */ + ext_trello_board_id?: string | db.Parameter | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **trello.workspace.ext_trello_done_task_list_id** + * - `text` in database + * - Nullable, no default + */ + ext_trello_done_task_list_id?: string | db.Parameter | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **trello.workspace.ext_trello_new_task_list_id** + * - `text` in database + * - Nullable, no default + */ + ext_trello_new_task_list_id?: string | db.Parameter | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **trello.workspace.id** + * - `int4` in database + * - `NOT NULL`, default: `nextval('trello.workspace_id_seq'::regclass)` + */ + id?: number | db.Parameter | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **trello.workspace.organization_id** + * - `int4` in database + * - `NOT NULL`, no default + */ + organization_id?: number | db.Parameter | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **trello.workspace.trello_access_token** + * - `text` in database + * - `NOT NULL`, no default + */ + trello_access_token?: string | db.Parameter | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **trello.workspace.updated_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + updated_at?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; } export interface Insertable { /** - * **trello.workspace.created_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - created_at?: - | (db.TimestampTzString | Date) - | db.Parameter - | db.DefaultType - | db.SQLFragment - /** - * **trello.workspace.ext_trello_board_id** - * - `text` in database - * - Nullable, no default - */ - ext_trello_board_id?: - | string - | db.Parameter - | null - | db.DefaultType - | db.SQLFragment - /** - * **trello.workspace.ext_trello_done_task_list_id** - * - `text` in database - * - Nullable, no default - */ - ext_trello_done_task_list_id?: - | string - | db.Parameter - | null - | db.DefaultType - | db.SQLFragment - /** - * **trello.workspace.ext_trello_new_task_list_id** - * - `text` in database - * - Nullable, no default - */ - ext_trello_new_task_list_id?: - | string - | db.Parameter - | null - | db.DefaultType - | db.SQLFragment - /** - * **trello.workspace.id** - * - `int4` in database - * - `NOT NULL`, default: `nextval('trello.workspace_id_seq'::regclass)` - */ - id?: number | db.Parameter | db.DefaultType | db.SQLFragment - /** - * **trello.workspace.organization_id** - * - `int4` in database - * - `NOT NULL`, no default - */ - organization_id: number | db.Parameter | db.SQLFragment - /** - * **trello.workspace.trello_access_token** - * - `text` in database - * - `NOT NULL`, no default - */ - trello_access_token: string | db.Parameter | db.SQLFragment - /** - * **trello.workspace.updated_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - updated_at?: - | (db.TimestampTzString | Date) - | db.Parameter - | db.DefaultType - | db.SQLFragment + * **trello.workspace.created_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + created_at?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | db.DefaultType | db.SQLFragment; + /** + * **trello.workspace.ext_trello_board_id** + * - `text` in database + * - Nullable, no default + */ + ext_trello_board_id?: string | db.Parameter | null | db.DefaultType | db.SQLFragment; + /** + * **trello.workspace.ext_trello_done_task_list_id** + * - `text` in database + * - Nullable, no default + */ + ext_trello_done_task_list_id?: string | db.Parameter | null | db.DefaultType | db.SQLFragment; + /** + * **trello.workspace.ext_trello_new_task_list_id** + * - `text` in database + * - Nullable, no default + */ + ext_trello_new_task_list_id?: string | db.Parameter | null | db.DefaultType | db.SQLFragment; + /** + * **trello.workspace.id** + * - `int4` in database + * - `NOT NULL`, default: `nextval('trello.workspace_id_seq'::regclass)` + */ + id?: number | db.Parameter | db.DefaultType | db.SQLFragment; + /** + * **trello.workspace.organization_id** + * - `int4` in database + * - `NOT NULL`, no default + */ + organization_id: number | db.Parameter | db.SQLFragment; + /** + * **trello.workspace.trello_access_token** + * - `text` in database + * - `NOT NULL`, no default + */ + trello_access_token: string | db.Parameter | db.SQLFragment; + /** + * **trello.workspace.updated_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + updated_at?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | db.DefaultType | db.SQLFragment; } export interface Updatable { /** - * **trello.workspace.created_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - created_at?: - | (db.TimestampTzString | Date) - | db.Parameter - | db.DefaultType - | db.SQLFragment - | db.SQLFragment< - any, - | (db.TimestampTzString | Date) - | db.Parameter - | db.DefaultType - | db.SQLFragment - > - /** - * **trello.workspace.ext_trello_board_id** - * - `text` in database - * - Nullable, no default - */ - ext_trello_board_id?: - | string - | db.Parameter - | null - | db.DefaultType - | db.SQLFragment - | db.SQLFragment< - any, - | string - | db.Parameter - | null - | db.DefaultType - | db.SQLFragment - > - /** - * **trello.workspace.ext_trello_done_task_list_id** - * - `text` in database - * - Nullable, no default - */ - ext_trello_done_task_list_id?: - | string - | db.Parameter - | null - | db.DefaultType - | db.SQLFragment - | db.SQLFragment< - any, - | string - | db.Parameter - | null - | db.DefaultType - | db.SQLFragment - > - /** - * **trello.workspace.ext_trello_new_task_list_id** - * - `text` in database - * - Nullable, no default - */ - ext_trello_new_task_list_id?: - | string - | db.Parameter - | null - | db.DefaultType - | db.SQLFragment - | db.SQLFragment< - any, - | string - | db.Parameter - | null - | db.DefaultType - | db.SQLFragment - > - /** - * **trello.workspace.id** - * - `int4` in database - * - `NOT NULL`, default: `nextval('trello.workspace_id_seq'::regclass)` - */ - id?: - | number - | db.Parameter - | db.DefaultType - | db.SQLFragment - | db.SQLFragment< - any, - number | db.Parameter | db.DefaultType | db.SQLFragment - > - /** - * **trello.workspace.organization_id** - * - `int4` in database - * - `NOT NULL`, no default - */ - organization_id?: - | number - | db.Parameter - | db.SQLFragment - | db.SQLFragment | db.SQLFragment> - /** - * **trello.workspace.trello_access_token** - * - `text` in database - * - `NOT NULL`, no default - */ - trello_access_token?: - | string - | db.Parameter - | db.SQLFragment - | db.SQLFragment | db.SQLFragment> - /** - * **trello.workspace.updated_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - updated_at?: - | (db.TimestampTzString | Date) - | db.Parameter - | db.DefaultType - | db.SQLFragment - | db.SQLFragment< - any, - | (db.TimestampTzString | Date) - | db.Parameter - | db.DefaultType - | db.SQLFragment - > + * **trello.workspace.created_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + created_at?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | db.DefaultType | db.SQLFragment | db.SQLFragment | db.DefaultType | db.SQLFragment>; + /** + * **trello.workspace.ext_trello_board_id** + * - `text` in database + * - Nullable, no default + */ + ext_trello_board_id?: string | db.Parameter | null | db.DefaultType | db.SQLFragment | db.SQLFragment | null | db.DefaultType | db.SQLFragment>; + /** + * **trello.workspace.ext_trello_done_task_list_id** + * - `text` in database + * - Nullable, no default + */ + ext_trello_done_task_list_id?: string | db.Parameter | null | db.DefaultType | db.SQLFragment | db.SQLFragment | null | db.DefaultType | db.SQLFragment>; + /** + * **trello.workspace.ext_trello_new_task_list_id** + * - `text` in database + * - Nullable, no default + */ + ext_trello_new_task_list_id?: string | db.Parameter | null | db.DefaultType | db.SQLFragment | db.SQLFragment | null | db.DefaultType | db.SQLFragment>; + /** + * **trello.workspace.id** + * - `int4` in database + * - `NOT NULL`, default: `nextval('trello.workspace_id_seq'::regclass)` + */ + id?: number | db.Parameter | db.DefaultType | db.SQLFragment | db.SQLFragment | db.DefaultType | db.SQLFragment>; + /** + * **trello.workspace.organization_id** + * - `int4` in database + * - `NOT NULL`, no default + */ + organization_id?: number | db.Parameter | db.SQLFragment | db.SQLFragment | db.SQLFragment>; + /** + * **trello.workspace.trello_access_token** + * - `text` in database + * - `NOT NULL`, no default + */ + trello_access_token?: string | db.Parameter | db.SQLFragment | db.SQLFragment | db.SQLFragment>; + /** + * **trello.workspace.updated_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + updated_at?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | db.DefaultType | db.SQLFragment | db.SQLFragment | db.DefaultType | db.SQLFragment>; } - export type UniqueIndex = - | 'workspace_organization_id_key' - | 'workspace_pkey' - export type Column = keyof Selectable - export type OnlyCols = Pick< - Selectable, - T[number] - > - export type SQLExpression = - | Table - | db.ColumnNames - | db.ColumnValues - | Whereable - | Column - | db.ParentColumn - | db.GenericSQLExpression - export type SQL = SQLExpression | SQLExpression[] + export type UniqueIndex = 'workspace_organization_id_key' | 'workspace_pkey'; + export type Column = keyof Selectable; + export type OnlyCols = Pick; + export type SQLExpression = Table | db.ColumnNames | db.ColumnValues | Whereable | Column | db.ParentColumn | db.GenericSQLExpression; + export type SQL = SQLExpression | SQLExpression[]; } - + /* --- aggregate types --- */ - - export type Table = workspace.Table - export type Selectable = workspace.Selectable - export type JSONSelectable = workspace.JSONSelectable - export type Whereable = workspace.Whereable - export type Insertable = workspace.Insertable - export type Updatable = workspace.Updatable - export type UniqueIndex = workspace.UniqueIndex - export type Column = workspace.Column - - export type AllBaseTables = [workspace.Table] - export type AllForeignTables = [] - export type AllViews = [] - export type AllMaterializedViews = [] - export type AllTablesAndViews = [workspace.Table] + + export type Table = workspace.Table; + export type Selectable = workspace.Selectable; + export type JSONSelectable = workspace.JSONSelectable; + export type Whereable = workspace.Whereable; + export type Insertable = workspace.Insertable; + export type Updatable = workspace.Updatable; + export type UniqueIndex = workspace.UniqueIndex; + export type Column = workspace.Column; + + export type AllBaseTables = [workspace.Table]; + export type AllForeignTables = []; + export type AllViews = []; + export type AllMaterializedViews = []; + export type AllTablesAndViews = [workspace.Table]; } + /* === schema: gitlab === */ export namespace gitlab { + /* --- enums --- */ /* (none) */ - + /* --- tables --- */ - + /** * **gitlab.app_user** * - Table in database */ export namespace app_user { - export type Table = 'gitlab.app_user' + export type Table = 'gitlab.app_user'; export interface Selectable { /** - * **gitlab.app_user.created_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - created_at: Date - /** - * **gitlab.app_user.gitlab_access_token** - * - `text` in database - * - `NOT NULL`, no default - */ - gitlab_access_token: string - /** - * **gitlab.app_user.gitlab_refresh_token** - * - `text` in database - * - `NOT NULL`, no default - */ - gitlab_refresh_token: string - /** - * **gitlab.app_user.gitlab_webhook_secret** - * - `text` in database - * - `NOT NULL`, no default - */ - gitlab_webhook_secret: string - /** - * **gitlab.app_user.id** - * - `int4` in database - * - `NOT NULL`, default: `nextval('gitlab.app_user_id_seq'::regclass)` - */ - id: number - /** - * **gitlab.app_user.organization_id** - * - `int4` in database - * - `NOT NULL`, no default - */ - organization_id: number - /** - * **gitlab.app_user.updated_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - updated_at: Date + * **gitlab.app_user.created_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + created_at: Date; + /** + * **gitlab.app_user.gitlab_access_token** + * - `text` in database + * - `NOT NULL`, no default + */ + gitlab_access_token: string; + /** + * **gitlab.app_user.gitlab_refresh_token** + * - `text` in database + * - `NOT NULL`, no default + */ + gitlab_refresh_token: string; + /** + * **gitlab.app_user.gitlab_webhook_secret** + * - `text` in database + * - `NOT NULL`, no default + */ + gitlab_webhook_secret: string; + /** + * **gitlab.app_user.id** + * - `int4` in database + * - `NOT NULL`, default: `nextval('gitlab.app_user_id_seq'::regclass)` + */ + id: number; + /** + * **gitlab.app_user.organization_id** + * - `int4` in database + * - `NOT NULL`, no default + */ + organization_id: number; + /** + * **gitlab.app_user.updated_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + updated_at: Date; } export interface JSONSelectable { /** - * **gitlab.app_user.created_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - created_at: db.TimestampTzString - /** - * **gitlab.app_user.gitlab_access_token** - * - `text` in database - * - `NOT NULL`, no default - */ - gitlab_access_token: string - /** - * **gitlab.app_user.gitlab_refresh_token** - * - `text` in database - * - `NOT NULL`, no default - */ - gitlab_refresh_token: string - /** - * **gitlab.app_user.gitlab_webhook_secret** - * - `text` in database - * - `NOT NULL`, no default - */ - gitlab_webhook_secret: string - /** - * **gitlab.app_user.id** - * - `int4` in database - * - `NOT NULL`, default: `nextval('gitlab.app_user_id_seq'::regclass)` - */ - id: number - /** - * **gitlab.app_user.organization_id** - * - `int4` in database - * - `NOT NULL`, no default - */ - organization_id: number - /** - * **gitlab.app_user.updated_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - updated_at: db.TimestampTzString + * **gitlab.app_user.created_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + created_at: db.TimestampTzString; + /** + * **gitlab.app_user.gitlab_access_token** + * - `text` in database + * - `NOT NULL`, no default + */ + gitlab_access_token: string; + /** + * **gitlab.app_user.gitlab_refresh_token** + * - `text` in database + * - `NOT NULL`, no default + */ + gitlab_refresh_token: string; + /** + * **gitlab.app_user.gitlab_webhook_secret** + * - `text` in database + * - `NOT NULL`, no default + */ + gitlab_webhook_secret: string; + /** + * **gitlab.app_user.id** + * - `int4` in database + * - `NOT NULL`, default: `nextval('gitlab.app_user_id_seq'::regclass)` + */ + id: number; + /** + * **gitlab.app_user.organization_id** + * - `int4` in database + * - `NOT NULL`, no default + */ + organization_id: number; + /** + * **gitlab.app_user.updated_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + updated_at: db.TimestampTzString; } export interface Whereable { /** - * **gitlab.app_user.created_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - created_at?: - | (db.TimestampTzString | Date) - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - | (db.TimestampTzString | Date) - | db.Parameter - | db.SQLFragment - | db.ParentColumn - > - /** - * **gitlab.app_user.gitlab_access_token** - * - `text` in database - * - `NOT NULL`, no default - */ - gitlab_access_token?: - | string - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - string | db.Parameter | db.SQLFragment | db.ParentColumn - > - /** - * **gitlab.app_user.gitlab_refresh_token** - * - `text` in database - * - `NOT NULL`, no default - */ - gitlab_refresh_token?: - | string - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - string | db.Parameter | db.SQLFragment | db.ParentColumn - > - /** - * **gitlab.app_user.gitlab_webhook_secret** - * - `text` in database - * - `NOT NULL`, no default - */ - gitlab_webhook_secret?: - | string - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - string | db.Parameter | db.SQLFragment | db.ParentColumn - > - /** - * **gitlab.app_user.id** - * - `int4` in database - * - `NOT NULL`, default: `nextval('gitlab.app_user_id_seq'::regclass)` - */ - id?: - | number - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - number | db.Parameter | db.SQLFragment | db.ParentColumn - > - /** - * **gitlab.app_user.organization_id** - * - `int4` in database - * - `NOT NULL`, no default - */ - organization_id?: - | number - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - number | db.Parameter | db.SQLFragment | db.ParentColumn - > - /** - * **gitlab.app_user.updated_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - updated_at?: - | (db.TimestampTzString | Date) - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - | (db.TimestampTzString | Date) - | db.Parameter - | db.SQLFragment - | db.ParentColumn - > + * **gitlab.app_user.created_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + created_at?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **gitlab.app_user.gitlab_access_token** + * - `text` in database + * - `NOT NULL`, no default + */ + gitlab_access_token?: string | db.Parameter | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **gitlab.app_user.gitlab_refresh_token** + * - `text` in database + * - `NOT NULL`, no default + */ + gitlab_refresh_token?: string | db.Parameter | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **gitlab.app_user.gitlab_webhook_secret** + * - `text` in database + * - `NOT NULL`, no default + */ + gitlab_webhook_secret?: string | db.Parameter | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **gitlab.app_user.id** + * - `int4` in database + * - `NOT NULL`, default: `nextval('gitlab.app_user_id_seq'::regclass)` + */ + id?: number | db.Parameter | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **gitlab.app_user.organization_id** + * - `int4` in database + * - `NOT NULL`, no default + */ + organization_id?: number | db.Parameter | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **gitlab.app_user.updated_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + updated_at?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; } export interface Insertable { /** - * **gitlab.app_user.created_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - created_at?: - | (db.TimestampTzString | Date) - | db.Parameter - | db.DefaultType - | db.SQLFragment - /** - * **gitlab.app_user.gitlab_access_token** - * - `text` in database - * - `NOT NULL`, no default - */ - gitlab_access_token: string | db.Parameter | db.SQLFragment - /** - * **gitlab.app_user.gitlab_refresh_token** - * - `text` in database - * - `NOT NULL`, no default - */ - gitlab_refresh_token: string | db.Parameter | db.SQLFragment - /** - * **gitlab.app_user.gitlab_webhook_secret** - * - `text` in database - * - `NOT NULL`, no default - */ - gitlab_webhook_secret: string | db.Parameter | db.SQLFragment - /** - * **gitlab.app_user.id** - * - `int4` in database - * - `NOT NULL`, default: `nextval('gitlab.app_user_id_seq'::regclass)` - */ - id?: number | db.Parameter | db.DefaultType | db.SQLFragment - /** - * **gitlab.app_user.organization_id** - * - `int4` in database - * - `NOT NULL`, no default - */ - organization_id: number | db.Parameter | db.SQLFragment - /** - * **gitlab.app_user.updated_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - updated_at?: - | (db.TimestampTzString | Date) - | db.Parameter - | db.DefaultType - | db.SQLFragment + * **gitlab.app_user.created_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + created_at?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | db.DefaultType | db.SQLFragment; + /** + * **gitlab.app_user.gitlab_access_token** + * - `text` in database + * - `NOT NULL`, no default + */ + gitlab_access_token: string | db.Parameter | db.SQLFragment; + /** + * **gitlab.app_user.gitlab_refresh_token** + * - `text` in database + * - `NOT NULL`, no default + */ + gitlab_refresh_token: string | db.Parameter | db.SQLFragment; + /** + * **gitlab.app_user.gitlab_webhook_secret** + * - `text` in database + * - `NOT NULL`, no default + */ + gitlab_webhook_secret: string | db.Parameter | db.SQLFragment; + /** + * **gitlab.app_user.id** + * - `int4` in database + * - `NOT NULL`, default: `nextval('gitlab.app_user_id_seq'::regclass)` + */ + id?: number | db.Parameter | db.DefaultType | db.SQLFragment; + /** + * **gitlab.app_user.organization_id** + * - `int4` in database + * - `NOT NULL`, no default + */ + organization_id: number | db.Parameter | db.SQLFragment; + /** + * **gitlab.app_user.updated_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + updated_at?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | db.DefaultType | db.SQLFragment; } export interface Updatable { /** - * **gitlab.app_user.created_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - created_at?: - | (db.TimestampTzString | Date) - | db.Parameter - | db.DefaultType - | db.SQLFragment - | db.SQLFragment< - any, - | (db.TimestampTzString | Date) - | db.Parameter - | db.DefaultType - | db.SQLFragment - > - /** - * **gitlab.app_user.gitlab_access_token** - * - `text` in database - * - `NOT NULL`, no default - */ - gitlab_access_token?: - | string - | db.Parameter - | db.SQLFragment - | db.SQLFragment | db.SQLFragment> - /** - * **gitlab.app_user.gitlab_refresh_token** - * - `text` in database - * - `NOT NULL`, no default - */ - gitlab_refresh_token?: - | string - | db.Parameter - | db.SQLFragment - | db.SQLFragment | db.SQLFragment> - /** - * **gitlab.app_user.gitlab_webhook_secret** - * - `text` in database - * - `NOT NULL`, no default - */ - gitlab_webhook_secret?: - | string - | db.Parameter - | db.SQLFragment - | db.SQLFragment | db.SQLFragment> - /** - * **gitlab.app_user.id** - * - `int4` in database - * - `NOT NULL`, default: `nextval('gitlab.app_user_id_seq'::regclass)` - */ - id?: - | number - | db.Parameter - | db.DefaultType - | db.SQLFragment - | db.SQLFragment< - any, - number | db.Parameter | db.DefaultType | db.SQLFragment - > - /** - * **gitlab.app_user.organization_id** - * - `int4` in database - * - `NOT NULL`, no default - */ - organization_id?: - | number - | db.Parameter - | db.SQLFragment - | db.SQLFragment | db.SQLFragment> - /** - * **gitlab.app_user.updated_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - updated_at?: - | (db.TimestampTzString | Date) - | db.Parameter - | db.DefaultType - | db.SQLFragment - | db.SQLFragment< - any, - | (db.TimestampTzString | Date) - | db.Parameter - | db.DefaultType - | db.SQLFragment - > + * **gitlab.app_user.created_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + created_at?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | db.DefaultType | db.SQLFragment | db.SQLFragment | db.DefaultType | db.SQLFragment>; + /** + * **gitlab.app_user.gitlab_access_token** + * - `text` in database + * - `NOT NULL`, no default + */ + gitlab_access_token?: string | db.Parameter | db.SQLFragment | db.SQLFragment | db.SQLFragment>; + /** + * **gitlab.app_user.gitlab_refresh_token** + * - `text` in database + * - `NOT NULL`, no default + */ + gitlab_refresh_token?: string | db.Parameter | db.SQLFragment | db.SQLFragment | db.SQLFragment>; + /** + * **gitlab.app_user.gitlab_webhook_secret** + * - `text` in database + * - `NOT NULL`, no default + */ + gitlab_webhook_secret?: string | db.Parameter | db.SQLFragment | db.SQLFragment | db.SQLFragment>; + /** + * **gitlab.app_user.id** + * - `int4` in database + * - `NOT NULL`, default: `nextval('gitlab.app_user_id_seq'::regclass)` + */ + id?: number | db.Parameter | db.DefaultType | db.SQLFragment | db.SQLFragment | db.DefaultType | db.SQLFragment>; + /** + * **gitlab.app_user.organization_id** + * - `int4` in database + * - `NOT NULL`, no default + */ + organization_id?: number | db.Parameter | db.SQLFragment | db.SQLFragment | db.SQLFragment>; + /** + * **gitlab.app_user.updated_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + updated_at?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | db.DefaultType | db.SQLFragment | db.SQLFragment | db.DefaultType | db.SQLFragment>; } - export type UniqueIndex = 'app_user_organization_id_key' | 'app_user_pkey' - export type Column = keyof Selectable - export type OnlyCols = Pick< - Selectable, - T[number] - > - export type SQLExpression = - | Table - | db.ColumnNames - | db.ColumnValues - | Whereable - | Column - | db.ParentColumn - | db.GenericSQLExpression - export type SQL = SQLExpression | SQLExpression[] + export type UniqueIndex = 'app_user_organization_id_key' | 'app_user_pkey'; + export type Column = keyof Selectable; + export type OnlyCols = Pick; + export type SQLExpression = Table | db.ColumnNames | db.ColumnValues | Whereable | Column | db.ParentColumn | db.GenericSQLExpression; + export type SQL = SQLExpression | SQLExpression[]; } - + /** * **gitlab.project** * - Table in database */ export namespace project { - export type Table = 'gitlab.project' + export type Table = 'gitlab.project'; export interface Selectable { /** - * **gitlab.project.created_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - created_at: Date - /** - * **gitlab.project.enabled** - * - `bool` in database - * - `NOT NULL`, default: `false` - */ - enabled: boolean - /** - * **gitlab.project.ext_gitlab_project_id** - * - `int4` in database - * - `NOT NULL`, no default - */ - ext_gitlab_project_id: number - /** - * **gitlab.project.has_completed_setup** - * - `bool` in database - * - `NOT NULL`, default: `false` - */ - has_completed_setup: boolean - /** - * **gitlab.project.id** - * - `int4` in database - * - `NOT NULL`, default: `nextval('gitlab.project_id_seq'::regclass)` - */ - id: number - /** - * **gitlab.project.name** - * - `text` in database - * - `NOT NULL`, no default - */ - name: string - /** - * **gitlab.project.organization_id** - * - `int4` in database - * - `NOT NULL`, no default - */ - organization_id: number - /** - * **gitlab.project.updated_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - updated_at: Date - /** - * **gitlab.project.web_url** - * - `text` in database - * - `NOT NULL`, no default - */ - web_url: string + * **gitlab.project.created_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + created_at: Date; + /** + * **gitlab.project.enabled** + * - `bool` in database + * - `NOT NULL`, default: `false` + */ + enabled: boolean; + /** + * **gitlab.project.ext_gitlab_project_id** + * - `int4` in database + * - `NOT NULL`, no default + */ + ext_gitlab_project_id: number; + /** + * **gitlab.project.has_completed_setup** + * - `bool` in database + * - `NOT NULL`, default: `false` + */ + has_completed_setup: boolean; + /** + * **gitlab.project.id** + * - `int4` in database + * - `NOT NULL`, default: `nextval('gitlab.project_id_seq'::regclass)` + */ + id: number; + /** + * **gitlab.project.name** + * - `text` in database + * - `NOT NULL`, no default + */ + name: string; + /** + * **gitlab.project.organization_id** + * - `int4` in database + * - `NOT NULL`, no default + */ + organization_id: number; + /** + * **gitlab.project.updated_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + updated_at: Date; + /** + * **gitlab.project.web_url** + * - `text` in database + * - `NOT NULL`, no default + */ + web_url: string; } export interface JSONSelectable { /** - * **gitlab.project.created_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - created_at: db.TimestampTzString - /** - * **gitlab.project.enabled** - * - `bool` in database - * - `NOT NULL`, default: `false` - */ - enabled: boolean - /** - * **gitlab.project.ext_gitlab_project_id** - * - `int4` in database - * - `NOT NULL`, no default - */ - ext_gitlab_project_id: number - /** - * **gitlab.project.has_completed_setup** - * - `bool` in database - * - `NOT NULL`, default: `false` - */ - has_completed_setup: boolean - /** - * **gitlab.project.id** - * - `int4` in database - * - `NOT NULL`, default: `nextval('gitlab.project_id_seq'::regclass)` - */ - id: number - /** - * **gitlab.project.name** - * - `text` in database - * - `NOT NULL`, no default - */ - name: string - /** - * **gitlab.project.organization_id** - * - `int4` in database - * - `NOT NULL`, no default - */ - organization_id: number - /** - * **gitlab.project.updated_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - updated_at: db.TimestampTzString - /** - * **gitlab.project.web_url** - * - `text` in database - * - `NOT NULL`, no default - */ - web_url: string + * **gitlab.project.created_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + created_at: db.TimestampTzString; + /** + * **gitlab.project.enabled** + * - `bool` in database + * - `NOT NULL`, default: `false` + */ + enabled: boolean; + /** + * **gitlab.project.ext_gitlab_project_id** + * - `int4` in database + * - `NOT NULL`, no default + */ + ext_gitlab_project_id: number; + /** + * **gitlab.project.has_completed_setup** + * - `bool` in database + * - `NOT NULL`, default: `false` + */ + has_completed_setup: boolean; + /** + * **gitlab.project.id** + * - `int4` in database + * - `NOT NULL`, default: `nextval('gitlab.project_id_seq'::regclass)` + */ + id: number; + /** + * **gitlab.project.name** + * - `text` in database + * - `NOT NULL`, no default + */ + name: string; + /** + * **gitlab.project.organization_id** + * - `int4` in database + * - `NOT NULL`, no default + */ + organization_id: number; + /** + * **gitlab.project.updated_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + updated_at: db.TimestampTzString; + /** + * **gitlab.project.web_url** + * - `text` in database + * - `NOT NULL`, no default + */ + web_url: string; } export interface Whereable { /** - * **gitlab.project.created_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - created_at?: - | (db.TimestampTzString | Date) - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - | (db.TimestampTzString | Date) - | db.Parameter - | db.SQLFragment - | db.ParentColumn - > - /** - * **gitlab.project.enabled** - * - `bool` in database - * - `NOT NULL`, default: `false` - */ - enabled?: - | boolean - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - boolean | db.Parameter | db.SQLFragment | db.ParentColumn - > - /** - * **gitlab.project.ext_gitlab_project_id** - * - `int4` in database - * - `NOT NULL`, no default - */ - ext_gitlab_project_id?: - | number - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - number | db.Parameter | db.SQLFragment | db.ParentColumn - > - /** - * **gitlab.project.has_completed_setup** - * - `bool` in database - * - `NOT NULL`, default: `false` - */ - has_completed_setup?: - | boolean - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - boolean | db.Parameter | db.SQLFragment | db.ParentColumn - > - /** - * **gitlab.project.id** - * - `int4` in database - * - `NOT NULL`, default: `nextval('gitlab.project_id_seq'::regclass)` - */ - id?: - | number - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - number | db.Parameter | db.SQLFragment | db.ParentColumn - > - /** - * **gitlab.project.name** - * - `text` in database - * - `NOT NULL`, no default - */ - name?: - | string - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - string | db.Parameter | db.SQLFragment | db.ParentColumn - > - /** - * **gitlab.project.organization_id** - * - `int4` in database - * - `NOT NULL`, no default - */ - organization_id?: - | number - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - number | db.Parameter | db.SQLFragment | db.ParentColumn - > - /** - * **gitlab.project.updated_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - updated_at?: - | (db.TimestampTzString | Date) - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - | (db.TimestampTzString | Date) - | db.Parameter - | db.SQLFragment - | db.ParentColumn - > - /** - * **gitlab.project.web_url** - * - `text` in database - * - `NOT NULL`, no default - */ - web_url?: - | string - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - string | db.Parameter | db.SQLFragment | db.ParentColumn - > + * **gitlab.project.created_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + created_at?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **gitlab.project.enabled** + * - `bool` in database + * - `NOT NULL`, default: `false` + */ + enabled?: boolean | db.Parameter | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **gitlab.project.ext_gitlab_project_id** + * - `int4` in database + * - `NOT NULL`, no default + */ + ext_gitlab_project_id?: number | db.Parameter | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **gitlab.project.has_completed_setup** + * - `bool` in database + * - `NOT NULL`, default: `false` + */ + has_completed_setup?: boolean | db.Parameter | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **gitlab.project.id** + * - `int4` in database + * - `NOT NULL`, default: `nextval('gitlab.project_id_seq'::regclass)` + */ + id?: number | db.Parameter | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **gitlab.project.name** + * - `text` in database + * - `NOT NULL`, no default + */ + name?: string | db.Parameter | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **gitlab.project.organization_id** + * - `int4` in database + * - `NOT NULL`, no default + */ + organization_id?: number | db.Parameter | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **gitlab.project.updated_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + updated_at?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **gitlab.project.web_url** + * - `text` in database + * - `NOT NULL`, no default + */ + web_url?: string | db.Parameter | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; } export interface Insertable { /** - * **gitlab.project.created_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - created_at?: - | (db.TimestampTzString | Date) - | db.Parameter - | db.DefaultType - | db.SQLFragment - /** - * **gitlab.project.enabled** - * - `bool` in database - * - `NOT NULL`, default: `false` - */ - enabled?: - | boolean - | db.Parameter - | db.DefaultType - | db.SQLFragment - /** - * **gitlab.project.ext_gitlab_project_id** - * - `int4` in database - * - `NOT NULL`, no default - */ - ext_gitlab_project_id: number | db.Parameter | db.SQLFragment - /** - * **gitlab.project.has_completed_setup** - * - `bool` in database - * - `NOT NULL`, default: `false` - */ - has_completed_setup?: - | boolean - | db.Parameter - | db.DefaultType - | db.SQLFragment - /** - * **gitlab.project.id** - * - `int4` in database - * - `NOT NULL`, default: `nextval('gitlab.project_id_seq'::regclass)` - */ - id?: number | db.Parameter | db.DefaultType | db.SQLFragment - /** - * **gitlab.project.name** - * - `text` in database - * - `NOT NULL`, no default - */ - name: string | db.Parameter | db.SQLFragment - /** - * **gitlab.project.organization_id** - * - `int4` in database - * - `NOT NULL`, no default - */ - organization_id: number | db.Parameter | db.SQLFragment - /** - * **gitlab.project.updated_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - updated_at?: - | (db.TimestampTzString | Date) - | db.Parameter - | db.DefaultType - | db.SQLFragment - /** - * **gitlab.project.web_url** - * - `text` in database - * - `NOT NULL`, no default - */ - web_url: string | db.Parameter | db.SQLFragment + * **gitlab.project.created_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + created_at?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | db.DefaultType | db.SQLFragment; + /** + * **gitlab.project.enabled** + * - `bool` in database + * - `NOT NULL`, default: `false` + */ + enabled?: boolean | db.Parameter | db.DefaultType | db.SQLFragment; + /** + * **gitlab.project.ext_gitlab_project_id** + * - `int4` in database + * - `NOT NULL`, no default + */ + ext_gitlab_project_id: number | db.Parameter | db.SQLFragment; + /** + * **gitlab.project.has_completed_setup** + * - `bool` in database + * - `NOT NULL`, default: `false` + */ + has_completed_setup?: boolean | db.Parameter | db.DefaultType | db.SQLFragment; + /** + * **gitlab.project.id** + * - `int4` in database + * - `NOT NULL`, default: `nextval('gitlab.project_id_seq'::regclass)` + */ + id?: number | db.Parameter | db.DefaultType | db.SQLFragment; + /** + * **gitlab.project.name** + * - `text` in database + * - `NOT NULL`, no default + */ + name: string | db.Parameter | db.SQLFragment; + /** + * **gitlab.project.organization_id** + * - `int4` in database + * - `NOT NULL`, no default + */ + organization_id: number | db.Parameter | db.SQLFragment; + /** + * **gitlab.project.updated_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + updated_at?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | db.DefaultType | db.SQLFragment; + /** + * **gitlab.project.web_url** + * - `text` in database + * - `NOT NULL`, no default + */ + web_url: string | db.Parameter | db.SQLFragment; } export interface Updatable { /** - * **gitlab.project.created_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - created_at?: - | (db.TimestampTzString | Date) - | db.Parameter - | db.DefaultType - | db.SQLFragment - | db.SQLFragment< - any, - | (db.TimestampTzString | Date) - | db.Parameter - | db.DefaultType - | db.SQLFragment - > - /** - * **gitlab.project.enabled** - * - `bool` in database - * - `NOT NULL`, default: `false` - */ - enabled?: - | boolean - | db.Parameter - | db.DefaultType - | db.SQLFragment - | db.SQLFragment< - any, - boolean | db.Parameter | db.DefaultType | db.SQLFragment - > - /** - * **gitlab.project.ext_gitlab_project_id** - * - `int4` in database - * - `NOT NULL`, no default - */ - ext_gitlab_project_id?: - | number - | db.Parameter - | db.SQLFragment - | db.SQLFragment | db.SQLFragment> - /** - * **gitlab.project.has_completed_setup** - * - `bool` in database - * - `NOT NULL`, default: `false` - */ - has_completed_setup?: - | boolean - | db.Parameter - | db.DefaultType - | db.SQLFragment - | db.SQLFragment< - any, - boolean | db.Parameter | db.DefaultType | db.SQLFragment - > - /** - * **gitlab.project.id** - * - `int4` in database - * - `NOT NULL`, default: `nextval('gitlab.project_id_seq'::regclass)` - */ - id?: - | number - | db.Parameter - | db.DefaultType - | db.SQLFragment - | db.SQLFragment< - any, - number | db.Parameter | db.DefaultType | db.SQLFragment - > - /** - * **gitlab.project.name** - * - `text` in database - * - `NOT NULL`, no default - */ - name?: - | string - | db.Parameter - | db.SQLFragment - | db.SQLFragment | db.SQLFragment> - /** - * **gitlab.project.organization_id** - * - `int4` in database - * - `NOT NULL`, no default - */ - organization_id?: - | number - | db.Parameter - | db.SQLFragment - | db.SQLFragment | db.SQLFragment> - /** - * **gitlab.project.updated_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - updated_at?: - | (db.TimestampTzString | Date) - | db.Parameter - | db.DefaultType - | db.SQLFragment - | db.SQLFragment< - any, - | (db.TimestampTzString | Date) - | db.Parameter - | db.DefaultType - | db.SQLFragment - > - /** - * **gitlab.project.web_url** - * - `text` in database - * - `NOT NULL`, no default - */ - web_url?: - | string - | db.Parameter - | db.SQLFragment - | db.SQLFragment | db.SQLFragment> + * **gitlab.project.created_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + created_at?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | db.DefaultType | db.SQLFragment | db.SQLFragment | db.DefaultType | db.SQLFragment>; + /** + * **gitlab.project.enabled** + * - `bool` in database + * - `NOT NULL`, default: `false` + */ + enabled?: boolean | db.Parameter | db.DefaultType | db.SQLFragment | db.SQLFragment | db.DefaultType | db.SQLFragment>; + /** + * **gitlab.project.ext_gitlab_project_id** + * - `int4` in database + * - `NOT NULL`, no default + */ + ext_gitlab_project_id?: number | db.Parameter | db.SQLFragment | db.SQLFragment | db.SQLFragment>; + /** + * **gitlab.project.has_completed_setup** + * - `bool` in database + * - `NOT NULL`, default: `false` + */ + has_completed_setup?: boolean | db.Parameter | db.DefaultType | db.SQLFragment | db.SQLFragment | db.DefaultType | db.SQLFragment>; + /** + * **gitlab.project.id** + * - `int4` in database + * - `NOT NULL`, default: `nextval('gitlab.project_id_seq'::regclass)` + */ + id?: number | db.Parameter | db.DefaultType | db.SQLFragment | db.SQLFragment | db.DefaultType | db.SQLFragment>; + /** + * **gitlab.project.name** + * - `text` in database + * - `NOT NULL`, no default + */ + name?: string | db.Parameter | db.SQLFragment | db.SQLFragment | db.SQLFragment>; + /** + * **gitlab.project.organization_id** + * - `int4` in database + * - `NOT NULL`, no default + */ + organization_id?: number | db.Parameter | db.SQLFragment | db.SQLFragment | db.SQLFragment>; + /** + * **gitlab.project.updated_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + updated_at?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | db.DefaultType | db.SQLFragment | db.SQLFragment | db.DefaultType | db.SQLFragment>; + /** + * **gitlab.project.web_url** + * - `text` in database + * - `NOT NULL`, no default + */ + web_url?: string | db.Parameter | db.SQLFragment | db.SQLFragment | db.SQLFragment>; } - export type UniqueIndex = - | 'project_ext_gitlab_project_id_key' - | 'project_pkey' - export type Column = keyof Selectable - export type OnlyCols = Pick< - Selectable, - T[number] - > - export type SQLExpression = - | Table - | db.ColumnNames - | db.ColumnValues - | Whereable - | Column - | db.ParentColumn - | db.GenericSQLExpression - export type SQL = SQLExpression | SQLExpression[] + export type UniqueIndex = 'project_ext_gitlab_project_id_key' | 'project_pkey'; + export type Column = keyof Selectable; + export type OnlyCols = Pick; + export type SQLExpression = Table | db.ColumnNames | db.ColumnValues | Whereable | Column | db.ParentColumn | db.GenericSQLExpression; + export type SQL = SQLExpression | SQLExpression[]; } - + /* --- aggregate types --- */ - - export type Table = app_user.Table | project.Table - export type Selectable = app_user.Selectable | project.Selectable - export type JSONSelectable = - | app_user.JSONSelectable - | project.JSONSelectable - export type Whereable = app_user.Whereable | project.Whereable - export type Insertable = app_user.Insertable | project.Insertable - export type Updatable = app_user.Updatable | project.Updatable - export type UniqueIndex = app_user.UniqueIndex | project.UniqueIndex - export type Column = app_user.Column | project.Column - - export type AllBaseTables = [app_user.Table, project.Table] - export type AllForeignTables = [] - export type AllViews = [] - export type AllMaterializedViews = [] - export type AllTablesAndViews = [app_user.Table, project.Table] + + export type Table = app_user.Table | project.Table; + export type Selectable = app_user.Selectable | project.Selectable; + export type JSONSelectable = app_user.JSONSelectable | project.JSONSelectable; + export type Whereable = app_user.Whereable | project.Whereable; + export type Insertable = app_user.Insertable | project.Insertable; + export type Updatable = app_user.Updatable | project.Updatable; + export type UniqueIndex = app_user.UniqueIndex | project.UniqueIndex; + export type Column = app_user.Column | project.Column; + + export type AllBaseTables = [app_user.Table, project.Table]; + export type AllForeignTables = []; + export type AllViews = []; + export type AllMaterializedViews = []; + export type AllTablesAndViews = [app_user.Table, project.Table]; } + /* === schema: asana === */ export namespace asana { + /* --- enums --- */ /* (none) */ - + /* --- tables --- */ - + /** * **asana.app_user** * - Table in database */ export namespace app_user { - export type Table = 'asana.app_user' + export type Table = 'asana.app_user'; export interface Selectable { /** - * **asana.app_user.asana_access_token** - * - `text` in database - * - `NOT NULL`, no default - */ - asana_access_token: string - /** - * **asana.app_user.asana_refresh_token** - * - `text` in database - * - `NOT NULL`, no default - */ - asana_refresh_token: string - /** - * **asana.app_user.created_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - created_at: Date - /** - * **asana.app_user.id** - * - `int4` in database - * - `NOT NULL`, default: `nextval('asana.app_user_id_seq'::regclass)` - */ - id: number - /** - * **asana.app_user.organization_id** - * - `int4` in database - * - `NOT NULL`, no default - */ - organization_id: number - /** - * **asana.app_user.updated_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - updated_at: Date + * **asana.app_user.asana_access_token** + * - `text` in database + * - `NOT NULL`, no default + */ + asana_access_token: string; + /** + * **asana.app_user.asana_refresh_token** + * - `text` in database + * - `NOT NULL`, no default + */ + asana_refresh_token: string; + /** + * **asana.app_user.created_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + created_at: Date; + /** + * **asana.app_user.id** + * - `int4` in database + * - `NOT NULL`, default: `nextval('asana.app_user_id_seq'::regclass)` + */ + id: number; + /** + * **asana.app_user.organization_id** + * - `int4` in database + * - `NOT NULL`, no default + */ + organization_id: number; + /** + * **asana.app_user.updated_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + updated_at: Date; } export interface JSONSelectable { /** - * **asana.app_user.asana_access_token** - * - `text` in database - * - `NOT NULL`, no default - */ - asana_access_token: string - /** - * **asana.app_user.asana_refresh_token** - * - `text` in database - * - `NOT NULL`, no default - */ - asana_refresh_token: string - /** - * **asana.app_user.created_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - created_at: db.TimestampTzString - /** - * **asana.app_user.id** - * - `int4` in database - * - `NOT NULL`, default: `nextval('asana.app_user_id_seq'::regclass)` - */ - id: number - /** - * **asana.app_user.organization_id** - * - `int4` in database - * - `NOT NULL`, no default - */ - organization_id: number - /** - * **asana.app_user.updated_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - updated_at: db.TimestampTzString + * **asana.app_user.asana_access_token** + * - `text` in database + * - `NOT NULL`, no default + */ + asana_access_token: string; + /** + * **asana.app_user.asana_refresh_token** + * - `text` in database + * - `NOT NULL`, no default + */ + asana_refresh_token: string; + /** + * **asana.app_user.created_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + created_at: db.TimestampTzString; + /** + * **asana.app_user.id** + * - `int4` in database + * - `NOT NULL`, default: `nextval('asana.app_user_id_seq'::regclass)` + */ + id: number; + /** + * **asana.app_user.organization_id** + * - `int4` in database + * - `NOT NULL`, no default + */ + organization_id: number; + /** + * **asana.app_user.updated_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + updated_at: db.TimestampTzString; } export interface Whereable { /** - * **asana.app_user.asana_access_token** - * - `text` in database - * - `NOT NULL`, no default - */ - asana_access_token?: - | string - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - string | db.Parameter | db.SQLFragment | db.ParentColumn - > - /** - * **asana.app_user.asana_refresh_token** - * - `text` in database - * - `NOT NULL`, no default - */ - asana_refresh_token?: - | string - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - string | db.Parameter | db.SQLFragment | db.ParentColumn - > - /** - * **asana.app_user.created_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - created_at?: - | (db.TimestampTzString | Date) - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - | (db.TimestampTzString | Date) - | db.Parameter - | db.SQLFragment - | db.ParentColumn - > - /** - * **asana.app_user.id** - * - `int4` in database - * - `NOT NULL`, default: `nextval('asana.app_user_id_seq'::regclass)` - */ - id?: - | number - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - number | db.Parameter | db.SQLFragment | db.ParentColumn - > - /** - * **asana.app_user.organization_id** - * - `int4` in database - * - `NOT NULL`, no default - */ - organization_id?: - | number - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - number | db.Parameter | db.SQLFragment | db.ParentColumn - > - /** - * **asana.app_user.updated_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - updated_at?: - | (db.TimestampTzString | Date) - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - | (db.TimestampTzString | Date) - | db.Parameter - | db.SQLFragment - | db.ParentColumn - > + * **asana.app_user.asana_access_token** + * - `text` in database + * - `NOT NULL`, no default + */ + asana_access_token?: string | db.Parameter | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **asana.app_user.asana_refresh_token** + * - `text` in database + * - `NOT NULL`, no default + */ + asana_refresh_token?: string | db.Parameter | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **asana.app_user.created_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + created_at?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **asana.app_user.id** + * - `int4` in database + * - `NOT NULL`, default: `nextval('asana.app_user_id_seq'::regclass)` + */ + id?: number | db.Parameter | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **asana.app_user.organization_id** + * - `int4` in database + * - `NOT NULL`, no default + */ + organization_id?: number | db.Parameter | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **asana.app_user.updated_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + updated_at?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; } export interface Insertable { /** - * **asana.app_user.asana_access_token** - * - `text` in database - * - `NOT NULL`, no default - */ - asana_access_token: string | db.Parameter | db.SQLFragment - /** - * **asana.app_user.asana_refresh_token** - * - `text` in database - * - `NOT NULL`, no default - */ - asana_refresh_token: string | db.Parameter | db.SQLFragment - /** - * **asana.app_user.created_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - created_at?: - | (db.TimestampTzString | Date) - | db.Parameter - | db.DefaultType - | db.SQLFragment - /** - * **asana.app_user.id** - * - `int4` in database - * - `NOT NULL`, default: `nextval('asana.app_user_id_seq'::regclass)` - */ - id?: number | db.Parameter | db.DefaultType | db.SQLFragment - /** - * **asana.app_user.organization_id** - * - `int4` in database - * - `NOT NULL`, no default - */ - organization_id: number | db.Parameter | db.SQLFragment - /** - * **asana.app_user.updated_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - updated_at?: - | (db.TimestampTzString | Date) - | db.Parameter - | db.DefaultType - | db.SQLFragment + * **asana.app_user.asana_access_token** + * - `text` in database + * - `NOT NULL`, no default + */ + asana_access_token: string | db.Parameter | db.SQLFragment; + /** + * **asana.app_user.asana_refresh_token** + * - `text` in database + * - `NOT NULL`, no default + */ + asana_refresh_token: string | db.Parameter | db.SQLFragment; + /** + * **asana.app_user.created_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + created_at?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | db.DefaultType | db.SQLFragment; + /** + * **asana.app_user.id** + * - `int4` in database + * - `NOT NULL`, default: `nextval('asana.app_user_id_seq'::regclass)` + */ + id?: number | db.Parameter | db.DefaultType | db.SQLFragment; + /** + * **asana.app_user.organization_id** + * - `int4` in database + * - `NOT NULL`, no default + */ + organization_id: number | db.Parameter | db.SQLFragment; + /** + * **asana.app_user.updated_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + updated_at?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | db.DefaultType | db.SQLFragment; } export interface Updatable { /** - * **asana.app_user.asana_access_token** - * - `text` in database - * - `NOT NULL`, no default - */ - asana_access_token?: - | string - | db.Parameter - | db.SQLFragment - | db.SQLFragment | db.SQLFragment> - /** - * **asana.app_user.asana_refresh_token** - * - `text` in database - * - `NOT NULL`, no default - */ - asana_refresh_token?: - | string - | db.Parameter - | db.SQLFragment - | db.SQLFragment | db.SQLFragment> - /** - * **asana.app_user.created_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - created_at?: - | (db.TimestampTzString | Date) - | db.Parameter - | db.DefaultType - | db.SQLFragment - | db.SQLFragment< - any, - | (db.TimestampTzString | Date) - | db.Parameter - | db.DefaultType - | db.SQLFragment - > - /** - * **asana.app_user.id** - * - `int4` in database - * - `NOT NULL`, default: `nextval('asana.app_user_id_seq'::regclass)` - */ - id?: - | number - | db.Parameter - | db.DefaultType - | db.SQLFragment - | db.SQLFragment< - any, - number | db.Parameter | db.DefaultType | db.SQLFragment - > - /** - * **asana.app_user.organization_id** - * - `int4` in database - * - `NOT NULL`, no default - */ - organization_id?: - | number - | db.Parameter - | db.SQLFragment - | db.SQLFragment | db.SQLFragment> - /** - * **asana.app_user.updated_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - updated_at?: - | (db.TimestampTzString | Date) - | db.Parameter - | db.DefaultType - | db.SQLFragment - | db.SQLFragment< - any, - | (db.TimestampTzString | Date) - | db.Parameter - | db.DefaultType - | db.SQLFragment - > + * **asana.app_user.asana_access_token** + * - `text` in database + * - `NOT NULL`, no default + */ + asana_access_token?: string | db.Parameter | db.SQLFragment | db.SQLFragment | db.SQLFragment>; + /** + * **asana.app_user.asana_refresh_token** + * - `text` in database + * - `NOT NULL`, no default + */ + asana_refresh_token?: string | db.Parameter | db.SQLFragment | db.SQLFragment | db.SQLFragment>; + /** + * **asana.app_user.created_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + created_at?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | db.DefaultType | db.SQLFragment | db.SQLFragment | db.DefaultType | db.SQLFragment>; + /** + * **asana.app_user.id** + * - `int4` in database + * - `NOT NULL`, default: `nextval('asana.app_user_id_seq'::regclass)` + */ + id?: number | db.Parameter | db.DefaultType | db.SQLFragment | db.SQLFragment | db.DefaultType | db.SQLFragment>; + /** + * **asana.app_user.organization_id** + * - `int4` in database + * - `NOT NULL`, no default + */ + organization_id?: number | db.Parameter | db.SQLFragment | db.SQLFragment | db.SQLFragment>; + /** + * **asana.app_user.updated_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + updated_at?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | db.DefaultType | db.SQLFragment | db.SQLFragment | db.DefaultType | db.SQLFragment>; } - export type UniqueIndex = 'app_user_organization_id_key' | 'app_user_pkey' - export type Column = keyof Selectable - export type OnlyCols = Pick< - Selectable, - T[number] - > - export type SQLExpression = - | Table - | db.ColumnNames - | db.ColumnValues - | Whereable - | Column - | db.ParentColumn - | db.GenericSQLExpression - export type SQL = SQLExpression | SQLExpression[] + export type UniqueIndex = 'app_user_organization_id_key' | 'app_user_pkey'; + export type Column = keyof Selectable; + export type OnlyCols = Pick; + export type SQLExpression = Table | db.ColumnNames | db.ColumnValues | Whereable | Column | db.ParentColumn | db.GenericSQLExpression; + export type SQL = SQLExpression | SQLExpression[]; } - + /** * **asana.project** * - Table in database */ export namespace project { - export type Table = 'asana.project' + export type Table = 'asana.project'; export interface Selectable { /** - * **asana.project.asana_webhook_secret** - * - `text` in database - * - Nullable, no default - */ - asana_webhook_secret: string | null - /** - * **asana.project.created_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - created_at: Date - /** - * **asana.project.enabled** - * - `bool` in database - * - `NOT NULL`, default: `false` - */ - enabled: boolean - /** - * **asana.project.ext_asana_project_id** - * - `text` in database - * - `NOT NULL`, no default - */ - ext_asana_project_id: string - /** - * **asana.project.ext_asana_webhook_id** - * - `text` in database - * - Nullable, no default - */ - ext_asana_webhook_id: string | null - /** - * **asana.project.has_completed_setup** - * - `bool` in database - * - `NOT NULL`, default: `false` - */ - has_completed_setup: boolean - /** - * **asana.project.id** - * - `int4` in database - * - `NOT NULL`, default: `nextval('asana.project_id_seq'::regclass)` - */ - id: number - /** - * **asana.project.name** - * - `text` in database - * - `NOT NULL`, no default - */ - name: string - /** - * **asana.project.organization_id** - * - `int4` in database - * - `NOT NULL`, no default - */ - organization_id: number - /** - * **asana.project.updated_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - updated_at: Date + * **asana.project.asana_webhook_secret** + * - `text` in database + * - Nullable, no default + */ + asana_webhook_secret: string | null; + /** + * **asana.project.created_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + created_at: Date; + /** + * **asana.project.enabled** + * - `bool` in database + * - `NOT NULL`, default: `false` + */ + enabled: boolean; + /** + * **asana.project.ext_asana_project_id** + * - `text` in database + * - `NOT NULL`, no default + */ + ext_asana_project_id: string; + /** + * **asana.project.ext_asana_webhook_id** + * - `text` in database + * - Nullable, no default + */ + ext_asana_webhook_id: string | null; + /** + * **asana.project.has_completed_setup** + * - `bool` in database + * - `NOT NULL`, default: `false` + */ + has_completed_setup: boolean; + /** + * **asana.project.id** + * - `int4` in database + * - `NOT NULL`, default: `nextval('asana.project_id_seq'::regclass)` + */ + id: number; + /** + * **asana.project.name** + * - `text` in database + * - `NOT NULL`, no default + */ + name: string; + /** + * **asana.project.organization_id** + * - `int4` in database + * - `NOT NULL`, no default + */ + organization_id: number; + /** + * **asana.project.updated_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + updated_at: Date; } export interface JSONSelectable { /** - * **asana.project.asana_webhook_secret** - * - `text` in database - * - Nullable, no default - */ - asana_webhook_secret: string | null - /** - * **asana.project.created_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - created_at: db.TimestampTzString - /** - * **asana.project.enabled** - * - `bool` in database - * - `NOT NULL`, default: `false` - */ - enabled: boolean - /** - * **asana.project.ext_asana_project_id** - * - `text` in database - * - `NOT NULL`, no default - */ - ext_asana_project_id: string - /** - * **asana.project.ext_asana_webhook_id** - * - `text` in database - * - Nullable, no default - */ - ext_asana_webhook_id: string | null - /** - * **asana.project.has_completed_setup** - * - `bool` in database - * - `NOT NULL`, default: `false` - */ - has_completed_setup: boolean - /** - * **asana.project.id** - * - `int4` in database - * - `NOT NULL`, default: `nextval('asana.project_id_seq'::regclass)` - */ - id: number - /** - * **asana.project.name** - * - `text` in database - * - `NOT NULL`, no default - */ - name: string - /** - * **asana.project.organization_id** - * - `int4` in database - * - `NOT NULL`, no default - */ - organization_id: number - /** - * **asana.project.updated_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - updated_at: db.TimestampTzString + * **asana.project.asana_webhook_secret** + * - `text` in database + * - Nullable, no default + */ + asana_webhook_secret: string | null; + /** + * **asana.project.created_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + created_at: db.TimestampTzString; + /** + * **asana.project.enabled** + * - `bool` in database + * - `NOT NULL`, default: `false` + */ + enabled: boolean; + /** + * **asana.project.ext_asana_project_id** + * - `text` in database + * - `NOT NULL`, no default + */ + ext_asana_project_id: string; + /** + * **asana.project.ext_asana_webhook_id** + * - `text` in database + * - Nullable, no default + */ + ext_asana_webhook_id: string | null; + /** + * **asana.project.has_completed_setup** + * - `bool` in database + * - `NOT NULL`, default: `false` + */ + has_completed_setup: boolean; + /** + * **asana.project.id** + * - `int4` in database + * - `NOT NULL`, default: `nextval('asana.project_id_seq'::regclass)` + */ + id: number; + /** + * **asana.project.name** + * - `text` in database + * - `NOT NULL`, no default + */ + name: string; + /** + * **asana.project.organization_id** + * - `int4` in database + * - `NOT NULL`, no default + */ + organization_id: number; + /** + * **asana.project.updated_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + updated_at: db.TimestampTzString; } export interface Whereable { /** - * **asana.project.asana_webhook_secret** - * - `text` in database - * - Nullable, no default - */ - asana_webhook_secret?: - | string - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - string | db.Parameter | db.SQLFragment | db.ParentColumn - > - /** - * **asana.project.created_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - created_at?: - | (db.TimestampTzString | Date) - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - | (db.TimestampTzString | Date) - | db.Parameter - | db.SQLFragment - | db.ParentColumn - > - /** - * **asana.project.enabled** - * - `bool` in database - * - `NOT NULL`, default: `false` - */ - enabled?: - | boolean - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - boolean | db.Parameter | db.SQLFragment | db.ParentColumn - > - /** - * **asana.project.ext_asana_project_id** - * - `text` in database - * - `NOT NULL`, no default - */ - ext_asana_project_id?: - | string - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - string | db.Parameter | db.SQLFragment | db.ParentColumn - > - /** - * **asana.project.ext_asana_webhook_id** - * - `text` in database - * - Nullable, no default - */ - ext_asana_webhook_id?: - | string - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - string | db.Parameter | db.SQLFragment | db.ParentColumn - > - /** - * **asana.project.has_completed_setup** - * - `bool` in database - * - `NOT NULL`, default: `false` - */ - has_completed_setup?: - | boolean - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - boolean | db.Parameter | db.SQLFragment | db.ParentColumn - > - /** - * **asana.project.id** - * - `int4` in database - * - `NOT NULL`, default: `nextval('asana.project_id_seq'::regclass)` - */ - id?: - | number - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - number | db.Parameter | db.SQLFragment | db.ParentColumn - > - /** - * **asana.project.name** - * - `text` in database - * - `NOT NULL`, no default - */ - name?: - | string - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - string | db.Parameter | db.SQLFragment | db.ParentColumn - > - /** - * **asana.project.organization_id** - * - `int4` in database - * - `NOT NULL`, no default - */ - organization_id?: - | number - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - number | db.Parameter | db.SQLFragment | db.ParentColumn - > - /** - * **asana.project.updated_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - updated_at?: - | (db.TimestampTzString | Date) - | db.Parameter - | db.SQLFragment - | db.ParentColumn - | db.SQLFragment< - any, - | (db.TimestampTzString | Date) - | db.Parameter - | db.SQLFragment - | db.ParentColumn - > + * **asana.project.asana_webhook_secret** + * - `text` in database + * - Nullable, no default + */ + asana_webhook_secret?: string | db.Parameter | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **asana.project.created_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + created_at?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **asana.project.enabled** + * - `bool` in database + * - `NOT NULL`, default: `false` + */ + enabled?: boolean | db.Parameter | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **asana.project.ext_asana_project_id** + * - `text` in database + * - `NOT NULL`, no default + */ + ext_asana_project_id?: string | db.Parameter | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **asana.project.ext_asana_webhook_id** + * - `text` in database + * - Nullable, no default + */ + ext_asana_webhook_id?: string | db.Parameter | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **asana.project.has_completed_setup** + * - `bool` in database + * - `NOT NULL`, default: `false` + */ + has_completed_setup?: boolean | db.Parameter | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **asana.project.id** + * - `int4` in database + * - `NOT NULL`, default: `nextval('asana.project_id_seq'::regclass)` + */ + id?: number | db.Parameter | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **asana.project.name** + * - `text` in database + * - `NOT NULL`, no default + */ + name?: string | db.Parameter | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **asana.project.organization_id** + * - `int4` in database + * - `NOT NULL`, no default + */ + organization_id?: number | db.Parameter | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; + /** + * **asana.project.updated_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + updated_at?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | db.SQLFragment | db.ParentColumn | db.SQLFragment | db.SQLFragment | db.ParentColumn>; } export interface Insertable { /** - * **asana.project.asana_webhook_secret** - * - `text` in database - * - Nullable, no default - */ - asana_webhook_secret?: - | string - | db.Parameter - | null - | db.DefaultType - | db.SQLFragment - /** - * **asana.project.created_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - created_at?: - | (db.TimestampTzString | Date) - | db.Parameter - | db.DefaultType - | db.SQLFragment - /** - * **asana.project.enabled** - * - `bool` in database - * - `NOT NULL`, default: `false` - */ - enabled?: - | boolean - | db.Parameter - | db.DefaultType - | db.SQLFragment - /** - * **asana.project.ext_asana_project_id** - * - `text` in database - * - `NOT NULL`, no default - */ - ext_asana_project_id: string | db.Parameter | db.SQLFragment - /** - * **asana.project.ext_asana_webhook_id** - * - `text` in database - * - Nullable, no default - */ - ext_asana_webhook_id?: - | string - | db.Parameter - | null - | db.DefaultType - | db.SQLFragment - /** - * **asana.project.has_completed_setup** - * - `bool` in database - * - `NOT NULL`, default: `false` - */ - has_completed_setup?: - | boolean - | db.Parameter - | db.DefaultType - | db.SQLFragment - /** - * **asana.project.id** - * - `int4` in database - * - `NOT NULL`, default: `nextval('asana.project_id_seq'::regclass)` - */ - id?: number | db.Parameter | db.DefaultType | db.SQLFragment - /** - * **asana.project.name** - * - `text` in database - * - `NOT NULL`, no default - */ - name: string | db.Parameter | db.SQLFragment - /** - * **asana.project.organization_id** - * - `int4` in database - * - `NOT NULL`, no default - */ - organization_id: number | db.Parameter | db.SQLFragment - /** - * **asana.project.updated_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - updated_at?: - | (db.TimestampTzString | Date) - | db.Parameter - | db.DefaultType - | db.SQLFragment + * **asana.project.asana_webhook_secret** + * - `text` in database + * - Nullable, no default + */ + asana_webhook_secret?: string | db.Parameter | null | db.DefaultType | db.SQLFragment; + /** + * **asana.project.created_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + created_at?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | db.DefaultType | db.SQLFragment; + /** + * **asana.project.enabled** + * - `bool` in database + * - `NOT NULL`, default: `false` + */ + enabled?: boolean | db.Parameter | db.DefaultType | db.SQLFragment; + /** + * **asana.project.ext_asana_project_id** + * - `text` in database + * - `NOT NULL`, no default + */ + ext_asana_project_id: string | db.Parameter | db.SQLFragment; + /** + * **asana.project.ext_asana_webhook_id** + * - `text` in database + * - Nullable, no default + */ + ext_asana_webhook_id?: string | db.Parameter | null | db.DefaultType | db.SQLFragment; + /** + * **asana.project.has_completed_setup** + * - `bool` in database + * - `NOT NULL`, default: `false` + */ + has_completed_setup?: boolean | db.Parameter | db.DefaultType | db.SQLFragment; + /** + * **asana.project.id** + * - `int4` in database + * - `NOT NULL`, default: `nextval('asana.project_id_seq'::regclass)` + */ + id?: number | db.Parameter | db.DefaultType | db.SQLFragment; + /** + * **asana.project.name** + * - `text` in database + * - `NOT NULL`, no default + */ + name: string | db.Parameter | db.SQLFragment; + /** + * **asana.project.organization_id** + * - `int4` in database + * - `NOT NULL`, no default + */ + organization_id: number | db.Parameter | db.SQLFragment; + /** + * **asana.project.updated_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + updated_at?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | db.DefaultType | db.SQLFragment; } export interface Updatable { /** - * **asana.project.asana_webhook_secret** - * - `text` in database - * - Nullable, no default - */ - asana_webhook_secret?: - | string - | db.Parameter - | null - | db.DefaultType - | db.SQLFragment - | db.SQLFragment< - any, - | string - | db.Parameter - | null - | db.DefaultType - | db.SQLFragment - > - /** - * **asana.project.created_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - created_at?: - | (db.TimestampTzString | Date) - | db.Parameter - | db.DefaultType - | db.SQLFragment - | db.SQLFragment< - any, - | (db.TimestampTzString | Date) - | db.Parameter - | db.DefaultType - | db.SQLFragment - > - /** - * **asana.project.enabled** - * - `bool` in database - * - `NOT NULL`, default: `false` - */ - enabled?: - | boolean - | db.Parameter - | db.DefaultType - | db.SQLFragment - | db.SQLFragment< - any, - boolean | db.Parameter | db.DefaultType | db.SQLFragment - > - /** - * **asana.project.ext_asana_project_id** - * - `text` in database - * - `NOT NULL`, no default - */ - ext_asana_project_id?: - | string - | db.Parameter - | db.SQLFragment - | db.SQLFragment | db.SQLFragment> - /** - * **asana.project.ext_asana_webhook_id** - * - `text` in database - * - Nullable, no default - */ - ext_asana_webhook_id?: - | string - | db.Parameter - | null - | db.DefaultType - | db.SQLFragment - | db.SQLFragment< - any, - | string - | db.Parameter - | null - | db.DefaultType - | db.SQLFragment - > - /** - * **asana.project.has_completed_setup** - * - `bool` in database - * - `NOT NULL`, default: `false` - */ - has_completed_setup?: - | boolean - | db.Parameter - | db.DefaultType - | db.SQLFragment - | db.SQLFragment< - any, - boolean | db.Parameter | db.DefaultType | db.SQLFragment - > - /** - * **asana.project.id** - * - `int4` in database - * - `NOT NULL`, default: `nextval('asana.project_id_seq'::regclass)` - */ - id?: - | number - | db.Parameter - | db.DefaultType - | db.SQLFragment - | db.SQLFragment< - any, - number | db.Parameter | db.DefaultType | db.SQLFragment - > - /** - * **asana.project.name** - * - `text` in database - * - `NOT NULL`, no default - */ - name?: - | string - | db.Parameter - | db.SQLFragment - | db.SQLFragment | db.SQLFragment> - /** - * **asana.project.organization_id** - * - `int4` in database - * - `NOT NULL`, no default - */ - organization_id?: - | number - | db.Parameter - | db.SQLFragment - | db.SQLFragment | db.SQLFragment> - /** - * **asana.project.updated_at** - * - `timestamptz` in database - * - `NOT NULL`, default: `CURRENT_TIMESTAMP` - */ - updated_at?: - | (db.TimestampTzString | Date) - | db.Parameter - | db.DefaultType - | db.SQLFragment - | db.SQLFragment< - any, - | (db.TimestampTzString | Date) - | db.Parameter - | db.DefaultType - | db.SQLFragment - > + * **asana.project.asana_webhook_secret** + * - `text` in database + * - Nullable, no default + */ + asana_webhook_secret?: string | db.Parameter | null | db.DefaultType | db.SQLFragment | db.SQLFragment | null | db.DefaultType | db.SQLFragment>; + /** + * **asana.project.created_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + created_at?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | db.DefaultType | db.SQLFragment | db.SQLFragment | db.DefaultType | db.SQLFragment>; + /** + * **asana.project.enabled** + * - `bool` in database + * - `NOT NULL`, default: `false` + */ + enabled?: boolean | db.Parameter | db.DefaultType | db.SQLFragment | db.SQLFragment | db.DefaultType | db.SQLFragment>; + /** + * **asana.project.ext_asana_project_id** + * - `text` in database + * - `NOT NULL`, no default + */ + ext_asana_project_id?: string | db.Parameter | db.SQLFragment | db.SQLFragment | db.SQLFragment>; + /** + * **asana.project.ext_asana_webhook_id** + * - `text` in database + * - Nullable, no default + */ + ext_asana_webhook_id?: string | db.Parameter | null | db.DefaultType | db.SQLFragment | db.SQLFragment | null | db.DefaultType | db.SQLFragment>; + /** + * **asana.project.has_completed_setup** + * - `bool` in database + * - `NOT NULL`, default: `false` + */ + has_completed_setup?: boolean | db.Parameter | db.DefaultType | db.SQLFragment | db.SQLFragment | db.DefaultType | db.SQLFragment>; + /** + * **asana.project.id** + * - `int4` in database + * - `NOT NULL`, default: `nextval('asana.project_id_seq'::regclass)` + */ + id?: number | db.Parameter | db.DefaultType | db.SQLFragment | db.SQLFragment | db.DefaultType | db.SQLFragment>; + /** + * **asana.project.name** + * - `text` in database + * - `NOT NULL`, no default + */ + name?: string | db.Parameter | db.SQLFragment | db.SQLFragment | db.SQLFragment>; + /** + * **asana.project.organization_id** + * - `int4` in database + * - `NOT NULL`, no default + */ + organization_id?: number | db.Parameter | db.SQLFragment | db.SQLFragment | db.SQLFragment>; + /** + * **asana.project.updated_at** + * - `timestamptz` in database + * - `NOT NULL`, default: `CURRENT_TIMESTAMP` + */ + updated_at?: (db.TimestampTzString | Date) | db.Parameter<(db.TimestampTzString | Date)> | db.DefaultType | db.SQLFragment | db.SQLFragment | db.DefaultType | db.SQLFragment>; } - export type UniqueIndex = - | 'project_ext_asana_project_id_key' - | 'project_ext_asana_webhook_id_key' - | 'project_pkey' - export type Column = keyof Selectable - export type OnlyCols = Pick< - Selectable, - T[number] - > - export type SQLExpression = - | Table - | db.ColumnNames - | db.ColumnValues - | Whereable - | Column - | db.ParentColumn - | db.GenericSQLExpression - export type SQL = SQLExpression | SQLExpression[] + export type UniqueIndex = 'project_ext_asana_project_id_key' | 'project_ext_asana_webhook_id_key' | 'project_pkey'; + export type Column = keyof Selectable; + export type OnlyCols = Pick; + export type SQLExpression = Table | db.ColumnNames | db.ColumnValues | Whereable | Column | db.ParentColumn | db.GenericSQLExpression; + export type SQL = SQLExpression | SQLExpression[]; } - + /* --- aggregate types --- */ - - export type Table = app_user.Table | project.Table - export type Selectable = app_user.Selectable | project.Selectable - export type JSONSelectable = - | app_user.JSONSelectable - | project.JSONSelectable - export type Whereable = app_user.Whereable | project.Whereable - export type Insertable = app_user.Insertable | project.Insertable - export type Updatable = app_user.Updatable | project.Updatable - export type UniqueIndex = app_user.UniqueIndex | project.UniqueIndex - export type Column = app_user.Column | project.Column - - export type AllBaseTables = [app_user.Table, project.Table] - export type AllForeignTables = [] - export type AllViews = [] - export type AllMaterializedViews = [] - export type AllTablesAndViews = [app_user.Table, project.Table] + + export type Table = app_user.Table | project.Table; + export type Selectable = app_user.Selectable | project.Selectable; + export type JSONSelectable = app_user.JSONSelectable | project.JSONSelectable; + export type Whereable = app_user.Whereable | project.Whereable; + export type Insertable = app_user.Insertable | project.Insertable; + export type Updatable = app_user.Updatable | project.Updatable; + export type UniqueIndex = app_user.UniqueIndex | project.UniqueIndex; + export type Column = app_user.Column | project.Column; + + export type AllBaseTables = [app_user.Table, project.Table]; + export type AllForeignTables = []; + export type AllViews = []; + export type AllMaterializedViews = []; + export type AllTablesAndViews = [app_user.Table, project.Table]; } + /* === global aggregate types === */ - export type Schema = - | 'homie' - | 'github' - | 'slack' - | 'trello' - | 'gitlab' - | 'asana' - export type Table = - | homie.Table - | github.Table - | slack.Table - | trello.Table - | gitlab.Table - | asana.Table - export type Selectable = - | homie.Selectable - | github.Selectable - | slack.Selectable - | trello.Selectable - | gitlab.Selectable - | asana.Selectable - export type JSONSelectable = - | homie.JSONSelectable - | github.JSONSelectable - | slack.JSONSelectable - | trello.JSONSelectable - | gitlab.JSONSelectable - | asana.JSONSelectable - export type Whereable = - | homie.Whereable - | github.Whereable - | slack.Whereable - | trello.Whereable - | gitlab.Whereable - | asana.Whereable - export type Insertable = - | homie.Insertable - | github.Insertable - | slack.Insertable - | trello.Insertable - | gitlab.Insertable - | asana.Insertable - export type Updatable = - | homie.Updatable - | github.Updatable - | slack.Updatable - | trello.Updatable - | gitlab.Updatable - | asana.Updatable - export type UniqueIndex = - | homie.UniqueIndex - | github.UniqueIndex - | slack.UniqueIndex - | trello.UniqueIndex - | gitlab.UniqueIndex - | asana.UniqueIndex - export type Column = - | homie.Column - | github.Column - | slack.Column - | trello.Column - | gitlab.Column - | asana.Column + export type Schema = 'homie' | 'github' | 'slack' | 'trello' | 'gitlab' | 'asana'; + export type Table = homie.Table | github.Table | slack.Table | trello.Table | gitlab.Table | asana.Table; + export type Selectable = homie.Selectable | github.Selectable | slack.Selectable | trello.Selectable | gitlab.Selectable | asana.Selectable; + export type JSONSelectable = homie.JSONSelectable | github.JSONSelectable | slack.JSONSelectable | trello.JSONSelectable | gitlab.JSONSelectable | asana.JSONSelectable; + export type Whereable = homie.Whereable | github.Whereable | slack.Whereable | trello.Whereable | gitlab.Whereable | asana.Whereable; + export type Insertable = homie.Insertable | github.Insertable | slack.Insertable | trello.Insertable | gitlab.Insertable | asana.Insertable; + export type Updatable = homie.Updatable | github.Updatable | slack.Updatable | trello.Updatable | gitlab.Updatable | asana.Updatable; + export type UniqueIndex = homie.UniqueIndex | github.UniqueIndex | slack.UniqueIndex | trello.UniqueIndex | gitlab.UniqueIndex | asana.UniqueIndex; + export type Column = homie.Column | github.Column | slack.Column | trello.Column | gitlab.Column | asana.Column; + + export type AllSchemas = ['homie', 'github', 'slack', 'trello', 'gitlab', 'asana']; + export type AllBaseTables = [...homie.AllBaseTables, ...github.AllBaseTables, ...slack.AllBaseTables, ...trello.AllBaseTables, ...gitlab.AllBaseTables, ...asana.AllBaseTables]; + export type AllForeignTables = [...homie.AllForeignTables, ...github.AllForeignTables, ...slack.AllForeignTables, ...trello.AllForeignTables, ...gitlab.AllForeignTables, ...asana.AllForeignTables]; + export type AllViews = [...homie.AllViews, ...github.AllViews, ...slack.AllViews, ...trello.AllViews, ...gitlab.AllViews, ...asana.AllViews]; + export type AllMaterializedViews = [...homie.AllMaterializedViews, ...github.AllMaterializedViews, ...slack.AllMaterializedViews, ...trello.AllMaterializedViews, ...gitlab.AllMaterializedViews, ...asana.AllMaterializedViews]; + export type AllTablesAndViews = [...homie.AllTablesAndViews, ...github.AllTablesAndViews, ...slack.AllTablesAndViews, ...trello.AllTablesAndViews, ...gitlab.AllTablesAndViews, ...asana.AllTablesAndViews]; - export type AllSchemas = [ - 'homie', - 'github', - 'slack', - 'trello', - 'gitlab', - 'asana', - ] - export type AllBaseTables = [ - ...homie.AllBaseTables, - ...github.AllBaseTables, - ...slack.AllBaseTables, - ...trello.AllBaseTables, - ...gitlab.AllBaseTables, - ...asana.AllBaseTables, - ] - export type AllForeignTables = [ - ...homie.AllForeignTables, - ...github.AllForeignTables, - ...slack.AllForeignTables, - ...trello.AllForeignTables, - ...gitlab.AllForeignTables, - ...asana.AllForeignTables, - ] - export type AllViews = [ - ...homie.AllViews, - ...github.AllViews, - ...slack.AllViews, - ...trello.AllViews, - ...gitlab.AllViews, - ...asana.AllViews, - ] - export type AllMaterializedViews = [ - ...homie.AllMaterializedViews, - ...github.AllMaterializedViews, - ...slack.AllMaterializedViews, - ...trello.AllMaterializedViews, - ...gitlab.AllMaterializedViews, - ...asana.AllMaterializedViews, - ] - export type AllTablesAndViews = [ - ...homie.AllTablesAndViews, - ...github.AllTablesAndViews, - ...slack.AllTablesAndViews, - ...trello.AllTablesAndViews, - ...gitlab.AllTablesAndViews, - ...asana.AllTablesAndViews, - ] /* === lookups === */ export type SelectableForTable = { - 'homie.contributor': homie.contributor.Selectable - 'homie.contributor_task': homie.contributor_task.Selectable - 'homie.duplicate_task_notification': homie.duplicate_task_notification.Selectable - 'homie.organization': homie.organization.Selectable - 'homie.plan': homie.plan.Selectable - 'homie.pull_request': homie.pull_request.Selectable - 'homie.subscription': homie.subscription.Selectable - 'homie.task': homie.task.Selectable - 'homie.task_status': homie.task_status.Selectable - 'homie.task_type': homie.task_type.Selectable - 'github.organization': github.organization.Selectable - 'github.repo': github.repo.Selectable - 'slack.workspace': slack.workspace.Selectable - 'trello.workspace': trello.workspace.Selectable - 'gitlab.app_user': gitlab.app_user.Selectable - 'gitlab.project': gitlab.project.Selectable - 'asana.app_user': asana.app_user.Selectable - 'asana.project': asana.project.Selectable - }[T] + "homie.contributor": homie.contributor.Selectable; + "homie.contributor_task": homie.contributor_task.Selectable; + "homie.duplicate_task_notification": homie.duplicate_task_notification.Selectable; + "homie.organization": homie.organization.Selectable; + "homie.plan": homie.plan.Selectable; + "homie.pull_request": homie.pull_request.Selectable; + "homie.subscription": homie.subscription.Selectable; + "homie.task": homie.task.Selectable; + "homie.task_status": homie.task_status.Selectable; + "homie.task_type": homie.task_type.Selectable; + "github.organization": github.organization.Selectable; + "github.repo": github.repo.Selectable; + "slack.workspace": slack.workspace.Selectable; + "trello.workspace": trello.workspace.Selectable; + "gitlab.app_user": gitlab.app_user.Selectable; + "gitlab.project": gitlab.project.Selectable; + "asana.app_user": asana.app_user.Selectable; + "asana.project": asana.project.Selectable; + }[T]; export type JSONSelectableForTable = { - 'homie.contributor': homie.contributor.JSONSelectable - 'homie.contributor_task': homie.contributor_task.JSONSelectable - 'homie.duplicate_task_notification': homie.duplicate_task_notification.JSONSelectable - 'homie.organization': homie.organization.JSONSelectable - 'homie.plan': homie.plan.JSONSelectable - 'homie.pull_request': homie.pull_request.JSONSelectable - 'homie.subscription': homie.subscription.JSONSelectable - 'homie.task': homie.task.JSONSelectable - 'homie.task_status': homie.task_status.JSONSelectable - 'homie.task_type': homie.task_type.JSONSelectable - 'github.organization': github.organization.JSONSelectable - 'github.repo': github.repo.JSONSelectable - 'slack.workspace': slack.workspace.JSONSelectable - 'trello.workspace': trello.workspace.JSONSelectable - 'gitlab.app_user': gitlab.app_user.JSONSelectable - 'gitlab.project': gitlab.project.JSONSelectable - 'asana.app_user': asana.app_user.JSONSelectable - 'asana.project': asana.project.JSONSelectable - }[T] + "homie.contributor": homie.contributor.JSONSelectable; + "homie.contributor_task": homie.contributor_task.JSONSelectable; + "homie.duplicate_task_notification": homie.duplicate_task_notification.JSONSelectable; + "homie.organization": homie.organization.JSONSelectable; + "homie.plan": homie.plan.JSONSelectable; + "homie.pull_request": homie.pull_request.JSONSelectable; + "homie.subscription": homie.subscription.JSONSelectable; + "homie.task": homie.task.JSONSelectable; + "homie.task_status": homie.task_status.JSONSelectable; + "homie.task_type": homie.task_type.JSONSelectable; + "github.organization": github.organization.JSONSelectable; + "github.repo": github.repo.JSONSelectable; + "slack.workspace": slack.workspace.JSONSelectable; + "trello.workspace": trello.workspace.JSONSelectable; + "gitlab.app_user": gitlab.app_user.JSONSelectable; + "gitlab.project": gitlab.project.JSONSelectable; + "asana.app_user": asana.app_user.JSONSelectable; + "asana.project": asana.project.JSONSelectable; + }[T]; export type WhereableForTable = { - 'homie.contributor': homie.contributor.Whereable - 'homie.contributor_task': homie.contributor_task.Whereable - 'homie.duplicate_task_notification': homie.duplicate_task_notification.Whereable - 'homie.organization': homie.organization.Whereable - 'homie.plan': homie.plan.Whereable - 'homie.pull_request': homie.pull_request.Whereable - 'homie.subscription': homie.subscription.Whereable - 'homie.task': homie.task.Whereable - 'homie.task_status': homie.task_status.Whereable - 'homie.task_type': homie.task_type.Whereable - 'github.organization': github.organization.Whereable - 'github.repo': github.repo.Whereable - 'slack.workspace': slack.workspace.Whereable - 'trello.workspace': trello.workspace.Whereable - 'gitlab.app_user': gitlab.app_user.Whereable - 'gitlab.project': gitlab.project.Whereable - 'asana.app_user': asana.app_user.Whereable - 'asana.project': asana.project.Whereable - }[T] + "homie.contributor": homie.contributor.Whereable; + "homie.contributor_task": homie.contributor_task.Whereable; + "homie.duplicate_task_notification": homie.duplicate_task_notification.Whereable; + "homie.organization": homie.organization.Whereable; + "homie.plan": homie.plan.Whereable; + "homie.pull_request": homie.pull_request.Whereable; + "homie.subscription": homie.subscription.Whereable; + "homie.task": homie.task.Whereable; + "homie.task_status": homie.task_status.Whereable; + "homie.task_type": homie.task_type.Whereable; + "github.organization": github.organization.Whereable; + "github.repo": github.repo.Whereable; + "slack.workspace": slack.workspace.Whereable; + "trello.workspace": trello.workspace.Whereable; + "gitlab.app_user": gitlab.app_user.Whereable; + "gitlab.project": gitlab.project.Whereable; + "asana.app_user": asana.app_user.Whereable; + "asana.project": asana.project.Whereable; + }[T]; export type InsertableForTable = { - 'homie.contributor': homie.contributor.Insertable - 'homie.contributor_task': homie.contributor_task.Insertable - 'homie.duplicate_task_notification': homie.duplicate_task_notification.Insertable - 'homie.organization': homie.organization.Insertable - 'homie.plan': homie.plan.Insertable - 'homie.pull_request': homie.pull_request.Insertable - 'homie.subscription': homie.subscription.Insertable - 'homie.task': homie.task.Insertable - 'homie.task_status': homie.task_status.Insertable - 'homie.task_type': homie.task_type.Insertable - 'github.organization': github.organization.Insertable - 'github.repo': github.repo.Insertable - 'slack.workspace': slack.workspace.Insertable - 'trello.workspace': trello.workspace.Insertable - 'gitlab.app_user': gitlab.app_user.Insertable - 'gitlab.project': gitlab.project.Insertable - 'asana.app_user': asana.app_user.Insertable - 'asana.project': asana.project.Insertable - }[T] + "homie.contributor": homie.contributor.Insertable; + "homie.contributor_task": homie.contributor_task.Insertable; + "homie.duplicate_task_notification": homie.duplicate_task_notification.Insertable; + "homie.organization": homie.organization.Insertable; + "homie.plan": homie.plan.Insertable; + "homie.pull_request": homie.pull_request.Insertable; + "homie.subscription": homie.subscription.Insertable; + "homie.task": homie.task.Insertable; + "homie.task_status": homie.task_status.Insertable; + "homie.task_type": homie.task_type.Insertable; + "github.organization": github.organization.Insertable; + "github.repo": github.repo.Insertable; + "slack.workspace": slack.workspace.Insertable; + "trello.workspace": trello.workspace.Insertable; + "gitlab.app_user": gitlab.app_user.Insertable; + "gitlab.project": gitlab.project.Insertable; + "asana.app_user": asana.app_user.Insertable; + "asana.project": asana.project.Insertable; + }[T]; export type UpdatableForTable = { - 'homie.contributor': homie.contributor.Updatable - 'homie.contributor_task': homie.contributor_task.Updatable - 'homie.duplicate_task_notification': homie.duplicate_task_notification.Updatable - 'homie.organization': homie.organization.Updatable - 'homie.plan': homie.plan.Updatable - 'homie.pull_request': homie.pull_request.Updatable - 'homie.subscription': homie.subscription.Updatable - 'homie.task': homie.task.Updatable - 'homie.task_status': homie.task_status.Updatable - 'homie.task_type': homie.task_type.Updatable - 'github.organization': github.organization.Updatable - 'github.repo': github.repo.Updatable - 'slack.workspace': slack.workspace.Updatable - 'trello.workspace': trello.workspace.Updatable - 'gitlab.app_user': gitlab.app_user.Updatable - 'gitlab.project': gitlab.project.Updatable - 'asana.app_user': asana.app_user.Updatable - 'asana.project': asana.project.Updatable - }[T] + "homie.contributor": homie.contributor.Updatable; + "homie.contributor_task": homie.contributor_task.Updatable; + "homie.duplicate_task_notification": homie.duplicate_task_notification.Updatable; + "homie.organization": homie.organization.Updatable; + "homie.plan": homie.plan.Updatable; + "homie.pull_request": homie.pull_request.Updatable; + "homie.subscription": homie.subscription.Updatable; + "homie.task": homie.task.Updatable; + "homie.task_status": homie.task_status.Updatable; + "homie.task_type": homie.task_type.Updatable; + "github.organization": github.organization.Updatable; + "github.repo": github.repo.Updatable; + "slack.workspace": slack.workspace.Updatable; + "trello.workspace": trello.workspace.Updatable; + "gitlab.app_user": gitlab.app_user.Updatable; + "gitlab.project": gitlab.project.Updatable; + "asana.app_user": asana.app_user.Updatable; + "asana.project": asana.project.Updatable; + }[T]; export type UniqueIndexForTable = { - 'homie.contributor': homie.contributor.UniqueIndex - 'homie.contributor_task': homie.contributor_task.UniqueIndex - 'homie.duplicate_task_notification': homie.duplicate_task_notification.UniqueIndex - 'homie.organization': homie.organization.UniqueIndex - 'homie.plan': homie.plan.UniqueIndex - 'homie.pull_request': homie.pull_request.UniqueIndex - 'homie.subscription': homie.subscription.UniqueIndex - 'homie.task': homie.task.UniqueIndex - 'homie.task_status': homie.task_status.UniqueIndex - 'homie.task_type': homie.task_type.UniqueIndex - 'github.organization': github.organization.UniqueIndex - 'github.repo': github.repo.UniqueIndex - 'slack.workspace': slack.workspace.UniqueIndex - 'trello.workspace': trello.workspace.UniqueIndex - 'gitlab.app_user': gitlab.app_user.UniqueIndex - 'gitlab.project': gitlab.project.UniqueIndex - 'asana.app_user': asana.app_user.UniqueIndex - 'asana.project': asana.project.UniqueIndex - }[T] + "homie.contributor": homie.contributor.UniqueIndex; + "homie.contributor_task": homie.contributor_task.UniqueIndex; + "homie.duplicate_task_notification": homie.duplicate_task_notification.UniqueIndex; + "homie.organization": homie.organization.UniqueIndex; + "homie.plan": homie.plan.UniqueIndex; + "homie.pull_request": homie.pull_request.UniqueIndex; + "homie.subscription": homie.subscription.UniqueIndex; + "homie.task": homie.task.UniqueIndex; + "homie.task_status": homie.task_status.UniqueIndex; + "homie.task_type": homie.task_type.UniqueIndex; + "github.organization": github.organization.UniqueIndex; + "github.repo": github.repo.UniqueIndex; + "slack.workspace": slack.workspace.UniqueIndex; + "trello.workspace": trello.workspace.UniqueIndex; + "gitlab.app_user": gitlab.app_user.UniqueIndex; + "gitlab.project": gitlab.project.UniqueIndex; + "asana.app_user": asana.app_user.UniqueIndex; + "asana.project": asana.project.UniqueIndex; + }[T]; export type ColumnForTable = { - 'homie.contributor': homie.contributor.Column - 'homie.contributor_task': homie.contributor_task.Column - 'homie.duplicate_task_notification': homie.duplicate_task_notification.Column - 'homie.organization': homie.organization.Column - 'homie.plan': homie.plan.Column - 'homie.pull_request': homie.pull_request.Column - 'homie.subscription': homie.subscription.Column - 'homie.task': homie.task.Column - 'homie.task_status': homie.task_status.Column - 'homie.task_type': homie.task_type.Column - 'github.organization': github.organization.Column - 'github.repo': github.repo.Column - 'slack.workspace': slack.workspace.Column - 'trello.workspace': trello.workspace.Column - 'gitlab.app_user': gitlab.app_user.Column - 'gitlab.project': gitlab.project.Column - 'asana.app_user': asana.app_user.Column - 'asana.project': asana.project.Column - }[T] + "homie.contributor": homie.contributor.Column; + "homie.contributor_task": homie.contributor_task.Column; + "homie.duplicate_task_notification": homie.duplicate_task_notification.Column; + "homie.organization": homie.organization.Column; + "homie.plan": homie.plan.Column; + "homie.pull_request": homie.pull_request.Column; + "homie.subscription": homie.subscription.Column; + "homie.task": homie.task.Column; + "homie.task_status": homie.task_status.Column; + "homie.task_type": homie.task_type.Column; + "github.organization": github.organization.Column; + "github.repo": github.repo.Column; + "slack.workspace": slack.workspace.Column; + "trello.workspace": trello.workspace.Column; + "gitlab.app_user": gitlab.app_user.Column; + "gitlab.project": gitlab.project.Column; + "asana.app_user": asana.app_user.Column; + "asana.project": asana.project.Column; + }[T]; export type SQLForTable = { - 'homie.contributor': homie.contributor.SQL - 'homie.contributor_task': homie.contributor_task.SQL - 'homie.duplicate_task_notification': homie.duplicate_task_notification.SQL - 'homie.organization': homie.organization.SQL - 'homie.plan': homie.plan.SQL - 'homie.pull_request': homie.pull_request.SQL - 'homie.subscription': homie.subscription.SQL - 'homie.task': homie.task.SQL - 'homie.task_status': homie.task_status.SQL - 'homie.task_type': homie.task_type.SQL - 'github.organization': github.organization.SQL - 'github.repo': github.repo.SQL - 'slack.workspace': slack.workspace.SQL - 'trello.workspace': trello.workspace.SQL - 'gitlab.app_user': gitlab.app_user.SQL - 'gitlab.project': gitlab.project.SQL - 'asana.app_user': asana.app_user.SQL - 'asana.project': asana.project.SQL - }[T] + "homie.contributor": homie.contributor.SQL; + "homie.contributor_task": homie.contributor_task.SQL; + "homie.duplicate_task_notification": homie.duplicate_task_notification.SQL; + "homie.organization": homie.organization.SQL; + "homie.plan": homie.plan.SQL; + "homie.pull_request": homie.pull_request.SQL; + "homie.subscription": homie.subscription.SQL; + "homie.task": homie.task.SQL; + "homie.task_status": homie.task_status.SQL; + "homie.task_type": homie.task_type.SQL; + "github.organization": github.organization.SQL; + "github.repo": github.repo.SQL; + "slack.workspace": slack.workspace.SQL; + "trello.workspace": trello.workspace.SQL; + "gitlab.app_user": gitlab.app_user.SQL; + "gitlab.project": gitlab.project.SQL; + "asana.app_user": asana.app_user.SQL; + "asana.project": asana.project.SQL; + }[T]; + } diff --git a/src/lib/ai/chat/tools/get-fetch-pull-request-detail-tool.ts b/src/lib/ai/chat/tools/get-fetch-pull-request-detail-tool.ts index fc01c928..d19781a0 100644 --- a/src/lib/ai/chat/tools/get-fetch-pull-request-detail-tool.ts +++ b/src/lib/ai/chat/tools/get-fetch-pull-request-detail-tool.ts @@ -141,13 +141,13 @@ export function getFetchPullRequestDetailTool( const commits = await listMergeRequestCommits({ gitlabAccessToken: organization.gitlab_access_token, projectId: project.ext_gitlab_project_id, - mergeRequestIid: pullRequest.ext_gitlab_merge_request_iid, + mergeRequestIid: parseInt(pullRequest.ext_gitlab_merge_request_iid), }) const diff = await getMergeRequestDiff({ gitlabAccessToken: organization.gitlab_access_token, projectId: project.ext_gitlab_project_id, - mergeRequestIid: pullRequest.ext_gitlab_merge_request_iid, + mergeRequestIid: parseInt(pullRequest.ext_gitlab_merge_request_iid), }) return JSON.stringify({ diff --git a/src/lib/ai/chat/tools/get-list-commits-deployed-to-branch-tool.ts b/src/lib/ai/chat/tools/get-list-commits-deployed-to-branch-tool.ts index 8fbeef4b..20188ca0 100644 --- a/src/lib/ai/chat/tools/get-list-commits-deployed-to-branch-tool.ts +++ b/src/lib/ai/chat/tools/get-list-commits-deployed-to-branch-tool.ts @@ -158,7 +158,7 @@ export function getListCommitsDeployedToBranchTool( const commits = await listMergeRequestCommits({ gitlabAccessToken: organization.gitlab_access_token, projectId: project.ext_gitlab_project_id, - mergeRequestIid: pullRequest.ext_gitlab_merge_request_iid, + mergeRequestIid: parseInt(pullRequest.ext_gitlab_merge_request_iid), }) items[project.name] = [ diff --git a/src/lib/github/save-merged-pull-request.ts b/src/lib/github/save-merged-pull-request.ts index 8f6964ef..01f46ea8 100644 --- a/src/lib/github/save-merged-pull-request.ts +++ b/src/lib/github/save-merged-pull-request.ts @@ -187,7 +187,7 @@ export async function saveMergedPullRequest( .insertInto('homie.pull_request') .values({ created_at: parseISO(pullRequest.created_at), - ext_gh_pull_request_id: pullRequest.id, + ext_gh_pull_request_id: String(pullRequest.id), organization_id: organization.id, contributor_id: contributor.id, title: pullRequest.title, diff --git a/src/lib/gitlab/save-merged-merge-request.ts b/src/lib/gitlab/save-merged-merge-request.ts index 34e007e5..48e5f5e6 100644 --- a/src/lib/gitlab/save-merged-merge-request.ts +++ b/src/lib/gitlab/save-merged-merge-request.ts @@ -119,8 +119,8 @@ export async function saveMergedMergeRequest( .insertInto('homie.pull_request') .values({ created_at: parseISO(mergeRequest.created_at), - ext_gitlab_merge_request_id: mergeRequest.id, - ext_gitlab_merge_request_iid: mergeRequest.iid, + ext_gitlab_merge_request_id: String(mergeRequest.id), + ext_gitlab_merge_request_iid: String(mergeRequest.iid), organization_id: organization.id, contributor_id: contributor.id, title: mergeRequest.title, diff --git a/src/queue/jobs/close-merge-request.ts b/src/queue/jobs/close-merge-request.ts index 053019c2..215277f9 100644 --- a/src/queue/jobs/close-merge-request.ts +++ b/src/queue/jobs/close-merge-request.ts @@ -70,7 +70,7 @@ export const closeMergeRequest = createJob({ const pullRequest = await dbClient .selectFrom('homie.pull_request') - .where('ext_gitlab_merge_request_id', '=', merge_request.id) + .where('ext_gitlab_merge_request_id', '=', String(merge_request.id)) .select(['id']) .executeTakeFirst() @@ -142,8 +142,8 @@ export const closeMergeRequest = createJob({ await dbClient .insertInto('homie.pull_request') .values({ - ext_gitlab_merge_request_id: merge_request.id, - ext_gitlab_merge_request_iid: merge_request.iid, + ext_gitlab_merge_request_id: String(merge_request.id), + ext_gitlab_merge_request_iid: String(merge_request.iid), number: merge_request.iid, organization_id: organization.id, contributor_id: contributor.id, diff --git a/src/queue/jobs/close-pull-requests.ts b/src/queue/jobs/close-pull-requests.ts index 87f81581..3be4ff9e 100644 --- a/src/queue/jobs/close-pull-requests.ts +++ b/src/queue/jobs/close-pull-requests.ts @@ -77,7 +77,7 @@ export const closePullRequest = createJob({ const pullRequest = await dbClient .selectFrom('homie.pull_request') - .where('ext_gh_pull_request_id', '=', pull_request.id) + .where('ext_gh_pull_request_id', '=', String(pull_request.id)) .select(['id', 'closed_at']) .executeTakeFirst() @@ -142,7 +142,7 @@ export const closePullRequest = createJob({ .insertInto('homie.pull_request') .values({ created_at: parseISO(pull_request.created_at), - ext_gh_pull_request_id: pull_request.id, + ext_gh_pull_request_id: String(pull_request.id), organization_id: organization.id, contributor_id: contributor.id, title: pull_request.title, diff --git a/src/queue/jobs/reopen-merge-request.ts b/src/queue/jobs/reopen-merge-request.ts index 6775ab3b..78c7fef6 100644 --- a/src/queue/jobs/reopen-merge-request.ts +++ b/src/queue/jobs/reopen-merge-request.ts @@ -67,7 +67,7 @@ export const reopenMergeRequest = createJob({ const pullRequest = await dbClient .selectFrom('homie.pull_request') - .where('ext_gitlab_merge_request_id', '=', merge_request.id) + .where('ext_gitlab_merge_request_id', '=', String(merge_request.id)) .select(['id']) .executeTakeFirst() @@ -139,8 +139,8 @@ export const reopenMergeRequest = createJob({ await dbClient .insertInto('homie.pull_request') .values({ - ext_gitlab_merge_request_id: merge_request.id, - ext_gitlab_merge_request_iid: merge_request.iid, + ext_gitlab_merge_request_id: String(merge_request.id), + ext_gitlab_merge_request_iid: String(merge_request.iid), number: merge_request.iid, organization_id: organization.id, contributor_id: contributor.id, diff --git a/src/queue/jobs/reopen-pull-request.ts b/src/queue/jobs/reopen-pull-request.ts index c8407957..7a57182e 100644 --- a/src/queue/jobs/reopen-pull-request.ts +++ b/src/queue/jobs/reopen-pull-request.ts @@ -76,7 +76,7 @@ export const reopenPullRequest = createJob({ const pullRequest = await dbClient .selectFrom('homie.pull_request') - .where('ext_gh_pull_request_id', '=', pull_request.id) + .where('ext_gh_pull_request_id', '=', pull_request.id.toString()) .select(['id']) .executeTakeFirst() @@ -140,7 +140,7 @@ export const reopenPullRequest = createJob({ .insertInto('homie.pull_request') .values({ created_at: parseISO(pull_request.created_at), - ext_gh_pull_request_id: pull_request.id, + ext_gh_pull_request_id: String(pull_request.id), organization_id: organization.id, contributor_id: contributor.id, title: pull_request.title, diff --git a/src/queue/jobs/save-opened-merge-request.ts b/src/queue/jobs/save-opened-merge-request.ts index 03ed5e3e..8fca1ef3 100644 --- a/src/queue/jobs/save-opened-merge-request.ts +++ b/src/queue/jobs/save-opened-merge-request.ts @@ -112,8 +112,8 @@ export const saveOpenedMergeRequest = createJob({ await dbClient .insertInto('homie.pull_request') .values({ - ext_gitlab_merge_request_id: merge_request.id, - ext_gitlab_merge_request_iid: merge_request.iid, + ext_gitlab_merge_request_id: String(merge_request.id), + ext_gitlab_merge_request_iid: String(merge_request.iid), number: merge_request.iid, organization_id: organization.id, contributor_id: contributor.id, diff --git a/src/queue/jobs/save-opened-pull-request.ts b/src/queue/jobs/save-opened-pull-request.ts index 4130e323..4fd158b8 100644 --- a/src/queue/jobs/save-opened-pull-request.ts +++ b/src/queue/jobs/save-opened-pull-request.ts @@ -101,7 +101,7 @@ export const saveOpenedPullRequest = createJob({ .insertInto('homie.pull_request') .values({ created_at: parseISO(pull_request.created_at), - ext_gh_pull_request_id: pull_request.id, + ext_gh_pull_request_id: pull_request.id.toString(), organization_id: organization.id, contributor_id: contributor.id, title: pull_request.title,