The best way to control Claude Code, Codex and more from any computer or phone
| 1 | // Generated by @effect/graphql-generator. Do not edit. |
| 2 | import * as Schema from "effect/Schema" |
| 3 | |
| 4 | export const ID = Schema.String |
| 5 | |
| 6 | /** An instant, as an ISO-8601 string. */ |
| 7 | export const DateTime = Schema.DateTimeUtcFromString |
| 8 | |
| 9 | /** - `ANY` */ |
| 10 | export const ReadonlyArray = Schema.Literals(["ANY"]) |
| 11 | export type ReadonlyArray = typeof ReadonlyArray.Type |
| 12 | |
| 13 | /** |
| 14 | * What a member may do in a room. |
| 15 | * |
| 16 | * - `OWNER` |
| 17 | * - `MEMBER` |
| 18 | * - `GUEST` |
| 19 | */ |
| 20 | export const Role = Schema.Literals(["OWNER", "MEMBER", "GUEST"]) |
| 21 | export type Role = typeof Role.Type |
| 22 | |
| 23 | /** Filters messages. */ |
| 24 | export const MessageFilter: Schema.Codec<MessageFilter, MessageFilterEncoded> = Schema.Struct({ |
| 25 | postedAfter: Schema.optional(Schema.NullOr(DateTime)), |
| 26 | member: Schema.optional(Schema.NullOr(Schema.suspend(() => MemberMatch))), |
| 27 | or: Schema.optional(Schema.NullOr(Schema.Array(Schema.suspend(() => MessageFilter)))), |
| 28 | shadow: Schema.optional(Schema.NullOr(ReadonlyArray)) |
| 29 | }) |
| 30 | export interface MessageFilter { |
| 31 | readonly postedAfter?: typeof DateTime.Type | null | undefined |
| 32 | readonly member?: MemberMatch | null | undefined |
| 33 | /** Any of these filters. */ |
| 34 | readonly or?: readonly MessageFilter[] | null | undefined |
| 35 | /** A type named like a TypeScript global, which generated code must not shadow. */ |
| 36 | readonly shadow?: ReadonlyArray | null | undefined |
| 37 | } |
| 38 | export interface MessageFilterEncoded { |
| 39 | readonly postedAfter?: typeof DateTime.Encoded | null | undefined |
| 40 | readonly member?: MemberMatchEncoded | null | undefined |
| 41 | readonly or?: readonly MessageFilterEncoded[] | null | undefined |
| 42 | readonly shadow?: typeof ReadonlyArray.Encoded | null | undefined |
| 43 | } |
| 44 | |
| 45 | /** Exactly one way to match a member. */ |
| 46 | export const MemberMatch: Schema.Codec<MemberMatch, MemberMatchEncoded> = Schema.Union([ |
| 47 | Schema.Struct({ |
| 48 | id: ID, |
| 49 | posted: Schema.optionalKey(Schema.Never) |
| 50 | }), |
| 51 | Schema.Struct({ |
| 52 | id: Schema.optionalKey(Schema.Never), |
| 53 | /** Members who posted a matching message. */ |
| 54 | posted: Schema.suspend(() => MessageFilter) |
| 55 | }) |
| 56 | ]) |
| 57 | export type MemberMatch = |
| 58 | | { readonly id: typeof ID.Type; readonly posted?: never } |
| 59 | | { readonly id?: never; readonly posted: MessageFilter } |
| 60 | export type MemberMatchEncoded = |
| 61 | | { readonly id: typeof ID.Encoded; readonly posted?: never } |
| 62 | | { readonly id?: never; readonly posted: MessageFilterEncoded } |
| 63 | |
| 64 | /** Exactly one way to pick a room. */ |
| 65 | export const RoomBy = Schema.Opaque<RoomBy>()(Schema.Union([ |
| 66 | Schema.Struct({ |
| 67 | id: ID, |
| 68 | slug: Schema.optionalKey(Schema.Never) |
| 69 | }), |
| 70 | Schema.Struct({ |
| 71 | id: Schema.optionalKey(Schema.Never), |
| 72 | slug: Schema.String |
| 73 | }) |
| 74 | ])) |
| 75 | export type RoomBy = |
| 76 | | { readonly id: typeof ID.Type; readonly slug?: never } |
| 77 | | { readonly id?: never; readonly slug: string } |
| 78 | |
| 79 | /** The possible `__typename` values of each interface and union the operations select from. */ |
| 80 | export declare namespace Typename { |
| 81 | /** Every possible `__typename` of interface `Event`. */ |
| 82 | export type Event = "MemberJoined" | "MessagePosted" | "RoomRenamed" |
| 83 | } |