/*
 * 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("Certs Get Cert By Id", async () => {
    const testHttpClient = createTestHTTPClient("getCertById");
    const vercel = new Vercel({
        serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
        httpClient: testHttpClient,
        bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
    });
    const result = await vercel.certs.getCertById({
        id: "<id>",
        teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
        slug: "my-team-url-slug",
    });
    expect(result).toBeDefined();
    expect(result).toEqual({
        id: "<id>",
        createdAt: 227.12,
        expiresAt: 3995.77,
        autoRenew: false,
        cns: [
            "<value>",
        ],
    });
});
test("Certs Remove Cert", async () => {
    const testHttpClient = createTestHTTPClient("removeCert");
    const vercel = new Vercel({
        serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
        httpClient: testHttpClient,
        bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
    });
    const result = await vercel.certs.removeCert({
        id: "<id>",
        teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
        slug: "my-team-url-slug",
    });
    expect(result).toBeDefined();
    expect(result).toEqual({});
});
test("Certs Issue Cert", async () => {
    const testHttpClient = createTestHTTPClient("issueCert");
    const vercel = new Vercel({
        serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
        httpClient: testHttpClient,
        bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
    });
    const result = await vercel.certs.issueCert({
        teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
        slug: "my-team-url-slug",
        requestBody: {},
    });
    expect(result).toBeDefined();
    expect(result).toEqual({
        id: "<id>",
        createdAt: 1842.08,
        expiresAt: 8685.42,
        autoRenew: true,
        cns: [],
    });
});
test("Certs Upload Cert", async () => {
    const testHttpClient = createTestHTTPClient("uploadCert");
    const vercel = new Vercel({
        serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
        httpClient: testHttpClient,
        bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
    });
    const result = await vercel.certs.uploadCert({
        teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
        slug: "my-team-url-slug",
        requestBody: {
            ca: "<value>",
            key: "<key>",
            cert: "<value>",
        },
    });
    expect(result).toBeDefined();
    expect(result).toEqual({
        id: "<id>",
        createdAt: 9219.92,
        expiresAt: 5530.55,
        autoRenew: true,
        cns: [
            "<value>",
            "<value>",
        ],
    });
});
//# sourceMappingURL=certs.test.js.map