/* * 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("Apis Connector Apis All", async () => { const testHttpClient = createTestHTTPClient("connector.apisAll"); 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.connector.apis.list({ appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX", filter: { status: "beta", }, }); expect(result.httpMeta.response.status).toBe(200); expect(result.getApisResponse).toBeDefined(); expect(result.getApisResponse).toEqual({ statusCode: 200, status: "OK", data: [ { id: "file-storage", name: "File Storage API", description: "Manage API keys, access tokens, OAuth flows and integrations.", specUrl: "https://specs.apideck.com/file-storage.yml", apiReferenceUrl: "https://developers.apideck.com/apis/file-storage/reference", postmanCollectionId: "1311564-00e7266b-a3d6-4f40-b172-baaa66a3ed6f", categories: [ "files", "file-storage", "cloud-storage", "object-storage", ], resources: [ { id: "companies", name: "Companies", excludedFromCoverage: false, }, { id: "companies", name: "Companies", excludedFromCoverage: false, }, ], events: [ "crm.contact.updated", "accounting.invoice.created", ], }, { id: "file-storage", name: "File Storage API", description: "Manage API keys, access tokens, OAuth flows and integrations.", specUrl: "https://specs.apideck.com/file-storage.yml", apiReferenceUrl: "https://developers.apideck.com/apis/file-storage/reference", postmanCollectionId: "1311564-00e7266b-a3d6-4f40-b172-baaa66a3ed6f", categories: [ "files", "file-storage", "cloud-storage", "object-storage", ], resources: [ { id: "companies", name: "Companies", excludedFromCoverage: false, }, { id: "companies", name: "Companies", excludedFromCoverage: false, }, { id: "companies", name: "Companies", excludedFromCoverage: false, }, ], events: [ "crm.contact.updated", "accounting.invoice.created", ], }, { id: "file-storage", name: "File Storage API", description: "Manage API keys, access tokens, OAuth flows and integrations.", specUrl: "https://specs.apideck.com/file-storage.yml", apiReferenceUrl: "https://developers.apideck.com/apis/file-storage/reference", postmanCollectionId: "1311564-00e7266b-a3d6-4f40-b172-baaa66a3ed6f", categories: [ "files", "file-storage", "cloud-storage", "object-storage", ], resources: [ { id: "companies", name: "Companies", excludedFromCoverage: false, }, ], events: [ "crm.contact.updated", "accounting.invoice.created", ], }, ], meta: { itemsOnPage: 50, cursors: { previous: "em9oby1jcm06OnBhZ2U6OjE=", current: "em9oby1jcm06OnBhZ2U6OjI=", next: "em9oby1jcm06OnBhZ2U6OjM=", }, }, links: { previous: "https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjE%3D", current: "https://unify.apideck.com/crm/companies", next: "https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjM", }, }); }); test("Apis Connector Apis One", async () => { const testHttpClient = createTestHTTPClient("connector.apisOne"); 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.connector.apis.get({ appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX", id: "", }); expect(result.httpMeta.response.status).toBe(200); expect(result.getApiResponse).toBeDefined(); expect(result.getApiResponse).toEqual({ statusCode: 200, status: "OK", data: { id: "file-storage", name: "File Storage API", description: "Manage API keys, access tokens, OAuth flows and integrations.", specUrl: "https://specs.apideck.com/file-storage.yml", apiReferenceUrl: "https://developers.apideck.com/apis/file-storage/reference", postmanCollectionId: "1311564-00e7266b-a3d6-4f40-b172-baaa66a3ed6f", categories: [ "files", "file-storage", "cloud-storage", "object-storage", ], resources: [ { id: "companies", name: "Companies", excludedFromCoverage: false, }, { id: "companies", name: "Companies", excludedFromCoverage: false, }, { id: "companies", name: "Companies", excludedFromCoverage: false, }, ], events: [ "crm.contact.updated", "accounting.invoice.created", ], }, meta: { itemsOnPage: 50, cursors: { previous: "em9oby1jcm06OnBhZ2U6OjE=", current: "em9oby1jcm06OnBhZ2U6OjI=", next: "em9oby1jcm06OnBhZ2U6OjM=", }, }, links: { previous: "https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjE%3D", current: "https://unify.apideck.com/crm/companies", next: "https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjM", }, }); });