UNPKG

@apistudio/apim-cli

Version:

CLI for API Management Products

55 lines 2.83 kB
import { AbstractTransformerOrchestrator } from "./core/impl/transformer-orchestrator.abstract.impl"; import { IConfigLoader } from "./core/models/config-loader.interface"; import { IConfigRegistry, ITransformerRegistry } from "./core/models/registry.interface"; import { StudioAsset, WrappedAsset } from "./core/models/zip-processor.interface"; /** * Core implementation of the Transform Orchestrator * Provides basic transformation capabilities with minimal configuration */ export declare class CoreTransformOrchestrator extends AbstractTransformerOrchestrator { /** * Create a new core transform orchestrator * @param configRegistry Configuration registry * @param transformerRegistry Transformer registry * @param targetVersion Target gateway version */ constructor(configRegistry: IConfigRegistry, transformerRegistry: ITransformerRegistry, configLoader: IConfigLoader, targetVersion?: string); /** * Check if an API and its assets are valid for transformation * Core implementation always returns true * @param api The API asset * @param relatedAssets Related assets * @returns True if the API is valid for transformation */ protected isApiValid(api: StudioAsset, relatedAssets: StudioAsset[]): boolean; /** * Filter assets to include only those needed for the target gateway * Core implementation includes all assets by default * @param assets Array of assets to filter * @returns Filtered array of assets */ filterAssets(assets: StudioAsset[]): StudioAsset[]; /** * Post-transformation hook that runs after all assets have been transformed * Core implementation extracts the outputAsset from each wrapped asset * @param transformedAssets Array of wrapped transformed assets * @param resources Resources extracted from the ZIP file * @param apiName Name of the API being processed * @param apiMetadata Metadata of the API * @returns Final processed output */ protected postTransform(allAssets: StudioAsset[], transformedAssets: WrappedAsset[], resources: Record<string, string>, apiName: string, apiMetadata: any): Promise<any>; /** * Pre-transformation hook that runs before individual asset transformations * Core implementation simply wraps each asset with its metadata * @param inputAssets Array of assets extracted from ZIP * @returns Processed assets ready for transformation */ protected preTransform(inputAssets: StudioAsset[]): Promise<WrappedAsset[]>; } /** * Factory function to create a core transform orchestrator with default registries * @returns A new core transform orchestrator */ export declare function createCoreOrchestrator(): CoreTransformOrchestrator; //# sourceMappingURL=transformer-orchestrator.impl.d.ts.map