Skip to content
Source
Sign inSign up

threadTitle.ts

25 lines955 Bytes

1import * as Schema from "effect/Schema";
2​
3import { CommandId, IsoDateTime } from "./baseSchemas.ts";
4​
5export const ThreadTitleRegeneration = Schema.Struct({
6 requestId: CommandId,
7 startedAt: IsoDateTime,
8});
9export type ThreadTitleRegeneration = typeof ThreadTitleRegeneration.Type;
10​
11export const ThreadTitleRegenerationStatus = Schema.Literals(["renamed", "unchanged", "failed"]);
12export type ThreadTitleRegenerationStatus = typeof ThreadTitleRegenerationStatus.Type;
13​
14export const ThreadTitleRegenerationOutcome = Schema.Struct({
15 status: ThreadTitleRegenerationStatus,
16 message: Schema.optional(Schema.String),
17});
18export type ThreadTitleRegenerationOutcome = typeof ThreadTitleRegenerationOutcome.Type;
19​
20export const LastThreadTitleRegeneration = Schema.Struct({
21 ...ThreadTitleRegenerationOutcome.fields,
22 requestId: CommandId,
23 completedAt: IsoDateTime,
24});
25export type LastThreadTitleRegeneration = typeof LastThreadTitleRegeneration.Type;