sailfork / t3code-github / apps/ server/ schema/ expo.graphql.ts

// Generated by @effect/graphql-generator. Do not edit.
import * as Schema from "effect/Schema"

export const Int = Schema.Number.check(Schema.isInt32())

export const ID = Schema.String

/** The `JSONObject` scalar type represents JSON objects as specified by [ECMA-404](http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf). */
export const JSONObject = Schema.Json

/**
 * - `ANDROID`
 * - `IOS`
 */
export const AppPlatform = Schema.Literals(["ANDROID", "IOS"])
export type AppPlatform = typeof AppPlatform.Type

/**
 * Where the virtual device's proxied network traffic exits to the internet. When
 * unset, all traffic exits from EAS infrastructure.
 *
 * - `LOCAL`: HTTP(S) requests that honor the device's system proxy exit through a reverse tunnel to the machine running the EAS CLI egress client, so third parties see that machine's public IP. Those requests fail while the client is disconnected. Requests from libraries that bypass the system proxy are not covered and exit from EAS infrastructure. The client must stay connected for the life of the session.
 */
export const DeviceRunSessionEgress = Schema.Literals(["LOCAL"])
export type DeviceRunSessionEgress = typeof DeviceRunSessionEgress.Type

/**
 * The client that sent a session creation request, as reported by that client. Recorded
 * for analytics only and never used for authorization.
 *
 * - `EAS_CLI`
 * - `MCP`
 * - `WEBSITE`
 */
export const DeviceRunSessionRequestOrigin = Schema.Literals(["EAS_CLI", "MCP", "WEBSITE"])
export type DeviceRunSessionRequestOrigin = typeof DeviceRunSessionRequestOrigin.Type

/**
 * - `LARGE`
 * - `MEDIUM`
 */
export const DeviceRunSessionResourceClass = Schema.Literals(["LARGE", "MEDIUM"])
export type DeviceRunSessionResourceClass = typeof DeviceRunSessionResourceClass.Type

/**
 * - `ERRORED`
 * - `IN_PROGRESS`
 * - `NEW`
 * - `QUEUED`: The session's job run waits in the queue for a worker.
 * - `STARTING`: A worker runs the session's job and prepares the virtual device.
 * - `STOPPED`
 */
export const DeviceRunSessionStatus = Schema.Literals(["ERRORED", "IN_PROGRESS", "NEW", "QUEUED", "STARTING", "STOPPED"])
export type DeviceRunSessionStatus = typeof DeviceRunSessionStatus.Type

/**
 * - `AGENT_DEVICE`
 * - `APPIUM`
 * - `ARGENT`
 * - `SERVE_SIM` Deprecated: Use WEB_PREVIEW_ONLY instead.
 * - `WEB_PREVIEW_ONLY`: A session accessed only through its web preview.
 */
export const DeviceRunSessionType = Schema.Literals(["AGENT_DEVICE", "APPIUM", "ARGENT", "SERVE_SIM", "WEB_PREVIEW_ONLY"])
export type DeviceRunSessionType = typeof DeviceRunSessionType.Type

export const CreateAndroidDeviceRunSessionInput = Schema.Struct({
  /** AVD hardware profile id to use for the emulator (e.g. "pixel_9"). */
  deviceIdentifier: Schema.optional(Schema.NullOr(Schema.String)),
  /**
   * Android SDK system image package to use for the emulator (e.g.
   * "system-images;android-35;google_apis;x86_64").
   */
  systemImagePackage: Schema.optional(Schema.NullOr(Schema.String))
})
export interface CreateAndroidDeviceRunSessionInput extends Schema.Struct.Type<typeof CreateAndroidDeviceRunSessionInput.fields> {}

export const CreateIosDeviceRunSessionInput = Schema.Struct({
  /** Simulator device name or UDID to use for the session (e.g. "iPhone 16 Pro"). */
  deviceIdentifier: Schema.optional(Schema.NullOr(Schema.String))
})
export interface CreateIosDeviceRunSessionInput extends Schema.Struct.Type<typeof CreateIosDeviceRunSessionInput.fields> {}

export const CreateDeviceRunSessionInput = Schema.Struct({
  /**
   * The coding agent sending this request, recorded for analytics only and never used for
   * authorization. Surrounding whitespace is trimmed, and a blank value or one over 200 characters
   * is treated as omitted.
   */
  agentId: Schema.optional(Schema.NullOr(Schema.String)),
  /**
   * The coding agent's own session identifier, recorded for analytics only and never used for
   * authorization. Surrounding whitespace is trimmed, and a blank value or one over 200 characters
   * is treated as omitted.
   */
  agentSessionId: Schema.optional(Schema.NullOr(Schema.String)),
  /** Android emulator options. Only supported when platform is ANDROID. */
  android: Schema.optional(Schema.NullOr(CreateAndroidDeviceRunSessionInput)),
  appId: ID,
  /**
   * Application archive URL to download, install, and launch before the simulator session
   * becomes available. Mutually exclusive with buildId, buildFingerprint, and expoGo.
   */
  applicationArchiveUrl: Schema.optional(Schema.NullOr(Schema.String)),
  /**
   * Fingerprint hash of an EAS Build to install and launch before the simulator session becomes
   * available; the server resolves it to the most recent installable build with this fingerprint.
   * Mutually exclusive with buildId, applicationArchiveUrl, and expoGo.
   */
  buildFingerprint: Schema.optional(Schema.NullOr(Schema.String)),
  /**
   * EAS Build to install and launch before the simulator session becomes available.
   * Mutually exclusive with buildFingerprint, applicationArchiveUrl, and expoGo.
   */
  buildId: Schema.optional(Schema.NullOr(ID)),
  /**
   * Origins of pages that may call the session's preview host API cross-origin, for example to
   * render the device with @expo/hub-client. Framing the preview does not need this. Same value
   * rules as frameAncestors. At most 10. The page still needs the preview token from remoteConfig.
   * If omitted, only expo.dev may call the preview API cross-origin.
   */
  corsOrigins: Schema.optional(Schema.NullOr(Schema.Array(Schema.String))),
  /**
   * Where the virtual device's proxied network traffic exits to the internet. If
   * omitted, all traffic exits from EAS infrastructure.
   */
  egress: Schema.optional(Schema.NullOr(DeviceRunSessionEgress)),
  /**
   * Install and launch Expo Go before the simulator session becomes available. The server resolves
   * the platform-specific application archive. Mutually exclusive with buildId, buildFingerprint,
   * and applicationArchiveUrl.
   */
  expoGo: Schema.optional(Schema.NullOr(Schema.Boolean)),
  /**
   * Origins of pages that may embed the session's preview host in a frame, next to expo.dev.
   * Each value is an https origin such as https://app.example.com or a subdomain wildcard such
   * as https://*.example.com; plain http is accepted for localhost only. At most 10. The
   * embedding page still needs the preview token from remoteConfig, and whoever embeds the
   * preview can also control the device. If omitted, only expo.dev may embed the preview.
   */
  frameAncestors: Schema.optional(Schema.NullOr(Schema.Array(Schema.String))),
  /** iOS Simulator options. Only supported when platform is IOS. */
  ios: Schema.optional(Schema.NullOr(CreateIosDeviceRunSessionInput)),
  /**
   * Arguments passed to the installed application when it is launched. Requires buildId,
   * applicationArchiveUrl, or expoGo.
   */
  launchArgs: Schema.optional(Schema.NullOr(Schema.Array(Schema.String))),
  /**
   * Stop the session automatically after this many minutes without observed
   * session activity. Must be positive and smaller than the session's maximum
   * duration (maxRunTimeMinutes when set). Only supported for
   * agent-device, argent, and Appium sessions. If omitted, the session has no idle
   * timeout.
   */
  maxIdleTimeMinutes: Schema.optional(Schema.NullOr(Int)),
  /**
   * Maximum usable session duration, in minutes, starting when the remote session
   * is ready. Must be non-negative and no greater than 40 for normal-priority
   * accounts or 115 for high-priority accounts. The backing job receives an
   * additional five minutes for cleanup.
   */
  maxRunTimeMinutes: Schema.optional(Schema.NullOr(Int)),
  /**
   * Human-readable label for the session, at most 255 characters after leading and
   * trailing whitespace is trimmed. If omitted, the session is unnamed and clients
   * fall back to identifying it by id.
   */
  name: Schema.optional(Schema.NullOr(Schema.String)),
  /**
   * Record HTTP(S) traffic from apps on the device for the whole session. iOS only.
   * HTTPS is decrypted, so recordings contain credentials and cookies in cleartext.
   * If omitted, no traffic is recorded.
   */
  networkCapture: Schema.optional(Schema.NullOr(Schema.Boolean)),
  /**
   * What network capture may keep beyond method, URL, status, timing and size: header, query,
   * request-body, response-body. Each can carry credentials, so nothing here is recorded unless
   * it is asked for. Requires networkCapture.
   */
  networkCaptureFields: Schema.optional(Schema.NullOr(Schema.Array(Schema.String))),
  /**
   * Expo or development-client URL to open after launching the installed application. Requires
   * buildId, applicationArchiveUrl, or expoGo.
   */
  openUrl: Schema.optional(Schema.NullOr(Schema.String)),
  /**
   * The version of the package backing the device run session (e.g. "0.1.3-alpha.3").
   * If omitted, consumers treat the session as pinned to "latest".
   */
  packageVersion: Schema.optional(Schema.NullOr(Schema.String)),
  platform: AppPlatform,
  /**
   * Prefer public preview links and show the preview host's Share button. Defaults to false.
   * This is a presentation preference and does not change access to bearer links.
   */
  publicPreview: Schema.optional(Schema.NullOr(Schema.Boolean)),
  /**
   * The client sending this request, recorded for analytics only. Omit it when the
   * client is not one of the listed values; the session is then reported as unknown.
   */
  requestOrigin: Schema.optional(Schema.NullOr(DeviceRunSessionRequestOrigin)),
  resourceClass: Schema.optional(Schema.NullOr(DeviceRunSessionResourceClass)),
  /**
   * Expo SDK version used to select an Expo Go application archive. Only supported when expoGo is
   * true. If omitted, the current Expo Go archive for the platform is used.
   */
  sdkVersion: Schema.optional(Schema.NullOr(Schema.String)),
  /** Free-form labels for grouping sessions, for example one per app variant. */
  tags: Schema.optional(Schema.NullOr(Schema.Array(Schema.String))),
  type: DeviceRunSessionType
})
export interface CreateDeviceRunSessionInput extends Schema.Struct.Type<typeof CreateDeviceRunSessionInput.fields> {}

export const DeviceRunSessionFilterInput = Schema.Struct({
  /** Case-insensitive match anywhere in the session name. */
  name: Schema.optional(Schema.NullOr(Schema.String)),
  platforms: Schema.optional(Schema.NullOr(Schema.Array(AppPlatform))),
  statuses: Schema.optional(Schema.NullOr(Schema.Array(DeviceRunSessionStatus))),
  /** Matches sessions carrying every listed tag. Case-insensitive. */
  tags: Schema.optional(Schema.NullOr(Schema.Array(Schema.String))),
  types: Schema.optional(Schema.NullOr(Schema.Array(DeviceRunSessionType)))
})
export interface DeviceRunSessionFilterInput extends Schema.Struct.Type<typeof DeviceRunSessionFilterInput.fields> {}

/** The possible `__typename` values of each interface and union the operations select from. */
export declare namespace Typename {
  /** Every possible `__typename` of interface `Actor`. */
  export type Actor = "PartnerActor" | "Robot" | "SSOUser" | "User"
  /** Every possible `__typename` of union `DeviceRunSessionRemoteConfig`. */
  export type DeviceRunSessionRemoteConfig =
    | "AgentDeviceRunSessionRemoteConfig" | "AppiumRunSessionRemoteConfig" | "ArgentRunSessionRemoteConfig"
    | "ServeSimRunSessionRemoteConfig" | "WebPreviewOnlyRunSessionRemoteConfig"
}