Files
ozon-seller-typescript/dist/apis/SellerActions.js
2026-08-21 12:19:50 +00:00

778 lines
53 KiB
JavaScript
Raw Permalink Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
"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.SellerActions = void 0;
const runtime = require("../runtime");
const index_1 = require("../models/index");
/**
*
*/
class SellerActions extends runtime.BaseAPI {
/**
* Вы можете оставить обратную связь о работе метода в [комментариях](https://dev.ozon.ru/community/1872-Novye-metody-dlia-raboty-s-aktsiiami-sellera) в сообществе разработчиков Ozon for dev.
* Перенести акцию в архив
*/
sellerActionsArchiveRaw(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 sellerActionsArchive().');
}
if (requestParameters['apiKey'] == null) {
throw new runtime.RequiredError('apiKey', 'Required parameter "apiKey" was null or undefined when calling sellerActionsArchive().');
}
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/seller-actions/archive`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: (0, index_1.V1SellerActionsArchiveRequestToJSON)(requestParameters['v1SellerActionsArchiveRequest']),
}, initOverrides);
return new runtime.VoidApiResponse(response);
});
}
/**
* Вы можете оставить обратную связь о работе метода в [комментариях](https://dev.ozon.ru/community/1872-Novye-metody-dlia-raboty-s-aktsiiami-sellera) в сообществе разработчиков Ozon for dev.
* Перенести акцию в архив
*/
sellerActionsArchive(clientId, apiKey, v1SellerActionsArchiveRequest, initOverrides) {
return __awaiter(this, void 0, void 0, function* () {
yield this.sellerActionsArchiveRaw({ clientId: clientId, apiKey: apiKey, v1SellerActionsArchiveRequest: v1SellerActionsArchiveRequest }, initOverrides);
});
}
/**
* Вы можете оставить обратную связь о работе метода в [комментариях](https://dev.ozon.ru/community/1872-Novye-metody-dlia-raboty-s-aktsiiami-sellera) в сообществе разработчиков Ozon for dev.
* Включить или выключить акцию
*/
sellerActionsChangeActivityRaw(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 sellerActionsChangeActivity().');
}
if (requestParameters['apiKey'] == null) {
throw new runtime.RequiredError('apiKey', 'Required parameter "apiKey" was null or undefined when calling sellerActionsChangeActivity().');
}
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/seller-actions/change-activity`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: (0, index_1.V1SellerActionsChangeActivityRequestToJSON)(requestParameters['v1SellerActionsChangeActivityRequest']),
}, initOverrides);
return new runtime.VoidApiResponse(response);
});
}
/**
* Вы можете оставить обратную связь о работе метода в [комментариях](https://dev.ozon.ru/community/1872-Novye-metody-dlia-raboty-s-aktsiiami-sellera) в сообществе разработчиков Ozon for dev.
* Включить или выключить акцию
*/
sellerActionsChangeActivity(clientId, apiKey, v1SellerActionsChangeActivityRequest, initOverrides) {
return __awaiter(this, void 0, void 0, function* () {
yield this.sellerActionsChangeActivityRaw({ clientId: clientId, apiKey: apiKey, v1SellerActionsChangeActivityRequest: v1SellerActionsChangeActivityRequest }, initOverrides);
});
}
/**
* <aside class=\"warning\"> Недоступен для продавцов из СНГ. </aside> Вы можете оставить обратную связь о работе метода в [комментариях](https://dev.ozon.ru/community/1872-Novye-metody-dlia-raboty-s-aktsiiami-sellera) в сообществе разработчиков Ozon for dev.
* Создать акцию с механикой «Скидка»
*/
sellerActionsCreateDiscountRaw(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 sellerActionsCreateDiscount().');
}
if (requestParameters['apiKey'] == null) {
throw new runtime.RequiredError('apiKey', 'Required parameter "apiKey" was null or undefined when calling sellerActionsCreateDiscount().');
}
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/seller-actions/create/discount`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: (0, index_1.V1SellerActionsCreateDiscountRequestToJSON)(requestParameters['v1SellerActionsCreateDiscountRequest']),
}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.V1SellerActionsCreateDiscountResponseFromJSON)(jsonValue));
});
}
/**
* <aside class=\"warning\"> Недоступен для продавцов из СНГ. </aside> Вы можете оставить обратную связь о работе метода в [комментариях](https://dev.ozon.ru/community/1872-Novye-metody-dlia-raboty-s-aktsiiami-sellera) в сообществе разработчиков Ozon for dev.
* Создать акцию с механикой «Скидка»
*/
sellerActionsCreateDiscount(clientId, apiKey, v1SellerActionsCreateDiscountRequest, initOverrides) {
return __awaiter(this, void 0, void 0, function* () {
const response = yield this.sellerActionsCreateDiscountRaw({ clientId: clientId, apiKey: apiKey, v1SellerActionsCreateDiscountRequest: v1SellerActionsCreateDiscountRequest }, initOverrides);
return yield response.value();
});
}
/**
* Вы можете оставить обратную связь о работе метода в [комментариях](https://dev.ozon.ru/community/1872-Novye-metody-dlia-raboty-s-aktsiiami-sellera) в сообществе разработчиков Ozon for dev.
* Создать акцию с механикой «Скидка от суммы заказа»
*/
sellerActionsCreateDiscountWithConditionRaw(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 sellerActionsCreateDiscountWithCondition().');
}
if (requestParameters['apiKey'] == null) {
throw new runtime.RequiredError('apiKey', 'Required parameter "apiKey" was null or undefined when calling sellerActionsCreateDiscountWithCondition().');
}
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/seller-actions/create/discount-with-condition`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: (0, index_1.V1SellerActionsCreateDiscountWithConditionRequestToJSON)(requestParameters['v1SellerActionsCreateDiscountWithConditionRequest']),
}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.V1SellerActionsCreateDiscountWithConditionResponseFromJSON)(jsonValue));
});
}
/**
* Вы можете оставить обратную связь о работе метода в [комментариях](https://dev.ozon.ru/community/1872-Novye-metody-dlia-raboty-s-aktsiiami-sellera) в сообществе разработчиков Ozon for dev.
* Создать акцию с механикой «Скидка от суммы заказа»
*/
sellerActionsCreateDiscountWithCondition(clientId, apiKey, v1SellerActionsCreateDiscountWithConditionRequest, initOverrides) {
return __awaiter(this, void 0, void 0, function* () {
const response = yield this.sellerActionsCreateDiscountWithConditionRaw({ clientId: clientId, apiKey: apiKey, v1SellerActionsCreateDiscountWithConditionRequest: v1SellerActionsCreateDiscountWithConditionRequest }, initOverrides);
return yield response.value();
});
}
/**
* Период рассрочки — 6 месяцев. Вы можете оставить обратную связь о работе метода в [комментариях](https://dev.ozon.ru/community/1872-Novye-metody-dlia-raboty-s-aktsiiami-sellera) в сообществе разработчиков Ozon for dev.
* Создать акцию с механикой «Беспроцентная рассрочка»
*/
sellerActionsCreateInstallmentRaw(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 sellerActionsCreateInstallment().');
}
if (requestParameters['apiKey'] == null) {
throw new runtime.RequiredError('apiKey', 'Required parameter "apiKey" was null or undefined when calling sellerActionsCreateInstallment().');
}
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/seller-actions/create/installment`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: (0, index_1.V1SellerActionsCreateInstallmentRequestToJSON)(requestParameters['v1SellerActionsCreateInstallmentRequest']),
}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.V1SellerActionsCreateInstallmentResponseFromJSON)(jsonValue));
});
}
/**
* Период рассрочки — 6 месяцев. Вы можете оставить обратную связь о работе метода в [комментариях](https://dev.ozon.ru/community/1872-Novye-metody-dlia-raboty-s-aktsiiami-sellera) в сообществе разработчиков Ozon for dev.
* Создать акцию с механикой «Беспроцентная рассрочка»
*/
sellerActionsCreateInstallment(clientId, apiKey, v1SellerActionsCreateInstallmentRequest, initOverrides) {
return __awaiter(this, void 0, void 0, function* () {
const response = yield this.sellerActionsCreateInstallmentRaw({ clientId: clientId, apiKey: apiKey, v1SellerActionsCreateInstallmentRequest: v1SellerActionsCreateInstallmentRequest }, initOverrides);
return yield response.value();
});
}
/**
* Товары в акцию добавляются автоматически, использовать метод [/v1/seller-actions/products/add](#operation/SellerActionsProductsAdd) не нужно. Вы можете оставить обратную связь о работе метода в [комментариях](https://dev.ozon.ru/community/1872-Novye-metody-dlia-raboty-s-aktsiiami-sellera) в сообществе разработчиков Ozon for dev.
* Создать акцию с механикой «Многоуровневая скидка от суммы»
*/
sellerActionsCreateMultiLevelDiscountRaw(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 sellerActionsCreateMultiLevelDiscount().');
}
if (requestParameters['apiKey'] == null) {
throw new runtime.RequiredError('apiKey', 'Required parameter "apiKey" was null or undefined when calling sellerActionsCreateMultiLevelDiscount().');
}
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/seller-actions/create/multi-level-discount`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: (0, index_1.V1SellerActionsCreateMultiLevelDiscountRequestToJSON)(requestParameters['v1SellerActionsCreateMultiLevelDiscountRequest']),
}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.V1SellerActionsCreateMultiLevelDiscountResponseFromJSON)(jsonValue));
});
}
/**
* Товары в акцию добавляются автоматически, использовать метод [/v1/seller-actions/products/add](#operation/SellerActionsProductsAdd) не нужно. Вы можете оставить обратную связь о работе метода в [комментариях](https://dev.ozon.ru/community/1872-Novye-metody-dlia-raboty-s-aktsiiami-sellera) в сообществе разработчиков Ozon for dev.
* Создать акцию с механикой «Многоуровневая скидка от суммы»
*/
sellerActionsCreateMultiLevelDiscount(clientId, apiKey, v1SellerActionsCreateMultiLevelDiscountRequest, initOverrides) {
return __awaiter(this, void 0, void 0, function* () {
const response = yield this.sellerActionsCreateMultiLevelDiscountRaw({ clientId: clientId, apiKey: apiKey, v1SellerActionsCreateMultiLevelDiscountRequest: v1SellerActionsCreateMultiLevelDiscountRequest }, initOverrides);
return yield response.value();
});
}
/**
* Вы можете оставить обратную связь о работе метода в [комментариях](https://dev.ozon.ru/community/1872-Novye-metody-dlia-raboty-s-aktsiiami-sellera) в сообществе разработчиков Ozon for dev.
* Создать акцию с механикой «Скидка по промокоду»
*/
sellerActionsCreateVoucherRaw(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 sellerActionsCreateVoucher().');
}
if (requestParameters['apiKey'] == null) {
throw new runtime.RequiredError('apiKey', 'Required parameter "apiKey" was null or undefined when calling sellerActionsCreateVoucher().');
}
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/seller-actions/create/voucher`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: (0, index_1.V1SellerActionsCreateVoucherRequestToJSON)(requestParameters['v1SellerActionsCreateVoucherRequest']),
}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.V1SellerActionsCreateVoucherResponseFromJSON)(jsonValue));
});
}
/**
* Вы можете оставить обратную связь о работе метода в [комментариях](https://dev.ozon.ru/community/1872-Novye-metody-dlia-raboty-s-aktsiiami-sellera) в сообществе разработчиков Ozon for dev.
* Создать акцию с механикой «Скидка по промокоду»
*/
sellerActionsCreateVoucher(clientId, apiKey, v1SellerActionsCreateVoucherRequest, initOverrides) {
return __awaiter(this, void 0, void 0, function* () {
const response = yield this.sellerActionsCreateVoucherRaw({ clientId: clientId, apiKey: apiKey, v1SellerActionsCreateVoucherRequest: v1SellerActionsCreateVoucherRequest }, initOverrides);
return yield response.value();
});
}
/**
* Вы можете оставить обратную связь о работе метода в [комментариях](https://dev.ozon.ru/community/1872-Novye-metody-dlia-raboty-s-aktsiiami-sellera) в сообществе разработчиков Ozon for dev.
* Получить список акций
*/
sellerActionsListRaw(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 sellerActionsList().');
}
if (requestParameters['apiKey'] == null) {
throw new runtime.RequiredError('apiKey', 'Required parameter "apiKey" was null or undefined when calling sellerActionsList().');
}
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/seller-actions/list`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: (0, index_1.V1SellerActionsListRequestToJSON)(requestParameters['v1SellerActionsListRequest']),
}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.V1SellerActionsListResponseFromJSON)(jsonValue));
});
}
/**
* Вы можете оставить обратную связь о работе метода в [комментариях](https://dev.ozon.ru/community/1872-Novye-metody-dlia-raboty-s-aktsiiami-sellera) в сообществе разработчиков Ozon for dev.
* Получить список акций
*/
sellerActionsList(clientId, apiKey, v1SellerActionsListRequest, initOverrides) {
return __awaiter(this, void 0, void 0, function* () {
const response = yield this.sellerActionsListRaw({ clientId: clientId, apiKey: apiKey, v1SellerActionsListRequest: v1SellerActionsListRequest }, initOverrides);
return yield response.value();
});
}
/**
* Вы можете оставить обратную связь о работе метода в [комментариях](https://dev.ozon.ru/community/1872-Novye-metody-dlia-raboty-s-aktsiiami-sellera) в сообществе разработчиков Ozon for dev.
* Добавить товары в акцию
*/
sellerActionsProductsAddRaw(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 sellerActionsProductsAdd().');
}
if (requestParameters['apiKey'] == null) {
throw new runtime.RequiredError('apiKey', 'Required parameter "apiKey" was null or undefined when calling sellerActionsProductsAdd().');
}
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/seller-actions/products/add`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: (0, index_1.V1SellerActionsProductsAddRequestToJSON)(requestParameters['v1SellerActionsProductsAddRequest']),
}, initOverrides);
return new runtime.VoidApiResponse(response);
});
}
/**
* Вы можете оставить обратную связь о работе метода в [комментариях](https://dev.ozon.ru/community/1872-Novye-metody-dlia-raboty-s-aktsiiami-sellera) в сообществе разработчиков Ozon for dev.
* Добавить товары в акцию
*/
sellerActionsProductsAdd(clientId, apiKey, v1SellerActionsProductsAddRequest, initOverrides) {
return __awaiter(this, void 0, void 0, function* () {
yield this.sellerActionsProductsAddRaw({ clientId: clientId, apiKey: apiKey, v1SellerActionsProductsAddRequest: v1SellerActionsProductsAddRequest }, initOverrides);
});
}
/**
* Вы можете оставить обратную связь о работе метода в [комментариях](https://dev.ozon.ru/community/1872-Novye-metody-dlia-raboty-s-aktsiiami-sellera) в сообществе разработчиков Ozon for dev.
* Получить список доступных для акции товаров
*/
sellerActionsProductsCandidatesRaw(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 sellerActionsProductsCandidates().');
}
if (requestParameters['apiKey'] == null) {
throw new runtime.RequiredError('apiKey', 'Required parameter "apiKey" was null or undefined when calling sellerActionsProductsCandidates().');
}
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/seller-actions/products/candidates`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: (0, index_1.V1SellerActionsProductsCandidatesRequestToJSON)(requestParameters['v1SellerActionsProductsCandidatesRequest']),
}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.V1SellerActionsProductsCandidatesResponseFromJSON)(jsonValue));
});
}
/**
* Вы можете оставить обратную связь о работе метода в [комментариях](https://dev.ozon.ru/community/1872-Novye-metody-dlia-raboty-s-aktsiiami-sellera) в сообществе разработчиков Ozon for dev.
* Получить список доступных для акции товаров
*/
sellerActionsProductsCandidates(clientId, apiKey, v1SellerActionsProductsCandidatesRequest, initOverrides) {
return __awaiter(this, void 0, void 0, function* () {
const response = yield this.sellerActionsProductsCandidatesRaw({ clientId: clientId, apiKey: apiKey, v1SellerActionsProductsCandidatesRequest: v1SellerActionsProductsCandidatesRequest }, initOverrides);
return yield response.value();
});
}
/**
* Вы можете оставить обратную связь о работе метода в [комментариях](https://dev.ozon.ru/community/1872-Novye-metody-dlia-raboty-s-aktsiiami-sellera) в сообществе разработчиков Ozon for dev.
* Удалить товары из акции
*/
sellerActionsProductsDeleteRaw(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 sellerActionsProductsDelete().');
}
if (requestParameters['apiKey'] == null) {
throw new runtime.RequiredError('apiKey', 'Required parameter "apiKey" was null or undefined when calling sellerActionsProductsDelete().');
}
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/seller-actions/products/delete`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: (0, index_1.V1SellerActionsProductsDeleteRequestToJSON)(requestParameters['v1SellerActionsProductsDeleteRequest']),
}, initOverrides);
return new runtime.VoidApiResponse(response);
});
}
/**
* Вы можете оставить обратную связь о работе метода в [комментариях](https://dev.ozon.ru/community/1872-Novye-metody-dlia-raboty-s-aktsiiami-sellera) в сообществе разработчиков Ozon for dev.
* Удалить товары из акции
*/
sellerActionsProductsDelete(clientId, apiKey, v1SellerActionsProductsDeleteRequest, initOverrides) {
return __awaiter(this, void 0, void 0, function* () {
yield this.sellerActionsProductsDeleteRaw({ clientId: clientId, apiKey: apiKey, v1SellerActionsProductsDeleteRequest: v1SellerActionsProductsDeleteRequest }, initOverrides);
});
}
/**
* Вы можете оставить обратную связь о работе метода в [комментариях](https://dev.ozon.ru/community/1872-Novye-metody-dlia-raboty-s-aktsiiami-sellera) в сообществе разработчиков Ozon for dev.
* Получить список участвующих в акции товаров
*/
sellerActionsProductsListRaw(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 sellerActionsProductsList().');
}
if (requestParameters['apiKey'] == null) {
throw new runtime.RequiredError('apiKey', 'Required parameter "apiKey" was null or undefined when calling sellerActionsProductsList().');
}
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/seller-actions/products/list`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: (0, index_1.V1SellerActionsProductsListRequestToJSON)(requestParameters['v1SellerActionsProductsListRequest']),
}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.V1SellerActionsProductsListResponseFromJSON)(jsonValue));
});
}
/**
* Вы можете оставить обратную связь о работе метода в [комментариях](https://dev.ozon.ru/community/1872-Novye-metody-dlia-raboty-s-aktsiiami-sellera) в сообществе разработчиков Ozon for dev.
* Получить список участвующих в акции товаров
*/
sellerActionsProductsList(clientId, apiKey, v1SellerActionsProductsListRequest, initOverrides) {
return __awaiter(this, void 0, void 0, function* () {
const response = yield this.sellerActionsProductsListRaw({ clientId: clientId, apiKey: apiKey, v1SellerActionsProductsListRequest: v1SellerActionsProductsListRequest }, initOverrides);
return yield response.value();
});
}
/**
* <aside class=\"warning\"> Недоступен для продавцов из СНГ. </aside> Вы можете оставить обратную связь по этому методу в комментариях к [обсуждению](https://dev.ozon.ru/community/1872-Novye-metody-dlia-raboty-s-aktsiiami-sellera/) в сообществе разработчиков Ozon for dev.
* Обновить акцию с механикой «Скидка»
*/
sellerActionsUpdateDiscountRaw(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 sellerActionsUpdateDiscount().');
}
if (requestParameters['apiKey'] == null) {
throw new runtime.RequiredError('apiKey', 'Required parameter "apiKey" was null or undefined when calling sellerActionsUpdateDiscount().');
}
if (requestParameters['v1SellerActionsUpdateDiscountRequest'] == null) {
throw new runtime.RequiredError('v1SellerActionsUpdateDiscountRequest', 'Required parameter "v1SellerActionsUpdateDiscountRequest" was null or undefined when calling sellerActionsUpdateDiscount().');
}
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/seller-actions/update/discount`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: (0, index_1.V1SellerActionsUpdateDiscountRequestToJSON)(requestParameters['v1SellerActionsUpdateDiscountRequest']),
}, initOverrides);
return new runtime.VoidApiResponse(response);
});
}
/**
* <aside class=\"warning\"> Недоступен для продавцов из СНГ. </aside> Вы можете оставить обратную связь по этому методу в комментариях к [обсуждению](https://dev.ozon.ru/community/1872-Novye-metody-dlia-raboty-s-aktsiiami-sellera/) в сообществе разработчиков Ozon for dev.
* Обновить акцию с механикой «Скидка»
*/
sellerActionsUpdateDiscount(clientId, apiKey, v1SellerActionsUpdateDiscountRequest, initOverrides) {
return __awaiter(this, void 0, void 0, function* () {
yield this.sellerActionsUpdateDiscountRaw({ clientId: clientId, apiKey: apiKey, v1SellerActionsUpdateDiscountRequest: v1SellerActionsUpdateDiscountRequest }, initOverrides);
});
}
/**
* Вы можете оставить обратную связь по этому методу в комментариях к [обсуждению](https://dev.ozon.ru/community/1872-Novye-metody-dlia-raboty-s-aktsiiami-sellera/) в сообществе разработчиков Ozon for dev.
* Обновить акцию с механикой «Скидка от суммы заказа»
*/
sellerActionsUpdateDiscountWithConditionRaw(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 sellerActionsUpdateDiscountWithCondition().');
}
if (requestParameters['apiKey'] == null) {
throw new runtime.RequiredError('apiKey', 'Required parameter "apiKey" was null or undefined when calling sellerActionsUpdateDiscountWithCondition().');
}
if (requestParameters['v1SellerActionsUpdateDiscountWithConditionRequest'] == null) {
throw new runtime.RequiredError('v1SellerActionsUpdateDiscountWithConditionRequest', 'Required parameter "v1SellerActionsUpdateDiscountWithConditionRequest" was null or undefined when calling sellerActionsUpdateDiscountWithCondition().');
}
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/seller-actions/update/discount-with-condition`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: (0, index_1.V1SellerActionsUpdateDiscountWithConditionRequestToJSON)(requestParameters['v1SellerActionsUpdateDiscountWithConditionRequest']),
}, initOverrides);
return new runtime.VoidApiResponse(response);
});
}
/**
* Вы можете оставить обратную связь по этому методу в комментариях к [обсуждению](https://dev.ozon.ru/community/1872-Novye-metody-dlia-raboty-s-aktsiiami-sellera/) в сообществе разработчиков Ozon for dev.
* Обновить акцию с механикой «Скидка от суммы заказа»
*/
sellerActionsUpdateDiscountWithCondition(clientId, apiKey, v1SellerActionsUpdateDiscountWithConditionRequest, initOverrides) {
return __awaiter(this, void 0, void 0, function* () {
yield this.sellerActionsUpdateDiscountWithConditionRaw({ clientId: clientId, apiKey: apiKey, v1SellerActionsUpdateDiscountWithConditionRequest: v1SellerActionsUpdateDiscountWithConditionRequest }, initOverrides);
});
}
/**
* Период рассрочки — 6 месяцев. Вы можете оставить обратную связь по этому методу в комментариях к [обсуждению](https://dev.ozon.ru/community/1872-Novye-metody-dlia-raboty-s-aktsiiami-sellera/) в сообществе разработчиков Ozon for dev.
* Обновить акцию с механикой «Беспроцентная рассрочка»
*/
sellerActionsUpdateInstallmentRaw(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 sellerActionsUpdateInstallment().');
}
if (requestParameters['apiKey'] == null) {
throw new runtime.RequiredError('apiKey', 'Required parameter "apiKey" was null or undefined when calling sellerActionsUpdateInstallment().');
}
if (requestParameters['v1SellerActionsUpdateInstallmentRequest'] == null) {
throw new runtime.RequiredError('v1SellerActionsUpdateInstallmentRequest', 'Required parameter "v1SellerActionsUpdateInstallmentRequest" was null or undefined when calling sellerActionsUpdateInstallment().');
}
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/seller-actions/update/installment`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: (0, index_1.V1SellerActionsUpdateInstallmentRequestToJSON)(requestParameters['v1SellerActionsUpdateInstallmentRequest']),
}, initOverrides);
return new runtime.VoidApiResponse(response);
});
}
/**
* Период рассрочки — 6 месяцев. Вы можете оставить обратную связь по этому методу в комментариях к [обсуждению](https://dev.ozon.ru/community/1872-Novye-metody-dlia-raboty-s-aktsiiami-sellera/) в сообществе разработчиков Ozon for dev.
* Обновить акцию с механикой «Беспроцентная рассрочка»
*/
sellerActionsUpdateInstallment(clientId, apiKey, v1SellerActionsUpdateInstallmentRequest, initOverrides) {
return __awaiter(this, void 0, void 0, function* () {
yield this.sellerActionsUpdateInstallmentRaw({ clientId: clientId, apiKey: apiKey, v1SellerActionsUpdateInstallmentRequest: v1SellerActionsUpdateInstallmentRequest }, initOverrides);
});
}
/**
* Товары в акцию добавляются автоматически, вызывать метод [/v1/seller-actions/products/add](#operation/SellerActionsProductsAdd) не нужно. Вы можете оставить обратную связь по этому методу в комментариях к [обсуждению](https://dev.ozon.ru/community/1872-Novye-metody-dlia-raboty-s-aktsiiami-sellera/) в сообществе разработчиков Ozon for dev.
* Обновить акцию с механикой «Многоуровневая скидка от суммы»
*/
sellerActionsUpdateMultiLevelDiscountRaw(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 sellerActionsUpdateMultiLevelDiscount().');
}
if (requestParameters['apiKey'] == null) {
throw new runtime.RequiredError('apiKey', 'Required parameter "apiKey" was null or undefined when calling sellerActionsUpdateMultiLevelDiscount().');
}
if (requestParameters['v1SellerActionsUpdateMultiLevelDiscountRequest'] == null) {
throw new runtime.RequiredError('v1SellerActionsUpdateMultiLevelDiscountRequest', 'Required parameter "v1SellerActionsUpdateMultiLevelDiscountRequest" was null or undefined when calling sellerActionsUpdateMultiLevelDiscount().');
}
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/seller-actions/update/multi-level-discount`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: (0, index_1.V1SellerActionsUpdateMultiLevelDiscountRequestToJSON)(requestParameters['v1SellerActionsUpdateMultiLevelDiscountRequest']),
}, initOverrides);
return new runtime.VoidApiResponse(response);
});
}
/**
* Товары в акцию добавляются автоматически, вызывать метод [/v1/seller-actions/products/add](#operation/SellerActionsProductsAdd) не нужно. Вы можете оставить обратную связь по этому методу в комментариях к [обсуждению](https://dev.ozon.ru/community/1872-Novye-metody-dlia-raboty-s-aktsiiami-sellera/) в сообществе разработчиков Ozon for dev.
* Обновить акцию с механикой «Многоуровневая скидка от суммы»
*/
sellerActionsUpdateMultiLevelDiscount(clientId, apiKey, v1SellerActionsUpdateMultiLevelDiscountRequest, initOverrides) {
return __awaiter(this, void 0, void 0, function* () {
yield this.sellerActionsUpdateMultiLevelDiscountRaw({ clientId: clientId, apiKey: apiKey, v1SellerActionsUpdateMultiLevelDiscountRequest: v1SellerActionsUpdateMultiLevelDiscountRequest }, initOverrides);
});
}
/**
* Вы можете оставить обратную связь по этому методу в комментариях к [обсуждению](https://dev.ozon.ru/community/1872-Novye-metody-dlia-raboty-s-aktsiiami-sellera/) в сообществе разработчиков Ozon for dev.
* Обновить акцию с механикой «Скидка по промокоду»
*/
sellerActionsUpdateVoucherRaw(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 sellerActionsUpdateVoucher().');
}
if (requestParameters['apiKey'] == null) {
throw new runtime.RequiredError('apiKey', 'Required parameter "apiKey" was null or undefined when calling sellerActionsUpdateVoucher().');
}
if (requestParameters['v1SellerActionsUpdateVoucherRequest'] == null) {
throw new runtime.RequiredError('v1SellerActionsUpdateVoucherRequest', 'Required parameter "v1SellerActionsUpdateVoucherRequest" was null or undefined when calling sellerActionsUpdateVoucher().');
}
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/seller-actions/update/voucher`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: (0, index_1.V1SellerActionsUpdateVoucherRequestToJSON)(requestParameters['v1SellerActionsUpdateVoucherRequest']),
}, initOverrides);
return new runtime.VoidApiResponse(response);
});
}
/**
* Вы можете оставить обратную связь по этому методу в комментариях к [обсуждению](https://dev.ozon.ru/community/1872-Novye-metody-dlia-raboty-s-aktsiiami-sellera/) в сообществе разработчиков Ozon for dev.
* Обновить акцию с механикой «Скидка по промокоду»
*/
sellerActionsUpdateVoucher(clientId, apiKey, v1SellerActionsUpdateVoucherRequest, initOverrides) {
return __awaiter(this, void 0, void 0, function* () {
yield this.sellerActionsUpdateVoucherRaw({ clientId: clientId, apiKey: apiKey, v1SellerActionsUpdateVoucherRequest: v1SellerActionsUpdateVoucherRequest }, initOverrides);
});
}
/**
* Вы можете оставить обратную связь о работе метода в [комментариях](https://dev.ozon.ru/community/1872-Novye-metody-dlia-raboty-s-aktsiiami-sellera) в сообществе разработчиков Ozon for dev.
* Получить файл с промокодами в формате CSV
*/
sellerActionsVoucherGetRaw(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 sellerActionsVoucherGet().');
}
if (requestParameters['apiKey'] == null) {
throw new runtime.RequiredError('apiKey', 'Required parameter "apiKey" was null or undefined when calling sellerActionsVoucherGet().');
}
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/seller-actions/voucher/get`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: (0, index_1.V1SellerActionsVoucherGetRequestToJSON)(requestParameters['v1SellerActionsVoucherGetRequest']),
}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.V1SellerActionsVoucherGetResponseFromJSON)(jsonValue));
});
}
/**
* Вы можете оставить обратную связь о работе метода в [комментариях](https://dev.ozon.ru/community/1872-Novye-metody-dlia-raboty-s-aktsiiami-sellera) в сообществе разработчиков Ozon for dev.
* Получить файл с промокодами в формате CSV
*/
sellerActionsVoucherGet(clientId, apiKey, v1SellerActionsVoucherGetRequest, initOverrides) {
return __awaiter(this, void 0, void 0, function* () {
const response = yield this.sellerActionsVoucherGetRaw({ clientId: clientId, apiKey: apiKey, v1SellerActionsVoucherGetRequest: v1SellerActionsVoucherGetRequest }, initOverrides);
return yield response.value();
});
}
}
exports.SellerActions = SellerActions;