/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { expect, test } from "vitest"; import { Apideck } from "../index.js"; import { createTestHTTPClient } from "./testclient.js"; test("Customfields Vault Custom Fields All", async () => { const testHttpClient = createTestHTTPClient("vault.customFieldsAll"); const apideck = new Apideck({ serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", httpClient: testHttpClient, apiKey: process.env["APIDECK_API_KEY"] ?? "value", }); const result = await apideck.vault.customFields.list({ consumerId: "test-consumer", appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX", unifiedApi: "crm", serviceId: "pipedrive", resource: "leads", resourceId: "1234", }); expect(result.httpMeta.response.status).toBe(200); expect(result.getCustomFieldsResponse).toBeDefined(); expect(result.getCustomFieldsResponse).toEqual({ statusCode: 200, status: "OK", data: [ { id: "123456", name: "SSN", description: "Employee Level", value: "495172776", }, { id: "123456", name: "SSN", description: "Employee Level", value: "495172776", }, { id: "123456", name: "SSN", description: "Employee Level", value: "495172776", }, ], }); });