@apistudio/apim-cli
Version:
CLI for API Management Products
70 lines • 3.19 kB
TypeScript
import { IRuntimeInventory, MasterContent, PolicyInfo } from "./interfaces/IRuntimeInventory.js";
declare const STAGED = "staged";
declare const FREE_FLOW = "free-flow";
export declare enum CommonKind {
Api = "api",
Plan = "plan",
Product = "product",
TestApi = "testapi",
Tuple = "tuple",
UriSchemes = "urischemes"
}
export type CommonKindType = `${CommonKind}`;
export declare class RuntimeInventory implements IRuntimeInventory {
masterContent: MasterContent;
schemaDefinitions: Record<string, any>;
defaultVersionMap: Record<string, string>;
constructor();
/**
* Extends or overrides the master content with custom data
* @param customMasterContent - Custom master content to merge with existing data
* @param overrideExisting - If true, will override existing entries; if false, will only add new entries
*/
extendMasterContent(customMasterContent: Partial<MasterContent>, overrideExisting?: boolean): void;
/**
* Extends or overrides the schema definitions with custom schemas
* @param customSchemas - Custom schemas to merge with existing schemas
* @param overrideExisting - If true, will override existing schemas; if false, will only add new schemas
*/
extendSchemaDefinitions(customSchemas: Record<string, any>, overrideExisting?: boolean): void;
/**
* Extends or overrides the default versions with custom default versions
* @param customDefaultVersions - Custom default versions to merge with existing versions
* @param overrideExisting - If true, will override existing versions; if false, will only add new versions
*/
extendDefaultVersions(customDefaultVersions: Record<string, string>, overrideExisting?: boolean): void;
getSchema(name: string, version?: string): string | undefined;
getSchemaFromDestination(name: string, version?: string): string | undefined;
getTypescript(name: string, version?: string): Record<string, any> | undefined;
getLintRuleset(name: string, version?: string): Record<string, any> | undefined;
getPolicySequenceType(): {
sequenceTypes: string[];
} | undefined;
getStagedPolicies(): Record<string, {
stage: string;
policies: PolicyInfo[];
}> | undefined;
getFreeFlowPolicies(): Record<string, {
group: string;
type: string;
policies: PolicyInfo[];
}> | undefined;
getPolicyDefaultVersion(sequenceType: typeof STAGED | typeof FREE_FLOW, groupName: string, policyName: string): string | undefined;
getMasterContents(): MasterContent;
/**
* Get the complete default versions mapping
* @returns A record mapping kind names to their default API versions
*/
getDefaultVersions(): Record<string, string>;
getPolicyInfo(sequenceType: typeof STAGED | typeof FREE_FLOW, groupName: string, policyName: string): {
name: string;
sequenceType: string;
group: string;
defaultVersion: any;
policy: any;
} | undefined;
private flattenPolicies;
}
export declare const runtimeInventory: RuntimeInventory;
export {};
//# sourceMappingURL=runtimeInventory%20copy.d.ts.map