UNPKG

@codesandbox/api

Version:
1,831 lines (1,819 loc) 55.4 kB
import type { ListQuery, FieldQuery, Query, ListField, QueryData, FragmentData, QueryVariables, Subscriber, Requester, ResolveQuery, ResolveQueryDefinitions, ClientQuery, ClientSubscribe, FragmentDataType, InlineFragmentSymbol } from '@codesandbox/create-gql-api'; export type Album = { __typename: "Album" id: string sandboxes: ListField<Sandbox> title: string | null } export enum Authorization { COMMENT = "COMMENT", NONE = "NONE", OWNER = "OWNER", READ = "READ", WRITE_CODE = "WRITE_CODE", WRITE_PROJECT = "WRITE_PROJECT" } export enum AuthType { BASIC = "BASIC", BEARER = "BEARER" } export type BillingDetails = { __typename: "BillingDetails" amount: number currency: string date: string } export type BillingPreview = { __typename: "BillingPreview" immediatePayment: BillingDetails | null nextPayment: BillingDetails | null } export type Bookmarked = { __typename: "Bookmarked" entity: BookmarkEntity | null isBookmarked: boolean | null } export type BookmarkEntity = Team |User export type Branch = { __typename: "Branch" aiConsent: boolean connections: ListField<Connection> contribution: boolean contributionOwner: boolean id: string lastAccessedAt: string | null lastCommit: LastCommit | null name: string owner: User | null project: Project pullRequests: ListField<PullRequest> settings: BranchSettings sourceBranch: string | null status: Status | null upstream: boolean } export type BranchConnections = { __typename: "BranchConnections" branchId: string connections: ListField<Connection> } export type BranchEvent = PullRequestCommentEvent |PullRequestEvent |PullRequestReviewCommentEvent |PullRequestReviewEvent export type BranchLastCommit = { __typename: "BranchLastCommit" branchId: string lastCommit: LastCommit } export type BranchSettings = { __typename: "BranchSettings" protected: boolean } export type BranchStatus = { __typename: "BranchStatus" branchId: string status: Status } export type CodeReference = { anchor: number; code: string; head: number; lastUpdatedAt: string; path: string; } export type CodeReferenceMetadata = { __typename: "CodeReferenceMetadata" anchor: number code: string head: number path: string sandboxId: string } export type Collaborator = { __typename: "Collaborator" authorization: Authorization id: string lastSeenAt: string | null sandbox: Sandbox user: User warning: string | null } export type Collection = { __typename: "Collection" id: string | null path: string sandboxCount: number sandboxes: ListField<Sandbox> team: Team | null teamId: string | null user: User | null } export type Comment = { __typename: "Comment" anchorReference: Reference | null comments: ListField<Comment> content: string | null id: string insertedAt: string isRead: boolean isResolved: boolean parentComment: Comment | null references: ListField<Reference> replyCount: number sandbox: Sandbox updatedAt: string user: User } export type Connection = { __typename: "Connection" appId: string clientId: string color: string timestamp: string user: User | null } export type CurrentUser = { __typename: "CurrentUser" bookmarkedTemplates: ListField<Template> collaboratorSandboxes: ListField<Sandbox> collection: FieldQuery<{ path: string teamId?: string }, Collection> | null collections: ListQuery<{ teamId?: string }, Collection> deletionRequested: boolean eligibleForTrial: boolean eligibleWorkspaces: ListField<TeamPreview> email: string featureFlags: UserFeatureFlags githubOrganizations: ListField<GithubOrganization> githubProfile: GithubProfile | null githubRepos: ListQuery<{ affiliation: UserRepoAffiliation[] page?: number perPage?: number sort?: UserRepoSort }, GithubRepo> id: string likedSandboxes: ListField<Sandbox> name: string | null notificationPreferences: NotificationPreferences | null notifications: ListQuery<{ limit?: number orderBy?: OrderBy type?: string[] }, Notification> personalWorkspaceId: string primaryWorkspaceId: string | null provider: ProviderName recentBranches: ListQuery<{ contribution?: boolean limit?: number teamId?: string }, Branch> recentProjects: ListQuery<{ limit?: number }, Project> recentlyAccessedSandboxes: ListQuery<{ limit?: number teamId?: string }, Sandbox> recentlyUsedTemplates: ListQuery<{ teamId?: string }, Template> sandboxes: ListQuery<{ hasOriginalGit?: boolean limit?: number orderBy?: OrderBy showDeleted?: boolean }, Sandbox> team: FieldQuery<{ id?: string }, Team> | null teams: ListField<Team> templates: ListQuery<{ showAll?: boolean teamId?: string }, Template> username: string workspaces: ListField<Team> } export enum Direction { ASC = "ASC", DESC = "DESC" } export type Git = { __typename: "Git" baseGitSandboxes: ListQuery<{ teamId?: string }, Sandbox> branch: string | null commitSha: string | null id: string | null originalGitSandboxes: ListQuery<{ teamId?: string }, Sandbox> path: string | null repo: string | null username: string | null } export enum GitHubAuthorAssociation { COLLABORATOR = "COLLABORATOR", CONTRIBUTOR = "CONTRIBUTOR", FIRST_TIMER = "FIRST_TIMER", FIRST_TIME_CONTRIBUTOR = "FIRST_TIME_CONTRIBUTOR", MANNEQUIN = "MANNEQUIN", MEMBER = "MEMBER", NONE = "NONE", OWNER = "OWNER" } export type GithubOrganization = { __typename: "GithubOrganization" avatarUrl: string description: string | null id: string login: string } export enum GithubPermission { ADMIN = "ADMIN", NONE = "NONE", READ = "READ", WRITE = "WRITE" } export type GithubProfile = { __typename: "GithubProfile" avatarUrl: string id: string login: string name: string | null scopes: string[] } export type GitHubPullRequestComment = { __typename: "GitHubPullRequestComment" authorAssociation: GitHubAuthorAssociation body: string createdAt: string htmlUrl: string id: number issueId: number updatedAt: string user: User | null username: string } export enum GitHubPullRequestMergeMethod { MERGE = "MERGE", REBASE = "REBASE", SQUASH = "SQUASH" } export enum GitHubPullRequestReviewAction { APPROVE = "APPROVE", COMMENT = "COMMENT", REQUEST_CHANGES = "REQUEST_CHANGES" } export type GitHubPullRequestReviewComment = { __typename: "GitHubPullRequestReviewComment" authorAssociation: GitHubAuthorAssociation body: string commitId: string createdAt: string diffHunk: string htmlUrl: string id: number inReplyToId: number | null line: number | null originalCommitId: string originalLine: number | null originalStartLine: number | null path: string pullRequestReviewId: number | null side: GitHubPullRequestReviewCommentSide | null startLine: number | null startSide: GitHubPullRequestReviewCommentSide | null subjectType: GitHubPullRequestReviewCommentSubjectType | null updatedAt: string user: User | null username: string } export type GithubPullRequestReviewCommentInput = { body: string; line: number; path: string; side: GitHubPullRequestReviewCommentSide; startLine?: number; startSide?: GitHubPullRequestReviewCommentSide; } export enum GitHubPullRequestReviewCommentSide { LEFT = "LEFT", RIGHT = "RIGHT" } export enum GitHubPullRequestReviewCommentSubjectType { FILE = "FILE", LINE = "LINE" } export type GithubRepo = { __typename: "GithubRepo" appInstalled: boolean authorization: GithubRepoAuthorization fullName: string id: string name: string owner: GithubOrganization private: boolean pushedAt: string | null updatedAt: string } export enum GithubRepoAuthorization { READ = "READ", WRITE = "WRITE" } export type GitHubRepository = { __typename: "GitHubRepository" allowForking: boolean archived: boolean createdAt: string defaultBranch: string description: string | null fork: boolean id: number isTemplate: boolean name: string owner: string parent: GitHubRepository | null permission: GithubPermission private: boolean pushedAt: string source: GitHubRepository | null updatedAt: string } export type GithubRequestedReviewer = { __typename: "GithubRequestedReviewer" requestedAt: string | null user: User | null username: string } export type GithubRequestedTeam = { __typename: "GithubRequestedTeam" name: string requestedAt: string | null } export enum GitProvider { GITHUB = "GITHUB" } export type ImageReference = { fileName: string; resolution: number; src?: string; url?: string; } export type ImageReferenceMetadata = { __typename: "ImageReferenceMetadata" fileName: string resolution: number[] uploadId: string url: string } export type InstallationEvent = { __typename: "InstallationEvent" action: InstallationEventAction event: string } export enum InstallationEventAction { CREATED = "CREATED" } export type Invitation = { __typename: "Invitation" authorization: Authorization email: string | null id: string | null sandbox: Sandbox token: string } export type InvoicePreview = { __typename: "InvoicePreview" total: number totalExcludingTax: number | null updateMoment: SubscriptionUpdateMoment | null } export type LastCommit = { __typename: "LastCommit" color: string message: string | null sha: string timestamp: string user: User | null } export type Limits = { __typename: "Limits" personalFree: TeamLimits personalPro: TeamLimits teamFree: TeamLimits teamPro: TeamLimits } export type LiveSession = { __typename: "LiveSession" defaultPermission: LiveSessionPermission guests: ListField<LiveSessionGuest> host: LiveSessionHost | null id: string startedAt: string stoppedAt: string | null vmId: string } export type LiveSessionEvent = { __typename: "LiveSessionEvent" event: LiveSessionEventAction session: LiveSession } export enum LiveSessionEventAction { JOINED = "JOINED", SET_DEFAULT_PERMISSION = "SET_DEFAULT_PERMISSION", SET_GUEST_PERMISSION = "SET_GUEST_PERMISSION", STARTED = "STARTED", STOPPED = "STOPPED" } export type LiveSessionGuest = { __typename: "LiveSessionGuest" avatarUrl: string permission: LiveSessionPermission userId: string username: string } export type LiveSessionHost = { __typename: "LiveSessionHost" avatarUrl: string userId: string username: string } export enum LiveSessionPermission { READ = "READ", WRITE = "WRITE" } export type MemberAuthorization = { authorization: TeamMemberAuthorization; teamManager?: boolean; userId: string; } export type Notification = { __typename: "Notification" archived: boolean data: string id: string insertedAt: string read: boolean type: string } export type NotificationPreferences = { __typename: "NotificationPreferences" emailCommentMention: boolean emailCommentReply: boolean emailMarketing: boolean emailNewComment: boolean emailSandboxInvite: boolean emailTeamInvite: boolean emailTeamRequest: boolean inAppPrReviewReceived: boolean inAppPrReviewRequest: boolean } export type OrderBy = { direction: Direction; field: string; } export type PreviewReference = { height: number; previewPath: string; screenshotSrc?: string; userAgent: string; width: number; x: number; y: number; } export type PreviewReferenceMetadata = { __typename: "PreviewReferenceMetadata" height: number previewPath: string screenshotUrl: string | null userAgent: string width: number x: number y: number } export type PrivateRegistry = { __typename: "PrivateRegistry" authType: AuthType | null enabledScopes: string[] id: string limitToScopes: boolean | null proxyEnabled: boolean | null registryAuthKey: string | null registryType: RegistryType registryUrl: string | null sandpackTrustedDomains: string[] teamId: string } export type Project = { __typename: "Project" appInstalled: boolean authorization: ProjectAuthorization branchByName: FieldQuery<{ name: string }, Branch> | null branchCount: number branches: ListField<Branch> connections: ListField<Connection> defaultBranch: Branch id: string lastAccessedAt: string | null lastCommit: LastCommit | null pullRequests: ListField<PullRequest> repository: Repository resources: Resources settings: ProjectSettings team: Team | null } export enum ProjectAuthorization { ADMIN = "ADMIN", NONE = "NONE", READ = "READ", WRITE = "WRITE" } export type ProjectEvent = PullRequestCommentEvent |PullRequestEvent |PullRequestReviewCommentEvent |PullRequestReviewEvent export type ProjectSettings = { __typename: "ProjectSettings" aiConsent: boolean | null } export type ProSubscription = { __typename: "ProSubscription" active: boolean billingInterval: SubscriptionInterval | null cancelAt: string | null cancelAtPeriodEnd: boolean currency: string | null id: string | null nextBillDate: string | null origin: SubscriptionOrigin | null paymentMethodAttached: boolean paymentProvider: SubscriptionPaymentProvider | null quantity: number | null status: SubscriptionStatus trialEnd: string | null trialStart: string | null type: SubscriptionType unitPrice: number | null updateBillingUrl: string | null } export enum ProviderName { APPLE = "APPLE", GITHUB = "GITHUB", GOOGLE = "GOOGLE" } export type PullRequest = { __typename: "PullRequest" additions: number | null baseBranch: string baseRepository: Repository body: string | null changedFiles: number | null comments: ListField<GitHubPullRequestComment> commentsCount: number | null commitsCount: number | null creator: User | null creatorUsername: string deletions: number | null draft: boolean headBranch: string htmlUrl: string mergeable: boolean | null mergeableStatus: string | null number: number prClosedAt: string | null prCreatedAt: string | null prMergedAt: string | null prUpdatedAt: string requestedReviewers: ListField<GithubRequestedReviewer> requestedTeams: ListField<GithubRequestedTeam> reviewCommentsCount: number | null reviews: ListField<PullRequestReview> state: string title: string } export type PullRequestCommentEvent = { __typename: "PullRequestCommentEvent" action: PullRequestCommentEventAction comment: GitHubPullRequestComment event: string pullRequest: PullRequest | null } export enum PullRequestCommentEventAction { CREATED = "CREATED", DELETED = "DELETED", EDITED = "EDITED" } export type PullRequestEvent = { __typename: "PullRequestEvent" action: PullRequestEventAction event: string pullRequest: PullRequest } export enum PullRequestEventAction { CLOSED = "CLOSED", CONVERTED_TO_DRAFT = "CONVERTED_TO_DRAFT", OPENED = "OPENED", READY_FOR_REVIEW = "READY_FOR_REVIEW", REVIEW_REQUEST_REMOVED = "REVIEW_REQUEST_REMOVED", REVIEW_REQUESTED = "REVIEW_REQUESTED" } export type PullRequestReview = { __typename: "PullRequestReview" body: string | null comments: ListField<GitHubPullRequestReviewComment> id: number state: PullRequestReviewState submittedAt: string | null syncedAt: string | null user: User | null username: string } export type PullRequestReviewCommentEvent = { __typename: "PullRequestReviewCommentEvent" action: PullRequestReviewCommentEventAction comment: GitHubPullRequestReviewComment event: string pullRequest: PullRequest } export enum PullRequestReviewCommentEventAction { CREATED = "CREATED", DELETED = "DELETED", EDITED = "EDITED" } export type PullRequestReviewEvent = { __typename: "PullRequestReviewEvent" action: PullRequestReviewEventAction event: string pullRequest: PullRequest review: PullRequestReview } export enum PullRequestReviewEventAction { DISMISSED = "DISMISSED", EDITED = "EDITED", SUBMITTED = "SUBMITTED" } export enum PullRequestReviewState { APPROVED = "APPROVED", CHANGES_REQUESTED = "CHANGES_REQUESTED", COMMENTED = "COMMENTED", DISMISSED = "DISMISSED" } export type Reference = { __typename: "Reference" id: string metadata: ReferenceMetadata resource: string type: string } export type ReferenceMetadata = CodeReferenceMetadata |ImageReferenceMetadata |PreviewReferenceMetadata |UserReferenceMetadata export enum RegistryType { CUSTOM = "CUSTOM", GITHUB = "GITHUB", NPM = "NPM" } export type Repository = GitHubRepository export type RepositoryEvent = InstallationEvent export type Resources = { __typename: "Resources" cpu: number memory: number storage: number } export type RootMutationType = { __typename: "RootMutationType" acceptTeamInvitation: FieldQuery<{ teamId: string }, Team> addCollaborator: FieldQuery<{ authorization: Authorization sandboxId: string username: string }, Collaborator> addSandboxesToAlbum: FieldQuery<{ albumId: string sandboxIds: string[] }, Album> | null addToCollection: FieldQuery<{ collectionPath: string privacy?: number sandboxIds?: string[] teamId?: string }, Collection> addToCollectionOrTeam: ListQuery<{ collectionPath?: string privacy?: number sandboxIds?: string[] teamId?: string }, Sandbox> archiveAllNotifications: User archiveNotification: FieldQuery<{ notificationId: string }, Notification> bookmarkTemplate: FieldQuery<{ teamId?: string templateId: string }, Template> | null cancelDeleteCurrentUser: string changeCollaboratorAuthorization: FieldQuery<{ authorization: Authorization sandboxId: string username: string }, Collaborator> changeSandboxInvitationAuthorization: FieldQuery<{ authorization: Authorization invitationId: string sandboxId: string }, Invitation> changeTeamMemberAuthorizations: FieldQuery<{ memberAuthorizations: MemberAuthorization[] teamId: string }, Team> clearNotificationCount: User convertToUsageBilling: FieldQuery<{ addons: string[] billingInterval?: SubscriptionInterval plan: string teamId: string }, boolean> createAlbum: FieldQuery<{ description?: string title: string }, Album> createBranch: FieldQuery<{ branch?: string from?: string name: string owner: string provider: GitProvider team: string }, Branch> createCodeComment: FieldQuery<{ anchorReference: CodeReference codeReferences: CodeReference[] content: string id?: string imageReferences: ImageReference[] parentCommentId?: string sandboxId: string userReferences: UserReference[] }, Comment> createCollection: FieldQuery<{ path: string teamId?: string }, Collection> createComment: FieldQuery<{ codeReferences: CodeReference[] content: string id?: string imageReferences: ImageReference[] parentCommentId?: string sandboxId: string userReferences: UserReference[] }, Comment> createContributionBranch: FieldQuery<{ from?: string name: string owner: string provider: GitProvider }, Branch> createGithubPullRequestReview: FieldQuery<{ body?: string comments: GithubPullRequestReviewCommentInput[] commitId?: string event: GitHubPullRequestReviewAction name: string owner: string pullRequestNumber: number }, PullRequestReview> createOrUpdatePrivateNpmRegistry: FieldQuery<{ authType?: AuthType enabledScopes: string[] limitToScopes: boolean proxyEnabled: boolean registryAuthKey?: string registryType: RegistryType registryUrl?: string sandpackTrustedDomains: string[] teamId: string }, PrivateRegistry> createPreviewComment: FieldQuery<{ anchorReference: PreviewReference codeReferences: CodeReference[] content: string id?: string imageReferences: ImageReference[] parentCommentId?: string sandboxId: string userReferences: UserReference[] }, Comment> createSandboxInvitation: FieldQuery<{ authorization: Authorization email: string sandboxId: string }, Invitation> createTeam: FieldQuery<{ name: string pilot?: boolean }, Team> deleteAlbum: FieldQuery<{ id: string }, string> deleteBranch: FieldQuery<{ id: string }, boolean> deleteCollection: ListQuery<{ path: string teamId?: string }, Collection> deleteComment: FieldQuery<{ commentId: string sandboxId: string }, Comment> deleteCurrentUser: FieldQuery<{ confirm?: boolean }, string> deleteGithubPullRequestReviewComment: FieldQuery<{ commentId: number name: string owner: string }, string> deletePrivateNpmRegistry: FieldQuery<{ teamId: string }, PrivateRegistry> | null deleteProject: FieldQuery<{ name: string owner: string provider: GitProvider team: string }, boolean> deleteProjectById: FieldQuery<{ id: string }, boolean> deleteSandboxes: ListQuery<{ sandboxIds: string[] }, Sandbox> deleteWorkspace: FieldQuery<{ teamId: string }, string> dismissGithubPullRequestReview: FieldQuery<{ message: string name: string owner: string pullRequestNumber: number pullRequestReviewId: number }, PullRequestReview> importBranch: FieldQuery<{ branch: string name: string owner: string provider: GitProvider team: string }, Branch> importProject: FieldQuery<{ name: string owner: string provider: GitProvider team: string }, Project> importReadOnlyBranch: FieldQuery<{ branch: string name: string owner: string provider: GitProvider }, Branch> importReadOnlyProject: FieldQuery<{ name: string owner: string provider: GitProvider }, Project> incrementSandboxVersion: FieldQuery<{ sandboxId: string }, string> inviteToTeam: FieldQuery<{ authorization?: TeamMemberAuthorization teamId: string username: string }, Team> inviteToTeamViaEmail: FieldQuery<{ authorization?: TeamMemberAuthorization email: string teamId: string }, string> joinEligibleWorkspace: FieldQuery<{ workspaceId: string }, Team> joinLiveSession: FieldQuery<{ id: string }, LiveSession> joinUsageBillingBeta: FieldQuery<{ teamId: string }, boolean> leaveTeam: FieldQuery<{ teamId: string }, string> makeSandboxesTemplates: ListQuery<{ sandboxIds: string[] }, Template> markAllNotificationsAsRead: User markNotificationAsRead: FieldQuery<{ notificationId: string }, Notification> mergeGithubPullRequest: FieldQuery<{ mergeMethod?: GitHubPullRequestMergeMethod name: string owner: string pullRequestNumber: number }, string> permanentlyDeleteSandboxes: ListQuery<{ sandboxIds: string[] }, Sandbox> previewConvertToUsageBilling: FieldQuery<{ addons: string[] billingInterval?: SubscriptionInterval plan: string teamId: string }, InvoicePreview> previewUpdateSubscriptionBillingInterval: FieldQuery<{ billingInterval: SubscriptionInterval subscriptionId: string teamId: string }, BillingPreview> previewUpdateUsageSubscriptionPlan: FieldQuery<{ billingInterval?: SubscriptionInterval plan?: string teamId: string }, InvoicePreview> reactivateSubscription: FieldQuery<{ subscriptionId: string teamId: string }, ProSubscription> redeemSandboxInvitation: FieldQuery<{ invitationToken: string sandboxId: string }, Invitation> redeemTeamInviteToken: FieldQuery<{ inviteToken: string }, Team> rejectTeamInvitation: FieldQuery<{ teamId: string }, string> removeCollaborator: FieldQuery<{ sandboxId: string username: string }, Collaborator> removeFromTeam: FieldQuery<{ teamId: string userId: string }, Team> removeRequestedGithubPullRequestReviewers: ListQuery<{ name: string owner: string pullRequestNumber: number reviewers: string[] }, GithubRequestedReviewer> removeSandboxesFromAlbum: FieldQuery<{ albumId: string sandboxIds: string[] }, Album> | null renameCollection: ListQuery<{ newPath: string newTeamId?: string path: string teamId?: string }, Collection> renameSandbox: FieldQuery<{ id: string title: string }, Sandbox> replyToGithubPullRequestReview: FieldQuery<{ body: string commentId: number name: string owner: string pullRequestNumber: number }, GitHubPullRequestReviewComment> requestGithubPullRequestReviewers: ListQuery<{ name: string owner: string pullRequestNumber: number reviewers: string[] }, GithubRequestedReviewer> requestTeamInvitation: FieldQuery<{ teamId: string }, string> resolveComment: FieldQuery<{ commentId: string sandboxId: string }, Comment> revokeSandboxInvitation: FieldQuery<{ invitationId: string sandboxId: string }, Invitation> revokeTeamInvitation: FieldQuery<{ teamId: string userId: string }, Team> setBranchProtection: FieldQuery<{ branchId: string protected: boolean }, Branch> setDefaultTeamMemberAuthorization: FieldQuery<{ defaultAuthorization: TeamMemberAuthorization teamId: string }, WorkspaceSandboxSettings> setLiveSessionDefaultPermission: FieldQuery<{ permission: LiveSessionPermission vmId: string }, LiveSession> setLiveSessionGuestPermission: FieldQuery<{ permission: LiveSessionPermission userId: string vmId: string }, LiveSession> setPreventSandboxesExport: ListQuery<{ preventSandboxExport: boolean sandboxIds: string[] }, Sandbox> setPreventSandboxesLeavingWorkspace: ListQuery<{ preventSandboxLeaving: boolean sandboxIds: string[] }, Sandbox> setPrimaryWorkspace: FieldQuery<{ primaryWorkspaceId: string }, string> setSandboxesFrozen: ListQuery<{ isFrozen: boolean sandboxIds: string[] }, Sandbox> setSandboxesPrivacy: ListQuery<{ privacy?: number sandboxIds: string[] }, Sandbox> setTeamAiConsent: FieldQuery<{ privateRepositories: boolean privateSandboxes: boolean publicRepositories: boolean publicSandboxes: boolean teamId: string }, TeamAiConsent> setTeamDescription: FieldQuery<{ description: string teamId: string }, Team> setTeamLimits: FieldQuery<{ onDemandSpendingLimit?: number teamId: string }, string> setTeamMetadata: FieldQuery<{ metadata: TeamMetadataInput teamId: string }, Team> setTeamMinimumPrivacy: FieldQuery<{ minimumPrivacy: number teamId: string updateDrafts: boolean }, WorkspaceSandboxSettings> setTeamName: FieldQuery<{ name: string teamId: string }, Team> setWorkspaceSandboxSettings: FieldQuery<{ preventSandboxExport: boolean preventSandboxLeaving: boolean teamId: string }, WorkspaceSandboxSettings> softCancelSubscription: FieldQuery<{ subscriptionId: string teamId: string }, ProSubscription> startLiveSession: FieldQuery<{ defaultPermission: LiveSessionPermission vmId: string }, LiveSession> stopLiveSession: FieldQuery<{ vmId: string }, LiveSession> unbookmarkTemplate: FieldQuery<{ teamId?: string templateId: string }, Template> | null unmakeSandboxesTemplates: ListQuery<{ sandboxIds: string[] }, Template> unresolveComment: FieldQuery<{ commentId: string sandboxId: string }, Comment> updateAlbum: FieldQuery<{ description?: string id: string title?: string }, Album> updateComment: FieldQuery<{ codeReferences: CodeReference[] commentId: string content?: string imageReferences: ImageReference[] sandboxId: string userReferences: UserReference[] }, Comment> updateCurrentUser: FieldQuery<{ bio?: string name?: string socialLinks: string[] username: string }, User> updateGithubPullRequestReview: FieldQuery<{ body: string name: string owner: string pullRequestNumber: number pullRequestReviewId: number }, PullRequestReview> updateGithubPullRequestReviewComment: FieldQuery<{ body: string commentId: number name: string owner: string }, GitHubPullRequestReviewComment> updateNotificationPreferences: FieldQuery<{ emailCommentMention?: boolean emailCommentReply?: boolean emailMarketing?: boolean emailNewComment?: boolean emailSandboxInvite?: boolean emailTeamInvite?: boolean emailTeamRequest?: boolean inAppPrReviewReceived?: boolean inAppPrReviewRequest?: boolean }, NotificationPreferences> updateNotificationReadStatus: FieldQuery<{ notificationId: string read: boolean }, Notification> updateProjectSettings: FieldQuery<{ aiConsent?: boolean projectId: string }, ProjectSettings> updateProjectVmTier: FieldQuery<{ branchId?: string projectId: string vmTier: number }, Resources> updateSandboxSettings: FieldQuery<{ aiConsent?: boolean sandboxId: string }, SandboxSettings> updateSubscription: FieldQuery<{ quantity?: number subscriptionId: string teamId: string }, ProSubscription> updateSubscriptionBillingInterval: FieldQuery<{ billingInterval: SubscriptionInterval subscriptionId: string teamId: string }, ProSubscription> updateUsageSubscription: FieldQuery<{ addons: string[] teamId: string }, boolean> updateUsageSubscriptionPlan: FieldQuery<{ billingInterval?: SubscriptionInterval plan?: string teamId: string }, boolean> } export type RootQueryType = { __typename: "RootQueryType" album: FieldQuery<{ albumId: string }, Album> | null albums: ListQuery<{ username: string }, Album> branchById: FieldQuery<{ id: string }, Branch> branchByName: FieldQuery<{ branch: string name: string owner: string provider: GitProvider team?: string }, Branch> curatedAlbums: ListField<Album> getLiveSession: FieldQuery<{ vmId: string }, LiveSession> | null git: FieldQuery<{ branch: string path: string repo: string username: string }, Git> | null githubOrganizationRepos: ListQuery<{ organization: string page?: number perPage?: number sort?: UserRepoSort }, GithubRepo> githubRepo: FieldQuery<{ owner: string repo: string }, GithubRepo> | null limits: Limits me: CurrentUser | null project: FieldQuery<{ gitProvider?: GitProvider owner: string repo: string team?: string }, Project> | null projects: ListQuery<{ name: string owner: string provider: GitProvider }, Project> recentTeamsByRepository: ListQuery<{ name: string owner: string provider: GitProvider }, TeamPreview> sandbox: FieldQuery<{ sandboxId: string }, Sandbox> | null sandboxEligibleWorkspace: FieldQuery<{ sandboxId: string }, TeamPreview> | null teamByToken: FieldQuery<{ inviteToken: string }, TeamPreview> | null } export type RootSubscriptionType = { __typename: "RootSubscriptionType" branchEvents: FieldQuery<{ branchName: string owner: string repo: string }, BranchEvent> collaboratorAdded: FieldQuery<{ sandboxId: string }, Collaborator> collaboratorChanged: FieldQuery<{ sandboxId: string }, Collaborator> collaboratorRemoved: FieldQuery<{ sandboxId: string }, Collaborator> commentAdded: FieldQuery<{ sandboxId: string }, Comment> commentChanged: FieldQuery<{ sandboxId: string }, Comment> commentRemoved: FieldQuery<{ sandboxId: string }, Comment> githubEvents: FieldQuery<{ owner: string repo: string }, RepositoryEvent> invitationChanged: FieldQuery<{ sandboxId: string }, Invitation> invitationCreated: FieldQuery<{ sandboxId: string }, Invitation> invitationRemoved: FieldQuery<{ sandboxId: string }, Invitation> liveSessionEvents: FieldQuery<{ vmId: string }, LiveSessionEvent> projectCommits: FieldQuery<{ branchId?: string owner: string repo: string }, BranchLastCommit> projectConnections: FieldQuery<{ branchId?: string owner: string repo: string }, BranchConnections> projectEvents: FieldQuery<{ owner: string repo: string }, ProjectEvent> projectStatus: FieldQuery<{ branchId?: string owner: string repo: string }, BranchStatus> sandboxChanged: FieldQuery<{ sandboxId: string }, Sandbox> teamEvents: FieldQuery<{ teamId?: string }, TeamEvent> } export type Sandbox = { __typename: "Sandbox" alias: string | null alwaysOn: boolean | null author: User | null authorId: string | null authorization: Authorization baseGit: Git | null collaborators: ListField<Collaborator> collection: Collection | null comment: FieldQuery<{ commentId: string }, Comment> | null comments: ListField<Comment> customTemplate: Template | null description: string | null draft: boolean forkCount: number forkedTemplate: Template | null git: Git | null id: string insertedAt: string invitations: ListField<Invitation> isFrozen: boolean isSse: boolean | null isV2: boolean lastAccessedAt: string likeCount: number originalGit: Git | null permissions: SandboxProtectionSettings | null prNumber: number | null privacy: number removedAt: string | null restricted: boolean screenshotOutdated: boolean screenshotUrl: string | null settings: SandboxSettings source: Source team: TeamPreview | null teamId: string | null title: string | null updatedAt: string viewCount: number } export type SandboxProtectionSettings = { __typename: "SandboxProtectionSettings" preventSandboxExport: boolean preventSandboxLeaving: boolean } export type SandboxSettings = { __typename: "SandboxSettings" aiConsent: boolean | null } export type Source = { __typename: "Source" id: string | null template: string | null } export type Status = { __typename: "Status" hasChanges: boolean hasConflicts: boolean remote: StatusCommitCounts target: StatusCommitCounts } export type StatusCommitCounts = { __typename: "StatusCommitCounts" ahead: number behind: number } export enum SubscriptionInterval { MONTHLY = "MONTHLY", YEARLY = "YEARLY" } export type SubscriptionItem = { __typename: "SubscriptionItem" name: string quantity: number | null unitAmount: number | null unitAmountDecimal: string | null } export enum SubscriptionOrigin { LEGACY = "LEGACY", PATRON = "PATRON", PILOT = "PILOT" } export enum SubscriptionPaymentProvider { STRIPE = "STRIPE" } export type SubscriptionSchedule = { __typename: "SubscriptionSchedule" billingInterval: SubscriptionInterval | null current: SubscriptionSchedulePhase | null upcoming: SubscriptionSchedulePhase | null } export type SubscriptionSchedulePhase = { __typename: "SubscriptionSchedulePhase" endDate: string | null items: ListField<SubscriptionItem> startDate: string | null } export enum SubscriptionStatus { ACTIVE = "ACTIVE", CANCELLED = "CANCELLED", INCOMPLETE = "INCOMPLETE", INCOMPLETE_EXPIRED = "INCOMPLETE_EXPIRED", PAUSED = "PAUSED", TRIALING = "TRIALING", UNKNOWN = "UNKNOWN", UNPAID = "UNPAID" } export enum SubscriptionType { PERSONAL_PRO = "PERSONAL_PRO", TEAM_PRO = "TEAM_PRO" } export enum SubscriptionUpdateMoment { IMMEDIATELY = "IMMEDIATELY", NEXT_BILL_DATE = "NEXT_BILL_DATE" } export type Team = { __typename: "Team" avatarUrl: string | null bookmarkedTemplates: ListField<Template> collections: ListField<Collection> creatorId: string | null description: string | null drafts: ListQuery<{ authorId?: string limit?: number orderBy?: OrderBy }, Sandbox> featureFlags: TeamFeatureFlags frozen: boolean id: string insertedAt: string inviteToken: string invitees: ListField<User> joinedPilotAt: string | null legacy: boolean limits: TeamLimits members: ListField<TeamMember> metadata: TeamMetadata name: string privateRegistry: PrivateRegistry | null projects: ListQuery<{ syncData?: boolean }, Project> sandboxes: ListQuery<{ alwaysOn?: boolean authorId?: string hasOriginalGit?: boolean limit?: number orderBy?: OrderBy showDeleted?: boolean }, Sandbox> settings: WorkspaceSandboxSettings | null shortid: string subscription: FieldQuery<{ includeCancelled?: boolean }, ProSubscription> | null subscriptionSchedule: SubscriptionSchedule | null templates: ListField<Template> type: TeamType usage: TeamUsage userAuthorizations: ListField<UserAuthorization> users: ListField<User> } export type TeamAiConsent = { __typename: "TeamAiConsent" privateRepositories: boolean privateSandboxes: boolean publicRepositories: boolean publicSandboxes: boolean } export type TeamEvent = TeamSubscriptionEvent export type TeamFeatureFlags = { __typename: "TeamFeatureFlags" friendOfCsb: boolean ubbBeta: boolean } export type TeamLimits = { __typename: "TeamLimits" includedCredits: number includedDrafts: number includedMembers: number includedPrivateSandboxes: number includedPublicSandboxes: number includedSandboxes: number includedStorage: number includedVmTier: number maxEditors: number | null maxPrivateProjects: number | null maxPrivateSandboxes: number | null maxPublicProjects: number | null maxPublicSandboxes: number | null onDemandCreditLimit: number | null onDemandSpendingLimit: number | null } export type TeamMember = { __typename: "TeamMember" avatarUrl: string bio: string | null githubUsername: string | null id: string name: string | null username: string } export enum TeamMemberAuthorization { ADMIN = "ADMIN", READ = "READ", WRITE = "WRITE" } export type TeamMetadata = { __typename: "TeamMetadata" useCases: string[] } export type TeamMetadataInput = { useCases: string; } export type TeamPreview = { __typename: "TeamPreview" avatarUrl: string | null description: string | null id: string name: string shortid: string } export type TeamSubscriptionEvent = { __typename: "TeamSubscriptionEvent" event: string subscription: ProSubscription teamId: string } export enum TeamType { PERSONAL = "PERSONAL", TEAM = "TEAM" } export type TeamUsage = { __typename: "TeamUsage" credits: number editorsQuantity: number privateProjectsQuantity: number privateSandboxesQuantity: number publicProjectsQuantity: number publicSandboxesQuantity: number restrictedSandboxes: number sandboxes: number unrestrictedSandboxes: number } export type Template = { __typename: "Template" bookmarked: ListField<Bookmarked> color: string | null description: string | null iconUrl: string | null id: string | null insertedAt: string | null official: boolean published: boolean | null sandbox: Sandbox | null title: string | null updatedAt: string | null } export type User = { __typename: "User" avatarUrl: string bio: string | null id: string name: string | null personalWorkspaceId: string socialLinks: string[] username: string } export type UserAuthorization = { __typename: "UserAuthorization" authorization: TeamMemberAuthorization drafts: number teamManager: boolean userId: string } export type UserFeatureFlags = { __typename: "UserFeatureFlags" ubbBeta: boolean } export type UserReference = { userId: string; username: string; } export type UserReferenceMetadata = { __typename: "UserReferenceMetadata" userId: string username: string } export enum UserRepoAffiliation { COLLABORATOR = "COLLABORATOR", ORGANIZATION_MEMBER = "ORGANIZATION_MEMBER", OWNER = "OWNER" } export enum UserRepoSort { CREATED = "CREATED", FULL_NAME = "FULL_NAME", PUSHED = "PUSHED", UPDATED = "UPDATED" } export type WorkspaceSandboxSettings = { __typename: "WorkspaceSandboxSettings" aiConsent: TeamAiConsent defaultAuthorization: TeamMemberAuthorization minimumPrivacy: number preventSandboxExport: boolean preventSandboxLeaving: boolean } export type ObjectTypes = { Album: Album; BillingDetails: BillingDetails; BillingPreview: BillingPreview; Bookmarked: Bookmarked; Branch: Branch; BranchConnections: BranchConnections; BranchLastCommit: BranchLastCommit; BranchSettings: BranchSettings; BranchStatus: BranchStatus; CodeReferenceMetadata: CodeReferenceMetadata; Collaborator: Collaborator; Collection: Collection; Comment: Comment; Connection: Connection; CurrentUser: CurrentUser; Git: Git; GithubOrganization: GithubOrganization; GithubProfile: GithubProfile; GitHubPullRequestComment: GitHubPullRequestComment; GitHubPullRequestReviewComment: GitHubPullRequestReviewComment; GithubRepo: GithubRepo; GitHubRepository: GitHubRepository; GithubRequestedReviewer: GithubRequestedReviewer; GithubRequestedTeam: GithubRequestedTeam; ImageReferenceMetadata: ImageReferenceMetadata; InstallationEvent: InstallationEvent; Invitation: Invitation; InvoicePreview: InvoicePreview; LastCommit: LastCommit; Limits: Limits; LiveSession: LiveSession; LiveSessionEvent: LiveSessionEvent; LiveSessionGuest: LiveSessionGuest; LiveSessionHost: LiveSessionHost; Notification: Notification; NotificationPreferences: NotificationPreferences; PreviewReferenceMetadata: PreviewReferenceMetadata; PrivateRegistry: PrivateRegistry; Project: Project; ProjectSettings: ProjectSettings; ProSubscription: ProSubscription; PullRequest: PullRequest; PullRequestCommentEvent: PullRequestCommentEvent; PullRequestEvent: PullRequestEvent; PullRequestReview: PullRequestReview; PullRequestReviewCommentEvent: PullRequestReviewCommentEvent; PullRequestReviewEvent: PullRequestReviewEvent; Reference: Reference; Resources: Resources; RootMutationType: RootMutationType; RootQueryType: RootQueryType; RootSubscriptionType: RootSubscriptionType; Sandbox: Sandbox; SandboxProtectionSettings: SandboxProtectionSettings; SandboxSettings: SandboxSettings; Source: Source; Status: Status; StatusCommitCounts: StatusCommitCounts; SubscriptionItem: SubscriptionItem; SubscriptionSchedule: SubscriptionSchedule; SubscriptionSchedulePhase: SubscriptionSchedulePhase; Team: Team; TeamAiConsent: TeamAiConsent; TeamFeatureFlags: TeamFeatureFlags; TeamLimits: TeamLimits; TeamMember: TeamMember; TeamMetadata: TeamMetadata; TeamPreview: TeamPreview; TeamSubscriptionEvent: TeamSubscriptionEvent; TeamUsage: TeamUsage; Template: Template; User: User; UserAuthorization: UserAuthorization; UserFeatureFlags: UserFeatureFlags; UserReferenceMetadata: UserReferenceMetadata; WorkspaceSandboxSettings: WorkspaceSandboxSettings; } export const createQuery: < V extends Record<string, unknown> | void, T extends ResolveQueryDefinitions<RootQueryType> >( name: string, cb: T | ((variables: V) => T) ) => ( request: Requester, variables: V, { cacheQueries, includeTypeNames, }: { includeTypeNames: boolean; cacheQueries: boolean } ) => Promise<ResolveQuery<T, RootQueryType>> export const createMutation: < V extends Record<string, unknown> | void, T extends ResolveQueryDefinitions<RootMutationType> >( name: string, cb: T | ((variables: V) => T) ) => ( request: Requester, variables: V, { cacheQueries, includeTypeNames, }: { includeTypeNames: boolean; cacheQueries: boolean } ) => Promise<ResolveQuery<T, RootMutationType>> export const createSubscription: < V extends Record<string, unknown> | void, T extends ResolveQueryDefinitions<RootSubscriptionType> >( name: string, cb: T | ((variables: V) => T) ) => ( subscribe: Subscriber, onMessage: (message: ResolveQuery<T, RootSubscriptionType>) => void, variables: V, { cacheQueries, includeTypeNames, }: { includeTypeNames: boolean; cacheQueries: boolean } ) => () => void export const createClient: ({ onRequest, onSubscribe, includeTypeNames, cacheQueries, }: { onRequest: Requester; onSubscribe: Subscriber; includeTypeNames: boolean; cacheQueries: boolean; }) => { query: ClientQuery; subscribe: ClientSubscribe; } export const fragments: { Album<T extends ResolveQueryDefinitions<Album>>(fragment: T): T & FragmentDataType<Album>, BillingDetails<T extends ResolveQueryDefinitions<BillingDetails>>(fragment: T): T & FragmentDataType<BillingDetails>, BillingPreview<T extends ResolveQueryDefinitions<BillingPreview>>(fragment: T): T & FragmentDataType<BillingPreview>, Bookmarked<T extends ResolveQueryDefinitions<Bookmarked>>(fragment: T): T & FragmentDataType<Bookmarked>, Branch<T extends ResolveQueryDefinitions<Branch>>(fragment: T): T & FragmentDataType<Branch>, BranchConnections<T extends ResolveQueryDefinitions<BranchConnections>>(fragment: T): T & FragmentDataType<BranchConnections>, BranchLastCommit<T extends ResolveQueryDefinitions<BranchLastCommit>>(fragment: T): T & FragmentDataType<BranchLastCommit>, BranchSettings<T extends ResolveQueryDefinitions<BranchSettings>>(fragment: T): T & FragmentDataType<BranchSettings>, BranchStatus<T extends ResolveQueryDefinitions<BranchStatus>>(fragment: T): T & FragmentDataType<BranchStatus>, CodeReferenceMetadata<T extends ResolveQueryDefinitions<CodeReferenceMetadata>>(fragment: T): T & FragmentDataType<CodeReferenceMetadata>, Collaborator<T extends ResolveQueryDefinitions<Collaborator>>(fragment: T): T & FragmentDataType<Collaborator>, Collection<T extends ResolveQueryDefinitions<Collection>>(fragment: T): T & FragmentDataType<Collection>, Comment<T extends ResolveQueryDefinitions<Comment>>(fragment: T): T & FragmentDataType<Comment>, Connection<T extends ResolveQueryDefinitions<Connection>>(fragment: T): T & FragmentDataType<Connection>, CurrentUser<T extends ResolveQueryDefinitions<CurrentUser>>(fragment: T): T & FragmentDataType<CurrentUser>, Git<T extends ResolveQueryDefinitions<Git>>(fragment: T): T & FragmentDataType<Git>, GithubOrganization<T extends ResolveQueryDefinitions<GithubOrganization>>(fragment: T): T & FragmentDataType<GithubOrganization>, GithubProfile<T extends ResolveQueryDefinitions<GithubProfile>>(fragment: T): T & FragmentDataType<GithubProfile>, GitHubPullRequestComment<T extends ResolveQueryDefinitions<GitHubPullRequestComment>>(fragment: T): T & FragmentDataType<GitHubPullRequestComment>, GitHubPullRequestReviewComment<T extends ResolveQueryDefinitions<GitHubPullRequestReviewComment>>(fragment: T): T & FragmentDataType<GitHubPullRequestReviewComment>, GithubRepo<T extends ResolveQueryDefinitions<GithubRepo>>(fragment: T): T & FragmentDataType<GithubRepo>, GitHubRepository<T extends ResolveQueryDefinitions<GitHubRepository>>(fragment: T): T & FragmentDataType<GitHubRepository>, GithubRequestedReviewer<T extends ResolveQueryDefinitions<GithubRequestedReviewer>>(fragment: T): T & FragmentDataType<GithubRequestedReviewer>, GithubRequestedTeam<T extends ResolveQueryDefinitions<GithubRequestedTeam>>(fragment: T): T & FragmentDataType<GithubRequestedTeam>, ImageReferenceMetadata<T extends ResolveQueryDefinitions<ImageReferenceMetadata>>(fragment: T): T & FragmentDataType<ImageReferenceMetadata>, InstallationEvent<T extends ResolveQueryDefinitions<InstallationEvent>>(fragment: T): T & FragmentDataType<InstallationEvent>, Invitation<T extends ResolveQueryDefinitions<Invitation>>(fragment: T): T & FragmentDataType<Invitation>, InvoicePreview<T extends ResolveQueryDefinitions<InvoicePreview>>(fragment: T): T & FragmentDataType<InvoicePreview>, LastCommit<T extends ResolveQueryDefinitions<LastCommit>>(fragment: T): T & FragmentDataType<LastCommit>, Limits<T extends ResolveQueryDefinitions<Limits>>(fragment: T): T & FragmentDataType<Limits>, LiveSession<T extends ResolveQueryDefinitions<LiveSession>>(fragment: T): T & FragmentDataType<LiveSession>, LiveSessionEvent<T extends ResolveQueryDefinitions<LiveSessionEvent>>(fragment: T): T & FragmentDataType<LiveSessionEvent>, LiveSessionGuest<T extends ResolveQueryDefinitions<LiveSessionGuest>>(fragment: T): T & FragmentDataType<LiveSessionGuest>, LiveSessionHost<T extends ResolveQueryDefinitions<LiveSessionHost>>(fragment: T): T & FragmentDataType<LiveSessionHost>, Notification<T extends ResolveQueryDefinitions<Notification>>(fragment: T): T & FragmentDataType<Notification>, NotificationPreferences<T extends ResolveQueryDefinitions<NotificationPreferences>>(fragment: T): T & FragmentDataType<NotificationPreferences>, PreviewReferenceMetadata<T extends ResolveQueryDefinitions<PreviewReferenceMetadata>>(fragment: T): T & FragmentDataType<PreviewReferenceMetadata>, PrivateRegistry<T extends ResolveQueryDefinitions<PrivateRegistry>>(fragment: T): T & FragmentDataType<PrivateRegistry>, Project<T extends ResolveQueryDefinitions<Project>>(fragment: T): T & FragmentDataType<Project>, ProjectSettings<T extends ResolveQueryDefinitions<ProjectSettings>>(fragment: T): T & FragmentDataType<ProjectSettings>, ProSubscription<T extends ResolveQueryDefinitions<ProSubscription>>(fragment: T): T & FragmentDataType<ProSubscription>, PullRequest<T extends ResolveQueryDefinitions<PullRequest>>(fragment: T): T & FragmentDataType<PullRequest>, PullRequestCommentEvent<T extends ResolveQueryDefinitions<PullRequestCommentEvent>>(fragment: T): T & FragmentDataType<PullRequestCommentEvent>, PullRequestEvent<T extends ResolveQueryDefinitions<PullRequestEvent>>(fragment: T): T & FragmentDataType<PullRequestEvent>, PullRequestReview<T extends ResolveQueryDefinitions<PullRequestReview>>(fragment: T): T & FragmentDataType<PullRequestReview>, PullRequestReviewCommentEvent<T extends ResolveQueryDefinitions<PullRequestReviewCommentEvent>>(fragment: T): T & FragmentDataType<PullRequestReviewCommentEvent>, PullRequestReviewEvent<T extends