UNPKG

@datenkraft/bb-organization-structure-api-ts-client

Version:

The organization-structure API TS Client enables you to work with the organization-structure API

258 lines (257 loc) 12.8 kB
"use strict"; /* tslint:disable */ /* eslint-disable */ /** * Backbone Organization Structure API * - alpha: Currently developed API version. Subject to major changes. - beta: A semi-stable early access version. New features can be added. Breaking changes are possible. - stable: The API is recommended for use in production. [Changelog](https://organization-structure-api.steve.niceshops.com/v2/docs/changelog.html) All data is transferred in UTF-8 encoding.\\ The API uses stateless HTTP. No cookies have to be kept.\\ Authentication via OAuth2 client credentials flow. [Privacy Policy](https://www.niceshops.com/en/dienstleistungen/data-privacy-policy) [Backbone Organization Structure API PHP client @Packagist](https://packagist.org/packages/datenkraft/bb-organization-structure-api-php-client) * * The version of the OpenAPI document: v2.beta * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.DocsApi = exports.DocsApiFactory = exports.DocsApiFp = exports.DocsApiAxiosParamCreator = void 0; const axios_1 = __importDefault(require("axios")); // URLSearchParams not necessarily used // @ts-ignore const url_1 = require("url"); // Some imports not used depending on template conditions // @ts-ignore const common_1 = require("../common"); // @ts-ignore const base_1 = require("../base"); /** * DocsApi - axios parameter creator * @export */ const DocsApiAxiosParamCreator = function (configuration) { return { /** * Get the changelog in the specified format * @summary Get the changelog in the specified format * @param {'md' | 'html'} format Changelog file format * @param {*} [options] Override http request option. * @throws {RequiredError} */ getChangelogInFormat: (format, options = {}) => __awaiter(this, void 0, void 0, function* () { // verify required parameter 'format' is not null or undefined (0, common_1.assertParamExists)('getChangelogInFormat', 'format', format); const localVarPath = `/docs/changelog.{format}` .replace(`{${"format"}}`, encodeURIComponent(String(format))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers); return { url: (0, common_1.toPathString)(localVarUrlObj), options: localVarRequestOptions, }; }), /** * Get the openapi documentation as json * @summary Get the openapi documentation as json * @param {*} [options] Override http request option. * @throws {RequiredError} */ getOpenApi: (options = {}) => __awaiter(this, void 0, void 0, function* () { const localVarPath = `/docs`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers); return { url: (0, common_1.toPathString)(localVarUrlObj), options: localVarRequestOptions, }; }), /** * Get the openapi documentation in the specified format * @summary Get the openapi documentation in the specified format * @param {'yaml' | 'json'} format Openapi file format * @param {*} [options] Override http request option. * @throws {RequiredError} */ getOpenApiInFormat: (format, options = {}) => __awaiter(this, void 0, void 0, function* () { // verify required parameter 'format' is not null or undefined (0, common_1.assertParamExists)('getOpenApiInFormat', 'format', format); const localVarPath = `/docs/openapi.{format}` .replace(`{${"format"}}`, encodeURIComponent(String(format))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers); return { url: (0, common_1.toPathString)(localVarUrlObj), options: localVarRequestOptions, }; }), }; }; exports.DocsApiAxiosParamCreator = DocsApiAxiosParamCreator; /** * DocsApi - functional programming interface * @export */ const DocsApiFp = function (configuration) { const localVarAxiosParamCreator = (0, exports.DocsApiAxiosParamCreator)(configuration); return { /** * Get the changelog in the specified format * @summary Get the changelog in the specified format * @param {'md' | 'html'} format Changelog file format * @param {*} [options] Override http request option. * @throws {RequiredError} */ getChangelogInFormat(format, options) { return __awaiter(this, void 0, void 0, function* () { const localVarAxiosArgs = yield localVarAxiosParamCreator.getChangelogInFormat(format, options); return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); }); }, /** * Get the openapi documentation as json * @summary Get the openapi documentation as json * @param {*} [options] Override http request option. * @throws {RequiredError} */ getOpenApi(options) { return __awaiter(this, void 0, void 0, function* () { const localVarAxiosArgs = yield localVarAxiosParamCreator.getOpenApi(options); return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); }); }, /** * Get the openapi documentation in the specified format * @summary Get the openapi documentation in the specified format * @param {'yaml' | 'json'} format Openapi file format * @param {*} [options] Override http request option. * @throws {RequiredError} */ getOpenApiInFormat(format, options) { return __awaiter(this, void 0, void 0, function* () { const localVarAxiosArgs = yield localVarAxiosParamCreator.getOpenApiInFormat(format, options); return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); }); }, }; }; exports.DocsApiFp = DocsApiFp; /** * DocsApi - factory interface * @export */ const DocsApiFactory = function (configuration, basePath, axios) { const localVarFp = (0, exports.DocsApiFp)(configuration); return { /** * Get the changelog in the specified format * @summary Get the changelog in the specified format * @param {'md' | 'html'} format Changelog file format * @param {*} [options] Override http request option. * @throws {RequiredError} */ getChangelogInFormat(format, options) { return localVarFp.getChangelogInFormat(format, options).then((request) => request(axios, basePath)); }, /** * Get the openapi documentation as json * @summary Get the openapi documentation as json * @param {*} [options] Override http request option. * @throws {RequiredError} */ getOpenApi(options) { return localVarFp.getOpenApi(options).then((request) => request(axios, basePath)); }, /** * Get the openapi documentation in the specified format * @summary Get the openapi documentation in the specified format * @param {'yaml' | 'json'} format Openapi file format * @param {*} [options] Override http request option. * @throws {RequiredError} */ getOpenApiInFormat(format, options) { return localVarFp.getOpenApiInFormat(format, options).then((request) => request(axios, basePath)); }, }; }; exports.DocsApiFactory = DocsApiFactory; /** * DocsApi - object-oriented interface * @export * @class DocsApi * @extends {BaseAPI} */ class DocsApi extends base_1.BaseAPI { /** * Get the changelog in the specified format * @summary Get the changelog in the specified format * @param {'md' | 'html'} format Changelog file format * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof DocsApi */ getChangelogInFormat(format, options) { return (0, exports.DocsApiFp)(this.configuration).getChangelogInFormat(format, options).then((request) => request(this.axios, this.basePath)); } /** * Get the openapi documentation as json * @summary Get the openapi documentation as json * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof DocsApi */ getOpenApi(options) { return (0, exports.DocsApiFp)(this.configuration).getOpenApi(options).then((request) => request(this.axios, this.basePath)); } /** * Get the openapi documentation in the specified format * @summary Get the openapi documentation in the specified format * @param {'yaml' | 'json'} format Openapi file format * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof DocsApi */ getOpenApiInFormat(format, options) { return (0, exports.DocsApiFp)(this.configuration).getOpenApiInFormat(format, options).then((request) => request(this.axios, this.basePath)); } } exports.DocsApi = DocsApi;