UNPKG

@cotofe/service-of-model

Version:

OpenAPI client for @cotofe/service-of-model

58 lines (57 loc) 2.55 kB
"use strict"; /* tslint:disable */ 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()); }); }; Object.defineProperty(exports, "__esModule", { value: true }); exports.ModelMarketAgentTemplateApi = void 0; const runtime = require("../runtime"); /** * */ class ModelMarketAgentTemplateApi extends runtime.BaseAPI { /** * * importTemplate */ importTemplateUsingPOSTRaw(requestParameters, initOverrides) { return __awaiter(this, void 0, void 0, function* () { if (requestParameters.templateId == null) { throw new runtime.RequiredError('templateId', 'Required parameter "templateId" was null or undefined when calling importTemplateUsingPOST().'); } const queryParameters = {}; if (requestParameters.templateId != null) { queryParameters.templateId = requestParameters.templateId; } const headerParameters = {}; if (this.configuration && this.configuration.apiKey) { headerParameters.authorization = yield this.configuration.apiKey('authorization'); // apikey-header-authorization authentication } const response = yield this.request({ path: `/api/v1/agent/market/template/import`, method: 'POST', headers: headerParameters, query: queryParameters, }, initOverrides); return new runtime.JSONApiResponse(response); }); } /** * * importTemplate */ importTemplateUsingPOST(requestParameters, initOverrides) { return __awaiter(this, void 0, void 0, function* () { const response = yield this.importTemplateUsingPOSTRaw(requestParameters, initOverrides); return yield response.value(); }); } } exports.ModelMarketAgentTemplateApi = ModelMarketAgentTemplateApi;