// Generated by @effect/graphql-generator from ExpoApi.graphql. Do not edit.
import { GraphQL, GraphQLGroup } from "effect/graphql"
import * as Schema from "effect/Schema"
import * as Shared from "../../schema/expo.graphql.ts"
/** Represents an Exponent App (or Experience in legacy terms) */
export const NodeApp = Schema.Struct({
id: Shared.ID,
fullName: Schema.String
})
export interface NodeApp extends Schema.Struct.Type<typeof NodeApp.fields> {}
export const AccountAppsEdge = Schema.Struct({
node: NodeApp
})
export interface AccountAppsEdge extends Schema.Struct.Type<typeof AccountAppsEdge.fields> {}
export const AccountAppsConnection = Schema.Struct({
edges: Schema.Array(AccountAppsEdge)
})
export interface AccountAppsConnection extends Schema.Struct.Type<typeof AccountAppsConnection.fields> {}
/**
* An account is a container owning projects, credentials, billing and other organization
* data and settings. Actors may own and be members of accounts.
*/
export const AccountsAccount = Schema.Struct({
name: Schema.String,
/** Paginated list of apps associated with this account. By default sorted by name. Use filter to adjust the sorting order. */
appsPaginated: AccountAppsConnection
})
export interface AccountsAccount extends Schema.Struct.Type<typeof AccountsAccount.fields> {}
/** Represents a human SSO (not robot) actor. */
export const SSOUser = Schema.Struct({
__typename: Schema.Literal("SSOUser"),
username: Schema.String,
accounts: Schema.Array(AccountsAccount)
})
export interface SSOUser extends Schema.Struct.Type<typeof SSOUser.fields> {}
/** Represents a human (not robot) actor. */
export const User = Schema.Struct({
__typename: Schema.Literal("User"),
username: Schema.String,
accounts: Schema.Array(AccountsAccount)
})
export interface User extends Schema.Struct.Type<typeof User.fields> {}
/** Represents a robot (not human) actor. */
export const Robot = Schema.Struct({
__typename: Schema.Literal("Robot"),
firstName: Schema.NullOr(Schema.String),
/** Associated accounts */
accounts: Schema.Array(AccountsAccount)
})
export interface Robot extends Schema.Struct.Type<typeof Robot.fields> {}
/** A regular user, SSO user, or robot that can authenticate with Expo services and be a member of accounts. */
export const ActorOther = Schema.Struct({
__typename: GraphQL.otherTypename<Shared.Typename.Actor>()(["SSOUser", "User", "Robot"]),
/** Associated accounts */
accounts: Schema.Array(AccountsAccount)
})
export interface ActorOther extends Schema.Struct.Type<typeof ActorOther.fields> {}
/** `query T3ExpoViewer` */
export const T3ExpoViewer = GraphQL.query("T3ExpoViewer", {
document: {
variables: [],
selections: [
{ name: "meActor", body: ["{__typename...on UserActor{username}...on Robot{firstName}accounts{name appsPaginated(first:100){edges{node{id fullName}}}}}"] }
],
fragments: []
},
result: Schema.Struct({
/**
* If authenticated as any type of Actor, this is the appropriate top-level
* query object
*/
meActor: Schema.NullOr(Schema.Union([
SSOUser,
User,
Robot,
ActorOther
]))
})
})
export declare namespace T3ExpoViewer {
export type Variables = typeof T3ExpoViewer.variables.Type
export type Result = typeof T3ExpoViewer.result.Type
}
/**
* An account is a container owning projects, credentials, billing and other organization
* data and settings. Actors may own and be members of accounts.
*/
export const OwnerAccountAccount = Schema.Struct({
name: Schema.String,
/** Server account feature gate values for this account, optionally filtering by desired gates. */
accountFeatureGates: Shared.JSONObject
})
export interface OwnerAccountAccount extends Schema.Struct.Type<typeof OwnerAccountAccount.fields> {}
/** Represents an Exponent App (or Experience in legacy terms) */
export const T3EasSimulatorAvailabilityAppByIdApp = Schema.Struct({
ownerAccount: OwnerAccountAccount
})
export interface T3EasSimulatorAvailabilityAppByIdApp extends Schema.Struct.Type<typeof T3EasSimulatorAvailabilityAppByIdApp.fields> {}
export const T3EasSimulatorAvailabilityAppAppQuery = Schema.Struct({
/** Look up app by app id */
byId: T3EasSimulatorAvailabilityAppByIdApp
})
export interface T3EasSimulatorAvailabilityAppAppQuery extends Schema.Struct.Type<typeof T3EasSimulatorAvailabilityAppAppQuery.fields> {}
/** `query T3EasSimulatorAvailability` */
export const T3EasSimulatorAvailability = GraphQL.query("T3EasSimulatorAvailability", {
document: {
variables: [
{ name: "appId", body: "String!" },
{ name: "filter", body: "[String!]" }
],
selections: [
{ name: "app", body: ["{byId(appId:$", "appId", "){ownerAccount{name accountFeatureGates(filter:$", "filter", ")}}}"] }
],
fragments: []
},
variables: {
appId: Schema.String,
filter: Schema.optional(Schema.NullOr(Schema.Array(Schema.String)))
},
result: Schema.Struct({
app: T3EasSimulatorAvailabilityAppAppQuery
})
})
export declare namespace T3EasSimulatorAvailability {
export type Variables = typeof T3EasSimulatorAvailability.variables.Type
export type Result = typeof T3EasSimulatorAvailability.result.Type
}
export const CreateDeviceRunSessionDeviceRunSession = Schema.Struct({
id: Shared.ID
})
export interface CreateDeviceRunSessionDeviceRunSession extends Schema.Struct.Type<typeof CreateDeviceRunSessionDeviceRunSession.fields> {}
export const T3CreateEasSimulatorSessionDeviceRunSessionDeviceRunSessionMutation = Schema.Struct({
/** Create a device run session */
createDeviceRunSession: CreateDeviceRunSessionDeviceRunSession
})
export interface T3CreateEasSimulatorSessionDeviceRunSessionDeviceRunSessionMutation extends Schema.Struct.Type<typeof T3CreateEasSimulatorSessionDeviceRunSessionDeviceRunSessionMutation.fields> {}
/** `mutation T3CreateEasSimulatorSession` */
export const T3CreateEasSimulatorSession = GraphQL.mutation("T3CreateEasSimulatorSession", {
document: {
variables: [
{ name: "input", body: "CreateDeviceRunSessionInput!" }
],
selections: [
{ name: "deviceRunSession", body: ["{createDeviceRunSession(deviceRunSessionInput:$", "input", "){id}}"] }
],
fragments: []
},
variables: {
input: Shared.CreateDeviceRunSessionInput
},
result: Schema.Struct({
/** Mutations that create, stop, update, and delete device run sessions */
deviceRunSession: T3CreateEasSimulatorSessionDeviceRunSessionDeviceRunSessionMutation
})
})
export declare namespace T3CreateEasSimulatorSession {
export type Variables = typeof T3CreateEasSimulatorSession.variables.Type
export type Result = typeof T3CreateEasSimulatorSession.result.Type
}
export const AgentDeviceRunSessionRemoteConfig = Schema.Struct({
__typename: Schema.Literal("AgentDeviceRunSessionRemoteConfig"),
agentDeviceRemoteSessionUrl: Schema.String,
agentDeviceRemoteSessionToken: Schema.String,
/** Session token gating the web preview. Null when the preview runs ungated. */
webPreviewToken: Schema.NullOr(Schema.String),
/** URL of the preview server, for reaching its API rather than its page. */
previewApiUrl: Schema.NullOr(Schema.String)
})
export interface AgentDeviceRunSessionRemoteConfig extends Schema.Struct.Type<typeof AgentDeviceRunSessionRemoteConfig.fields> {}
export const DeviceRunSessionRemoteConfigOther = Schema.Struct({
__typename: GraphQL.otherTypename<Shared.Typename.DeviceRunSessionRemoteConfig>()(["AgentDeviceRunSessionRemoteConfig"])
})
export interface DeviceRunSessionRemoteConfigOther extends Schema.Struct.Type<typeof DeviceRunSessionRemoteConfigOther.fields> {}
export const ByIdDeviceRunSession = Schema.Struct({
id: Shared.ID,
status: GraphQL.enumLiterals(Shared.DeviceRunSessionStatus.literals),
remoteConfig: Schema.NullOr(Schema.Union([
AgentDeviceRunSessionRemoteConfig,
DeviceRunSessionRemoteConfigOther
]))
})
export interface ByIdDeviceRunSession extends Schema.Struct.Type<typeof ByIdDeviceRunSession.fields> {}
export const DeviceRunSessionQuery = Schema.Struct({
byId: ByIdDeviceRunSession
})
export interface DeviceRunSessionQuery extends Schema.Struct.Type<typeof DeviceRunSessionQuery.fields> {}
/** `query T3EasSimulatorSession` */
export const T3EasSimulatorSession = GraphQL.query("T3EasSimulatorSession", {
document: {
variables: [
{ name: "id", body: "ID!" }
],
selections: [
{ name: "deviceRunSessions", body: ["{byId(deviceRunSessionId:$", "id", "){id status remoteConfig{__typename...on AgentDeviceRunSessionRemoteConfig{agentDeviceRemoteSessionUrl agentDeviceRemoteSessionToken webPreviewToken previewApiUrl}}}}"] }
],
fragments: []
},
variables: {
id: Shared.ID
},
result: Schema.Struct({
deviceRunSessions: DeviceRunSessionQuery
})
})
export declare namespace T3EasSimulatorSession {
export type Variables = typeof T3EasSimulatorSession.variables.Type
export type Result = typeof T3EasSimulatorSession.result.Type
}
export const NodeDeviceRunSession = Schema.Struct({
id: Shared.ID,
status: GraphQL.enumLiterals(Shared.DeviceRunSessionStatus.literals),
/**
* Human-readable label set when the session is created or changed later with
* updateDeviceRunSession. Null when the session has no name.
*/
name: Schema.NullOr(Schema.String)
})
export interface NodeDeviceRunSession extends Schema.Struct.Type<typeof NodeDeviceRunSession.fields> {}
export const AppDeviceRunSessionEdge = Schema.Struct({
node: NodeDeviceRunSession
})
export interface AppDeviceRunSessionEdge extends Schema.Struct.Type<typeof AppDeviceRunSessionEdge.fields> {}
export const AppDeviceRunSessionsConnection = Schema.Struct({
edges: Schema.Array(AppDeviceRunSessionEdge)
})
export interface AppDeviceRunSessionsConnection extends Schema.Struct.Type<typeof AppDeviceRunSessionsConnection.fields> {}
/** Represents an Exponent App (or Experience in legacy terms) */
export const T3ActiveEasSimulatorSessionsAppByIdApp = Schema.Struct({
deviceRunSessionsPaginated: AppDeviceRunSessionsConnection
})
export interface T3ActiveEasSimulatorSessionsAppByIdApp extends Schema.Struct.Type<typeof T3ActiveEasSimulatorSessionsAppByIdApp.fields> {}
export const T3ActiveEasSimulatorSessionsAppAppQuery = Schema.Struct({
/** Look up app by app id */
byId: T3ActiveEasSimulatorSessionsAppByIdApp
})
export interface T3ActiveEasSimulatorSessionsAppAppQuery extends Schema.Struct.Type<typeof T3ActiveEasSimulatorSessionsAppAppQuery.fields> {}
/** `query T3ActiveEasSimulatorSessions` */
export const T3ActiveEasSimulatorSessions = GraphQL.query("T3ActiveEasSimulatorSessions", {
document: {
variables: [
{ name: "appId", body: "String!" },
{ name: "filter", body: "DeviceRunSessionFilterInput" }
],
selections: [
{ name: "app", body: ["{byId(appId:$", "appId", "){deviceRunSessionsPaginated(first:50 filter:$", "filter", "){edges{node{id status name}}}}}"] }
],
fragments: []
},
variables: {
appId: Schema.String,
filter: Schema.optional(Schema.NullOr(Shared.DeviceRunSessionFilterInput))
},
result: Schema.Struct({
app: T3ActiveEasSimulatorSessionsAppAppQuery
})
})
export declare namespace T3ActiveEasSimulatorSessions {
export type Variables = typeof T3ActiveEasSimulatorSessions.variables.Type
export type Result = typeof T3ActiveEasSimulatorSessions.result.Type
}
export const EnsureDeviceRunSessionStoppedDeviceRunSession = Schema.Struct({
id: Shared.ID,
status: GraphQL.enumLiterals(Shared.DeviceRunSessionStatus.literals)
})
export interface EnsureDeviceRunSessionStoppedDeviceRunSession extends Schema.Struct.Type<typeof EnsureDeviceRunSessionStoppedDeviceRunSession.fields> {}
export const T3StopEasSimulatorSessionDeviceRunSessionDeviceRunSessionMutation = Schema.Struct({
/**
* Ensure a device run session is stopped. Idempotent: if the session has already
* finished, the existing session is returned unchanged (an ERRORED session stays
* ERRORED).
*/
ensureDeviceRunSessionStopped: EnsureDeviceRunSessionStoppedDeviceRunSession
})
export interface T3StopEasSimulatorSessionDeviceRunSessionDeviceRunSessionMutation extends Schema.Struct.Type<typeof T3StopEasSimulatorSessionDeviceRunSessionDeviceRunSessionMutation.fields> {}
/** `mutation T3StopEasSimulatorSession` */
export const T3StopEasSimulatorSession = GraphQL.mutation("T3StopEasSimulatorSession", {
document: {
variables: [
{ name: "id", body: "ID!" }
],
selections: [
{ name: "deviceRunSession", body: ["{ensureDeviceRunSessionStopped(deviceRunSessionId:$", "id", "){id status}}"] }
],
fragments: []
},
variables: {
id: Shared.ID
},
result: Schema.Struct({
/** Mutations that create, stop, update, and delete device run sessions */
deviceRunSession: T3StopEasSimulatorSessionDeviceRunSessionDeviceRunSessionMutation
})
})
export declare namespace T3StopEasSimulatorSession {
export type Variables = typeof T3StopEasSimulatorSession.variables.Type
export type Result = typeof T3StopEasSimulatorSession.result.Type
}
/** Every operation in ExpoApi.graphql. */
export const ExpoApiGraphQLGroup = GraphQLGroup.make(T3ExpoViewer, T3EasSimulatorAvailability, T3CreateEasSimulatorSession, T3EasSimulatorSession, T3ActiveEasSimulatorSessions, T3StopEasSimulatorSession)