@apistudio/apim-cli
Version:
CLI for API Management Products
50 lines (45 loc) • 2.56 kB
text/typescript
/**
* Copyright Super iPaaS Integration LLC, an IBM Company 2024
*/
export class AppConstants {
public static readonly KIND_FILE = "file";
public static readonly KIND_DIRECTORY = "directory";
public static readonly STUDIO_PROJECT_FILENAME = ".apistudio-projects";
public static readonly CRSWAP_FILE = ".crswap";
public static readonly YAMLContent = 'YAML Content';
public static readonly YAMLStructure = 'YAML Structure';
public static readonly pathVariable = '$path';
public static readonly YAML_FILE = 'STU-YAML_FILE';
// ASSET KINDS
public static readonly POLICY: string = 'Policy';
public static readonly MOCK_END_POINT: string = 'MockEndpoint';
public static readonly MOCK_RESPONSE: string = 'MockResponse';
public static readonly POLICY_SEQ = 'policy-sequence';
public static readonly apiSpec = 'api-spec';
// EXCEPTIONS
public static readonly EXCEPTION_DIRECTORY_ACCESS = 'Exception occured while accessing the directory.';
// ERROR MESSAGES
public static readonly VALIDATION_ERROR_CODE = 'STU-VAL_ERR';
public static readonly PARSING_EXCEPTION = (fileName = '') => `Exception occured while parsing ${fileName}.`;
public static readonly ERROR_INVALID_PROJECT = 'Invalid project. Please ensure that the project file is valid';
public static readonly ERROR_STUDIO_PROJECTS_FILE_NOT_FOUND = (rootDirAlias: string) => `.apistudio-projects file not found in root directory with alias ${rootDirAlias}`;
public static readonly ERROR_ASSET_PARSING = (fileName: string) => `Error in parsing file: ${fileName}`;
public static readonly FAILED_TO_LOAD_PROJECT = 'Failed to load project';
public static readonly NO_ROOT_DIR_IN_PROJECT = 'No projects folder configured in the project';
public static readonly NO_PROJECT_DIR_FOUND = 'No Project Directory Found';
public static readonly DIR_NOT_EXISTS = 'Directory not exists';
public static readonly ASSET_META_DATA_NOT_FOUND = 'Asset metadata not found';
public static readonly DUPLICATE_PROJECT_EXCEPTION = (projectName = '') => `Project with name ${projectName} already exists.`;;
public static readonly TEST = 'test';
public static readonly ASSERTION = 'assertion';
public static readonly ENVIRONMENT = 'environment';
public static readonly ALLOWED_ENDPOINTS = [
'default-endpoint',
'conditional-endpoints',
'loadbalance-endpoints',
'messageConfig',
'content-based-endpoints',
'dynamic-endpoints',
'mock-endpoint'
];
}