@devries-cameron20 / t3code Mirror · read-only
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 21, 04:45 UTC

main
ts 282 lines 10.9 KB
Raw
1 // Generated by @effect/graphql-generator from ExpoApi.graphql. Do not edit.
2 import { GraphQL, GraphQLGroup } from "effect/graphql"
3 import * as Schema from "effect/Schema"
4 import * as Shared from "../../schema/expo.graphql.ts"
5
6 /** Represents an Exponent App (or Experience in legacy terms) */
7 export const NodeApp = Schema.Struct({
8 id: Shared.ID,
9 fullName: Schema.String
10 })
11 export interface NodeApp extends Schema.Struct.Type<typeof NodeApp.fields> {}
12
13 export const AccountAppsEdge = Schema.Struct({
14 node: NodeApp
15 })
16 export interface AccountAppsEdge extends Schema.Struct.Type<typeof AccountAppsEdge.fields> {}
17
18 export const AccountAppsConnection = Schema.Struct({
19 edges: Schema.Array(AccountAppsEdge)
20 })
21 export interface AccountAppsConnection extends Schema.Struct.Type<typeof AccountAppsConnection.fields> {}
22
23 /**
24 * An account is a container owning projects, credentials, billing and other organization
25 * data and settings. Actors may own and be members of accounts.
26 */
27 export const Account = Schema.Struct({
28 name: Schema.String,
29 /** Paginated list of apps associated with this account. By default sorted by name. Use filter to adjust the sorting order. */
30 appsPaginated: AccountAppsConnection
31 })
32 export interface Account extends Schema.Struct.Type<typeof Account.fields> {}
33
34 /** Represents a human SSO (not robot) actor. */
35 export const SSOUser = Schema.Struct({
36 __typename: Schema.Literal("SSOUser"),
37 username: Schema.String,
38 accounts: Schema.Array(Account)
39 })
40 export interface SSOUser extends Schema.Struct.Type<typeof SSOUser.fields> {}
41
42 /** Represents a human (not robot) actor. */
43 export const User = Schema.Struct({
44 __typename: Schema.Literal("User"),
45 username: Schema.String,
46 accounts: Schema.Array(Account)
47 })
48 export interface User extends Schema.Struct.Type<typeof User.fields> {}
49
50 /** Represents a robot (not human) actor. */
51 export const Robot = Schema.Struct({
52 __typename: Schema.Literal("Robot"),
53 firstName: Schema.NullOr(Schema.String),
54 /** Associated accounts */
55 accounts: Schema.Array(Account)
56 })
57 export interface Robot extends Schema.Struct.Type<typeof Robot.fields> {}
58
59 /** A regular user, SSO user, or robot that can authenticate with Expo services and be a member of accounts. */
60 export const ActorOther = Schema.Struct({
61 __typename: GraphQL.otherTypename<Shared.Typename.Actor>()(["SSOUser", "User", "Robot"]),
62 /** Associated accounts */
63 accounts: Schema.Array(Account)
64 })
65 export interface ActorOther extends Schema.Struct.Type<typeof ActorOther.fields> {}
66
67 /** `query T3ExpoViewer` */
68 export const T3ExpoViewer = GraphQL.query("T3ExpoViewer", {
69 document: {
70 variables: [],
71 selections: [
72 { name: "meActor", body: ["{__typename...on UserActor{username}...on Robot{firstName}accounts{name appsPaginated(first:100){edges{node{id fullName}}}}}"] }
73 ],
74 fragments: []
75 },
76 result: Schema.Struct({
77 /**
78 * If authenticated as any type of Actor, this is the appropriate top-level
79 * query object
80 */
81 meActor: Schema.NullOr(Schema.Union([
82 SSOUser,
83 User,
84 Robot,
85 ActorOther
86 ]))
87 })
88 })
89 export declare namespace T3ExpoViewer {
90 export type Variables = typeof T3ExpoViewer.variables.Type
91 export type Result = typeof T3ExpoViewer.result.Type
92 }
93
94 export const CreateDeviceRunSessionDeviceRunSession = Schema.Struct({
95 id: Shared.ID
96 })
97 export interface CreateDeviceRunSessionDeviceRunSession extends Schema.Struct.Type<typeof CreateDeviceRunSessionDeviceRunSession.fields> {}
98
99 export const T3CreateEasSimulatorSessionDeviceRunSessionDeviceRunSessionMutation = Schema.Struct({
100 /** Create a device run session */
101 createDeviceRunSession: CreateDeviceRunSessionDeviceRunSession
102 })
103 export interface T3CreateEasSimulatorSessionDeviceRunSessionDeviceRunSessionMutation extends Schema.Struct.Type<typeof T3CreateEasSimulatorSessionDeviceRunSessionDeviceRunSessionMutation.fields> {}
104
105 /** `mutation T3CreateEasSimulatorSession` */
106 export const T3CreateEasSimulatorSession = GraphQL.mutation("T3CreateEasSimulatorSession", {
107 document: {
108 variables: [
109 { name: "input", body: "CreateDeviceRunSessionInput!" }
110 ],
111 selections: [
112 { name: "deviceRunSession", body: ["{createDeviceRunSession(deviceRunSessionInput:$", "input", "){id}}"] }
113 ],
114 fragments: []
115 },
116 variables: {
117 input: Shared.CreateDeviceRunSessionInput
118 },
119 result: Schema.Struct({
120 /** Mutations that create, stop, update, and delete device run sessions */
121 deviceRunSession: T3CreateEasSimulatorSessionDeviceRunSessionDeviceRunSessionMutation
122 })
123 })
124 export declare namespace T3CreateEasSimulatorSession {
125 export type Variables = typeof T3CreateEasSimulatorSession.variables.Type
126 export type Result = typeof T3CreateEasSimulatorSession.result.Type
127 }
128
129 export const AgentDeviceRunSessionRemoteConfig = Schema.Struct({
130 __typename: Schema.Literal("AgentDeviceRunSessionRemoteConfig"),
131 agentDeviceRemoteSessionUrl: Schema.String,
132 agentDeviceRemoteSessionToken: Schema.String,
133 /** Session token gating the web preview. Null when the preview runs ungated. */
134 webPreviewToken: Schema.NullOr(Schema.String),
135 /** URL of the preview server, for reaching its API rather than its page. */
136 previewApiUrl: Schema.NullOr(Schema.String)
137 })
138 export interface AgentDeviceRunSessionRemoteConfig extends Schema.Struct.Type<typeof AgentDeviceRunSessionRemoteConfig.fields> {}
139
140 export const DeviceRunSessionRemoteConfigOther = Schema.Struct({
141 __typename: GraphQL.otherTypename<Shared.Typename.DeviceRunSessionRemoteConfig>()(["AgentDeviceRunSessionRemoteConfig"])
142 })
143 export interface DeviceRunSessionRemoteConfigOther extends Schema.Struct.Type<typeof DeviceRunSessionRemoteConfigOther.fields> {}
144
145 export const ByIdDeviceRunSession = Schema.Struct({
146 id: Shared.ID,
147 status: GraphQL.enumLiterals(Shared.DeviceRunSessionStatus.literals),
148 remoteConfig: Schema.NullOr(Schema.Union([
149 AgentDeviceRunSessionRemoteConfig,
150 DeviceRunSessionRemoteConfigOther
151 ]))
152 })
153 export interface ByIdDeviceRunSession extends Schema.Struct.Type<typeof ByIdDeviceRunSession.fields> {}
154
155 export const DeviceRunSessionQuery = Schema.Struct({
156 byId: ByIdDeviceRunSession
157 })
158 export interface DeviceRunSessionQuery extends Schema.Struct.Type<typeof DeviceRunSessionQuery.fields> {}
159
160 /** `query T3EasSimulatorSession` */
161 export const T3EasSimulatorSession = GraphQL.query("T3EasSimulatorSession", {
162 document: {
163 variables: [
164 { name: "id", body: "ID!" }
165 ],
166 selections: [
167 { name: "deviceRunSessions", body: ["{byId(deviceRunSessionId:$", "id", "){id status remoteConfig{__typename...on AgentDeviceRunSessionRemoteConfig{agentDeviceRemoteSessionUrl agentDeviceRemoteSessionToken webPreviewToken previewApiUrl}}}}"] }
168 ],
169 fragments: []
170 },
171 variables: {
172 id: Shared.ID
173 },
174 result: Schema.Struct({
175 deviceRunSessions: DeviceRunSessionQuery
176 })
177 })
178 export declare namespace T3EasSimulatorSession {
179 export type Variables = typeof T3EasSimulatorSession.variables.Type
180 export type Result = typeof T3EasSimulatorSession.result.Type
181 }
182
183 export const NodeDeviceRunSession = Schema.Struct({
184 id: Shared.ID,
185 status: GraphQL.enumLiterals(Shared.DeviceRunSessionStatus.literals),
186 /**
187 * Human-readable label set when the session is created or changed later with
188 * updateDeviceRunSession. Null when the session has no name.
189 */
190 name: Schema.NullOr(Schema.String)
191 })
192 export interface NodeDeviceRunSession extends Schema.Struct.Type<typeof NodeDeviceRunSession.fields> {}
193
194 export const AppDeviceRunSessionEdge = Schema.Struct({
195 node: NodeDeviceRunSession
196 })
197 export interface AppDeviceRunSessionEdge extends Schema.Struct.Type<typeof AppDeviceRunSessionEdge.fields> {}
198
199 export const AppDeviceRunSessionsConnection = Schema.Struct({
200 edges: Schema.Array(AppDeviceRunSessionEdge)
201 })
202 export interface AppDeviceRunSessionsConnection extends Schema.Struct.Type<typeof AppDeviceRunSessionsConnection.fields> {}
203
204 /** Represents an Exponent App (or Experience in legacy terms) */
205 export const ByIdApp = Schema.Struct({
206 deviceRunSessionsPaginated: AppDeviceRunSessionsConnection
207 })
208 export interface ByIdApp extends Schema.Struct.Type<typeof ByIdApp.fields> {}
209
210 export const AppQuery = Schema.Struct({
211 /** Look up app by app id */
212 byId: ByIdApp
213 })
214 export interface AppQuery extends Schema.Struct.Type<typeof AppQuery.fields> {}
215
216 /** `query T3ActiveEasSimulatorSessions` */
217 export const T3ActiveEasSimulatorSessions = GraphQL.query("T3ActiveEasSimulatorSessions", {
218 document: {
219 variables: [
220 { name: "appId", body: "String!" },
221 { name: "filter", body: "DeviceRunSessionFilterInput" }
222 ],
223 selections: [
224 { name: "app", body: ["{byId(appId:$", "appId", "){deviceRunSessionsPaginated(first:50 filter:$", "filter", "){edges{node{id status name}}}}}"] }
225 ],
226 fragments: []
227 },
228 variables: {
229 appId: Schema.String,
230 filter: Schema.optional(Schema.NullOr(Shared.DeviceRunSessionFilterInput))
231 },
232 result: Schema.Struct({
233 app: AppQuery
234 })
235 })
236 export declare namespace T3ActiveEasSimulatorSessions {
237 export type Variables = typeof T3ActiveEasSimulatorSessions.variables.Type
238 export type Result = typeof T3ActiveEasSimulatorSessions.result.Type
239 }
240
241 export const EnsureDeviceRunSessionStoppedDeviceRunSession = Schema.Struct({
242 id: Shared.ID,
243 status: GraphQL.enumLiterals(Shared.DeviceRunSessionStatus.literals)
244 })
245 export interface EnsureDeviceRunSessionStoppedDeviceRunSession extends Schema.Struct.Type<typeof EnsureDeviceRunSessionStoppedDeviceRunSession.fields> {}
246
247 export const T3StopEasSimulatorSessionDeviceRunSessionDeviceRunSessionMutation = Schema.Struct({
248 /**
249 * Ensure a device run session is stopped. Idempotent: if the session has already
250 * finished, the existing session is returned unchanged (an ERRORED session stays
251 * ERRORED).
252 */
253 ensureDeviceRunSessionStopped: EnsureDeviceRunSessionStoppedDeviceRunSession
254 })
255 export interface T3StopEasSimulatorSessionDeviceRunSessionDeviceRunSessionMutation extends Schema.Struct.Type<typeof T3StopEasSimulatorSessionDeviceRunSessionDeviceRunSessionMutation.fields> {}
256
257 /** `mutation T3StopEasSimulatorSession` */
258 export const T3StopEasSimulatorSession = GraphQL.mutation("T3StopEasSimulatorSession", {
259 document: {
260 variables: [
261 { name: "id", body: "ID!" }
262 ],
263 selections: [
264 { name: "deviceRunSession", body: ["{ensureDeviceRunSessionStopped(deviceRunSessionId:$", "id", "){id status}}"] }
265 ],
266 fragments: []
267 },
268 variables: {
269 id: Shared.ID
270 },
271 result: Schema.Struct({
272 /** Mutations that create, stop, update, and delete device run sessions */
273 deviceRunSession: T3StopEasSimulatorSessionDeviceRunSessionDeviceRunSessionMutation
274 })
275 })
276 export declare namespace T3StopEasSimulatorSession {
277 export type Variables = typeof T3StopEasSimulatorSession.variables.Type
278 export type Result = typeof T3StopEasSimulatorSession.result.Type
279 }
280
281 /** Every operation in ExpoApi.graphql. */
282 export const ExpoApiGraphQLGroup = GraphQLGroup.make(T3ExpoViewer, T3CreateEasSimulatorSession, T3EasSimulatorSession, T3ActiveEasSimulatorSessions, T3StopEasSimulatorSession)