/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
import { projectsAddProjectDomain } from "../funcs/projectsAddProjectDomain.js";
import { projectsCreateProject } from "../funcs/projectsCreateProject.js";
import { projectsCreateProjectEnv } from "../funcs/projectsCreateProjectEnv.js";
import { projectsDeleteProject } from "../funcs/projectsDeleteProject.js";
import { projectsEditProjectEnv } from "../funcs/projectsEditProjectEnv.js";
import { projectsFilterProjectEnvs } from "../funcs/projectsFilterProjectEnvs.js";
import { projectsGetProjectDomain } from "../funcs/projectsGetProjectDomain.js";
import { projectsGetProjectDomains } from "../funcs/projectsGetProjectDomains.js";
import { projectsGetProjectEnv } from "../funcs/projectsGetProjectEnv.js";
import { projectsGetProjects } from "../funcs/projectsGetProjects.js";
import { projectsListPromoteAliases } from "../funcs/projectsListPromoteAliases.js";
import { projectsRemoveProjectDomain } from "../funcs/projectsRemoveProjectDomain.js";
import { projectsRemoveProjectEnv } from "../funcs/projectsRemoveProjectEnv.js";
import { projectsRequestPromote } from "../funcs/projectsRequestPromote.js";
import { projectsUpdateProject } from "../funcs/projectsUpdateProject.js";
import { projectsUpdateProjectDataCache } from "../funcs/projectsUpdateProjectDataCache.js";
import { projectsUpdateProjectDomain } from "../funcs/projectsUpdateProjectDomain.js";
import { projectsUpdateProjectProtectionBypass } from "../funcs/projectsUpdateProjectProtectionBypass.js";
import { projectsVerifyProjectDomain } from "../funcs/projectsVerifyProjectDomain.js";
import { ClientSDK } from "../lib/sdks.js";
import { unwrapAsync } from "../types/fp.js";
export class Projects extends ClientSDK {
    /**
     * Update the data cache feature
     *
     * @remarks
     * Update the data cache feature on a project.
     */
    async updateProjectDataCache(request, options) {
        return unwrapAsync(projectsUpdateProjectDataCache(this, request, options));
    }
    /**
     * Retrieve a list of projects
     *
     * @remarks
     * Allows to retrieve the list of projects of the authenticated user or team. The list will be paginated and the provided query parameters allow filtering the returned projects.
     */
    async getProjects(request, options) {
        return unwrapAsync(projectsGetProjects(this, request, options));
    }
    /**
     * Create a new project
     *
     * @remarks
     * Allows to create a new project with the provided configuration. It only requires the project `name` but more configuration can be provided to override the defaults.
     */
    async createProject(request, options) {
        return unwrapAsync(projectsCreateProject(this, request, options));
    }
    /**
     * Update an existing project
     *
     * @remarks
     * Update the fields of a project using either its `name` or `id`.
     */
    async updateProject(request, options) {
        return unwrapAsync(projectsUpdateProject(this, request, options));
    }
    /**
     * Delete a Project
     *
     * @remarks
     * Delete a specific project by passing either the project `id` or `name` in the URL.
     */
    async deleteProject(request, options) {
        return unwrapAsync(projectsDeleteProject(this, request, options));
    }
    /**
     * Retrieve project domains by project by id or name
     *
     * @remarks
     * Retrieve the domains associated with a given project by passing either the project `id` or `name` in the URL.
     */
    async getProjectDomains(request, options) {
        return unwrapAsync(projectsGetProjectDomains(this, request, options));
    }
    /**
     * Get a project domain
     *
     * @remarks
     * Get project domain by project id/name and domain name.
     */
    async getProjectDomain(request, options) {
        return unwrapAsync(projectsGetProjectDomain(this, request, options));
    }
    /**
     * Update a project domain
     *
     * @remarks
     * Update a project domain's configuration, including the name, git branch and redirect of the domain.
     */
    async updateProjectDomain(request, options) {
        return unwrapAsync(projectsUpdateProjectDomain(this, request, options));
    }
    /**
     * Remove a domain from a project
     *
     * @remarks
     * Remove a domain from a project by passing the domain name and by specifying the project by either passing the project `id` or `name` in the URL.
     */
    async removeProjectDomain(request, options) {
        return unwrapAsync(projectsRemoveProjectDomain(this, request, options));
    }
    /**
     * Add a domain to a project
     *
     * @remarks
     * Add a domain to the project by passing its domain name and by specifying the project by either passing the project `id` or `name` in the URL. If the domain is not yet verified to be used on this project, the request will return `verified = false`, and the domain will need to be verified according to the `verification` challenge via `POST /projects/:idOrName/domains/:domain/verify`. If the domain already exists on the project, the request will fail with a `400` status code.
     */
    async addProjectDomain(request, options) {
        return unwrapAsync(projectsAddProjectDomain(this, request, options));
    }
    /**
     * Verify project domain
     *
     * @remarks
     * Attempts to verify a project domain with `verified = false` by checking the correctness of the project domain's `verification` challenge.
     */
    async verifyProjectDomain(request, options) {
        return unwrapAsync(projectsVerifyProjectDomain(this, request, options));
    }
    /**
     * Retrieve the environment variables of a project by id or name
     *
     * @remarks
     * Retrieve the environment variables for a given project by passing either the project `id` or `name` in the URL.
     */
    async filterProjectEnvs(request, options) {
        return unwrapAsync(projectsFilterProjectEnvs(this, request, options));
    }
    /**
     * Retrieve the decrypted value of an environment variable of a project by id
     *
     * @remarks
     * Retrieve the environment variable for a given project.
     */
    async getProjectEnv(request, options) {
        return unwrapAsync(projectsGetProjectEnv(this, request, options));
    }
    /**
     * Create one or more environment variables
     *
     * @remarks
     * Create one or more environment variables for a project by passing its `key`, `value`, `type` and `target` and by specifying the project by either passing the project `id` or `name` in the URL. If you include `upsert=true` as a query parameter, a new environment variable will not be created if it already exists but, the existing variable's value will be updated.
     */
    async createProjectEnv(request, options) {
        return unwrapAsync(projectsCreateProjectEnv(this, request, options));
    }
    /**
     * Remove an environment variable
     *
     * @remarks
     * Delete a specific environment variable for a given project by passing the environment variable identifier and either passing the project `id` or `name` in the URL.
     */
    async removeProjectEnv(request, options) {
        return unwrapAsync(projectsRemoveProjectEnv(this, request, options));
    }
    /**
     * Edit an environment variable
     *
     * @remarks
     * Edit a specific environment variable for a given project by passing the environment variable identifier and either passing the project `id` or `name` in the URL.
     */
    async editProjectEnv(request, options) {
        return unwrapAsync(projectsEditProjectEnv(this, request, options));
    }
    /**
     * Update Protection Bypass for Automation
     *
     * @remarks
     * Update the deployment protection automation bypass for a project
     */
    async updateProjectProtectionBypass(request, options) {
        return unwrapAsync(projectsUpdateProjectProtectionBypass(this, request, options));
    }
    /**
     * Points all production domains for a project to the given deploy
     *
     * @remarks
     * Allows users to promote a deployment to production. Note: This does NOT rebuild the deployment. If you need that, then call create-deployments endpoint.
     */
    async requestPromote(request, options) {
        return unwrapAsync(projectsRequestPromote(this, request, options));
    }
    /**
     * Gets a list of aliases with status for the current promote
     *
     * @remarks
     * Get a list of aliases related to the last promote request with their mapping status
     */
    async listPromoteAliases(request, options) {
        return unwrapAsync(projectsListPromoteAliases(this, request, options));
    }
}
//# sourceMappingURL=projects.js.map