@devries-cameron20 / t3code-1 / commits / 99209c7ffa
Fork 0

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

feat(server): Expo credentials, EAS Simulator API, and EAS project lookup (#21843)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

Julius Marminge committed Oct 20, 2026 at 00:57 UTC 99209c7ffaee17b984405040d015dccb4b33d0c5
22 files changed +13989 -7
.gitattributes
+2 -1
@@ -3,6 +3,7 @@
3 # Batch files need CRLF for cmd.exe to parse them reliably.
4 *.cmd text eol=crlf
5 *.bat text eol=crlf
6 -# GitHub's GraphQL schema and the operations graphqlgen writes from it.
6 +# GitHub's and Expo's GraphQL schemas and the operations graphqlgen writes from them.
7 packages/source-control-github/schema/** linguist-generated
8 +apps/server/schema/** linguist-generated
9 **/*.graphql.ts linguist-generated
.github/workflows/ci.yml
+3
@@ -93,6 +93,9 @@ jobs:
93 - name: Check generated GitHub GraphQL operations
94 run: vp run --filter @t3tools/source-control-github generate --check
95
96 + - name: Check generated Expo GraphQL operations
97 + run: vp run --filter t3 generate --check
98 +
99 - name: Check
100 run: vp check
101
apps/server/graphql.config.ts new
+13
@@ -0,0 +1,13 @@
1 +import { defineConfig } from "@effect/graphql-generator/Config";
2 +
3 +// `schema/expo.graphql` is api.expo.dev's schema, read by introspection
4 +// (`vp run generate:expo-schema`). The EAS Simulator operations are the ones
5 +// eas-cli's `simulator:*` commands send; Expo does not document them.
6 +export default defineConfig({
7 + schema: "./schema/expo.graphql",
8 + documents: ["src/device/**/*.graphql"],
9 + scalars: {
10 + // Feature gates arrive as an object of gate name to boolean.
11 + JSONObject: "effect/Schema#Json",
12 + },
13 +});
apps/server/package.json
+5 -1
@@ -26,7 +26,9 @@
26 "record:cursor-replay": "node --env-file-if-exists=../../.env --experimental-strip-types scripts/record-cursor-agent-sdk-replay-fixture.ts",
27 "record:pi-replay": "node scripts/record-pi-rpc-replay-fixture.ts",
28 "record:grok-replay": "node scripts/record-grok-acp-replay-fixture.ts",
29 - "record:muse-replay": "node scripts/record-muse-msp-replay-fixture.ts"
29 + "record:muse-replay": "node scripts/record-muse-msp-replay-fixture.ts",
30 + "generate": "graphqlgen",
31 + "generate:expo-schema": "node scripts/fetch-expo-schema.ts"
32 },
33 "dependencies": {
34 "@anthropic-ai/claude-agent-sdk": "^0.3.276",
@@ -64,6 +66,7 @@
66 "yauzl": "^3.4.0"
67 },
68 "devDependencies": {
69 + "@effect/graphql-generator": "catalog:",
70 "@effect/vitest": "catalog:",
71 "@modelcontextprotocol/sdk": "1.29.0",
72 "@t3tools/contracts": "workspace:*",
@@ -78,6 +81,7 @@
81 "@types/yauzl": "^3.4.0",
82 "effect-acp": "workspace:*",
83 "effect-codex-app-server": "workspace:*",
84 + "graphql": "16.14.1",
85 "vite-plus": "catalog:"
86 },
87 "engines": {
apps/server/schema/expo.graphql new
+11587
@@ -0,0 +1,11587 @@
1 +schema {
2 + query: RootQuery
3 + mutation: RootMutation
4 +}
5 +
6 +type AcceptUserInvitationResult {
7 + success: Boolean!
8 +}
9 +
10 +"""A method of authentication for an Actor"""
11 +type AccessToken {
12 + createdAt: DateTime!
13 + id: ID!
14 + lastUsedAt: DateTime
15 + note: String
16 + owner: Actor!
17 + revokedAt: DateTime
18 +
19 + """
20 + Scopes this token is restricted to. Null for a full token that authenticates as the owner
21 + with all of their permissions.
22 + """
23 + scopes: [AccessTokenScope!]
24 + updatedAt: DateTime!
25 + visibleTokenPrefix: String!
26 +}
27 +
28 +type AccessTokenMutation {
29 + """Create an AccessToken for an Actor"""
30 + createAccessToken(createAccessTokenData: CreateAccessTokenInput!): CreateAccessTokenResponse!
31 +
32 + """Delete an AccessToken"""
33 + deleteAccessToken(id: ID!): DeleteAccessTokenResult!
34 +
35 + """Revoke an AccessToken"""
36 + setAccessTokenRevoked(id: ID!, revoked: Boolean): AccessToken!
37 +}
38 +
39 +"""One scope narrowing an AccessToken below its owner's full access"""
40 +type AccessTokenScope {
41 + """The account this scope applies to. Only present for ACCOUNT scopes."""
42 + accountID: ID
43 + permissions: [Permission!]!
44 + type: AccessTokenScopeType!
45 +}
46 +
47 +input AccessTokenScopeInput {
48 + """
49 + The account this scope applies to. Required for ACCOUNT scopes and must be omitted for
50 + ALL_ACCOUNTS scopes.
51 + """
52 + accountID: ID
53 + permissions: [Permission!]!
54 + type: AccessTokenScopeType!
55 +}
56 +
57 +enum AccessTokenScopeType {
58 + """One account, named by accountID, narrowed to the scope's permissions."""
59 + ACCOUNT
60 +
61 + """
62 + Every account the token's owner has permissions on at request time, narrowed to the
63 + scope's permissions.
64 + """
65 + ALL_ACCOUNTS
66 +}
67 +
68 +"""
69 +A GitHub App installation visible to a viewer, not necessarily linked yet.
70 +"""
71 +type AccessibleGitHubAppInstallation {
72 + account: AccessibleGitHubAppInstallationAccount!
73 + installationIdentifier: Int!
74 +}
75 +
76 +type AccessibleGitHubAppInstallationAccount {
77 + avatarUrl: String!
78 + login: String!
79 + type: GitHubAppInstallationAccountType!
80 +}
81 +
82 +type AccessibleGitHubRepository {
83 + id: Int!
84 + name: String!
85 + nodeId: String!
86 + owner: AccessibleGitHubRepositoryOwner!
87 + private: Boolean!
88 +}
89 +
90 +type AccessibleGitHubRepositoryOwner {
91 + login: String!
92 +}
93 +
94 +"""
95 +An account is a container owning projects, credentials, billing and other organization
96 +data and settings. Actors may own and be members of accounts.
97 +"""
98 +type Account {
99 + """
100 + Server account feature gate values for this account, optionally filtering by desired gates.
101 + """
102 + accountFeatureGates(filter: [String!]): JSONObject!
103 +
104 + """Coalesced project activity for all apps belonging to this account."""
105 + activityTimelineProjectActivities(
106 + """ Offset the query """
107 + createdBefore: DateTime
108 +
109 + """ Types of objects to filter """
110 + filterTypes: [ActivityTimelineProjectActivityType!]
111 + limit: Int!
112 + ): [ActivityTimelineProjectActivity!]!
113 +
114 + """AI provider connections available to agent sandbox sessions."""
115 + agentProviderConnections: [AgentProviderConnection!]!
116 + appCount: Int!
117 + appStoreConnectApiKeys: [AppStoreConnectApiKey!]! @deprecated(reason: "Use appStoreConnectApiKeysPaginated")
118 + appStoreConnectApiKeysPaginated(after: String, before: String, first: Int, last: Int): AccountAppStoreConnectApiKeysConnection!
119 + appleAppIdentifiers(bundleIdentifier: String): [AppleAppIdentifier!]!
120 + appleDevicesPaginated(after: String, before: String, filter: AppleDeviceFilterInput, first: Int, last: Int): AccountAppleDevicesConnection!
121 + appleDistributionCertificates: [AppleDistributionCertificate!]! @deprecated(reason: "Use appleDistributionCertificatesPaginated")
122 + appleDistributionCertificatesPaginated(after: String, before: String, first: Int, last: Int): AccountAppleDistributionCertificatesConnection!
123 + appleProvisioningProfiles(appleAppIdentifierId: ID): [AppleProvisioningProfile!]! @deprecated(reason: "Use appleProvisioningProfilesPaginated")
124 + appleProvisioningProfilesPaginated(after: String, before: String, first: Int, last: Int): AccountAppleProvisioningProfilesConnection!
125 + applePushKeys: [ApplePushKey!]! @deprecated(reason: "Use applePushKeysPaginated")
126 + applePushKeysPaginated(after: String, before: String, first: Int, last: Int): AccountApplePushKeysConnection!
127 + appleTeams(appleTeamIdentifier: String, limit: Int, offset: Int): [AppleTeam!]! @deprecated(reason: "Use appleTeamsPaginated")
128 +
129 + """iOS credentials for account"""
130 + appleTeamsPaginated(after: String, before: String, filter: AppleTeamFilterInput, first: Int, last: Int): AccountAppleTeamsConnection!
131 +
132 + """Apps associated with this account"""
133 + apps(includeUnpublished: Boolean, limit: Int!, offset: Int!): [App!]! @deprecated(reason: "Use appsPaginated")
134 +
135 + """
136 + Paginated list of apps associated with this account. By default sorted by name. Use filter to adjust the sorting order.
137 + """
138 + appsPaginated(after: String, before: String, filter: AccountAppsFilterInput, first: Int, last: Int): AccountAppsConnection!
139 +
140 + """Audit logs for account"""
141 + auditLogsPaginated(after: String, before: String, filter: AuditLogFilterInput, first: Int, last: Int): AuditLogConnection!
142 +
143 + """
144 + Billing information. Only visible to members with the ADMIN or OWNER role.
145 + """
146 + billing: Billing
147 + billingPeriod(date: DateTime!): BillingPeriod!
148 + concurrencyConsumers(limit: Int! = 500): [ConcurrencyConsumer!]!
149 +
150 + """Convex team connections for this account"""
151 + convexTeamConnections: [ConvexTeamConnection!]!
152 + createdAt: DateTime!
153 +
154 + """
155 + Simulator sessions for all apps associated with this account, sorted newest first.
156 + """
157 + deviceRunSessionsPaginated(after: String, before: String, filter: AccountDeviceRunSessionFilterInput, first: Int, last: Int): AccountDeviceRunSessionsConnection!
158 + displayName: String
159 +
160 + """Environment secrets for an account"""
161 + environmentSecrets(filterNames: [String!]): [EnvironmentSecret!]!
162 + environmentVariableEnvironments: [EnvironmentVariableEnvironment!]!
163 +
164 + """
165 + Whether the account turned on environment variable protection. When protection is on, using,
166 + creating, changing, or deleting a SECRET environment variable needs the PUBLISH_PROTECTED
167 + permission, in every project of the account. Expo can also turn protection on for an
168 + account; this field does not show that.
169 + """
170 + environmentVariableProtectionEnabled: Boolean!
171 +
172 + """Environment variables for an account"""
173 + environmentVariables(environment: EnvironmentVariableEnvironment, filterNames: [String!]): [EnvironmentVariable!]!
174 +
175 + """Environment variables for an account with decrypted secret values"""
176 + environmentVariablesIncludingSensitive(environment: EnvironmentVariableEnvironment, filterNames: [String!]): [EnvironmentVariableWithSecret!]!
177 +
178 + """GitHub App installations for an account"""
179 + githubAppInstallations: [GitHubAppInstallation!]!
180 +
181 + """GitHub Enterprise app registration for an account"""
182 + githubAppRegistration: GitHubAppRegistration
183 + googleServiceAccountKeys: [GoogleServiceAccountKey!]! @deprecated(reason: "Use googleServiceAccountKeysPaginated")
184 +
185 + """Android credentials for account"""
186 + googleServiceAccountKeysPaginated(after: String, before: String, first: Int, last: Int): AccountGoogleServiceAccountKeysConnection!
187 + id: ID!
188 + isCurrent: Boolean!
189 + isDisabled: Boolean!
190 +
191 + """
192 + Whether an Account plan falls into AppDevDomainName's free or paid tier
193 + """
194 + isFreeAppDevDomainTier: Boolean!
195 +
196 + """Whether this account has SSO enabled. Can be queried by all members."""
197 + isSSOEnabled: Boolean!
198 + lastDeletionAttemptTime: DateTime
199 + logRocketOrganization: LogRocketOrganization
200 +
201 + """Aggregate statistics about account members."""
202 + memberStats: AccountMemberStats!
203 +
204 + """
205 + Paginated list of members (actors) associated with this account and their permissions
206 + """
207 + membersPaginated(
208 + after: String
209 + before: String
210 + filter: AccountMembersFilterInput
211 + first: Int
212 + last: Int
213 +
214 + """Filter members by type. Defaults to ALL."""
215 + memberType: AccountMemberType
216 + ): AccountMembersConnection!
217 + name: String!
218 +
219 + """
220 + Whether EAS Observe ingestion is paused for this account. Accounts that have not configured
221 + the setting are treated as false (ingestion enabled).
222 + """
223 + observeIngestionPaused: Boolean!
224 +
225 + """Offers set on this account"""
226 + offers: [Offer!]
227 +
228 + """Onboarding milestone stats for this account"""
229 + onboardingStats: AccountOnboardingStats!
230 +
231 + """Owning User of this account if personal account"""
232 + owner: User @deprecated(reason: "Deprecated in favor of ownerUserActor")
233 +
234 + """Owning UserActor of this account if personal account"""
235 + ownerUserActor: UserActor
236 + pendingSentryInstallation: PendingSentryInstallation
237 +
238 + """PostHog organization connection for this account"""
239 + posthogOrganizationConnection: PostHogOrganizationConnection
240 + profileImageUrl: String!
241 + pushSecurityEnabled: Boolean!
242 + requireTwoFactor: Boolean!
243 + sentryInstallation: SentryInstallation
244 +
245 + """Snacks associated with this account"""
246 + snacks(limit: Int!, offset: Int!): [Snack!]! @deprecated(reason: "Use snacksPaginated")
247 +
248 + """
249 + Paginated list of Snacks associated with this account, sorted by most recent activity.
250 + """
251 + snacksPaginated(after: String, before: String, first: Int, last: Int): AccountSnacksConnection!
252 +
253 + """Allowed SSO providers for this account"""
254 + ssoAllowedAuthProviders: [AuthProviderIdentifier!]!
255 +
256 + """SSO configuration for this account"""
257 + ssoConfiguration: AccountSSOConfiguration
258 +
259 + """Subscription info visible to members that have VIEWER role"""
260 + subscription: SubscriptionDetails
261 +
262 + """Supabase connection for this account"""
263 + supabaseConnection: SupabaseConnection
264 +
265 + """Coalesced project activity for an app using pagination"""
266 + timelineActivity(after: String, before: String, filter: TimelineActivityFilterInput, first: Int, last: Int): TimelineActivityConnection!
267 + updatedAt: DateTime!
268 +
269 + """Account query object for querying EAS usage metrics"""
270 + usageMetrics: AccountUsageMetrics!
271 +
272 + """Pending user invitations for this account"""
273 + userInvitations: [UserInvitation!]!
274 + userSpecifiedAccountUsage: UserSpecifiedAccountUsage
275 +
276 + """Actors associated with this account and permissions they hold"""
277 + users: [UserPermission!]! @deprecated(reason: "Deprecated in favor of membersPaginated and memberStats")
278 +
279 + """Vexo account connection for this account"""
280 + vexoAccountConnection: VexoAccountConnection
281 +
282 + """Notification preferences of the viewer for this account"""
283 + viewerNotificationPreferences: [NotificationPreferenceItem!]!
284 +
285 + """Permission info for the viewer on this account"""
286 + viewerUserPermission: UserPermission! @deprecated(reason: "Use viewerUserPermission2 instead")
287 +
288 + """
289 + Permission info for the viewer on this account, including their effective permissions
290 + """
291 + viewerUserPermission2: ViewerUserPermission!
292 +}
293 +
294 +type AccountAppStoreConnectApiKeysConnection {
295 + edges: [AccountAppStoreConnectApiKeysEdge!]!
296 + pageInfo: PageInfo!
297 +}
298 +
299 +type AccountAppStoreConnectApiKeysEdge {
300 + cursor: String!
301 + node: AppStoreConnectApiKey!
302 +}
303 +
304 +type AccountAppleDevicesConnection {
305 + edges: [AccountAppleDevicesEdge!]!
306 + pageInfo: PageInfo!
307 +}
308 +
309 +type AccountAppleDevicesEdge {
310 + cursor: String!
311 + node: AppleDevice!
312 +}
313 +
314 +type AccountAppleDistributionCertificatesConnection {
315 + edges: [AccountAppleDistributionCertificatesEdge!]!
316 + pageInfo: PageInfo!
317 +}
318 +
319 +type AccountAppleDistributionCertificatesEdge {
320 + cursor: String!
321 + node: AppleDistributionCertificate!
322 +}
323 +
324 +type AccountAppleProvisioningProfilesConnection {
325 + edges: [AccountAppleProvisioningProfilesEdge!]!
326 + pageInfo: PageInfo!
327 +}
328 +
329 +type AccountAppleProvisioningProfilesEdge {
330 + cursor: String!
331 + node: AppleProvisioningProfile!
332 +}
333 +
334 +type AccountApplePushKeysConnection {
335 + edges: [AccountApplePushKeysEdge!]!
336 + pageInfo: PageInfo!
337 +}
338 +
339 +type AccountApplePushKeysEdge {
340 + cursor: String!
341 + node: ApplePushKey!
342 +}
343 +
344 +type AccountAppleTeamsConnection {
345 + edges: [AccountAppleTeamsEdge!]!
346 + pageInfo: PageInfo!
347 +}
348 +
349 +type AccountAppleTeamsEdge {
350 + cursor: String!
351 + node: AppleTeam!
352 +}
353 +
354 +type AccountAppsConnection {
355 + edges: [AccountAppsEdge!]!
356 + pageInfo: PageInfo!
357 +}
358 +
359 +type AccountAppsEdge {
360 + cursor: String!
361 + node: App!
362 +}
363 +
364 +input AccountAppsFilterInput {
365 + searchTerm: String
366 + sortByField: AccountAppsSortByField!
367 +}
368 +
369 +enum AccountAppsSortByField {
370 + LATEST_ACTIVITY_TIME
371 +
372 + """
373 + Name prefers the display name but falls back to full_name with @account/
374 + part stripped.
375 + """
376 + NAME
377 +}
378 +
379 +input AccountDataInput {
380 + displayName: String
381 + name: String!
382 + userSpecifiedAccountUsage: UserSpecifiedAccountUsage
383 +}
384 +
385 +input AccountDeviceRunSessionFilterInput {
386 + statuses: [DeviceRunSessionStatus!]
387 +}
388 +
389 +type AccountDeviceRunSessionsConnection {
390 + edges: [AccountDeviceRunSessionsEdge!]!
391 + pageInfo: PageInfo!
392 +}
393 +
394 +type AccountDeviceRunSessionsEdge {
395 + cursor: String!
396 + node: DeviceRunSession!
397 +}
398 +
399 +type AccountGoogleServiceAccountKeysConnection {
400 + edges: [AccountGoogleServiceAccountKeysEdge!]!
401 + pageInfo: PageInfo!
402 +}
403 +
404 +type AccountGoogleServiceAccountKeysEdge {
405 + cursor: String!
406 + node: GoogleServiceAccountKey!
407 +}
408 +
409 +"""Aggregate statistics about account members"""
410 +type AccountMemberStats {
411 + """
412 + Whether all human members (Users only, not SSO) have 2FA enabled.
413 + Also checks the implicit account owner for personal accounts.
414 + """
415 + allHave2FAEnabled: Boolean!
416 +
417 + """Count of human members (Users + SSOUsers)"""
418 + humanCount: Int!
419 +
420 + """Count of members with OWN permission"""
421 + ownerCount: Int!
422 +
423 + """Count of robot members"""
424 + robotCount: Int!
425 +
426 + """Count of SSO users only"""
427 + ssoUserCount: Int!
428 +
429 + """Total count of all members"""
430 + totalCount: Int!
431 +}
432 +
433 +"""Filter for account member types in membersPaginated query"""
434 +enum AccountMemberType {
435 + """All members (default)"""
436 + ALL
437 +
438 + """Human members (Users + SSOUsers)"""
439 + HUMAN
440 +
441 + """Robot members only"""
442 + ROBOT
443 +
444 + """SSO users only"""
445 + SSO_USER
446 +}
447 +
448 +type AccountMembersConnection {
449 + edges: [AccountMembersEdge!]!
450 + pageInfo: PageInfo!
451 +}
452 +
453 +type AccountMembersEdge {
454 + cursor: String!
455 + node: UserPermission!
456 +}
457 +
458 +input AccountMembersFilterInput {
459 + """Filter by members containing all of the specified permissions."""
460 + exactPermissions: [Permission!]
461 +
462 + """
463 + Filter members by 2FA status. Only regular users are returned when set, since SSO users
464 + and robots don't have 2FA. Requires admin permission on the account.
465 + """
466 + isSecondFactorAuthenticationEnabled: Boolean
467 +
468 + """Case-insensitive substring match on username, email, and name"""
469 + searchTerm: String
470 +}
471 +
472 +type AccountMutation {
473 + """Cancels all subscriptions immediately"""
474 + cancelAllSubscriptionsImmediately(accountID: ID!): Account!
475 +
476 + """Cancel scheduled subscription change"""
477 + cancelScheduledSubscriptionChange(accountID: ID!): Account!
478 +
479 + """
480 + Buys or revokes account's additional concurrencies, charging the account the appropriate amount if needed.
481 + """
482 + changeAdditionalConcurrenciesCount(accountID: ID!, newAdditionalConcurrenciesCount: Int!): Account!
483 +
484 + """
485 + Upgrades or downgrades the active subscription to the newPlanIdentifier, which must be one of the EAS plans (i.e., Production or Enterprise).
486 + """
487 + changePlan(accountID: ID!, couponCode: String, newPlanIdentifier: String!): Account!
488 +
489 + """
490 + Add specified account Permissions for Actor. Actor must already have at least one permission on the account.
491 + """
492 + grantActorPermissions(accountID: ID!, actorID: ID!, permissions: [Permission]): Account!
493 +
494 + """
495 + Remove profile image for the account. Do nothing if there's no profile image associated.
496 + """
497 + removeProfileImage(accountID: ID!): Account!
498 +
499 + """
500 + Rename this account and the primary user's username if this account is a personal account
501 + """
502 + rename(accountID: ID!, newName: String!): Account!
503 +
504 + """
505 + Requests a refund for the specified charge by requesting a manual refund from support
506 + """
507 + requestRefund(accountID: ID!, chargeID: ID!, description: String, reason: String): Boolean
508 +
509 + """
510 + Revoke specified Permissions for Actor. Actor must already have at least one permission on the account.
511 + """
512 + revokeActorPermissions(accountID: ID!, actorID: ID!, permissions: [Permission]): Account!
513 +
514 + """
515 + Set the display name for the account. Pass null to clear it and fall back to the account identifier.
516 + """
517 + setDisplayName(accountID: ID!, displayName: String): Account!
518 +
519 + """
520 + Set whether environment variable protection is on for this account. When it is on, using,
521 + creating, changing, or deleting a SECRET environment variable needs the PUBLISH_PROTECTED
522 + permission on the account, in every project of the account. Requires the ADMIN permission on
523 + the account. Turning protection off also requires a sudo session.
524 + """
525 + setEnvironmentVariableProtectionEnabled(accountID: ID!, environmentVariableProtectionEnabled: Boolean!): Account!
526 +
527 + """Set whether EAS Observe ingestion is paused for this account."""
528 + setObserveIngestionPaused(accountID: ID!, paused: Boolean!): Account!
529 +
530 + """
531 + Require authorization to send push notifications for experiences owned by this account
532 + """
533 + setPushSecurityEnabled(accountID: ID!, pushSecurityEnabled: Boolean!): Account!
534 +
535 + """
536 + Set whether two-factor authentication is required for this account. When enabled:
537 + - Existing members with 2FA cannot disable it
538 + - New members must enable 2FA before joining
539 + - Existing members without 2FA are not affected
540 + """
541 + setRequireTwoFactor(accountID: ID!, requireTwoFactor: Boolean!): Account!
542 +
543 + """Set the user specified account usage for the account."""
544 + setUserSpecifiedAccountUsage(accountID: ID!, userSpecifiedAccountUsage: UserSpecifiedAccountUsage!): Account!
545 +}
546 +
547 +"""Account-level notification preference"""
548 +type AccountNotificationPreference implements NotificationPreference {
549 + account: Account!
550 + enabled: Boolean!
551 + event: NotificationEvent!
552 + type: NotificationType!
553 +}
554 +
555 +input AccountNotificationPreferenceInput {
556 + accountId: ID!
557 + enabled: Boolean!
558 + event: NotificationEvent!
559 + type: NotificationType!
560 +}
561 +
562 +"""Onboarding milestone stats for an account"""
563 +type AccountOnboardingStats {
564 + firstBuildCompletedAt: DateTime
565 + firstProjectCreatedAt: DateTime
566 + firstSubmissionCompletedAt: DateTime
567 + firstUpdateCreatedAt: DateTime
568 + hasConfiguredUpdate: Boolean! @deprecated(reason: "Onboarding widget experiment removed")
569 + hasConfiguredWorkflow: Boolean!
570 + hasTeamMembers: Boolean! @deprecated(reason: "Onboarding widget experiment removed")
571 +}
572 +
573 +type AccountQuery {
574 + """Query an Account by ID"""
575 + byId(
576 + """Account id to use to look up account"""
577 + accountId: String!
578 + ): Account!
579 +
580 + """Query an Account by name"""
581 + byName(
582 + """Account name to use to look up account"""
583 + accountName: String!
584 + ): Account!
585 +}
586 +
587 +"""Auth configuration data for an SSO account."""
588 +type AccountSSOConfiguration {
589 + authProtocol: AuthProtocolType!
590 + authProviderIdentifier: AuthProviderIdentifier!
591 + clientIdentifier: String!
592 + clientSecret: String!
593 + createdAt: DateTime!
594 + id: ID!
595 + issuer: String!
596 + updatedAt: DateTime!
597 +}
598 +
599 +input AccountSSOConfigurationData {
600 + authProtocol: AuthProtocolType!
601 + authProviderIdentifier: AuthProviderIdentifier!
602 + clientIdentifier: String!
603 + clientSecret: String!
604 + issuer: String!
605 +}
606 +
607 +type AccountSSOConfigurationMutation {
608 + """Create an AccountSSOConfiguration for an Account"""
609 + createAccountSSOConfiguration(accountId: ID!, accountSSOConfigurationData: AccountSSOConfigurationData!): AccountSSOConfiguration!
610 +
611 + """Delete an AccountSSOConfiguration"""
612 + deleteAccountSSOConfiguration(id: ID!): DeleteAccountSSOConfigurationResult!
613 +
614 + """Update an AccountSSOConfiguration"""
615 + updateAccountSSOConfiguration(accountSSOConfigurationData: AccountSSOConfigurationData!, id: ID!): AccountSSOConfiguration!
616 +
617 + """Update just the client secret of an AccountSSOConfiguration"""
618 + updateAccountSSOConfigurationClientSecret(clientSecret: String!, id: ID!): AccountSSOConfiguration!
619 +}
620 +
621 +"""Public auth configuration data for an SSO account."""
622 +type AccountSSOConfigurationPublicData {
623 + authProtocol: AuthProtocolType!
624 + authProviderIdentifier: AuthProviderIdentifier!
625 + authorizationUrl: String!
626 + id: ID!
627 + issuer: String!
628 +}
629 +
630 +type AccountSSOConfigurationPublicDataQuery {
631 + """Get AccountSSOConfiguration public data by account name"""
632 + publicDataByAccountName(
633 + """Account name to use to look up account SSO configuration"""
634 + accountName: String!
635 + ): AccountSSOConfigurationPublicData!
636 +}
637 +
638 +type AccountSnacksConnection {
639 + edges: [AccountSnacksEdge!]!
640 + pageInfo: PageInfo!
641 +}
642 +
643 +type AccountSnacksEdge {
644 + cursor: String!
645 + node: Snack!
646 +}
647 +
648 +enum AccountUploadSessionType {
649 + PROFILE_IMAGE_UPLOAD
650 + WORKFLOWS_PROJECT_SOURCES
651 +}
652 +
653 +type AccountUsageEASBuildMetadata {
654 + billingResourceClass: EASBuildBillingResourceClass
655 + platform: AppPlatform
656 + waiverType: EASBuildWaiverType
657 +}
658 +
659 +union AccountUsageMetadata = AccountUsageEASBuildMetadata
660 +
661 +type AccountUsageMetric {
662 + id: ID!
663 + metricType: UsageMetricType!
664 + serviceMetric: EASServiceMetric!
665 + timestamp: DateTime!
666 + value: Float!
667 +}
668 +
669 +type AccountUsageMetrics {
670 + byBillingPeriod(date: DateTime!, service: EASService): UsageMetricTotal!
671 + metricsForServiceMetric(filterParams: JSONObject, granularity: UsageMetricsGranularity!, serviceMetric: EASServiceMetric!, timespan: UsageMetricsTimespan!): [AccountUsageMetric!]!
672 +}
673 +
674 +interface ActivityTimelineProjectActivity {
675 + activityTimestamp: DateTime!
676 + actor: Actor
677 + id: ID!
678 +}
679 +
680 +enum ActivityTimelineProjectActivityType {
681 + BUILD
682 + SUBMISSION
683 + UPDATE
684 + WORKER
685 + WORKFLOW_RUN
686 +}
687 +
688 +"""
689 +A regular user, SSO user, or robot that can authenticate with Expo services and be a member of accounts.
690 +"""
691 +interface Actor {
692 + """Access Tokens belonging to this actor"""
693 + accessTokens: [AccessToken!]!
694 +
695 + """Associated accounts"""
696 + accounts: [Account!]!
697 + created: DateTime!
698 +
699 + """
700 + Best-effort human readable name for this actor for use in user interfaces during action attribution.
701 + For example, when displaying a sentence indicating that actor X created a build or published an update.
702 + """
703 + displayName: String!
704 +
705 + """Experiments associated with this actor"""
706 + experiments: [ActorExperiment!]!
707 +
708 + """
709 + Server feature gate values for this actor, optionally filtering by desired gates.
710 + Only resolves for the viewer.
711 + """
712 + featureGates(filter: [String!]): JSONObject!
713 + firstName: String
714 + id: ID!
715 + isExpoAdmin: Boolean!
716 + lastDeletionAttemptTime: DateTime
717 +}
718 +
719 +type ActorExperiment {
720 + createdAt: DateTime!
721 + enabled: Boolean!
722 + experiment: Experiment!
723 + id: ID!
724 + updatedAt: DateTime!
725 +}
726 +
727 +type ActorExperimentMutation {
728 + """Create or update the value of a User Experiment"""
729 + createOrUpdateActorExperiment(enabled: Boolean!, experiment: Experiment!): ActorExperiment!
730 +}
731 +
732 +type AddonDetails {
733 + id: ID!
734 + name: String!
735 + nextInvoice: DateTime
736 + planId: String!
737 + quantity: Int
738 + willCancel: Boolean
739 +}
740 +
741 +type AgentDeviceRunSessionRemoteConfig {
742 + agentDeviceRemoteSessionToken: String!
743 + agentDeviceRemoteSessionUrl: String!
744 +
745 + """
746 + Fingerprint of the reverse-tunnel server key for the client to pin. Null when
747 + the session does not use local egress.
748 + """
749 + egressFingerprint: String
750 +
751 + """
752 + Loopback port on the device host that the local egress client must serve
753 + through the tunnel. Null when the session does not use local egress.
754 + """
755 + egressPort: Int
756 +
757 + """
758 + Secret the local egress client presents to the reverse-tunnel endpoint. Null
759 + when the session does not use local egress.
760 + """
761 + egressToken: String
762 +
763 + """
764 + Reverse-tunnel endpoint the local egress client connects to. Null when the
765 + session does not use local egress.
766 + """
767 + egressUrl: String
768 +
769 + """URL of the preview server, for reaching its API rather than its page."""
770 + previewApiUrl: String
771 +
772 + """
773 + Session token gating the web preview. Null when the preview runs ungated.
774 + """
775 + webPreviewToken: String
776 +
777 + """
778 + URL of the web preview surface for the session. Null when a web preview is
779 + not available for the session.
780 + """
781 + webPreviewUrl: String
782 +}
783 +
784 +enum AgentProvider {
785 + ANTHROPIC
786 + OPENAI
787 +}
788 +
789 +type AgentProviderConnection {
790 + account: Account!
791 + createdAt: DateTime!
792 + createdByActor: Actor
793 + expiresAt: DateTime
794 + id: ID!
795 + name: String
796 + provider: AgentProvider!
797 + providerAccountEmail: String
798 + providerAccountId: String
799 + providerPlan: String
800 + status: AgentProviderConnectionStatus!
801 + updatedAt: DateTime!
802 +}
803 +
804 +enum AgentProviderConnectionAuthorizationStatus {
805 + EXPIRED
806 + PENDING
807 + SUCCEEDED
808 +}
809 +
810 +type AgentProviderConnectionMutation {
811 + completeClaudeConnection(input: CompleteClaudeConnectionInput!): AgentProviderConnection!
812 + deleteAgentProviderConnection(id: ID!): AgentProviderConnection!
813 + pollCodexConnection(requestId: ID!): CodexConnectionPollResult!
814 + startClaudeConnection(input: StartClaudeConnectionInput!): ClaudeAuthorization!
815 + startCodexConnection(accountId: ID!): CodexDeviceAuthorization!
816 + updateAgentProviderConnection(id: ID!, input: UpdateAgentProviderConnectionInput!): AgentProviderConnection!
817 +}
818 +
819 +enum AgentProviderConnectionStatus {
820 + INVALID
821 + UNABLE_TO_VERIFY
822 + VALID
823 +}
824 +
825 +type AndroidAppBuildCredentials {
826 + androidKeystore: AndroidKeystore
827 + id: ID!
828 + isDefault: Boolean!
829 + isLegacy: Boolean!
830 + name: String!
831 +}
832 +
833 +"""
834 +@isDefault: if set, these build credentials will become the default for the Android app. All other build credentials will have their default status set to false.
835 +"""
836 +input AndroidAppBuildCredentialsInput {
837 + isDefault: Boolean!
838 + keystoreId: ID!
839 + name: String!
840 +}
841 +
842 +type AndroidAppBuildCredentialsMutation {
843 + """Create a set of build credentials for an Android app"""
844 + createAndroidAppBuildCredentials(androidAppBuildCredentialsInput: AndroidAppBuildCredentialsInput!, androidAppCredentialsId: ID!): AndroidAppBuildCredentials!
845 +
846 + """delete a set of build credentials for an Android app"""
847 + deleteAndroidAppBuildCredentials(id: ID!): deleteAndroidAppBuildCredentialsResult!
848 +
849 + """Set the build credentials to be the default for the Android app"""
850 + setDefault(id: ID!, isDefault: Boolean!): AndroidAppBuildCredentials!
851 +
852 + """Set the keystore to be used for an Android app"""
853 + setKeystore(id: ID!, keystoreId: ID!): AndroidAppBuildCredentials!
854 +
855 + """
856 + Set the name of a set of build credentials to be used for an Android app
857 + """
858 + setName(id: ID!, name: String!): AndroidAppBuildCredentials!
859 +}
860 +
861 +type AndroidAppCredentials {
862 + androidAppBuildCredentialsArray: [AndroidAppBuildCredentials!]! @deprecated(reason: "use androidAppBuildCredentialsList instead")
863 + androidAppBuildCredentialsList: [AndroidAppBuildCredentials!]!
864 + androidFcm: AndroidFcm
865 + app: App!
866 + applicationIdentifier: String
867 + googleServiceAccountKeyForFcmV1: GoogleServiceAccountKey
868 + googleServiceAccountKeyForSubmissions: GoogleServiceAccountKey
869 + id: ID!
870 + isLegacy: Boolean!
871 +}
872 +
873 +input AndroidAppCredentialsFilter {
874 + applicationIdentifier: String
875 + legacyOnly: Boolean
876 +}
877 +
878 +input AndroidAppCredentialsInput {
879 + fcmId: ID
880 + googleServiceAccountKeyForFcmV1Id: ID
881 + googleServiceAccountKeyForSubmissionsId: ID
882 +}
883 +
884 +type AndroidAppCredentialsMutation {
885 + """Create a set of credentials for an Android app"""
886 + createAndroidAppCredentials(androidAppCredentialsInput: AndroidAppCredentialsInput!, appId: ID!, applicationIdentifier: String!): AndroidAppCredentials!
887 +
888 + """
889 + Create a GoogleServiceAccountKeyEntity to store credential and
890 + connect it with an edge from AndroidAppCredential
891 + """
892 + createFcmV1Credential(androidAppCredentialsId: String!, credential: String!): AndroidAppCredentials!
893 +
894 + """Delete a set of credentials for an Android app"""
895 + deleteAndroidAppCredentials(id: ID!): DeleteAndroidAppCredentialsResult!
896 +
897 + """Set the FCM push key to be used in an Android app"""
898 + setFcm(fcmId: ID!, id: ID!): AndroidAppCredentials!
899 +
900 + """
901 + Set the Google Service Account Key to be used for Firebase Cloud Messaging V1
902 + """
903 + setGoogleServiceAccountKeyForFcmV1(googleServiceAccountKeyId: ID!, id: ID!): AndroidAppCredentials!
904 +
905 + """
906 + Set the Google Service Account Key to be used for submitting an Android app
907 + """
908 + setGoogleServiceAccountKeyForSubmissions(googleServiceAccountKeyId: ID!, id: ID!): AndroidAppCredentials!
909 +}
910 +
911 +enum AndroidBuildType {
912 + APK
913 + APP_BUNDLE
914 +
915 + """@deprecated Use developmentClient option instead."""
916 + DEVELOPMENT_CLIENT
917 +}
918 +
919 +input AndroidBuilderEnvironmentInput {
920 + bun: String
921 + corepack: Boolean
922 + env: JSONObject
923 + expoCli: String
924 + image: String
925 + ndk: String
926 + node: String
927 + pnpm: String
928 + yarn: String
929 +}
930 +
931 +type AndroidDeviceRunSessionDevice {
932 + """Human-readable device name to show to users (e.g. "Pixel 9")."""
933 + displayName: String!
934 +
935 + """
936 + AVD hardware profile id accepted by android.deviceIdentifier (e.g. "pixel_9").
937 + """
938 + identifier: String!
939 +}
940 +
941 +type AndroidDeviceRunSessionProfiles {
942 + devices: [AndroidDeviceRunSessionDevice!]!
943 +}
944 +
945 +type AndroidFcm {
946 + account: Account!
947 + createdAt: DateTime!
948 +
949 + """
950 + Legacy FCM: returns the Cloud Messaging token, parses to a String
951 + FCM v1: returns the Service Account Key file, parses to an Object
952 + """
953 + credential: JSON!
954 + id: ID!
955 + snippet: FcmSnippet!
956 + updatedAt: DateTime!
957 + version: AndroidFcmVersion!
958 +}
959 +
960 +input AndroidFcmInput {
961 + credential: String!
962 + version: AndroidFcmVersion!
963 +}
964 +
965 +type AndroidFcmMutation {
966 + """Create an FCM V0/Legacy credential"""
967 + createAndroidFcm(accountId: ID!, androidFcmInput: AndroidFcmInput!): AndroidFcm! @deprecated(reason: "FCM Legacy credentials are no longer supported by Google. Use createFcmV1Credential instead.")
968 +
969 + """Delete an FCM V0/Legacy credential"""
970 + deleteAndroidFcm(id: ID!): deleteAndroidFcmResult!
971 +}
972 +
973 +enum AndroidFcmVersion {
974 + LEGACY
975 + V1
976 +}
977 +
978 +input AndroidJobBuildCredentialsInput {
979 + keystore: AndroidJobKeystoreInput!
980 +}
981 +
982 +input AndroidJobInput {
983 + applicationArchivePath: String
984 +
985 + """@deprecated"""
986 + artifactPath: String
987 + buildArtifactPaths: [String!]
988 + buildProfile: String
989 + buildType: AndroidBuildType
990 + builderEnvironment: AndroidBuilderEnvironmentInput
991 + cache: BuildCacheInput
992 + customBuildConfig: CustomBuildConfigInput
993 + developmentClient: Boolean
994 + environment: EnvironmentVariableEnvironment
995 + experimental: JSONObject
996 + gradleCommand: String
997 + loggerLevel: WorkerLoggerLevel
998 + mode: BuildMode
999 + projectArchive: ProjectArchiveSourceInput!
1000 + projectRootDirectory: String!
1001 + releaseChannel: String
1002 + secrets: AndroidJobSecretsInput
1003 + triggeredBy: BuildTrigger
1004 + type: BuildWorkflow!
1005 + updates: BuildUpdatesInput
1006 + username: String
1007 + version: AndroidJobVersionInput
1008 +}
1009 +
1010 +input AndroidJobKeystoreInput {
1011 + dataBase64: String!
1012 + keyAlias: String!
1013 + keyPassword: String
1014 + keystorePassword: String!
1015 +}
1016 +
1017 +input AndroidJobOverridesInput {
1018 + applicationArchivePath: String
1019 +
1020 + """@deprecated"""
1021 + artifactPath: String
1022 + buildArtifactPaths: [String!]
1023 + buildProfile: String
1024 + buildType: AndroidBuildType
1025 + builderEnvironment: AndroidBuilderEnvironmentInput
1026 + cache: BuildCacheInput
1027 + customBuildConfig: CustomBuildConfigInput
1028 + developmentClient: Boolean
1029 + experimental: JSONObject
1030 + gradleCommand: String
1031 + loggerLevel: WorkerLoggerLevel
1032 + mode: BuildMode
1033 + releaseChannel: String
1034 + secrets: AndroidJobSecretsInput
1035 + updates: BuildUpdatesInput
1036 + username: String
1037 + version: AndroidJobVersionInput
1038 +}
1039 +
1040 +input AndroidJobSecretsInput {
1041 + buildCredentials: AndroidJobBuildCredentialsInput
1042 +}
1043 +
1044 +input AndroidJobVersionInput {
1045 + versionCode: String!
1046 +}
1047 +
1048 +type AndroidKeystore {
1049 + account: Account!
1050 + createdAt: DateTime!
1051 + id: ID!
1052 + keyAlias: String!
1053 + keyPassword: String
1054 + keystore: String!
1055 + keystorePassword: String!
1056 + md5CertificateFingerprint: String
1057 + sha1CertificateFingerprint: String
1058 + sha256CertificateFingerprint: String
1059 + type: AndroidKeystoreType!
1060 + updatedAt: DateTime!
1061 +}
1062 +
1063 +input AndroidKeystoreInput {
1064 + base64EncodedKeystore: String!
1065 + keyAlias: String!
1066 + keyPassword: String
1067 + keystorePassword: String!
1068 +}
1069 +
1070 +type AndroidKeystoreMutation {
1071 + """Create a Keystore"""
1072 + createAndroidKeystore(accountId: ID!, androidKeystoreInput: AndroidKeystoreInput!): AndroidKeystore
1073 +
1074 + """Delete a Keystore"""
1075 + deleteAndroidKeystore(id: ID!): DeleteAndroidKeystoreResult!
1076 +}
1077 +
1078 +enum AndroidKeystoreType {
1079 + JKS
1080 + PKCS12
1081 + UNKNOWN
1082 +}
1083 +
1084 +type AndroidSubmissionConfig {
1085 + applicationIdentifier: String @deprecated(reason: "applicationIdentifier is deprecated and will be auto-detected on submit")
1086 + releaseStatus: SubmissionAndroidReleaseStatus
1087 + rollout: Float
1088 + track: String!
1089 +}
1090 +
1091 +input AndroidSubmissionConfigInput {
1092 + applicationIdentifier: String
1093 + changelog: String
1094 + changesNotSentForReview: Boolean
1095 + googleServiceAccountKeyId: String
1096 + googleServiceAccountKeyJson: String
1097 + isVerboseFastlaneEnabled: Boolean
1098 + releaseStatus: SubmissionAndroidReleaseStatus
1099 + rollout: Float
1100 + track: SubmissionAndroidTrack!
1101 +}
1102 +
1103 +"""Represents an Exponent App (or Experience in legacy terms)"""
1104 +type App implements Project {
1105 + """Coalesced project activity for an app"""
1106 + activityTimelineProjectActivities(
1107 + """ Offset the query """
1108 + createdBefore: DateTime
1109 + filterChannels: [String!]
1110 + filterPlatforms: [AppPlatform!]
1111 +
1112 + """ Types of objects to filter """
1113 + filterTypes: [ActivityTimelineProjectActivityType!]
1114 + limit: Int!
1115 + ): [ActivityTimelineProjectActivity!]!
1116 +
1117 + """Android app credentials for the project"""
1118 + androidAppCredentials(filter: AndroidAppCredentialsFilter): [AndroidAppCredentials!]!
1119 + appStoreConnectApp: AppStoreConnectApp
1120 +
1121 + """
1122 + Connection status for this project's App Store Connect-triggered workflows.
1123 + """
1124 + appStoreConnectWorkflowConnectionStatus: AppStoreConnectWorkflowConnectionStatus!
1125 + assetLimitPerUpdateGroup: Int!
1126 + branchesPaginated(after: String, before: String, filter: BranchFilterInput, first: Int, last: Int): AppBranchesConnection!
1127 + buildProfiles: [String!]!
1128 +
1129 + """(EAS Build) Builds associated with this app"""
1130 + builds(
1131 + filter: BuildFilter
1132 + limit: Int!
1133 + offset: Int!
1134 +
1135 + """Deprecated, use filter instead"""
1136 + platform: AppPlatform
1137 +
1138 + """Deprecated, use filter instead"""
1139 + status: BuildStatus
1140 + ): [Build!]!
1141 + buildsPaginated(after: String, before: String, filter: BuildFilterInput, first: Int, last: Int): AppBuildsConnection!
1142 + channelsPaginated(after: String, before: String, filter: ChannelFilterInput, first: Int, last: Int): AppChannelsConnection!
1143 + convexProject: ConvexProject
1144 + deployment(channel: String!, runtimeVersion: String!): Deployment
1145 +
1146 + """Deployments associated with this app"""
1147 + deployments(after: String, before: String, filter: DeploymentFilterInput, first: Int, last: Int): DeploymentsConnection!
1148 + description: String! @deprecated(reason: "Classic updates have been deprecated.")
1149 + devDomainName: AppDevDomainName
1150 +
1151 + """
1152 + Every tag used by this app's device run sessions, sorted alphabetically.
1153 + """
1154 + deviceRunSessionTags: [String!]!
1155 + deviceRunSessionsPaginated(after: String, before: String, filter: DeviceRunSessionFilterInput, first: Int, last: Int): AppDeviceRunSessionsConnection!
1156 + embeddedUpdatesPaginated(after: String, before: String, filter: EmbeddedUpdateFilterInput, first: Int, last: Int): AppEmbeddedUpdatesConnection!
1157 +
1158 + """Environment secrets for an app"""
1159 + environmentSecrets(filterNames: [String!]): [EnvironmentSecret!]!
1160 + environmentVariableEnvironments: [EnvironmentVariableEnvironment!]!
1161 +
1162 + """Environment variables for an app"""
1163 + environmentVariables(environment: EnvironmentVariableEnvironment, filterNames: [String!]): [EnvironmentVariable!]!
1164 +
1165 + """Environment variables for an app with decrypted secret values"""
1166 + environmentVariablesIncludingSensitive(environment: EnvironmentVariableEnvironment, filterNames: [String!]): [EnvironmentVariableWithSecret!]!
1167 + fingerprintsPaginated(after: String, before: String, filter: FingerprintFilterInput, first: Int, last: Int): AppFingerprintsConnection!
1168 + fullName: String!
1169 + githubBuildTriggers: [GitHubBuildTrigger!]!
1170 + githubJobRunTriggers: [GitHubJobRunTrigger!]!
1171 + githubRepository: GitHubRepository
1172 + githubRepositorySettings: GitHubRepositorySettings
1173 +
1174 + """
1175 + Info about the icon specified in the most recent classic update manifest
1176 + """
1177 + icon: AppIcon @deprecated(reason: "Classic updates have been deprecated.")
1178 + iconUrl: String @deprecated
1179 + id: ID!
1180 +
1181 + """App query field for querying EAS Insights about this app"""
1182 + insights: AppInsights!
1183 + internalDistributionBuildPrivacy: AppInternalDistributionBuildPrivacy!
1184 +
1185 + """iOS app credentials for the project"""
1186 + iosAppCredentials(filter: IosAppCredentialsFilter): [IosAppCredentials!]!
1187 +
1188 + """
1189 + Whether this app qualifies for the observe-notification-lapsed-paid experiment
1190 + """
1191 + isEligibleForObserveLapsedPaidNotification: Boolean!
1192 +
1193 + """
1194 + Tells you if the project can show the Observe promotional notification. This field is part of
1195 + the observe-notification experiment.
1196 + """
1197 + isEligibleForObserveNotice: Boolean! @deprecated(reason: "This field is deprecated from its first release. It supplies data for the observe-notification promotion on the project page. It will be removed when the promotion ends. Do not rely on it.")
1198 + lastDeletionAttemptTime: DateTime
1199 +
1200 + """Time of the last user activity (update, branch, submission)."""
1201 + latestActivity: DateTime!
1202 + latestAppVersionByPlatformAndApplicationIdentifier(applicationIdentifier: String!, platform: AppPlatform!): AppVersion
1203 + logRocketProject: LogRocketProject
1204 + name: String!
1205 + observe: AppObserve!
1206 +
1207 + """
1208 + Whether EAS Observe ingestion is paused for this app. Apps that have not configured the setting
1209 + are treated as false (ingestion enabled). An account-level pause takes precedence.
1210 + """
1211 + observeIngestionPaused: Boolean!
1212 + ownerAccount: Account!
1213 + packageName: String! @deprecated
1214 + posthogProject: PostHogProject
1215 + privacy: String! @deprecated
1216 + profileImageUrl(width: AppProfileImageWidth): String
1217 +
1218 + """Whether there have been any classic update publishes"""
1219 + published: Boolean! @deprecated(reason: "Classic updates have been deprecated.")
1220 +
1221 + """App query field for querying details about an app's push notifications"""
1222 + pushNotifications: AppPushNotifications!
1223 + pushSecurityEnabled: Boolean!
1224 + resourceClassExperiment: ResourceClassExperiment
1225 +
1226 + """Runtimes associated with this app"""
1227 + runtimes(after: String, before: String, filter: RuntimeFilterInput, first: Int, last: Int): RuntimesConnection!
1228 + scopeKey: String!
1229 +
1230 + """SDK version of the latest classic update publish, 0.0.0 otherwise"""
1231 + sdkVersion: String! @deprecated(reason: "Classic updates have been deprecated.")
1232 + sentryProject: SentryProject
1233 + slug: String!
1234 +
1235 + """EAS Submissions associated with this app"""
1236 + submissions(filter: SubmissionFilter!, limit: Int!, offset: Int!): [Submission!]!
1237 + submissionsPaginated(after: String, before: String, first: Int, last: Int): AppSubmissionsConnection!
1238 + suggestedDevDomainName: String!
1239 + supabaseProject: SupabaseProject
1240 +
1241 + """Coalesced project activity for an app using pagination"""
1242 + timelineActivity(after: String, before: String, filter: TimelineActivityFilterInput, first: Int, last: Int): TimelineActivityConnection!
1243 + turtleBrownfieldArtifactsPaginated(after: String, before: String, filter: BrownfieldArtifactFilterInput, first: Int, last: Int): BrownfieldArtifactsConnection!
1244 +
1245 + """get an EAS branch owned by the app by name"""
1246 + updateBranchByName(name: String!): UpdateBranch
1247 +
1248 + """EAS branches owned by an app"""
1249 + updateBranches(limit: Int!, offset: Int!): [UpdateBranch!]!
1250 +
1251 + """get an EAS channel owned by the app by name"""
1252 + updateChannelByName(name: String!): UpdateChannel
1253 +
1254 + """EAS channels owned by an app"""
1255 + updateChannels(limit: Int!, offset: Int!): [UpdateChannel!]!
1256 +
1257 + """EAS updates owned by an app grouped by update group"""
1258 + updateGroups(filter: UpdatesFilter, limit: Int!, offset: Int!): [[Update!]!]!
1259 +
1260 + """Time of last classic update publish"""
1261 + updated: DateTime! @deprecated(reason: "Classic updates have been deprecated.")
1262 +
1263 + """EAS updates owned by an app"""
1264 + updates(limit: Int!, offset: Int!): [Update!]!
1265 + updatesPaginated(after: String, before: String, filter: UpdateFilterInput, first: Int, last: Int): AppUpdatesConnection!
1266 + updatesTimeline(after: String, before: String, filter: UpdatesTimelineFilter, first: Int, last: Int): UpdatesTimelineConnection!
1267 +
1268 + """Project query object for querying EAS usage metrics"""
1269 + usageMetrics: AppUsageMetrics!
1270 + username: String! @deprecated(reason: "Use ownerAccount.name instead")
1271 + vexoApp: VexoApp
1272 +
1273 + """Notification preferences of the viewer for this app"""
1274 + viewerNotificationPreferences: [NotificationPreferenceItem!]!
1275 +
1276 + """Webhooks for an app"""
1277 + webhooks(filter: WebhookFilter): [Webhook!]!
1278 + workerCustomDomain: WorkerCustomDomain
1279 + workerDeployment(deploymentIdentifier: WorkerDeploymentIdentifier!): WorkerDeployment
1280 + workerDeploymentAlias(aliasName: WorkerDeploymentIdentifier): WorkerDeploymentAlias
1281 + workerDeploymentAliases(after: String, before: String, first: Int, last: Int): WorkerDeploymentAliasesConnection!
1282 + workerDeployments(after: String, before: String, first: Int, last: Int): WorkerDeploymentsConnection!
1283 + workerDeploymentsCrash(crashKey: ID!, sampleFor: CrashSampleFor): WorkerDeploymentCrashEdge!
1284 + workerDeploymentsCrashes(filters: CrashesFilters, timespan: DatasetTimespan!): WorkerDeploymentCrashes
1285 + workerDeploymentsRequest(requestKey: ID!): WorkerDeploymentRequestEdge!
1286 + workerDeploymentsRequests(filters: RequestsFilters, timespan: DatasetTimespan!): WorkerDeploymentRequests
1287 +
1288 + """
1289 + Caches associated with this app, ordered by last access time (most recent first).
1290 + """
1291 + workflowCachesPaginated(after: String, before: String, first: Int, last: Int): AppWorkflowCachesConnection!
1292 +
1293 + """Per-type caching configuration for this app."""
1294 + workflowCachingConfig: WorkflowCachingConfig!
1295 + workflowDeviceTestCaseHistory(filters: WorkflowDeviceTestCaseHistoryFiltersInput, path: String!, timespan: WorkflowDeviceTestCaseInsightsTimespanInput!): WorkflowDeviceTestCaseHistory!
1296 + workflowDeviceTestCaseInsights(filters: WorkflowDeviceTestCaseInsightsFiltersInput, timespan: WorkflowDeviceTestCaseInsightsTimespanInput!): WorkflowDeviceTestCaseInsights!
1297 + workflowRunGitBranchesPaginated(after: String, before: String, filter: WorkflowRunGitBranchFilterInput, first: Int, last: Int): AppWorkflowRunGitBranchesConnection!
1298 + workflowRunsPaginated(after: String, before: String, filter: AppWorkflowRunFilterInput, first: Int, last: Int): AppWorkflowRunsConnection!
1299 + workflows(filter: AppWorkflowFilterInput): [Workflow!]!
1300 + workflowsInsights: AppWorkflowsInsights!
1301 +}
1302 +
1303 +type AppBranchEdge {
1304 + cursor: String!
1305 + node: UpdateBranch!
1306 +}
1307 +
1308 +type AppBranchesConnection {
1309 + edges: [AppBranchEdge!]!
1310 + pageInfo: PageInfo!
1311 +}
1312 +
1313 +type AppBuildEdge {
1314 + cursor: String!
1315 + node: BuildOrBuildJob!
1316 +}
1317 +
1318 +type AppBuildsConnection {
1319 + edges: [AppBuildEdge!]!
1320 + pageInfo: PageInfo!
1321 +}
1322 +
1323 +type AppChannelEdge {
1324 + cursor: String!
1325 + node: UpdateChannel!
1326 +}
1327 +
1328 +type AppChannelsConnection {
1329 + edges: [AppChannelEdge!]!
1330 + pageInfo: PageInfo!
1331 +}
1332 +
1333 +input AppDataInput {
1334 + id: ID!
1335 + internalDistributionBuildPrivacy: AppInternalDistributionBuildPrivacy
1336 + privacy: String
1337 +}
1338 +
1339 +type AppDevDomainName {
1340 + app: App
1341 + id: ID!
1342 + name: DevDomainName!
1343 +}
1344 +
1345 +type AppDevDomainNameMutation {
1346 + """Creates a DevDomainName assigning it to an app"""
1347 + assignDevDomainName(appId: ID!, name: DevDomainName!): AppDevDomainName!
1348 +
1349 + """Updates a DevDomainName for a given app"""
1350 + changeDevDomainName(appId: ID!, name: DevDomainName!): AppDevDomainName!
1351 +}
1352 +
1353 +type AppDeviceRunSessionEdge {
1354 + cursor: String!
1355 + node: DeviceRunSession!
1356 +}
1357 +
1358 +type AppDeviceRunSessionsConnection {
1359 + edges: [AppDeviceRunSessionEdge!]!
1360 + pageInfo: PageInfo!
1361 +}
1362 +
1363 +type AppEmbeddedUpdateEdge {
1364 + cursor: String!
1365 + node: EmbeddedUpdate!
1366 +}
1367 +
1368 +type AppEmbeddedUpdatesConnection {
1369 + edges: [AppEmbeddedUpdateEdge!]!
1370 + pageInfo: PageInfo!
1371 +}
1372 +
1373 +type AppFingerprintEdge {
1374 + cursor: String!
1375 + node: Fingerprint!
1376 +}
1377 +
1378 +type AppFingerprintsConnection {
1379 + edges: [AppFingerprintEdge!]!
1380 + pageInfo: PageInfo!
1381 +}
1382 +
1383 +type AppIcon {
1384 + originalUrl: String!
1385 + primaryColor: String
1386 + url: String!
1387 +}
1388 +
1389 +input AppInfoInput {
1390 + displayName: String
1391 +}
1392 +
1393 +input AppInput {
1394 + accountId: ID!
1395 + appInfo: AppInfoInput
1396 + projectName: String!
1397 +}
1398 +
1399 +type AppInsights {
1400 + hasEventsFromExpoInsightsClientModule: Boolean!
1401 + totalUniqueUsers(timespan: InsightsTimespan!): Int
1402 + uniqueUsersByAppVersionOverTime(timespan: InsightsTimespan!): UniqueUsersOverTimeData!
1403 + uniqueUsersByPlatformOverTime(timespan: InsightsTimespan!): UniqueUsersOverTimeData!
1404 +}
1405 +
1406 +enum AppInternalDistributionBuildPrivacy {
1407 + PRIVATE
1408 + PUBLIC
1409 +}
1410 +
1411 +type AppMutation {
1412 + """Create an app"""
1413 + createApp(appInput: AppInput!): App!
1414 +
1415 + """
1416 + Remove profile image (icon) for the app. Do nothing if there's no profile image associated.
1417 + """
1418 + removeProfileImage(appId: ID!): App!
1419 +
1420 + """
1421 + Delete an App. Returns the ID of the background job receipt. Use BackgroundJobReceiptQuery to get the status of the job.
1422 + """
1423 + scheduleAppDeletion(appId: ID!): BackgroundJobReceipt!
1424 +
1425 + """Set display info for app"""
1426 + setAppInfo(appId: ID!, appInfo: AppInfoInput!): App!
1427 +
1428 + """
1429 + Set whether EAS Observe ingestion is paused for this app. Requires the ADMIN permission on
1430 + the owning account. An account-level pause takes precedence over this setting.
1431 + """
1432 + setObserveIngestionPaused(appId: ID!, paused: Boolean!): App!
1433 +
1434 + """Require api token to send push notifs for experience"""
1435 + setPushSecurityEnabled(appId: ID!, pushSecurityEnabled: Boolean!): App!
1436 +
1437 + """Set resource class experiment for app"""
1438 + setResourceClassExperiment(appId: ID!, resourceClassExperiment: ResourceClassExperiment): App!
1439 +
1440 + """Set per-type caching configuration for the app."""
1441 + setWorkflowCachingConfig(appId: ID!, config: WorkflowCachingConfigInput!): App!
1442 +}
1443 +
1444 +"""App-level notification preference"""
1445 +type AppNotificationPreference implements NotificationPreference {
1446 + app: App!
1447 + enabled: Boolean!
1448 + event: NotificationEvent!
1449 + type: NotificationType!
1450 +}
1451 +
1452 +input AppNotificationPreferenceInput {
1453 + appId: ID!
1454 + enabled: Boolean!
1455 + event: NotificationEvent!
1456 + type: NotificationType!
1457 +}
1458 +
1459 +type AppObserve {
1460 + appVersions(input: AppObserveReleasesInput!): [AppObserveAppVersion!]!
1461 + customEventList(after: String, before: String, filter: AppObserveCustomEventListFilter, first: Int, last: Int, orderBy: AppObserveCustomEventListOrderBy): AppObserveCustomEventListConnection! @deprecated(reason: "Use userEvents.list (or errors.occurrences for exceptions) instead.")
1462 + customEventNames(
1463 + appBuildNumber: String
1464 + appEasBuildId: String
1465 + appUpdateId: String
1466 + appVersion: String
1467 + endTime: DateTime!
1468 + environment: String
1469 + isEmbeddedUpdate: Boolean
1470 + orderBy: AppObserveCustomEventNamesOrderBy
1471 + platform: AppObservePlatform
1472 +
1473 + """Filter to these platforms. Cannot be set together with platform."""
1474 + platforms: [AppObservePlatform!]
1475 + startTime: DateTime!
1476 + ): AppObserveCustomEventNames! @deprecated(reason: "Use userEvents.names instead.")
1477 +
1478 + """
1479 + Namespaced successor API (ENG-26160). Prefer over the flat `updates` field.
1480 + """
1481 + easUpdates: AppObserveEasUpdates!
1482 + environments(
1483 + endTime: DateTime
1484 + platform: AppObservePlatform
1485 +
1486 + """Filter to these platforms. Cannot be set together with platform."""
1487 + platforms: [AppObservePlatform!]
1488 + startTime: DateTime
1489 + ): [String!]!
1490 +
1491 + """
1492 + Distinct unhandled-JS-error groups (the issues list), grouped by fingerprint.
1493 + """
1494 + errorGroups(input: AppObserveErrorGroupsInput!): AppObserveErrorGroups! @deprecated(reason: "Use errors.groups instead.")
1495 +
1496 + """
1497 + Headline error stats for the overview: crash-free rates and error/affected counts.
1498 + """
1499 + errorStats(input: AppObserveErrorStatsInput!): AppObserveErrorStats! @deprecated(reason: "Use errors.stats instead.")
1500 +
1501 + """
1502 + Namespaced successor API (ENG-26160). Prefer over the flat `errorGroups`/`errorStats` fields.
1503 + """
1504 + errors: AppObserveErrors!
1505 + events(after: String, before: String, filter: AppObserveEventsFilter, first: Int, last: Int, orderBy: AppObserveEventsOrderBy): AppObserveEventsConnection! @deprecated(reason: "Use metrics.list instead.")
1506 +
1507 + """
1508 + Highest Expo SDK version seen in telemetry over the trailing 30 days; null when none was reported.
1509 + """
1510 + latestExpoSdkVersion: String
1511 +
1512 + """
1513 + A single log (user-defined event or error) by `event_id`. Null when missing or aged out of retention.
1514 + """
1515 + log(id: ID!): AppObserveLog
1516 +
1517 + """
1518 + Namespaced successor API (ENG-26160). Prefer over the flat `timeSeries`/`events` fields.
1519 + """
1520 + metrics: AppObserveMetrics!
1521 +
1522 + """
1523 + Namespaced successor API (ENG-26160). Prefer over the flat `navigationRoutes` field.
1524 + """
1525 + navigation: AppObserveNavigation!
1526 + navigationRoutes(after: String, before: String, filter: AppObserveNavigationRoutesFilter!, first: Int, last: Int, orderBy: AppObserveNavigationRoutesOrderBy): AppObserveNavigationRoutesConnection! @deprecated(reason: "Use navigation.routes instead.")
1527 +
1528 + """
1529 + Namespaced successor API (ENG-26160). Prefer over the flat `overview*` fields.
1530 + """
1531 + overview: AppObserveOverview!
1532 +
1533 + """
1534 + Active users and sessions for the Overview engagement band, across all versions.
1535 + """
1536 + overviewEngagement(input: AppObserveOverviewEngagementInput!): AppObserveOverviewEngagement! @deprecated(reason: "Use overview.engagement instead.")
1537 +
1538 + """
1539 + Crash-free rates with previous-period comparison for the Overview stability tiles.
1540 + """
1541 + overviewStability(input: AppObserveOverviewStabilityInput!): AppObserveOverviewStability! @deprecated(reason: "Use overview.stability instead.")
1542 +
1543 + """
1544 + Per-version, per-platform metric summaries for the Overview version-comparison matrix.
1545 + """
1546 + overviewVersionComparison(input: AppObserveOverviewVersionComparisonInput!): AppObserveOverviewVersionComparison! @deprecated(reason: "Use overview.versionComparison instead.")
1547 +
1548 + """
1549 + One session's metrics and logs for the timeline (ENG-26160). Unknown session ids yield empty lists.
1550 + """
1551 + session(id: ID!): AppObserveSession!
1552 + timeSeries(input: AppObserveTimeSeriesInput!): AppObserveTimeSeries! @deprecated(reason: "Use metrics.timeSeries instead.")
1553 + totalEventCount: Int!
1554 +
1555 + """
1556 + Approximate count of unique users (`eas_client_id`) with at least one
1557 + supported-metric event in `[startTime, endTime)`. Uses a ClickHouse
1558 + HyperLogLog sketch, so the value can drift by a small percent on apps
1559 + with very large user bases. `metricNames` on the input is currently
1560 + ignored: the count is always over all supported metrics, matching the
1561 + universe used by `appVersions` headline counts.
1562 + """
1563 + uniqueActiveUserCount(input: AppObserveReleasesInput!): Int!
1564 +
1565 + """
1566 + Update download activity (the Recent updates list). Not available on the free tier or legacy plans.
1567 + """
1568 + updates(input: AppObserveUpdatesInput!): AppObserveUpdatesConnection! @deprecated(reason: "Use easUpdates.list instead.")
1569 +
1570 + """
1571 + Namespaced successor API (ENG-26160). Prefer over the flat `customEventNames`/`customEventList` fields.
1572 + """
1573 + userEvents: AppObserveUserEvents!
1574 +}
1575 +
1576 +type AppObserveAppBuildEmbeddedSummary {
1577 + eventCount: Int!
1578 + firstSeenAt: DateTime!
1579 +
1580 + """
1581 + Unique users whose most recent supported-metric event in the queried
1582 + range ran this build's embedded bundle.
1583 + """
1584 + lastSeenUserCount: Int!
1585 + uniqueUserCount: Int!
1586 +}
1587 +
1588 +type AppObserveAppBuildNumber {
1589 + appBuildNumber: String!
1590 + easBuilds: [AppObserveAppEasBuild!]!
1591 +
1592 + """
1593 + Summary restricted to events running this build's embedded bundle
1594 + (no OTA update applied). Null when the build has no such events
1595 + in the queried time range.
1596 + """
1597 + embedded: AppObserveAppBuildEmbeddedSummary
1598 + eventCount: Int!
1599 + firstSeenAt: DateTime!
1600 +
1601 + """
1602 + Unique users whose most recent supported-metric event in the queried
1603 + range was on this (appVersion, appBuildNumber) tuple.
1604 + """
1605 + lastSeenUserCount: Int!
1606 + uniqueUserCount: Int!
1607 +
1608 + """
1609 + Updates seen on this build number in the queried time range. Each
1610 + entry's counts and EAS builds are scoped to this (appVersion,
1611 + appBuildNumber, appUpdateId) tuple.
1612 + """
1613 + updates: [AppObserveAppUpdate!]!
1614 +}
1615 +
1616 +type AppObserveAppEasBuild {
1617 + easBuildId: String!
1618 + eventCount: Int!
1619 + firstSeenAt: DateTime!
1620 + uniqueUserCount: Int!
1621 +}
1622 +
1623 +type AppObserveAppUpdate {
1624 + appUpdateId: String!
1625 + appUpdateMessage: String
1626 + easBuilds: [AppObserveAppEasBuild!]!
1627 + eventCount: Int!
1628 + firstSeenAt: DateTime!
1629 +
1630 + """
1631 + Unique users whose most recent supported-metric event in the queried
1632 + range matched this update at its current nesting level.
1633 + """
1634 + lastSeenUserCount: Int!
1635 + uniqueUserCount: Int!
1636 +}
1637 +
1638 +type AppObserveAppVersion {
1639 + appVersion: String!
1640 + buildNumbers: [AppObserveAppBuildNumber!]!
1641 + eventCount: Int!
1642 + firstSeenAt: DateTime!
1643 +
1644 + """
1645 + Unique users whose most recent supported-metric event in
1646 + `[startTime, endTime)` was on this version. Each active user
1647 + contributes to exactly one version, so summing this field across the
1648 + returned versions yields the total active users in the window (equal
1649 + to `AppObserve.uniqueActiveUserCount` up to HyperLogLog noise).
1650 + A version may be returned with `lastSeenUserCount = 0` when
1651 + every user who touched it later moved to a newer version. Users with
1652 + no events in the window are not counted on any version.
1653 + """
1654 + lastSeenUserCount: Int!
1655 + metrics: [AppObserveAppVersionMetric!]!
1656 + uniqueUserCount: Int!
1657 + updates: [AppObserveAppUpdate!]!
1658 +}
1659 +
1660 +type AppObserveAppVersionMetric {
1661 + eventCount: Int!
1662 + metricName: String!
1663 + statistics: AppObserveVersionMarkerStatistics!
1664 +}
1665 +
1666 +type AppObserveCustomEvent {
1667 + appBuildNumber: String!
1668 + appEasBuildId: String
1669 + appIdentifier: String!
1670 + appUpdateId: String
1671 + appUpdateMessage: String
1672 + appVersion: String!
1673 + body: String
1674 + clientVersion: String
1675 + countryCode: String
1676 + deviceLanguageTag: String
1677 + deviceModel: String!
1678 + deviceOs: String!
1679 + deviceOsVersion: String!
1680 +
1681 + """
1682 + Human-friendly label from the expo.log.display_name attribute; null when the event was logged without one.
1683 + """
1684 + displayName: String
1685 + easClientId: String!
1686 + environment: String
1687 + errorFingerprint: String
1688 + errorSource: String
1689 + eventName: String!
1690 + exceptionMessage: String
1691 +
1692 + """
1693 + Symbolicated when a build or update with a matching source map exists; otherwise as reported.
1694 + """
1695 + exceptionStacktrace: String
1696 +
1697 + """
1698 + Error fields below are populated only for exception events (eventName: exception).
1699 + """
1700 + exceptionType: String
1701 + expoSdkVersion: String
1702 + id: ID!
1703 + ingestedAt: DateTime
1704 + isFatal: Boolean
1705 + properties: [AppObserveEventProperty!]!
1706 + reactNativeVersion: String
1707 + sessionId: String
1708 + severityNumber: Int
1709 + severityText: String
1710 +
1711 + """
1712 + Build whose uploaded source map symbolicated exceptionStacktrace; null when the stack trace is shown as reported or was symbolicated from an update.
1713 + """
1714 + symbolicationBuild: Build
1715 +
1716 + """
1717 + Update whose uploaded source map symbolicated exceptionStacktrace; null when the stack trace is shown as reported or was symbolicated from a build.
1718 + """
1719 + symbolicationUpdate: Update
1720 + timestamp: DateTime!
1721 +}
1722 +
1723 +type AppObserveCustomEventEdge {
1724 + cursor: String!
1725 + node: AppObserveCustomEvent!
1726 +}
1727 +
1728 +type AppObserveCustomEventListConnection {
1729 + edges: [AppObserveCustomEventEdge!]!
1730 + pageInfo: PageInfo!
1731 +}
1732 +
1733 +input AppObserveCustomEventListFilter {
1734 + appBuildNumber: String
1735 + appEasBuildId: String
1736 + appUpdateId: String
1737 + appVersion: String
1738 + countryCode: String
1739 + deviceModel: String
1740 + deviceOsVersion: String
1741 + easClientId: String
1742 + endTime: DateTime
1743 + environment: String
1744 +
1745 + """
1746 + Restrict to one error group. Combine with the exception eventName to list a group's occurrences.
1747 + """
1748 + errorFingerprint: String
1749 + eventName: String
1750 + isEmbeddedUpdate: Boolean
1751 + platform: AppObservePlatform
1752 +
1753 + """Filter to these platforms. Cannot be set together with platform."""
1754 + platforms: [AppObservePlatform!]
1755 + propertyFilters: [AppObserveCustomEventPropertyFilter!]
1756 + sessionId: String
1757 + startTime: DateTime
1758 +}
1759 +
1760 +input AppObserveCustomEventListOrderBy {
1761 + direction: AppObserveEventsOrderByDirection!
1762 + field: AppObserveCustomEventListOrderByField!
1763 +}
1764 +
1765 +enum AppObserveCustomEventListOrderByField {
1766 + TIMESTAMP
1767 +}
1768 +
1769 +type AppObserveCustomEventName {
1770 + count: Int!
1771 + eventName: String!
1772 +}
1773 +
1774 +type AppObserveCustomEventNames {
1775 + isTruncated: Boolean!
1776 + names: [AppObserveCustomEventName!]!
1777 +}
1778 +
1779 +input AppObserveCustomEventNamesOrderBy {
1780 + direction: AppObserveCustomEventNamesOrderByDirection!
1781 + field: AppObserveCustomEventNamesOrderByField!
1782 +}
1783 +
1784 +enum AppObserveCustomEventNamesOrderByDirection {
1785 + ASC
1786 + DESC
1787 +}
1788 +
1789 +enum AppObserveCustomEventNamesOrderByField {
1790 + COUNT
1791 + EVENT_NAME
1792 +}
1793 +
1794 +input AppObserveCustomEventPropertyFilter {
1795 + key: String!
1796 + value: String!
1797 +}
1798 +
1799 +"""
1800 +EAS Update download activity (app_metrics download samples plus update metadata).
1801 +"""
1802 +type AppObserveEasUpdates {
1803 + """
1804 + Updates with download statistics. Forward pagination only. Defaults to newest first.
1805 + """
1806 + list(after: String, filter: AppObserveEasUpdatesFilter!, first: Int, orderBy: AppObserveEasUpdatesOrderBy): AppObserveUpdatesConnection!
1807 +}
1808 +
1809 +input AppObserveEasUpdatesFilter {
1810 + appBuildNumber: String
1811 + appUpdateId: String
1812 + appVersion: String
1813 + endTime: DateTime!
1814 + environment: String
1815 +
1816 + """Filter to these platforms."""
1817 + platforms: [AppObservePlatform!]
1818 + startTime: DateTime!
1819 +}
1820 +
1821 +input AppObserveEasUpdatesOrderBy {
1822 + direction: AppObserveOrderDirection!
1823 + field: AppObserveUpdatesOrderByField!
1824 +}
1825 +
1826 +input AppObserveEngagementInput {
1827 + """Series bucket size. Defaults to one day."""
1828 + bucketIntervalMinutes: Int
1829 + endTime: DateTime!
1830 + environment: String
1831 +
1832 + """Filter to these platforms."""
1833 + platforms: [AppObservePlatform!]
1834 + startTime: DateTime!
1835 +}
1836 +
1837 +"""One error or crash (an app_events *.exception row)."""
1838 +type AppObserveError implements AppObserveLog {
1839 + appBuildNumber: String!
1840 + appEasBuildId: String
1841 + appIdentifier: String!
1842 + appUpdateId: String
1843 + appUpdateMessage: String
1844 + appVersion: String!
1845 + body: String
1846 + clientVersion: String
1847 + countryCode: String
1848 + deviceLanguageTag: String
1849 + deviceModel: String!
1850 + deviceOs: String!
1851 + deviceOsVersion: String!
1852 + easClientId: String!
1853 + environment: String
1854 +
1855 + """Raw log event name, e.g. exception, js.exception, native.exception."""
1856 + eventName: String!
1857 + expoSdkVersion: String
1858 + fingerprint: String
1859 + id: ID!
1860 + ingestedAt: DateTime
1861 + isFatal: Boolean
1862 + kind: AppObserveErrorKind!
1863 + message: String
1864 + properties: [AppObserveEventProperty!]!
1865 + reactNativeVersion: String
1866 + sessionId: String
1867 + severityNumber: Int
1868 + severityText: String
1869 + source: String
1870 +
1871 + """
1872 + Symbolicated when a build or update with a matching source map exists; otherwise as reported.
1873 + """
1874 + stacktrace: String
1875 +
1876 + """
1877 + Build whose uploaded source map symbolicated stacktrace; null when the stack trace is shown as reported or was symbolicated from an update.
1878 + """
1879 + symbolicationBuild: Build
1880 +
1881 + """
1882 + Update whose uploaded source map symbolicated stacktrace; null when the stack trace is shown as reported or was symbolicated from a build.
1883 + """
1884 + symbolicationUpdate: Update
1885 + timestamp: DateTime!
1886 + type: String
1887 +}
1888 +
1889 +type AppObserveErrorBreakdownBucket {
1890 + count: Int!
1891 +
1892 + """
1893 + Dimension value (app version, OS, device model, or country code). Empty string when unknown.
1894 + """
1895 + key: String!
1896 + uniqueUserCount: Int!
1897 +}
1898 +
1899 +enum AppObserveErrorBreakdownDimension {
1900 + APP_VERSION
1901 + COUNTRY
1902 + DEVICE
1903 + OS
1904 +}
1905 +
1906 +type AppObserveErrorConnection {
1907 + edges: [AppObserveErrorEdge!]!
1908 + pageInfo: PageInfo!
1909 +}
1910 +
1911 +type AppObserveErrorEdge {
1912 + cursor: String!
1913 + node: AppObserveError!
1914 +}
1915 +
1916 +type AppObserveErrorGroup {
1917 + affectedSessionCount: Int!
1918 +
1919 + """
1920 + How the error was captured, from the most recent occurrence (e.g. global).
1921 + """
1922 + errorSource: String
1923 + eventCount: Int!
1924 +
1925 + """Error message, from the most recent occurrence."""
1926 + exceptionMessage: String
1927 +
1928 + """Error class/type, from the most recent occurrence (e.g. TypeError)."""
1929 + exceptionType: String
1930 +
1931 + """
1932 + Stable grouping key (sha256 over error kind + error type + entropy-normalized message).
1933 + """
1934 + fingerprint: String!
1935 + firstSeenAt: DateTime!
1936 + isFatal: Boolean!
1937 +
1938 + """Derived from the event name of the most recent occurrence."""
1939 + kind: AppObserveErrorKind!
1940 + lastSeenAt: DateTime!
1941 +
1942 + """
1943 + Per-platform occurrence and unique-user counts, sorted by eventCount descending. Covers every device OS seen (iOS, Android, iPadOS, ...), so the counts sum to the group totals.
1944 + """
1945 + platformCounts: [AppObserveErrorGroupPlatformCount!]!
1946 +
1947 + """Distinct device OS values seen for this group (e.g. Android, iOS)."""
1948 + platforms: [String!]!
1949 +
1950 + """FATAL if any occurrence in the group was fatal, otherwise ERROR."""
1951 + severity: AppObserveErrorSeverity!
1952 +
1953 + """
1954 + Occurrences over the query window, bucketed ascending. Sparse (empty buckets omitted); the client fills gaps. Renders as the list sparkline. Bucket width is set via AppObserveErrorGroupsInput.bucketIntervalMinutes.
1955 + """
1956 + timeSeries: [AppObserveErrorTimeSeriesBucket!]!
1957 + uniqueUserCount: Int!
1958 +}
1959 +
1960 +type AppObserveErrorGroupBreakdown {
1961 + """Buckets ordered by count descending."""
1962 + buckets: [AppObserveErrorBreakdownBucket!]!
1963 +
1964 + """True when more buckets exist than were returned (top-N truncation)."""
1965 + isTruncated: Boolean!
1966 +}
1967 +
1968 +"""
1969 +Filters for the per-group breakdown. Same release/time/platform filters used across Observe.
1970 +"""
1971 +input AppObserveErrorGroupBreakdownInput {
1972 + appBuildNumber: String
1973 + appEasBuildId: String
1974 + appUpdateId: String
1975 + appVersion: String
1976 + dimension: AppObserveErrorBreakdownDimension!
1977 + endTime: DateTime!
1978 + environment: String
1979 + fingerprint: String!
1980 + isEmbeddedUpdate: Boolean
1981 +
1982 + """
1983 + Restrict to one error kind (JS errors, native crashes, or other *.exception events).
1984 + """
1985 + kind: AppObserveErrorKind
1986 + platform: AppObservePlatform
1987 +
1988 + """Filter to these platforms. Cannot be set together with platform."""
1989 + platforms: [AppObservePlatform!]
1990 + startTime: DateTime!
1991 +}
1992 +
1993 +type AppObserveErrorGroupPlatformCount {
1994 + eventCount: Int!
1995 +
1996 + """Device OS value, e.g. iOS, Android, iPadOS."""
1997 + platform: String!
1998 + uniqueUserCount: Int!
1999 +}
2000 +
2001 +type AppObserveErrorGroups {
2002 + groups: [AppObserveErrorGroup!]!
2003 +
2004 + """True when more groups exist than were returned (top-N truncation)."""
2005 + isTruncated: Boolean!
2006 +}
2007 +
2008 +input AppObserveErrorGroupsInput {
2009 + appBuildNumber: String
2010 + appEasBuildId: String
2011 + appUpdateId: String
2012 + appVersion: String
2013 +
2014 + """
2015 + Bucket width in minutes for the per-group timeSeries field. Only used when timeSeries is selected. Defaults to 1440 (daily).
2016 + """
2017 + bucketIntervalMinutes: Int
2018 + endTime: DateTime!
2019 + environment: String
2020 +
2021 + """
2022 + Restrict to a single group, e.g. to fetch one group's header on the detail page.
2023 + """
2024 + fingerprint: String
2025 + isEmbeddedUpdate: Boolean
2026 +
2027 + """
2028 + Restrict to one error kind (JS errors, native crashes, or other *.exception events).
2029 + """
2030 + kind: AppObserveErrorKind
2031 + orderBy: AppObserveErrorGroupsOrderBy
2032 + platform: AppObservePlatform
2033 +
2034 + """Filter to these platforms. Cannot be set together with platform."""
2035 + platforms: [AppObservePlatform!]
2036 +
2037 + """Restrict to fatal-only or non-fatal-only errors."""
2038 + severity: AppObserveErrorSeverity
2039 +
2040 + """Restrict to a capture source (e.g. global)."""
2041 + source: String
2042 + startTime: DateTime!
2043 +}
2044 +
2045 +enum AppObserveErrorGroupsOrderBy {
2046 + FIRST_SEEN
2047 + LAST_SEEN
2048 + MOST_FREQUENT
2049 + MOST_USERS
2050 +}
2051 +
2052 +"""
2053 +JS covers both the legacy exception name and js.exception. NATIVE is native.exception. OTHER is any other *.exception event.
2054 +"""
2055 +enum AppObserveErrorKind {
2056 + JS
2057 + NATIVE
2058 + OTHER
2059 +}
2060 +
2061 +input AppObserveErrorOccurrencesFilter {
2062 + appBuildNumber: String
2063 + appEasBuildId: String
2064 + appUpdateId: String
2065 + appVersion: String
2066 + countryCode: String
2067 + deviceModel: String
2068 + easClientId: String
2069 + endTime: DateTime
2070 + environment: String
2071 +
2072 + """Restrict to one error group."""
2073 + fingerprint: String
2074 + isEmbeddedUpdate: Boolean
2075 +
2076 + """
2077 + Restrict to one error kind (JS errors, native crashes, or other *.exception events).
2078 + """
2079 + kind: AppObserveErrorKind
2080 +
2081 + """Filter to these platforms."""
2082 + platforms: [AppObservePlatform!]
2083 + sessionId: String
2084 + startTime: DateTime
2085 +}
2086 +
2087 +input AppObserveErrorOccurrencesOrderBy {
2088 + direction: AppObserveOrderDirection!
2089 + field: AppObserveErrorOccurrencesOrderByField!
2090 +}
2091 +
2092 +enum AppObserveErrorOccurrencesOrderByField {
2093 + TIMESTAMP
2094 +}
2095 +
2096 +"""AppObserveErrorStats for one platform; iOS includes iPadOS and tvOS."""
2097 +type AppObserveErrorPlatformStats {
2098 + """Distinct sessions on this platform that hit any exception."""
2099 + affectedSessions: Int!
2100 +
2101 + """Distinct users on this platform that hit any exception."""
2102 + affectedUsers: Int!
2103 +
2104 + """
2105 + Fraction (0..1) of this platform's active sessions without a fatal error.
2106 + """
2107 + crashFreeSessions: Float!
2108 +
2109 + """Fraction (0..1) of this platform's active users without a fatal error."""
2110 + crashFreeUsers: Float!
2111 + fatalCount: Int!
2112 + nonFatalCount: Int!
2113 + platform: AppObservePlatform!
2114 +
2115 + """Total exception events in range on this platform."""
2116 + totalErrors: Int!
2117 +}
2118 +
2119 +enum AppObserveErrorSeverity {
2120 + ERROR
2121 + FATAL
2122 +}
2123 +
2124 +type AppObserveErrorStats {
2125 + """Distinct sessions that hit any exception."""
2126 + affectedSessions: Int!
2127 +
2128 + """Distinct users that hit any exception."""
2129 + affectedUsers: Int!
2130 +
2131 + """
2132 + Fraction (0..1) of active sessions without a fatal error. Denominator spans app_metrics and app_events.
2133 + """
2134 + crashFreeSessions: Float!
2135 +
2136 + """Fraction (0..1) of active users without a fatal error."""
2137 + crashFreeUsers: Float!
2138 + fatalCount: Int!
2139 + nonFatalCount: Int!
2140 +
2141 + """Total exception events in range."""
2142 + totalErrors: Int!
2143 +}
2144 +
2145 +"""
2146 +Filters for the error-stats header. Same release/time/platform filters used across Observe.
2147 +"""
2148 +input AppObserveErrorStatsInput {
2149 + appBuildNumber: String
2150 + appEasBuildId: String
2151 + appUpdateId: String
2152 + appVersion: String
2153 + endTime: DateTime!
2154 + environment: String
2155 + isEmbeddedUpdate: Boolean
2156 +
2157 + """
2158 + Restrict to one error kind (JS errors, native crashes, or other *.exception events).
2159 + """
2160 + kind: AppObserveErrorKind
2161 + platform: AppObservePlatform
2162 +
2163 + """Filter to these platforms. Cannot be set together with platform."""
2164 + platforms: [AppObservePlatform!]
2165 + startTime: DateTime!
2166 +}
2167 +
2168 +type AppObserveErrorTimeSeries {
2169 + buckets: [AppObserveErrorTimeSeriesBucket!]!
2170 +
2171 + """Sum of fatalCount across all buckets."""
2172 + totalFatalCount: Int!
2173 +
2174 + """Sum of nonFatalCount across all buckets."""
2175 + totalNonFatalCount: Int!
2176 +}
2177 +
2178 +type AppObserveErrorTimeSeriesBucket {
2179 + """
2180 + Approximate count of unique affected users in this bucket. Not summable across buckets.
2181 + """
2182 + affectedUsers: Int!
2183 +
2184 + """Start of the bucket interval."""
2185 + bucket: DateTime!
2186 + fatalCount: Int!
2187 + nonFatalCount: Int!
2188 +}
2189 +
2190 +"""
2191 +Filters for the error time series. Same release/time/platform filters used across Observe, plus the bucket size.
2192 +"""
2193 +input AppObserveErrorTimeSeriesInput {
2194 + appBuildNumber: String
2195 + appEasBuildId: String
2196 + appUpdateId: String
2197 + appVersion: String
2198 +
2199 + """Bucket width in minutes. Defaults to 60."""
2200 + bucketIntervalMinutes: Int
2201 + endTime: DateTime!
2202 + environment: String
2203 +
2204 + """
2205 + Restrict to one error group for the detail page's occurrences-over-time chart. Omit for the overview chart.
2206 + """
2207 + fingerprint: String
2208 + isEmbeddedUpdate: Boolean
2209 +
2210 + """
2211 + Restrict to one error kind (JS errors, native crashes, or other *.exception events).
2212 + """
2213 + kind: AppObserveErrorKind
2214 + platform: AppObservePlatform
2215 +
2216 + """Filter to these platforms. Cannot be set together with platform."""
2217 + platforms: [AppObservePlatform!]
2218 + startTime: DateTime!
2219 +}
2220 +
2221 +"""JS errors and native crashes: app_events *.exception rows."""
2222 +type AppObserveErrors {
2223 + """Breaks one error group down by app version, OS, device, or country."""
2224 + breakdown(input: AppObserveErrorsBreakdownInput!): AppObserveErrorGroupBreakdown!
2225 +
2226 + """
2227 + A single error or crash by id. Null when missing, aged out, or the id belongs to a user-defined event.
2228 + """
2229 + error(id: ID!): AppObserveError
2230 +
2231 + """Distinct error groups (the issues list), grouped by fingerprint."""
2232 + groups(input: AppObserveErrorsGroupsInput!): AppObserveErrorGroups!
2233 +
2234 + """Individual error occurrences. Defaults to newest first."""
2235 + occurrences(after: String, before: String, filter: AppObserveErrorOccurrencesFilter, first: Int, last: Int, orderBy: AppObserveErrorOccurrencesOrderBy): AppObserveErrorConnection!
2236 +
2237 + """Headline error stats: crash-free rates and error/affected counts."""
2238 + stats(input: AppObserveErrorsStatsInput!): AppObserveErrorStats!
2239 +
2240 + """Time-bucketed exception counts split into fatal vs non-fatal."""
2241 + timeSeries(input: AppObserveErrorsTimeSeriesInput!): AppObserveErrorTimeSeries!
2242 +}
2243 +
2244 +input AppObserveErrorsBreakdownInput {
2245 + appBuildNumber: String
2246 + appEasBuildId: String
2247 + appUpdateId: String
2248 + appVersion: String
2249 + countryCode: String
2250 + deviceModel: String
2251 + dimension: AppObserveErrorBreakdownDimension!
2252 + endTime: DateTime!
2253 + environment: String
2254 + fingerprint: String!
2255 + isEmbeddedUpdate: Boolean
2256 +
2257 + """
2258 + Restrict to one error kind (JS errors, native crashes, or other *.exception events).
2259 + """
2260 + kind: AppObserveErrorKind
2261 +
2262 + """Filter to these platforms."""
2263 + platforms: [AppObservePlatform!]
2264 + startTime: DateTime!
2265 +}
2266 +
2267 +input AppObserveErrorsGroupsInput {
2268 + appBuildNumber: String
2269 + appEasBuildId: String
2270 + appUpdateId: String
2271 + appVersion: String
2272 +
2273 + """Bucket size for each group's timeSeries. Defaults to daily."""
2274 + bucketIntervalMinutes: Int
2275 + countryCode: String
2276 + deviceModel: String
2277 + endTime: DateTime!
2278 + environment: String
2279 +
2280 + """Restrict to one error group."""
2281 + fingerprint: String
2282 + isEmbeddedUpdate: Boolean
2283 +
2284 + """
2285 + Restrict to one error kind (JS errors, native crashes, or other *.exception events).
2286 + """
2287 + kind: AppObserveErrorKind
2288 + orderBy: AppObserveErrorGroupsOrderBy
2289 +
2290 + """Filter to these platforms."""
2291 + platforms: [AppObservePlatform!]
2292 + severity: AppObserveErrorSeverity
2293 + source: String
2294 + startTime: DateTime!
2295 +}
2296 +
2297 +input AppObserveErrorsStatsInput {
2298 + appBuildNumber: String
2299 + appEasBuildId: String
2300 + appUpdateId: String
2301 + appVersion: String
2302 + countryCode: String
2303 + deviceModel: String
2304 + endTime: DateTime!
2305 + environment: String
2306 + isEmbeddedUpdate: Boolean
2307 +
2308 + """
2309 + Restrict to one error kind (JS errors, native crashes, or other *.exception events).
2310 + """
2311 + kind: AppObserveErrorKind
2312 +
2313 + """Filter to these platforms."""
2314 + platforms: [AppObservePlatform!]
2315 + startTime: DateTime!
2316 +}
2317 +
2318 +input AppObserveErrorsTimeSeriesInput {
2319 + appBuildNumber: String
2320 + appEasBuildId: String
2321 + appUpdateId: String
2322 + appVersion: String
2323 + bucketIntervalMinutes: Int
2324 + countryCode: String
2325 + deviceModel: String
2326 + endTime: DateTime!
2327 + environment: String
2328 +
2329 + """Restrict to one error group."""
2330 + fingerprint: String
2331 + isEmbeddedUpdate: Boolean
2332 +
2333 + """
2334 + Restrict to one error kind (JS errors, native crashes, or other *.exception events).
2335 + """
2336 + kind: AppObserveErrorKind
2337 +
2338 + """Filter to these platforms."""
2339 + platforms: [AppObservePlatform!]
2340 + startTime: DateTime!
2341 +}
2342 +
2343 +type AppObserveEvent {
2344 + appBuildNumber: String!
2345 + appEasBuildId: String
2346 + appIdentifier: String!
2347 + appName: String!
2348 + appUpdateId: String
2349 + appUpdateMessage: String
2350 + appVersion: String!
2351 + clientVersion: String
2352 + countryCode: String
2353 + customParams: JSON
2354 + deviceLanguageTag: String
2355 + deviceModel: String!
2356 + deviceName: String
2357 + deviceOs: String!
2358 + deviceOsVersion: String!
2359 + easClientId: String!
2360 + environment: String
2361 + eventBatchId: ID!
2362 + expoSdkVersion: String
2363 + id: ID!
2364 + ingestedAt: DateTime
2365 + metricName: String!
2366 + metricValue: Float!
2367 + parentSessionId: String
2368 + reactNativeVersion: String
2369 + routeName: String
2370 + sessionEventCount: Int
2371 + sessionId: String
2372 + tags: JSON!
2373 + timestamp: DateTime!
2374 + userEventCount: Int
2375 +}
2376 +
2377 +type AppObserveEventEdge {
2378 + cursor: String!
2379 + node: AppObserveEvent!
2380 +}
2381 +
2382 +type AppObserveEventProperty {
2383 + key: String!
2384 + type: AppObservePropertyType!
2385 + value: String!
2386 +}
2387 +
2388 +type AppObserveEventsConnection {
2389 + edges: [AppObserveEventEdge!]!
2390 + pageInfo: PageInfo!
2391 +}
2392 +
2393 +input AppObserveEventsFilter {
2394 + appBuildNumber: String
2395 + appEasBuildId: String
2396 +
2397 + """
2398 + Filter by the update the device was *running* at event time (the app_update_id column).
2399 + """
2400 + appUpdateId: String
2401 + appVersion: String
2402 +
2403 + """
2404 + Filter by the update that was *downloaded* (the expo.update_id tag), as surfaced by the EAS Update Recent updates download drill-down. Distinct from appUpdateId (running update); the two are not interchangeable.
2405 + """
2406 + downloadedUpdateId: String
2407 + easClientId: String
2408 + endTime: DateTime
2409 + environment: String
2410 + isEmbeddedUpdate: Boolean
2411 + metricName: String
2412 + platform: AppObservePlatform
2413 +
2414 + """Filter to these platforms. Cannot be set together with platform."""
2415 + platforms: [AppObservePlatform!]
2416 + routeName: String
2417 + sessionId: String
2418 + startTime: DateTime
2419 +}
2420 +
2421 +input AppObserveEventsOrderBy {
2422 + direction: AppObserveEventsOrderByDirection!
2423 + field: AppObserveEventsOrderByField!
2424 +}
2425 +
2426 +enum AppObserveEventsOrderByDirection {
2427 + ASC
2428 + DESC
2429 +}
2430 +
2431 +enum AppObserveEventsOrderByField {
2432 + METRIC_VALUE
2433 + TIMESTAMP
2434 +}
2435 +
2436 +"""Any app_events log row: a user-defined event or an error."""
2437 +interface AppObserveLog {
2438 + appBuildNumber: String!
2439 + appEasBuildId: String
2440 + appIdentifier: String!
2441 + appUpdateId: String
2442 + appUpdateMessage: String
2443 + appVersion: String!
2444 + body: String
2445 + clientVersion: String
2446 + countryCode: String
2447 + deviceLanguageTag: String
2448 + deviceModel: String!
2449 + deviceOs: String!
2450 + deviceOsVersion: String!
2451 + easClientId: String!
2452 + environment: String
2453 + expoSdkVersion: String
2454 + id: ID!
2455 + ingestedAt: DateTime
2456 + properties: [AppObserveEventProperty!]!
2457 + reactNativeVersion: String
2458 + sessionId: String
2459 + severityNumber: Int
2460 + severityText: String
2461 + timestamp: DateTime!
2462 +}
2463 +
2464 +type AppObserveLogConnection {
2465 + edges: [AppObserveLogEdge!]!
2466 + pageInfo: PageInfo!
2467 +}
2468 +
2469 +type AppObserveLogEdge {
2470 + cursor: String!
2471 + node: AppObserveLog!
2472 +}
2473 +
2474 +input AppObserveLogsOrderBy {
2475 + direction: AppObserveOrderDirection!
2476 + field: AppObserveLogsOrderByField!
2477 +}
2478 +
2479 +enum AppObserveLogsOrderByField {
2480 + TIMESTAMP
2481 +}
2482 +
2483 +"""One performance-metric sample (a row in app_metrics)."""
2484 +type AppObserveMetric {
2485 + appBuildNumber: String!
2486 + appEasBuildId: String
2487 + appIdentifier: String!
2488 + appName: String!
2489 + appUpdateId: String
2490 + appUpdateMessage: String
2491 + appVersion: String!
2492 + clientVersion: String
2493 + countryCode: String
2494 + customParams: JSON
2495 + deviceLanguageTag: String
2496 + deviceModel: String!
2497 + deviceName: String
2498 + deviceOs: String!
2499 + deviceOsVersion: String!
2500 + easClientId: String!
2501 + environment: String
2502 + eventBatchId: ID!
2503 + expoSdkVersion: String
2504 + id: ID!
2505 + ingestedAt: DateTime
2506 + name: String!
2507 + parentSessionId: String
2508 + reactNativeVersion: String
2509 + routeName: String
2510 + sessionEventCount: Int
2511 + sessionId: String
2512 + tags: JSON!
2513 + timestamp: DateTime!
2514 + userEventCount: Int
2515 + value: Float!
2516 +}
2517 +
2518 +type AppObserveMetricConnection {
2519 + edges: [AppObserveMetricEdge!]!
2520 + pageInfo: PageInfo!
2521 +}
2522 +
2523 +type AppObserveMetricEdge {
2524 + cursor: String!
2525 + node: AppObserveMetric!
2526 +}
2527 +
2528 +input AppObserveMetricTimeSeriesInput {
2529 + appBuildNumber: String
2530 + appEasBuildId: String
2531 + appUpdateId: String
2532 + appVersion: String
2533 + bucketIntervalMinutes: Int
2534 + endTime: DateTime!
2535 + environment: String
2536 + isEmbeddedUpdate: Boolean
2537 +
2538 + """Metric name, e.g. `expo.app_startup.tti`."""
2539 + name: String!
2540 +
2541 + """Filter to these platforms."""
2542 + platforms: [AppObservePlatform!]
2543 + routeName: String
2544 + startTime: DateTime!
2545 +}
2546 +
2547 +"""
2548 +Performance metrics (the app_metrics table): startup, navigation, and update-download samples.
2549 +"""
2550 +type AppObserveMetrics {
2551 + """Individual metric samples. Defaults to newest first."""
2552 + list(after: String, before: String, filter: AppObserveMetricsListFilter, first: Int, last: Int, orderBy: AppObserveMetricsListOrderBy): AppObserveMetricConnection!
2553 +
2554 + """
2555 + A single metric sample by id. Null when missing or aged out; sessionEventCount/userEventCount are always null here.
2556 + """
2557 + metric(id: ID!): AppObserveMetric
2558 +
2559 + """Time-bucketed aggregates for one metric, with app-version markers."""
2560 + timeSeries(input: AppObserveMetricTimeSeriesInput!): AppObserveTimeSeries!
2561 +}
2562 +
2563 +input AppObserveMetricsListFilter {
2564 + appBuildNumber: String
2565 + appEasBuildId: String
2566 +
2567 + """
2568 + Filter by the update the device was *running* at sample time (the app_update_id column).
2569 + """
2570 + appUpdateId: String
2571 + appVersion: String
2572 +
2573 + """
2574 + Filter by the update that was *downloaded* (the expo.update_id tag). Distinct from appUpdateId (running update); the two are not interchangeable.
2575 + """
2576 + downloadedUpdateId: String
2577 + easClientId: String
2578 + endTime: DateTime
2579 + environment: String
2580 + isEmbeddedUpdate: Boolean
2581 +
2582 + """Metric name, e.g. `expo.app_startup.tti`."""
2583 + name: String
2584 +
2585 + """Filter to these platforms."""
2586 + platforms: [AppObservePlatform!]
2587 + routeName: String
2588 + sessionId: String
2589 + startTime: DateTime
2590 +}
2591 +
2592 +input AppObserveMetricsListOrderBy {
2593 + direction: AppObserveOrderDirection!
2594 + field: AppObserveMetricsListOrderByField!
2595 +}
2596 +
2597 +enum AppObserveMetricsListOrderByField {
2598 + TIMESTAMP
2599 + VALUE
2600 +}
2601 +
2602 +"""Navigation performance per route (app_metrics navigation samples)."""
2603 +type AppObserveNavigation {
2604 + """Per-route navigation summaries."""
2605 + routes(after: String, before: String, filter: AppObserveNavigationFilter!, first: Int, last: Int, orderBy: AppObserveNavigationOrderBy): AppObserveNavigationRoutesConnection!
2606 +}
2607 +
2608 +input AppObserveNavigationFilter {
2609 + appBuildNumber: String
2610 + appEasBuildId: String
2611 + appUpdateId: String
2612 + appVersion: String
2613 + endTime: DateTime!
2614 + environment: String
2615 +
2616 + """Filter to these platforms."""
2617 + platforms: [AppObservePlatform!]
2618 + routeNames: [String!]
2619 + startTime: DateTime!
2620 +}
2621 +
2622 +input AppObserveNavigationOrderBy {
2623 + direction: AppObserveOrderDirection!
2624 + field: AppObserveNavigationRoutesOrderByField!
2625 +}
2626 +
2627 +"""
2628 +Per-route navigation timing breakdown. The "Navigations" count shown in the
2629 +dashboard is `coldTtr.count` (one cold-TTR event per user navigation).
2630 +Per-metric `median`/`p90` are null when `count` is 0 so the client can
2631 +distinguish "no data" from "0ms".
2632 +"""
2633 +type AppObserveNavigationRoute {
2634 + coldTtr: AppObserveNavigationStat!
2635 + routeName: String!
2636 + tti: AppObserveNavigationStat!
2637 + warmTtr: AppObserveNavigationStat!
2638 +}
2639 +
2640 +type AppObserveNavigationRouteEdge {
2641 + cursor: String!
2642 + node: AppObserveNavigationRoute!
2643 +}
2644 +
2645 +type AppObserveNavigationRoutesConnection {
2646 + edges: [AppObserveNavigationRouteEdge!]!
2647 + pageInfo: PageInfo!
2648 +}
2649 +
2650 +input AppObserveNavigationRoutesFilter {
2651 + appBuildNumber: String
2652 + appEasBuildId: String
2653 + appUpdateId: String
2654 + appVersion: String
2655 + endTime: DateTime!
2656 + environment: String
2657 + platform: AppObservePlatform
2658 +
2659 + """Filter to these platforms. Cannot be set together with platform."""
2660 + platforms: [AppObservePlatform!]
2661 + routeNames: [String!]
2662 + startTime: DateTime!
2663 +}
2664 +
2665 +input AppObserveNavigationRoutesOrderBy {
2666 + direction: AppObserveEventsOrderByDirection!
2667 + field: AppObserveNavigationRoutesOrderByField!
2668 +}
2669 +
2670 +enum AppObserveNavigationRoutesOrderByField {
2671 + MEDIAN_COLD_TTR
2672 + MEDIAN_TTI
2673 + MEDIAN_WARM_TTR
2674 + NAVIGATION_COUNT
2675 + P90_COLD_TTR
2676 + P90_TTI
2677 + P90_WARM_TTR
2678 + ROUTE_NAME
2679 +}
2680 +
2681 +type AppObserveNavigationStat {
2682 + count: Int!
2683 + median: Float
2684 + p90: Float
2685 +}
2686 +
2687 +enum AppObserveOrderDirection {
2688 + ASC
2689 + DESC
2690 +}
2691 +
2692 +"""
2693 +Overview-tab aggregates, across all versions unless a comparison narrows them.
2694 +"""
2695 +type AppObserveOverview {
2696 + """Active users and sessions for the engagement band."""
2697 + engagement(input: AppObserveEngagementInput!): AppObserveOverviewEngagement!
2698 +
2699 + """
2700 + Crash-free rates with previous-period comparison for the stability tiles.
2701 + """
2702 + stability(input: AppObserveStabilityInput!): AppObserveOverviewStability!
2703 +
2704 + """
2705 + Per-update comparison within one app version: the embedded bundle plus each OTA update.
2706 + """
2707 + updateComparison(input: AppObserveOverviewUpdateComparisonInput!): AppObserveOverviewUpdateComparison!
2708 +
2709 + """
2710 + Per-version, per-platform metric summaries for the version-comparison matrix.
2711 + """
2712 + versionComparison(input: AppObserveOverviewVersionComparisonInput!): AppObserveOverviewVersionComparison!
2713 +}
2714 +
2715 +type AppObserveOverviewAllReleases {
2716 + """
2717 + One entry per (metric, platform) with data in range; one entry per exact device platform.
2718 + """
2719 + metrics: [AppObserveOverviewVersionMetric!]!
2720 + uniqueUserCount: Int!
2721 +}
2722 +
2723 +type AppObserveOverviewEngagement {
2724 + activeUsers: AppObserveOverviewEngagementStat!
2725 + sessions: AppObserveOverviewEngagementStat!
2726 +}
2727 +
2728 +type AppObserveOverviewEngagementBucket {
2729 + bucketStart: DateTime!
2730 + count: Int!
2731 +}
2732 +
2733 +"""
2734 +Engagement-band filters. No release filters: the band always spans all versions.
2735 +"""
2736 +input AppObserveOverviewEngagementInput {
2737 + """Series bucket size. Defaults to one day."""
2738 + bucketIntervalMinutes: Int
2739 + endTime: DateTime!
2740 + environment: String
2741 + platform: AppObservePlatform
2742 +
2743 + """Filter to these platforms. Cannot be set together with platform."""
2744 + platforms: [AppObservePlatform!]
2745 + startTime: DateTime!
2746 +}
2747 +
2748 +type AppObserveOverviewEngagementStat {
2749 + """
2750 + Total for the equal-length window before startTime. Null when the window is longer than 45 days, since the previous period would fall outside the 90-day retention.
2751 + """
2752 + previousPeriodTotal: Int
2753 +
2754 + """Per-bucket approximate uniques; buckets do not sum to `total`."""
2755 + series: [AppObserveOverviewEngagementBucket!]!
2756 + total: Int!
2757 +}
2758 +
2759 +type AppObserveOverviewStability {
2760 + """Fatal exception events in range."""
2761 + crashCount: Int!
2762 +
2763 + """Fraction (0..1) of active sessions without a fatal error."""
2764 + crashFreeSessions: Float!
2765 +
2766 + """Fraction (0..1) of active users without a fatal error."""
2767 + crashFreeUsers: Float!
2768 +
2769 + """Distinct users that hit a fatal error in range."""
2770 + crashedUsers: Int!
2771 +
2772 + """
2773 + Fatal exception events in the equal-length window before startTime. Null when the window is longer than 45 days.
2774 + """
2775 + previousPeriodCrashCount: Int
2776 +
2777 + """
2778 + Same fractions for the equal-length window before startTime; null when it had no activity, or when the window is longer than 45 days and the previous period falls outside the 90-day retention.
2779 + """
2780 + previousPeriodCrashFreeSessions: Float
2781 + previousPeriodCrashFreeUsers: Float
2782 +
2783 + """Null when the window is longer than 45 days."""
2784 + previousPeriodCrashedUsers: Int
2785 + series: [AppObserveOverviewStabilityBucket!]!
2786 +
2787 + """
2788 + All exception events in range, for distinguishing quiet apps from crash-free ones.
2789 + """
2790 + totalErrors: Int!
2791 +}
2792 +
2793 +type AppObserveOverviewStabilityBucket {
2794 + """
2795 + Approximate unique users that hit any exception in this bucket. Not summable across buckets.
2796 + """
2797 + affectedUsers: Int!
2798 + bucketStart: DateTime!
2799 + crashCount: Int!
2800 +}
2801 +
2802 +"""
2803 +Stability-tile filters. No release filters: the tiles always span all versions.
2804 +"""
2805 +input AppObserveOverviewStabilityInput {
2806 + """Series bucket size. Defaults to one day."""
2807 + bucketIntervalMinutes: Int
2808 + endTime: DateTime!
2809 + environment: String
2810 + platform: AppObservePlatform
2811 +
2812 + """Filter to these platforms. Cannot be set together with platform."""
2813 + platforms: [AppObservePlatform!]
2814 + startTime: DateTime!
2815 +}
2816 +
2817 +type AppObserveOverviewUpdate {
2818 + """Null for the embedded bundle."""
2819 + appUpdateId: ID
2820 +
2821 + """
2822 + Downloads recorded in range across platforms; null when none were recorded
2823 + (and always for the embedded bundle). Download data is paid-only: on the
2824 + free tier and legacy plans this is always null.
2825 + """
2826 + downloadCount: Int
2827 +
2828 + """
2829 + One entry per platform with downloads in range; empty for the embedded bundle and on the free tier and legacy plans.
2830 + """
2831 + downloads: [AppObserveOverviewUpdateDownload!]!
2832 + eventCount: Int!
2833 + firstSeenAt: DateTime!
2834 + isEmbedded: Boolean!
2835 +
2836 + """
2837 + EAS update message; null for the embedded bundle or when the update row no longer exists.
2838 + """
2839 + message: String
2840 +
2841 + """One entry per (metric, platform) with data in range."""
2842 + metrics: [AppObserveOverviewUpdateMetric!]!
2843 +
2844 + """When the update was published; null for the embedded bundle."""
2845 + publishedAt: DateTime
2846 +
2847 + """
2848 + Error stats for this update, one entry per platform with activity; iOS includes iPadOS and tvOS.
2849 + """
2850 + stability: [AppObserveErrorPlatformStats!]!
2851 + uniqueUserCount: Int!
2852 +}
2853 +
2854 +type AppObserveOverviewUpdateComparison {
2855 + """
2856 + Embedded bundle first, then OTA updates oldest first. Only updates with runtime data appear.
2857 + """
2858 + updates: [AppObserveOverviewUpdate!]!
2859 +}
2860 +
2861 +input AppObserveOverviewUpdateComparisonInput {
2862 + appVersion: String!
2863 + endTime: DateTime!
2864 + environment: String
2865 +
2866 + """
2867 + Metric names to aggregate. Defaults to all metrics available on the account's plan.
2868 + """
2869 + metricNames: [String!]
2870 + startTime: DateTime!
2871 +}
2872 +
2873 +type AppObserveOverviewUpdateDownload {
2874 + downloadCount: Int!
2875 + medianDownloadTime: Float!
2876 + platform: AppObservePlatform!
2877 +}
2878 +
2879 +type AppObserveOverviewUpdateMetric {
2880 + eventCount: Int!
2881 + metricName: String!
2882 + platform: AppObservePlatform!
2883 + statistics: AppObserveVersionMarkerStatistics!
2884 +}
2885 +
2886 +type AppObserveOverviewVersion {
2887 + appVersion: String!
2888 + firstSeenAt: DateTime!
2889 +
2890 + """
2891 + One entry per (metric, platform) with data in range; each device OS (iOS, iPadOS, tvOS, macOS, Android) is a separate platform.
2892 + """
2893 + metrics: [AppObserveOverviewVersionMetric!]!
2894 +
2895 + """
2896 + Error stats for this version, one entry per platform with activity; iOS includes iPadOS and tvOS.
2897 + """
2898 + stability: [AppObserveErrorPlatformStats!]!
2899 + uniqueUserCount: Int!
2900 +}
2901 +
2902 +type AppObserveOverviewVersionComparison {
2903 + """Aggregate across every release in range; the comparison baseline."""
2904 + allReleases: AppObserveOverviewAllReleases!
2905 +
2906 + """
2907 + Every version with data in range, highest version first, for the version picker.
2908 + """
2909 + allVersions: [AppObserveOverviewVersionSummary!]!
2910 +
2911 + """
2912 + Compared versions, lowest version first. Requested versions with no data are omitted.
2913 + """
2914 + versions: [AppObserveOverviewVersion!]!
2915 +}
2916 +
2917 +input AppObserveOverviewVersionComparisonInput {
2918 + """
2919 + Versions to compare (max 10, any order). Defaults to the two highest versions.
2920 + """
2921 + appVersions: [String!]
2922 + endTime: DateTime!
2923 + environment: String
2924 +
2925 + """
2926 + Metric names to aggregate. Defaults to all metrics available on the account's plan.
2927 + """
2928 + metricNames: [String!]
2929 + startTime: DateTime!
2930 +}
2931 +
2932 +type AppObserveOverviewVersionMetric {
2933 + eventCount: Int!
2934 + metricName: String!
2935 + platform: AppObservePlatform!
2936 + statistics: AppObserveVersionMarkerStatistics!
2937 +}
2938 +
2939 +type AppObserveOverviewVersionSummary {
2940 + appVersion: String!
2941 + firstSeenAt: DateTime!
2942 + uniqueUserCount: Int!
2943 +}
2944 +
2945 +enum AppObservePlatform {
2946 + ANDROID
2947 + IOS
2948 + IPADOS
2949 + MACOS
2950 + TVOS
2951 +}
2952 +
2953 +enum AppObservePropertyType {
2954 + BOOLEAN
2955 + JSON
2956 + NUMBER
2957 + STRING
2958 +}
2959 +
2960 +input AppObserveReleasesInput {
2961 + endTime: DateTime!
2962 + environment: String
2963 + metricNames: [String!]
2964 + platform: AppObservePlatform
2965 +
2966 + """Filter to these platforms. Cannot be set together with platform."""
2967 + platforms: [AppObservePlatform!]
2968 + startTime: DateTime!
2969 +}
2970 +
2971 +type AppObserveSession {
2972 + id: ID!
2973 +
2974 + """Logs in the session: user-defined events and errors interleaved."""
2975 + logs(after: String, before: String, first: Int, last: Int, orderBy: AppObserveLogsOrderBy): AppObserveLogConnection!
2976 +
2977 + """Metric samples in the session."""
2978 + metrics(after: String, before: String, first: Int, last: Int, orderBy: AppObserveMetricsListOrderBy): AppObserveMetricConnection!
2979 +}
2980 +
2981 +"""
2982 +Stability-tile filters. No release filters: the tiles always span all versions.
2983 +"""
2984 +input AppObserveStabilityInput {
2985 + """Series bucket size. Defaults to one day."""
2986 + bucketIntervalMinutes: Int
2987 + endTime: DateTime!
2988 + environment: String
2989 +
2990 + """Filter to these platforms."""
2991 + platforms: [AppObservePlatform!]
2992 + startTime: DateTime!
2993 +}
2994 +
2995 +type AppObserveTimeSeries {
2996 + appVersionMarkers: [AppObserveAppVersion!]!
2997 + buckets: [AppObserveTimeSeriesBucket!]!
2998 + eventCount: Int!
2999 + latestVersionStatistics: AppObserveVersionStatistics
3000 + previousVersionStatistics: AppObserveVersionStatistics
3001 + statistics: AppObserveTimeSeriesStatistics!
3002 +}
3003 +
3004 +type AppObserveTimeSeriesBucket {
3005 + average: Float
3006 + bucket: DateTime!
3007 + count: Int!
3008 + max: Float
3009 + median: Float
3010 + min: Float
3011 + p80: Float
3012 + p90: Float
3013 + p99: Float
3014 +}
3015 +
3016 +input AppObserveTimeSeriesInput {
3017 + appBuildNumber: String
3018 + appEasBuildId: String
3019 + appUpdateId: String
3020 + appVersion: String
3021 + bucketIntervalMinutes: Int
3022 + endTime: DateTime!
3023 + environment: String
3024 + isEmbeddedUpdate: Boolean
3025 + metricName: String!
3026 + platform: AppObservePlatform
3027 +
3028 + """Filter to these platforms. Cannot be set together with platform."""
3029 + platforms: [AppObservePlatform!]
3030 + routeName: String
3031 + startTime: DateTime!
3032 +}
3033 +
3034 +type AppObserveTimeSeriesStatistics {
3035 + average: Float
3036 + count: Int!
3037 + max: Float
3038 + median: Float
3039 + min: Float
3040 + p80: Float
3041 + p90: Float
3042 + p99: Float
3043 +}
3044 +
3045 +type AppObserveUpdate {
3046 + appUpdateId: String!
3047 + appUpdateMessage: String
3048 + appVersion: String!
3049 +
3050 + """Branch the update was published to."""
3051 + branchName: String
3052 + downloadCount: Int!
3053 + firstSeenAt: DateTime!
3054 +
3055 + """Git commit the update was published from, when it was recorded."""
3056 + gitCommitHash: String
3057 + medianDownloadTime: Float!
3058 + p90DownloadTime: Float!
3059 +
3060 + """Platform the update was published for: ios, android, or web."""
3061 + platform: String
3062 +
3063 + """When the update was published, from the EAS Update record."""
3064 + publishedAt: DateTime
3065 +
3066 + """Runtime version the update is compatible with."""
3067 + runtimeVersion: String
3068 +
3069 + """ID of the update group this update belongs to."""
3070 + updateGroupId: String
3071 +}
3072 +
3073 +type AppObserveUpdateEdge {
3074 + cursor: String!
3075 + node: AppObserveUpdate!
3076 +}
3077 +
3078 +type AppObserveUpdatesConnection {
3079 + edges: [AppObserveUpdateEdge!]!
3080 + pageInfo: PageInfo!
3081 + totalCount: Int!
3082 + totalDownloads: Int!
3083 +}
3084 +
3085 +input AppObserveUpdatesInput {
3086 + after: String
3087 + appBuildNumber: String
3088 + appUpdateId: String
3089 + appVersion: String
3090 + endTime: DateTime!
3091 + environment: String
3092 + first: Int
3093 + orderBy: AppObserveUpdatesOrderBy
3094 + platform: AppObservePlatform
3095 +
3096 + """Filter to these platforms. Cannot be set together with platform."""
3097 + platforms: [AppObservePlatform!]
3098 + startTime: DateTime!
3099 +}
3100 +
3101 +input AppObserveUpdatesOrderBy {
3102 + direction: AppObserveUpdatesOrderByDirection!
3103 + field: AppObserveUpdatesOrderByField!
3104 +}
3105 +
3106 +enum AppObserveUpdatesOrderByDirection {
3107 + ASC
3108 + DESC
3109 +}
3110 +
3111 +enum AppObserveUpdatesOrderByField {
3112 + DOWNLOAD_COUNT
3113 + FIRST_SEEN_AT
3114 + MEDIAN_DOWNLOAD_TIME
3115 + P90_DOWNLOAD_TIME
3116 +}
3117 +
3118 +"""One user-defined event (an app_events row that is not an exception)."""
3119 +type AppObserveUserEvent implements AppObserveLog {
3120 + appBuildNumber: String!
3121 + appEasBuildId: String
3122 + appIdentifier: String!
3123 + appUpdateId: String
3124 + appUpdateMessage: String
3125 + appVersion: String!
3126 + body: String
3127 + clientVersion: String
3128 + countryCode: String
3129 + deviceLanguageTag: String
3130 + deviceModel: String!
3131 + deviceOs: String!
3132 + deviceOsVersion: String!
3133 +
3134 + """
3135 + Human-friendly label from the expo.log.display_name attribute; null when the event was logged without one.
3136 + """
3137 + displayName: String
3138 + easClientId: String!
3139 + environment: String
3140 + expoSdkVersion: String
3141 + id: ID!
3142 + ingestedAt: DateTime
3143 + name: String!
3144 + properties: [AppObserveEventProperty!]!
3145 + reactNativeVersion: String
3146 + sessionId: String
3147 + severityNumber: Int
3148 + severityText: String
3149 + timestamp: DateTime!
3150 +}
3151 +
3152 +type AppObserveUserEventBreakdown {
3153 + """Buckets ordered by count descending."""
3154 + buckets: [AppObserveUserEventBreakdownBucket!]!
3155 +
3156 + """True when more buckets exist than were returned (top-N truncation)."""
3157 + isTruncated: Boolean!
3158 +
3159 + """Number of distinct dimension values before truncation."""
3160 + totalBucketCount: Int!
3161 +}
3162 +
3163 +type AppObserveUserEventBreakdownBucket {
3164 + count: Int!
3165 +
3166 + """
3167 + Dimension value (app version, OS, device model, country code, or EAS client id). Empty string when unknown.
3168 + """
3169 + key: String!
3170 + uniqueUserCount: Int!
3171 +}
3172 +
3173 +enum AppObserveUserEventBreakdownDimension {
3174 + APP_VERSION
3175 + COUNTRY
3176 + DEVICE
3177 + OS
3178 + OS_VERSION
3179 + USER
3180 +}
3181 +
3182 +input AppObserveUserEventBreakdownInput {
3183 + appBuildNumber: String
3184 + appEasBuildId: String
3185 + appUpdateId: String
3186 + appVersion: String
3187 + countryCode: String
3188 + deviceModel: String
3189 + deviceOsVersion: String
3190 + dimension: AppObserveUserEventBreakdownDimension!
3191 + endTime: DateTime!
3192 + environment: String
3193 + isEmbeddedUpdate: Boolean
3194 +
3195 + """Maximum buckets to return, 1 to 100. Defaults to 100."""
3196 + limit: Int
3197 +
3198 + """Event name. The reserved `exception` name is rejected."""
3199 + name: String!
3200 +
3201 + """Filter to these platforms."""
3202 + platforms: [AppObservePlatform!]
3203 + startTime: DateTime!
3204 +}
3205 +
3206 +type AppObserveUserEventConnection {
3207 + edges: [AppObserveUserEventEdge!]!
3208 + pageInfo: PageInfo!
3209 +}
3210 +
3211 +type AppObserveUserEventCountBucket {
3212 + bucket: DateTime!
3213 + count: Int!
3214 +}
3215 +
3216 +type AppObserveUserEventCountSeries {
3217 + """
3218 + Buckets with at least one occurrence, ascending. Empty buckets are omitted.
3219 + """
3220 + buckets: [AppObserveUserEventCountBucket!]!
3221 + name: String!
3222 +
3223 + """Sum of count across all buckets."""
3224 + totalCount: Int!
3225 +}
3226 +
3227 +type AppObserveUserEventCounts {
3228 + """One series per requested name, in request order."""
3229 + series: [AppObserveUserEventCountSeries!]!
3230 +}
3231 +
3232 +input AppObserveUserEventCountsInput {
3233 + appBuildNumber: String
3234 + appEasBuildId: String
3235 + appUpdateId: String
3236 + appVersion: String
3237 +
3238 + """Bucket width. Defaults to 60. The range must not exceed 2000 buckets."""
3239 + bucketIntervalMinutes: Int
3240 + countryCode: String
3241 + deviceModel: String
3242 + deviceOsVersion: String
3243 + endTime: DateTime!
3244 + environment: String
3245 + isEmbeddedUpdate: Boolean
3246 +
3247 + """
3248 + Event names to count. At most 10; the reserved `exception` name is rejected.
3249 + """
3250 + names: [String!]!
3251 +
3252 + """Filter to these platforms."""
3253 + platforms: [AppObservePlatform!]
3254 + startTime: DateTime!
3255 +}
3256 +
3257 +type AppObserveUserEventEdge {
3258 + cursor: String!
3259 + node: AppObserveUserEvent!
3260 +}
3261 +
3262 +input AppObserveUserEventListFilter {
3263 + appBuildNumber: String
3264 + appEasBuildId: String
3265 + appUpdateId: String
3266 + appVersion: String
3267 + countryCode: String
3268 + deviceModel: String
3269 + deviceOsVersion: String
3270 + easClientId: String
3271 + endTime: DateTime
3272 + environment: String
3273 + isEmbeddedUpdate: Boolean
3274 +
3275 + """
3276 + Event name. The reserved `exception` name is rejected; errors live in the errors namespace.
3277 + """
3278 + name: String
3279 +
3280 + """Filter to these platforms."""
3281 + platforms: [AppObservePlatform!]
3282 + propertyFilters: [AppObserveUserEventPropertyFilter!]
3283 + sessionId: String
3284 + startTime: DateTime
3285 +}
3286 +
3287 +input AppObserveUserEventListOrderBy {
3288 + direction: AppObserveOrderDirection!
3289 + field: AppObserveUserEventListOrderByField!
3290 +}
3291 +
3292 +enum AppObserveUserEventListOrderByField {
3293 + TIMESTAMP
3294 +}
3295 +
3296 +type AppObserveUserEventName {
3297 + count: Int!
3298 + firstSeenAt: DateTime!
3299 + lastSeenAt: DateTime!
3300 + name: String!
3301 +}
3302 +
3303 +type AppObserveUserEventNames {
3304 + isTruncated: Boolean!
3305 + names: [AppObserveUserEventName!]!
3306 +}
3307 +
3308 +input AppObserveUserEventNamesInput {
3309 + appBuildNumber: String
3310 + appEasBuildId: String
3311 + appUpdateId: String
3312 + appVersion: String
3313 + endTime: DateTime!
3314 + environment: String
3315 + isEmbeddedUpdate: Boolean
3316 + orderBy: AppObserveUserEventNamesOrderBy
3317 +
3318 + """Filter to these platforms."""
3319 + platforms: [AppObservePlatform!]
3320 + startTime: DateTime!
3321 +}
3322 +
3323 +input AppObserveUserEventNamesOrderBy {
3324 + direction: AppObserveOrderDirection!
3325 + field: AppObserveUserEventNamesOrderByField!
3326 +}
3327 +
3328 +enum AppObserveUserEventNamesOrderByField {
3329 + COUNT
3330 + FIRST_SEEN
3331 + LAST_SEEN
3332 + NAME
3333 +}
3334 +
3335 +input AppObserveUserEventPropertyFilter {
3336 + key: String!
3337 + value: String!
3338 +}
3339 +
3340 +"""
3341 +User-defined events (`Observe.logEvent`): app_events log rows, excluding errors.
3342 +"""
3343 +type AppObserveUserEvents {
3344 + """
3345 + Top values of one dimension (app version, OS, device, user, ...) for a single event name.
3346 + """
3347 + breakdown(input: AppObserveUserEventBreakdownInput!): AppObserveUserEventBreakdown!
3348 +
3349 + """Time-bucketed occurrence counts, one series per requested event name."""
3350 + counts(input: AppObserveUserEventCountsInput!): AppObserveUserEventCounts!
3351 +
3352 + """
3353 + A single user-defined event by id. Null when missing, aged out, or the id belongs to an error.
3354 + """
3355 + event(id: ID!): AppObserveUserEvent
3356 +
3357 + """Individual user-defined events. Defaults to newest first."""
3358 + list(after: String, before: String, filter: AppObserveUserEventListFilter, first: Int, last: Int, orderBy: AppObserveUserEventListOrderBy): AppObserveUserEventConnection!
3359 +
3360 + """Distinct event names with counts over the time range."""
3361 + names(input: AppObserveUserEventNamesInput!): AppObserveUserEventNames!
3362 +}
3363 +
3364 +type AppObserveVersionMarkerStatistics {
3365 + average: Float
3366 + max: Float
3367 + median: Float
3368 + min: Float
3369 + p80: Float
3370 + p90: Float
3371 + p99: Float
3372 +}
3373 +
3374 +type AppObserveVersionStatistics {
3375 + appVersion: String!
3376 + statistics: AppObserveVersionMarkerStatistics!
3377 +}
3378 +
3379 +enum AppPlatform {
3380 + ANDROID
3381 + IOS
3382 +}
3383 +
3384 +enum AppPrivacy {
3385 + HIDDEN
3386 + PUBLIC
3387 + UNLISTED
3388 +}
3389 +
3390 +enum AppProfileImageWidth {
3391 + EXTRA_LARGE
3392 + LARGE
3393 + MEDIUM
3394 + SMALL
3395 +}
3396 +
3397 +type AppPushNotifications {
3398 + id: ID!
3399 + insights: AppPushNotificationsInsights!
3400 +}
3401 +
3402 +type AppPushNotificationsInsights {
3403 + id: ID!
3404 + notificationsSentOverTime(timespan: InsightsTimespan!): NotificationsSentOverTimeData!
3405 + successFailureOverTime(timespan: InsightsTimespan!): NotificationsSentOverTimeData!
3406 + totalNotificationsSent(filters: [JSON!] = [], timespan: InsightsTimespan!): Int!
3407 +}
3408 +
3409 +type AppQuery {
3410 + """Look up app by dev domain name, if one has been created"""
3411 + byDevDomainName(name: DevDomainName!): App!
3412 + byFullName(
3413 + """App full name used to look up app"""
3414 + fullName: String!
3415 + ): App!
3416 +
3417 + """Look up app by app id"""
3418 + byId(appId: String!): App!
3419 +}
3420 +
3421 +type AppStoreConnectApiKey {
3422 + account: Account!
3423 + appleTeam: AppleTeam
3424 + createdAt: DateTime!
3425 + id: ID!
3426 +
3427 + """
3428 + Null for individual (user-scoped) keys, which only support submissions.
3429 + """
3430 + issuerIdentifier: String
3431 + keyIdentifier: String!
3432 + keyP8: String!
3433 + name: String
3434 + remoteAppStoreConnectApps(bundleIdentifier: String): [RemoteAppStoreConnectApp!]!
3435 + roles: [AppStoreConnectUserRole!]
3436 + updatedAt: DateTime!
3437 +}
3438 +
3439 +input AppStoreConnectApiKeyInput {
3440 + appleTeamId: ID
3441 +
3442 + """
3443 + Omit for individual (user-scoped) keys, which have no issuer ID and only
3444 + support submissions.
3445 + """
3446 + issuerIdentifier: String
3447 + keyIdentifier: String!
3448 + keyP8: String!
3449 + name: String
3450 + roles: [AppStoreConnectUserRole!]
3451 +}
3452 +
3453 +type AppStoreConnectApiKeyMutation {
3454 + """Create an App Store Connect Api Key for an Apple Team"""
3455 + createAppStoreConnectApiKey(accountId: ID!, appStoreConnectApiKeyInput: AppStoreConnectApiKeyInput!): AppStoreConnectApiKey!
3456 +
3457 + """Delete an App Store Connect Api Key"""
3458 + deleteAppStoreConnectApiKey(id: ID!): deleteAppStoreConnectApiKeyResult!
3459 +
3460 + """Update an App Store Connect Api Key for an Apple Team"""
3461 + updateAppStoreConnectApiKey(appStoreConnectApiKeyUpdateInput: AppStoreConnectApiKeyUpdateInput!, id: ID!): AppStoreConnectApiKey!
3462 +}
3463 +
3464 +type AppStoreConnectApiKeyQuery {
3465 + byId(id: ID!): AppStoreConnectApiKey!
3466 +}
3467 +
3468 +input AppStoreConnectApiKeyUpdateInput {
3469 + appleTeamId: ID
3470 +}
3471 +
3472 +type AppStoreConnectApp {
3473 + app: App!
3474 + appStoreConnectApiKey: AppStoreConnectApiKey!
3475 + ascAppIdentifier: String!
3476 + createdAt: DateTime!
3477 + id: ID!
3478 + remoteAppStoreConnectApp: RemoteAppStoreConnectApp
3479 + updatedAt: DateTime!
3480 + webhookEventTypes: [String!]!
3481 + webhookIdentifier: ID!
3482 +}
3483 +
3484 +input AppStoreConnectAppInput {
3485 + appId: ID!
3486 + appStoreConnectApiKeyId: ID!
3487 + ascAppIdentifier: String!
3488 +}
3489 +
3490 +type AppStoreConnectAppMutation {
3491 + """Create an App Store Connect app for an Expo app."""
3492 + createAppStoreConnectApp(appStoreConnectAppInput: AppStoreConnectAppInput!): AppStoreConnectApp!
3493 +
3494 + """Delete an App Store Connect app by ID."""
3495 + deleteAppStoreConnectApp(appStoreConnectAppId: ID!): DeleteAppStoreConnectAppResult!
3496 +}
3497 +
3498 +type AppStoreConnectBuild {
3499 + ascBuildIdentifier: String!
3500 + buildNumber: String
3501 + expirationDate: DateTime
3502 + minOsVersion: String
3503 + processingState: AppStoreConnectBuildProcessingState!
3504 + uploadedDate: DateTime
3505 +}
3506 +
3507 +enum AppStoreConnectBuildProcessingState {
3508 + FAILED
3509 + INVALID
3510 + PROCESSING
3511 + VALID
3512 +}
3513 +
3514 +type AppStoreConnectBuildUpload {
3515 + appStoreConnectBuild: AppStoreConnectBuild
3516 + ascBuildUploadIdentifier: String!
3517 + buildNumber: String
3518 + createdDate: DateTime
3519 + uploadState: AppStoreConnectBuildUploadState!
3520 + uploadedDate: DateTime
3521 + version: String
3522 +}
3523 +
3524 +enum AppStoreConnectBuildUploadState {
3525 + AWAITING_UPLOAD
3526 + COMPLETE
3527 + FAILED
3528 + PROCESSING
3529 +}
3530 +
3531 +enum AppStoreConnectUserRole {
3532 + ACCESS_TO_REPORTS
3533 + ACCOUNT_HOLDER
3534 + ADMIN
3535 + APP_MANAGER
3536 + CLOUD_MANAGED_APP_DISTRIBUTION
3537 + CLOUD_MANAGED_DEVELOPER_ID
3538 + CREATE_APPS
3539 + CUSTOMER_SUPPORT
3540 + DEVELOPER
3541 + FINANCE
3542 + IMAGE_MANAGER
3543 + MARKETING
3544 + READ_ONLY
3545 + SALES
3546 + TECHNICAL
3547 + UNKNOWN
3548 +}
3549 +
3550 +"""
3551 +Whether a project has an App Store Connect connection for its ASC-triggered workflows.
3552 +"""
3553 +enum AppStoreConnectWorkflowConnectionStatus {
3554 + """An App Store Connect app connection is linked to this project."""
3555 + HAS_WORKFLOWS_IS_CONNECTED
3556 +
3557 + """
3558 + The project has App Store Connect-triggered workflows but no connection.
3559 + """
3560 + HAS_WORKFLOWS_MISSING_CONNECTION
3561 +
3562 + """The project has no workflows with an on.app_store_connect trigger."""
3563 + NO_APP_STORE_CONNECT_WORKFLOWS
3564 +}
3565 +
3566 +type AppSubmissionEdge {
3567 + cursor: String!
3568 + node: Submission!
3569 +}
3570 +
3571 +type AppSubmissionsConnection {
3572 + edges: [AppSubmissionEdge!]!
3573 + pageInfo: PageInfo!
3574 +}
3575 +
3576 +type AppUpdateEdge {
3577 + cursor: String!
3578 + node: Update!
3579 +}
3580 +
3581 +type AppUpdatesConnection {
3582 + edges: [AppUpdateEdge!]!
3583 + pageInfo: PageInfo!
3584 +}
3585 +
3586 +enum AppUploadSessionType {
3587 + PROFILE_IMAGE_UPLOAD
3588 +}
3589 +
3590 +type AppUsageMetric {
3591 + id: ID!
3592 + metricType: UsageMetricType!
3593 + serviceMetric: EASServiceMetric!
3594 + timestamp: DateTime!
3595 + value: Float!
3596 +}
3597 +
3598 +type AppUsageMetricTotal {
3599 + billingPeriod: BillingPeriod!
3600 + id: ID!
3601 + planMetrics: [EstimatedUsage!]!
3602 +
3603 + """Total cost of overages, in cents"""
3604 + totalCost: Float!
3605 +
3606 + """
3607 + Services whose estimates could not be computed and are omitted from the other fields.
3608 + """
3609 + unavailableServiceUsageMetrics: [UnavailableServiceUsageMetric!]!
3610 +}
3611 +
3612 +type AppUsageMetrics {
3613 + byBillingPeriod(date: DateTime!, service: EASService): AppUsageMetricTotal!
3614 + metricsForServiceMetric(filterParams: JSONObject, granularity: UsageMetricsGranularity!, serviceMetric: EASServiceMetric!, timespan: UsageMetricsTimespan!): [AppUsageMetric!]!
3615 +}
3616 +
3617 +"""Represents Play Store/App Store version of an application"""
3618 +type AppVersion {
3619 + """
3620 + Store identifier for an application
3621 + - Android - applicationId
3622 + - iOS - bundle identifier
3623 + """
3624 + applicationIdentifier: String!
3625 +
3626 + """
3627 + Value that identifies build in a store (it's visible to developers, but not to end users)
3628 + - Android - versionCode in build.gradle ("android.versionCode" field in app.json)
3629 + - iOS - CFBundleVersion in Info.plist ("ios.buildNumber" field in app.json)
3630 + """
3631 + buildVersion: String!
3632 + id: ID!
3633 + platform: AppPlatform!
3634 + runtimeVersion: String
3635 +
3636 + """
3637 + User-facing version in a store
3638 + - Android - versionName in build.gradle ("version" field in app.json)
3639 + - iOS - CFBundleShortVersionString in Info.plist ("version" field in app.json)
3640 + """
3641 + storeVersion: String!
3642 +}
3643 +
3644 +input AppVersionInput {
3645 + appId: ID!
3646 + applicationIdentifier: String!
3647 + buildVersion: String!
3648 + platform: AppPlatform!
3649 + runtimeVersion: String
3650 + storeVersion: String!
3651 +}
3652 +
3653 +type AppVersionMutation {
3654 + """Create an app version"""
3655 + createAppVersion(appVersionInput: AppVersionInput!): AppVersion!
3656 +}
3657 +
3658 +input AppWithGithubRepositoryInput {
3659 + accountId: ID!
3660 + appInfo: AppInfoInput
3661 + installationIdentifier: String
3662 + projectName: String!
3663 +}
3664 +
3665 +type AppWorkflowCacheEdge {
3666 + cursor: String!
3667 + node: WorkflowCache!
3668 +}
3669 +
3670 +type AppWorkflowCachesConnection {
3671 + edges: [AppWorkflowCacheEdge!]!
3672 + pageInfo: PageInfo!
3673 +}
3674 +
3675 +input AppWorkflowFilterInput {
3676 + requestedGitRef: String
3677 +}
3678 +
3679 +type AppWorkflowRunEdge {
3680 + cursor: String!
3681 + node: WorkflowRun!
3682 +}
3683 +
3684 +input AppWorkflowRunFilterInput {
3685 + requestedGitRef: String
3686 + searchTerm: String
3687 + status: WorkflowRunStatus
3688 + timeRange: WorkflowRunTimeRangeInput
3689 + workflowId: ID
3690 +}
3691 +
3692 +type AppWorkflowRunGitBranchEdge {
3693 + cursor: String!
3694 + node: AppWorkflowRunGitBranchNode!
3695 +}
3696 +
3697 +type AppWorkflowRunGitBranchNode {
3698 + lastRunAt: DateTime!
3699 + name: String!
3700 +}
3701 +
3702 +type AppWorkflowRunGitBranchesConnection {
3703 + edges: [AppWorkflowRunGitBranchEdge!]!
3704 + pageInfo: PageInfo!
3705 +}
3706 +
3707 +input AppWorkflowRunTimeRangeInput {
3708 + earliest: DateTime
3709 + latest: DateTime
3710 +}
3711 +
3712 +type AppWorkflowRunsConnection {
3713 + edges: [AppWorkflowRunEdge!]!
3714 + pageInfo: PageInfo!
3715 +}
3716 +
3717 +type AppWorkflowsInsights {
3718 + overviewMetrics(filters: WorkflowsInsightsFiltersInput, timespan: WorkflowsInsightsTimespanInput!): WorkflowsInsightsOverviewMetrics!
3719 +
3720 + """
3721 + Buckets start at the requested timespan start and advance by the granularity interval, so
3722 + their boundaries follow the requested range. The last bucket is shorter when the timespan is
3723 + not a whole number of intervals.
3724 + """
3725 + runsOverTime(filters: WorkflowsInsightsFiltersInput, granularity: WorkflowsInsightsRunsOverTimeGranularity!, timespan: WorkflowsInsightsTimespanInput!): WorkflowsInsightsRunsOverTimeData!
3726 + workflows(after: String, filters: WorkflowsInsightsFiltersInput, first: Int!, timespan: WorkflowsInsightsTimespanInput!): WorkflowsInsightsWorkflowConnection!
3727 +}
3728 +
3729 +type AppiumRunSessionRemoteConfig {
3730 + """Appium server URL for the remote device."""
3731 + appiumUrl: String!
3732 +
3733 + """W3C capabilities for the device that backs this session."""
3734 + capabilities: JSONObject!
3735 +
3736 + """
3737 + Fingerprint of the reverse-tunnel server key for the client to pin. Null when
3738 + the session does not use local egress.
3739 + """
3740 + egressFingerprint: String
3741 +
3742 + """
3743 + Loopback port on the device host that the local egress client must serve
3744 + through the tunnel. Null when the session does not use local egress.
3745 + """
3746 + egressPort: Int
3747 +
3748 + """
3749 + Secret the local egress client presents to the reverse-tunnel endpoint. Null
3750 + when the session does not use local egress.
3751 + """
3752 + egressToken: String
3753 +
3754 + """
3755 + Reverse-tunnel endpoint the local egress client connects to. Null when the
3756 + session does not use local egress.
3757 + """
3758 + egressUrl: String
3759 +
3760 + """URL of the preview server, for reaching its API rather than its page."""
3761 + previewApiUrl: String
3762 +
3763 + """
3764 + Session token gating the web preview. Null when the preview runs ungated.
3765 + """
3766 + webPreviewToken: String
3767 +
3768 + """
3769 + URL of the web preview surface for the session. Null when a web preview is
3770 + not available for the session.
3771 + """
3772 + webPreviewUrl: String
3773 +}
3774 +
3775 +type AppleAppIdentifier {
3776 + account: Account!
3777 + appleTeam: AppleTeam
3778 + bundleIdentifier: String!
3779 + id: ID!
3780 + parentAppleAppIdentifier: AppleAppIdentifier
3781 +}
3782 +
3783 +input AppleAppIdentifierInput {
3784 + appleTeamId: ID
3785 + bundleIdentifier: String!
3786 + parentAppleAppId: ID
3787 +}
3788 +
3789 +type AppleAppIdentifierMutation {
3790 + """Create an Identifier for an iOS App"""
3791 + createAppleAppIdentifier(accountId: ID!, appleAppIdentifierInput: AppleAppIdentifierInput!): AppleAppIdentifier!
3792 +}
3793 +
3794 +type AppleDevice {
3795 + account: Account!
3796 + appleTeam: AppleTeam!
3797 + createdAt: DateTime!
3798 + deviceClass: AppleDeviceClass
3799 + enabled: Boolean
3800 + id: ID!
3801 + identifier: String!
3802 + model: String
3803 + name: String
3804 + softwareVersion: String
3805 +}
3806 +
3807 +enum AppleDeviceClass {
3808 + IPAD
3809 + IPHONE
3810 + MAC
3811 + UNKNOWN
3812 +}
3813 +
3814 +input AppleDeviceFilterInput {
3815 + appleTeamIdentifier: String
3816 + class: AppleDeviceClass
3817 + identifier: String
3818 +}
3819 +
3820 +input AppleDeviceInput {
3821 + appleTeamId: ID!
3822 + deviceClass: AppleDeviceClass
3823 + enabled: Boolean
3824 + identifier: String!
3825 + model: String
3826 + name: String
3827 + softwareVersion: String
3828 +}
3829 +
3830 +type AppleDeviceMutation {
3831 + """Create an Apple Device"""
3832 + createAppleDevice(accountId: ID!, appleDeviceInput: AppleDeviceInput!): AppleDevice!
3833 +
3834 + """Delete an Apple Device"""
3835 + deleteAppleDevice(id: ID!): DeleteAppleDeviceResult!
3836 +
3837 + """Update an Apple Device"""
3838 + updateAppleDevice(appleDeviceUpdateInput: AppleDeviceUpdateInput!, id: ID!): AppleDevice!
3839 +}
3840 +
3841 +type AppleDeviceRegistrationRequest {
3842 + account: Account!
3843 + appleTeam: AppleTeam!
3844 + closedAt: DateTime
3845 + id: ID!
3846 +
3847 + """
3848 + Device that satisfied this request, including when enrollment matched a pre-existing device.
3849 + """
3850 + resolvedAppleDevice: AppleDevice
3851 +
3852 + """
3853 + Workflow job waiting for registration review when this request was created from a workflow run.
3854 + """
3855 + workflowJob: WorkflowJob
3856 +}
3857 +
3858 +type AppleDeviceRegistrationRequestMutation {
3859 + """
3860 + Create an Apple Device registration request.
3861 + Pass singleUse to create a fresh request that closes after the first device is registered.
3862 + """
3863 + createAppleDeviceRegistrationRequest(accountId: ID!, appleTeamId: ID!, singleUse: Boolean): AppleDeviceRegistrationRequest!
3864 +}
3865 +
3866 +"""Publicly visible data for an AppleDeviceRegistrationRequest."""
3867 +type AppleDeviceRegistrationRequestPublicData {
3868 + id: ID!
3869 +}
3870 +
3871 +type AppleDeviceRegistrationRequestPublicDataQuery {
3872 + """Get AppleDeviceRegistrationRequest public data by ID"""
3873 + byId(id: ID!): AppleDeviceRegistrationRequestPublicData
3874 +}
3875 +
3876 +type AppleDeviceRegistrationRequestQuery {
3877 + byId(id: ID!): AppleDeviceRegistrationRequest!
3878 +}
3879 +
3880 +input AppleDeviceUpdateInput {
3881 + name: String
3882 +}
3883 +
3884 +type AppleDistributionCertificate {
3885 + account: Account!
3886 + appleTeam: AppleTeam
3887 + certificateP12: String
3888 + certificatePassword: String
3889 + certificatePrivateSigningKey: String
3890 + createdAt: DateTime!
3891 + developerPortalIdentifier: String
3892 + id: ID!
3893 + iosAppBuildCredentialsList: [IosAppBuildCredentials!]!
3894 + serialNumber: String!
3895 + updatedAt: DateTime!
3896 + validityNotAfter: DateTime!
3897 + validityNotBefore: DateTime!
3898 +}
3899 +
3900 +input AppleDistributionCertificateInput {
3901 + appleTeamId: ID
3902 + certP12: String!
3903 + certPassword: String!
3904 + certPrivateSigningKey: String
3905 + developerPortalIdentifier: String
3906 +}
3907 +
3908 +type AppleDistributionCertificateMutation {
3909 + """Create a Distribution Certificate"""
3910 + createAppleDistributionCertificate(accountId: ID!, appleDistributionCertificateInput: AppleDistributionCertificateInput!): AppleDistributionCertificate
3911 +
3912 + """Delete a Distribution Certificate"""
3913 + deleteAppleDistributionCertificate(id: ID!): DeleteAppleDistributionCertificateResult!
3914 +}
3915 +
3916 +type AppleDistributionCertificateQuery {
3917 + byId(id: ID!): AppleDistributionCertificate!
3918 +}
3919 +
3920 +type AppleProvisioningProfile {
3921 + account: Account!
3922 + appleAppIdentifier: AppleAppIdentifier!
3923 + appleDevices: [AppleDevice!]!
3924 + appleTeam: AppleTeam
3925 + appleUUID: String!
3926 + createdAt: DateTime!
3927 + developerPortalIdentifier: String
3928 + expiration: DateTime!
3929 + id: ID!
3930 + provisioningProfile: String
3931 + status: String!
3932 + updatedAt: DateTime!
3933 +}
3934 +
3935 +input AppleProvisioningProfileInput {
3936 + appleProvisioningProfile: String!
3937 + developerPortalIdentifier: String
3938 +}
3939 +
3940 +type AppleProvisioningProfileMutation {
3941 + """Create a Provisioning Profile"""
3942 + createAppleProvisioningProfile(accountId: ID!, appleAppIdentifierId: ID!, appleProvisioningProfileInput: AppleProvisioningProfileInput!): AppleProvisioningProfile!
3943 +
3944 + """Delete a Provisioning Profile"""
3945 + deleteAppleProvisioningProfile(id: ID!): DeleteAppleProvisioningProfileResult!
3946 +
3947 + """Delete Provisioning Profiles"""
3948 + deleteAppleProvisioningProfiles(ids: [ID!]!): [DeleteAppleProvisioningProfileResult!]!
3949 +
3950 + """Update a Provisioning Profile"""
3951 + updateAppleProvisioningProfile(appleProvisioningProfileInput: AppleProvisioningProfileInput!, id: ID!): AppleProvisioningProfile!
3952 +}
3953 +
3954 +type AppleProvisioningProfileQuery {
3955 + byId(id: ID!): AppleProvisioningProfile!
3956 +}
3957 +
3958 +type ApplePushKey {
3959 + account: Account!
3960 + appleTeam: AppleTeam
3961 + createdAt: DateTime!
3962 + id: ID!
3963 + iosAppCredentialsList: [IosAppCredentials!]!
3964 + keyIdentifier: String!
3965 + keyP8: String!
3966 + updatedAt: DateTime!
3967 +}
3968 +
3969 +input ApplePushKeyInput {
3970 + appleTeamId: ID!
3971 + keyIdentifier: String!
3972 + keyP8: String!
3973 +}
3974 +
3975 +type ApplePushKeyMutation {
3976 + """Create an Apple Push Notification key"""
3977 + createApplePushKey(accountId: ID!, applePushKeyInput: ApplePushKeyInput!): ApplePushKey!
3978 +
3979 + """Delete an Apple Push Notification key"""
3980 + deleteApplePushKey(id: ID!): deleteApplePushKeyResult!
3981 +}
3982 +
3983 +type AppleTeam {
3984 + account: Account!
3985 + appleAppIdentifiers(bundleIdentifier: String): [AppleAppIdentifier!]!
3986 + appleDevices(limit: Int, offset: Int): [AppleDevice!]!
3987 + appleDistributionCertificates: [AppleDistributionCertificate!]!
3988 + appleProvisioningProfiles(appleAppIdentifierId: ID): [AppleProvisioningProfile!]!
3989 + applePushKeys: [ApplePushKey!]!
3990 + appleTeamIdentifier: String!
3991 + appleTeamName: String
3992 + appleTeamType: AppleTeamType
3993 + id: ID!
3994 + lastDeletionAttemptTime: DateTime
3995 +}
3996 +
3997 +input AppleTeamFilterInput {
3998 + appleTeamIdentifier: String
3999 +}
4000 +
4001 +input AppleTeamInput {
4002 + appleTeamIdentifier: String!
4003 + appleTeamName: String
4004 + appleTeamType: AppleTeamType
4005 +}
4006 +
4007 +type AppleTeamMutation {
4008 + """Create an Apple Team"""
4009 + createAppleTeam(accountId: ID!, appleTeamInput: AppleTeamInput!): AppleTeam!
4010 +
4011 + """Delete an Apple Team in the background"""
4012 + scheduleAppleTeamDeletion(id: ID!): BackgroundJobReceipt!
4013 +
4014 + """Update an Apple Team"""
4015 + updateAppleTeam(appleTeamUpdateInput: AppleTeamUpdateInput!, id: ID!): AppleTeam!
4016 +}
4017 +
4018 +type AppleTeamQuery {
4019 + byAppleTeamIdentifier(accountId: ID!, identifier: String!): AppleTeam
4020 +}
4021 +
4022 +enum AppleTeamType {
4023 + COMPANY_OR_ORGANIZATION
4024 + INDIVIDUAL
4025 + IN_HOUSE
4026 +}
4027 +
4028 +input AppleTeamUpdateInput {
4029 + appleTeamName: String
4030 + appleTeamType: AppleTeamType
4031 +}
4032 +
4033 +type ArgentRunSessionRemoteConfig {
4034 + """
4035 + Fingerprint of the reverse-tunnel server key for the client to pin. Null when
4036 + the session does not use local egress.
4037 + """
4038 + egressFingerprint: String
4039 +
4040 + """
4041 + Loopback port on the device host that the local egress client must serve
4042 + through the tunnel. Null when the session does not use local egress.
4043 + """
4044 + egressPort: Int
4045 +
4046 + """
4047 + Secret the local egress client presents to the reverse-tunnel endpoint. Null
4048 + when the session does not use local egress.
4049 + """
4050 + egressToken: String
4051 +
4052 + """
4053 + Reverse-tunnel endpoint the local egress client connects to. Null when the
4054 + session does not use local egress.
4055 + """
4056 + egressUrl: String
4057 +
4058 + """URL of the preview server, for reaching its API rather than its page."""
4059 + previewApiUrl: String
4060 + toolsAuthToken: String
4061 + toolsUrl: String!
4062 +
4063 + """
4064 + Session token gating the web preview. Null when the preview runs ungated.
4065 + """
4066 + webPreviewToken: String
4067 +
4068 + """
4069 + URL of the web preview surface for the session. Null when a web preview is
4070 + not available for the session.
4071 + """
4072 + webPreviewUrl: String
4073 +}
4074 +
4075 +input AscApiKeyInput {
4076 + """Omit for individual (user-scoped) keys, which have no issuer ID."""
4077 + issuerIdentifier: String
4078 + keyIdentifier: String!
4079 + keyP8: String!
4080 +}
4081 +
4082 +type Asset {
4083 + contentType: String!
4084 + fileSHA256: String!
4085 + fileSize: Int!
4086 + finalFileSize: Int
4087 + id: ID!
4088 + storageKey: String!
4089 +}
4090 +
4091 +input AssetMapGroup {
4092 + android: AssetMapSourceInput
4093 + ios: AssetMapSourceInput
4094 + web: AssetMapSourceInput
4095 +}
4096 +
4097 +input AssetMapSourceInput {
4098 + bucketKey: String
4099 + type: AssetMapSourceType
4100 +}
4101 +
4102 +enum AssetMapSourceType {
4103 + GCS
4104 +}
4105 +
4106 +type AssetMetadataResult {
4107 + status: AssetMetadataStatus!
4108 + storageKey: String!
4109 +}
4110 +
4111 +enum AssetMetadataStatus {
4112 + DOES_NOT_EXIST
4113 + EXISTS
4114 +}
4115 +
4116 +type AssetMutation {
4117 + """
4118 + Returns an array of specifications for upload. Each URL is valid for an hour.
4119 + The content type of the asset you wish to upload must be specified.
4120 + """
4121 + getSignedAssetUploadSpecifications(
4122 + """max 1400"""
4123 + assetContentTypes: [String]!
4124 + ): GetSignedAssetUploadSpecificationsResult!
4125 +}
4126 +
4127 +"""Check to see if assets with given storageKeys exist"""
4128 +type AssetQuery {
4129 + byStorageKeys(storageKeys: [String!]!): [Asset!]!
4130 + metadata(storageKeys: [String!]!): [AssetMetadataResult!]!
4131 + signedUrls(storageKeys: [String!]!, updateId: ID!): [AssetSignedUrlResult!]!
4132 +}
4133 +
4134 +type AssetSignedUrlResult {
4135 + headers: JSON
4136 + storageKey: String!
4137 + url: String!
4138 +}
4139 +
4140 +type AuditLog {
4141 + account: Account
4142 + actor: Actor
4143 + createdAt: DateTime!
4144 + id: ID!
4145 + metadata: JSONObject
4146 + targetEntityId: ID!
4147 + targetEntityMutationType: TargetEntityMutationType!
4148 + targetEntityTypeName: EntityTypeName!
4149 + targetEntityTypePublicName: String!
4150 + websiteMessage: String!
4151 +}
4152 +
4153 +type AuditLogConnection {
4154 + edges: [AuditLogEdge!]!
4155 + pageInfo: PageInfo!
4156 +}
4157 +
4158 +type AuditLogEdge {
4159 + cursor: String!
4160 + node: AuditLog!
4161 +}
4162 +
4163 +input AuditLogExportInput {
4164 + accountId: ID!
4165 + createdAfter: String!
4166 + createdBefore: String!
4167 + format: AuditLogsExportFormat!
4168 + targetEntityMutationType: [TargetEntityMutationType!]
4169 + targetEntityTypeName: [EntityTypeName!]
4170 +}
4171 +
4172 +input AuditLogFilterInput {
4173 + entityTypes: [EntityTypeName!]
4174 + mutationTypes: [TargetEntityMutationType!]
4175 +}
4176 +
4177 +type AuditLogMutation {
4178 + """
4179 + Exports Audit Logs for an account. Returns the ID of the background job receipt. Use BackgroundJobReceiptQuery to get the status of the job.
4180 + """
4181 + exportAuditLogs(exportInput: AuditLogExportInput!): BackgroundJobReceipt!
4182 +}
4183 +
4184 +type AuditLogQuery {
4185 + """Audit logs for account"""
4186 + byId(auditLogId: ID!): AuditLog!
4187 + typeNamesMap: [LogNameTypeMapping!]!
4188 +}
4189 +
4190 +enum AuditLogsExportFormat {
4191 + CSV
4192 + JSON
4193 + JSONL
4194 +}
4195 +
4196 +enum AuthProtocolType {
4197 + OIDC
4198 +}
4199 +
4200 +enum AuthProviderIdentifier {
4201 + AMAZON_FEDERATE
4202 + GENERIC
4203 + GOOGLE_WS
4204 + MS_ENTRA_ID
4205 + OKTA
4206 + ONE_LOGIN
4207 + STUB_IDP
4208 +}
4209 +
4210 +type AverageAssetMetrics {
4211 + averageDownloadSizeBytes: Int!
4212 + baseUpdate: Update
4213 + baseUpdateDownloadUrl: String
4214 + baseUpdateId: ID
4215 + count: Int!
4216 + storageKey: String!
4217 +}
4218 +
4219 +type BackgroundJobReceipt {
4220 + account: Account!
4221 + createdAt: DateTime!
4222 + errorCode: String
4223 + errorMessage: String
4224 + id: ID!
4225 + resultData: JSONObject
4226 + resultId: ID
4227 + resultType: BackgroundJobResultType!
4228 + state: BackgroundJobState!
4229 + tries: Int!
4230 + updatedAt: DateTime!
4231 + willRetry: Boolean!
4232 +}
4233 +
4234 +type BackgroundJobReceiptQuery {
4235 + """Look up background job receipt by ID"""
4236 + byId(id: ID!): BackgroundJobReceipt!
4237 +}
4238 +
4239 +enum BackgroundJobResultType {
4240 + AUDIT_LOGS_EXPORT
4241 + GITHUB_BUILD
4242 + USER_AUDIT_LOGS_EXPORT
4243 + VOID
4244 + WORKFLOWS_INSIGHTS_EXPORT
4245 +}
4246 +
4247 +enum BackgroundJobState {
4248 + FAILURE
4249 + IN_PROGRESS
4250 + QUEUED
4251 + SUCCESS
4252 +}
4253 +
4254 +input BeginSupabaseOAuthInput {
4255 + accountId: ID!
4256 +}
4257 +
4258 +type Billing {
4259 + """History of invoices"""
4260 + charges: [Charge]
4261 + id: ID!
4262 + subscription: SubscriptionDetails
4263 +}
4264 +
4265 +type BillingPeriod {
4266 + anchor: DateTime!
4267 + end: DateTime!
4268 + id: ID!
4269 + start: DateTime!
4270 +}
4271 +
4272 +input BranchFilterInput {
4273 + searchTerm: String
4274 +}
4275 +
4276 +type BranchQuery {
4277 + """Query a Branch by ID"""
4278 + byId(
4279 + """Branch ID to use to look up branch"""
4280 + branchId: ID!
4281 + ): UpdateBranch!
4282 +}
4283 +
4284 +type BrownfieldArtifact {
4285 + bundleName: String!
4286 + createdAt: DateTime!
4287 + downloadUrl: String
4288 + id: ID!
4289 + platform: AppPlatform!
4290 + sizeBytes: Int
4291 + updatedAt: DateTime!
4292 + version: String!
4293 +}
4294 +
4295 +type BrownfieldArtifactEdge {
4296 + cursor: String!
4297 + node: BrownfieldArtifact!
4298 +}
4299 +
4300 +input BrownfieldArtifactFilterInput {
4301 + bundleName: String
4302 + platform: AppPlatform
4303 + version: String
4304 +}
4305 +
4306 +type BrownfieldArtifactsConnection {
4307 + edges: [BrownfieldArtifactEdge!]!
4308 + pageInfo: PageInfo!
4309 +}
4310 +
4311 +"""Represents an EAS Build"""
4312 +type Build implements ActivityTimelineProjectActivity & BuildOrBuildJob {
4313 + activityTimestamp: DateTime!
4314 + actor: Actor
4315 + app: App!
4316 + appBuildVersion: String
4317 + appIdentifier: String
4318 + appVersion: String
4319 + artifacts: BuildArtifacts
4320 + buildMode: BuildMode
4321 + buildProfile: String
4322 + canRetry(newMode: BuildMode): Boolean!
4323 + cancelingActor: Actor
4324 + channel: String @deprecated(reason: "Use 'updateChannel' field instead.")
4325 + childBuild: Build
4326 + cliVersion: String
4327 + completedAt: DateTime
4328 + createdAt: DateTime!
4329 + customNodeVersion: String
4330 + customWorkflowName: String
4331 + deployment: Deployment
4332 + developmentClient: Boolean
4333 + distribution: DistributionType
4334 + embeddedUpdate: EmbeddedUpdate
4335 + enqueuedAt: DateTime
4336 + error: BuildError
4337 + estimatedWaitTimeLeftSeconds: Int
4338 + expirationDate: DateTime
4339 + fingerprint: Fingerprint
4340 + gitCommitHash: String
4341 + gitCommitMessage: String
4342 + gitRef: String
4343 + id: ID!
4344 +
4345 + """Queue position is 1-indexed"""
4346 + initialQueuePosition: Int
4347 + initiatingActor: Actor
4348 + iosEnterpriseProvisioning: BuildIosEnterpriseProvisioning
4349 + isForIosSimulator: Boolean!
4350 + isGitWorkingTreeDirty: Boolean
4351 + isWaived: Boolean!
4352 + logFileUrls: [String!]!
4353 + logFiles: [String!]! @deprecated(reason: "Use logFileUrls instead")
4354 + maxBuildTimeSeconds: Int!
4355 +
4356 + """Retry time starts after completedAt"""
4357 + maxRetryTimeMinutes: Int
4358 + message: String
4359 + metrics: BuildMetrics
4360 + parentBuild: Build
4361 + platform: AppPlatform!
4362 + priority: BuildPriority!
4363 + project: Project! @deprecated(reason: "Use app field instead")
4364 + projectMetadataFileUrl: String
4365 + projectRootDirectory: String
4366 + provisioningStartedAt: DateTime
4367 +
4368 + """Queue position is 1-indexed"""
4369 + queuePosition: Int
4370 + reactNativeVersion: String
4371 + releaseChannel: String
4372 + requiredPackageManager: String
4373 + resolvedEnvironment: EnvironmentVariableEnvironment
4374 + resolvedImage: String
4375 +
4376 + """The builder resource class requested by the developer"""
4377 + resourceClass: BuildResourceClass! @deprecated(reason: "Use resourceClassDisplayName instead")
4378 +
4379 + """String describing the resource class used to run the build"""
4380 + resourceClassDisplayName: String!
4381 + retryDisabledReason(newMode: BuildMode): BuildRetryDisabledReason
4382 + runFromCI: Boolean
4383 + runtime: Runtime
4384 + runtimeVersion: String @deprecated(reason: "Use 'runtime' field instead.")
4385 + sdkVersion: String
4386 + selectedImage: String @deprecated(reason: "Use 'resolvedImage' for the concrete image the build runs on.")
4387 +
4388 + """The active ssh session for this build, if any."""
4389 + sshSession: TurtleSshSession
4390 + status: BuildStatus!
4391 + submissions: [Submission!]!
4392 + updateChannel: UpdateChannel
4393 + updatedAt: DateTime!
4394 + waiverType: EASBuildWaiverType
4395 + workerStartedAt: DateTime
4396 + workflowJob: WorkflowJob
4397 +}
4398 +
4399 +type BuildAnnotation {
4400 + authorUsername: String
4401 + buildPhase: String!
4402 + exampleBuildLog: String
4403 + id: ID!
4404 + internalNotes: String
4405 + message: String!
4406 + regexFlags: String
4407 + regexString: String!
4408 + title: String!
4409 + type: BuildAnnotationType!
4410 +}
4411 +
4412 +input BuildAnnotationDataInput {
4413 + buildPhase: String!
4414 + exampleBuildLog: String
4415 + internalNotes: String
4416 + message: String!
4417 + regexFlags: String
4418 + regexString: String!
4419 + title: String!
4420 + type: BuildAnnotationType!
4421 +}
4422 +
4423 +input BuildAnnotationFiltersInput {
4424 + buildPhases: [String!]!
4425 +}
4426 +
4427 +type BuildAnnotationMutation {
4428 + """Create a Build Annotation"""
4429 + createBuildAnnotation(buildAnnotationData: BuildAnnotationDataInput!): BuildAnnotation!
4430 +
4431 + """Delete a Build Annotation"""
4432 + deleteBuildAnnotation(buildAnnotationId: ID!): DeleteBuildAnnotationResult!
4433 +
4434 + """Update a Build Annotation"""
4435 + updateBuildAnnotation(buildAnnotationData: BuildAnnotationDataInput!, buildAnnotationId: ID!): BuildAnnotation!
4436 +}
4437 +
4438 +enum BuildAnnotationType {
4439 + ERROR
4440 + INFO
4441 + WARNING
4442 +}
4443 +
4444 +type BuildAnnotationsQuery {
4445 + """View build annotations"""
4446 + all(filters: BuildAnnotationFiltersInput): [BuildAnnotation!]!
4447 +
4448 + """Find a build annotation by ID"""
4449 + byId(buildAnnotationId: ID!): BuildAnnotation!
4450 +}
4451 +
4452 +type BuildArtifacts {
4453 + applicationArchiveUrl: String
4454 + buildArtifactsUrl: String
4455 + buildUrl: String
4456 + xcodeBuildLogsUrl: String
4457 +}
4458 +
4459 +input BuildCacheInput {
4460 + clear: Boolean
4461 + disabled: Boolean
4462 + key: String
4463 + paths: [String!]
4464 +}
4465 +
4466 +enum BuildCredentialsSource {
4467 + LOCAL
4468 + REMOTE
4469 +}
4470 +
4471 +type BuildError {
4472 + buildPhase: BuildPhase
4473 + docsUrl: String
4474 + errorCode: String!
4475 + message: String!
4476 +}
4477 +
4478 +input BuildFilter {
4479 + appBuildVersion: String
4480 + appIdentifier: String
4481 + appVersion: String
4482 + buildProfile: String
4483 + channel: String
4484 + developmentClient: Boolean
4485 + distribution: DistributionType
4486 + fingerprintHash: String
4487 + gitCommitHash: String
4488 + hasFingerprint: Boolean
4489 + platform: AppPlatform
4490 + runtimeVersion: String
4491 + sdkVersion: String
4492 + simulator: Boolean
4493 + status: BuildStatus
4494 +}
4495 +
4496 +input BuildFilterInput {
4497 + buildModes: [BuildMode!]
4498 + buildProfile: String
4499 + channel: String
4500 + developmentClient: Boolean
4501 + distributions: [DistributionType!]
4502 + expired: Boolean
4503 + fingerprintHash: String
4504 + hasFingerprint: Boolean
4505 + platforms: [AppPlatform!]
4506 + releaseChannel: String
4507 + runtimeVersion: String
4508 + simulator: Boolean
4509 + statuses: [BuildStatus!]
4510 +}
4511 +
4512 +enum BuildIosEnterpriseProvisioning {
4513 + ADHOC
4514 + UNIVERSAL
4515 +}
4516 +
4517 +type BuildLimitThresholdExceededMetadata {
4518 + account: Account!
4519 + thresholdsExceeded: [NotificationThresholdExceeded!]!
4520 +}
4521 +
4522 +enum BuildLimitThresholdExceededMetadataType {
4523 + IOS
4524 + TOTAL
4525 +}
4526 +
4527 +input BuildMetadataInput {
4528 + appBuildVersion: String
4529 + appIdentifier: String
4530 + appName: String
4531 + appVersion: String
4532 + buildProfile: String
4533 + channel: String
4534 + cliVersion: String
4535 + credentialsSource: BuildCredentialsSource
4536 + customNodeVersion: String
4537 + customWorkflowName: String
4538 + developmentClient: Boolean
4539 + distribution: DistributionType
4540 + environment: String
4541 + expoPackageVersion: String
4542 + fingerprintHash: String
4543 + fingerprintSource: FingerprintSourceInput
4544 + gitCommitHash: String
4545 + gitCommitMessage: String
4546 + iosEnterpriseProvisioning: BuildIosEnterpriseProvisioning
4547 + isGitWorkingTreeDirty: Boolean
4548 + message: String
4549 + projectMetadataFile: ProjectMetadataFileInput
4550 + reactNativeVersion: String
4551 + releaseChannel: String
4552 + requiredPackageManager: String
4553 + runFromCI: Boolean
4554 + runWithNoWaitFlag: Boolean
4555 + runtimeVersion: String
4556 + sdkVersion: String
4557 + simulator: Boolean
4558 + trackingContext: JSONObject
4559 + username: String
4560 + workflow: BuildWorkflow
4561 +}
4562 +
4563 +type BuildMetrics {
4564 + buildDuration: Int
4565 + buildQueueTime: Int
4566 + buildWaitTime: Int
4567 +}
4568 +
4569 +enum BuildMode {
4570 + BUILD
4571 + CUSTOM
4572 + LOCAL
4573 + REPACK
4574 + RESIGN
4575 +}
4576 +
4577 +type BuildMutation {
4578 + """Cancel an EAS Build build"""
4579 + cancel: Build! @deprecated(reason: "Use cancelBuild instead")
4580 +
4581 + """Cancel an EAS Build build"""
4582 + cancelBuild(buildId: ID!): Build!
4583 +
4584 + """Create an Android build"""
4585 + createAndroidBuild(appId: ID!, buildParams: BuildParamsInput, job: AndroidJobInput!, metadata: BuildMetadataInput): CreateBuildResult!
4586 +
4587 + """Create an iOS build"""
4588 + createIosBuild(appId: ID!, buildParams: BuildParamsInput, job: IosJobInput!, metadata: BuildMetadataInput): CreateBuildResult!
4589 +
4590 + """Create a local build"""
4591 + createLocalBuild(appId: ID!, artifactSource: LocalBuildArchiveSourceInput!, job: LocalBuildJobInput!, metadata: BuildMetadataInput): CreateBuildResult!
4592 +
4593 + """Delete an EAS Build build"""
4594 + deleteBuild(buildId: ID!): Build!
4595 +
4596 + """Retry an Android EAS Build"""
4597 + retryAndroidBuild(buildId: ID!, jobOverrides: AndroidJobOverridesInput): Build!
4598 +
4599 + """Retry an iOS EAS Build"""
4600 + retryIosBuild(buildId: ID!, jobOverrides: IosJobOverridesInput): Build!
4601 +
4602 + """Update metadata for EAS Build build"""
4603 + updateBuildMetadata(buildId: ID!, metadata: BuildMetadataInput!): Build!
4604 +}
4605 +
4606 +interface BuildOrBuildJob {
4607 + id: ID!
4608 +}
4609 +
4610 +input BuildParamsInput {
4611 + reactNativeVersion: String
4612 + resourceClass: BuildResourceClass!
4613 + sdkVersion: String
4614 +}
4615 +
4616 +enum BuildPhase {
4617 + BUILDER_INFO
4618 + CACHE_STATS
4619 + CALCULATE_EXPO_UPDATES_RUNTIME_VERSION
4620 + CLEAN_UP_CREDENTIALS
4621 + COMPLETE_BUILD
4622 + COMPLETE_JOB
4623 + CONFIGURE_ANDROID_VERSION
4624 + CONFIGURE_EXPO_UPDATES
4625 + CONFIGURE_XCODE_PROJECT
4626 + CUSTOM
4627 + DOWNLOAD_APPLICATION_ARCHIVE
4628 + EAGER_BUNDLE
4629 + EAS_BUILD_INTERNAL
4630 + FAIL_BUILD
4631 + FIX_GRADLEW
4632 + GRADLE_BUILD_PROFILE
4633 + INSTALL_CUSTOM_TOOLS
4634 + INSTALL_DEPENDENCIES
4635 + INSTALL_PODS
4636 + ON_BUILD_CANCEL_HOOK
4637 + ON_BUILD_COMPLETE_HOOK
4638 + ON_BUILD_ERROR_HOOK
4639 + ON_BUILD_SUCCESS_HOOK
4640 + PARSE_CUSTOM_WORKFLOW_CONFIG
4641 + PARSE_XCACTIVITYLOG
4642 + POST_INSTALL_HOOK
4643 + PREBUILD
4644 + PREPARE_ARTIFACTS
4645 + PREPARE_CREDENTIALS
4646 + PREPARE_PROJECT
4647 + PRE_INSTALL_HOOK
4648 + PRE_UPLOAD_ARTIFACTS_HOOK
4649 + QUEUE
4650 + READ_APP_CONFIG
4651 + READ_EAS_JSON
4652 + READ_PACKAGE_JSON
4653 + RESTORE_CACHE
4654 + RUN_EXPO_DOCTOR
4655 + RUN_FASTLANE
4656 + RUN_GRADLEW
4657 + SAVE_CACHE
4658 + SET_UP_BUILD_ENVIRONMENT
4659 + SPIN_UP_BUILDER
4660 + SSH_SESSION
4661 + START_BUILD
4662 + UNKNOWN
4663 + UPLOAD_APPLICATION_ARCHIVE
4664 + UPLOAD_ARTIFACTS @deprecated
4665 + UPLOAD_BUILD_ARTIFACTS
4666 + UPLOAD_EMBEDDED_BUNDLE
4667 +}
4668 +
4669 +type BuildPlanCreditThresholdExceededMetadata {
4670 + account: Account!
4671 + buildCreditUsage: Int!
4672 + planLimit: Int!
4673 + threshold: Int!
4674 +}
4675 +
4676 +enum BuildPriority {
4677 + HIGH
4678 + NORMAL
4679 + NORMAL_PLUS
4680 +}
4681 +
4682 +"""Publicly visible data for a Build."""
4683 +type BuildPublicData {
4684 + artifacts: PublicArtifacts!
4685 + buildMode: BuildMode
4686 + distribution: DistributionType
4687 + id: ID!
4688 + isForIosSimulator: Boolean!
4689 + platform: AppPlatform!
4690 + project: ProjectPublicData!
4691 + status: BuildStatus!
4692 +}
4693 +
4694 +type BuildPublicDataQuery {
4695 + """Get BuildPublicData by ID"""
4696 + byId(id: ID!): BuildPublicData
4697 +}
4698 +
4699 +type BuildQuery {
4700 + """
4701 + Get all builds for a specific app.
4702 + They are sorted from latest to oldest.
4703 + """
4704 + allForApp(appId: String!, limit: Int, offset: Int, platform: AppPlatform, status: BuildStatus): [Build]! @deprecated(reason: "Use App.builds instead")
4705 +
4706 + """Look up EAS Build by build ID"""
4707 + byId(buildId: ID!): Build!
4708 +}
4709 +
4710 +input BuildResignInput {
4711 + applicationArchiveSource: ProjectArchiveSourceInput
4712 +}
4713 +
4714 +enum BuildResourceClass {
4715 + ANDROID_DEFAULT
4716 + ANDROID_LARGE
4717 + ANDROID_MEDIUM
4718 + IOS_DEFAULT
4719 + IOS_INTEL_LARGE @deprecated(reason: "No longer available. Use IOS_M_LARGE instead.")
4720 + IOS_INTEL_MEDIUM @deprecated(reason: "No longer available. Use IOS_M_MEDIUM instead.")
4721 + IOS_LARGE
4722 + IOS_M1_LARGE @deprecated(reason: "Use IOS_M_MEDIUM instead")
4723 + IOS_M1_MEDIUM @deprecated(reason: "Use IOS_M_MEDIUM instead")
4724 + IOS_MEDIUM
4725 + IOS_M_LARGE
4726 + IOS_M_MEDIUM
4727 + LEGACY
4728 + LINUX_LARGE
4729 + LINUX_MEDIUM
4730 +}
4731 +
4732 +enum BuildRetryDisabledReason {
4733 + ALREADY_RETRIED
4734 + INVALID_STATUS
4735 + IS_GITHUB_BUILD
4736 + IS_WORKFLOW_BUILD
4737 + LOCAL_BUILDS_NOT_RETRYABLE
4738 + NOT_COMPLETED_YET
4739 + TOO_MUCH_TIME_ELAPSED
4740 +}
4741 +
4742 +enum BuildStatus {
4743 + CANCELED
4744 + ERRORED
4745 + FINISHED
4746 + IN_PROGRESS
4747 + IN_QUEUE
4748 + NEW
4749 + PENDING_CANCEL
4750 +}
4751 +
4752 +enum BuildTrigger {
4753 + EAS_CLI
4754 + GIT_BASED_INTEGRATION
4755 +}
4756 +
4757 +input BuildUpdatesInput {
4758 + channel: String
4759 +}
4760 +
4761 +enum BuildWorkflow {
4762 + GENERIC
4763 + MANAGED
4764 + UNKNOWN
4765 +}
4766 +
4767 +"""A non-negative integer number of bytes."""
4768 +scalar ByteSize
4769 +
4770 +union ChannelBuildOrEmbeddedUpdate = Build | EmbeddedUpdate
4771 +
4772 +type ChannelBuildOrEmbeddedUpdateEdge {
4773 + cursor: String!
4774 + node: ChannelBuildOrEmbeddedUpdate!
4775 +}
4776 +
4777 +type ChannelBuildsAndEmbeddedUpdatesConnection {
4778 + edges: [ChannelBuildOrEmbeddedUpdateEdge!]!
4779 + pageInfo: PageInfo!
4780 +}
4781 +
4782 +input ChannelFilterInput {
4783 + searchTerm: String
4784 +}
4785 +
4786 +type ChannelQuery {
4787 + """Query a Channel by ID"""
4788 + byId(
4789 + """Channel ID to use to look up channel"""
4790 + channelId: ID!
4791 + ): UpdateChannel!
4792 +}
4793 +
4794 +type ChannelRuntimeCumulativeMetricsOverTimeData {
4795 + data: LineChartData!
4796 + metricsAtLastTimestamp: [LineDatapoint!]!
4797 + mostPopularUpdates: [Update!]!
4798 +}
4799 +
4800 +type ChannelRuntimeEdge {
4801 + cursor: String!
4802 + node: RuntimeWithLastActivity!
4803 +}
4804 +
4805 +type ChannelRuntimesConnection {
4806 + edges: [ChannelRuntimeEdge!]!
4807 + pageInfo: PageInfo!
4808 +}
4809 +
4810 +type Charge {
4811 + amount: Int!
4812 + createdAt: DateTime!
4813 + id: ID!
4814 + invoiceId: String
4815 + paid: Boolean!
4816 + receiptUrl: String
4817 + wasRefunded: Boolean!
4818 +}
4819 +
4820 +type ClaudeAuthorization {
4821 + authorizationUrl: String!
4822 + expiresAt: DateTime!
4823 + requestId: ID!
4824 +}
4825 +
4826 +type CodeSigningInfo {
4827 + alg: String!
4828 + keyid: String!
4829 + sig: String!
4830 +}
4831 +
4832 +input CodeSigningInfoInput {
4833 + alg: String!
4834 + keyid: String!
4835 + sig: String!
4836 +}
4837 +
4838 +type CodexConnectionPollResult {
4839 + connection: AgentProviderConnection
4840 + status: AgentProviderConnectionAuthorizationStatus!
4841 +}
4842 +
4843 +type CodexDeviceAuthorization {
4844 + expiresAt: DateTime!
4845 + pollingIntervalSeconds: Int!
4846 + requestId: ID!
4847 + userCode: String!
4848 + verificationUrl: String!
4849 +}
4850 +
4851 +input CompleteClaudeConnectionInput {
4852 + authorizationCode: String!
4853 + requestId: ID!
4854 +}
4855 +
4856 +input CompletePostHogConnectionInput {
4857 + code: String!
4858 + state: ID!
4859 +}
4860 +
4861 +input CompleteSupabaseOAuthInput {
4862 + code: String!
4863 + state: ID!
4864 +}
4865 +
4866 +type Concurrencies {
4867 + android: Int!
4868 + ios: Int!
4869 + total: Int!
4870 +}
4871 +
4872 +union ConcurrencyConsumer = Build | JobRun
4873 +
4874 +enum ContinentCode {
4875 + AF
4876 + AN
4877 + AS
4878 + EU
4879 + NA
4880 + OC
4881 + SA
4882 + T1
4883 +}
4884 +
4885 +type ConvexIntegrationQuery {
4886 + clientIdentifier: String!
4887 +}
4888 +
4889 +type ConvexProject {
4890 + app: App!
4891 + convexProjectIdentifier: String!
4892 + convexProjectName: String!
4893 + convexProjectSlug: String!
4894 + convexTeamConnection: ConvexTeamConnection!
4895 + createdAt: DateTime!
4896 + id: ID!
4897 + updatedAt: DateTime!
4898 +}
4899 +
4900 +type ConvexProjectMutation {
4901 + deleteConvexProject(convexProjectId: ID!): ID!
4902 + setupConvexProject(input: SetupConvexProjectInput!): SetupConvexProjectResult!
4903 +}
4904 +
4905 +type ConvexTeamConnection {
4906 + account: Account!
4907 + convexProjects: [ConvexProject!]!
4908 + convexTeamIdentifier: String!
4909 + convexTeamName: String!
4910 + convexTeamSlug: String!
4911 + createdAt: DateTime!
4912 + hasBeenClaimed: Boolean!
4913 + id: ID!
4914 + invitedAt: DateTime
4915 + invitedEmail: String
4916 + updatedAt: DateTime!
4917 +}
4918 +
4919 +type ConvexTeamConnectionMutation {
4920 + createConvexTeamConnection(convexTeamConnectionData: CreateConvexTeamConnectionInput!): ConvexTeamConnection!
4921 + deleteConvexTeamConnection(convexTeamConnectionId: ID!): ConvexTeamConnection!
4922 + sendConvexTeamInviteToVerifiedEmail(input: SendConvexTeamInviteToVerifiedEmailInput!): Boolean!
4923 +}
4924 +
4925 +enum CrashSampleFor {
4926 + NEWEST
4927 + OLDEST
4928 +}
4929 +
4930 +input CrashesFilters {
4931 + crashKind: [WorkerDeploymentCrashKind!]
4932 + name: [String!]
4933 +}
4934 +
4935 +input CreateAccessTokenInput {
4936 + actorID: ID!
4937 + note: String
4938 +
4939 + """
4940 + When given, requests authenticated with the new token are restricted to these scopes instead
4941 + of the actor's full access. Either a single ALL_ACCOUNTS scope or one ACCOUNT scope per
4942 + account.
4943 + """
4944 + scopes: [AccessTokenScopeInput!]
4945 +}
4946 +
4947 +type CreateAccessTokenResponse {
4948 + """AccessToken created"""
4949 + accessToken: AccessToken!
4950 +
4951 + """Full token string to be used for authentication"""
4952 + token: String!
4953 +}
4954 +
4955 +input CreateAndConfigureRepositoryInput {
4956 + appId: ID!
4957 + installationIdentifier: Int!
4958 +}
4959 +
4960 +input CreateAndroidDeviceRunSessionInput {
4961 + """AVD hardware profile id to use for the emulator (e.g. "pixel_9")."""
4962 + deviceIdentifier: String
4963 +
4964 + """
4965 + Android SDK system image package to use for the emulator (e.g.
4966 + "system-images;android-35;google_apis;x86_64").
4967 + """
4968 + systemImagePackage: String
4969 +}
4970 +
4971 +input CreateAndroidSubmissionInput {
4972 + appId: ID!
4973 + archiveSource: SubmissionArchiveSourceInput
4974 + config: AndroidSubmissionConfigInput!
4975 + submittedBuildId: ID
4976 +}
4977 +
4978 +input CreateBrownfieldArtifactInput {
4979 + appId: ID!
4980 + bundleName: String!
4981 +
4982 + """Filename for the artifact (e.g. "MyFramework.xcframework.tar.gz")."""
4983 + filename: String!
4984 + platform: AppPlatform!
4985 +
4986 + """The ID of the turtle job run that is producing this artifact."""
4987 + producingTurtleJobRunId: ID!
4988 +
4989 + """
4990 + Size of the artifact in bytes. Required for generating the signed upload URL.
4991 + """
4992 + size: Int!
4993 +
4994 + """
4995 + Optional. If omitted, the version is auto-incremented from the latest artifact for the same platform and bundle name.
4996 + """
4997 + version: String
4998 +}
4999 +

This file is too large to show in full.

apps/server/schema/expo.graphql.ts new
+233
@@ -0,0 +1,233 @@
1 +// Generated by @effect/graphql-generator. Do not edit.
2 +import * as Schema from "effect/Schema"
3 +
4 +export const Int = Schema.Number.check(Schema.isInt32())
5 +
6 +export const ID = Schema.String
7 +
8 +/** The `JSONObject` scalar type represents JSON objects as specified by [ECMA-404](http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf). */
9 +export const JSONObject = Schema.Json
10 +
11 +/**
12 + * - `ANDROID`
13 + * - `IOS`
14 + */
15 +export const AppPlatform = Schema.Literals(["ANDROID", "IOS"])
16 +export type AppPlatform = typeof AppPlatform.Type
17 +
18 +/**
19 + * Where the virtual device's proxied network traffic exits to the internet. When
20 + * unset, all traffic exits from EAS infrastructure.
21 + *
22 + * - `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.
23 + */
24 +export const DeviceRunSessionEgress = Schema.Literals(["LOCAL"])
25 +export type DeviceRunSessionEgress = typeof DeviceRunSessionEgress.Type
26 +
27 +/**
28 + * The client that sent a session creation request, as reported by that client. Recorded
29 + * for analytics only and never used for authorization.
30 + *
31 + * - `EAS_CLI`
32 + * - `MCP`
33 + * - `WEBSITE`
34 + */
35 +export const DeviceRunSessionRequestOrigin = Schema.Literals(["EAS_CLI", "MCP", "WEBSITE"])
36 +export type DeviceRunSessionRequestOrigin = typeof DeviceRunSessionRequestOrigin.Type
37 +
38 +/**
39 + * - `LARGE`
40 + * - `MEDIUM`
41 + */
42 +export const DeviceRunSessionResourceClass = Schema.Literals(["LARGE", "MEDIUM"])
43 +export type DeviceRunSessionResourceClass = typeof DeviceRunSessionResourceClass.Type
44 +
45 +/**
46 + * - `ERRORED`
47 + * - `IN_PROGRESS`
48 + * - `NEW`
49 + * - `QUEUED`: The session's job run waits in the queue for a worker.
50 + * - `STARTING`: A worker runs the session's job and prepares the virtual device.
51 + * - `STOPPED`
52 + */
53 +export const DeviceRunSessionStatus = Schema.Literals(["ERRORED", "IN_PROGRESS", "NEW", "QUEUED", "STARTING", "STOPPED"])
54 +export type DeviceRunSessionStatus = typeof DeviceRunSessionStatus.Type
55 +
56 +/**
57 + * - `AGENT_DEVICE`
58 + * - `APPIUM`
59 + * - `ARGENT`
60 + * - `SERVE_SIM` Deprecated: Use WEB_PREVIEW_ONLY instead.
61 + * - `WEB_PREVIEW_ONLY`: A session accessed only through its web preview.
62 + */
63 +export const DeviceRunSessionType = Schema.Literals(["AGENT_DEVICE", "APPIUM", "ARGENT", "SERVE_SIM", "WEB_PREVIEW_ONLY"])
64 +export type DeviceRunSessionType = typeof DeviceRunSessionType.Type
65 +
66 +export const CreateAndroidDeviceRunSessionInput = Schema.Struct({
67 + /** AVD hardware profile id to use for the emulator (e.g. "pixel_9"). */
68 + deviceIdentifier: Schema.optional(Schema.NullOr(Schema.String)),
69 + /**
70 + * Android SDK system image package to use for the emulator (e.g.
71 + * "system-images;android-35;google_apis;x86_64").
72 + */
73 + systemImagePackage: Schema.optional(Schema.NullOr(Schema.String))
74 +})
75 +export interface CreateAndroidDeviceRunSessionInput extends Schema.Struct.Type<typeof CreateAndroidDeviceRunSessionInput.fields> {}
76 +
77 +export const CreateIosDeviceRunSessionInput = Schema.Struct({
78 + /** Simulator device name or UDID to use for the session (e.g. "iPhone 16 Pro"). */
79 + deviceIdentifier: Schema.optional(Schema.NullOr(Schema.String))
80 +})
81 +export interface CreateIosDeviceRunSessionInput extends Schema.Struct.Type<typeof CreateIosDeviceRunSessionInput.fields> {}
82 +
83 +export const CreateDeviceRunSessionInput = Schema.Struct({
84 + /**
85 + * The coding agent sending this request, recorded for analytics only and never used for
86 + * authorization. Surrounding whitespace is trimmed, and a blank value or one over 200 characters
87 + * is treated as omitted.
88 + */
89 + agentId: Schema.optional(Schema.NullOr(Schema.String)),
90 + /**
91 + * The coding agent's own session identifier, recorded for analytics only and never used for
92 + * authorization. Surrounding whitespace is trimmed, and a blank value or one over 200 characters
93 + * is treated as omitted.
94 + */
95 + agentSessionId: Schema.optional(Schema.NullOr(Schema.String)),
96 + /** Android emulator options. Only supported when platform is ANDROID. */
97 + android: Schema.optional(Schema.NullOr(CreateAndroidDeviceRunSessionInput)),
98 + appId: ID,
99 + /**
100 + * Application archive URL to download, install, and launch before the simulator session
101 + * becomes available. Mutually exclusive with buildId, buildFingerprint, and expoGo.
102 + */
103 + applicationArchiveUrl: Schema.optional(Schema.NullOr(Schema.String)),
104 + /**
105 + * Fingerprint hash of an EAS Build to install and launch before the simulator session becomes
106 + * available; the server resolves it to the most recent installable build with this fingerprint.
107 + * Mutually exclusive with buildId, applicationArchiveUrl, and expoGo.
108 + */
109 + buildFingerprint: Schema.optional(Schema.NullOr(Schema.String)),
110 + /**
111 + * EAS Build to install and launch before the simulator session becomes available.
112 + * Mutually exclusive with buildFingerprint, applicationArchiveUrl, and expoGo.
113 + */
114 + buildId: Schema.optional(Schema.NullOr(ID)),
115 + /**
116 + * Origins of pages that may call the session's preview host API cross-origin, for example to
117 + * render the device with @expo/hub-client. Framing the preview does not need this. Same value
118 + * rules as frameAncestors. At most 10. The page still needs the preview token from remoteConfig.
119 + * If omitted, only expo.dev may call the preview API cross-origin.
120 + */
121 + corsOrigins: Schema.optional(Schema.NullOr(Schema.Array(Schema.String))),
122 + /**
123 + * Where the virtual device's proxied network traffic exits to the internet. If
124 + * omitted, all traffic exits from EAS infrastructure.
125 + */
126 + egress: Schema.optional(Schema.NullOr(DeviceRunSessionEgress)),
127 + /**
128 + * Install and launch Expo Go before the simulator session becomes available. The server resolves
129 + * the platform-specific application archive. Mutually exclusive with buildId, buildFingerprint,
130 + * and applicationArchiveUrl.
131 + */
132 + expoGo: Schema.optional(Schema.NullOr(Schema.Boolean)),
133 + /**
134 + * Origins of pages that may embed the session's preview host in a frame, next to expo.dev.
135 + * Each value is an https origin such as https://app.example.com or a subdomain wildcard such
136 + * as https://*.example.com; plain http is accepted for localhost only. At most 10. The
137 + * embedding page still needs the preview token from remoteConfig, and whoever embeds the
138 + * preview can also control the device. If omitted, only expo.dev may embed the preview.
139 + */
140 + frameAncestors: Schema.optional(Schema.NullOr(Schema.Array(Schema.String))),
141 + /** iOS Simulator options. Only supported when platform is IOS. */
142 + ios: Schema.optional(Schema.NullOr(CreateIosDeviceRunSessionInput)),
143 + /**
144 + * Arguments passed to the installed application when it is launched. Requires buildId,
145 + * applicationArchiveUrl, or expoGo.
146 + */
147 + launchArgs: Schema.optional(Schema.NullOr(Schema.Array(Schema.String))),
148 + /**
149 + * Stop the session automatically after this many minutes without observed
150 + * session activity. Must be positive and smaller than the session's maximum
151 + * duration (maxRunTimeMinutes when set). Only supported for
152 + * agent-device, argent, and Appium sessions. If omitted, the session has no idle
153 + * timeout.
154 + */
155 + maxIdleTimeMinutes: Schema.optional(Schema.NullOr(Int)),
156 + /**
157 + * Maximum usable session duration, in minutes, starting when the remote session
158 + * is ready. Must be non-negative and no greater than 40 for normal-priority
159 + * accounts or 115 for high-priority accounts. The backing job receives an
160 + * additional five minutes for cleanup.
161 + */
162 + maxRunTimeMinutes: Schema.optional(Schema.NullOr(Int)),
163 + /**
164 + * Human-readable label for the session, at most 255 characters after leading and
165 + * trailing whitespace is trimmed. If omitted, the session is unnamed and clients
166 + * fall back to identifying it by id.
167 + */
168 + name: Schema.optional(Schema.NullOr(Schema.String)),
169 + /**
170 + * Record HTTP(S) traffic from apps on the device for the whole session. iOS only.
171 + * HTTPS is decrypted, so recordings contain credentials and cookies in cleartext.
172 + * If omitted, no traffic is recorded.
173 + */
174 + networkCapture: Schema.optional(Schema.NullOr(Schema.Boolean)),
175 + /**
176 + * What network capture may keep beyond method, URL, status, timing and size: header, query,
177 + * request-body, response-body. Each can carry credentials, so nothing here is recorded unless
178 + * it is asked for. Requires networkCapture.
179 + */
180 + networkCaptureFields: Schema.optional(Schema.NullOr(Schema.Array(Schema.String))),
181 + /**
182 + * Expo or development-client URL to open after launching the installed application. Requires
183 + * buildId, applicationArchiveUrl, or expoGo.
184 + */
185 + openUrl: Schema.optional(Schema.NullOr(Schema.String)),
186 + /**
187 + * The version of the package backing the device run session (e.g. "0.1.3-alpha.3").
188 + * If omitted, consumers treat the session as pinned to "latest".
189 + */
190 + packageVersion: Schema.optional(Schema.NullOr(Schema.String)),
191 + platform: AppPlatform,
192 + /**
193 + * Prefer public preview links and show the preview host's Share button. Defaults to false.
194 + * This is a presentation preference and does not change access to bearer links.
195 + */
196 + publicPreview: Schema.optional(Schema.NullOr(Schema.Boolean)),
197 + /**
198 + * The client sending this request, recorded for analytics only. Omit it when the
199 + * client is not one of the listed values; the session is then reported as unknown.
200 + */
201 + requestOrigin: Schema.optional(Schema.NullOr(DeviceRunSessionRequestOrigin)),
202 + resourceClass: Schema.optional(Schema.NullOr(DeviceRunSessionResourceClass)),
203 + /**
204 + * Expo SDK version used to select an Expo Go application archive. Only supported when expoGo is
205 + * true. If omitted, the current Expo Go archive for the platform is used.
206 + */
207 + sdkVersion: Schema.optional(Schema.NullOr(Schema.String)),
208 + /** Free-form labels for grouping sessions, for example one per app variant. */
209 + tags: Schema.optional(Schema.NullOr(Schema.Array(Schema.String))),
210 + type: DeviceRunSessionType
211 +})
212 +export interface CreateDeviceRunSessionInput extends Schema.Struct.Type<typeof CreateDeviceRunSessionInput.fields> {}
213 +
214 +export const DeviceRunSessionFilterInput = Schema.Struct({
215 + /** Case-insensitive match anywhere in the session name. */
216 + name: Schema.optional(Schema.NullOr(Schema.String)),
217 + platforms: Schema.optional(Schema.NullOr(Schema.Array(AppPlatform))),
218 + statuses: Schema.optional(Schema.NullOr(Schema.Array(DeviceRunSessionStatus))),
219 + /** Matches sessions carrying every listed tag. Case-insensitive. */
220 + tags: Schema.optional(Schema.NullOr(Schema.Array(Schema.String))),
221 + types: Schema.optional(Schema.NullOr(Schema.Array(DeviceRunSessionType)))
222 +})
223 +export interface DeviceRunSessionFilterInput extends Schema.Struct.Type<typeof DeviceRunSessionFilterInput.fields> {}
224 +
225 +/** The possible `__typename` values of each interface and union the operations select from. */
226 +export declare namespace Typename {
227 + /** Every possible `__typename` of interface `Actor`. */
228 + export type Actor = "PartnerActor" | "Robot" | "SSOUser" | "User"
229 + /** Every possible `__typename` of union `DeviceRunSessionRemoteConfig`. */
230 + export type DeviceRunSessionRemoteConfig =
231 + | "AgentDeviceRunSessionRemoteConfig" | "AppiumRunSessionRemoteConfig" | "ArgentRunSessionRemoteConfig"
232 + | "ServeSimRunSessionRemoteConfig" | "WebPreviewOnlyRunSessionRemoteConfig"
233 +}
apps/server/scripts/fetch-expo-schema.ts new
+51
@@ -0,0 +1,51 @@
1 +#!/usr/bin/env node
2 +/**
3 + * Refreshes `schema/expo.graphql` from Expo's API, which answers introspection
4 + * without a credential. eas-cli generates its own client from the same
5 + * endpoint. Run `vp run generate` afterwards to regenerate the operations.
6 + */
7 +import * as NodeRuntime from "@effect/platform-node/NodeRuntime";
8 +import * as NodeServices from "@effect/platform-node/NodeServices";
9 +import * as Effect from "effect/Effect";
10 +import * as FileSystem from "effect/FileSystem";
11 +import * as Layer from "effect/Layer";
12 +import * as Path from "effect/Path";
13 +import * as Schema from "effect/Schema";
14 +import { FetchHttpClient, HttpClient, HttpClientRequest, HttpClientResponse } from "effect/http";
15 +import {
16 + buildClientSchema,
17 + getIntrospectionQuery,
18 + lexicographicSortSchema,
19 + printSchema,
20 + type IntrospectionQuery,
21 +} from "graphql";
22 +
23 +const EXPO_GRAPHQL_URL = "https://api.expo.dev/graphql";
24 +
25 +const IntrospectionResponse = Schema.Struct({
26 + data: Schema.Struct({ __schema: Schema.Unknown }),
27 +});
28 +
29 +const program = Effect.gen(function* () {
30 + const fs = yield* FileSystem.FileSystem;
31 + const path = yield* Path.Path;
32 + const client = (yield* HttpClient.HttpClient).pipe(HttpClient.filterStatusOk);
33 + const response = yield* HttpClientRequest.post(EXPO_GRAPHQL_URL).pipe(
34 + HttpClientRequest.bodyJson({ query: getIntrospectionQuery() }),
35 + Effect.flatMap(client.execute),
36 + Effect.flatMap(HttpClientResponse.schemaBodyJson(IntrospectionResponse)),
37 + );
38 + // Sorted so a refresh diffs by what Expo changed, not by its declaration order.
39 + const sdl = printSchema(
40 + lexicographicSortSchema(buildClientSchema(response.data as unknown as IntrospectionQuery)),
41 + );
42 + const target = path.join(import.meta.dirname, "..", "schema", "expo.graphql");
43 + yield* fs.makeDirectory(path.dirname(target), { recursive: true });
44 + yield* fs.writeFileString(target, `${sdl}\n`);
45 + yield* Effect.log(`Wrote ${target}`);
46 +});
47 +
48 +program.pipe(
49 + Effect.provide(Layer.mergeAll(NodeServices.layer, FetchHttpClient.layer)),
50 + NodeRuntime.runMain,
51 +);
apps/server/src/device/ExpoApi.graphql new
+83
@@ -0,0 +1,83 @@
1 +query T3ExpoViewer {
2 + meActor {
3 + __typename
4 + ... on UserActor {
5 + username
6 + }
7 + ... on Robot {
8 + firstName
9 + }
10 + accounts {
11 + name
12 + appsPaginated(first: 100) {
13 + edges {
14 + node {
15 + id
16 + fullName
17 + }
18 + }
19 + }
20 + }
21 + }
22 +}
23 +
24 +query T3EasSimulatorAvailability($appId: String!, $filter: [String!]) {
25 + app {
26 + byId(appId: $appId) {
27 + ownerAccount {
28 + name
29 + accountFeatureGates(filter: $filter)
30 + }
31 + }
32 + }
33 +}
34 +
35 +mutation T3CreateEasSimulatorSession($input: CreateDeviceRunSessionInput!) {
36 + deviceRunSession {
37 + createDeviceRunSession(deviceRunSessionInput: $input) {
38 + id
39 + }
40 + }
41 +}
42 +
43 +query T3EasSimulatorSession($id: ID!) {
44 + deviceRunSessions {
45 + byId(deviceRunSessionId: $id) {
46 + id
47 + status
48 + remoteConfig {
49 + ... on AgentDeviceRunSessionRemoteConfig {
50 + agentDeviceRemoteSessionUrl
51 + agentDeviceRemoteSessionToken
52 + webPreviewToken
53 + previewApiUrl
54 + }
55 + }
56 + }
57 + }
58 +}
59 +
60 +query T3ActiveEasSimulatorSessions($appId: String!, $filter: DeviceRunSessionFilterInput) {
61 + app {
62 + byId(appId: $appId) {
63 + deviceRunSessionsPaginated(first: 50, filter: $filter) {
64 + edges {
65 + node {
66 + id
67 + status
68 + name
69 + }
70 + }
71 + }
72 + }
73 + }
74 +}
75 +
76 +mutation T3StopEasSimulatorSession($id: ID!) {
77 + deviceRunSession {
78 + ensureDeviceRunSessionStopped(deviceRunSessionId: $id) {
79 + id
80 + status
81 + }
82 + }
83 +}
apps/server/src/device/ExpoApi.graphql.ts new
+330
@@ -0,0 +1,330 @@
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 AccountsAccount = 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 AccountsAccount extends Schema.Struct.Type<typeof AccountsAccount.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(AccountsAccount)
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(AccountsAccount)
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(AccountsAccount)
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(AccountsAccount)
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 +/**
95 + * An account is a container owning projects, credentials, billing and other organization
96 + * data and settings. Actors may own and be members of accounts.
97 + */
98 +export const OwnerAccountAccount = Schema.Struct({
99 + name: Schema.String,
100 + /** Server account feature gate values for this account, optionally filtering by desired gates. */
101 + accountFeatureGates: Shared.JSONObject
102 +})
103 +export interface OwnerAccountAccount extends Schema.Struct.Type<typeof OwnerAccountAccount.fields> {}
104 +
105 +/** Represents an Exponent App (or Experience in legacy terms) */
106 +export const T3EasSimulatorAvailabilityAppByIdApp = Schema.Struct({
107 + ownerAccount: OwnerAccountAccount
108 +})
109 +export interface T3EasSimulatorAvailabilityAppByIdApp extends Schema.Struct.Type<typeof T3EasSimulatorAvailabilityAppByIdApp.fields> {}
110 +
111 +export const T3EasSimulatorAvailabilityAppAppQuery = Schema.Struct({
112 + /** Look up app by app id */
113 + byId: T3EasSimulatorAvailabilityAppByIdApp
114 +})
115 +export interface T3EasSimulatorAvailabilityAppAppQuery extends Schema.Struct.Type<typeof T3EasSimulatorAvailabilityAppAppQuery.fields> {}
116 +
117 +/** `query T3EasSimulatorAvailability` */
118 +export const T3EasSimulatorAvailability = GraphQL.query("T3EasSimulatorAvailability", {
119 + document: {
120 + variables: [
121 + { name: "appId", body: "String!" },
122 + { name: "filter", body: "[String!]" }
123 + ],
124 + selections: [
125 + { name: "app", body: ["{byId(appId:$", "appId", "){ownerAccount{name accountFeatureGates(filter:$", "filter", ")}}}"] }
126 + ],
127 + fragments: []
128 + },
129 + variables: {
130 + appId: Schema.String,
131 + filter: Schema.optional(Schema.NullOr(Schema.Array(Schema.String)))
132 + },
133 + result: Schema.Struct({
134 + app: T3EasSimulatorAvailabilityAppAppQuery
135 + })
136 +})
137 +export declare namespace T3EasSimulatorAvailability {
138 + export type Variables = typeof T3EasSimulatorAvailability.variables.Type
139 + export type Result = typeof T3EasSimulatorAvailability.result.Type
140 +}
141 +
142 +export const CreateDeviceRunSessionDeviceRunSession = Schema.Struct({
143 + id: Shared.ID
144 +})
145 +export interface CreateDeviceRunSessionDeviceRunSession extends Schema.Struct.Type<typeof CreateDeviceRunSessionDeviceRunSession.fields> {}
146 +
147 +export const T3CreateEasSimulatorSessionDeviceRunSessionDeviceRunSessionMutation = Schema.Struct({
148 + /** Create a device run session */
149 + createDeviceRunSession: CreateDeviceRunSessionDeviceRunSession
150 +})
151 +export interface T3CreateEasSimulatorSessionDeviceRunSessionDeviceRunSessionMutation extends Schema.Struct.Type<typeof T3CreateEasSimulatorSessionDeviceRunSessionDeviceRunSessionMutation.fields> {}
152 +
153 +/** `mutation T3CreateEasSimulatorSession` */
154 +export const T3CreateEasSimulatorSession = GraphQL.mutation("T3CreateEasSimulatorSession", {
155 + document: {
156 + variables: [
157 + { name: "input", body: "CreateDeviceRunSessionInput!" }
158 + ],
159 + selections: [
160 + { name: "deviceRunSession", body: ["{createDeviceRunSession(deviceRunSessionInput:$", "input", "){id}}"] }
161 + ],
162 + fragments: []
163 + },
164 + variables: {
165 + input: Shared.CreateDeviceRunSessionInput
166 + },
167 + result: Schema.Struct({
168 + /** Mutations that create, stop, update, and delete device run sessions */
169 + deviceRunSession: T3CreateEasSimulatorSessionDeviceRunSessionDeviceRunSessionMutation
170 + })
171 +})
172 +export declare namespace T3CreateEasSimulatorSession {
173 + export type Variables = typeof T3CreateEasSimulatorSession.variables.Type
174 + export type Result = typeof T3CreateEasSimulatorSession.result.Type
175 +}
176 +
177 +export const AgentDeviceRunSessionRemoteConfig = Schema.Struct({
178 + __typename: Schema.Literal("AgentDeviceRunSessionRemoteConfig"),
179 + agentDeviceRemoteSessionUrl: Schema.String,
180 + agentDeviceRemoteSessionToken: Schema.String,
181 + /** Session token gating the web preview. Null when the preview runs ungated. */
182 + webPreviewToken: Schema.NullOr(Schema.String),
183 + /** URL of the preview server, for reaching its API rather than its page. */
184 + previewApiUrl: Schema.NullOr(Schema.String)
185 +})
186 +export interface AgentDeviceRunSessionRemoteConfig extends Schema.Struct.Type<typeof AgentDeviceRunSessionRemoteConfig.fields> {}
187 +
188 +export const DeviceRunSessionRemoteConfigOther = Schema.Struct({
189 + __typename: GraphQL.otherTypename<Shared.Typename.DeviceRunSessionRemoteConfig>()(["AgentDeviceRunSessionRemoteConfig"])
190 +})
191 +export interface DeviceRunSessionRemoteConfigOther extends Schema.Struct.Type<typeof DeviceRunSessionRemoteConfigOther.fields> {}
192 +
193 +export const ByIdDeviceRunSession = Schema.Struct({
194 + id: Shared.ID,
195 + status: GraphQL.enumLiterals(Shared.DeviceRunSessionStatus.literals),
196 + remoteConfig: Schema.NullOr(Schema.Union([
197 + AgentDeviceRunSessionRemoteConfig,
198 + DeviceRunSessionRemoteConfigOther
199 + ]))
200 +})
201 +export interface ByIdDeviceRunSession extends Schema.Struct.Type<typeof ByIdDeviceRunSession.fields> {}
202 +
203 +export const DeviceRunSessionQuery = Schema.Struct({
204 + byId: ByIdDeviceRunSession
205 +})
206 +export interface DeviceRunSessionQuery extends Schema.Struct.Type<typeof DeviceRunSessionQuery.fields> {}
207 +
208 +/** `query T3EasSimulatorSession` */
209 +export const T3EasSimulatorSession = GraphQL.query("T3EasSimulatorSession", {
210 + document: {
211 + variables: [
212 + { name: "id", body: "ID!" }
213 + ],
214 + selections: [
215 + { name: "deviceRunSessions", body: ["{byId(deviceRunSessionId:$", "id", "){id status remoteConfig{__typename...on AgentDeviceRunSessionRemoteConfig{agentDeviceRemoteSessionUrl agentDeviceRemoteSessionToken webPreviewToken previewApiUrl}}}}"] }
216 + ],
217 + fragments: []
218 + },
219 + variables: {
220 + id: Shared.ID
221 + },
222 + result: Schema.Struct({
223 + deviceRunSessions: DeviceRunSessionQuery
224 + })
225 +})
226 +export declare namespace T3EasSimulatorSession {
227 + export type Variables = typeof T3EasSimulatorSession.variables.Type
228 + export type Result = typeof T3EasSimulatorSession.result.Type
229 +}
230 +
231 +export const NodeDeviceRunSession = Schema.Struct({
232 + id: Shared.ID,
233 + status: GraphQL.enumLiterals(Shared.DeviceRunSessionStatus.literals),
234 + /**
235 + * Human-readable label set when the session is created or changed later with
236 + * updateDeviceRunSession. Null when the session has no name.
237 + */
238 + name: Schema.NullOr(Schema.String)
239 +})
240 +export interface NodeDeviceRunSession extends Schema.Struct.Type<typeof NodeDeviceRunSession.fields> {}
241 +
242 +export const AppDeviceRunSessionEdge = Schema.Struct({
243 + node: NodeDeviceRunSession
244 +})
245 +export interface AppDeviceRunSessionEdge extends Schema.Struct.Type<typeof AppDeviceRunSessionEdge.fields> {}
246 +
247 +export const AppDeviceRunSessionsConnection = Schema.Struct({
248 + edges: Schema.Array(AppDeviceRunSessionEdge)
249 +})
250 +export interface AppDeviceRunSessionsConnection extends Schema.Struct.Type<typeof AppDeviceRunSessionsConnection.fields> {}
251 +
252 +/** Represents an Exponent App (or Experience in legacy terms) */
253 +export const T3ActiveEasSimulatorSessionsAppByIdApp = Schema.Struct({
254 + deviceRunSessionsPaginated: AppDeviceRunSessionsConnection
255 +})
256 +export interface T3ActiveEasSimulatorSessionsAppByIdApp extends Schema.Struct.Type<typeof T3ActiveEasSimulatorSessionsAppByIdApp.fields> {}
257 +
258 +export const T3ActiveEasSimulatorSessionsAppAppQuery = Schema.Struct({
259 + /** Look up app by app id */
260 + byId: T3ActiveEasSimulatorSessionsAppByIdApp
261 +})
262 +export interface T3ActiveEasSimulatorSessionsAppAppQuery extends Schema.Struct.Type<typeof T3ActiveEasSimulatorSessionsAppAppQuery.fields> {}
263 +
264 +/** `query T3ActiveEasSimulatorSessions` */
265 +export const T3ActiveEasSimulatorSessions = GraphQL.query("T3ActiveEasSimulatorSessions", {
266 + document: {
267 + variables: [
268 + { name: "appId", body: "String!" },
269 + { name: "filter", body: "DeviceRunSessionFilterInput" }
270 + ],
271 + selections: [
272 + { name: "app", body: ["{byId(appId:$", "appId", "){deviceRunSessionsPaginated(first:50 filter:$", "filter", "){edges{node{id status name}}}}}"] }
273 + ],
274 + fragments: []
275 + },
276 + variables: {
277 + appId: Schema.String,
278 + filter: Schema.optional(Schema.NullOr(Shared.DeviceRunSessionFilterInput))
279 + },
280 + result: Schema.Struct({
281 + app: T3ActiveEasSimulatorSessionsAppAppQuery
282 + })
283 +})
284 +export declare namespace T3ActiveEasSimulatorSessions {
285 + export type Variables = typeof T3ActiveEasSimulatorSessions.variables.Type
286 + export type Result = typeof T3ActiveEasSimulatorSessions.result.Type
287 +}
288 +
289 +export const EnsureDeviceRunSessionStoppedDeviceRunSession = Schema.Struct({
290 + id: Shared.ID,
291 + status: GraphQL.enumLiterals(Shared.DeviceRunSessionStatus.literals)
292 +})
293 +export interface EnsureDeviceRunSessionStoppedDeviceRunSession extends Schema.Struct.Type<typeof EnsureDeviceRunSessionStoppedDeviceRunSession.fields> {}
294 +
295 +export const T3StopEasSimulatorSessionDeviceRunSessionDeviceRunSessionMutation = Schema.Struct({
296 + /**
297 + * Ensure a device run session is stopped. Idempotent: if the session has already
298 + * finished, the existing session is returned unchanged (an ERRORED session stays
299 + * ERRORED).
300 + */
301 + ensureDeviceRunSessionStopped: EnsureDeviceRunSessionStoppedDeviceRunSession
302 +})
303 +export interface T3StopEasSimulatorSessionDeviceRunSessionDeviceRunSessionMutation extends Schema.Struct.Type<typeof T3StopEasSimulatorSessionDeviceRunSessionDeviceRunSessionMutation.fields> {}
304 +
305 +/** `mutation T3StopEasSimulatorSession` */
306 +export const T3StopEasSimulatorSession = GraphQL.mutation("T3StopEasSimulatorSession", {
307 + document: {
308 + variables: [
309 + { name: "id", body: "ID!" }
310 + ],
311 + selections: [
312 + { name: "deviceRunSession", body: ["{ensureDeviceRunSessionStopped(deviceRunSessionId:$", "id", "){id status}}"] }
313 + ],
314 + fragments: []
315 + },
316 + variables: {
317 + id: Shared.ID
318 + },
319 + result: Schema.Struct({
320 + /** Mutations that create, stop, update, and delete device run sessions */
321 + deviceRunSession: T3StopEasSimulatorSessionDeviceRunSessionDeviceRunSessionMutation
322 + })
323 +})
324 +export declare namespace T3StopEasSimulatorSession {
325 + export type Variables = typeof T3StopEasSimulatorSession.variables.Type
326 + export type Result = typeof T3StopEasSimulatorSession.result.Type
327 +}
328 +
329 +/** Every operation in ExpoApi.graphql. */
330 +export const ExpoApiGraphQLGroup = GraphQLGroup.make(T3ExpoViewer, T3EasSimulatorAvailability, T3CreateEasSimulatorSession, T3EasSimulatorSession, T3ActiveEasSimulatorSessions, T3StopEasSimulatorSession)
apps/server/src/device/ExpoApi.test.ts new
+292
@@ -0,0 +1,292 @@
1 +import { describe, expect, it } from "@effect/vitest";
2 +import * as NodeServices from "@effect/platform-node/NodeServices";
3 +import * as Effect from "effect/Effect";
4 +import * as Exit from "effect/Exit";
5 +import * as FileSystem from "effect/FileSystem";
6 +import * as Path from "effect/Path";
7 +import * as Redacted from "effect/Redacted";
8 +import { HttpClient, HttpClientError, HttpClientResponse } from "effect/http";
9 +import * as HostProcess from "@t3tools/shared/HostProcess";
10 +
11 +import { makeExpoApi, resolveExpoCredential, type ExpoCredential } from "./ExpoApi.ts";
12 +
13 +const header = (credential: ExpoCredential) => ({
14 + source: credential.source,
15 + name: credential.header.name,
16 + value: Redacted.value(credential.header.value),
17 +});
18 +
19 +describe("Expo credentials", () => {
20 + it.effect("prefer the saved token, then EXPO_TOKEN, then the eas login session", () =>
21 + Effect.gen(function* () {
22 + const fs = yield* FileSystem.FileSystem;
23 + const path = yield* Path.Path;
24 + const home = yield* fs.makeTempDirectoryScoped({ prefix: "t3-expo-home-" });
25 + yield* fs.makeDirectory(path.join(home, ".expo"));
26 + yield* fs.writeFileString(
27 + path.join(home, ".expo", "state.json"),
28 + JSON.stringify({ auth: { sessionSecret: "session-secret", username: "julius" } }),
29 + );
30 + const resolve = (saved: string, env: NodeJS.ProcessEnv) =>
31 + resolveExpoCredential(saved).pipe(
32 + Effect.provideService(HostProcess.HomeDirectory, home),
33 + Effect.provideService(HostProcess.Environment, env),
34 + Effect.map(header),
35 + );
36 + expect(yield* resolve(" saved ", { EXPO_TOKEN: "env-token" })).toEqual({
37 + source: "settings",
38 + name: "authorization",
39 + value: "Bearer saved",
40 + });
41 + expect(yield* resolve("", { EXPO_TOKEN: "env-token" })).toEqual({
42 + source: "env",
43 + name: "authorization",
44 + value: "Bearer env-token",
45 + });
46 + expect(yield* resolve("", {})).toEqual({
47 + source: "eas-login",
48 + name: "expo-session",
49 + value: "session-secret",
50 + });
51 + yield* fs.writeFileString(
52 + path.join(home, ".expo", "state.json"),
53 + JSON.stringify({ auth: null }),
54 + );
55 + const missing = yield* resolve("", {}).pipe(Effect.exit);
56 + expect(Exit.isFailure(missing) && missing.cause.toString()).toContain("eas login");
57 + }).pipe(Effect.scoped, Effect.provide(NodeServices.layer)),
58 + );
59 +
60 + it.effect.each([
61 + { case: "the redacted placeholder", saved: "\u2022\u2022\u2022\u2022\u2022\u2022", env: {} },
62 + { case: "a pasted newline", saved: "abc\ndef", env: {} },
63 + { case: "a malformed EXPO_TOKEN", saved: "", env: { EXPO_TOKEN: "abc def" } },
64 + ])("refuses $case without echoing it", ({ saved, env }) =>
65 + Effect.gen(function* () {
66 + const error = yield* resolveExpoCredential(saved).pipe(
67 + Effect.provideService(HostProcess.Environment, env),
68 + Effect.flip,
69 + );
70 + expect(error._tag).toBe("ExpoInvalidCredentialError");
71 + expect(error.message).not.toContain(saved || "abc def");
72 + }).pipe(Effect.provide(NodeServices.layer)),
73 + );
74 +});
75 +
76 +describe("Expo API", () => {
77 + const credential: ExpoCredential = {
78 + source: "eas-login",
79 + header: { name: "expo-session", value: Redacted.make("session-secret") },
80 + };
81 +
82 + it.effect("sends the credential and reads session endpoints once the simulator is ready", () =>
83 + Effect.gen(function* () {
84 + const requests: Array<{ headers: Record<string, string>; body: unknown }> = [];
85 + const http = HttpClient.make((request) =>
86 + Effect.sync(() => {
87 + const body =
88 + request.body._tag === "Uint8Array"
89 + ? (JSON.parse(new TextDecoder().decode(request.body.body)) as { variables: unknown })
90 + : null;
91 + requests.push({ headers: request.headers, body });
92 + return HttpClientResponse.fromWeb(
93 + request,
94 + Response.json({
95 + data: {
96 + deviceRunSessions: {
97 + byId: {
98 + id: "session-1",
99 + status: "IN_PROGRESS",
100 + remoteConfig: {
101 + __typename: "AgentDeviceRunSessionRemoteConfig",
102 + agentDeviceRemoteSessionUrl: "https://agent.test",
103 + agentDeviceRemoteSessionToken: "agent-token",
104 + webPreviewToken: "preview-token",
105 + previewApiUrl: "https://preview.test?token=preview-token",
106 + },
107 + },
108 + },
109 + },
110 + }),
111 + );
112 + }),
113 + );
114 + const session = yield* makeExpoApi(http, credential).session("session-1");
115 + expect(requests[0]?.headers["expo-session"]).toBe("session-secret");
116 + expect(requests[0]?.body).toMatchObject({ variables: { id: "session-1" } });
117 + expect(session.status).toBe("IN_PROGRESS");
118 + expect(session.endpoints?.agentDevice.url).toBe("https://agent.test");
119 + expect(Redacted.value(session.endpoints!.agentDevice.token)).toBe("agent-token");
120 + expect(session.endpoints?.preview?.url).toBe("https://preview.test?token=preview-token");
121 + expect(Redacted.value(session.endpoints!.preview!.token)).toBe("preview-token");
122 + }),
123 + );
124 +
125 + it.effect("keeps the credential out of errors when Expo is unreachable", () =>
126 + Effect.gen(function* () {
127 + const http = HttpClient.make((request) =>
128 + Effect.fail(
129 + new HttpClientError.HttpClientError({
130 + reason: new HttpClientError.TransportError({
131 + request,
132 + description: "connection reset",
133 + }),
134 + }),
135 + ),
136 + );
137 + const error = yield* makeExpoApi(http, credential).viewer.pipe(Effect.flip);
138 + expect(error.message).toContain("Expo's API is unreachable");
139 + expect(JSON.stringify(error)).not.toContain("session-secret");
140 + expect(error.cause).toBeUndefined();
141 + // No answer: a mutation may have run.
142 + expect(error.rejected).toBe(false);
143 + }),
144 + );
145 +
146 + it.effect("reports GraphQL errors and rejected credentials as Expo failures", () =>
147 + Effect.gen(function* () {
148 + const respond = (response: Response) =>
149 + HttpClient.make((request) => Effect.succeed(HttpClientResponse.fromWeb(request, response)));
150 + const graphQl = yield* makeExpoApi(
151 + respond(Response.json({ errors: [{ message: "Feature not enabled" }] })),
152 + credential,
153 + )
154 + .availability("app-1")
155 + .pipe(Effect.flip);
156 + expect(graphQl.message).toBe(
157 + "Expo could not check EAS Simulator access: Feature not enabled",
158 + );
159 + const rejected = yield* makeExpoApi(respond(new Response("no", { status: 401 })), credential)
160 + .stop("session-1")
161 + .pipe(Effect.flip);
162 + expect(rejected.message).toBe(
163 + "Expo could not stop a simulator session: the eas login session was rejected (HTTP 401)",
164 + );
165 + const serverError = yield* makeExpoApi(
166 + respond(Response.json({ errors: [{ message: "Internal server error" }] }, { status: 502 })),
167 + credential,
168 + )
169 + .stop("session-1")
170 + .pipe(Effect.flip);
171 + expect(serverError.message).toBe(
172 + "Expo could not stop a simulator session: Internal server error",
173 + );
174 + // What Expo answers a refused request with: Apollo's default code, the
175 + // user's fault, and null data.
176 + const expoRefusal = yield* makeExpoApi(
177 + respond(
178 + Response.json({
179 + errors: [
180 + {
181 + message: "Experience with id 0000 does not exist.",
182 + extensions: {
183 + code: "INTERNAL_SERVER_ERROR",
184 + errorCode: "EXPERIENCE_NOT_FOUND",
185 + errorType: "USER",
186 + isTransient: false,
187 + },
188 + },
189 + ],
190 + data: null,
191 + }),
192 + ),
193 + credential,
194 + )
195 + .stop("session-1")
196 + .pipe(Effect.flip);
197 + const internalError = yield* makeExpoApi(
198 + respond(
199 + Response.json({
200 + errors: [
201 + {
202 + message: "Something went wrong",
203 + extensions: { errorCode: "INTERNAL_SERVER_ERROR" },
204 + },
205 + ],
206 + }),
207 + ),
208 + credential,
209 + )
210 + .stop("session-1")
211 + .pipe(Effect.flip);
212 + const transient = yield* makeExpoApi(
213 + respond(
214 + Response.json({
215 + errors: [
216 + {
217 + message: "Something went wrong",
218 + extensions: { errorCode: "INTERNAL_SERVER_ERROR", isTransient: true },
219 + },
220 + ],
221 + }),
222 + ),
223 + credential,
224 + )
225 + .stop("session-1")
226 + .pipe(Effect.flip);
227 + const ran = yield* makeExpoApi(
228 + respond(
229 + Response.json({
230 + data: { deviceRunSession: { stopDeviceRunSession: null } },
231 + errors: [
232 + { message: "Session is already stopping", extensions: { errorCode: "CONFLICT" } },
233 + ],
234 + }),
235 + ),
236 + credential,
237 + )
238 + .stop("session-1")
239 + .pipe(Effect.flip);
240 + const fault = yield* makeExpoApi(
241 + respond(
242 + Response.json({
243 + errors: [{ message: "Something went wrong", extensions: { errorType: "INTERNAL" } }],
244 + }),
245 + ),
246 + credential,
247 + )
248 + .stop("session-1")
249 + .pipe(Effect.flip);
250 + const echoed = yield* makeExpoApi(
251 + respond(
252 + Response.json({
253 + errors: [{ message: `Session session-secret is not yours (${"x".repeat(400)})` }],
254 + }),
255 + ),
256 + credential,
257 + )
258 + .stop("session-1")
259 + .pipe(Effect.flip);
260 + // A message that echoes the credential loses it, and is bounded.
261 + expect(echoed.message).toContain("Session [redacted] is not yours");
262 + expect(echoed.message).not.toContain("session-secret");
263 + expect(echoed.message.length).toBeLessThan(400);
264 + const userError = yield* makeExpoApi(
265 + respond(
266 + Response.json({
267 + errors: [
268 + { message: "Not allowed", extensions: { errorType: "USER", errorCode: "FORBIDDEN" } },
269 + ],
270 + }),
271 + ),
272 + credential,
273 + )
274 + .stop("session-1")
275 + .pipe(Effect.flip);
276 + // Expo answered and refused the first three: nothing was done. GraphQL
277 + // errors at a server error, a transient, internal or other non-user
278 + // error, or errors beside data, may come from a request that ran.
279 + expect([
280 + graphQl.rejected,
281 + rejected.rejected,
282 + userError.rejected,
283 + expoRefusal.rejected,
284 + serverError.rejected,
285 + internalError.rejected,
286 + transient.rejected,
287 + fault.rejected,
288 + ran.rejected,
289 + ]).toEqual([true, true, true, true, false, false, false, false, false]);
290 + }),
291 + );
292 +});
apps/server/src/device/ExpoApi.ts new
+366
@@ -0,0 +1,366 @@
1 +/**
2 + * Expo's GraphQL API for EAS Simulator sessions. The operations in
3 + * `ExpoApi.graphql` are the ones eas-cli's `simulator:*` commands send; their
4 + * client is generated from `schema/expo.graphql` (`vp run generate`).
5 + */
6 +import * as Effect from "effect/Effect";
7 +import * as FileSystem from "effect/FileSystem";
8 +import * as Layer from "effect/Layer";
9 +import * as Option from "effect/Option";
10 +import * as Path from "effect/Path";
11 +import * as Redacted from "effect/Redacted";
12 +import * as Schema from "effect/Schema";
13 +import {
14 + GraphQLClient,
15 + GraphQLClientError,
16 + GraphQLMiddleware,
17 + GraphQLProtocol,
18 +} from "effect/graphql";
19 +import { HttpClient } from "effect/http";
20 +import * as Headers from "effect/http/Headers";
21 +import * as HostProcess from "@t3tools/shared/HostProcess";
22 +
23 +import { ExpoApiGraphQLGroup, type T3EasSimulatorSession } from "./ExpoApi.graphql.ts";
24 +import type { DeviceRunSessionStatus } from "../../schema/expo.graphql.ts";
25 +
26 +const EXPO_GRAPHQL_URL = "https://api.expo.dev/graphql";
27 +const REQUEST_TIMEOUT = "30 seconds";
28 +
29 +export type ExpoCredentialSource = "settings" | "env" | "eas-login";
30 +
31 +export interface ExpoCredential {
32 + readonly source: ExpoCredentialSource;
33 + readonly header: {
34 + readonly name: "authorization" | "expo-session";
35 + readonly value: Redacted.Redacted<string>;
36 + };
37 +}
38 +
39 +export class ExpoNotSignedInError extends Schema.TaggedError<ExpoNotSignedInError>()(
40 + "ExpoNotSignedInError",
41 + {},
42 +) {
43 + override get message(): string {
44 + return "No Expo credential on the server: save an access token for this host, set EXPO_TOKEN, or run `eas login`.";
45 + }
46 +}
47 +
48 +const CREDENTIAL_SOURCE_NAMES: Record<ExpoCredentialSource, string> = {
49 + settings: "The access token saved for this host",
50 + env: "EXPO_TOKEN",
51 + "eas-login": "The eas login session",
52 +};
53 +
54 +export class ExpoInvalidCredentialError extends Schema.TaggedError<ExpoInvalidCredentialError>()(
55 + "ExpoInvalidCredentialError",
56 + { source: Schema.Literals(["settings", "env", "eas-login"]) },
57 +) {
58 + override get message(): string {
59 + return `${CREDENTIAL_SOURCE_NAMES[this.source]} is not a usable Expo credential. Replace it.`;
60 + }
61 +}
62 +
63 +/**
64 + * Expo credentials are printable ASCII. Anything else (the redacted
65 + * placeholder, a pasted newline) would fail inside fetch with the header
66 + * value in its message, so it is refused here.
67 + */
68 +const credential = (
69 + source: ExpoCredentialSource,
70 + header: ExpoCredential["header"]["name"],
71 + value: string,
72 +) =>
73 + /^[\x21-\x7e]+$/.test(value)
74 + ? Effect.succeed({
75 + source,
76 + header: {
77 + name: header,
78 + value: Redacted.make(header === "authorization" ? `Bearer ${value}` : value),
79 + },
80 + } satisfies ExpoCredential)
81 + : Effect.fail(new ExpoInvalidCredentialError({ source }));
82 +
83 +export class ExpoApiError extends Schema.TaggedError<ExpoApiError>()("ExpoApiError", {
84 + operation: Schema.String,
85 + detail: Schema.optional(Schema.String),
86 + /**
87 + * Expo answered and refused, so a mutation did nothing. Otherwise (no
88 + * answer, a server error, an answer that did not decode) it may have run.
89 + */
90 + rejected: Schema.optional(Schema.Boolean),
91 + /** The HTTP status Expo answered with, when it answered. */
92 + status: Schema.optional(Schema.Int),
93 +}) {
94 + override get message(): string {
95 + return `Expo could not ${this.operation}${this.detail ? `: ${this.detail}` : "."}`;
96 + }
97 +}
98 +
99 +/** `eas login` and `expo login` keep the session secret here. */
100 +const ExpoState = Schema.fromJsonString(
101 + Schema.Struct({
102 + auth: Schema.optional(
103 + Schema.NullOr(
104 + Schema.Struct({ sessionSecret: Schema.optional(Schema.NullOr(Schema.String)) }),
105 + ),
106 + ),
107 + }),
108 +);
109 +const decodeExpoState = Schema.decodeUnknownOption(ExpoState);
110 +
111 +/** A token saved for the host, then EXPO_TOKEN, then the `eas login` session. */
112 +export const resolveExpoCredential = Effect.fn("ExpoApi.resolveExpoCredential")(function* (
113 + savedToken: string,
114 +) {
115 + const saved = savedToken.trim();
116 + if (saved !== "") return yield* credential("settings", "authorization", saved);
117 + const fromEnv = (yield* HostProcess.Environment).EXPO_TOKEN?.trim();
118 + if (fromEnv) return yield* credential("env", "authorization", fromEnv);
119 + const fs = yield* FileSystem.FileSystem;
120 + const path = yield* Path.Path;
121 + const statePath = path.join(yield* HostProcess.HomeDirectory, ".expo", "state.json");
122 + const state = yield* fs.readFileString(statePath).pipe(Effect.option);
123 + const secret = Option.flatMap(state, decodeExpoState).pipe(
124 + Option.flatMap((value) => Option.fromNullishOr(value.auth?.sessionSecret?.trim() || null)),
125 + );
126 + if (Option.isNone(secret)) return yield* new ExpoNotSignedInError();
127 + return yield* credential("eas-login", "expo-session", secret.value);
128 +});
129 +
130 +export type EasSessionStatus = DeviceRunSessionStatus;
131 +
132 +export interface EasSession {
133 + readonly id: string;
134 + readonly status: EasSessionStatus;
135 + /** Present once the simulator is ready; tokens grant full device control. */
136 + readonly endpoints: {
137 + readonly agentDevice: { readonly url: string; readonly token: Redacted.Redacted<string> };
138 + readonly preview: { readonly url: string; readonly token: Redacted.Redacted<string> } | null;
139 + } | null;
140 +}
141 +
142 +export interface EasApp {
143 + readonly id: string;
144 + readonly fullName: string;
145 +}
146 +
147 +export interface CreateEasSessionInput {
148 + readonly appId: string;
149 + readonly platform: "ios" | "android";
150 + readonly name: string;
151 + readonly maxRunTimeMinutes: number;
152 + readonly maxIdleTimeMinutes: number;
153 +}
154 +
155 +const DEVICE_RUN_SESSIONS_GATE = "device-run-sessions";
156 +const isFeatureGates = Schema.is(Schema.Record(Schema.String, Schema.Unknown));
157 +
158 +/** Sends every operation with the resolved credential. */
159 +class ExpoAuth extends GraphQLMiddleware.Service<ExpoAuth>()("t3/server/device/ExpoApi/ExpoAuth") {}
160 +
161 +const ExpoGroup = ExpoApiGraphQLGroup.middleware(ExpoAuth);
162 +
163 +/**
164 + * Expo's answer as an `ExpoApiError`, which has no cause: a transport error's
165 + * holds the request with its credential header, and a decode error's can
166 + * quote session tokens. These errors also travel to clients as RPC defects.
167 + */
168 +const toExpoApiError = (
169 + operation: string,
170 + credential: ExpoCredential,
171 + error: GraphQLClientError.GraphQLClientError,
172 +): ExpoApiError => {
173 + const reason = error.reason;
174 + const status =
175 + reason._tag === "TransportError" || reason._tag === "ResponseError" ? reason.status : undefined;
176 + // Expo refused: a request it never got, a 4xx, or GraphQL errors at a 2xx
177 + // or 4xx that are the user's fault. Expo marks those `errorType: "USER"`
178 + // and not `isTransient` (eas-cli's rule; Apollo's `code` says nothing, as
179 + // Expo puts INTERNAL_SERVER_ERROR on user errors too) and answers them with
180 + // `data: null`, since its mutations are non-null. GraphQL errors at a 5xx,
181 + // beside data (the request ran), or that are Expo's own fault came from a
182 + // request that may have run.
183 + const errors = reason._tag === "ResponseError" ? reason.errors : [];
184 + const fault = errors.some(
185 + ({ extensions }) =>
186 + extensions?.isTransient === true ||
187 + (extensions?.errorType !== undefined && extensions.errorType !== "USER") ||
188 + extensions?.errorCode === "INTERNAL_SERVER_ERROR",
189 + );
190 + const usersFault =
191 + errors.length > 0 && errors.every(({ extensions }) => extensions?.errorType === "USER");
192 + const uncertain =
193 + reason._tag === "ResponseError" &&
194 + (fault || (reason.data !== undefined && !(reason.data === null && usersFault)));
195 + const rejected =
196 + reason._tag === "EncodeError" ||
197 + (status !== undefined &&
198 + status < 500 &&
199 + !uncertain &&
200 + (status >= 400 || reason._tag === "ResponseError"));
201 + // Expo's own messages are the reason the user acts on, but nothing promises
202 + // they never echo a request: the credential is cut out, and they are bounded.
203 + const secret = Redacted.value(credential.header.value);
204 + const token = secret.replace(/^Bearer /, "");
205 + const scrub = (text: string) =>
206 + text.replaceAll(secret, "[redacted]").replaceAll(token, "[redacted]").slice(0, 300);
207 + const failure = (detail: string) =>
208 + new ExpoApiError({
209 + operation,
210 + detail: scrub(detail),
211 + rejected,
212 + ...(status !== undefined ? { status } : {}),
213 + });
214 + if (status === 401 || status === 403) {
215 + const what = credential.source === "eas-login" ? "eas login session" : "access token";
216 + return failure(`the ${what} was rejected (HTTP ${status})`);
217 + }
218 + switch (reason._tag) {
219 + case "ResponseError":
220 + return failure(reason.errors.map((graphQlError) => graphQlError.message).join("; "));
221 + case "TransportError":
222 + return failure(
223 + status === undefined ? "Expo's API is unreachable" : `unexpected response (HTTP ${status})`,
224 + );
225 + case "EncodeError":
226 + return failure("the request could not be encoded");
227 + default:
228 + return failure("unexpected response");
229 + }
230 +};
231 +
232 +const toSession = (
233 + session: T3EasSimulatorSession.Result["deviceRunSessions"]["byId"],
234 +): EasSession => {
235 + const remote = session.remoteConfig;
236 + return {
237 + id: session.id,
238 + status: session.status,
239 + endpoints:
240 + remote?.__typename === "AgentDeviceRunSessionRemoteConfig"
241 + ? {
242 + agentDevice: {
243 + url: remote.agentDeviceRemoteSessionUrl,
244 + token: Redacted.make(remote.agentDeviceRemoteSessionToken),
245 + },
246 + preview:
247 + remote.previewApiUrl && remote.webPreviewToken
248 + ? { url: remote.previewApiUrl, token: Redacted.make(remote.webPreviewToken) }
249 + : null,
250 + }
251 + : null,
252 + };
253 +};
254 +
255 +/** Typed calls against Expo's API with one resolved credential. */
256 +export const makeExpoApi = (http: HttpClient.HttpClient, credential: ExpoCredential) => {
257 + const client = GraphQLClient.make(ExpoGroup).pipe(
258 + Effect.provide(
259 + Layer.mergeAll(
260 + Layer.succeed(
261 + ExpoAuth,
262 + GraphQLMiddleware.mapRequest((request) =>
263 + Effect.succeed({
264 + ...request,
265 + headers: Headers.set(
266 + request.headers,
267 + credential.header.name,
268 + Redacted.value(credential.header.value),
269 + ),
270 + }),
271 + ),
272 + ),
273 + GraphQLProtocol.layerHttp({ url: EXPO_GRAPHQL_URL }).pipe(
274 + Layer.provide(Layer.succeed(HttpClient.HttpClient, http)),
275 + ),
276 + ),
277 + ),
278 + );
279 + const call = <A>(
280 + operation: string,
281 + run: (
282 + client: GraphQLClient.FromGroup<typeof ExpoGroup>,
283 + ) => Effect.Effect<A, GraphQLClientError.GraphQLClientError>,
284 + ) =>
285 + Effect.flatMap(client, run).pipe(
286 + Effect.mapError((error) => toExpoApiError(operation, credential, error)),
287 + Effect.timeoutOrElse({
288 + duration: REQUEST_TIMEOUT,
289 + orElse: () =>
290 + Effect.fail(new ExpoApiError({ operation, detail: "Expo's API did not answer in time" })),
291 + }),
292 + Effect.withSpan(`ExpoApi.${operation}`),
293 + );
294 +
295 + return {
296 + credential,
297 + viewer: call("read the signed-in account", (expo) => expo.T3ExpoViewer()).pipe(
298 + Effect.flatMap(({ meActor }) =>
299 + meActor === null
300 + ? Effect.fail(
301 + new ExpoApiError({
302 + operation: "read the signed-in account",
303 + detail: "no account is signed in",
304 + }),
305 + )
306 + : Effect.succeed({
307 + name:
308 + "username" in meActor
309 + ? meActor.username
310 + : "firstName" in meActor
311 + ? (meActor.firstName ?? meActor.__typename)
312 + : meActor.__typename,
313 + apps: meActor.accounts.flatMap((account) =>
314 + account.appsPaginated.edges.map(({ node }): EasApp => node),
315 + ),
316 + }),
317 + ),
318 + ),
319 + availability: (appId: string) =>
320 + call("check EAS Simulator access", (expo) =>
321 + expo.T3EasSimulatorAvailability({ appId, filter: [DEVICE_RUN_SESSIONS_GATE] }),
322 + ).pipe(
323 + Effect.map(({ app }) => {
324 + const gates = app.byId.ownerAccount.accountFeatureGates;
325 + return {
326 + account: app.byId.ownerAccount.name,
327 + available: isFeatureGates(gates) && gates[DEVICE_RUN_SESSIONS_GATE] === true,
328 + };
329 + }),
330 + ),
331 + create: (input: CreateEasSessionInput) =>
332 + call("start a simulator session", (expo) =>
333 + expo.T3CreateEasSimulatorSession({
334 + input: {
335 + appId: input.appId,
336 + platform: input.platform === "ios" ? "IOS" : "ANDROID",
337 + type: "AGENT_DEVICE",
338 + name: input.name,
339 + maxRunTimeMinutes: input.maxRunTimeMinutes,
340 + maxIdleTimeMinutes: input.maxIdleTimeMinutes,
341 + // Expo only issues the preview host's API URL when preview access is configured.
342 + corsOrigins: ["http://localhost"],
343 + },
344 + }),
345 + ).pipe(Effect.map(({ deviceRunSession }) => deviceRunSession.createDeviceRunSession.id)),
346 + session: (id: string) =>
347 + call("read a simulator session", (expo) => expo.T3EasSimulatorSession({ id })).pipe(
348 + Effect.map(({ deviceRunSessions }) => toSession(deviceRunSessions.byId)),
349 + ),
350 + activeSessions: (appId: string) =>
351 + call("list simulator sessions", (expo) =>
352 + expo.T3ActiveEasSimulatorSessions({
353 + appId,
354 + filter: { statuses: ["NEW", "QUEUED", "STARTING", "IN_PROGRESS"] },
355 + }),
356 + ).pipe(
357 + Effect.map(({ app }) => app.byId.deviceRunSessionsPaginated.edges.map(({ node }) => node)),
358 + ),
359 + stop: (id: string) =>
360 + call("stop a simulator session", (expo) => expo.T3StopEasSimulatorSession({ id })).pipe(
361 + Effect.map(({ deviceRunSession }) => deviceRunSession.ensureDeviceRunSessionStopped.status),
362 + ),
363 + };
364 +};
365 +
366 +export type ExpoApi = ReturnType<typeof makeExpoApi>;
apps/server/src/device/easProjectId.test.ts new
+706
@@ -0,0 +1,706 @@
1 +import { expect, it } from "@effect/vitest";
2 +import * as NodeServices from "@effect/platform-node/NodeServices";
3 +import * as Effect from "effect/Effect";
4 +import * as FileSystem from "effect/FileSystem";
5 +import * as Option from "effect/Option";
6 +import * as Path from "effect/Path";
7 +
8 +import { findEasProjectId } from "./easProjectId.ts";
9 +
10 +const ID_A = "d763fcb8-d37c-41ea-a773-b54a0ab4a454";
11 +const ID_B = "54d70eaf-b0a3-477a-a9cd-2cf81a5c84c9";
12 +
13 +const workspace = (files: Record<string, string>) =>
14 + Effect.gen(function* () {
15 + const fs = yield* FileSystem.FileSystem;
16 + const path = yield* Path.Path;
17 + const root = yield* fs.makeTempDirectoryScoped({ prefix: "t3-eas-project-" });
18 + for (const [file, content] of Object.entries(files)) {
19 + yield* fs.makeDirectory(path.dirname(path.join(root, file)), { recursive: true });
20 + yield* fs.writeFileString(path.join(root, file), content);
21 + }
22 + return root;
23 + });
24 +
25 +const layer = NodeServices.layer;
26 +
27 +it.effect("reads a literal project id from an app config without running it", () =>
28 + Effect.gen(function* () {
29 + const fs = yield* FileSystem.FileSystem;
30 + const path = yield* Path.Path;
31 + const root = yield* workspace({});
32 + const marker = path.join(root, "config-ran");
33 + yield* fs.makeDirectory(path.join(root, "apps/mobile"), { recursive: true });
34 + yield* fs.writeFileString(
35 + path.join(root, "apps/mobile/app.config.ts"),
36 + `import { writeFileSync } from "node:fs";
37 + writeFileSync(${JSON.stringify(marker)}, "");
38 + export default { extra: { eas: { projectId: "${ID_A}" } } };`,
39 + );
40 + expect(yield* findEasProjectId(root)).toEqual(Option.some(ID_A));
41 + expect(yield* fs.exists(marker)).toBe(false);
42 + }).pipe(Effect.scoped, Effect.provide(layer)),
43 +);
44 +
45 +it.effect("falls back to app.json, and does not compute a project id a config builds", () =>
46 + Effect.gen(function* () {
47 + const staticOnly = yield* workspace({
48 + "app.json": JSON.stringify({ expo: { extra: { eas: { projectId: ID_B } } } }),
49 + });
50 + expect(yield* findEasProjectId(staticOnly)).toEqual(Option.some(ID_B));
51 + const computed = yield* workspace({
52 + "app.config.ts": `const parts = ${JSON.stringify(ID_A.split("-"))};
53 + export default { extra: { eas: { projectId: parts.join("-") } } };`,
54 + });
55 + expect(yield* findEasProjectId(computed)).toEqual(Option.none());
56 + }).pipe(Effect.scoped, Effect.provide(layer)),
57 +);
58 +
59 +it.effect.each([
60 + {
61 + case: "reads the one project id a config names, whatever else it holds",
62 + files: {
63 + "app.config.js": `export default {
64 + assetBundlePatterns: ["**/*"],
65 + extra: { eas: { projectId: "${ID_A}" }, firebase: { projectId: "my-app-12345" } },
66 + };
67 + /** docs */`,
68 + "app.json": JSON.stringify({ expo: { extra: { eas: { projectId: ID_A } } } }),
69 + },
70 + expected: Option.some(ID_A),
71 + },
72 + {
73 + case: "gives no answer when a config names a project only some builds use",
74 + files: {
75 + "app.config.ts": `export default ({ config }) =>
76 + process.env.APP_VARIANT === "preview"
77 + ? { ...config, extra: { ...config.extra, eas: { projectId: "${ID_B}" } } }
78 + : config;`,
79 + "app.json": JSON.stringify({ expo: { extra: { eas: { projectId: ID_A } } } }),
80 + },
81 + expected: Option.none(),
82 + },
83 + {
84 + case: "gives no answer when a comment keeps an old project id",
85 + files: {
86 + "app.config.js": `// projectId: "${ID_B}" (the old production project)
87 + export default { extra: { eas: { projectId: "${ID_A}" } } };`,
88 + },
89 + expected: Option.none(),
90 + },
91 + {
92 + case: "gives no answer for a config naming two projects, even with app.json",
93 + files: {
94 + "app.config.js": `export default () => ({
95 + extra: { eas: { projectId: process.env.PROD ? "${ID_A}" : "${ID_B}" } },
96 + });`,
97 + "app.json": JSON.stringify({ expo: { extra: { eas: { projectId: ID_A } } } }),
98 + },
99 + expected: Option.none(),
100 + },
101 + {
102 + case: "gives no answer when one app sets its project from a variable",
103 + files: {
104 + "apps/mobile/app.config.ts": `export default {
105 + extra: { eas: { projectId: process.env.EAS_PROJECT_ID } },
106 + };`,
107 + "apps/kiosk/app.json": JSON.stringify({ expo: { extra: { eas: { projectId: ID_B } } } }),
108 + },
109 + expected: Option.none(),
110 + },
111 + {
112 + case: "gives no answer when a comment's id sits beside a computed one",
113 + files: {
114 + "app.config.ts": `// projectId: "${ID_A}"
115 + export default { extra: { eas: { projectId: process.env.EAS_PROJECT_ID } } };`,
116 + },
117 + expected: Option.none(),
118 + },
119 + {
120 + case: "gives no answer when a config changes the project id after naming it",
121 + files: {
122 + "app.config.js": `export default ({ config }) => {
123 + config.extra = { eas: { projectId: "${ID_A}" } };
124 + if (process.env.APP_ENV === "development") {
125 + config.extra.eas.projectId = process.env.DEV_PROJECT_ID;
126 + }
127 + return config;
128 + };`,
129 + },
130 + expected: Option.none(),
131 + },
132 + {
133 + case: "uses app.json when the config only mentions a longer identifier",
134 + files: {
135 + "app.config.js": `const easProjectIds = {};
136 + export default ({ config }) => ({ ...config, name: "Mobile", easProjectIds });`,
137 + "app.json": JSON.stringify({ expo: { extra: { eas: { projectId: ID_B } } } }),
138 + },
139 + expected: Option.some(ID_B),
140 + },
141 + {
142 + case: "gives no answer when a longer quoted key sits beside a computed project id",
143 + files: {
144 + "app.config.js": `const defaults = { easProjectId: "${ID_B}" };
145 + export default { extra: { eas: { projectId: process.env.EAS_PROJECT_ID ?? defaults.easProjectId } } };`,
146 + },
147 + expected: Option.none(),
148 + },
149 + {
150 + case: "gives no answer when a config joins the project id from pieces",
151 + files: {
152 + "apps/mobile/app.config.ts": `export default {
153 + extra: { eas: { projectId: "${ID_A.slice(0, 9)}" + "${ID_A.slice(9)}" } },
154 + };`,
155 + "apps/kiosk/app.json": JSON.stringify({ expo: { extra: { eas: { projectId: ID_B } } } }),
156 + },
157 + expected: Option.none(),
158 + },
159 + {
160 + case: "gives no answer when a config joins the project id around a comment",
161 + files: {
162 + "apps/mobile/app.config.ts": `export default {
163 + extra: { eas: { projectId: "${ID_A.slice(0, 9)}" /* prefix */ + "${ID_A.slice(9)}" } },
164 + };`,
165 + "apps/kiosk/app.json": JSON.stringify({ expo: { extra: { eas: { projectId: ID_B } } } }),
166 + },
167 + expected: Option.none(),
168 + },
169 + {
170 + case: "reads a project id a comment follows",
171 + files: {
172 + "app.config.ts": `export default {
173 + extra: { eas: { projectId: "${ID_A}" /* production */ // the only one
174 + } },
175 + };`,
176 + },
177 + expected: Option.some(ID_A),
178 + },
179 + {
180 + case: "gives no answer when a separator inside a comment precedes the rest of the id",
181 + files: {
182 + "apps/mobile/app.config.ts": `export default {
183 + extra: { eas: { projectId: "${ID_A.slice(0, 9)}" // prefix, continued (below)
184 + + "${ID_A.slice(9)}" } },
185 + };`,
186 + "apps/kiosk/app.json": JSON.stringify({ expo: { extra: { eas: { projectId: ID_B } } } }),
187 + },
188 + expected: Option.none(),
189 + },
190 + {
191 + case: "gives no answer when a block comment with a separator precedes the rest of the id",
192 + files: {
193 + "apps/mobile/app.config.ts": `export default {
194 + extra: { eas: { projectId: "${ID_A.slice(0, 9)}" /* prefix, (see) */ + "${ID_A.slice(9)}" } },
195 + };`,
196 + "apps/kiosk/app.json": JSON.stringify({ expo: { extra: { eas: { projectId: ID_B } } } }),
197 + },
198 + expected: Option.none(),
199 + },
200 + {
201 + case: "gives no answer when a spread after the project id may replace it",
202 + files: {
203 + "apps/mobile/app.config.js": `import { eas } from "./app.shared.js";
204 + export default { extra: { eas: { projectId: "${ID_A}", ...eas } } };`,
205 + },
206 + expected: Option.none(),
207 + },
208 + {
209 + case: "gives no answer when a spread after the project id hides behind a comment",
210 + files: {
211 + "apps/mobile/app.config.js": `import { easOverrides } from "./app.shared.js";
212 + export default { extra: { eas: { projectId: "${ID_A}" /* } */, ...easOverrides } } };`,
213 + },
214 + expected: Option.none(),
215 + },
216 + {
217 + case: "gives no answer when a spread at the top of the config may replace the project id",
218 + files: {
219 + "apps/mobile/app.config.js": `import { brand } from "./app.shared.js";
220 + export default { extra: { eas: { projectId: "${ID_A}" } }, ...brand };`,
221 + },
222 + expected: Option.none(),
223 + },
224 + {
225 + case: "gives no answer when a spread in an enclosing object may replace the project id",
226 + files: {
227 + "apps/mobile/app.config.js": `import { extraOverrides } from "./app.shared.js";
228 + export default { extra: { eas: { projectId: "${ID_A}" }, ...extraOverrides } };`,
229 + },
230 + expected: Option.none(),
231 + },
232 + {
233 + case: "gives no answer when the config is assigned over after naming the project id",
234 + files: {
235 + "app.config.js": `export default ({ config }) => {
236 + config.extra = { eas: { projectId: "${ID_A}" } };
237 + Object.assign(config.extra.eas, JSON.parse(process.env.EAS_OVERRIDES ?? "{}"));
238 + return config;
239 + };`,
240 + },
241 + expected: Option.none(),
242 + },
243 + {
244 + case: "gives no answer when the config is assigned over across lines after naming the project id",
245 + files: {
246 + "app.config.js": `import { assign } from "lodash";
247 + export default ({ config }) => {
248 + config.extra = { eas: { projectId: "${ID_A}" } };
249 + Object
250 + .assign(config.extra.eas, JSON.parse(process.env.EAS_OVERRIDES ?? "{}"));
251 + return config;
252 + };`,
253 + },
254 + expected: Option.none(),
255 + },
256 + {
257 + case: "gives no answer when a helper assigns over the config after naming the project id",
258 + files: {
259 + "app.config.js": `import { assign } from "lodash";
260 + export default ({ config }) => {
261 + config.extra = { eas: { projectId: "${ID_A}" } };
262 + assign (config.extra.eas, JSON.parse(process.env.EAS_OVERRIDES ?? "{}"));
263 + return config;
264 + };`,
265 + },
266 + expected: Option.none(),
267 + },
268 + {
269 + case: "gives no answer when the config is assigned over from defaults that name the project id",
270 + files: {
271 + "app.config.js": `module.exports = Object.assign(
272 + { name: "Mobile", extra: { eas: { projectId: "${ID_A}" } } },
273 + require("./app.config.local.js"),
274 + );`,
275 + },
276 + expected: Option.none(),
277 + },
278 + {
279 + case: "gives no answer when a config spreads another file over app.json's project id",
280 + files: {
281 + "app.config.js": `module.exports = ({ config }) => ({ ...config, ...require("./app.local.js") });`,
282 + "app.json": JSON.stringify({ expo: { extra: { eas: { projectId: ID_A } } } }),
283 + },
284 + expected: Option.none(),
285 + },
286 + {
287 + case: "gives no answer when a comment or parentheses sit between a spread and another file",
288 + files: {
289 + "app.config.js": `module.exports = ({ config }) => ({
290 + ...config,
291 + .../* environment overrides */ require("./app.local.js"),
292 + });`,
293 + "app.json": JSON.stringify({ expo: { extra: { eas: { projectId: ID_A } } } }),
294 + },
295 + expected: Option.none(),
296 + },
297 + {
298 + case: "gives no answer when nested parentheses sit between a spread and another file",
299 + files: {
300 + "app.config.js": `module.exports = ({ config }) => ({ ...config, ...((require("./app.local.js"))) });`,
301 + "app.json": JSON.stringify({ expo: { extra: { eas: { projectId: ID_A } } } }),
302 + },
303 + expected: Option.none(),
304 + },
305 + {
306 + case: "gives no answer when another service's project id sits beside a spread over app.json's",
307 + files: {
308 + "app.config.js": `module.exports = ({ config }) => ({
309 + ...config,
310 + ...require("./app.local.js"),
311 + web: { config: { firebase: { projectId: "my-firebase-app" } } },
312 + });`,
313 + "app.json": JSON.stringify({ expo: { extra: { eas: { projectId: ID_A } } } }),
314 + },
315 + expected: Option.none(),
316 + },
317 + {
318 + case: "gives no answer when a dynamic config spreads nothing, which may or may not use app.json",
319 + files: {
320 + "app.config.js": `export default { name: "Mobile", slug: "mobile" };`,
321 + "app.json": JSON.stringify({ expo: { extra: { eas: { projectId: ID_A } } } }),
322 + },
323 + expected: Option.none(),
324 + },
325 + {
326 + case: "does not let a sibling win over an app whose config returns app.json's config changed",
327 + files: {
328 + "apps/mobile/app.config.js": `module.exports = ({ config }) => {
329 + config.name = "Mobile";
330 + return config;
331 + };`,
332 + "apps/mobile/app.json": JSON.stringify({ expo: { extra: { eas: { projectId: ID_A } } } }),
333 + "apps/kiosk/app.json": JSON.stringify({ expo: { extra: { eas: { projectId: ID_B } } } }),
334 + },
335 + expected: Option.none(),
336 + },
337 + {
338 + case: "gives no answer when a spread of an identifier starting with config may replace app.json's id",
339 + files: {
340 + "app.config.js": `const config$ = require("./app.local.js");
341 + module.exports = ({ config }) => ({ ...config, ...config$ });`,
342 + "app.json": JSON.stringify({ expo: { extra: { eas: { projectId: ID_A } } } }),
343 + },
344 + expected: Option.none(),
345 + },
346 + {
347 + case: "gives no answer when that identifier is spelled with a Unicode escape",
348 + files: {
349 + "app.config.js": `const config$ = require("./app.local.js");
350 + module.exports = ({ config }) => ({ ...config, ...config\\u0024 });`,
351 + "app.json": JSON.stringify({ expo: { extra: { eas: { projectId: ID_A } } } }),
352 + },
353 + expected: Option.none(),
354 + },
355 + {
356 + case: "gives no answer when a config spreads the config but replaces extra",
357 + files: {
358 + "app.config.js": `module.exports = ({ config }) => ({ ...config, extra: {} });`,
359 + "app.json": JSON.stringify({ expo: { extra: { eas: { projectId: ID_A } } } }),
360 + },
361 + expected: Option.none(),
362 + },
363 + {
364 + case: "gives no answer when a config spreads the config but replaces a quoted extra",
365 + files: {
366 + "app.config.js": `module.exports = ({ config }) => ({ ...config, "extra": {} });`,
367 + "app.json": JSON.stringify({ expo: { extra: { eas: { projectId: ID_A } } } }),
368 + },
369 + expected: Option.none(),
370 + },
371 + {
372 + case: "gives no answer when a config spreads the config but replaces a computed extra",
373 + files: {
374 + "app.config.js": `module.exports = ({ config }) => ({ ...config, ["extra"]: {} });`,
375 + "app.json": JSON.stringify({ expo: { extra: { eas: { projectId: ID_A } } } }),
376 + },
377 + expected: Option.none(),
378 + },
379 + {
380 + case: "gives no answer when a config spreads the config but replaces extra by shorthand",
381 + files: {
382 + "app.config.js": `const extra = {};\nmodule.exports = ({ config }) => ({ ...config, extra });`,
383 + "app.json": JSON.stringify({ expo: { extra: { eas: { projectId: ID_A } } } }),
384 + },
385 + expected: Option.none(),
386 + },
387 + {
388 + case: "gives no answer when a config has more extra entries than are read",
389 + files: {
390 + "app.config.js": `module.exports = ({ config }) => ({ ...config, extra: { ...config.extra, ${"extra: { ...config.extra, ".repeat(40)}${"}".repeat(40)} } });`,
391 + "app.json": JSON.stringify({ expo: { extra: { eas: { projectId: ID_A } } } }),
392 + },
393 + expected: Option.none(),
394 + },
395 + {
396 + case: "gives no answer when a config assigns extra in brackets after a literal id",
397 + files: {
398 + "app.config.js": `module.exports = ({ config }) => {
399 + const c = { ...config, extra: { eas: { projectId: "${ID_A}" } } };
400 + c["extra"] = other();
401 + return c;
402 + };`,
403 + },
404 + expected: Option.none(),
405 + },
406 + {
407 + case: "gives no answer when a config deletes from the config it spreads",
408 + files: {
409 + "app.config.js": `module.exports = ({ config }) => {
410 + delete config.extra;
411 + return { ...config };
412 + };`,
413 + "app.json": JSON.stringify({ expo: { extra: { eas: { projectId: ID_A } } } }),
414 + },
415 + expected: Option.none(),
416 + },
417 + {
418 + case: "gives no answer when a config spreads part of the config over it",
419 + files: {
420 + "app.config.js": `module.exports = ({ config }) => ({ ...config, ...config.extra.preview });`,
421 + "app.json": JSON.stringify({ expo: { extra: { eas: { projectId: ID_A } } } }),
422 + },
423 + expected: Option.none(),
424 + },
425 + {
426 + case: "gives no answer when a config spreads a property of the config instead of it",
427 + files: {
428 + "app.config.js": `module.exports = ({ config }) => ({ ...config.preview });`,
429 + "app.json": JSON.stringify({ expo: { extra: { eas: { projectId: ID_A } } } }),
430 + },
431 + expected: Option.none(),
432 + },
433 + {
434 + case: "gives no answer when an extra entry spreads the whole config, not its extra",
435 + files: {
436 + "app.config.js": `module.exports = ({ config }) => ({ ...config, extra: { ...config } });`,
437 + "app.json": JSON.stringify({ expo: { extra: { eas: { projectId: ID_A } } } }),
438 + },
439 + expected: Option.none(),
440 + },
441 + {
442 + case: "gives no answer when an eas entry spreads the config's extra, not its eas",
443 + files: {
444 + "app.config.js": `module.exports = ({ config }) => ({ ...config, extra: { ...config.extra, eas: { ...config.extra } } });`,
445 + "app.json": JSON.stringify({ expo: { extra: { eas: { projectId: ID_A } } } }),
446 + },
447 + expected: Option.none(),
448 + },
449 + {
450 + case: "reads app.json's id through extra and eas entries that spread their own",
451 + files: {
452 + "app.config.js": `module.exports = ({ config }) => ({
453 + ...config,
454 + extra: { ...config?.["extra"], eas: { ...config.extra?.eas, build: { experimental: true } }, other: 1 },
455 + });`,
456 + "app.json": JSON.stringify({ expo: { extra: { eas: { projectId: ID_A } } } }),
457 + },
458 + expected: Option.some(ID_A),
459 + },
460 + {
461 + case: "gives no answer when a config spreads the config but replaces eas",
462 + files: {
463 + "app.config.js": `module.exports = ({ config }) => ({
464 + ...config,
465 + extra: { ...config.extra, eas: { build: { experimental: true } } },
466 + });`,
467 + "app.json": JSON.stringify({ expo: { extra: { eas: { projectId: ID_A } } } }),
468 + },
469 + expected: Option.none(),
470 + },
471 + {
472 + case: "reads app.json's project id through a config that only spreads the config itself",
473 + files: {
474 + "app.config.js": `module.exports = ({ config }) => ({
475 + ...config,
476 + extra: { ...config.extra, eas: { ...(config.extra?.eas ?? {}) }, apiUrl: process.env.API_URL },
477 + });`,
478 + "app.json": JSON.stringify({ expo: { extra: { eas: { projectId: ID_A } } } }),
479 + },
480 + expected: Option.some(ID_A),
481 + },
482 + {
483 + case: "gives no answer when a config may return another file's config on some builds",
484 + files: {
485 + "app.config.js": `module.exports = process.env.PROD
486 + ? { extra: { eas: { projectId: "${ID_A}" } } }
487 + : require("./app.config.staging.js");`,
488 + },
489 + expected: Option.none(),
490 + },
491 + {
492 + case: "gives no answer when a config assigns over the object holding the project id",
493 + files: {
494 + "app.config.js": `export default ({ config }) => {
495 + const c = { extra: { eas: { projectId: "${ID_A}" } } };
496 + c.extra.eas = require("./eas.local.js");
497 + return c;
498 + };`,
499 + },
500 + expected: Option.none(),
501 + },
502 + {
503 + case: "reads a project id that follows spreads",
504 + files: {
505 + "app.config.js": `export default ({ config }) => ({
506 + ...config,
507 + extra: { ...config.extra, eas: { ...(config.extra?.eas ?? {}), projectId: "${ID_A}" } },
508 + });`,
509 + },
510 + expected: Option.some(ID_A),
511 + },
512 + {
513 + case: "gives no answer when a config joins the project id across lines",
514 + files: {
515 + "apps/mobile/app.config.ts": `export default {
516 + extra: { eas: { projectId: "${ID_A.slice(0, 9)}"
517 + + "${ID_A.slice(9)}" } },
518 + };`,
519 + "apps/kiosk/app.json": JSON.stringify({ expo: { extra: { eas: { projectId: ID_B } } } }),
520 + },
521 + expected: Option.none(),
522 + },
523 + {
524 + case: "gives no answer when a config builds the project id in a template",
525 + files: {
526 + "app.config.js":
527 + "export default { extra: { eas: { projectId: `${process.env.EAS_PROJECT_ID}` } } };",
528 + "app.json": JSON.stringify({ expo: { extra: { eas: { projectId: ID_A } } } }),
529 + },
530 + expected: Option.none(),
531 + },
532 + {
533 + case: "gives no answer when an app.json Expo reads as JSON5 cannot be decoded here",
534 + files: {
535 + "apps/mobile/app.json": `{
536 + // the mobile app
537 + "expo": { "extra": { "eas": { "projectId": "${ID_B}" } }, },
538 + }`,
539 + "apps/admin/app.json": JSON.stringify({ expo: { extra: { eas: { projectId: ID_A } } } }),
540 + },
541 + expected: Option.none(),
542 + },
543 + {
544 + case: "reads only the first static config, like Expo",
545 + files: {
546 + "app.config.json": JSON.stringify({ expo: { name: "Mobile" } }),
547 + "app.json": JSON.stringify({ expo: { extra: { eas: { projectId: ID_A } } } }),
548 + },
549 + expected: Option.none(),
550 + },
551 + {
552 + case: "reads a static config that is not wrapped in `expo`",
553 + files: {
554 + "apps/mobile/app.config.json": JSON.stringify({ extra: { eas: { projectId: ID_A } } }),
555 + "apps/README.md": "one app",
556 + },
557 + expected: Option.some(ID_A),
558 + },
559 + {
560 + case: "does not guess between an unwrapped static config and a wrapped one",
561 + files: {
562 + "apps/mobile/app.config.json": JSON.stringify({ extra: { eas: { projectId: ID_A } } }),
563 + "apps/kiosk/app.json": JSON.stringify({ expo: { extra: { eas: { projectId: ID_B } } } }),
564 + },
565 + expected: Option.none(),
566 + },
567 + {
568 + case: "uses app.json when the config never mentions a project id",
569 + files: {
570 + "app.config.js": `export default ({ config }) => ({ ...config, name: "Mobile" });`,
571 + "app.json": JSON.stringify({ expo: { extra: { eas: { projectId: ID_B } } } }),
572 + },
573 + expected: Option.some(ID_B),
574 + },
575 +])("$case", ({ files, expected }) =>
576 + Effect.gen(function* () {
577 + expect(yield* findEasProjectId(yield* workspace(files))).toEqual(expected);
578 + }).pipe(Effect.scoped, Effect.provide(layer)),
579 +);
580 +
581 +it.effect("reads app.config.json like app.json", () =>
582 + Effect.gen(function* () {
583 + const root = yield* workspace({
584 + "app.config.json": JSON.stringify({ expo: { extra: { eas: { projectId: ID_B } } } }),
585 + });
586 + expect(yield* findEasProjectId(root)).toEqual(Option.some(ID_B));
587 + }).pipe(Effect.scoped, Effect.provide(layer)),
588 +);
589 +
590 +it.effect.each(["\r", "\u2028", "\u2029"])(
591 + "gives no answer when a comment ending in %o precedes the rest of a joined id",
592 + (terminator) =>
593 + Effect.gen(function* () {
594 + // A line comment ends at any ECMAScript line terminator, not only LF.
595 + const root = yield* workspace({
596 + "apps/mobile/app.config.ts":
597 + `export default { extra: { eas: { projectId: "${ID_A.slice(0, 9)}" // prefix${terminator}` +
598 + `+ "${ID_A.slice(9)}" } } };`,
599 + "apps/kiosk/app.json": JSON.stringify({ expo: { extra: { eas: { projectId: ID_B } } } }),
600 + });
601 + expect(yield* findEasProjectId(root)).toEqual(Option.none());
602 + }).pipe(Effect.scoped, Effect.provide(layer)),
603 +);
604 +
605 +it.effect.each([
606 + {
607 + case: "a long run of spaces after a spread",
608 + source: `({ config }) => ({ ...${" ".repeat(255 * 1024)}config })`,
609 + },
610 + {
611 + case: "many spreads inside one comment",
612 + source: `({ config }) => ({ .../*${".../*".repeat(30_000)}*/config })`,
613 + },
614 + {
615 + case: "many spreads inside line comments",
616 + source: `({ config }) => ({ ...//${" ...//".repeat(30_000)}\nconfig })`,
617 + },
618 +])("reads $case at once", ({ source }) =>
619 + Effect.gen(function* () {
620 + const root = yield* workspace({
621 + "app.config.js": `module.exports = ${source};`,
622 + "app.json": JSON.stringify({ expo: { extra: { eas: { projectId: ID_A } } } }),
623 + });
624 + const startedAt = performance.now();
625 + expect(yield* findEasProjectId(root)).toEqual(Option.some(ID_A));
626 + expect(performance.now() - startedAt).toBeLessThan(10_000);
627 + }).pipe(Effect.scoped, Effect.provide(layer)),
628 +);
629 +
630 +it.effect("gives no answer at once for a config with more entries than one can have", () =>
631 + Effect.gen(function* () {
632 + // Just under the size bound, every entry followed by an unterminated
633 + // comment would still take seconds; the entry count stops it first.
634 + const entry = `projectId: "${ID_A.slice(0, 9)}" /* `;
635 + const root = yield* workspace({
636 + "apps/mobile/app.config.ts": entry.repeat(Math.floor((255 * 1024) / entry.length)),
637 + "apps/kiosk/app.json": JSON.stringify({ expo: { extra: { eas: { projectId: ID_B } } } }),
638 + });
639 + const startedAt = performance.now();
640 + expect(yield* findEasProjectId(root)).toEqual(Option.none());
641 + expect(performance.now() - startedAt).toBeLessThan(10_000);
642 + }).pipe(Effect.scoped, Effect.provide(layer)),
643 +);
644 +
645 +it.effect("gives no answer at once for a config too large to be one", () =>
646 + Effect.gen(function* () {
647 + // Each entry followed by an unterminated comment scans to the end of the
648 + // file: quadratic on a file made for it. A config this large is unknown.
649 + const entry = `projectId: "${ID_A.slice(0, 9)}" /* `;
650 + const root = yield* workspace({
651 + "apps/mobile/app.config.ts": entry.repeat(Math.ceil((1024 * 1024) / entry.length)),
652 + "apps/kiosk/app.json": JSON.stringify({ expo: { extra: { eas: { projectId: ID_B } } } }),
653 + });
654 + // The bound is loose for a loaded test machine; the slow cases take minutes.
655 + const startedAt = performance.now();
656 + expect(yield* findEasProjectId(root)).toEqual(Option.none());
657 + expect(performance.now() - startedAt).toBeLessThan(10_000);
658 + }).pipe(Effect.scoped, Effect.provide(layer)),
659 +);
660 +
661 +it.effect("answers at once for a long comment before the rest of a joined id", () =>
662 + Effect.gen(function* () {
663 + // A comment with many slashes before a continuation made an earlier
664 + // matcher try every way to split it into comments: minutes, not ms.
665 + const urls = Array.from({ length: 40 }, () => "https://expo.dev").join(" ");
666 + const root = yield* workspace({
667 + "apps/mobile/app.config.ts": `export default {
668 + extra: { eas: { projectId: "${ID_A.slice(0, 9)}" // ${urls}
669 + + "${ID_A.slice(9)}" } },
670 + };`,
671 + "apps/kiosk/app.json": JSON.stringify({ expo: { extra: { eas: { projectId: ID_B } } } }),
672 + });
673 + // The bound is loose for a loaded test machine; the slow cases take minutes.
674 + const startedAt = performance.now();
675 + expect(yield* findEasProjectId(root)).toEqual(Option.none());
676 + expect(performance.now() - startedAt).toBeLessThan(10_000);
677 + }).pipe(Effect.scoped, Effect.provide(layer)),
678 +);
679 +
680 +it.effect("gives no answer when an app's config is there but cannot be read", () =>
681 + Effect.gen(function* () {
682 + const fs = yield* FileSystem.FileSystem;
683 + const path = yield* Path.Path;
684 + for (const file of ["app.json", "app.config.json"]) {
685 + const root = yield* workspace({
686 + "apps/two/app.json": JSON.stringify({ expo: { extra: { eas: { projectId: ID_B } } } }),
687 + });
688 + // A directory where the file should be: it exists but cannot be read.
689 + yield* fs.makeDirectory(path.join(root, "apps/one", file), { recursive: true });
690 + expect(yield* findEasProjectId(root)).toEqual(Option.none());
691 + }
692 + }).pipe(Effect.scoped, Effect.provide(layer)),
693 +);
694 +
695 +it.effect("does not guess between apps that name different EAS projects", () =>
696 + Effect.gen(function* () {
697 + const root = yield* workspace({
698 + "apps/one/app.json": JSON.stringify({ expo: { extra: { eas: { projectId: ID_A } } } }),
699 + "apps/two/app.json": JSON.stringify({ expo: { extra: { eas: { projectId: ID_B } } } }),
700 + });
701 + expect(yield* findEasProjectId(root)).toEqual(Option.none());
702 + expect(yield* findEasProjectId(yield* workspace({ "README.md": "no app" }))).toEqual(
703 + Option.none(),
704 + );
705 + }).pipe(Effect.scoped, Effect.provide(layer)),
706 +);
apps/server/src/device/easProjectId.ts new
+257
@@ -0,0 +1,257 @@
1 +import * as Effect from "effect/Effect";
2 +import * as FileSystem from "effect/FileSystem";
3 +import * as Option from "effect/Option";
4 +import * as Path from "effect/Path";
5 +import * as Schema from "effect/Schema";
6 +
7 +const CONFIG_FILES = [
8 + "app.config.ts",
9 + "app.config.mts",
10 + "app.config.js",
11 + "app.config.mjs",
12 + "app.config.cjs",
13 +];
14 +const JSON_CONFIG_FILES = ["app.config.json", "app.json"];
15 +const UUID = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
16 +// A `projectId` whose whole value is one quoted string: the entry ends at the
17 +// quote, then after any space and comments a separator or the end of the
18 +// file; an operator may follow a line break or a comment. A comment is
19 +// matched whole (a line comment through its line break), so a separator
20 +// inside one cannot end the entry. An EAS project id is a UUID; another
21 +// service's (Firebase's, say) is not, and names no EAS project.
22 +const QUOTED_PROJECT_ID =
23 + /\bprojectId["']?\s*:\s*["'`]([^"'`\n]*)["'`](?=(?:\s|\/\/[^\n\r\u2028\u2029]*(?:[\n\r\u2028\u2029]|$)|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:[,;})\]]|$))/gi;
24 +const PROJECT_ID_MENTION = /\bprojectId\b/gi;
25 +// Reading a config is linear in its size per entry; one this large is not an
26 +// app config but a file made to keep the server busy.
27 +const MAX_CONFIG_LENGTH = 256 * 1024;
28 +// Each entry is read against the rest of the file, so a file with many is
29 +// quadratic; an app config mentions its project a few times at most.
30 +const MAX_MENTIONS = 32;
31 +
32 +// A spread after an entry may replace it from elsewhere: anywhere after it,
33 +// at any depth, since a spread in an enclosing object replaces the entry
34 +// too, and a comment or string could hide a brace from a scan of the
35 +// entry's own object. An assignment over the config may replace it from
36 +// anywhere: `Object.assign(defaults, overrides)` names the call before
37 +// both arguments.
38 +const SPREAD_LATER = /\.\.\./;
39 +// Space, a comment, or an opening parenthesis: what may sit between `...`
40 +// and the thing spread. Sticky, so the scan moves through the file once.
41 +const SPREAD_FILLER = /(?:\s+|\/\/[^\n\r\u2028\u2029]*|\/\*(?:[^*]|\*(?!\/))*\*\/|\()/y;
42 +// `config`'s `extra` and `extra.eas` entries, the holders of the EAS id
43 +// (dotted, optional-chained or in brackets).
44 +const EXTRA_OF_CONFIG = String.raw`config(?:\s*\??\.\s*extra|\s*(?:\?\.)?\s*\[\s*["'\x60]extra["'\x60]\s*\])`;
45 +const EAS_OF_CONFIG =
46 + EXTRA_OF_CONFIG + String.raw`(?:\s*\??\.\s*eas|\s*(?:\?\.)?\s*\[\s*["'\x60]eas["'\x60]\s*\])`;
47 +// The holder, and nothing more of it: no further property, call or operator
48 +// (`?? {}` keeps it, so it may follow).
49 +const HOLDER_END = String.raw`(?![\p{ID_Continue}$\u200c\u200d\\]|\s*(?:[.\[(]|\?(?!\?)))`;
50 +const HOLDER_AT = {
51 + extra: new RegExp(EXTRA_OF_CONFIG + HOLDER_END, "uy"),
52 + eas: new RegExp(EAS_OF_CONFIG + HOLDER_END, "uy"),
53 +};
54 +// `config` and no more of it: not an identifier continuing (`$`, Unicode
55 +// letters and a `\u` escape do, where `\b` would not), nor a property.
56 +const CONFIG_AT = new RegExp("config" + HOLDER_END, "uy");
57 +
58 +/**
59 + * How a dynamic config with no EAS id of its own relates to app.json's:
60 + * `spreads` when it spreads `config`, the one Expo hands it (app.json's
61 + * entry carries through), and nothing else but `config`'s own `extra` or
62 + * `extra.eas`, which keep the entry wherever they land; `replaces` when it
63 + * spreads anything else (`config.extra.preview` too), which may replace
64 + * that entry; `unclear` when it spreads nothing,
65 + * since it may return `config` changed, or a config of its own that Expo
66 + * uses alone. A `...` inside a comment after a spread is skipped with the
67 + * comment, so the scan is linear.
68 + */
69 +const staticConfigUse = (source: string): "spreads" | "replaces" | "unclear" => {
70 + let spreads = 0;
71 + let at = 0;
72 + for (;;) {
73 + const next = source.indexOf("...", at);
74 + if (next === -1) return spreads > 0 ? "spreads" : "unclear";
75 + at = next + 3;
76 + for (;;) {
77 + SPREAD_FILLER.lastIndex = at;
78 + const filler = SPREAD_FILLER.exec(source);
79 + if (!filler) break;
80 + at += filler[0].length;
81 + }
82 + CONFIG_AT.lastIndex = at;
83 + if (CONFIG_AT.test(source)) {
84 + spreads++;
85 + continue;
86 + }
87 + HOLDER_AT.extra.lastIndex = at;
88 + HOLDER_AT.eas.lastIndex = at;
89 + if (!HOLDER_AT.extra.test(source) && !HOLDER_AT.eas.test(source)) return "replaces";
90 + }
91 +};
92 +const ASSIGNS_OVER = /\bObject\s*\.\s*assign\b|\bassign\s*\(/;
93 +// A config may replace the object holding the entry, or the whole config,
94 +// from somewhere this scan cannot read: an assignment to `.extra` or `.eas`,
95 +// (as a property or in brackets), a `delete` of anything, or another file it
96 +// requires or imports.
97 +const REPLACES_HOLDER =
98 + /(?:\.\s*(?:extra|eas)|\[\s*["'`](?:extra|eas)["'`]\s*\])\s*=(?!=)|\bdelete\b|\brequire\s*\(|\bimport\s*\(/;
99 +// An `extra:` or `eas:` entry in a config that takes its id from app.json:
100 +// unless its value is an object that starts by spreading that same entry
101 +// of `config` (`config.extra`, `config.extra.eas`; spreading the whole
102 +// config there puts the id elsewhere), it replaces app.json's (`extra: {}`
103 +// drops the id). The key may be quoted
104 +// or computed; a shorthand `extra` or `eas` entry replaces it too. More
105 +// entries than mentions are allowed are not read.
106 +const EXTRA_OR_EAS = /(?:\b(extra|eas)|["'`](extra|eas)["'`]\s*\]?)\s*:\s*/g;
107 +const SHORTHAND_EXTRA_OR_EAS = /(?<![.\p{ID_Continue}$])(?:extra|eas)\s*(?=[,}])/u;
108 +const keepsStaticExtra = (source: string): boolean => {
109 + if (SHORTHAND_EXTRA_OR_EAS.test(source)) return false;
110 + let entries = 0;
111 + for (const entry of source.matchAll(EXTRA_OR_EAS)) {
112 + if (++entries > MAX_MENTIONS) return false;
113 + const holder = HOLDER_AT[(entry[1] ?? entry[2]) as "extra" | "eas"];
114 + let at = entry.index + entry[0].length;
115 + if (source[at] !== "{") return false;
116 + at++;
117 + for (;;) {
118 + SPREAD_FILLER.lastIndex = at;
119 + const filler = SPREAD_FILLER.exec(source);
120 + if (!filler) break;
121 + at += filler[0].length;
122 + }
123 + if (!source.startsWith("...", at)) return false;
124 + at += 3;
125 + for (;;) {
126 + SPREAD_FILLER.lastIndex = at;
127 + const filler = SPREAD_FILLER.exec(source);
128 + if (!filler) break;
129 + at += filler[0].length;
130 + }
131 + holder.lastIndex = at;
132 + if (!holder.test(source)) return false;
133 + }
134 + return true;
135 +};
136 +
137 +const Extra = Schema.optional(
138 + Schema.Struct({
139 + eas: Schema.optional(Schema.Struct({ projectId: Schema.optional(Schema.String) })),
140 + }),
141 +);
142 +// Expo reads a static config wrapped in `expo` or not, and as JSON5; one
143 +// this cannot decode (comments, say) still names a project, unknown here.
144 +const decodeAppJson = Schema.decodeUnknownOption(
145 + Schema.fromJsonString(
146 + Schema.Struct({ expo: Schema.optional(Schema.Struct({ extra: Extra })), extra: Extra }),
147 + ),
148 +);
149 +
150 +/**
151 + * The project ids a directory's app config names. Read, never run: a dynamic
152 + * config is the project's own code, which an agent may have written. Its text
153 + * is taken as it is, comments included, so an old id left in a comment makes
154 + * the answer ambiguous rather than wrong. app.config.json or app.json count
155 + * too: a dynamic config may only replace theirs on some builds. Null when
156 + * the project is unknown: the config sets or changes it some other way than
157 + * a literal, or a config cannot be read.
158 + */
159 +const projectIdsOf = Effect.fn("easProjectId.projectIdsOf")(function* (dir: string) {
160 + const fs = yield* FileSystem.FileSystem;
161 + const path = yield* Path.Path;
162 + const ids: Array<string> = [];
163 + const configFile = yield* Effect.findFirst(CONFIG_FILES, (file) =>
164 + fs.exists(path.join(dir, file)).pipe(Effect.orElseSucceed(() => false)),
165 + );
166 + if (Option.isSome(configFile)) {
167 + const source = yield* fs
168 + .readFileString(path.join(dir, configFile.value))
169 + .pipe(Effect.orElseSucceed(() => "projectId"));
170 + // Every mention of `projectId` must be a quoted entry: one set from a
171 + // variable, or assigned later, could be any project, and makes the
172 + // answer unknown.
173 + if (source.length > MAX_CONFIG_LENGTH) return null;
174 + const mentions = source.match(PROJECT_ID_MENTION)?.length ?? 0;
175 + if (mentions > MAX_MENTIONS) return null;
176 + const entries = [...source.matchAll(QUOTED_PROJECT_ID)];
177 + const quoted = entries.map((match) => match[1]!);
178 + // A template that interpolates could be any project too, and so could
179 + // one a spread after the entry, or an assignment anywhere, replaces;
180 + if (
181 + quoted.length !== mentions ||
182 + quoted.some((id) => id.includes("${")) ||
183 + ASSIGNS_OVER.test(source) ||
184 + REPLACES_HOLDER.test(source) ||
185 + entries.some((match) => SPREAD_LATER.test(source.slice(match.index + match[0].length)))
186 + ) {
187 + return null;
188 + }
189 + // Only a config shown to spread `config` and nothing else carries app.json's
190 + // entry through unchanged; any other shape could use or replace it.
191 + if (
192 + !quoted.some((id) => UUID.test(id)) &&
193 + (staticConfigUse(source) !== "spreads" || !keepsStaticExtra(source))
194 + ) {
195 + return null;
196 + }
197 + ids.push(...quoted.filter((id) => UUID.test(id)).map((id) => id.toLowerCase()));
198 + }
199 + for (const file of JSON_CONFIG_FILES) {
200 + const json = yield* fs.readFileString(path.join(dir, file)).pipe(
201 + Effect.map(Option.some),
202 + Effect.catch((error) =>
203 + Effect.succeed(error.reason._tag === "NotFound" ? Option.none<string>() : null),
204 + ),
205 + );
206 + // A config that is there but cannot be read could name any project.
207 + if (json === null) return null;
208 + if (Option.isNone(json)) continue;
209 + const decoded = decodeAppJson(json.value);
210 + if (Option.isNone(decoded)) return null;
211 + const id = (decoded.value.expo ?? decoded.value).extra?.eas?.projectId;
212 + if (id !== undefined && UUID.test(id)) ids.push(id.toLowerCase());
213 + // Expo reads only the first static config it finds.
214 + break;
215 + }
216 + return ids;
217 +});
218 +
219 +/**
220 + * The EAS project of a workspace's Expo app: its root, or one app below
221 + * `apps/` or `packages/`. None when there is none, a config is ambiguous, or
222 + * the apps disagree, so the caller asks for an explicit choice instead of
223 + * billing the wrong project.
224 + */
225 +export const findEasProjectId = Effect.fn("easProjectId.findEasProjectId")(function* (
226 + workspaceRoot: string,
227 +) {
228 + const fs = yield* FileSystem.FileSystem;
229 + const path = yield* Path.Path;
230 + const isDirectory = (child: string) =>
231 + fs.stat(child).pipe(
232 + Effect.map((info) => info.type === "Directory"),
233 + Effect.orElseSucceed(() => false),
234 + );
235 + // Only a directory can be an app; a README or .DS_Store beside them is not one.
236 + const children = (parent: string) =>
237 + fs.readDirectory(path.join(workspaceRoot, parent)).pipe(
238 + Effect.map((names) => names.map((name) => path.join(workspaceRoot, parent, name))),
239 + Effect.flatMap((paths) =>
240 + Effect.forEach(paths, (child) =>
241 + Effect.map(isDirectory(child), (directory) => (directory ? [child] : [])),
242 + ),
243 + ),
244 + Effect.map((kept) => kept.flat()),
245 + Effect.orElseSucceed(() => []),
246 + );
247 + const directories = [
248 + workspaceRoot,
249 + ...(yield* children("apps")),
250 + ...(yield* children("packages")),
251 + ];
252 + const ids = yield* Effect.forEach(directories, projectIdsOf, { concurrency: 4 });
253 + // An app whose project is unknown could be the one the thread works on.
254 + if (ids.some((found) => found === null)) return Option.none<string>();
255 + const distinct = new Set(ids.flatMap((found) => found ?? []));
256 + return distinct.size === 1 ? Option.some([...distinct][0]!) : Option.none<string>();
257 +});
apps/server/src/device/localSshDeviceHost.test.ts
+1
@@ -83,6 +83,7 @@ it.effect("removes only self targets from a fanned-out host list", () =>
83 kind: "eas" as const,
84 id: "eas",
85 label: "EAS Simulator",
86 + accessToken: "",
87 maxSessionMinutes: 30,
88 idleMinutes: 10,
89 maxConcurrentSessions: 2,
apps/server/src/serverSettings.test.ts
+13
@@ -1590,6 +1590,17 @@ it.layer(NodeServices.layer)("server settings", (it) => {
1590 enabled: true,
1591 },
1592 },
1593 + easDeviceHosts: [
1594 + {
1595 + kind: "eas",
1596 + id: "eas",
1597 + label: "EAS Simulator",
1598 + accessToken: "expo-secret",
1599 + maxSessionMinutes: 30,
1600 + idleMinutes: 10,
1601 + maxConcurrentSessions: 2,
1602 + },
1603 + ],
1604 });
1605 const values = [
1606 "config-secret",
@@ -1598,6 +1609,7 @@ it.layer(NodeServices.layer)("server settings", (it) => {
1609 "bitbucket-secret",
1610 "gitcafe-secret",
1611 "quota-secret",
1612 + "expo-secret",
1613 ];
1614 const client = ServerSettingsModule.redactServerSettingsForClient(saved);
1615 const disk = yield* fs.readFileString(config.settingsPath);
@@ -1612,6 +1624,7 @@ it.layer(NodeServices.layer)("server settings", (it) => {
1624 providerInstances: client.providerInstances,
1625 sourceControlHosts: client.sourceControlHosts,
1626 usageLimitSources: client.usageLimitSources,
1627 + easDeviceHosts: client.easDeviceHosts,
1628 });
1629 for (const value of values) assert.include(JSON.stringify(echoed), value);
1630 const renamed = yield* service.updateProviderInstance({
apps/server/src/settingsSecrets.ts
+14 -1
@@ -2,6 +2,7 @@ import {
2 AntigravitySettings,
3 ClaudeSettings,
4 CodexSettings,
5 + EasDeviceHostConfig,
6 type ServerSettings,
7 UsageLimitSourceConfig,
8 secretSettingsFields,
@@ -31,6 +32,7 @@ const providerSecretFields = new Map([
32 ),
33 ]);
34 const usageLimitSecretFields = secretSettingsFields(UsageLimitSourceConfig);
35 +const easDeviceHostSecretFields = secretSettingsFields(EasDeviceHostConfig);
36 const encode = (value: string) => Buffer.from(value, "utf8").toString("base64url");
37
38 export interface SettingsSecret {
@@ -142,5 +144,16 @@ export function mapSettingsSecrets(
144 ]),
145 ) as ServerSettings["usageLimitSources"];
146
145 - return { ...settings, providerInstances, sourceControlHosts, usageLimitSources };
147 + const easDeviceHosts = settings.easDeviceHosts.map(
148 + (host) =>
149 + mapFields(
150 + host,
151 + easDeviceHostSecretFields,
152 + (field, serverHost) =>
153 + `device-host-${encode(host.id)}-${encode(field)}` +
154 + (serverHost === null ? "" : `-${encode(serverHost)}`),
155 + ) as EasDeviceHostConfig,
156 + );
157 +
158 + return { ...settings, providerInstances, sourceControlHosts, usageLimitSources, easDeviceHosts };
159 }
knip.jsonc
+5
@@ -30,12 +30,17 @@
30 "src/claude-history-worker.ts!",
31 "scripts/cli.ts",
32 "scripts/evaluate-thread-titles.ts",
33 + "scripts/fetch-expo-schema.ts",
34 "scripts/measure-pr-preview.ts",
35 "scripts/probe-claude-fork-local-rollback-replay.ts",
36 "scripts/update-test-shard-weights.ts",
37 "scripts/verify-background-live.ts",
38 "src/provider/testFixtures/*.mjs",
39 + // graphqlgen reads its config.
40 + "graphql.config.ts",
41 ],
42 + // The generated operations export every selection's class.
43 + "ignoreIssues": { "**/*.graphql.ts": ["exports", "types", "namespaceMembers"] },
44 // Keep the transitive Effect runtime pinned for standalone npm installs.
45 // The Vite+ web build prerequisite.
46 // Native and disk-loaded provider packages stay external to the bundle; the
packages/contracts/src/device.test.ts
+7
@@ -2,10 +2,12 @@ import { describe, expect, it } from "@effect/vitest";
2 import { Schema } from "effect";
3 import {
4 DeviceServiceState,
5 + EasDeviceHostConfig,
6 EasDeviceHostConfigs,
7 SshDeviceHostConfigs,
8 deviceToolInstallMessage,
9 } from "./device.ts";
10 +import { secretSettingsFields } from "./settings.ts";
11
12 describe("device tool install progress", () => {
13 it("distinguishes a new install from an upgrade and chooses versions numerically", () => {
@@ -49,6 +51,7 @@ describe("configured device hosts", () => {
51 kind: "eas",
52 id: "eas",
53 label: "EAS Simulator",
54 + accessToken: "",
55 maxSessionMinutes: 30,
56 idleMinutes: 10,
57 maxConcurrentSessions: 2,
@@ -62,6 +65,10 @@ describe("configured device hosts", () => {
65 decodeEas([{ kind: "eas", id: "eas", label: "EAS", maxSessionMinutes: 10 }]),
66 ).toThrow();
67 });
68 +
69 + it("marks the EAS access token as a secret setting", () => {
70 + expect(secretSettingsFields(EasDeviceHostConfig)).toEqual(["accessToken"]);
71 + });
72 });
73
74 describe("device state for clients from before EAS hosts", () => {
packages/contracts/src/device.ts
+10 -1
@@ -2,7 +2,7 @@ import * as Effect from "effect/Effect";
2 import * as Schema from "effect/Schema";
3 import * as SchemaTransformation from "effect/SchemaTransformation";
4
5 -import { ThreadId, TrimmedNonEmptyString } from "./baseSchemas.ts";
5 +import { ThreadId, TrimmedNonEmptyString, TrimmedString } from "./baseSchemas.ts";
6
7 export const DevicePlatform = Schema.Literals(["ios", "android"]);
8 export type DevicePlatform = typeof DevicePlatform.Type;
@@ -38,6 +38,15 @@ export const EasDeviceHostConfig = Schema.Struct({
38 label: TrimmedNonEmptyString,
39 /** EAS project that sessions run under, when the project's app config does not name one. */
40 appId: Schema.optional(TrimmedNonEmptyString),
41 + /**
42 + * Expo access token, kept in the secret store. When empty the server uses
43 + * EXPO_TOKEN, then the `eas login` session. This is `secretSetting` from
44 + * settings.ts, which imports this module.
45 + */
46 + accessToken: TrimmedString.pipe(
47 + Schema.withDecodingDefaultKey(Effect.succeed("")),
48 + Schema.annotateKey({ settingsSecret: true }),
49 + ),
50 /** EAS allows at most 40 minutes on free accounts and 115 on paid ones. */
51 maxSessionMinutes: Schema.Int.check(Schema.isBetween({ minimum: 1, maximum: 115 })).pipe(
52 Schema.withDecodingDefaultKey(Effect.succeed(30)),
packages/shared/src/httpObservability.ts
+2 -1
@@ -4,5 +4,6 @@ import * as Headers from "effect/http/Headers";
4
5 export const layer = Layer.effect(
6 Headers.CurrentRedactedNames,
7 - Effect.map(Headers.CurrentRedactedNames, (names) => [...names, "dpop"]),
7 + // `expo-session` carries the `eas login` session secret on Expo API requests.
8 + Effect.map(Headers.CurrentRedactedNames, (names) => [...names, "dpop", "expo-session"]),
9 );
pnpm-lock.yaml
+7 -2
@@ -760,6 +760,9 @@ importers:
760 specifier: ^3.4.0
761 version: 3.4.0
762 devDependencies:
763 + '@effect/graphql-generator':
764 + specifier: 'catalog:'
765 + version: 4.0.5(@effect/platform-node@4.0.5(bufferutil@4.1.0)(effect@4.0.5)(redis@6.2.1)(utf-8-validate@6.0.6))(effect@4.0.5)
766 '@effect/vitest':
767 specifier: 4.0.5
768 version: 4.0.5(patch_hash=2731c9c3761c595f25ddc625a7d61ca376b389d5b3049ecb837c8940f21cfa02)(@types/node@24.12.4)(@vitest/browser-playwright@5.0.1)(@vitest/ui@5.0.1)(bufferutil@4.1.0)(effect@4.0.5)(esbuild@0.28.2)(jiti@2.7.0)(jsdom@30.1.0(@noble/hashes@1.8.0))(msw@2.12.11(@types/node@24.12.4)(typescript@7.0.2))(terser@5.48.0)(typescript@7.0.2)(unrun@0.2.39)(utf-8-validate@6.0.6)(yaml@2.9.0)
@@ -802,6 +805,9 @@ importers:
805 effect-codex-app-server:
806 specifier: workspace:*
807 version: link:../../packages/effect-codex-app-server
808 + graphql:
809 + specifier: 16.14.1
810 + version: 16.14.1
811 vite-plus:
812 specifier: 1.0.0
813 version: 1.0.0(@types/node@24.12.4)(@vitest/browser-playwright@5.0.1)(@vitest/ui@5.0.1(vitest@5.0.1))(bufferutil@4.1.0)(esbuild@0.28.2)(jiti@2.7.0)(jsdom@30.1.0(@noble/hashes@1.8.0))(msw@2.12.11(@types/node@24.12.4)(typescript@7.0.2))(terser@5.48.0)(typescript@7.0.2)(unrun@0.2.39)(utf-8-validate@6.0.6)(yaml@2.9.0)
@@ -20315,8 +20321,7 @@ snapshots:
20321
20322 graphql@16.11.0: {}
20323
20318 - graphql@16.14.1:
20319 - optional: true
20324 + graphql@16.14.1: {}
20325
20326 h3@1.15.11:
20327 dependencies:
vite.config.ts
+2
@@ -90,6 +90,7 @@ export default defineConfig({
90 "**/routeTree.gen.ts",
91 "**/*.graphql.ts",
92 "packages/source-control-github/schema/**",
93 + "apps/server/schema/**",
94 "apps/mobile/android/**",
95 "apps/mobile/ios/**",
96 "apps/mobile/uniwind-types.d.ts",
@@ -117,6 +118,7 @@ export default defineConfig({
118 "**/routeTree.gen.ts",
119 "**/*.graphql.ts",
120 "packages/source-control-github/schema/**",
121 + "apps/server/schema/**",
122 "apps/mobile/android/**",
123 "apps/mobile/ios/**",
124 "apps/mobile/uniwind-types.d.ts",