/*
 * 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("Integrations Get Configuration", async () => {
    const testHttpClient = createTestHTTPClient("getConfiguration");
    const vercel = new Vercel({
        serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
        httpClient: testHttpClient,
        bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
    });
    const result = await vercel.integrations.getConfiguration({
        id: "icfg_cuwj0AdCdH3BwWT4LPijCC7t",
        teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
        slug: "my-team-url-slug",
    });
    expect(result).toBeDefined();
});
test("Integrations Delete Configuration", async () => {
    const testHttpClient = createTestHTTPClient("deleteConfiguration");
    const vercel = new Vercel({
        serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
        httpClient: testHttpClient,
        bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
    });
    await vercel.integrations.deleteConfiguration({
        id: "<id>",
        teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
        slug: "my-team-url-slug",
    });
});
test("Integrations Get Configuration Products", async () => {
    const testHttpClient = createTestHTTPClient("getConfigurationProducts");
    const vercel = new Vercel({
        serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
        httpClient: testHttpClient,
        bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
    });
    const result = await vercel.integrations.getConfigurationProducts({
        id: "icfg_cuwj0AdCdH3BwWT4LPijCC7t",
        teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
        slug: "my-team-url-slug",
    });
    expect(result).toBeDefined();
    expect(result).toEqual({
        products: [],
        integration: {
            id: "<id>",
            slug: "<value>",
            name: "<value>",
        },
        configuration: {
            id: "<id>",
        },
    });
});
test("Integrations Create Integration Store Direct", async () => {
    const testHttpClient = createTestHTTPClient("createIntegrationStoreDirect");
    const vercel = new Vercel({
        serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
        httpClient: testHttpClient,
        bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
    });
    const result = await vercel.integrations.createIntegrationStoreDirect({
        teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
        slug: "my-team-url-slug",
        requestBody: {
            name: "my-dev-database",
            integrationConfigurationId: "icfg_cuwj0AdCdH3BwWT4LPijCC7t",
            integrationProductIdOrSlug: "iap_postgres_db",
            metadata: {
                "environment": "development",
                "project": "my-app",
                "tags": [
                    "database",
                    "postgres",
                ],
            },
            externalId: "dev-db-001",
            protocolSettings: {
                "experimentation": {
                    "edgeConfigSyncingEnabled": true,
                },
            },
            source: "api",
            billingPlanId: "bp_abc123def456",
            paymentMethodId: "pm_1AbcDefGhiJklMno",
            prepaymentAmountCents: 5000,
        },
    });
    expect(result).toBeDefined();
    expect(result).toEqual({
        store: {
            projectsMetadata: [
                {
                    id: "<id>",
                    projectId: "<id>",
                    name: "<value>",
                    environments: [],
                    envVarPrefix: "<value>",
                    environmentVariables: [
                        "<value 1>",
                        "<value 2>",
                    ],
                },
            ],
            usageQuotaExceeded: true,
            status: "available",
            externalResourceId: "<id>",
            product: {
                value: {
                    atBRANDAt8805: {},
                },
            },
            secrets: [],
        },
    });
});
test("Integrations Get Billing Plans", async () => {
    const testHttpClient = createTestHTTPClient("getBillingPlans");
    const vercel = new Vercel({
        serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
        httpClient: testHttpClient,
        bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
    });
    const result = await vercel.integrations.getBillingPlans({
        integrationIdOrSlug: "<value>",
        productIdOrSlug: "<value>",
        teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
        slug: "my-team-url-slug",
    });
    expect(result).toBeDefined();
    expect(result).toEqual({
        plans: [
            {
                type: "prepayment",
                description: "outside fatally ultimate limply upon especially hm jellyfish expostulate",
                id: "<id>",
                name: "<value>",
                scope: "installation",
                paymentMethodRequired: false,
            },
        ],
    });
});
//# sourceMappingURL=integrations.test.js.map