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.
1 lines • 3.21 kB
Source Map (JSON)
{"version":3,"file":"base.modern.mjs","sources":["../src/base.ts"],"sourcesContent":["/* tslint:disable */\n/* eslint-disable */\n/**\n * CVAT REST API\n * REST API for Computer Vision Annotation Tool (CVAT)\n *\n * The version of the OpenAPI document: 2.31.0\n * Contact: support@cvat.ai\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\n\nimport type { Configuration } from './configuration';\n// Some imports not used depending on template conditions\n// @ts-ignore\nimport type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';\nimport globalAxios from 'axios';\n\nexport const BASE_PATH = \"http://localhost\".replace(/\\/+$/, \"\");\n\n/**\n *\n * @export\n */\nexport const COLLECTION_FORMATS = {\n csv: \",\",\n ssv: \" \",\n tsv: \"\\t\",\n pipes: \"|\",\n};\n\n/**\n *\n * @export\n * @interface RequestArgs\n */\nexport interface RequestArgs {\n url: string;\n options: RawAxiosRequestConfig;\n}\n\n/**\n *\n * @export\n * @class BaseAPI\n */\nexport class BaseAPI {\n protected configuration: Configuration | undefined;\n\n constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) {\n if (configuration) {\n this.configuration = configuration;\n this.basePath = configuration.basePath ?? basePath;\n }\n }\n};\n\n/**\n *\n * @export\n * @class RequiredError\n * @extends {Error}\n */\nexport class RequiredError extends Error {\n constructor(public field: string, msg?: string) {\n super(msg);\n this.name = \"RequiredError\"\n }\n}\n\ninterface ServerMap {\n [key: string]: {\n url: string,\n description: string,\n }[];\n}\n\n/**\n *\n * @export\n */\nexport const operationServerMap: ServerMap = {\n}\n"],"names":["BASE_PATH","replace","COLLECTION_FORMATS","csv","ssv","tsv","pipes","BaseAPI","constructor","configuration","basePath","axios","globalAxios","_configuration$basePa","Required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