/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
import { expect, test } from "vitest";
import { Vercel } from "../index.js";
import { createTestHTTPClient } from "./testclient.js";
test("Environment Create Custom Environment", async () => {
    const testHttpClient = createTestHTTPClient("createCustomEnvironment");
    const vercel = new Vercel({
        serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
        httpClient: testHttpClient,
        bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
    });
    const result = await vercel.environment.createCustomEnvironment({
        idOrName: "<value>",
        teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
        slug: "my-team-url-slug",
    });
    expect(result).toBeDefined();
    expect(result).toEqual({
        id: "<id>",
        slug: "<value>",
        type: "production",
        createdAt: 7602.36,
        updatedAt: 6458.94,
    });
});
test("Environment Get /V9 /Projects/{id Or Name}/custom Environments", async () => {
    const testHttpClient = createTestHTTPClient("get_/v9/projects/{idOrName}/custom-environments");
    const vercel = new Vercel({
        serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
        httpClient: testHttpClient,
        bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
    });
    const result = await vercel.environment
        .getV9ProjectsIdOrNameCustomEnvironments({
        idOrName: "<value>",
        teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
        slug: "my-team-url-slug",
    });
    expect(result).toBeDefined();
    expect(result).toEqual({
        accountLimit: {
            total: 966.92,
        },
        environments: [],
    });
});
test("Environment Get Custom Environment", async () => {
    const testHttpClient = createTestHTTPClient("getCustomEnvironment");
    const vercel = new Vercel({
        serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
        httpClient: testHttpClient,
        bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
    });
    const result = await vercel.environment.getCustomEnvironment({
        idOrName: "<value>",
        environmentSlugOrId: "<id>",
        teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
        slug: "my-team-url-slug",
    });
    expect(result).toBeDefined();
    expect(result).toEqual({
        id: "<id>",
        slug: "<value>",
        type: "production",
        createdAt: 6942.59,
        updatedAt: 6821.31,
    });
});
test("Environment Update Custom Environment", async () => {
    const testHttpClient = createTestHTTPClient("updateCustomEnvironment");
    const vercel = new Vercel({
        serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
        httpClient: testHttpClient,
        bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
    });
    const result = await vercel.environment.updateCustomEnvironment({
        idOrName: "<value>",
        environmentSlugOrId: "<id>",
        teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
        slug: "my-team-url-slug",
    });
    expect(result).toBeDefined();
    expect(result).toEqual({
        id: "<id>",
        slug: "<value>",
        type: "production",
        createdAt: 6942.59,
        updatedAt: 6821.31,
    });
});
test("Environment Remove Custom Environment", async () => {
    const testHttpClient = createTestHTTPClient("removeCustomEnvironment");
    const vercel = new Vercel({
        serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
        httpClient: testHttpClient,
        bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
    });
    const result = await vercel.environment.removeCustomEnvironment({
        idOrName: "<value>",
        environmentSlugOrId: "<id>",
        teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
        slug: "my-team-url-slug",
    });
    expect(result).toBeDefined();
    expect(result).toEqual({
        id: "<id>",
        slug: "<value>",
        type: "development",
        createdAt: 9269.2,
        updatedAt: 4613.86,
    });
});
//# sourceMappingURL=environment.test.js.map