refactor(schema): extract shared public schemas (#33571)
This commit is contained in:
parent
60aba622ab
commit
516cfe4e09
130 changed files with 2014 additions and 1593 deletions
22
packages/schema/src/session-input.ts
Normal file
22
packages/schema/src/session-input.ts
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
export * as SessionInput from "./session-input"
|
||||
|
||||
import { Schema } from "effect"
|
||||
import { Prompt } from "./prompt"
|
||||
import { DateTimeUtcFromMillis, NonNegativeInt } from "./schema"
|
||||
import { SessionDelivery } from "./session-delivery"
|
||||
import { SessionID } from "./session-id"
|
||||
import { SessionMessageID } from "./session-message-id"
|
||||
|
||||
export const Delivery = SessionDelivery.Delivery
|
||||
export type Delivery = SessionDelivery.Delivery
|
||||
|
||||
export interface Admitted extends Schema.Schema.Type<typeof Admitted> {}
|
||||
export const Admitted = Schema.Struct({
|
||||
admittedSeq: NonNegativeInt,
|
||||
id: SessionMessageID.ID,
|
||||
sessionID: SessionID.ID,
|
||||
prompt: Prompt,
|
||||
delivery: Delivery,
|
||||
timeCreated: DateTimeUtcFromMillis,
|
||||
promotedSeq: NonNegativeInt.pipe(Schema.optional),
|
||||
}).annotate({ identifier: "SessionInput.Admitted" })
|
||||
Loading…
Add table
Add a link
Reference in a new issue