@apistudio/apim-cli
Version:
CLI for API Management Products
29 lines • 1.95 kB
TypeScript
import { GatewayResponseAPI } from '../../model/studio/deploy-response-model.js';
import { BuildTestAssetsResult } from '../../testers/project/projects-asset-testers.js';
import { GatewaysJson } from '@apic/studio-shared';
export type APIEndpoints = Record<string, string[]>;
/**
* @param jsonObject - The JSON object to be constructed.
* @param key - The key to add to the JSON object.
* @param value - The array of endpoints to add.
*/
export interface BuildTestProjectsResult {
zipBuffer: Buffer;
apiReference: Record<string, string>;
}
export declare const constructKey: (response: GatewayResponseAPI) => string;
export declare const createJSONBuffer: (apiGatewayEndpoints: APIEndpoints) => Buffer;
export declare const getAPIRefToBuild: (testFilePath: string) => string[] | null;
export declare const processEndpointFromResponse: (responses: GatewayResponseAPI[]) => Buffer;
export declare const addEndpointToZip: (testZipBuffer: Buffer, endpointFile: Buffer) => Buffer;
export declare const updateEndpointZip: (finalZipBuffer: Buffer, newEndpoints: Buffer) => Promise<Buffer>;
export declare const combineTestAsset: (rootDir: string, assetsToTest: Record<string, string>) => Promise<BuildTestProjectsResult>;
export declare const findProjectForApi: (apiReference: Record<string, string>, notFoundApisList: string[]) => Record<string, string>;
export declare const buildAndDeployAssets: (localDir: string, assetsToBuildAndDeploy: Record<string, string>, gatewayJson: GatewaysJson) => Promise<{
buildBuffer: Buffer;
deploymentResult: GatewayResponseAPI[];
}>;
export declare const testProjects: (all: boolean, rootDir: string, projects: string) => Promise<Record<string, string>>;
export declare const testAssets: (rootDir: string, projects: string, assets: string) => Promise<BuildTestAssetsResult>;
export declare const formattedEndpoints: (endpoints: Record<string, string[]>) => void;
//# sourceMappingURL=test-helper.d.ts.map