UNPKG

wrekenfile-converter

Version:

Convert OpenAPI and Postman specs into Wrekenfiles, with chunking for vector database storage

176 lines 6.87 kB
/** * Wrekenfile version to use for v2 converters */ export declare const WREKENFILE_VERSION = "2.0.2"; /** * Default base URL when none can be extracted */ export declare const DEFAULT_BASE_URL = "https://api.default.com"; /** * Common base URL variable names in Postman collections */ export declare const BASE_URL_VARIABLE_NAMES: string[]; /** * Sensitive keys that should be masked in DEFAULTS */ export declare const SENSITIVE_KEYS: string[]; /** * YAML dump options */ export declare const YAML_DUMP_OPTIONS: { indent: number; lineWidth: number; noRefs: boolean; sortKeys: boolean; quotingType: "\""; forceQuotes: boolean; }; /** * Execution mode constants */ export declare const EXECUTION_MODE_SYNC = "sync"; export declare const EXECUTION_MODE_ASYNC = "async"; /** * ASYNC section constants */ export declare const ASYNC_RETURNS_RESULT = "result"; /** * Type constants */ export declare const TYPE_VOID = "VOID"; export declare const TYPE_ANY = "ANY"; /** * Body type constants */ export declare const BODYTYPE_RAW = "raw"; /** * Default HTTP scheme */ export declare const DEFAULT_HTTP_SCHEME = "https"; /** * YAML document separators to remove */ export declare const YAML_DOCUMENT_SEPARATOR_START = "---"; export declare const YAML_DOCUMENT_SEPARATOR_END = "..."; export declare const YAML_SEPARATOR_LINES: string[]; /** * Method group type prefixes */ export declare const GROUP_PREFIX_HTTP = "http:"; export declare const GROUP_PREFIX_SDK = "sdk:"; export declare const GROUP_PREFIX_OTHER = "other:"; /** * Mini-wrekenfile filename prefix */ export declare const MINI_FILENAME_PREFIX = "mini-"; /** * YAML file extension */ export declare const YAML_EXTENSION = ".yaml"; /** * Default mini-wrekenfiles output directory */ export declare const DEFAULT_MINI_OUTPUT_DIR = "./mini-wrekenfiles"; /** * Filename sanitization regex patterns */ export declare const FILENAME_INVALID_CHARS: RegExp; export declare const FILENAME_MULTIPLE_HYPHENS: RegExp; export declare const FILENAME_LEADING_TRAILING_HYPHENS: RegExp; export declare const FILENAME_LEADING_SLASHES: RegExp; export declare const FILENAME_TRAILING_SLASHES: RegExp; /** * Content type constants (MIME types) */ export declare const CONTENT_TYPE_JSON = "application/json"; export declare const CONTENT_TYPE_FORM_DATA = "multipart/form-data"; export declare const CONTENT_TYPE_URLENCODED = "application/x-www-form-urlencoded"; export declare const CONTENT_TYPE_XML = "application/xml"; export declare const CONTENT_TYPE_TEXT_XML = "text/xml"; export declare const CONTENT_TYPE_TEXT_PLAIN = "text/plain"; export declare const CONTENT_TYPE_TEXT_HTML = "text/html"; export declare const CONTENT_TYPE_TEXT_CSV = "text/csv"; export declare const CONTENT_TYPE_APPLICATION_PDF = "application/pdf"; export declare const CONTENT_TYPE_APPLICATION_OCTET_STREAM = "application/octet-stream"; export declare const CONTENT_TYPE_IMAGE_JPEG = "image/jpeg"; export declare const CONTENT_TYPE_IMAGE_PNG = "image/png"; export declare const CONTENT_TYPE_IMAGE_GIF = "image/gif"; export declare const CONTENT_TYPE_APPLICATION_ZIP = "application/zip"; export declare const CONTENT_TYPE_APPLICATION_JAVASCRIPT = "application/javascript"; export declare const CONTENT_TYPE_TEXT_JAVASCRIPT = "text/javascript"; /** * Header name constants (common HTTP headers) */ export declare const HEADER_CONTENT_TYPE = "Content-Type"; export declare const HEADER_AUTHORIZATION = "Authorization"; export declare const HEADER_ACCEPT = "Accept"; export declare const HEADER_ACCEPT_LANGUAGE = "Accept-Language"; export declare const HEADER_ACCEPT_ENCODING = "Accept-Encoding"; export declare const HEADER_USER_AGENT = "User-Agent"; export declare const HEADER_X_REQUEST_ID = "X-Request-Id"; export declare const HEADER_X_CLIENT_VERSION = "X-Client-Version"; export declare const HEADER_X_API_KEY = "X-API-Key"; export declare const HEADER_X_SIGNATURE = "X-Signature"; export declare const HEADER_CACHE_CONTROL = "Cache-Control"; export declare const HEADER_CONTENT_LENGTH = "Content-Length"; export declare const HEADER_CONTENT_DISPOSITION = "Content-Disposition"; export declare const HEADER_CONTENT_ENCODING = "Content-Encoding"; export declare const HEADER_LOCATION = "Location"; export declare const HEADER_COOKIE = "Cookie"; export declare const HEADER_SET_COOKIE = "Set-Cookie"; export declare const HEADER_ETAG = "ETag"; export declare const HEADER_IF_NONE_MATCH = "If-None-Match"; export declare const HEADER_IF_MATCH = "If-Match"; /** * Authentication header value constants (for HEADERS section) * These are the values used in the generated Wrekenfile HEADERS section */ export declare const AUTH_BEARER_TOKEN = "bearer_token"; export declare const AUTH_BASIC_AUTH = "basic_auth"; export declare const AUTH_DIGEST_AUTH = "digest_auth"; export declare const AUTH_API_KEY = "api_key"; export declare const AUTH_SIGNATURE = "signature"; export declare const AUTH_ID_TOKEN = "id_token"; export declare const AUTH_OAUTH1 = "oauth1_token"; export declare const AUTH_OAUTH2 = "oauth2_token"; export declare const AUTH_JWT = "jwt_token"; export declare const AUTH_HOBA = "hoba_auth"; export declare const AUTH_MUTUAL = "mutual_auth"; export declare const AUTH_AWS4_HMAC_SHA256 = "aws4_hmac_sha256"; /** * Authentication header key constants (for checking) */ export declare const AUTH_HEADER_X_API_KEY = "x-api-key"; export declare const AUTH_HEADER_AUTHORIZATION = "authorization"; export declare const AUTH_HEADER_X_SIGNATURE = "x-signature"; /** * Authentication template constants (for DEFAULTS section) * These are the placeholder values used in the generated Wrekenfile DEFAULTS section */ export declare const AUTH_TEMPLATE_BEARER = "BEARER <TOKEN>"; export declare const AUTH_TEMPLATE_BEARER_ACCESS = "BEARER <ACCESS_TOKEN>"; export declare const AUTH_TEMPLATE_BASIC = "Basic <BASE64>"; export declare const AUTH_TEMPLATE_DIGEST = "Digest <CREDENTIALS>"; export declare const AUTH_TEMPLATE_ID_TOKEN = "ID_TOKEN <JWT>"; export declare const AUTH_TEMPLATE_OAUTH1 = "OAuth1 <TOKEN>"; export declare const AUTH_TEMPLATE_OAUTH2 = "OAuth2 <ACCESS_TOKEN>"; export declare const AUTH_TEMPLATE_JWT = "JWT <TOKEN>"; export declare const AUTH_TEMPLATE_API_KEY = "<API_KEY>"; export declare const AUTH_TEMPLATE_SIGNATURE = "<SIGNATURE>"; /** * HTTP method constants */ export declare const HTTP_METHOD_GET = "GET"; export declare const HTTP_METHOD_POST = "POST"; export declare const HTTP_METHOD_PUT = "PUT"; export declare const HTTP_METHOD_DELETE = "DELETE"; export declare const HTTP_METHOD_PATCH = "PATCH"; /** * HTTP methods that require Content-Type header */ export declare const HTTP_METHODS_WITH_BODY: string[]; /** * Summary verb mappings for generating summaries */ export declare const SUMMARY_VERBS: Record<string, string>; //# sourceMappingURL=constants.d.ts.map