import * as Schema from "effect/Schema";
import { API } from "../client.js";
import * as T from "../traits.js";
const __document = "mutation build($buildId: ID) {\n  build(buildId: $buildId) {\n    cancel {\n      activityTimestamp\n      actor {\n        created\n        displayName\n        firstName\n        id\n        isExpoAdmin\n        lastDeletionAttemptTime\n      }\n      app {\n        appStoreUrl\n        assetLimitPerUpdateGroup\n        buildProfiles\n        buildsReleaseChannels\n        description\n        environmentVariableEnvironments\n        fullName\n        githubUrl\n        iconUrl\n        id\n        internalDistributionBuildPrivacy\n        isDeleting\n        isDeprecated\n        isLikedByMe\n        lastDeletionAttemptTime\n        lastPublishedTime\n        latestActivity\n        latestReleaseId\n        likeCount\n        name\n        packageName\n        packageUsername\n        playStoreUrl\n        privacy\n        privacySetting\n        published\n        pushSecurityEnabled\n        releaseChannels\n        requiresAccessTokenForPushSecurity\n        resourceClassExperiment\n        scopeKey\n        sdkVersion\n        slug\n        suggestedDevDomainName\n        trendScore\n        updated\n        username\n      }\n      appBuildVersion\n      appIdentifier\n      appVersion\n      artifacts {\n        applicationArchiveUrl\n        buildArtifactsUrl\n        buildUrl\n        fingerprintUrl\n        xcodeBuildLogsUrl\n      }\n      buildMode\n      buildProfile\n      cancelingActor {\n        created\n        displayName\n        firstName\n        id\n        isExpoAdmin\n        lastDeletionAttemptTime\n      }\n      channel\n      cliVersion\n      completedAt\n      createdAt\n      customNodeVersion\n      customWorkflowName\n      deployment {\n        id\n      }\n      developmentClient\n      distribution\n      enqueuedAt\n      error {\n        buildPhase\n        docsUrl\n        errorCode\n        message\n      }\n      estimatedWaitTimeLeftSeconds\n      expirationDate\n      fingerprint {\n        buildCount\n        createdAt\n        debugInfoUrl\n        hash\n        id\n        updateCount\n        updatedAt\n      }\n      gitCommitHash\n      gitCommitMessage\n      gitRef\n      githubRepositoryOwnerAndName\n      id\n      initialQueuePosition\n      initiatingActor {\n        created\n        displayName\n        firstName\n        id\n        isExpoAdmin\n        lastDeletionAttemptTime\n      }\n      iosEnterpriseProvisioning\n      isForIosSimulator\n      isGitWorkingTreeDirty\n      isWaived\n      logFiles\n      maxBuildTimeSeconds\n      maxRetryTimeMinutes\n      message\n      metrics {\n        buildDuration\n        buildQueueTime\n        buildWaitTime\n      }\n      platform\n      priority\n      project {\n        description\n        fullName\n        iconUrl\n        id\n        name\n        published\n        slug\n        updated\n        username\n      }\n      projectMetadataFileUrl\n      projectRootDirectory\n      provisioningStartedAt\n      queuePosition\n      reactNativeVersion\n      releaseChannel\n      requiredPackageManager\n      resolvedEnvironment\n      resourceClass\n      resourceClassDisplayName\n      runFromCI\n      runtime {\n        createdAt\n        firstBuildCreatedAt\n        id\n        isFingerprint\n        updatedAt\n        version\n      }\n      runtimeVersion\n      sdkVersion\n      selectedImage\n      status\n      submissions {\n        activityTimestamp\n        archiveUrl\n        canRetry\n        completedAt\n        createdAt\n        id\n        logFiles\n        logsUrl\n        maxRetryTimeMinutes\n        platform\n        priority\n        status\n        updatedAt\n      }\n      updateChannel {\n        appId\n        branchMapping\n        createdAt\n        id\n        isPaused\n        lastDeletionAttemptTime\n        name\n        updatedAt\n      }\n      updatedAt\n      waiverType\n      workerStartedAt\n      workflowJob {\n        createdAt\n        environment\n        id\n        key\n        name\n        outputs\n        requiredJobKeys\n        status\n        type\n        updatedAt\n      }\n    }\n  }\n}";
// Input Schema (GraphQL variables)
export const BuildInput = Schema.Struct({
    buildId: Schema.optional(Schema.NullOr(Schema.String)),
}).pipe(T.Http({ method: "POST", path: "/graphql" }), T.GraphQLOp({
    query: __document,
    operationName: "build",
    type: "mutation",
}));
// Output Schema (GraphQL selection set)
export const BuildOutput = Schema.Struct({
    cancel: Schema.Struct({
        activityTimestamp: Schema.String,
        actor: Schema.NullOr(Schema.Struct({
            created: Schema.String,
            displayName: Schema.String,
            firstName: Schema.NullOr(Schema.String),
            id: Schema.String,
            isExpoAdmin: Schema.Boolean,
            lastDeletionAttemptTime: Schema.NullOr(Schema.String),
        })),
        app: Schema.Struct({
            appStoreUrl: Schema.NullOr(Schema.String),
            assetLimitPerUpdateGroup: Schema.Number,
            buildProfiles: Schema.Array(Schema.String),
            buildsReleaseChannels: Schema.Array(Schema.String),
            description: Schema.String,
            environmentVariableEnvironments: Schema.Array(Schema.Unknown),
            fullName: Schema.String,
            githubUrl: Schema.NullOr(Schema.String),
            iconUrl: Schema.NullOr(Schema.String),
            id: Schema.String,
            internalDistributionBuildPrivacy: Schema.Literals(["PRIVATE", "PUBLIC"]),
            isDeleting: Schema.Boolean,
            isDeprecated: Schema.Boolean,
            isLikedByMe: Schema.Boolean,
            lastDeletionAttemptTime: Schema.NullOr(Schema.String),
            lastPublishedTime: Schema.String,
            latestActivity: Schema.String,
            latestReleaseId: Schema.String,
            likeCount: Schema.Number,
            name: Schema.String,
            packageName: Schema.String,
            packageUsername: Schema.String,
            playStoreUrl: Schema.NullOr(Schema.String),
            privacy: Schema.String,
            privacySetting: Schema.Literals(["HIDDEN", "PUBLIC", "UNLISTED"]),
            published: Schema.Boolean,
            pushSecurityEnabled: Schema.Boolean,
            releaseChannels: Schema.Array(Schema.String),
            requiresAccessTokenForPushSecurity: Schema.Boolean,
            resourceClassExperiment: Schema.NullOr(Schema.Literals(["C3D", "N2"])),
            scopeKey: Schema.String,
            sdkVersion: Schema.String,
            slug: Schema.String,
            suggestedDevDomainName: Schema.String,
            trendScore: Schema.Number,
            updated: Schema.String,
            username: Schema.String,
        }),
        appBuildVersion: Schema.NullOr(Schema.String),
        appIdentifier: Schema.NullOr(Schema.String),
        appVersion: Schema.NullOr(Schema.String),
        artifacts: Schema.NullOr(Schema.Struct({
            applicationArchiveUrl: Schema.NullOr(Schema.String),
            buildArtifactsUrl: Schema.NullOr(Schema.String),
            buildUrl: Schema.NullOr(Schema.String),
            fingerprintUrl: Schema.NullOr(Schema.String),
            xcodeBuildLogsUrl: Schema.NullOr(Schema.String),
        })),
        buildMode: Schema.NullOr(Schema.Literals(["BUILD", "CUSTOM", "LOCAL", "REPACK", "RESIGN"])),
        buildProfile: Schema.NullOr(Schema.String),
        cancelingActor: Schema.NullOr(Schema.Struct({
            created: Schema.String,
            displayName: Schema.String,
            firstName: Schema.NullOr(Schema.String),
            id: Schema.String,
            isExpoAdmin: Schema.Boolean,
            lastDeletionAttemptTime: Schema.NullOr(Schema.String),
        })),
        channel: Schema.NullOr(Schema.String),
        cliVersion: Schema.NullOr(Schema.String),
        completedAt: Schema.NullOr(Schema.String),
        createdAt: Schema.String,
        customNodeVersion: Schema.NullOr(Schema.String),
        customWorkflowName: Schema.NullOr(Schema.String),
        deployment: Schema.NullOr(Schema.Struct({
            id: Schema.String,
        })),
        developmentClient: Schema.NullOr(Schema.Boolean),
        distribution: Schema.NullOr(Schema.Literals(["INTERNAL", "SIMULATOR", "STORE"])),
        enqueuedAt: Schema.NullOr(Schema.String),
        error: Schema.NullOr(Schema.Struct({
            buildPhase: Schema.NullOr(Schema.Literals([
                "BUILDER_INFO",
                "CACHE_STATS",
                "CALCULATE_EXPO_UPDATES_RUNTIME_VERSION",
                "CLEAN_UP_CREDENTIALS",
                "COMPLETE_BUILD",
                "COMPLETE_JOB",
                "CONFIGURE_ANDROID_VERSION",
                "CONFIGURE_EXPO_UPDATES",
                "CONFIGURE_XCODE_PROJECT",
                "CUSTOM",
                "DOWNLOAD_APPLICATION_ARCHIVE",
                "EAGER_BUNDLE",
                "EAS_BUILD_INTERNAL",
                "FAIL_BUILD",
                "FIX_GRADLEW",
                "INSTALL_CUSTOM_TOOLS",
                "INSTALL_DEPENDENCIES",
                "INSTALL_PODS",
                "ON_BUILD_CANCEL_HOOK",
                "ON_BUILD_COMPLETE_HOOK",
                "ON_BUILD_ERROR_HOOK",
                "ON_BUILD_SUCCESS_HOOK",
                "PARSE_CUSTOM_WORKFLOW_CONFIG",
                "POST_INSTALL_HOOK",
                "PREBUILD",
                "PREPARE_ARTIFACTS",
                "PREPARE_CREDENTIALS",
                "PREPARE_PROJECT",
                "PRE_INSTALL_HOOK",
                "PRE_UPLOAD_ARTIFACTS_HOOK",
                "QUEUE",
                "READ_APP_CONFIG",
                "READ_EAS_JSON",
                "READ_PACKAGE_JSON",
                "RESTORE_CACHE",
                "RUN_EXPO_DOCTOR",
                "RUN_FASTLANE",
                "RUN_GRADLEW",
                "SAVE_CACHE",
                "SET_UP_BUILD_ENVIRONMENT",
                "SPIN_UP_BUILDER",
                "START_BUILD",
                "UNKNOWN",
                "UPLOAD_APPLICATION_ARCHIVE",
                "UPLOAD_ARTIFACTS",
                "UPLOAD_BUILD_ARTIFACTS",
            ])),
            docsUrl: Schema.NullOr(Schema.String),
            errorCode: Schema.String,
            message: Schema.String,
        })),
        estimatedWaitTimeLeftSeconds: Schema.NullOr(Schema.Number),
        expirationDate: Schema.NullOr(Schema.String),
        fingerprint: Schema.NullOr(Schema.Struct({
            buildCount: Schema.Number,
            createdAt: Schema.String,
            debugInfoUrl: Schema.NullOr(Schema.String),
            hash: Schema.String,
            id: Schema.String,
            updateCount: Schema.Number,
            updatedAt: Schema.String,
        })),
        gitCommitHash: Schema.NullOr(Schema.String),
        gitCommitMessage: Schema.NullOr(Schema.String),
        gitRef: Schema.NullOr(Schema.String),
        githubRepositoryOwnerAndName: Schema.NullOr(Schema.String),
        id: Schema.String,
        initialQueuePosition: Schema.NullOr(Schema.Number),
        initiatingActor: Schema.NullOr(Schema.Struct({
            created: Schema.String,
            displayName: Schema.String,
            firstName: Schema.NullOr(Schema.String),
            id: Schema.String,
            isExpoAdmin: Schema.Boolean,
            lastDeletionAttemptTime: Schema.NullOr(Schema.String),
        })),
        iosEnterpriseProvisioning: Schema.NullOr(Schema.Literals(["ADHOC", "UNIVERSAL"])),
        isForIosSimulator: Schema.Boolean,
        isGitWorkingTreeDirty: Schema.NullOr(Schema.Boolean),
        isWaived: Schema.Boolean,
        logFiles: Schema.Array(Schema.String),
        maxBuildTimeSeconds: Schema.Number,
        maxRetryTimeMinutes: Schema.NullOr(Schema.Number),
        message: Schema.NullOr(Schema.String),
        metrics: Schema.NullOr(Schema.Struct({
            buildDuration: Schema.NullOr(Schema.Number),
            buildQueueTime: Schema.NullOr(Schema.Number),
            buildWaitTime: Schema.NullOr(Schema.Number),
        })),
        platform: Schema.Literals(["ANDROID", "IOS"]),
        priority: Schema.Literals(["HIGH", "NORMAL", "NORMAL_PLUS"]),
        project: Schema.Struct({
            description: Schema.String,
            fullName: Schema.String,
            iconUrl: Schema.NullOr(Schema.String),
            id: Schema.String,
            name: Schema.String,
            published: Schema.Boolean,
            slug: Schema.String,
            updated: Schema.String,
            username: Schema.String,
        }),
        projectMetadataFileUrl: Schema.NullOr(Schema.String),
        projectRootDirectory: Schema.NullOr(Schema.String),
        provisioningStartedAt: Schema.NullOr(Schema.String),
        queuePosition: Schema.NullOr(Schema.Number),
        reactNativeVersion: Schema.NullOr(Schema.String),
        releaseChannel: Schema.NullOr(Schema.String),
        requiredPackageManager: Schema.NullOr(Schema.String),
        resolvedEnvironment: Schema.NullOr(Schema.Unknown),
        resourceClass: Schema.Literals([
            "ANDROID_DEFAULT",
            "ANDROID_LARGE",
            "ANDROID_MEDIUM",
            "IOS_DEFAULT",
            "IOS_INTEL_LARGE",
            "IOS_INTEL_MEDIUM",
            "IOS_LARGE",
            "IOS_M1_LARGE",
            "IOS_M1_MEDIUM",
            "IOS_MEDIUM",
            "IOS_M_LARGE",
            "IOS_M_MEDIUM",
            "LEGACY",
            "LINUX_LARGE",
            "LINUX_MEDIUM",
        ]),
        resourceClassDisplayName: Schema.String,
        runFromCI: Schema.NullOr(Schema.Boolean),
        runtime: Schema.NullOr(Schema.Struct({
            createdAt: Schema.String,
            firstBuildCreatedAt: Schema.NullOr(Schema.String),
            id: Schema.String,
            isFingerprint: Schema.Boolean,
            updatedAt: Schema.String,
            version: Schema.String,
        })),
        runtimeVersion: Schema.NullOr(Schema.String),
        sdkVersion: Schema.NullOr(Schema.String),
        selectedImage: Schema.NullOr(Schema.String),
        status: Schema.Literals([
            "CANCELED",
            "ERRORED",
            "FINISHED",
            "IN_PROGRESS",
            "IN_QUEUE",
            "NEW",
            "PENDING_CANCEL",
        ]),
        submissions: Schema.Array(Schema.Struct({
            activityTimestamp: Schema.String,
            archiveUrl: Schema.NullOr(Schema.String),
            canRetry: Schema.Boolean,
            completedAt: Schema.NullOr(Schema.String),
            createdAt: Schema.String,
            id: Schema.String,
            logFiles: Schema.Array(Schema.String),
            logsUrl: Schema.NullOr(Schema.String),
            maxRetryTimeMinutes: Schema.Number,
            platform: Schema.Literals(["ANDROID", "IOS"]),
            priority: Schema.NullOr(Schema.Literals(["HIGH", "NORMAL"])),
            status: Schema.Literals([
                "AWAITING_BUILD",
                "CANCELED",
                "ERRORED",
                "FINISHED",
                "IN_PROGRESS",
                "IN_QUEUE",
            ]),
            updatedAt: Schema.String,
        })),
        updateChannel: Schema.NullOr(Schema.Struct({
            appId: Schema.String,
            branchMapping: Schema.String,
            createdAt: Schema.String,
            id: Schema.String,
            isPaused: Schema.Boolean,
            lastDeletionAttemptTime: Schema.NullOr(Schema.String),
            name: Schema.String,
            updatedAt: Schema.String,
        })),
        updatedAt: Schema.String,
        waiverType: Schema.NullOr(Schema.Literals(["FAST_FAILED_BUILD", "SYSTEM_ERROR"])),
        workerStartedAt: Schema.NullOr(Schema.String),
        workflowJob: Schema.NullOr(Schema.Struct({
            createdAt: Schema.String,
            environment: Schema.NullOr(Schema.String),
            id: Schema.String,
            key: Schema.String,
            name: Schema.String,
            outputs: Schema.Unknown,
            requiredJobKeys: Schema.Array(Schema.String),
            status: Schema.Literals([
                "ACTION_REQUIRED",
                "CANCELED",
                "FAILURE",
                "IN_PROGRESS",
                "NEW",
                "PENDING_CANCEL",
                "SKIPPED",
                "SUCCESS",
            ]),
            type: Schema.Literals([
                "APPLE_DEVICE_REGISTRATION_REQUEST",
                "BUILD",
                "CUSTOM",
                "DEPLOY",
                "DOC",
                "FINGERPRINT",
                "GET_BUILD",
                "GITHUB_COMMENT",
                "MAESTRO_CLOUD",
                "MAESTRO_TEST",
                "REPACK",
                "REQUIRE_APPROVAL",
                "SLACK",
                "SUBMISSION",
                "TESTFLIGHT",
                "UPDATE",
            ]),
            updatedAt: Schema.String,
        })),
    }),
}).pipe(T.ResponsePath("build"));
/**
 * Mutations that modify an EAS Build
 */
export const build = API.make(() => ({
    inputSchema: BuildInput,
    outputSchema: BuildOutput,
}));
//# sourceMappingURL=build.js.map