mirror of
https://github.com/Effect-TS/effect.git
synced 2026-12-04 03:35:36 +08:00
36 lines
987 B
TypeScript
36 lines
987 B
TypeScript
// Generated by @effect/graphql-generator. Do not edit.
|
|
import * as Schema from "effect/Schema"
|
|
|
|
export const ID = Schema.String
|
|
|
|
/**
|
|
* What a member may do in a room.
|
|
*
|
|
* - `OWNER`
|
|
* - `MEMBER`
|
|
* - `GUEST`
|
|
*/
|
|
export const Role = Schema.Literals(["OWNER", "MEMBER", "GUEST"])
|
|
export type Role = typeof Role.Type
|
|
|
|
/** Exactly one way to pick a room. */
|
|
export const RoomBy = Schema.Opaque<RoomBy>()(Schema.Union([
|
|
Schema.Struct({
|
|
id: ID,
|
|
slug: Schema.optionalKey(Schema.Never)
|
|
}),
|
|
Schema.Struct({
|
|
id: Schema.optionalKey(Schema.Never),
|
|
slug: Schema.String
|
|
})
|
|
]))
|
|
export type RoomBy =
|
|
| { readonly id: typeof ID.Type; readonly slug?: never }
|
|
| { readonly id?: never; readonly slug: string }
|
|
|
|
/** The possible `__typename` values of each interface and union the operations select from. */
|
|
export declare namespace Typename {
|
|
/** Every possible `__typename` of interface `Event`. */
|
|
export type Event = "MemberJoined" | "MessagePosted" | "RoomRenamed"
|
|
}
|