release 0.1.0
This commit is contained in:
699
dist/apis/CertificationAPI.js
vendored
Normal file
699
dist/apis/CertificationAPI.js
vendored
Normal file
@@ -0,0 +1,699 @@
|
||||
"use strict";
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Документация Ozon Seller API
|
||||
* По вопросам работы с Seller API обращайтесь в поддержку через личный кабинет. <aside class=\"warning\">Обновляем корневой TLS/SSL-сертификат GlobalSign — вместо него будем использовать <a href=\"https://app.harica.gr/\">HARICA</a>.<br><a href=\"https://dev.ozon.ru/news/775-Izmeneniia-v-Ozon-API-migratsiia-kornevogo-sertifikata-UTs-Ozon/\">Подробнее о переходе на HARICA на платформе разработчиков Ozon for dev</a></aside> > [Инструкции по работе с маркетплейсом](https://seller-edu.ozon.ru) > [Информационная платформа и сообщество разработчиков Ozon for dev](https://dev.ozon.ru/)
|
||||
*
|
||||
* The version of the OpenAPI document: 2.1
|
||||
*
|
||||
*
|
||||
* 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());
|
||||
});
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.ProductAPIProductCertificateCreateAccordanceTypeCodeEnum = exports.ProductAPIProductCertificateCreateTypeCodeEnum = exports.CertificationAPI = void 0;
|
||||
const runtime = require("../runtime");
|
||||
const index_1 = require("../models/index");
|
||||
/**
|
||||
*
|
||||
*/
|
||||
class CertificationAPI extends runtime.BaseAPI {
|
||||
/**
|
||||
* Список типов соответствия требованиям (версия 2)
|
||||
*/
|
||||
certificateAccordanceTypesRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['clientId'] == null) {
|
||||
throw new runtime.RequiredError('clientId', 'Required parameter "clientId" was null or undefined when calling certificateAccordanceTypes().');
|
||||
}
|
||||
if (requestParameters['apiKey'] == null) {
|
||||
throw new runtime.RequiredError('apiKey', 'Required parameter "apiKey" was null or undefined when calling certificateAccordanceTypes().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
const headerParameters = {};
|
||||
if (requestParameters['clientId'] != null) {
|
||||
headerParameters['Client-Id'] = String(requestParameters['clientId']);
|
||||
}
|
||||
if (requestParameters['apiKey'] != null) {
|
||||
headerParameters['Api-Key'] = String(requestParameters['apiKey']);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v2/product/certificate/accordance-types/list`,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.V2ProductCertificateAccordanceTypesResponseFromJSON)(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Список типов соответствия требованиям (версия 2)
|
||||
*/
|
||||
certificateAccordanceTypes(clientId, apiKey, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.certificateAccordanceTypesRaw({ clientId: clientId, apiKey: apiKey }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Удалить сертификат
|
||||
*/
|
||||
certificateDeleteRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['v1ProductCertificateDeleteRequest'] == null) {
|
||||
throw new runtime.RequiredError('v1ProductCertificateDeleteRequest', 'Required parameter "v1ProductCertificateDeleteRequest" was null or undefined when calling certificateDelete().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
const headerParameters = {};
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
const response = yield this.request({
|
||||
path: `/v1/product/certificate/delete`,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: (0, index_1.V1ProductCertificateDeleteRequestToJSON)(requestParameters['v1ProductCertificateDeleteRequest']),
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.V1ProductCertificateDeleteResponseFromJSON)(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Удалить сертификат
|
||||
*/
|
||||
certificateDelete(v1ProductCertificateDeleteRequest, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.certificateDeleteRaw({ v1ProductCertificateDeleteRequest: v1ProductCertificateDeleteRequest }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Информация о сертификате
|
||||
*/
|
||||
certificateInfoRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['clientId'] == null) {
|
||||
throw new runtime.RequiredError('clientId', 'Required parameter "clientId" was null or undefined when calling certificateInfo().');
|
||||
}
|
||||
if (requestParameters['apiKey'] == null) {
|
||||
throw new runtime.RequiredError('apiKey', 'Required parameter "apiKey" was null or undefined when calling certificateInfo().');
|
||||
}
|
||||
if (requestParameters['v1ProductCertificateInfoRequest'] == null) {
|
||||
throw new runtime.RequiredError('v1ProductCertificateInfoRequest', 'Required parameter "v1ProductCertificateInfoRequest" was null or undefined when calling certificateInfo().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
const headerParameters = {};
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
if (requestParameters['clientId'] != null) {
|
||||
headerParameters['Client-Id'] = String(requestParameters['clientId']);
|
||||
}
|
||||
if (requestParameters['apiKey'] != null) {
|
||||
headerParameters['Api-Key'] = String(requestParameters['apiKey']);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v1/product/certificate/info`,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: (0, index_1.V1ProductCertificateInfoRequestToJSON)(requestParameters['v1ProductCertificateInfoRequest']),
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.V1ProductCertificateInfoResponseFromJSON)(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Информация о сертификате
|
||||
*/
|
||||
certificateInfo(clientId, apiKey, v1ProductCertificateInfoRequest, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.certificateInfoRaw({ clientId: clientId, apiKey: apiKey, v1ProductCertificateInfoRequest: v1ProductCertificateInfoRequest }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Список сертификатов
|
||||
*/
|
||||
certificateListRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['clientId'] == null) {
|
||||
throw new runtime.RequiredError('clientId', 'Required parameter "clientId" was null or undefined when calling certificateList().');
|
||||
}
|
||||
if (requestParameters['apiKey'] == null) {
|
||||
throw new runtime.RequiredError('apiKey', 'Required parameter "apiKey" was null or undefined when calling certificateList().');
|
||||
}
|
||||
if (requestParameters['v1ProductCertificateListRequest'] == null) {
|
||||
throw new runtime.RequiredError('v1ProductCertificateListRequest', 'Required parameter "v1ProductCertificateListRequest" was null or undefined when calling certificateList().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
const headerParameters = {};
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
if (requestParameters['clientId'] != null) {
|
||||
headerParameters['Client-Id'] = String(requestParameters['clientId']);
|
||||
}
|
||||
if (requestParameters['apiKey'] != null) {
|
||||
headerParameters['Api-Key'] = String(requestParameters['apiKey']);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v1/product/certificate/list`,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: (0, index_1.V1ProductCertificateListRequestToJSON)(requestParameters['v1ProductCertificateListRequest']),
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.V1ProductCertificateListResponseFromJSON)(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Список сертификатов
|
||||
*/
|
||||
certificateList(clientId, apiKey, v1ProductCertificateListRequest, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.certificateListRaw({ clientId: clientId, apiKey: apiKey, v1ProductCertificateListRequest: v1ProductCertificateListRequest }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Список товаров, привязанных к сертификату
|
||||
*/
|
||||
certificateProductsListRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['clientId'] == null) {
|
||||
throw new runtime.RequiredError('clientId', 'Required parameter "clientId" was null or undefined when calling certificateProductsList().');
|
||||
}
|
||||
if (requestParameters['apiKey'] == null) {
|
||||
throw new runtime.RequiredError('apiKey', 'Required parameter "apiKey" was null or undefined when calling certificateProductsList().');
|
||||
}
|
||||
if (requestParameters['v1ProductCertificateProductsListRequest'] == null) {
|
||||
throw new runtime.RequiredError('v1ProductCertificateProductsListRequest', 'Required parameter "v1ProductCertificateProductsListRequest" was null or undefined when calling certificateProductsList().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
const headerParameters = {};
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
if (requestParameters['clientId'] != null) {
|
||||
headerParameters['Client-Id'] = String(requestParameters['clientId']);
|
||||
}
|
||||
if (requestParameters['apiKey'] != null) {
|
||||
headerParameters['Api-Key'] = String(requestParameters['apiKey']);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v1/product/certificate/products/list`,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: (0, index_1.V1ProductCertificateProductsListRequestToJSON)(requestParameters['v1ProductCertificateProductsListRequest']),
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.V1ProductCertificateProductsListResponseFromJSON)(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Список товаров, привязанных к сертификату
|
||||
*/
|
||||
certificateProductsList(clientId, apiKey, v1ProductCertificateProductsListRequest, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.certificateProductsListRaw({ clientId: clientId, apiKey: apiKey, v1ProductCertificateProductsListRequest: v1ProductCertificateProductsListRequest }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Возможные статусы сертификатов
|
||||
*/
|
||||
certificateStatusListRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['clientId'] == null) {
|
||||
throw new runtime.RequiredError('clientId', 'Required parameter "clientId" was null or undefined when calling certificateStatusList().');
|
||||
}
|
||||
if (requestParameters['apiKey'] == null) {
|
||||
throw new runtime.RequiredError('apiKey', 'Required parameter "apiKey" was null or undefined when calling certificateStatusList().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
const headerParameters = {};
|
||||
if (requestParameters['clientId'] != null) {
|
||||
headerParameters['Client-Id'] = String(requestParameters['clientId']);
|
||||
}
|
||||
if (requestParameters['apiKey'] != null) {
|
||||
headerParameters['Api-Key'] = String(requestParameters['apiKey']);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v1/product/certificate/status/list`,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.V1ProductCertificateStatusListResponseFromJSON)(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Возможные статусы сертификатов
|
||||
*/
|
||||
certificateStatusList(clientId, apiKey, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.certificateStatusListRaw({ clientId: clientId, apiKey: apiKey }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Отвязать товар от сертификата
|
||||
*/
|
||||
certificateUnbindRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['clientId'] == null) {
|
||||
throw new runtime.RequiredError('clientId', 'Required parameter "clientId" was null or undefined when calling certificateUnbind().');
|
||||
}
|
||||
if (requestParameters['apiKey'] == null) {
|
||||
throw new runtime.RequiredError('apiKey', 'Required parameter "apiKey" was null or undefined when calling certificateUnbind().');
|
||||
}
|
||||
if (requestParameters['v1ProductCertificateUnbindRequest'] == null) {
|
||||
throw new runtime.RequiredError('v1ProductCertificateUnbindRequest', 'Required parameter "v1ProductCertificateUnbindRequest" was null or undefined when calling certificateUnbind().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
const headerParameters = {};
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
if (requestParameters['clientId'] != null) {
|
||||
headerParameters['Client-Id'] = String(requestParameters['clientId']);
|
||||
}
|
||||
if (requestParameters['apiKey'] != null) {
|
||||
headerParameters['Api-Key'] = String(requestParameters['apiKey']);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v1/product/certificate/unbind`,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: (0, index_1.V1ProductCertificateUnbindRequestToJSON)(requestParameters['v1ProductCertificateUnbindRequest']),
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.V1ProductCertificateUnbindResponseFromJSON)(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Отвязать товар от сертификата
|
||||
*/
|
||||
certificateUnbind(clientId, apiKey, v1ProductCertificateUnbindRequest, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.certificateUnbindRaw({ clientId: clientId, apiKey: apiKey, v1ProductCertificateUnbindRequest: v1ProductCertificateUnbindRequest }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Список типов соответствия требованиям (версия 1)
|
||||
*/
|
||||
productAPIProductCertificateAccordanceTypesRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['clientId'] == null) {
|
||||
throw new runtime.RequiredError('clientId', 'Required parameter "clientId" was null or undefined when calling productAPIProductCertificateAccordanceTypes().');
|
||||
}
|
||||
if (requestParameters['apiKey'] == null) {
|
||||
throw new runtime.RequiredError('apiKey', 'Required parameter "apiKey" was null or undefined when calling productAPIProductCertificateAccordanceTypes().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
const headerParameters = {};
|
||||
if (requestParameters['clientId'] != null) {
|
||||
headerParameters['Client-Id'] = String(requestParameters['clientId']);
|
||||
}
|
||||
if (requestParameters['apiKey'] != null) {
|
||||
headerParameters['Api-Key'] = String(requestParameters['apiKey']);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v1/product/certificate/accordance-types`,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.ProductProductCertificateAccordanceTypesResponseFromJSON)(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Список типов соответствия требованиям (версия 1)
|
||||
*/
|
||||
productAPIProductCertificateAccordanceTypes(clientId, apiKey, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.productAPIProductCertificateAccordanceTypesRaw({ clientId: clientId, apiKey: apiKey }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Привязать сертификат к товару
|
||||
*/
|
||||
productAPIProductCertificateBindRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['clientId'] == null) {
|
||||
throw new runtime.RequiredError('clientId', 'Required parameter "clientId" was null or undefined when calling productAPIProductCertificateBind().');
|
||||
}
|
||||
if (requestParameters['apiKey'] == null) {
|
||||
throw new runtime.RequiredError('apiKey', 'Required parameter "apiKey" was null or undefined when calling productAPIProductCertificateBind().');
|
||||
}
|
||||
if (requestParameters['productProductCertificateBindRequest'] == null) {
|
||||
throw new runtime.RequiredError('productProductCertificateBindRequest', 'Required parameter "productProductCertificateBindRequest" was null or undefined when calling productAPIProductCertificateBind().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
const headerParameters = {};
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
if (requestParameters['clientId'] != null) {
|
||||
headerParameters['Client-Id'] = String(requestParameters['clientId']);
|
||||
}
|
||||
if (requestParameters['apiKey'] != null) {
|
||||
headerParameters['Api-Key'] = String(requestParameters['apiKey']);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v1/product/certificate/bind`,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: (0, index_1.ProductProductCertificateBindRequestToJSON)(requestParameters['productProductCertificateBindRequest']),
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.ProductBooleanResponseFromJSON)(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Привязать сертификат к товару
|
||||
*/
|
||||
productAPIProductCertificateBind(clientId, apiKey, productProductCertificateBindRequest, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.productAPIProductCertificateBindRaw({ clientId: clientId, apiKey: apiKey, productProductCertificateBindRequest: productProductCertificateBindRequest }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
/**
|
||||
* <aside class=\"warning\"> 31 августа 2026 года отключим метод. Переключитесь на методы <a href=\"#operation/ProductCertificateOptions\">/v2/product/certification/options</a>, <a href=\"#operation/ProductCertificateParams\">/v2/product/certification/params</a> и <a href=\"#operation/ProductCertificateCreate\">/v2/product/certificate/create</a>. </aside>
|
||||
* Добавить сертификаты для товаров
|
||||
* @deprecated
|
||||
*/
|
||||
productAPIProductCertificateCreateRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['clientId'] == null) {
|
||||
throw new runtime.RequiredError('clientId', 'Required parameter "clientId" was null or undefined when calling productAPIProductCertificateCreate().');
|
||||
}
|
||||
if (requestParameters['apiKey'] == null) {
|
||||
throw new runtime.RequiredError('apiKey', 'Required parameter "apiKey" was null or undefined when calling productAPIProductCertificateCreate().');
|
||||
}
|
||||
if (requestParameters['files'] == null) {
|
||||
throw new runtime.RequiredError('files', 'Required parameter "files" was null or undefined when calling productAPIProductCertificateCreate().');
|
||||
}
|
||||
if (requestParameters['name'] == null) {
|
||||
throw new runtime.RequiredError('name', 'Required parameter "name" was null or undefined when calling productAPIProductCertificateCreate().');
|
||||
}
|
||||
if (requestParameters['number'] == null) {
|
||||
throw new runtime.RequiredError('number', 'Required parameter "number" was null or undefined when calling productAPIProductCertificateCreate().');
|
||||
}
|
||||
if (requestParameters['typeCode'] == null) {
|
||||
throw new runtime.RequiredError('typeCode', 'Required parameter "typeCode" was null or undefined when calling productAPIProductCertificateCreate().');
|
||||
}
|
||||
if (requestParameters['issueDate'] == null) {
|
||||
throw new runtime.RequiredError('issueDate', 'Required parameter "issueDate" was null or undefined when calling productAPIProductCertificateCreate().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
const headerParameters = {};
|
||||
if (requestParameters['clientId'] != null) {
|
||||
headerParameters['Client-Id'] = String(requestParameters['clientId']);
|
||||
}
|
||||
if (requestParameters['apiKey'] != null) {
|
||||
headerParameters['Api-Key'] = String(requestParameters['apiKey']);
|
||||
}
|
||||
const consumes = [
|
||||
{ contentType: 'multipart/form-data' },
|
||||
];
|
||||
// @ts-ignore: canConsumeForm may be unused
|
||||
const canConsumeForm = runtime.canConsumeForm(consumes);
|
||||
let formParams;
|
||||
let useForm = false;
|
||||
if (useForm) {
|
||||
formParams = new FormData();
|
||||
}
|
||||
else {
|
||||
formParams = new URLSearchParams();
|
||||
}
|
||||
if (requestParameters['files'] != null) {
|
||||
formParams.append('files', requestParameters['files'].join(runtime.COLLECTION_FORMATS["csv"]));
|
||||
}
|
||||
if (requestParameters['name'] != null) {
|
||||
formParams.append('name', requestParameters['name']);
|
||||
}
|
||||
if (requestParameters['number'] != null) {
|
||||
formParams.append('number', requestParameters['number']);
|
||||
}
|
||||
if (requestParameters['typeCode'] != null) {
|
||||
formParams.append('type_code', requestParameters['typeCode']);
|
||||
}
|
||||
if (requestParameters['accordanceTypeCode'] != null) {
|
||||
formParams.append('accordance_type_code', requestParameters['accordanceTypeCode']);
|
||||
}
|
||||
if (requestParameters['issueDate'] != null) {
|
||||
formParams.append('issue_date', requestParameters['issueDate']);
|
||||
}
|
||||
if (requestParameters['expireDate'] != null) {
|
||||
formParams.append('expire_date', requestParameters['expireDate']);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v1/product/certificate/create`,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: formParams,
|
||||
}, initOverrides);
|
||||
if (this.isJsonMime(response.headers.get('content-type'))) {
|
||||
return new runtime.JSONApiResponse(response);
|
||||
}
|
||||
else {
|
||||
return new runtime.TextApiResponse(response);
|
||||
}
|
||||
});
|
||||
}
|
||||
/**
|
||||
* <aside class=\"warning\"> 31 августа 2026 года отключим метод. Переключитесь на методы <a href=\"#operation/ProductCertificateOptions\">/v2/product/certification/options</a>, <a href=\"#operation/ProductCertificateParams\">/v2/product/certification/params</a> и <a href=\"#operation/ProductCertificateCreate\">/v2/product/certificate/create</a>. </aside>
|
||||
* Добавить сертификаты для товаров
|
||||
* @deprecated
|
||||
*/
|
||||
productAPIProductCertificateCreate(clientId, apiKey, files, name, number, typeCode, issueDate, accordanceTypeCode, expireDate, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.productAPIProductCertificateCreateRaw({ clientId: clientId, apiKey: apiKey, files: files, name: name, number: number, typeCode: typeCode, issueDate: issueDate, accordanceTypeCode: accordanceTypeCode, expireDate: expireDate }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Справочник типов документов
|
||||
*/
|
||||
productAPIProductCertificateTypesRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['clientId'] == null) {
|
||||
throw new runtime.RequiredError('clientId', 'Required parameter "clientId" was null or undefined when calling productAPIProductCertificateTypes().');
|
||||
}
|
||||
if (requestParameters['apiKey'] == null) {
|
||||
throw new runtime.RequiredError('apiKey', 'Required parameter "apiKey" was null or undefined when calling productAPIProductCertificateTypes().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
const headerParameters = {};
|
||||
if (requestParameters['clientId'] != null) {
|
||||
headerParameters['Client-Id'] = String(requestParameters['clientId']);
|
||||
}
|
||||
if (requestParameters['apiKey'] != null) {
|
||||
headerParameters['Api-Key'] = String(requestParameters['apiKey']);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v1/product/certificate/types`,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.ProductProductCertificateTypesResponseFromJSON)(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Справочник типов документов
|
||||
*/
|
||||
productAPIProductCertificateTypes(clientId, apiKey, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.productAPIProductCertificateTypesRaw({ clientId: clientId, apiKey: apiKey }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Список сертифицируемых категорий
|
||||
*/
|
||||
productAPIProductCertificationListRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['clientId'] == null) {
|
||||
throw new runtime.RequiredError('clientId', 'Required parameter "clientId" was null or undefined when calling productAPIProductCertificationList().');
|
||||
}
|
||||
if (requestParameters['apiKey'] == null) {
|
||||
throw new runtime.RequiredError('apiKey', 'Required parameter "apiKey" was null or undefined when calling productAPIProductCertificationList().');
|
||||
}
|
||||
if (requestParameters['v2ProductCertificationListRequest'] == null) {
|
||||
throw new runtime.RequiredError('v2ProductCertificationListRequest', 'Required parameter "v2ProductCertificationListRequest" was null or undefined when calling productAPIProductCertificationList().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
const headerParameters = {};
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
if (requestParameters['clientId'] != null) {
|
||||
headerParameters['Client-Id'] = String(requestParameters['clientId']);
|
||||
}
|
||||
if (requestParameters['apiKey'] != null) {
|
||||
headerParameters['Api-Key'] = String(requestParameters['apiKey']);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v2/product/certification/list`,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: (0, index_1.V2ProductCertificationListRequestToJSON)(requestParameters['v2ProductCertificationListRequest']),
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.V2ProductCertificationListResponseFromJSON)(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Список сертифицируемых категорий
|
||||
*/
|
||||
productAPIProductCertificationList(clientId, apiKey, v2ProductCertificationListRequest, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.productAPIProductCertificationListRaw({ clientId: clientId, apiKey: apiKey, v2ProductCertificationListRequest: v2ProductCertificationListRequest }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
/**
|
||||
* <aside class=\"warning\"> 14 апреля 2025 года метод будет отключён. Переключитесь на <a href=\"#operation/ProductAPI_ProductCertificationList\">/v2/product/certification/list</a>. </aside>
|
||||
* Список сертифицируемых категорий
|
||||
*/
|
||||
productAPIV1ProductCertificationListRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['clientId'] == null) {
|
||||
throw new runtime.RequiredError('clientId', 'Required parameter "clientId" was null or undefined when calling productAPIV1ProductCertificationList().');
|
||||
}
|
||||
if (requestParameters['apiKey'] == null) {
|
||||
throw new runtime.RequiredError('apiKey', 'Required parameter "apiKey" was null or undefined when calling productAPIV1ProductCertificationList().');
|
||||
}
|
||||
if (requestParameters['productProductCertificationListRequest'] == null) {
|
||||
throw new runtime.RequiredError('productProductCertificationListRequest', 'Required parameter "productProductCertificationListRequest" was null or undefined when calling productAPIV1ProductCertificationList().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
const headerParameters = {};
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
if (requestParameters['clientId'] != null) {
|
||||
headerParameters['Client-Id'] = String(requestParameters['clientId']);
|
||||
}
|
||||
if (requestParameters['apiKey'] != null) {
|
||||
headerParameters['Api-Key'] = String(requestParameters['apiKey']);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v1/product/certification/list`,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: (0, index_1.ProductProductCertificationListRequestToJSON)(requestParameters['productProductCertificationListRequest']),
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.ProductProductCertificationListResponseFromJSON)(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* <aside class=\"warning\"> 14 апреля 2025 года метод будет отключён. Переключитесь на <a href=\"#operation/ProductAPI_ProductCertificationList\">/v2/product/certification/list</a>. </aside>
|
||||
* Список сертифицируемых категорий
|
||||
*/
|
||||
productAPIV1ProductCertificationList(clientId, apiKey, productProductCertificationListRequest, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.productAPIV1ProductCertificationListRaw({ clientId: clientId, apiKey: apiKey, productProductCertificationListRequest: productProductCertificationListRequest }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Метод для получения списка возможных статусов товаров при их привязке к сертификату.
|
||||
* Список возможных статусов товаров
|
||||
*/
|
||||
productStatusListRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['clientId'] == null) {
|
||||
throw new runtime.RequiredError('clientId', 'Required parameter "clientId" was null or undefined when calling productStatusList().');
|
||||
}
|
||||
if (requestParameters['apiKey'] == null) {
|
||||
throw new runtime.RequiredError('apiKey', 'Required parameter "apiKey" was null or undefined when calling productStatusList().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
const headerParameters = {};
|
||||
if (requestParameters['clientId'] != null) {
|
||||
headerParameters['Client-Id'] = String(requestParameters['clientId']);
|
||||
}
|
||||
if (requestParameters['apiKey'] != null) {
|
||||
headerParameters['Api-Key'] = String(requestParameters['apiKey']);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v1/product/certificate/product_status/list`,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.V1ProductCertificateProductStatusListResponseFromJSON)(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Метод для получения списка возможных статусов товаров при их привязке к сертификату.
|
||||
* Список возможных статусов товаров
|
||||
*/
|
||||
productStatusList(clientId, apiKey, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.productStatusListRaw({ clientId: clientId, apiKey: apiKey }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Возможные причины отклонения сертификата
|
||||
*/
|
||||
rejectionReasonsListRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['clientId'] == null) {
|
||||
throw new runtime.RequiredError('clientId', 'Required parameter "clientId" was null or undefined when calling rejectionReasonsList().');
|
||||
}
|
||||
if (requestParameters['apiKey'] == null) {
|
||||
throw new runtime.RequiredError('apiKey', 'Required parameter "apiKey" was null or undefined when calling rejectionReasonsList().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
const headerParameters = {};
|
||||
if (requestParameters['clientId'] != null) {
|
||||
headerParameters['Client-Id'] = String(requestParameters['clientId']);
|
||||
}
|
||||
if (requestParameters['apiKey'] != null) {
|
||||
headerParameters['Api-Key'] = String(requestParameters['apiKey']);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v1/product/certificate/rejection_reasons/list`,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.V1ProductCertificateRejectionReasonsListResponseFromJSON)(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Возможные причины отклонения сертификата
|
||||
*/
|
||||
rejectionReasonsList(clientId, apiKey, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.rejectionReasonsListRaw({ clientId: clientId, apiKey: apiKey }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
}
|
||||
exports.CertificationAPI = CertificationAPI;
|
||||
/**
|
||||
* @export
|
||||
*/
|
||||
exports.ProductAPIProductCertificateCreateTypeCodeEnum = {
|
||||
certificate_of_conformity: 'certificate_of_conformity',
|
||||
declaration: 'declaration',
|
||||
certificate_of_registration: 'certificate_of_registration',
|
||||
registration_certificate: 'registration_certificate',
|
||||
refused_letter: 'refused_letter',
|
||||
veterinary_cover_document: 'veterinary_cover_document',
|
||||
safety_data_sheet: 'safety_data_sheet'
|
||||
};
|
||||
/**
|
||||
* @export
|
||||
*/
|
||||
exports.ProductAPIProductCertificateCreateAccordanceTypeCodeEnum = {
|
||||
technical_regulations_rf: 'technical_regulations_rf',
|
||||
technical_regulations_cu: 'technical_regulations_cu',
|
||||
gost: 'gost'
|
||||
};
|
||||
Reference in New Issue
Block a user