UNPKG

cvat-sdk

Version:

CVAT SDK is a Javascript library. It provides you access to Javascript functions and objects that simplify server interaction and provide additional functionality like data validation and serialization.

36 lines (33 loc) 958 B
import globalAxios from 'axios'; const BASE_PATH = "http://localhost".replace(/\/+$/, ""); const COLLECTION_FORMATS = { csv: ",", ssv: " ", tsv: "\t", pipes: "|" }; class BaseAPI { constructor(configuration, basePath = BASE_PATH, axios = globalAxios) { this.basePath = void 0; this.axios = void 0; this.configuration = void 0; this.basePath = basePath; this.axios = axios; if (configuration) { var _configuration$basePa; this.configuration = configuration; this.basePath = (_configuration$basePa = configuration.basePath) != null ? _configuration$basePa : basePath; } } } class RequiredError extends Error { constructor(field, msg) { super(msg); this.field = void 0; this.field = field; this.name = "RequiredError"; } } const operationServerMap = {}; export { BASE_PATH, BaseAPI, COLLECTION_FORMATS, RequiredError, operationServerMap }; //# sourceMappingURL=base.modern.mjs.map