Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
95 changes: 0 additions & 95 deletions __tests__/prompts.ts

This file was deleted.

2 changes: 0 additions & 2 deletions src/entity/Settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ export type SettingsFlags = Partial<{
browsingContextEnabled: boolean;
prompt: object;
timezoneMismatchIgnore: string;
lastPrompt: string;
defaultWriteTab: DefaultWriteTab;
}>;

Expand All @@ -53,7 +52,6 @@ export type SettingsFlagsPublic = Pick<
| 'browsingContextEnabled'
| 'prompt'
| 'timezoneMismatchIgnore'
| 'lastPrompt'
| 'defaultWriteTab'
>;

Expand Down
7 changes: 0 additions & 7 deletions src/graphorm/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1483,13 +1483,6 @@ const obj = new GraphORM({
},
},
},
Prompt: {
fields: {
flags: {
jsonType: true,
},
},
},
Product: {
fields: {
flags: {
Expand Down
3 changes: 0 additions & 3 deletions src/graphql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import * as urlDirective from './directive/url';
import * as leaderboard from './schema/leaderboard';
import * as integrations from './schema/integrations';
import * as contentPreference from './schema/contentPreference';
import * as prompts from './schema/prompts';
import * as paddle from './schema/paddle';
import * as njord from './schema/njord';
import * as organizations from './schema/organizations';
Expand Down Expand Up @@ -87,7 +86,6 @@ export const schema = urlDirective.transformer(
leaderboard.typeDefs,
integrations.typeDefs,
contentPreference.typeDefs,
prompts.typeDefs,
paddle.typeDefs,
njord.typeDefs,
organizations.typeDefs,
Expand Down Expand Up @@ -132,7 +130,6 @@ export const schema = urlDirective.transformer(
leaderboard.resolvers,
integrations.resolvers,
contentPreference.resolvers,
prompts.resolvers,
paddle.resolvers,
njord.resolvers,
organizations.resolvers,
Expand Down
37 changes: 37 additions & 0 deletions src/migration/1713268800000-DropPrompt.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import { MigrationInterface, QueryRunner } from 'typeorm';

export class DropPrompt1713268800000 implements MigrationInterface {
name = 'DropPrompt1713268800000';

public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(
`DROP INDEX IF EXISTS "public"."IDX_d8e3aa07a95560a445ad50fb93"`,
);
await queryRunner.query(
`DROP INDEX IF EXISTS "public"."IDX_prompt_order"`,
);
await queryRunner.query(`DROP TABLE IF EXISTS "prompt"`);
}

public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(
`CREATE TABLE "prompt" (
"id" text NOT NULL,
"order" integer NOT NULL,
"label" text NOT NULL,
"description" text,
"prompt" text NOT NULL,
"createdAt" TIMESTAMP NOT NULL DEFAULT now(),
"updatedAt" TIMESTAMP NOT NULL DEFAULT now(),
"flags" jsonb NOT NULL DEFAULT '{}',
CONSTRAINT "PK_d8e3aa07a95560a445ad50fb931" PRIMARY KEY ("id")
)`,
);
await queryRunner.query(
`CREATE INDEX "IDX_d8e3aa07a95560a445ad50fb93" ON "prompt" ("id")`,
);
await queryRunner.query(
`CREATE INDEX "IDX_prompt_order" ON "prompt" ("order")`,
);
}
}
1 change: 0 additions & 1 deletion src/schema/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ export const typeDefs = /* GraphQL */ `
noAiFeedEnabled: Boolean
browsingContextEnabled: Boolean
timezoneMismatchIgnore: String
lastPrompt: String
defaultWriteTab: DefaultWriteTab
}

Expand Down
Loading