release 0.1.0
This commit is contained in:
27
LICENSE
Normal file
27
LICENSE
Normal file
@@ -0,0 +1,27 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2026 apilki
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
---
|
||||
|
||||
Attribution: this package is generated from the Yandex Market Partner API
|
||||
OpenAPI specification (https://github.com/yandex-market/yandex-market-partner-api),
|
||||
Copyright (c) 2023 YANDEX LLC, licensed under the BSD 3-Clause license.
|
||||
107
README.md
107
README.md
@@ -1,3 +1,104 @@
|
||||
# yandex-market-typescript
|
||||
|
||||
JavaScript/TypeScript client for Yandex Market Partner API (MIT)
|
||||
# @apilki/yandex-market — JavaScript/TypeScript клиент
|
||||
|
||||
**Версия: 0.1.0 · API от 2026-08-20** <!-- штампуется пайплайном (github-distro) -->
|
||||
|
||||
JavaScript/TypeScript клиент для **Yandex Market Partner API** (продавец-сторона: заказы, каталог, цены, отчёты). Построен на базе `fetch` API. Работает и в Node.js, и в браузере. Публикуется в npm-скоупе `@apilki` (GitHub-орг `apilki`).
|
||||
|
||||
## Особенности сборки
|
||||
- **Типизация**: Полная поддержка TypeScript (`.d.ts` включены).
|
||||
- **Стиль имен**:
|
||||
- Методы и классы: `camelCase` (например, `orderApi.getOrders`).
|
||||
- Свойства объектов (JSON): **Original** (сохранено именование из спецификации Яндекса, обычно это `camelCase`).
|
||||
- **Аргументы методов**: Плоский список (позиционный). Первым параметром в большинстве методов идет `campaignId`.
|
||||
|
||||
## Быстрый старт
|
||||
|
||||
### 1. Инициализация клиента
|
||||
|
||||
Авторизация настраивается один раз через `Configuration`. Ключ передается в заголовке `Api-Key`.
|
||||
|
||||
```javascript
|
||||
import { Configuration, OrderApi, CampaignsApi } from '@apilki/yandex-market';
|
||||
|
||||
const config = new Configuration({
|
||||
basePath: 'https://api.partner.market.yandex.ru',
|
||||
headers: {
|
||||
'Api-Key': 'ACMA:YOUR_SECRET_KEY',
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
});
|
||||
|
||||
const orderApi = new OrderApi(config);
|
||||
const campaignsApi = new CampaignsApi(config);
|
||||
```
|
||||
|
||||
## 2. Работа с несколькими кабинетами или магазинами
|
||||
|
||||
В зависимости от метода API Яндекса, первым аргументом может выступать либо **campaignId** (идентификатор магазина), либо **businessId** (идентификатор бизнеса/кабинета). Ключ авторизации `Api-Key` уже находится в заголовках конфигурации, поэтому он не требуется в аргументах.
|
||||
|
||||
```javascript
|
||||
const campaignId = 12345678;
|
||||
const businessId = 987654;
|
||||
|
||||
async function fetchData() {
|
||||
try {
|
||||
// Пример метода с campaignId (Заказы)
|
||||
const orders = await orderApi.getOrders(campaignId, { status: 'PROCESSING' });
|
||||
|
||||
// Пример метода с businessId (Каталог/Цены)
|
||||
const offers = await assortmentApi.getOfferMappings(businessId, { limit: 100 });
|
||||
|
||||
console.log('Данные получены');
|
||||
} catch (error) {
|
||||
console.error('Yandex API Error:', error);
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### 3. Обработка ошибок
|
||||
|
||||
В случае ошибок 4xx/5xx клиент выбрасывает ResponseError. Ответ Яндекса обычно содержит объект с массивом ошибок.
|
||||
|
||||
```javascript
|
||||
try {
|
||||
await orderApi.getOrders(...);
|
||||
} catch (error) {
|
||||
const errorBody = await error.response.json();
|
||||
// Структура ошибки Яндекса: { status: "ERROR", errors: [...] }
|
||||
console.error('Errors:', errorBody.errors);
|
||||
}
|
||||
```
|
||||
|
||||
### 4. Отладка (Middleware)
|
||||
|
||||
Для отладки сетевых запросов используйте Middleware:
|
||||
|
||||
```javascript
|
||||
const config = new Configuration({
|
||||
middleware: [{
|
||||
pre: async (context) => {
|
||||
console.log(`[Yandex Request] ${context.url}`);
|
||||
return context;
|
||||
}
|
||||
}]
|
||||
});
|
||||
```
|
||||
|
||||
### Важные замечания
|
||||
|
||||
Порядок аргументов: В большинстве методов Яндекса первым аргументом идет campaignId. Всегда проверяйте сигнатуру метода через автодополнение в IDE.
|
||||
|
||||
**Идентификаторы (ID):** Внимательно следите за сигнатурой метода в IDE.
|
||||
* Если метод относится к операциям магазина — первым аргументом идет campaignId.
|
||||
* Если к настройкам каталога или финтеху — первым аргументом идет businessId.
|
||||
|
||||
**JSON:** Мы сохранили оригинальное именование полей. Если поле в документации Яндекса называется deliveryServiceId, в коде оно будет точно таким же.
|
||||
|
||||
**Fetch:** В среде Node.js < 18 требуется полифил node-fetch.
|
||||
|
||||
**Авторизация:** Если Api-Key не задан в Configuration, он может потребоваться первым аргументом в каждом методе. Проверяйте подсказки IDE.
|
||||
|
||||
### Ссылки
|
||||
|
||||
* [Официальная документация API Яндекс Маркета для продавцов](https://yandex.ru/dev/market/partner-api/doc/ru/)
|
||||
* [Спецификация API Яндекс Маркета для продавцов](https://github.com/yandex-market/yandex-market-partner-api)
|
||||
28
dist/apis/AuthApi.d.ts
vendored
Normal file
28
dist/apis/AuthApi.d.ts
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
/**
|
||||
* API Яндекс Маркета для продавцов
|
||||
* API Яндекс Маркета помогает продавцам автоматизировать и упростить работу с маркетплейсом. В числе возможностей интеграции: * управление каталогом товаров и витриной, * обработка заказов, * изменение настроек магазина, * получение отчетов.
|
||||
*
|
||||
* The version of the OpenAPI document: LATEST
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
import * as runtime from '../runtime';
|
||||
import type { GetTokenInfoResponse } from '../models/index';
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export declare class AuthApi extends runtime.BaseAPI {
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getAuthTokenInfo.md) %} {% note info \"Метод доступен только для Api-Key-токена.\" %} {% endnote %} Возвращает информацию о переданном токене авторизации. {% include notitle [limit](../../_auto/method_limits/getAuthTokenInfo.md) %}
|
||||
* Получение информации о токене авторизации
|
||||
*/
|
||||
getAuthTokenInfoRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetTokenInfoResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getAuthTokenInfo.md) %} {% note info \"Метод доступен только для Api-Key-токена.\" %} {% endnote %} Возвращает информацию о переданном токене авторизации. {% include notitle [limit](../../_auto/method_limits/getAuthTokenInfo.md) %}
|
||||
* Получение информации о токене авторизации
|
||||
*/
|
||||
getAuthTokenInfo(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetTokenInfoResponse>;
|
||||
}
|
||||
67
dist/apis/AuthApi.js
vendored
Normal file
67
dist/apis/AuthApi.js
vendored
Normal file
@@ -0,0 +1,67 @@
|
||||
"use strict";
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* API Яндекс Маркета для продавцов
|
||||
* API Яндекс Маркета помогает продавцам автоматизировать и упростить работу с маркетплейсом. В числе возможностей интеграции: * управление каталогом товаров и витриной, * обработка заказов, * изменение настроек магазина, * получение отчетов.
|
||||
*
|
||||
* The version of the OpenAPI document: LATEST
|
||||
*
|
||||
*
|
||||
* 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.AuthApi = void 0;
|
||||
const runtime = require("../runtime");
|
||||
const index_1 = require("../models/index");
|
||||
/**
|
||||
*
|
||||
*/
|
||||
class AuthApi extends runtime.BaseAPI {
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getAuthTokenInfo.md) %} {% note info \"Метод доступен только для Api-Key-токена.\" %} {% endnote %} Возвращает информацию о переданном токене авторизации. {% include notitle [limit](../../_auto/method_limits/getAuthTokenInfo.md) %}
|
||||
* Получение информации о токене авторизации
|
||||
*/
|
||||
getAuthTokenInfoRaw(initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const queryParameters = {};
|
||||
const headerParameters = {};
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v2/auth/token`,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.GetTokenInfoResponseFromJSON)(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getAuthTokenInfo.md) %} {% note info \"Метод доступен только для Api-Key-токена.\" %} {% endnote %} Возвращает информацию о переданном токене авторизации. {% include notitle [limit](../../_auto/method_limits/getAuthTokenInfo.md) %}
|
||||
* Получение информации о токене авторизации
|
||||
*/
|
||||
getAuthTokenInfo(initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.getAuthTokenInfoRaw(initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
}
|
||||
exports.AuthApi = AuthApi;
|
||||
76
dist/apis/BidsApi.d.ts
vendored
Normal file
76
dist/apis/BidsApi.d.ts
vendored
Normal file
@@ -0,0 +1,76 @@
|
||||
/**
|
||||
* API Яндекс Маркета для продавцов
|
||||
* API Яндекс Маркета помогает продавцам автоматизировать и упростить работу с маркетплейсом. В числе возможностей интеграции: * управление каталогом товаров и витриной, * обработка заказов, * изменение настроек магазина, * получение отчетов.
|
||||
*
|
||||
* The version of the OpenAPI document: LATEST
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
import * as runtime from '../runtime';
|
||||
import type { EmptyApiResponse, GetBidsInfoRequest, GetBidsInfoResponse, GetBidsRecommendationsRequest, GetBidsRecommendationsResponse, PutSkuBidsRequest } from '../models/index';
|
||||
export interface BidsApiGetBidsInfoForBusinessRequest {
|
||||
businessId: number;
|
||||
pageToken?: string;
|
||||
limit?: number;
|
||||
getBidsInfoRequest?: GetBidsInfoRequest;
|
||||
}
|
||||
export interface BidsApiGetBidsRecommendationsOperationRequest {
|
||||
businessId: number;
|
||||
getBidsRecommendationsRequest: GetBidsRecommendationsRequest;
|
||||
}
|
||||
export interface BidsApiPutBidsForBusinessRequest {
|
||||
businessId: number;
|
||||
putSkuBidsRequest: PutSkuBidsRequest;
|
||||
}
|
||||
export interface BidsApiPutBidsForCampaignRequest {
|
||||
campaignId: number;
|
||||
putSkuBidsRequest: PutSkuBidsRequest;
|
||||
}
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export declare class BidsApi extends runtime.BaseAPI {
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getBidsInfoForBusiness.md) %} Возвращает значения ставок для заданных товаров. {% note warning \"Получить информацию по кампаниям, созданным в кабинете, не получится\" %} В ответе возвращаются значения только тех ставок, которые вы установили через запрос [PUT v2/businesses/{businessId}/bids](../../reference/bids/putBidsForBusiness.md). {% endnote %} {% include notitle [limit](../../_auto/method_limits/getBidsInfoForBusiness.md) %}
|
||||
* Информация об установленных ставках
|
||||
*/
|
||||
getBidsInfoForBusinessRaw(requestParameters: BidsApiGetBidsInfoForBusinessRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetBidsInfoResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getBidsInfoForBusiness.md) %} Возвращает значения ставок для заданных товаров. {% note warning \"Получить информацию по кампаниям, созданным в кабинете, не получится\" %} В ответе возвращаются значения только тех ставок, которые вы установили через запрос [PUT v2/businesses/{businessId}/bids](../../reference/bids/putBidsForBusiness.md). {% endnote %} {% include notitle [limit](../../_auto/method_limits/getBidsInfoForBusiness.md) %}
|
||||
* Информация об установленных ставках
|
||||
*/
|
||||
getBidsInfoForBusiness(businessId: number, pageToken?: string, limit?: number, getBidsInfoRequest?: GetBidsInfoRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetBidsInfoResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getBidsRecommendations.md) %} Возвращает рекомендованные ставки для заданных товаров, что обеспечивает вашим предложениям определенную долю показов, и дополнительные инструменты продвижения. Для одного товара может возвращаться одна рекомендованная ставка или несколько. Во втором случае разные ставки предназначены для достижения разной доли показов и получения дополнительных инструментов продвижения. Если товар только добавлен в каталог, но пока не продается, рекомендованной ставки для него не будет. В одном запросе может быть максимум 1500 товаров. {% include notitle [limit](../../_auto/method_limits/getBidsRecommendations.md) %}
|
||||
* Рекомендованные ставки для заданных товаров
|
||||
*/
|
||||
getBidsRecommendationsRaw(requestParameters: BidsApiGetBidsRecommendationsOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetBidsRecommendationsResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getBidsRecommendations.md) %} Возвращает рекомендованные ставки для заданных товаров, что обеспечивает вашим предложениям определенную долю показов, и дополнительные инструменты продвижения. Для одного товара может возвращаться одна рекомендованная ставка или несколько. Во втором случае разные ставки предназначены для достижения разной доли показов и получения дополнительных инструментов продвижения. Если товар только добавлен в каталог, но пока не продается, рекомендованной ставки для него не будет. В одном запросе может быть максимум 1500 товаров. {% include notitle [limit](../../_auto/method_limits/getBidsRecommendations.md) %}
|
||||
* Рекомендованные ставки для заданных товаров
|
||||
*/
|
||||
getBidsRecommendations(businessId: number, getBidsRecommendationsRequest: GetBidsRecommendationsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetBidsRecommendationsResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/putBidsForBusiness.md) %} Запускает буст продаж — создает и включает кампанию, добавляет в нее товары и назначает на них ставки. {% cut \"Как в кабинете выглядит кампания, созданная через API\" %}  {% endcut %} При первом использовании запроса Маркет: создаст единую на все магазины бизнес-аккаунта кампанию, добавит в нее товары с указанными ставками, включит для них ценовую стратегию и запустит продвижение. Повторное использование запроса позволит обновить ставки на товары в этой кампании или добавить новые. Подробнее о ценовой стратегии читайте в [Справке Маркета для продавцов](https://yandex.ru/support/marketplace/marketing/campaigns.html#price-strategy). Если товара с указанным SKU нет, он будет проигнорирован. Если в будущем в каталоге появится товар с таким SKU, он автоматически будет добавлен в кампанию с указанной ставкой. Запрос всегда работает с одной и той же созданной через API кампанией. Если в кабинете удалить ее, при следующем выполнении запроса Маркет создаст новую. Другими кампаниями управлять через API не получится. У созданной через API кампании всегда наибольший приоритет над остальными — изменить его нельзя. Выполнение запроса включает кампанию и ценовую стратегию, если они были отключены. Внести другие изменения в созданную через API кампанию можно в кабинете: * выключить или включить кампанию; * изменить ее название; * выключить или включить ценовую стратегию. Чтобы остановить продвижение отдельных товаров и удалить их из кампании, передайте для них нулевую ставку в параметре `bid`. Подробнее о том, как работает буст продаж, читайте в [Справке Маркета для продавцов](https://yandex.ru/support/marketplace/marketing/campaigns.html). Узнать расходы на буст продаж можно с помощью запроса [POST v2/campaigns/{campaignId}/stats/orders](../../reference/orders-stats/getOrdersStats.md). Сумма содержится в поле `bidFee`. {% note info \"Данные обновляются не мгновенно\" %} Это занимает до нескольких минут. {% endnote %} {% include notitle [limit](../../_auto/method_limits/putBidsForBusiness.md) %}
|
||||
* Включение буста продаж и установка ставок
|
||||
*/
|
||||
putBidsForBusinessRaw(requestParameters: BidsApiPutBidsForBusinessRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<EmptyApiResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/putBidsForBusiness.md) %} Запускает буст продаж — создает и включает кампанию, добавляет в нее товары и назначает на них ставки. {% cut \"Как в кабинете выглядит кампания, созданная через API\" %}  {% endcut %} При первом использовании запроса Маркет: создаст единую на все магазины бизнес-аккаунта кампанию, добавит в нее товары с указанными ставками, включит для них ценовую стратегию и запустит продвижение. Повторное использование запроса позволит обновить ставки на товары в этой кампании или добавить новые. Подробнее о ценовой стратегии читайте в [Справке Маркета для продавцов](https://yandex.ru/support/marketplace/marketing/campaigns.html#price-strategy). Если товара с указанным SKU нет, он будет проигнорирован. Если в будущем в каталоге появится товар с таким SKU, он автоматически будет добавлен в кампанию с указанной ставкой. Запрос всегда работает с одной и той же созданной через API кампанией. Если в кабинете удалить ее, при следующем выполнении запроса Маркет создаст новую. Другими кампаниями управлять через API не получится. У созданной через API кампании всегда наибольший приоритет над остальными — изменить его нельзя. Выполнение запроса включает кампанию и ценовую стратегию, если они были отключены. Внести другие изменения в созданную через API кампанию можно в кабинете: * выключить или включить кампанию; * изменить ее название; * выключить или включить ценовую стратегию. Чтобы остановить продвижение отдельных товаров и удалить их из кампании, передайте для них нулевую ставку в параметре `bid`. Подробнее о том, как работает буст продаж, читайте в [Справке Маркета для продавцов](https://yandex.ru/support/marketplace/marketing/campaigns.html). Узнать расходы на буст продаж можно с помощью запроса [POST v2/campaigns/{campaignId}/stats/orders](../../reference/orders-stats/getOrdersStats.md). Сумма содержится в поле `bidFee`. {% note info \"Данные обновляются не мгновенно\" %} Это занимает до нескольких минут. {% endnote %} {% include notitle [limit](../../_auto/method_limits/putBidsForBusiness.md) %}
|
||||
* Включение буста продаж и установка ставок
|
||||
*/
|
||||
putBidsForBusiness(businessId: number, putSkuBidsRequest: PutSkuBidsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<EmptyApiResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/putBidsForCampaign.md) %} Запускает буст продаж в указанном магазине — создает и включает кампанию, добавляет в нее товары и назначает на них ставки. При первом использовании запроса Маркет: создаст кампанию, добавит в нее товары с указанными ставками для заданного магазина, включит для них ценовую стратегию и запустит продвижение. Повторное использование запроса позволит обновить ставки на товары в этой кампании или добавить новые. Подробнее о ценовой стратегии читайте в [Справке Маркета для продавцов](https://yandex.ru/support/marketplace/marketing/campaigns.html#price-strategy). Если товара с указанным SKU нет, он будет проигнорирован. Если в будущем в каталоге появится товар с таким SKU, он автоматически будет добавлен в кампанию с указанной ставкой. Запрос всегда работает с одной и той же кампанией, созданной через этот запрос или [PUT v2/businesses/{businessId}/bids](/reference/bids/putBidsForBusiness). Если в кабинете удалить ее, при следующем выполнении запроса Маркет создаст новую. У созданной через API кампании всегда наибольший приоритет над остальными — изменить его нельзя. Выполнение запроса включает кампанию и ценовую стратегию, если они были отключены. Внести другие изменения в созданную через API кампанию можно в кабинете: * выключить или включить кампанию; * изменить ее название; * выключить или включить ценовую стратегию. Чтобы остановить продвижение отдельных товаров и удалить их из кампании, передайте для них нулевую ставку в параметре `bid`. Подробнее о том, как работает буст продаж, читайте в [Справке Маркета для продавцов](https://yandex.ru/support/marketplace/marketing/campaigns.html). Узнать расходы на буст продаж можно с помощью запроса [POST v2/campaigns/{campaignId}/stats/orders](../../reference/orders-stats/getOrdersStats.md). Сумма содержится в поле `bidFee`. {% note info \"Данные обновляются не мгновенно\" %} Это занимает до нескольких минут. {% endnote %} {% include notitle [limit](../../_auto/method_limits/putBidsForCampaign.md) %}
|
||||
* Включение буста продаж и установка ставок для магазина
|
||||
*/
|
||||
putBidsForCampaignRaw(requestParameters: BidsApiPutBidsForCampaignRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<EmptyApiResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/putBidsForCampaign.md) %} Запускает буст продаж в указанном магазине — создает и включает кампанию, добавляет в нее товары и назначает на них ставки. При первом использовании запроса Маркет: создаст кампанию, добавит в нее товары с указанными ставками для заданного магазина, включит для них ценовую стратегию и запустит продвижение. Повторное использование запроса позволит обновить ставки на товары в этой кампании или добавить новые. Подробнее о ценовой стратегии читайте в [Справке Маркета для продавцов](https://yandex.ru/support/marketplace/marketing/campaigns.html#price-strategy). Если товара с указанным SKU нет, он будет проигнорирован. Если в будущем в каталоге появится товар с таким SKU, он автоматически будет добавлен в кампанию с указанной ставкой. Запрос всегда работает с одной и той же кампанией, созданной через этот запрос или [PUT v2/businesses/{businessId}/bids](/reference/bids/putBidsForBusiness). Если в кабинете удалить ее, при следующем выполнении запроса Маркет создаст новую. У созданной через API кампании всегда наибольший приоритет над остальными — изменить его нельзя. Выполнение запроса включает кампанию и ценовую стратегию, если они были отключены. Внести другие изменения в созданную через API кампанию можно в кабинете: * выключить или включить кампанию; * изменить ее название; * выключить или включить ценовую стратегию. Чтобы остановить продвижение отдельных товаров и удалить их из кампании, передайте для них нулевую ставку в параметре `bid`. Подробнее о том, как работает буст продаж, читайте в [Справке Маркета для продавцов](https://yandex.ru/support/marketplace/marketing/campaigns.html). Узнать расходы на буст продаж можно с помощью запроса [POST v2/campaigns/{campaignId}/stats/orders](../../reference/orders-stats/getOrdersStats.md). Сумма содержится в поле `bidFee`. {% note info \"Данные обновляются не мгновенно\" %} Это занимает до нескольких минут. {% endnote %} {% include notitle [limit](../../_auto/method_limits/putBidsForCampaign.md) %}
|
||||
* Включение буста продаж и установка ставок для магазина
|
||||
*/
|
||||
putBidsForCampaign(campaignId: number, putSkuBidsRequest: PutSkuBidsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<EmptyApiResponse>;
|
||||
}
|
||||
204
dist/apis/BidsApi.js
vendored
Normal file
204
dist/apis/BidsApi.js
vendored
Normal file
@@ -0,0 +1,204 @@
|
||||
"use strict";
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* API Яндекс Маркета для продавцов
|
||||
* API Яндекс Маркета помогает продавцам автоматизировать и упростить работу с маркетплейсом. В числе возможностей интеграции: * управление каталогом товаров и витриной, * обработка заказов, * изменение настроек магазина, * получение отчетов.
|
||||
*
|
||||
* The version of the OpenAPI document: LATEST
|
||||
*
|
||||
*
|
||||
* 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.BidsApi = void 0;
|
||||
const runtime = require("../runtime");
|
||||
const index_1 = require("../models/index");
|
||||
/**
|
||||
*
|
||||
*/
|
||||
class BidsApi extends runtime.BaseAPI {
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getBidsInfoForBusiness.md) %} Возвращает значения ставок для заданных товаров. {% note warning \"Получить информацию по кампаниям, созданным в кабинете, не получится\" %} В ответе возвращаются значения только тех ставок, которые вы установили через запрос [PUT v2/businesses/{businessId}/bids](../../reference/bids/putBidsForBusiness.md). {% endnote %} {% include notitle [limit](../../_auto/method_limits/getBidsInfoForBusiness.md) %}
|
||||
* Информация об установленных ставках
|
||||
*/
|
||||
getBidsInfoForBusinessRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['businessId'] == null) {
|
||||
throw new runtime.RequiredError('businessId', 'Required parameter "businessId" was null or undefined when calling getBidsInfoForBusiness().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
if (requestParameters['pageToken'] != null) {
|
||||
queryParameters['pageToken'] = requestParameters['pageToken'];
|
||||
}
|
||||
if (requestParameters['limit'] != null) {
|
||||
queryParameters['limit'] = requestParameters['limit'];
|
||||
}
|
||||
const headerParameters = {};
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v2/businesses/{businessId}/bids/info`.replace(`{${"businessId"}}`, encodeURIComponent(String(requestParameters['businessId']))),
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: (0, index_1.GetBidsInfoRequestToJSON)(requestParameters['getBidsInfoRequest']),
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.GetBidsInfoResponseFromJSON)(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getBidsInfoForBusiness.md) %} Возвращает значения ставок для заданных товаров. {% note warning \"Получить информацию по кампаниям, созданным в кабинете, не получится\" %} В ответе возвращаются значения только тех ставок, которые вы установили через запрос [PUT v2/businesses/{businessId}/bids](../../reference/bids/putBidsForBusiness.md). {% endnote %} {% include notitle [limit](../../_auto/method_limits/getBidsInfoForBusiness.md) %}
|
||||
* Информация об установленных ставках
|
||||
*/
|
||||
getBidsInfoForBusiness(businessId, pageToken, limit, getBidsInfoRequest, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.getBidsInfoForBusinessRaw({ businessId: businessId, pageToken: pageToken, limit: limit, getBidsInfoRequest: getBidsInfoRequest }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getBidsRecommendations.md) %} Возвращает рекомендованные ставки для заданных товаров, что обеспечивает вашим предложениям определенную долю показов, и дополнительные инструменты продвижения. Для одного товара может возвращаться одна рекомендованная ставка или несколько. Во втором случае разные ставки предназначены для достижения разной доли показов и получения дополнительных инструментов продвижения. Если товар только добавлен в каталог, но пока не продается, рекомендованной ставки для него не будет. В одном запросе может быть максимум 1500 товаров. {% include notitle [limit](../../_auto/method_limits/getBidsRecommendations.md) %}
|
||||
* Рекомендованные ставки для заданных товаров
|
||||
*/
|
||||
getBidsRecommendationsRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['businessId'] == null) {
|
||||
throw new runtime.RequiredError('businessId', 'Required parameter "businessId" was null or undefined when calling getBidsRecommendations().');
|
||||
}
|
||||
if (requestParameters['getBidsRecommendationsRequest'] == null) {
|
||||
throw new runtime.RequiredError('getBidsRecommendationsRequest', 'Required parameter "getBidsRecommendationsRequest" was null or undefined when calling getBidsRecommendations().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
const headerParameters = {};
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v2/businesses/{businessId}/bids/recommendations`.replace(`{${"businessId"}}`, encodeURIComponent(String(requestParameters['businessId']))),
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: (0, index_1.GetBidsRecommendationsRequestToJSON)(requestParameters['getBidsRecommendationsRequest']),
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.GetBidsRecommendationsResponseFromJSON)(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getBidsRecommendations.md) %} Возвращает рекомендованные ставки для заданных товаров, что обеспечивает вашим предложениям определенную долю показов, и дополнительные инструменты продвижения. Для одного товара может возвращаться одна рекомендованная ставка или несколько. Во втором случае разные ставки предназначены для достижения разной доли показов и получения дополнительных инструментов продвижения. Если товар только добавлен в каталог, но пока не продается, рекомендованной ставки для него не будет. В одном запросе может быть максимум 1500 товаров. {% include notitle [limit](../../_auto/method_limits/getBidsRecommendations.md) %}
|
||||
* Рекомендованные ставки для заданных товаров
|
||||
*/
|
||||
getBidsRecommendations(businessId, getBidsRecommendationsRequest, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.getBidsRecommendationsRaw({ businessId: businessId, getBidsRecommendationsRequest: getBidsRecommendationsRequest }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/putBidsForBusiness.md) %} Запускает буст продаж — создает и включает кампанию, добавляет в нее товары и назначает на них ставки. {% cut \"Как в кабинете выглядит кампания, созданная через API\" %}  {% endcut %} При первом использовании запроса Маркет: создаст единую на все магазины бизнес-аккаунта кампанию, добавит в нее товары с указанными ставками, включит для них ценовую стратегию и запустит продвижение. Повторное использование запроса позволит обновить ставки на товары в этой кампании или добавить новые. Подробнее о ценовой стратегии читайте в [Справке Маркета для продавцов](https://yandex.ru/support/marketplace/marketing/campaigns.html#price-strategy). Если товара с указанным SKU нет, он будет проигнорирован. Если в будущем в каталоге появится товар с таким SKU, он автоматически будет добавлен в кампанию с указанной ставкой. Запрос всегда работает с одной и той же созданной через API кампанией. Если в кабинете удалить ее, при следующем выполнении запроса Маркет создаст новую. Другими кампаниями управлять через API не получится. У созданной через API кампании всегда наибольший приоритет над остальными — изменить его нельзя. Выполнение запроса включает кампанию и ценовую стратегию, если они были отключены. Внести другие изменения в созданную через API кампанию можно в кабинете: * выключить или включить кампанию; * изменить ее название; * выключить или включить ценовую стратегию. Чтобы остановить продвижение отдельных товаров и удалить их из кампании, передайте для них нулевую ставку в параметре `bid`. Подробнее о том, как работает буст продаж, читайте в [Справке Маркета для продавцов](https://yandex.ru/support/marketplace/marketing/campaigns.html). Узнать расходы на буст продаж можно с помощью запроса [POST v2/campaigns/{campaignId}/stats/orders](../../reference/orders-stats/getOrdersStats.md). Сумма содержится в поле `bidFee`. {% note info \"Данные обновляются не мгновенно\" %} Это занимает до нескольких минут. {% endnote %} {% include notitle [limit](../../_auto/method_limits/putBidsForBusiness.md) %}
|
||||
* Включение буста продаж и установка ставок
|
||||
*/
|
||||
putBidsForBusinessRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['businessId'] == null) {
|
||||
throw new runtime.RequiredError('businessId', 'Required parameter "businessId" was null or undefined when calling putBidsForBusiness().');
|
||||
}
|
||||
if (requestParameters['putSkuBidsRequest'] == null) {
|
||||
throw new runtime.RequiredError('putSkuBidsRequest', 'Required parameter "putSkuBidsRequest" was null or undefined when calling putBidsForBusiness().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
const headerParameters = {};
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v2/businesses/{businessId}/bids`.replace(`{${"businessId"}}`, encodeURIComponent(String(requestParameters['businessId']))),
|
||||
method: 'PUT',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: (0, index_1.PutSkuBidsRequestToJSON)(requestParameters['putSkuBidsRequest']),
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.EmptyApiResponseFromJSON)(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/putBidsForBusiness.md) %} Запускает буст продаж — создает и включает кампанию, добавляет в нее товары и назначает на них ставки. {% cut \"Как в кабинете выглядит кампания, созданная через API\" %}  {% endcut %} При первом использовании запроса Маркет: создаст единую на все магазины бизнес-аккаунта кампанию, добавит в нее товары с указанными ставками, включит для них ценовую стратегию и запустит продвижение. Повторное использование запроса позволит обновить ставки на товары в этой кампании или добавить новые. Подробнее о ценовой стратегии читайте в [Справке Маркета для продавцов](https://yandex.ru/support/marketplace/marketing/campaigns.html#price-strategy). Если товара с указанным SKU нет, он будет проигнорирован. Если в будущем в каталоге появится товар с таким SKU, он автоматически будет добавлен в кампанию с указанной ставкой. Запрос всегда работает с одной и той же созданной через API кампанией. Если в кабинете удалить ее, при следующем выполнении запроса Маркет создаст новую. Другими кампаниями управлять через API не получится. У созданной через API кампании всегда наибольший приоритет над остальными — изменить его нельзя. Выполнение запроса включает кампанию и ценовую стратегию, если они были отключены. Внести другие изменения в созданную через API кампанию можно в кабинете: * выключить или включить кампанию; * изменить ее название; * выключить или включить ценовую стратегию. Чтобы остановить продвижение отдельных товаров и удалить их из кампании, передайте для них нулевую ставку в параметре `bid`. Подробнее о том, как работает буст продаж, читайте в [Справке Маркета для продавцов](https://yandex.ru/support/marketplace/marketing/campaigns.html). Узнать расходы на буст продаж можно с помощью запроса [POST v2/campaigns/{campaignId}/stats/orders](../../reference/orders-stats/getOrdersStats.md). Сумма содержится в поле `bidFee`. {% note info \"Данные обновляются не мгновенно\" %} Это занимает до нескольких минут. {% endnote %} {% include notitle [limit](../../_auto/method_limits/putBidsForBusiness.md) %}
|
||||
* Включение буста продаж и установка ставок
|
||||
*/
|
||||
putBidsForBusiness(businessId, putSkuBidsRequest, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.putBidsForBusinessRaw({ businessId: businessId, putSkuBidsRequest: putSkuBidsRequest }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/putBidsForCampaign.md) %} Запускает буст продаж в указанном магазине — создает и включает кампанию, добавляет в нее товары и назначает на них ставки. При первом использовании запроса Маркет: создаст кампанию, добавит в нее товары с указанными ставками для заданного магазина, включит для них ценовую стратегию и запустит продвижение. Повторное использование запроса позволит обновить ставки на товары в этой кампании или добавить новые. Подробнее о ценовой стратегии читайте в [Справке Маркета для продавцов](https://yandex.ru/support/marketplace/marketing/campaigns.html#price-strategy). Если товара с указанным SKU нет, он будет проигнорирован. Если в будущем в каталоге появится товар с таким SKU, он автоматически будет добавлен в кампанию с указанной ставкой. Запрос всегда работает с одной и той же кампанией, созданной через этот запрос или [PUT v2/businesses/{businessId}/bids](/reference/bids/putBidsForBusiness). Если в кабинете удалить ее, при следующем выполнении запроса Маркет создаст новую. У созданной через API кампании всегда наибольший приоритет над остальными — изменить его нельзя. Выполнение запроса включает кампанию и ценовую стратегию, если они были отключены. Внести другие изменения в созданную через API кампанию можно в кабинете: * выключить или включить кампанию; * изменить ее название; * выключить или включить ценовую стратегию. Чтобы остановить продвижение отдельных товаров и удалить их из кампании, передайте для них нулевую ставку в параметре `bid`. Подробнее о том, как работает буст продаж, читайте в [Справке Маркета для продавцов](https://yandex.ru/support/marketplace/marketing/campaigns.html). Узнать расходы на буст продаж можно с помощью запроса [POST v2/campaigns/{campaignId}/stats/orders](../../reference/orders-stats/getOrdersStats.md). Сумма содержится в поле `bidFee`. {% note info \"Данные обновляются не мгновенно\" %} Это занимает до нескольких минут. {% endnote %} {% include notitle [limit](../../_auto/method_limits/putBidsForCampaign.md) %}
|
||||
* Включение буста продаж и установка ставок для магазина
|
||||
*/
|
||||
putBidsForCampaignRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['campaignId'] == null) {
|
||||
throw new runtime.RequiredError('campaignId', 'Required parameter "campaignId" was null or undefined when calling putBidsForCampaign().');
|
||||
}
|
||||
if (requestParameters['putSkuBidsRequest'] == null) {
|
||||
throw new runtime.RequiredError('putSkuBidsRequest', 'Required parameter "putSkuBidsRequest" was null or undefined when calling putBidsForCampaign().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
const headerParameters = {};
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v2/campaigns/{campaignId}/bids`.replace(`{${"campaignId"}}`, encodeURIComponent(String(requestParameters['campaignId']))),
|
||||
method: 'PUT',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: (0, index_1.PutSkuBidsRequestToJSON)(requestParameters['putSkuBidsRequest']),
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.EmptyApiResponseFromJSON)(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/putBidsForCampaign.md) %} Запускает буст продаж в указанном магазине — создает и включает кампанию, добавляет в нее товары и назначает на них ставки. При первом использовании запроса Маркет: создаст кампанию, добавит в нее товары с указанными ставками для заданного магазина, включит для них ценовую стратегию и запустит продвижение. Повторное использование запроса позволит обновить ставки на товары в этой кампании или добавить новые. Подробнее о ценовой стратегии читайте в [Справке Маркета для продавцов](https://yandex.ru/support/marketplace/marketing/campaigns.html#price-strategy). Если товара с указанным SKU нет, он будет проигнорирован. Если в будущем в каталоге появится товар с таким SKU, он автоматически будет добавлен в кампанию с указанной ставкой. Запрос всегда работает с одной и той же кампанией, созданной через этот запрос или [PUT v2/businesses/{businessId}/bids](/reference/bids/putBidsForBusiness). Если в кабинете удалить ее, при следующем выполнении запроса Маркет создаст новую. У созданной через API кампании всегда наибольший приоритет над остальными — изменить его нельзя. Выполнение запроса включает кампанию и ценовую стратегию, если они были отключены. Внести другие изменения в созданную через API кампанию можно в кабинете: * выключить или включить кампанию; * изменить ее название; * выключить или включить ценовую стратегию. Чтобы остановить продвижение отдельных товаров и удалить их из кампании, передайте для них нулевую ставку в параметре `bid`. Подробнее о том, как работает буст продаж, читайте в [Справке Маркета для продавцов](https://yandex.ru/support/marketplace/marketing/campaigns.html). Узнать расходы на буст продаж можно с помощью запроса [POST v2/campaigns/{campaignId}/stats/orders](../../reference/orders-stats/getOrdersStats.md). Сумма содержится в поле `bidFee`. {% note info \"Данные обновляются не мгновенно\" %} Это занимает до нескольких минут. {% endnote %} {% include notitle [limit](../../_auto/method_limits/putBidsForCampaign.md) %}
|
||||
* Включение буста продаж и установка ставок для магазина
|
||||
*/
|
||||
putBidsForCampaign(campaignId, putSkuBidsRequest, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.putBidsForCampaignRaw({ campaignId: campaignId, putSkuBidsRequest: putSkuBidsRequest }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
}
|
||||
exports.BidsApi = BidsApi;
|
||||
106
dist/apis/BusinessOfferMappingsApi.d.ts
vendored
Normal file
106
dist/apis/BusinessOfferMappingsApi.d.ts
vendored
Normal file
@@ -0,0 +1,106 @@
|
||||
/**
|
||||
* API Яндекс Маркета для продавцов
|
||||
* API Яндекс Маркета помогает продавцам автоматизировать и упростить работу с маркетплейсом. В числе возможностей интеграции: * управление каталогом товаров и витриной, * обработка заказов, * изменение настроек магазина, * получение отчетов.
|
||||
*
|
||||
* The version of the OpenAPI document: LATEST
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
import * as runtime from '../runtime';
|
||||
import type { AddOffersToArchiveRequest, AddOffersToArchiveResponse, CatalogLanguageType, DeleteOffersFromArchiveRequest, DeleteOffersFromArchiveResponse, DeleteOffersRequest, DeleteOffersResponse, GenerateOfferBarcodesRequest, GenerateOfferBarcodesResponse, GetOfferMappingsRequest, GetOfferMappingsResponse, UpdateOfferMappingsRequest, UpdateOfferMappingsResponse } from '../models/index';
|
||||
export interface BusinessOfferMappingsApiAddOffersToArchiveOperationRequest {
|
||||
businessId: number;
|
||||
addOffersToArchiveRequest: AddOffersToArchiveRequest;
|
||||
}
|
||||
export interface BusinessOfferMappingsApiDeleteOffersOperationRequest {
|
||||
businessId: number;
|
||||
deleteOffersRequest: DeleteOffersRequest;
|
||||
}
|
||||
export interface BusinessOfferMappingsApiDeleteOffersFromArchiveOperationRequest {
|
||||
businessId: number;
|
||||
deleteOffersFromArchiveRequest: DeleteOffersFromArchiveRequest;
|
||||
}
|
||||
export interface BusinessOfferMappingsApiGenerateOfferBarcodesOperationRequest {
|
||||
businessId: number;
|
||||
generateOfferBarcodesRequest: GenerateOfferBarcodesRequest;
|
||||
}
|
||||
export interface BusinessOfferMappingsApiGetOfferMappingsOperationRequest {
|
||||
businessId: number;
|
||||
pageToken?: string;
|
||||
limit?: number;
|
||||
language?: CatalogLanguageType;
|
||||
getOfferMappingsRequest?: GetOfferMappingsRequest;
|
||||
}
|
||||
export interface BusinessOfferMappingsApiUpdateOfferMappingsOperationRequest {
|
||||
businessId: number;
|
||||
updateOfferMappingsRequest: UpdateOfferMappingsRequest;
|
||||
language?: CatalogLanguageType;
|
||||
}
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export declare class BusinessOfferMappingsApi extends runtime.BaseAPI {
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/addOffersToArchive.md) %} Помещает товары в архив. Товары, помещенные в архив, скрыты с витрины во всех магазинах кабинета. {% note warning \"В архив нельзя отправить товар, который хранится на складе Маркета\" %} Вначале такой товар нужно распродать или вывезти. {% endnote %} {% include notitle [limit](../../_auto/method_limits/addOffersToArchive.md) %}
|
||||
* Добавление товаров в архив
|
||||
*/
|
||||
addOffersToArchiveRaw(requestParameters: BusinessOfferMappingsApiAddOffersToArchiveOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AddOffersToArchiveResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/addOffersToArchive.md) %} Помещает товары в архив. Товары, помещенные в архив, скрыты с витрины во всех магазинах кабинета. {% note warning \"В архив нельзя отправить товар, который хранится на складе Маркета\" %} Вначале такой товар нужно распродать или вывезти. {% endnote %} {% include notitle [limit](../../_auto/method_limits/addOffersToArchive.md) %}
|
||||
* Добавление товаров в архив
|
||||
*/
|
||||
addOffersToArchive(businessId: number, addOffersToArchiveRequest: AddOffersToArchiveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AddOffersToArchiveResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/deleteOffers.md) %} Удаляет товары из каталога. {% include notitle [limit](../../_auto/method_limits/deleteOffers.md) %}
|
||||
* Удаление товаров из каталога
|
||||
*/
|
||||
deleteOffersRaw(requestParameters: BusinessOfferMappingsApiDeleteOffersOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DeleteOffersResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/deleteOffers.md) %} Удаляет товары из каталога. {% include notitle [limit](../../_auto/method_limits/deleteOffers.md) %}
|
||||
* Удаление товаров из каталога
|
||||
*/
|
||||
deleteOffers(businessId: number, deleteOffersRequest: DeleteOffersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DeleteOffersResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/deleteOffersFromArchive.md) %} Восстанавливает товары из архива. {% include notitle [limit](../../_auto/method_limits/deleteOffersFromArchive.md) %}
|
||||
* Удаление товаров из архива
|
||||
*/
|
||||
deleteOffersFromArchiveRaw(requestParameters: BusinessOfferMappingsApiDeleteOffersFromArchiveOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DeleteOffersFromArchiveResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/deleteOffersFromArchive.md) %} Восстанавливает товары из архива. {% include notitle [limit](../../_auto/method_limits/deleteOffersFromArchive.md) %}
|
||||
* Удаление товаров из архива
|
||||
*/
|
||||
deleteOffersFromArchive(businessId: number, deleteOffersFromArchiveRequest: DeleteOffersFromArchiveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DeleteOffersFromArchiveResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/generateOfferBarcodes.md) %} Генерирует штрихкоды и присваивает их указанным товарам. Если у товара на упаковке уже есть штрихкод производителя, передайте его в параметре `barcodes` в методе [POST v2/businesses/{businessId}/offer-mappings/update](../../reference/business-offer-mappings/updateOfferMappings.md). Генерировать новый не нужно. {% include notitle [limit](../../_auto/method_limits/generateOfferBarcodes.md) %}
|
||||
* Генерация штрихкодов
|
||||
*/
|
||||
generateOfferBarcodesRaw(requestParameters: BusinessOfferMappingsApiGenerateOfferBarcodesOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GenerateOfferBarcodesResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/generateOfferBarcodes.md) %} Генерирует штрихкоды и присваивает их указанным товарам. Если у товара на упаковке уже есть штрихкод производителя, передайте его в параметре `barcodes` в методе [POST v2/businesses/{businessId}/offer-mappings/update](../../reference/business-offer-mappings/updateOfferMappings.md). Генерировать новый не нужно. {% include notitle [limit](../../_auto/method_limits/generateOfferBarcodes.md) %}
|
||||
* Генерация штрихкодов
|
||||
*/
|
||||
generateOfferBarcodes(businessId: number, generateOfferBarcodesRequest: GenerateOfferBarcodesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GenerateOfferBarcodesResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getOfferMappings.md) %} Возвращает список товаров в каталоге, их категории на Маркете и характеристики каждого товара. Можно использовать тремя способами: * задать список интересующих SKU; * задать фильтр — в этом случае результаты возвращаются постранично; * не передавать тело запроса, чтобы получить список всех товаров в каталоге. Чтобы получить категорийные характеристики товаров, воспользуйтесь методом [POST v2/businesses/{businessId}/offer-cards](../../reference/content/getOfferCardsContentStatus.md). {% include notitle [limit](../../_auto/method_limits/getOfferMappings.md) %}
|
||||
* Информация о товарах в каталоге
|
||||
*/
|
||||
getOfferMappingsRaw(requestParameters: BusinessOfferMappingsApiGetOfferMappingsOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetOfferMappingsResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getOfferMappings.md) %} Возвращает список товаров в каталоге, их категории на Маркете и характеристики каждого товара. Можно использовать тремя способами: * задать список интересующих SKU; * задать фильтр — в этом случае результаты возвращаются постранично; * не передавать тело запроса, чтобы получить список всех товаров в каталоге. Чтобы получить категорийные характеристики товаров, воспользуйтесь методом [POST v2/businesses/{businessId}/offer-cards](../../reference/content/getOfferCardsContentStatus.md). {% include notitle [limit](../../_auto/method_limits/getOfferMappings.md) %}
|
||||
* Информация о товарах в каталоге
|
||||
*/
|
||||
getOfferMappings(businessId: number, pageToken?: string, limit?: number, language?: CatalogLanguageType, getOfferMappingsRequest?: GetOfferMappingsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetOfferMappingsResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/updateOfferMappings.md) %} Добавляет товары в каталог и передает: * их [листовые категории](*list-categories) на Маркете и категорийные характеристики; * основные характеристики; * цены на товары в кабинете. Также объединяет товары на карточке, редактирует и удаляет информацию об уже добавленных товарах, в том числе цены в кабинете и категории товаров. Список категорий Маркета можно получить с помощью запроса [POST v2/categories/tree](../../reference/categories/getCategoriesTree.md), а характеристики товаров по категориям с помощью [POST v2/category/{categoryId}/parameters](../../reference/content/getCategoryContentParameters.md). {% cut \"Добавить новый товар\" %} Передайте его с новым идентификатором, который раньше никогда не использовался в каталоге. Обязательно укажите параметры: `offerId`, `name`, `marketCategoryId`, `pictures`, `vendor`, `description`. Старайтесь сразу передать как можно больше информации — она потребуется Маркету для подбора подходящей карточки или создания новой. Если известно, какой карточке на Маркете соответствует товар, можно сразу указать идентификатор этой карточки (SKU на Маркете) в поле `marketSKU`. **Для продавцов Market Yandex Go:** Когда вы добавляете товары в каталог, указывайте значения параметров `name` и `description` на русском языке. Чтобы на витрине они отображались и на другом языке, еще раз выполните запрос `POST v2/businesses/{businessId}/offer-mappings/update`, где укажите: * язык в параметре `language`; * значения параметров `name` и `description` на указанном языке. Повторно передавать остальные характеристики товара не нужно. {% endcut %} {% cut \"Изменить информацию о товаре\" %} Передайте новые данные, указав в `offerId` SKU товара в вашей системе. Поля, в которых ничего не меняется, можно не передавать. {% endcut %} {% cut \"Удалить переданные ранее параметры товара\" %} В `deleteParameters` укажите значения параметров, которые хотите удалить. Можно передать сразу несколько значений. Для параметров с типом `string` также можно передать пустое значение. {% endcut %} Параметр `offerId` (SKU товара в вашей системе) должен быть **уникальным** для всех товаров, которые вы передаете. {% note warning \"Правила использования SKU\" %} * У каждого товара SKU должен быть свой. * Уже заданный SKU нельзя освободить и использовать заново для другого товара. Каждый товар должен получать новый идентификатор, до того никогда не использовавшийся в вашем каталоге. SKU товара можно изменить в кабинете продавца на Маркете. О том, как это сделать, читайте [в Справке Маркета для продавцов](https://yandex.ru/support2/marketplace/ru/assortment/operations/edit-sku). {% endnote %} {% note info \"Данные в каталоге обновляются не мгновенно\" %} Это занимает до нескольких минут. {% endnote %} {% include notitle [limit](../../_auto/method_limits/updateOfferMappings.md) %}
|
||||
* Добавление товаров в каталог и изменение информации о них
|
||||
*/
|
||||
updateOfferMappingsRaw(requestParameters: BusinessOfferMappingsApiUpdateOfferMappingsOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UpdateOfferMappingsResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/updateOfferMappings.md) %} Добавляет товары в каталог и передает: * их [листовые категории](*list-categories) на Маркете и категорийные характеристики; * основные характеристики; * цены на товары в кабинете. Также объединяет товары на карточке, редактирует и удаляет информацию об уже добавленных товарах, в том числе цены в кабинете и категории товаров. Список категорий Маркета можно получить с помощью запроса [POST v2/categories/tree](../../reference/categories/getCategoriesTree.md), а характеристики товаров по категориям с помощью [POST v2/category/{categoryId}/parameters](../../reference/content/getCategoryContentParameters.md). {% cut \"Добавить новый товар\" %} Передайте его с новым идентификатором, который раньше никогда не использовался в каталоге. Обязательно укажите параметры: `offerId`, `name`, `marketCategoryId`, `pictures`, `vendor`, `description`. Старайтесь сразу передать как можно больше информации — она потребуется Маркету для подбора подходящей карточки или создания новой. Если известно, какой карточке на Маркете соответствует товар, можно сразу указать идентификатор этой карточки (SKU на Маркете) в поле `marketSKU`. **Для продавцов Market Yandex Go:** Когда вы добавляете товары в каталог, указывайте значения параметров `name` и `description` на русском языке. Чтобы на витрине они отображались и на другом языке, еще раз выполните запрос `POST v2/businesses/{businessId}/offer-mappings/update`, где укажите: * язык в параметре `language`; * значения параметров `name` и `description` на указанном языке. Повторно передавать остальные характеристики товара не нужно. {% endcut %} {% cut \"Изменить информацию о товаре\" %} Передайте новые данные, указав в `offerId` SKU товара в вашей системе. Поля, в которых ничего не меняется, можно не передавать. {% endcut %} {% cut \"Удалить переданные ранее параметры товара\" %} В `deleteParameters` укажите значения параметров, которые хотите удалить. Можно передать сразу несколько значений. Для параметров с типом `string` также можно передать пустое значение. {% endcut %} Параметр `offerId` (SKU товара в вашей системе) должен быть **уникальным** для всех товаров, которые вы передаете. {% note warning \"Правила использования SKU\" %} * У каждого товара SKU должен быть свой. * Уже заданный SKU нельзя освободить и использовать заново для другого товара. Каждый товар должен получать новый идентификатор, до того никогда не использовавшийся в вашем каталоге. SKU товара можно изменить в кабинете продавца на Маркете. О том, как это сделать, читайте [в Справке Маркета для продавцов](https://yandex.ru/support2/marketplace/ru/assortment/operations/edit-sku). {% endnote %} {% note info \"Данные в каталоге обновляются не мгновенно\" %} Это занимает до нескольких минут. {% endnote %} {% include notitle [limit](../../_auto/method_limits/updateOfferMappings.md) %}
|
||||
* Добавление товаров в каталог и изменение информации о них
|
||||
*/
|
||||
updateOfferMappings(businessId: number, updateOfferMappingsRequest: UpdateOfferMappingsRequest, language?: CatalogLanguageType, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UpdateOfferMappingsResponse>;
|
||||
}
|
||||
294
dist/apis/BusinessOfferMappingsApi.js
vendored
Normal file
294
dist/apis/BusinessOfferMappingsApi.js
vendored
Normal file
@@ -0,0 +1,294 @@
|
||||
"use strict";
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* API Яндекс Маркета для продавцов
|
||||
* API Яндекс Маркета помогает продавцам автоматизировать и упростить работу с маркетплейсом. В числе возможностей интеграции: * управление каталогом товаров и витриной, * обработка заказов, * изменение настроек магазина, * получение отчетов.
|
||||
*
|
||||
* The version of the OpenAPI document: LATEST
|
||||
*
|
||||
*
|
||||
* 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.BusinessOfferMappingsApi = void 0;
|
||||
const runtime = require("../runtime");
|
||||
const index_1 = require("../models/index");
|
||||
/**
|
||||
*
|
||||
*/
|
||||
class BusinessOfferMappingsApi extends runtime.BaseAPI {
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/addOffersToArchive.md) %} Помещает товары в архив. Товары, помещенные в архив, скрыты с витрины во всех магазинах кабинета. {% note warning \"В архив нельзя отправить товар, который хранится на складе Маркета\" %} Вначале такой товар нужно распродать или вывезти. {% endnote %} {% include notitle [limit](../../_auto/method_limits/addOffersToArchive.md) %}
|
||||
* Добавление товаров в архив
|
||||
*/
|
||||
addOffersToArchiveRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['businessId'] == null) {
|
||||
throw new runtime.RequiredError('businessId', 'Required parameter "businessId" was null or undefined when calling addOffersToArchive().');
|
||||
}
|
||||
if (requestParameters['addOffersToArchiveRequest'] == null) {
|
||||
throw new runtime.RequiredError('addOffersToArchiveRequest', 'Required parameter "addOffersToArchiveRequest" was null or undefined when calling addOffersToArchive().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
const headerParameters = {};
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v2/businesses/{businessId}/offer-mappings/archive`.replace(`{${"businessId"}}`, encodeURIComponent(String(requestParameters['businessId']))),
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: (0, index_1.AddOffersToArchiveRequestToJSON)(requestParameters['addOffersToArchiveRequest']),
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AddOffersToArchiveResponseFromJSON)(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/addOffersToArchive.md) %} Помещает товары в архив. Товары, помещенные в архив, скрыты с витрины во всех магазинах кабинета. {% note warning \"В архив нельзя отправить товар, который хранится на складе Маркета\" %} Вначале такой товар нужно распродать или вывезти. {% endnote %} {% include notitle [limit](../../_auto/method_limits/addOffersToArchive.md) %}
|
||||
* Добавление товаров в архив
|
||||
*/
|
||||
addOffersToArchive(businessId, addOffersToArchiveRequest, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.addOffersToArchiveRaw({ businessId: businessId, addOffersToArchiveRequest: addOffersToArchiveRequest }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/deleteOffers.md) %} Удаляет товары из каталога. {% include notitle [limit](../../_auto/method_limits/deleteOffers.md) %}
|
||||
* Удаление товаров из каталога
|
||||
*/
|
||||
deleteOffersRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['businessId'] == null) {
|
||||
throw new runtime.RequiredError('businessId', 'Required parameter "businessId" was null or undefined when calling deleteOffers().');
|
||||
}
|
||||
if (requestParameters['deleteOffersRequest'] == null) {
|
||||
throw new runtime.RequiredError('deleteOffersRequest', 'Required parameter "deleteOffersRequest" was null or undefined when calling deleteOffers().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
const headerParameters = {};
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v2/businesses/{businessId}/offer-mappings/delete`.replace(`{${"businessId"}}`, encodeURIComponent(String(requestParameters['businessId']))),
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: (0, index_1.DeleteOffersRequestToJSON)(requestParameters['deleteOffersRequest']),
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.DeleteOffersResponseFromJSON)(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/deleteOffers.md) %} Удаляет товары из каталога. {% include notitle [limit](../../_auto/method_limits/deleteOffers.md) %}
|
||||
* Удаление товаров из каталога
|
||||
*/
|
||||
deleteOffers(businessId, deleteOffersRequest, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.deleteOffersRaw({ businessId: businessId, deleteOffersRequest: deleteOffersRequest }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/deleteOffersFromArchive.md) %} Восстанавливает товары из архива. {% include notitle [limit](../../_auto/method_limits/deleteOffersFromArchive.md) %}
|
||||
* Удаление товаров из архива
|
||||
*/
|
||||
deleteOffersFromArchiveRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['businessId'] == null) {
|
||||
throw new runtime.RequiredError('businessId', 'Required parameter "businessId" was null or undefined when calling deleteOffersFromArchive().');
|
||||
}
|
||||
if (requestParameters['deleteOffersFromArchiveRequest'] == null) {
|
||||
throw new runtime.RequiredError('deleteOffersFromArchiveRequest', 'Required parameter "deleteOffersFromArchiveRequest" was null or undefined when calling deleteOffersFromArchive().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
const headerParameters = {};
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v2/businesses/{businessId}/offer-mappings/unarchive`.replace(`{${"businessId"}}`, encodeURIComponent(String(requestParameters['businessId']))),
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: (0, index_1.DeleteOffersFromArchiveRequestToJSON)(requestParameters['deleteOffersFromArchiveRequest']),
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.DeleteOffersFromArchiveResponseFromJSON)(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/deleteOffersFromArchive.md) %} Восстанавливает товары из архива. {% include notitle [limit](../../_auto/method_limits/deleteOffersFromArchive.md) %}
|
||||
* Удаление товаров из архива
|
||||
*/
|
||||
deleteOffersFromArchive(businessId, deleteOffersFromArchiveRequest, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.deleteOffersFromArchiveRaw({ businessId: businessId, deleteOffersFromArchiveRequest: deleteOffersFromArchiveRequest }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/generateOfferBarcodes.md) %} Генерирует штрихкоды и присваивает их указанным товарам. Если у товара на упаковке уже есть штрихкод производителя, передайте его в параметре `barcodes` в методе [POST v2/businesses/{businessId}/offer-mappings/update](../../reference/business-offer-mappings/updateOfferMappings.md). Генерировать новый не нужно. {% include notitle [limit](../../_auto/method_limits/generateOfferBarcodes.md) %}
|
||||
* Генерация штрихкодов
|
||||
*/
|
||||
generateOfferBarcodesRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['businessId'] == null) {
|
||||
throw new runtime.RequiredError('businessId', 'Required parameter "businessId" was null or undefined when calling generateOfferBarcodes().');
|
||||
}
|
||||
if (requestParameters['generateOfferBarcodesRequest'] == null) {
|
||||
throw new runtime.RequiredError('generateOfferBarcodesRequest', 'Required parameter "generateOfferBarcodesRequest" was null or undefined when calling generateOfferBarcodes().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
const headerParameters = {};
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v1/businesses/{businessId}/offer-mappings/barcodes/generate`.replace(`{${"businessId"}}`, encodeURIComponent(String(requestParameters['businessId']))),
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: (0, index_1.GenerateOfferBarcodesRequestToJSON)(requestParameters['generateOfferBarcodesRequest']),
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.GenerateOfferBarcodesResponseFromJSON)(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/generateOfferBarcodes.md) %} Генерирует штрихкоды и присваивает их указанным товарам. Если у товара на упаковке уже есть штрихкод производителя, передайте его в параметре `barcodes` в методе [POST v2/businesses/{businessId}/offer-mappings/update](../../reference/business-offer-mappings/updateOfferMappings.md). Генерировать новый не нужно. {% include notitle [limit](../../_auto/method_limits/generateOfferBarcodes.md) %}
|
||||
* Генерация штрихкодов
|
||||
*/
|
||||
generateOfferBarcodes(businessId, generateOfferBarcodesRequest, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.generateOfferBarcodesRaw({ businessId: businessId, generateOfferBarcodesRequest: generateOfferBarcodesRequest }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getOfferMappings.md) %} Возвращает список товаров в каталоге, их категории на Маркете и характеристики каждого товара. Можно использовать тремя способами: * задать список интересующих SKU; * задать фильтр — в этом случае результаты возвращаются постранично; * не передавать тело запроса, чтобы получить список всех товаров в каталоге. Чтобы получить категорийные характеристики товаров, воспользуйтесь методом [POST v2/businesses/{businessId}/offer-cards](../../reference/content/getOfferCardsContentStatus.md). {% include notitle [limit](../../_auto/method_limits/getOfferMappings.md) %}
|
||||
* Информация о товарах в каталоге
|
||||
*/
|
||||
getOfferMappingsRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['businessId'] == null) {
|
||||
throw new runtime.RequiredError('businessId', 'Required parameter "businessId" was null or undefined when calling getOfferMappings().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
if (requestParameters['pageToken'] != null) {
|
||||
queryParameters['pageToken'] = requestParameters['pageToken'];
|
||||
}
|
||||
if (requestParameters['limit'] != null) {
|
||||
queryParameters['limit'] = requestParameters['limit'];
|
||||
}
|
||||
if (requestParameters['language'] != null) {
|
||||
queryParameters['language'] = requestParameters['language'];
|
||||
}
|
||||
const headerParameters = {};
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v2/businesses/{businessId}/offer-mappings`.replace(`{${"businessId"}}`, encodeURIComponent(String(requestParameters['businessId']))),
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: (0, index_1.GetOfferMappingsRequestToJSON)(requestParameters['getOfferMappingsRequest']),
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.GetOfferMappingsResponseFromJSON)(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getOfferMappings.md) %} Возвращает список товаров в каталоге, их категории на Маркете и характеристики каждого товара. Можно использовать тремя способами: * задать список интересующих SKU; * задать фильтр — в этом случае результаты возвращаются постранично; * не передавать тело запроса, чтобы получить список всех товаров в каталоге. Чтобы получить категорийные характеристики товаров, воспользуйтесь методом [POST v2/businesses/{businessId}/offer-cards](../../reference/content/getOfferCardsContentStatus.md). {% include notitle [limit](../../_auto/method_limits/getOfferMappings.md) %}
|
||||
* Информация о товарах в каталоге
|
||||
*/
|
||||
getOfferMappings(businessId, pageToken, limit, language, getOfferMappingsRequest, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.getOfferMappingsRaw({ businessId: businessId, pageToken: pageToken, limit: limit, language: language, getOfferMappingsRequest: getOfferMappingsRequest }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/updateOfferMappings.md) %} Добавляет товары в каталог и передает: * их [листовые категории](*list-categories) на Маркете и категорийные характеристики; * основные характеристики; * цены на товары в кабинете. Также объединяет товары на карточке, редактирует и удаляет информацию об уже добавленных товарах, в том числе цены в кабинете и категории товаров. Список категорий Маркета можно получить с помощью запроса [POST v2/categories/tree](../../reference/categories/getCategoriesTree.md), а характеристики товаров по категориям с помощью [POST v2/category/{categoryId}/parameters](../../reference/content/getCategoryContentParameters.md). {% cut \"Добавить новый товар\" %} Передайте его с новым идентификатором, который раньше никогда не использовался в каталоге. Обязательно укажите параметры: `offerId`, `name`, `marketCategoryId`, `pictures`, `vendor`, `description`. Старайтесь сразу передать как можно больше информации — она потребуется Маркету для подбора подходящей карточки или создания новой. Если известно, какой карточке на Маркете соответствует товар, можно сразу указать идентификатор этой карточки (SKU на Маркете) в поле `marketSKU`. **Для продавцов Market Yandex Go:** Когда вы добавляете товары в каталог, указывайте значения параметров `name` и `description` на русском языке. Чтобы на витрине они отображались и на другом языке, еще раз выполните запрос `POST v2/businesses/{businessId}/offer-mappings/update`, где укажите: * язык в параметре `language`; * значения параметров `name` и `description` на указанном языке. Повторно передавать остальные характеристики товара не нужно. {% endcut %} {% cut \"Изменить информацию о товаре\" %} Передайте новые данные, указав в `offerId` SKU товара в вашей системе. Поля, в которых ничего не меняется, можно не передавать. {% endcut %} {% cut \"Удалить переданные ранее параметры товара\" %} В `deleteParameters` укажите значения параметров, которые хотите удалить. Можно передать сразу несколько значений. Для параметров с типом `string` также можно передать пустое значение. {% endcut %} Параметр `offerId` (SKU товара в вашей системе) должен быть **уникальным** для всех товаров, которые вы передаете. {% note warning \"Правила использования SKU\" %} * У каждого товара SKU должен быть свой. * Уже заданный SKU нельзя освободить и использовать заново для другого товара. Каждый товар должен получать новый идентификатор, до того никогда не использовавшийся в вашем каталоге. SKU товара можно изменить в кабинете продавца на Маркете. О том, как это сделать, читайте [в Справке Маркета для продавцов](https://yandex.ru/support2/marketplace/ru/assortment/operations/edit-sku). {% endnote %} {% note info \"Данные в каталоге обновляются не мгновенно\" %} Это занимает до нескольких минут. {% endnote %} {% include notitle [limit](../../_auto/method_limits/updateOfferMappings.md) %}
|
||||
* Добавление товаров в каталог и изменение информации о них
|
||||
*/
|
||||
updateOfferMappingsRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['businessId'] == null) {
|
||||
throw new runtime.RequiredError('businessId', 'Required parameter "businessId" was null or undefined when calling updateOfferMappings().');
|
||||
}
|
||||
if (requestParameters['updateOfferMappingsRequest'] == null) {
|
||||
throw new runtime.RequiredError('updateOfferMappingsRequest', 'Required parameter "updateOfferMappingsRequest" was null or undefined when calling updateOfferMappings().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
if (requestParameters['language'] != null) {
|
||||
queryParameters['language'] = requestParameters['language'];
|
||||
}
|
||||
const headerParameters = {};
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v2/businesses/{businessId}/offer-mappings/update`.replace(`{${"businessId"}}`, encodeURIComponent(String(requestParameters['businessId']))),
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: (0, index_1.UpdateOfferMappingsRequestToJSON)(requestParameters['updateOfferMappingsRequest']),
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.UpdateOfferMappingsResponseFromJSON)(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/updateOfferMappings.md) %} Добавляет товары в каталог и передает: * их [листовые категории](*list-categories) на Маркете и категорийные характеристики; * основные характеристики; * цены на товары в кабинете. Также объединяет товары на карточке, редактирует и удаляет информацию об уже добавленных товарах, в том числе цены в кабинете и категории товаров. Список категорий Маркета можно получить с помощью запроса [POST v2/categories/tree](../../reference/categories/getCategoriesTree.md), а характеристики товаров по категориям с помощью [POST v2/category/{categoryId}/parameters](../../reference/content/getCategoryContentParameters.md). {% cut \"Добавить новый товар\" %} Передайте его с новым идентификатором, который раньше никогда не использовался в каталоге. Обязательно укажите параметры: `offerId`, `name`, `marketCategoryId`, `pictures`, `vendor`, `description`. Старайтесь сразу передать как можно больше информации — она потребуется Маркету для подбора подходящей карточки или создания новой. Если известно, какой карточке на Маркете соответствует товар, можно сразу указать идентификатор этой карточки (SKU на Маркете) в поле `marketSKU`. **Для продавцов Market Yandex Go:** Когда вы добавляете товары в каталог, указывайте значения параметров `name` и `description` на русском языке. Чтобы на витрине они отображались и на другом языке, еще раз выполните запрос `POST v2/businesses/{businessId}/offer-mappings/update`, где укажите: * язык в параметре `language`; * значения параметров `name` и `description` на указанном языке. Повторно передавать остальные характеристики товара не нужно. {% endcut %} {% cut \"Изменить информацию о товаре\" %} Передайте новые данные, указав в `offerId` SKU товара в вашей системе. Поля, в которых ничего не меняется, можно не передавать. {% endcut %} {% cut \"Удалить переданные ранее параметры товара\" %} В `deleteParameters` укажите значения параметров, которые хотите удалить. Можно передать сразу несколько значений. Для параметров с типом `string` также можно передать пустое значение. {% endcut %} Параметр `offerId` (SKU товара в вашей системе) должен быть **уникальным** для всех товаров, которые вы передаете. {% note warning \"Правила использования SKU\" %} * У каждого товара SKU должен быть свой. * Уже заданный SKU нельзя освободить и использовать заново для другого товара. Каждый товар должен получать новый идентификатор, до того никогда не использовавшийся в вашем каталоге. SKU товара можно изменить в кабинете продавца на Маркете. О том, как это сделать, читайте [в Справке Маркета для продавцов](https://yandex.ru/support2/marketplace/ru/assortment/operations/edit-sku). {% endnote %} {% note info \"Данные в каталоге обновляются не мгновенно\" %} Это занимает до нескольких минут. {% endnote %} {% include notitle [limit](../../_auto/method_limits/updateOfferMappings.md) %}
|
||||
* Добавление товаров в каталог и изменение информации о них
|
||||
*/
|
||||
updateOfferMappings(businessId, updateOfferMappingsRequest, language, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.updateOfferMappingsRaw({ businessId: businessId, updateOfferMappingsRequest: updateOfferMappingsRequest, language: language }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
}
|
||||
exports.BusinessOfferMappingsApi = BusinessOfferMappingsApi;
|
||||
31
dist/apis/BusinessesApi.d.ts
vendored
Normal file
31
dist/apis/BusinessesApi.d.ts
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
/**
|
||||
* API Яндекс Маркета для продавцов
|
||||
* API Яндекс Маркета помогает продавцам автоматизировать и упростить работу с маркетплейсом. В числе возможностей интеграции: * управление каталогом товаров и витриной, * обработка заказов, * изменение настроек магазина, * получение отчетов.
|
||||
*
|
||||
* The version of the OpenAPI document: LATEST
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
import * as runtime from '../runtime';
|
||||
import type { GetBusinessSettingsResponse } from '../models/index';
|
||||
export interface BusinessesApiGetBusinessSettingsRequest {
|
||||
businessId: number;
|
||||
}
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export declare class BusinessesApi extends runtime.BaseAPI {
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getBusinessSettings.md) %} Возвращает информацию о настройках кабинета, идентификатор которого указан в запросе. {% include notitle [limit](../../_auto/method_limits/getBusinessSettings.md) %}
|
||||
* Настройки кабинета
|
||||
*/
|
||||
getBusinessSettingsRaw(requestParameters: BusinessesApiGetBusinessSettingsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetBusinessSettingsResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getBusinessSettings.md) %} Возвращает информацию о настройках кабинета, идентификатор которого указан в запросе. {% include notitle [limit](../../_auto/method_limits/getBusinessSettings.md) %}
|
||||
* Настройки кабинета
|
||||
*/
|
||||
getBusinessSettings(businessId: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetBusinessSettingsResponse>;
|
||||
}
|
||||
70
dist/apis/BusinessesApi.js
vendored
Normal file
70
dist/apis/BusinessesApi.js
vendored
Normal file
@@ -0,0 +1,70 @@
|
||||
"use strict";
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* API Яндекс Маркета для продавцов
|
||||
* API Яндекс Маркета помогает продавцам автоматизировать и упростить работу с маркетплейсом. В числе возможностей интеграции: * управление каталогом товаров и витриной, * обработка заказов, * изменение настроек магазина, * получение отчетов.
|
||||
*
|
||||
* The version of the OpenAPI document: LATEST
|
||||
*
|
||||
*
|
||||
* 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.BusinessesApi = void 0;
|
||||
const runtime = require("../runtime");
|
||||
const index_1 = require("../models/index");
|
||||
/**
|
||||
*
|
||||
*/
|
||||
class BusinessesApi extends runtime.BaseAPI {
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getBusinessSettings.md) %} Возвращает информацию о настройках кабинета, идентификатор которого указан в запросе. {% include notitle [limit](../../_auto/method_limits/getBusinessSettings.md) %}
|
||||
* Настройки кабинета
|
||||
*/
|
||||
getBusinessSettingsRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['businessId'] == null) {
|
||||
throw new runtime.RequiredError('businessId', 'Required parameter "businessId" was null or undefined when calling getBusinessSettings().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
const headerParameters = {};
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v2/businesses/{businessId}/settings`.replace(`{${"businessId"}}`, encodeURIComponent(String(requestParameters['businessId']))),
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.GetBusinessSettingsResponseFromJSON)(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getBusinessSettings.md) %} Возвращает информацию о настройках кабинета, идентификатор которого указан в запросе. {% include notitle [limit](../../_auto/method_limits/getBusinessSettings.md) %}
|
||||
* Настройки кабинета
|
||||
*/
|
||||
getBusinessSettings(businessId, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.getBusinessSettingsRaw({ businessId: businessId }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
}
|
||||
exports.BusinessesApi = BusinessesApi;
|
||||
60
dist/apis/CampaignsApi.d.ts
vendored
Normal file
60
dist/apis/CampaignsApi.d.ts
vendored
Normal file
@@ -0,0 +1,60 @@
|
||||
/**
|
||||
* API Яндекс Маркета для продавцов
|
||||
* API Яндекс Маркета помогает продавцам автоматизировать и упростить работу с маркетплейсом. В числе возможностей интеграции: * управление каталогом товаров и витриной, * обработка заказов, * изменение настроек магазина, * получение отчетов.
|
||||
*
|
||||
* The version of the OpenAPI document: LATEST
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
import * as runtime from '../runtime';
|
||||
import type { GetCampaignResponse, GetCampaignSettingsResponse, GetCampaignsResponse } from '../models/index';
|
||||
export interface CampaignsApiGetCampaignRequest {
|
||||
campaignId: number;
|
||||
}
|
||||
export interface CampaignsApiGetCampaignSettingsRequest {
|
||||
campaignId: number;
|
||||
}
|
||||
export interface CampaignsApiGetCampaignsRequest {
|
||||
pageToken?: string;
|
||||
limit?: number;
|
||||
page?: number;
|
||||
pageSize?: number;
|
||||
}
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export declare class CampaignsApi extends runtime.BaseAPI {
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getCampaign.md) %} Возвращает информацию о магазине. {% include notitle [limit](../../_auto/method_limits/getCampaign.md) %}
|
||||
* Информация о магазине
|
||||
*/
|
||||
getCampaignRaw(requestParameters: CampaignsApiGetCampaignRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetCampaignResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getCampaign.md) %} Возвращает информацию о магазине. {% include notitle [limit](../../_auto/method_limits/getCampaign.md) %}
|
||||
* Информация о магазине
|
||||
*/
|
||||
getCampaign(campaignId: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetCampaignResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getCampaignSettings.md) %} Возвращает информацию о настройках магазина, идентификатор которого указан в запросе. {% include notitle [limit](../../_auto/method_limits/getCampaignSettings.md) %}
|
||||
* Настройки магазина
|
||||
*/
|
||||
getCampaignSettingsRaw(requestParameters: CampaignsApiGetCampaignSettingsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetCampaignSettingsResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getCampaignSettings.md) %} Возвращает информацию о настройках магазина, идентификатор которого указан в запросе. {% include notitle [limit](../../_auto/method_limits/getCampaignSettings.md) %}
|
||||
* Настройки магазина
|
||||
*/
|
||||
getCampaignSettings(campaignId: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetCampaignSettingsResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getCampaigns.md) %} **Для Api-Key-токена:** возвращает список магазинов в кабинете, для которого выдан токен. Нельзя получить список только подагентских магазинов. **Для OAuth-токена:** возвращает список магазинов, к которым имеет доступ пользователь — владелец токена авторизации, использованного в запросе. Для агентских пользователей список состоит из подагентских магазинов. {% note warning \"Ограничение для параметра `pageSize`\" %} Не передавайте значение больше 100. {% endnote %} {% include notitle [limit](../../_auto/method_limits/getCampaigns.md) %}
|
||||
* Список магазинов пользователя
|
||||
*/
|
||||
getCampaignsRaw(requestParameters: CampaignsApiGetCampaignsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetCampaignsResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getCampaigns.md) %} **Для Api-Key-токена:** возвращает список магазинов в кабинете, для которого выдан токен. Нельзя получить список только подагентских магазинов. **Для OAuth-токена:** возвращает список магазинов, к которым имеет доступ пользователь — владелец токена авторизации, использованного в запросе. Для агентских пользователей список состоит из подагентских магазинов. {% note warning \"Ограничение для параметра `pageSize`\" %} Не передавайте значение больше 100. {% endnote %} {% include notitle [limit](../../_auto/method_limits/getCampaigns.md) %}
|
||||
* Список магазинов пользователя
|
||||
*/
|
||||
getCampaigns(pageToken?: string, limit?: number, page?: number, pageSize?: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetCampaignsResponse>;
|
||||
}
|
||||
153
dist/apis/CampaignsApi.js
vendored
Normal file
153
dist/apis/CampaignsApi.js
vendored
Normal file
@@ -0,0 +1,153 @@
|
||||
"use strict";
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* API Яндекс Маркета для продавцов
|
||||
* API Яндекс Маркета помогает продавцам автоматизировать и упростить работу с маркетплейсом. В числе возможностей интеграции: * управление каталогом товаров и витриной, * обработка заказов, * изменение настроек магазина, * получение отчетов.
|
||||
*
|
||||
* The version of the OpenAPI document: LATEST
|
||||
*
|
||||
*
|
||||
* 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.CampaignsApi = void 0;
|
||||
const runtime = require("../runtime");
|
||||
const index_1 = require("../models/index");
|
||||
/**
|
||||
*
|
||||
*/
|
||||
class CampaignsApi extends runtime.BaseAPI {
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getCampaign.md) %} Возвращает информацию о магазине. {% include notitle [limit](../../_auto/method_limits/getCampaign.md) %}
|
||||
* Информация о магазине
|
||||
*/
|
||||
getCampaignRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['campaignId'] == null) {
|
||||
throw new runtime.RequiredError('campaignId', 'Required parameter "campaignId" was null or undefined when calling getCampaign().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
const headerParameters = {};
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v2/campaigns/{campaignId}`.replace(`{${"campaignId"}}`, encodeURIComponent(String(requestParameters['campaignId']))),
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.GetCampaignResponseFromJSON)(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getCampaign.md) %} Возвращает информацию о магазине. {% include notitle [limit](../../_auto/method_limits/getCampaign.md) %}
|
||||
* Информация о магазине
|
||||
*/
|
||||
getCampaign(campaignId, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.getCampaignRaw({ campaignId: campaignId }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getCampaignSettings.md) %} Возвращает информацию о настройках магазина, идентификатор которого указан в запросе. {% include notitle [limit](../../_auto/method_limits/getCampaignSettings.md) %}
|
||||
* Настройки магазина
|
||||
*/
|
||||
getCampaignSettingsRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['campaignId'] == null) {
|
||||
throw new runtime.RequiredError('campaignId', 'Required parameter "campaignId" was null or undefined when calling getCampaignSettings().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
const headerParameters = {};
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v2/campaigns/{campaignId}/settings`.replace(`{${"campaignId"}}`, encodeURIComponent(String(requestParameters['campaignId']))),
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.GetCampaignSettingsResponseFromJSON)(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getCampaignSettings.md) %} Возвращает информацию о настройках магазина, идентификатор которого указан в запросе. {% include notitle [limit](../../_auto/method_limits/getCampaignSettings.md) %}
|
||||
* Настройки магазина
|
||||
*/
|
||||
getCampaignSettings(campaignId, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.getCampaignSettingsRaw({ campaignId: campaignId }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getCampaigns.md) %} **Для Api-Key-токена:** возвращает список магазинов в кабинете, для которого выдан токен. Нельзя получить список только подагентских магазинов. **Для OAuth-токена:** возвращает список магазинов, к которым имеет доступ пользователь — владелец токена авторизации, использованного в запросе. Для агентских пользователей список состоит из подагентских магазинов. {% note warning \"Ограничение для параметра `pageSize`\" %} Не передавайте значение больше 100. {% endnote %} {% include notitle [limit](../../_auto/method_limits/getCampaigns.md) %}
|
||||
* Список магазинов пользователя
|
||||
*/
|
||||
getCampaignsRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const queryParameters = {};
|
||||
if (requestParameters['pageToken'] != null) {
|
||||
queryParameters['pageToken'] = requestParameters['pageToken'];
|
||||
}
|
||||
if (requestParameters['limit'] != null) {
|
||||
queryParameters['limit'] = requestParameters['limit'];
|
||||
}
|
||||
if (requestParameters['page'] != null) {
|
||||
queryParameters['page'] = requestParameters['page'];
|
||||
}
|
||||
if (requestParameters['pageSize'] != null) {
|
||||
queryParameters['pageSize'] = requestParameters['pageSize'];
|
||||
}
|
||||
const headerParameters = {};
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v2/campaigns`,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.GetCampaignsResponseFromJSON)(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getCampaigns.md) %} **Для Api-Key-токена:** возвращает список магазинов в кабинете, для которого выдан токен. Нельзя получить список только подагентских магазинов. **Для OAuth-токена:** возвращает список магазинов, к которым имеет доступ пользователь — владелец токена авторизации, использованного в запросе. Для агентских пользователей список состоит из подагентских магазинов. {% note warning \"Ограничение для параметра `pageSize`\" %} Не передавайте значение больше 100. {% endnote %} {% include notitle [limit](../../_auto/method_limits/getCampaigns.md) %}
|
||||
* Список магазинов пользователя
|
||||
*/
|
||||
getCampaigns(pageToken, limit, page, pageSize, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.getCampaignsRaw({ pageToken: pageToken, limit: limit, page: page, pageSize: pageSize }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
}
|
||||
exports.CampaignsApi = CampaignsApi;
|
||||
46
dist/apis/CategoriesApi.d.ts
vendored
Normal file
46
dist/apis/CategoriesApi.d.ts
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
/**
|
||||
* API Яндекс Маркета для продавцов
|
||||
* API Яндекс Маркета помогает продавцам автоматизировать и упростить работу с маркетплейсом. В числе возможностей интеграции: * управление каталогом товаров и витриной, * обработка заказов, * изменение настроек магазина, * получение отчетов.
|
||||
*
|
||||
* The version of the OpenAPI document: LATEST
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
import * as runtime from '../runtime';
|
||||
import type { GetCategoriesMaxSaleQuantumRequest, GetCategoriesMaxSaleQuantumResponse, GetCategoriesRequest, GetCategoriesResponse } from '../models/index';
|
||||
export interface CategoriesApiGetCategoriesMaxSaleQuantumOperationRequest {
|
||||
getCategoriesMaxSaleQuantumRequest: GetCategoriesMaxSaleQuantumRequest;
|
||||
}
|
||||
export interface CategoriesApiGetCategoriesTreeRequest {
|
||||
getCategoriesRequest?: GetCategoriesRequest;
|
||||
}
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export declare class CategoriesApi extends runtime.BaseAPI {
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getCategoriesMaxSaleQuantum.md) %} Возвращает лимит на установку [кванта](*quantum) и минимального количества товаров в заказе, которые вы можете задать для товаров указанных категорий. Если вы передадите значение кванта или минимального количества товаров выше установленного Маркетом ограничения, товар будет скрыт с витрины. Подробнее о том, как продавать товары по несколько штук, читайте [в Справке Маркета для продавцов](https://yandex.ru/support2/marketplace/ru/assortment/fields/quantum). {% include notitle [limit](../../_auto/method_limits/getCategoriesMaxSaleQuantum.md) %}
|
||||
* Лимит на установку кванта продажи и минимального количества товаров в заказе
|
||||
* @deprecated
|
||||
*/
|
||||
getCategoriesMaxSaleQuantumRaw(requestParameters: CategoriesApiGetCategoriesMaxSaleQuantumOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetCategoriesMaxSaleQuantumResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getCategoriesMaxSaleQuantum.md) %} Возвращает лимит на установку [кванта](*quantum) и минимального количества товаров в заказе, которые вы можете задать для товаров указанных категорий. Если вы передадите значение кванта или минимального количества товаров выше установленного Маркетом ограничения, товар будет скрыт с витрины. Подробнее о том, как продавать товары по несколько штук, читайте [в Справке Маркета для продавцов](https://yandex.ru/support2/marketplace/ru/assortment/fields/quantum). {% include notitle [limit](../../_auto/method_limits/getCategoriesMaxSaleQuantum.md) %}
|
||||
* Лимит на установку кванта продажи и минимального количества товаров в заказе
|
||||
* @deprecated
|
||||
*/
|
||||
getCategoriesMaxSaleQuantum(getCategoriesMaxSaleQuantumRequest: GetCategoriesMaxSaleQuantumRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetCategoriesMaxSaleQuantumResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getCategoriesTree.md) %} Возвращает дерево категорий Маркета. {% include notitle [limit](../../_auto/method_limits/getCategoriesTree.md) %}
|
||||
* Дерево категорий
|
||||
*/
|
||||
getCategoriesTreeRaw(requestParameters: CategoriesApiGetCategoriesTreeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetCategoriesResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getCategoriesTree.md) %} Возвращает дерево категорий Маркета. {% include notitle [limit](../../_auto/method_limits/getCategoriesTree.md) %}
|
||||
* Дерево категорий
|
||||
*/
|
||||
getCategoriesTree(getCategoriesRequest?: GetCategoriesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetCategoriesResponse>;
|
||||
}
|
||||
110
dist/apis/CategoriesApi.js
vendored
Normal file
110
dist/apis/CategoriesApi.js
vendored
Normal file
@@ -0,0 +1,110 @@
|
||||
"use strict";
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* API Яндекс Маркета для продавцов
|
||||
* API Яндекс Маркета помогает продавцам автоматизировать и упростить работу с маркетплейсом. В числе возможностей интеграции: * управление каталогом товаров и витриной, * обработка заказов, * изменение настроек магазина, * получение отчетов.
|
||||
*
|
||||
* The version of the OpenAPI document: LATEST
|
||||
*
|
||||
*
|
||||
* 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.CategoriesApi = void 0;
|
||||
const runtime = require("../runtime");
|
||||
const index_1 = require("../models/index");
|
||||
/**
|
||||
*
|
||||
*/
|
||||
class CategoriesApi extends runtime.BaseAPI {
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getCategoriesMaxSaleQuantum.md) %} Возвращает лимит на установку [кванта](*quantum) и минимального количества товаров в заказе, которые вы можете задать для товаров указанных категорий. Если вы передадите значение кванта или минимального количества товаров выше установленного Маркетом ограничения, товар будет скрыт с витрины. Подробнее о том, как продавать товары по несколько штук, читайте [в Справке Маркета для продавцов](https://yandex.ru/support2/marketplace/ru/assortment/fields/quantum). {% include notitle [limit](../../_auto/method_limits/getCategoriesMaxSaleQuantum.md) %}
|
||||
* Лимит на установку кванта продажи и минимального количества товаров в заказе
|
||||
* @deprecated
|
||||
*/
|
||||
getCategoriesMaxSaleQuantumRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['getCategoriesMaxSaleQuantumRequest'] == null) {
|
||||
throw new runtime.RequiredError('getCategoriesMaxSaleQuantumRequest', 'Required parameter "getCategoriesMaxSaleQuantumRequest" was null or undefined when calling getCategoriesMaxSaleQuantum().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
const headerParameters = {};
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v2/categories/max-sale-quantum`,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: (0, index_1.GetCategoriesMaxSaleQuantumRequestToJSON)(requestParameters['getCategoriesMaxSaleQuantumRequest']),
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.GetCategoriesMaxSaleQuantumResponseFromJSON)(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getCategoriesMaxSaleQuantum.md) %} Возвращает лимит на установку [кванта](*quantum) и минимального количества товаров в заказе, которые вы можете задать для товаров указанных категорий. Если вы передадите значение кванта или минимального количества товаров выше установленного Маркетом ограничения, товар будет скрыт с витрины. Подробнее о том, как продавать товары по несколько штук, читайте [в Справке Маркета для продавцов](https://yandex.ru/support2/marketplace/ru/assortment/fields/quantum). {% include notitle [limit](../../_auto/method_limits/getCategoriesMaxSaleQuantum.md) %}
|
||||
* Лимит на установку кванта продажи и минимального количества товаров в заказе
|
||||
* @deprecated
|
||||
*/
|
||||
getCategoriesMaxSaleQuantum(getCategoriesMaxSaleQuantumRequest, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.getCategoriesMaxSaleQuantumRaw({ getCategoriesMaxSaleQuantumRequest: getCategoriesMaxSaleQuantumRequest }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getCategoriesTree.md) %} Возвращает дерево категорий Маркета. {% include notitle [limit](../../_auto/method_limits/getCategoriesTree.md) %}
|
||||
* Дерево категорий
|
||||
*/
|
||||
getCategoriesTreeRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const queryParameters = {};
|
||||
const headerParameters = {};
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v2/categories/tree`,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: (0, index_1.GetCategoriesRequestToJSON)(requestParameters['getCategoriesRequest']),
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.GetCategoriesResponseFromJSON)(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getCategoriesTree.md) %} Возвращает дерево категорий Маркета. {% include notitle [limit](../../_auto/method_limits/getCategoriesTree.md) %}
|
||||
* Дерево категорий
|
||||
*/
|
||||
getCategoriesTree(getCategoriesRequest, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.getCategoriesTreeRaw({ getCategoriesRequest: getCategoriesRequest }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
}
|
||||
exports.CategoriesApi = CategoriesApi;
|
||||
124
dist/apis/ChatsApi.d.ts
vendored
Normal file
124
dist/apis/ChatsApi.d.ts
vendored
Normal file
@@ -0,0 +1,124 @@
|
||||
/**
|
||||
* API Яндекс Маркета для продавцов
|
||||
* API Яндекс Маркета помогает продавцам автоматизировать и упростить работу с маркетплейсом. В числе возможностей интеграции: * управление каталогом товаров и витриной, * обработка заказов, * изменение настроек магазина, * получение отчетов.
|
||||
*
|
||||
* The version of the OpenAPI document: LATEST
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
import * as runtime from '../runtime';
|
||||
import type { CreateChatRequest, CreateChatResponse, EmptyApiResponse, GetChatHistoryRequest, GetChatHistoryResponse, GetChatMessageResponse, GetChatResponse, GetChatsRequest, GetChatsResponse, SendMessageToChatRequest } from '../models/index';
|
||||
export interface ChatsApiCreateChatOperationRequest {
|
||||
businessId: number;
|
||||
createChatRequest: CreateChatRequest;
|
||||
}
|
||||
export interface ChatsApiGetChatRequest {
|
||||
businessId: number;
|
||||
chatId: number;
|
||||
}
|
||||
export interface ChatsApiGetChatHistoryOperationRequest {
|
||||
businessId: number;
|
||||
chatId: number;
|
||||
getChatHistoryRequest: GetChatHistoryRequest;
|
||||
pageToken?: string;
|
||||
limit?: number;
|
||||
}
|
||||
export interface ChatsApiGetChatMessageRequest {
|
||||
businessId: number;
|
||||
chatId: number;
|
||||
messageId: number;
|
||||
}
|
||||
export interface ChatsApiGetChatsOperationRequest {
|
||||
businessId: number;
|
||||
getChatsRequest: GetChatsRequest;
|
||||
pageToken?: string;
|
||||
limit?: number;
|
||||
}
|
||||
export interface ChatsApiSendFileToChatRequest {
|
||||
businessId: number;
|
||||
chatId: number;
|
||||
file: Blob;
|
||||
}
|
||||
export interface ChatsApiSendMessageToChatOperationRequest {
|
||||
businessId: number;
|
||||
chatId: number;
|
||||
sendMessageToChatRequest: SendMessageToChatRequest;
|
||||
}
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export declare class ChatsApi extends runtime.BaseAPI {
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/createChat.md) %} Создает новый чат с покупателем и возвращает информацию о нем или созданном ранее. Типы чатов, которые может начать продавец: * по заказам; * по возвратам (доступны только для FBY-, FBS- и Экспресс-магазинов). {% include notitle [limit](../../_auto/method_limits/createChat.md) %}
|
||||
* Создание нового чата с покупателем
|
||||
*/
|
||||
createChatRaw(requestParameters: ChatsApiCreateChatOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CreateChatResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/createChat.md) %} Создает новый чат с покупателем и возвращает информацию о нем или созданном ранее. Типы чатов, которые может начать продавец: * по заказам; * по возвратам (доступны только для FBY-, FBS- и Экспресс-магазинов). {% include notitle [limit](../../_auto/method_limits/createChat.md) %}
|
||||
* Создание нового чата с покупателем
|
||||
*/
|
||||
createChat(businessId: number, createChatRequest: CreateChatRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CreateChatResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getChat.md) %} Возвращает чат по его идентификатору. {% note tip \"Подключите API-уведомления\" %} Маркет отправит вам запрос [POST notification](../../push-notifications/reference/sendNotification.md), когда появится новый чат или сообщение. [{#T}](../../push-notifications/index.md) {% endnote %} {% include notitle [limit](../../_auto/method_limits/getChat.md) %}
|
||||
* Получение чата по идентификатору
|
||||
*/
|
||||
getChatRaw(requestParameters: ChatsApiGetChatRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetChatResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getChat.md) %} Возвращает чат по его идентификатору. {% note tip \"Подключите API-уведомления\" %} Маркет отправит вам запрос [POST notification](../../push-notifications/reference/sendNotification.md), когда появится новый чат или сообщение. [{#T}](../../push-notifications/index.md) {% endnote %} {% include notitle [limit](../../_auto/method_limits/getChat.md) %}
|
||||
* Получение чата по идентификатору
|
||||
*/
|
||||
getChat(businessId: number, chatId: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetChatResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getChatHistory.md) %} Возвращает историю сообщений в чате с покупателем. {% include notitle [limit](../../_auto/method_limits/getChatHistory.md) %}
|
||||
* Получение истории сообщений в чате
|
||||
*/
|
||||
getChatHistoryRaw(requestParameters: ChatsApiGetChatHistoryOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetChatHistoryResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getChatHistory.md) %} Возвращает историю сообщений в чате с покупателем. {% include notitle [limit](../../_auto/method_limits/getChatHistory.md) %}
|
||||
* Получение истории сообщений в чате
|
||||
*/
|
||||
getChatHistory(businessId: number, chatId: number, getChatHistoryRequest: GetChatHistoryRequest, pageToken?: string, limit?: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetChatHistoryResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getChatMessage.md) %} Возвращает сообщение по его идентификатору. {% note tip \"Подключите API-уведомления\" %} Маркет отправит вам запрос [POST notification](../../push-notifications/reference/sendNotification.md), когда появится новый чат или сообщение. [{#T}](../../push-notifications/index.md) {% endnote %} {% include notitle [limit](../../_auto/method_limits/getChatMessage.md) %}
|
||||
* Получение сообщения в чате
|
||||
*/
|
||||
getChatMessageRaw(requestParameters: ChatsApiGetChatMessageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetChatMessageResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getChatMessage.md) %} Возвращает сообщение по его идентификатору. {% note tip \"Подключите API-уведомления\" %} Маркет отправит вам запрос [POST notification](../../push-notifications/reference/sendNotification.md), когда появится новый чат или сообщение. [{#T}](../../push-notifications/index.md) {% endnote %} {% include notitle [limit](../../_auto/method_limits/getChatMessage.md) %}
|
||||
* Получение сообщения в чате
|
||||
*/
|
||||
getChatMessage(businessId: number, chatId: number, messageId: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetChatMessageResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getChats.md) %} Возвращает чаты с покупателями. {% note tip \"Подключите API-уведомления\" %} Маркет отправит вам запрос [POST notification](../../push-notifications/reference/sendNotification.md), когда появится новый чат или сообщение. [{#T}](../../push-notifications/index.md) {% endnote %} {% include notitle [limit](../../_auto/method_limits/getChats.md) %}
|
||||
* Получение доступных чатов
|
||||
*/
|
||||
getChatsRaw(requestParameters: ChatsApiGetChatsOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetChatsResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getChats.md) %} Возвращает чаты с покупателями. {% note tip \"Подключите API-уведомления\" %} Маркет отправит вам запрос [POST notification](../../push-notifications/reference/sendNotification.md), когда появится новый чат или сообщение. [{#T}](../../push-notifications/index.md) {% endnote %} {% include notitle [limit](../../_auto/method_limits/getChats.md) %}
|
||||
* Получение доступных чатов
|
||||
*/
|
||||
getChats(businessId: number, getChatsRequest: GetChatsRequest, pageToken?: string, limit?: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetChatsResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/sendFileToChat.md) %} Отправляет файл в чат с покупателем. {% include notitle [limit](../../_auto/method_limits/sendFileToChat.md) %}
|
||||
* Отправка файла в чат
|
||||
*/
|
||||
sendFileToChatRaw(requestParameters: ChatsApiSendFileToChatRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<EmptyApiResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/sendFileToChat.md) %} Отправляет файл в чат с покупателем. {% include notitle [limit](../../_auto/method_limits/sendFileToChat.md) %}
|
||||
* Отправка файла в чат
|
||||
*/
|
||||
sendFileToChat(businessId: number, chatId: number, file: Blob, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<EmptyApiResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/sendMessageToChat.md) %} Отправляет сообщение в чат с покупателем. {% include notitle [limit](../../_auto/method_limits/sendMessageToChat.md) %}
|
||||
* Отправка сообщения в чат
|
||||
*/
|
||||
sendMessageToChatRaw(requestParameters: ChatsApiSendMessageToChatOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<EmptyApiResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/sendMessageToChat.md) %} Отправляет сообщение в чат с покупателем. {% include notitle [limit](../../_auto/method_limits/sendMessageToChat.md) %}
|
||||
* Отправка сообщения в чат
|
||||
*/
|
||||
sendMessageToChat(businessId: number, chatId: number, sendMessageToChatRequest: SendMessageToChatRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<EmptyApiResponse>;
|
||||
}
|
||||
382
dist/apis/ChatsApi.js
vendored
Normal file
382
dist/apis/ChatsApi.js
vendored
Normal file
@@ -0,0 +1,382 @@
|
||||
"use strict";
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* API Яндекс Маркета для продавцов
|
||||
* API Яндекс Маркета помогает продавцам автоматизировать и упростить работу с маркетплейсом. В числе возможностей интеграции: * управление каталогом товаров и витриной, * обработка заказов, * изменение настроек магазина, * получение отчетов.
|
||||
*
|
||||
* The version of the OpenAPI document: LATEST
|
||||
*
|
||||
*
|
||||
* 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.ChatsApi = void 0;
|
||||
const runtime = require("../runtime");
|
||||
const index_1 = require("../models/index");
|
||||
/**
|
||||
*
|
||||
*/
|
||||
class ChatsApi extends runtime.BaseAPI {
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/createChat.md) %} Создает новый чат с покупателем и возвращает информацию о нем или созданном ранее. Типы чатов, которые может начать продавец: * по заказам; * по возвратам (доступны только для FBY-, FBS- и Экспресс-магазинов). {% include notitle [limit](../../_auto/method_limits/createChat.md) %}
|
||||
* Создание нового чата с покупателем
|
||||
*/
|
||||
createChatRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['businessId'] == null) {
|
||||
throw new runtime.RequiredError('businessId', 'Required parameter "businessId" was null or undefined when calling createChat().');
|
||||
}
|
||||
if (requestParameters['createChatRequest'] == null) {
|
||||
throw new runtime.RequiredError('createChatRequest', 'Required parameter "createChatRequest" was null or undefined when calling createChat().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
const headerParameters = {};
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v2/businesses/{businessId}/chats/new`.replace(`{${"businessId"}}`, encodeURIComponent(String(requestParameters['businessId']))),
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: (0, index_1.CreateChatRequestToJSON)(requestParameters['createChatRequest']),
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.CreateChatResponseFromJSON)(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/createChat.md) %} Создает новый чат с покупателем и возвращает информацию о нем или созданном ранее. Типы чатов, которые может начать продавец: * по заказам; * по возвратам (доступны только для FBY-, FBS- и Экспресс-магазинов). {% include notitle [limit](../../_auto/method_limits/createChat.md) %}
|
||||
* Создание нового чата с покупателем
|
||||
*/
|
||||
createChat(businessId, createChatRequest, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.createChatRaw({ businessId: businessId, createChatRequest: createChatRequest }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getChat.md) %} Возвращает чат по его идентификатору. {% note tip \"Подключите API-уведомления\" %} Маркет отправит вам запрос [POST notification](../../push-notifications/reference/sendNotification.md), когда появится новый чат или сообщение. [{#T}](../../push-notifications/index.md) {% endnote %} {% include notitle [limit](../../_auto/method_limits/getChat.md) %}
|
||||
* Получение чата по идентификатору
|
||||
*/
|
||||
getChatRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['businessId'] == null) {
|
||||
throw new runtime.RequiredError('businessId', 'Required parameter "businessId" was null or undefined when calling getChat().');
|
||||
}
|
||||
if (requestParameters['chatId'] == null) {
|
||||
throw new runtime.RequiredError('chatId', 'Required parameter "chatId" was null or undefined when calling getChat().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
if (requestParameters['chatId'] != null) {
|
||||
queryParameters['chatId'] = requestParameters['chatId'];
|
||||
}
|
||||
const headerParameters = {};
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v2/businesses/{businessId}/chat`.replace(`{${"businessId"}}`, encodeURIComponent(String(requestParameters['businessId']))),
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.GetChatResponseFromJSON)(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getChat.md) %} Возвращает чат по его идентификатору. {% note tip \"Подключите API-уведомления\" %} Маркет отправит вам запрос [POST notification](../../push-notifications/reference/sendNotification.md), когда появится новый чат или сообщение. [{#T}](../../push-notifications/index.md) {% endnote %} {% include notitle [limit](../../_auto/method_limits/getChat.md) %}
|
||||
* Получение чата по идентификатору
|
||||
*/
|
||||
getChat(businessId, chatId, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.getChatRaw({ businessId: businessId, chatId: chatId }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getChatHistory.md) %} Возвращает историю сообщений в чате с покупателем. {% include notitle [limit](../../_auto/method_limits/getChatHistory.md) %}
|
||||
* Получение истории сообщений в чате
|
||||
*/
|
||||
getChatHistoryRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['businessId'] == null) {
|
||||
throw new runtime.RequiredError('businessId', 'Required parameter "businessId" was null or undefined when calling getChatHistory().');
|
||||
}
|
||||
if (requestParameters['chatId'] == null) {
|
||||
throw new runtime.RequiredError('chatId', 'Required parameter "chatId" was null or undefined when calling getChatHistory().');
|
||||
}
|
||||
if (requestParameters['getChatHistoryRequest'] == null) {
|
||||
throw new runtime.RequiredError('getChatHistoryRequest', 'Required parameter "getChatHistoryRequest" was null or undefined when calling getChatHistory().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
if (requestParameters['chatId'] != null) {
|
||||
queryParameters['chatId'] = requestParameters['chatId'];
|
||||
}
|
||||
if (requestParameters['pageToken'] != null) {
|
||||
queryParameters['pageToken'] = requestParameters['pageToken'];
|
||||
}
|
||||
if (requestParameters['limit'] != null) {
|
||||
queryParameters['limit'] = requestParameters['limit'];
|
||||
}
|
||||
const headerParameters = {};
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v2/businesses/{businessId}/chats/history`.replace(`{${"businessId"}}`, encodeURIComponent(String(requestParameters['businessId']))),
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: (0, index_1.GetChatHistoryRequestToJSON)(requestParameters['getChatHistoryRequest']),
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.GetChatHistoryResponseFromJSON)(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getChatHistory.md) %} Возвращает историю сообщений в чате с покупателем. {% include notitle [limit](../../_auto/method_limits/getChatHistory.md) %}
|
||||
* Получение истории сообщений в чате
|
||||
*/
|
||||
getChatHistory(businessId, chatId, getChatHistoryRequest, pageToken, limit, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.getChatHistoryRaw({ businessId: businessId, chatId: chatId, getChatHistoryRequest: getChatHistoryRequest, pageToken: pageToken, limit: limit }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getChatMessage.md) %} Возвращает сообщение по его идентификатору. {% note tip \"Подключите API-уведомления\" %} Маркет отправит вам запрос [POST notification](../../push-notifications/reference/sendNotification.md), когда появится новый чат или сообщение. [{#T}](../../push-notifications/index.md) {% endnote %} {% include notitle [limit](../../_auto/method_limits/getChatMessage.md) %}
|
||||
* Получение сообщения в чате
|
||||
*/
|
||||
getChatMessageRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['businessId'] == null) {
|
||||
throw new runtime.RequiredError('businessId', 'Required parameter "businessId" was null or undefined when calling getChatMessage().');
|
||||
}
|
||||
if (requestParameters['chatId'] == null) {
|
||||
throw new runtime.RequiredError('chatId', 'Required parameter "chatId" was null or undefined when calling getChatMessage().');
|
||||
}
|
||||
if (requestParameters['messageId'] == null) {
|
||||
throw new runtime.RequiredError('messageId', 'Required parameter "messageId" was null or undefined when calling getChatMessage().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
if (requestParameters['chatId'] != null) {
|
||||
queryParameters['chatId'] = requestParameters['chatId'];
|
||||
}
|
||||
if (requestParameters['messageId'] != null) {
|
||||
queryParameters['messageId'] = requestParameters['messageId'];
|
||||
}
|
||||
const headerParameters = {};
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v2/businesses/{businessId}/chats/message`.replace(`{${"businessId"}}`, encodeURIComponent(String(requestParameters['businessId']))),
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.GetChatMessageResponseFromJSON)(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getChatMessage.md) %} Возвращает сообщение по его идентификатору. {% note tip \"Подключите API-уведомления\" %} Маркет отправит вам запрос [POST notification](../../push-notifications/reference/sendNotification.md), когда появится новый чат или сообщение. [{#T}](../../push-notifications/index.md) {% endnote %} {% include notitle [limit](../../_auto/method_limits/getChatMessage.md) %}
|
||||
* Получение сообщения в чате
|
||||
*/
|
||||
getChatMessage(businessId, chatId, messageId, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.getChatMessageRaw({ businessId: businessId, chatId: chatId, messageId: messageId }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getChats.md) %} Возвращает чаты с покупателями. {% note tip \"Подключите API-уведомления\" %} Маркет отправит вам запрос [POST notification](../../push-notifications/reference/sendNotification.md), когда появится новый чат или сообщение. [{#T}](../../push-notifications/index.md) {% endnote %} {% include notitle [limit](../../_auto/method_limits/getChats.md) %}
|
||||
* Получение доступных чатов
|
||||
*/
|
||||
getChatsRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['businessId'] == null) {
|
||||
throw new runtime.RequiredError('businessId', 'Required parameter "businessId" was null or undefined when calling getChats().');
|
||||
}
|
||||
if (requestParameters['getChatsRequest'] == null) {
|
||||
throw new runtime.RequiredError('getChatsRequest', 'Required parameter "getChatsRequest" was null or undefined when calling getChats().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
if (requestParameters['pageToken'] != null) {
|
||||
queryParameters['pageToken'] = requestParameters['pageToken'];
|
||||
}
|
||||
if (requestParameters['limit'] != null) {
|
||||
queryParameters['limit'] = requestParameters['limit'];
|
||||
}
|
||||
const headerParameters = {};
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v2/businesses/{businessId}/chats`.replace(`{${"businessId"}}`, encodeURIComponent(String(requestParameters['businessId']))),
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: (0, index_1.GetChatsRequestToJSON)(requestParameters['getChatsRequest']),
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.GetChatsResponseFromJSON)(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getChats.md) %} Возвращает чаты с покупателями. {% note tip \"Подключите API-уведомления\" %} Маркет отправит вам запрос [POST notification](../../push-notifications/reference/sendNotification.md), когда появится новый чат или сообщение. [{#T}](../../push-notifications/index.md) {% endnote %} {% include notitle [limit](../../_auto/method_limits/getChats.md) %}
|
||||
* Получение доступных чатов
|
||||
*/
|
||||
getChats(businessId, getChatsRequest, pageToken, limit, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.getChatsRaw({ businessId: businessId, getChatsRequest: getChatsRequest, pageToken: pageToken, limit: limit }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/sendFileToChat.md) %} Отправляет файл в чат с покупателем. {% include notitle [limit](../../_auto/method_limits/sendFileToChat.md) %}
|
||||
* Отправка файла в чат
|
||||
*/
|
||||
sendFileToChatRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['businessId'] == null) {
|
||||
throw new runtime.RequiredError('businessId', 'Required parameter "businessId" was null or undefined when calling sendFileToChat().');
|
||||
}
|
||||
if (requestParameters['chatId'] == null) {
|
||||
throw new runtime.RequiredError('chatId', 'Required parameter "chatId" was null or undefined when calling sendFileToChat().');
|
||||
}
|
||||
if (requestParameters['file'] == null) {
|
||||
throw new runtime.RequiredError('file', 'Required parameter "file" was null or undefined when calling sendFileToChat().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
if (requestParameters['chatId'] != null) {
|
||||
queryParameters['chatId'] = requestParameters['chatId'];
|
||||
}
|
||||
const headerParameters = {};
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const consumes = [
|
||||
{ contentType: 'multipart/form-data' },
|
||||
];
|
||||
// @ts-ignore: canConsumeForm may be unused
|
||||
const canConsumeForm = runtime.canConsumeForm(consumes);
|
||||
let formParams;
|
||||
let useForm = false;
|
||||
// use FormData to transmit files using content-type "multipart/form-data"
|
||||
useForm = canConsumeForm;
|
||||
if (useForm) {
|
||||
formParams = new FormData();
|
||||
}
|
||||
else {
|
||||
formParams = new URLSearchParams();
|
||||
}
|
||||
if (requestParameters['file'] != null) {
|
||||
formParams.append('file', requestParameters['file']);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v2/businesses/{businessId}/chats/file/send`.replace(`{${"businessId"}}`, encodeURIComponent(String(requestParameters['businessId']))),
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: formParams,
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.EmptyApiResponseFromJSON)(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/sendFileToChat.md) %} Отправляет файл в чат с покупателем. {% include notitle [limit](../../_auto/method_limits/sendFileToChat.md) %}
|
||||
* Отправка файла в чат
|
||||
*/
|
||||
sendFileToChat(businessId, chatId, file, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.sendFileToChatRaw({ businessId: businessId, chatId: chatId, file: file }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/sendMessageToChat.md) %} Отправляет сообщение в чат с покупателем. {% include notitle [limit](../../_auto/method_limits/sendMessageToChat.md) %}
|
||||
* Отправка сообщения в чат
|
||||
*/
|
||||
sendMessageToChatRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['businessId'] == null) {
|
||||
throw new runtime.RequiredError('businessId', 'Required parameter "businessId" was null or undefined when calling sendMessageToChat().');
|
||||
}
|
||||
if (requestParameters['chatId'] == null) {
|
||||
throw new runtime.RequiredError('chatId', 'Required parameter "chatId" was null or undefined when calling sendMessageToChat().');
|
||||
}
|
||||
if (requestParameters['sendMessageToChatRequest'] == null) {
|
||||
throw new runtime.RequiredError('sendMessageToChatRequest', 'Required parameter "sendMessageToChatRequest" was null or undefined when calling sendMessageToChat().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
if (requestParameters['chatId'] != null) {
|
||||
queryParameters['chatId'] = requestParameters['chatId'];
|
||||
}
|
||||
const headerParameters = {};
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v2/businesses/{businessId}/chats/message`.replace(`{${"businessId"}}`, encodeURIComponent(String(requestParameters['businessId']))),
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: (0, index_1.SendMessageToChatRequestToJSON)(requestParameters['sendMessageToChatRequest']),
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.EmptyApiResponseFromJSON)(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/sendMessageToChat.md) %} Отправляет сообщение в чат с покупателем. {% include notitle [limit](../../_auto/method_limits/sendMessageToChat.md) %}
|
||||
* Отправка сообщения в чат
|
||||
*/
|
||||
sendMessageToChat(businessId, chatId, sendMessageToChatRequest, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.sendMessageToChatRaw({ businessId: businessId, chatId: chatId, sendMessageToChatRequest: sendMessageToChatRequest }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
}
|
||||
exports.ChatsApi = ChatsApi;
|
||||
62
dist/apis/ContentApi.d.ts
vendored
Normal file
62
dist/apis/ContentApi.d.ts
vendored
Normal file
@@ -0,0 +1,62 @@
|
||||
/**
|
||||
* API Яндекс Маркета для продавцов
|
||||
* API Яндекс Маркета помогает продавцам автоматизировать и упростить работу с маркетплейсом. В числе возможностей интеграции: * управление каталогом товаров и витриной, * обработка заказов, * изменение настроек магазина, * получение отчетов.
|
||||
*
|
||||
* The version of the OpenAPI document: LATEST
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
import * as runtime from '../runtime';
|
||||
import type { GetCategoryContentParametersResponse, GetOfferCardsContentStatusRequest, GetOfferCardsContentStatusResponse, UpdateOfferContentRequest, UpdateOfferContentResponse } from '../models/index';
|
||||
export interface ContentApiGetCategoryContentParametersRequest {
|
||||
categoryId: number;
|
||||
businessId?: number;
|
||||
}
|
||||
export interface ContentApiGetOfferCardsContentStatusOperationRequest {
|
||||
businessId: number;
|
||||
pageToken?: string;
|
||||
limit?: number;
|
||||
getOfferCardsContentStatusRequest?: GetOfferCardsContentStatusRequest;
|
||||
}
|
||||
export interface ContentApiUpdateOfferContentOperationRequest {
|
||||
businessId: number;
|
||||
updateOfferContentRequest: UpdateOfferContentRequest;
|
||||
}
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export declare class ContentApi extends runtime.BaseAPI {
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getCategoryContentParameters.md) %} Возвращает список характеристик с допустимыми значениями для заданной [листовой категории](*list-category). Поля в ответе определяют правила передачи характеристики в методах: - [POST v2/businesses/{businessId}/offer-mappings/update](../../reference/business-offer-mappings/updateOfferMappings.md) - [POST v2/businesses/{businessId}/offer-cards/update](../../reference/content/updateOfferContent.md) {% include notitle [limit](../../_auto/method_limits/getCategoryContentParameters.md) %}
|
||||
* Списки характеристик товаров по категориям
|
||||
*/
|
||||
getCategoryContentParametersRaw(requestParameters: ContentApiGetCategoryContentParametersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetCategoryContentParametersResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getCategoryContentParameters.md) %} Возвращает список характеристик с допустимыми значениями для заданной [листовой категории](*list-category). Поля в ответе определяют правила передачи характеристики в методах: - [POST v2/businesses/{businessId}/offer-mappings/update](../../reference/business-offer-mappings/updateOfferMappings.md) - [POST v2/businesses/{businessId}/offer-cards/update](../../reference/content/updateOfferContent.md) {% include notitle [limit](../../_auto/method_limits/getCategoryContentParameters.md) %}
|
||||
* Списки характеристик товаров по категориям
|
||||
*/
|
||||
getCategoryContentParameters(categoryId: number, businessId?: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetCategoryContentParametersResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getOfferCardsContentStatus.md) %} Возвращает сведения о состоянии контента для заданных товаров: * создана ли карточка товара и в каком она статусе; * рейтинг карточки — на сколько процентов она заполнена; * переданные характеристики товаров; * есть ли ошибки или предупреждения, связанные с контентом; * рекомендации по заполнению карточки. Чтобы получить другие характеристики товаров, воспользуйтесь методом [POST v2/businesses/{businessId}/offer-mappings](../../reference/business-offer-mappings/getOfferMappings.md). {% include notitle [limit](../../_auto/method_limits/getOfferCardsContentStatus.md) %}
|
||||
* Получение информации о заполненности карточек магазина
|
||||
*/
|
||||
getOfferCardsContentStatusRaw(requestParameters: ContentApiGetOfferCardsContentStatusOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetOfferCardsContentStatusResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getOfferCardsContentStatus.md) %} Возвращает сведения о состоянии контента для заданных товаров: * создана ли карточка товара и в каком она статусе; * рейтинг карточки — на сколько процентов она заполнена; * переданные характеристики товаров; * есть ли ошибки или предупреждения, связанные с контентом; * рекомендации по заполнению карточки. Чтобы получить другие характеристики товаров, воспользуйтесь методом [POST v2/businesses/{businessId}/offer-mappings](../../reference/business-offer-mappings/getOfferMappings.md). {% include notitle [limit](../../_auto/method_limits/getOfferCardsContentStatus.md) %}
|
||||
* Получение информации о заполненности карточек магазина
|
||||
*/
|
||||
getOfferCardsContentStatus(businessId: number, pageToken?: string, limit?: number, getOfferCardsContentStatusRequest?: GetOfferCardsContentStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetOfferCardsContentStatusResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/updateOfferContent.md) %} Редактирует характеристики товара, которые специфичны для категории, к которой он относится. {% note warning \"Здесь только то, что относится к конкретной категории\" %} Если вам нужно изменить основные параметры товара (название, описание, изображения, видео, производитель, штрихкод), воспользуйтесь запросом [POST v2/businesses/{businessId}/offer-mappings/update](../../reference/business-offer-mappings/updateOfferMappings.md). {% endnote %} Чтобы удалить характеристики, которые заданы в параметрах с типом `string`, передайте пустое значение. {% note info \"Данные в каталоге обновляются не мгновенно\" %} Это занимает до нескольких минут. {% endnote %} {% include notitle [limit](../../_auto/method_limits/updateOfferContent.md) %}
|
||||
* Редактирование категорийных характеристик товара
|
||||
*/
|
||||
updateOfferContentRaw(requestParameters: ContentApiUpdateOfferContentOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UpdateOfferContentResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/updateOfferContent.md) %} Редактирует характеристики товара, которые специфичны для категории, к которой он относится. {% note warning \"Здесь только то, что относится к конкретной категории\" %} Если вам нужно изменить основные параметры товара (название, описание, изображения, видео, производитель, штрихкод), воспользуйтесь запросом [POST v2/businesses/{businessId}/offer-mappings/update](../../reference/business-offer-mappings/updateOfferMappings.md). {% endnote %} Чтобы удалить характеристики, которые заданы в параметрах с типом `string`, передайте пустое значение. {% note info \"Данные в каталоге обновляются не мгновенно\" %} Это занимает до нескольких минут. {% endnote %} {% include notitle [limit](../../_auto/method_limits/updateOfferContent.md) %}
|
||||
* Редактирование категорийных характеристик товара
|
||||
*/
|
||||
updateOfferContent(businessId: number, updateOfferContentRequest: UpdateOfferContentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UpdateOfferContentResponse>;
|
||||
}
|
||||
160
dist/apis/ContentApi.js
vendored
Normal file
160
dist/apis/ContentApi.js
vendored
Normal file
@@ -0,0 +1,160 @@
|
||||
"use strict";
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* API Яндекс Маркета для продавцов
|
||||
* API Яндекс Маркета помогает продавцам автоматизировать и упростить работу с маркетплейсом. В числе возможностей интеграции: * управление каталогом товаров и витриной, * обработка заказов, * изменение настроек магазина, * получение отчетов.
|
||||
*
|
||||
* The version of the OpenAPI document: LATEST
|
||||
*
|
||||
*
|
||||
* 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.ContentApi = void 0;
|
||||
const runtime = require("../runtime");
|
||||
const index_1 = require("../models/index");
|
||||
/**
|
||||
*
|
||||
*/
|
||||
class ContentApi extends runtime.BaseAPI {
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getCategoryContentParameters.md) %} Возвращает список характеристик с допустимыми значениями для заданной [листовой категории](*list-category). Поля в ответе определяют правила передачи характеристики в методах: - [POST v2/businesses/{businessId}/offer-mappings/update](../../reference/business-offer-mappings/updateOfferMappings.md) - [POST v2/businesses/{businessId}/offer-cards/update](../../reference/content/updateOfferContent.md) {% include notitle [limit](../../_auto/method_limits/getCategoryContentParameters.md) %}
|
||||
* Списки характеристик товаров по категориям
|
||||
*/
|
||||
getCategoryContentParametersRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['categoryId'] == null) {
|
||||
throw new runtime.RequiredError('categoryId', 'Required parameter "categoryId" was null or undefined when calling getCategoryContentParameters().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
if (requestParameters['businessId'] != null) {
|
||||
queryParameters['businessId'] = requestParameters['businessId'];
|
||||
}
|
||||
const headerParameters = {};
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v2/category/{categoryId}/parameters`.replace(`{${"categoryId"}}`, encodeURIComponent(String(requestParameters['categoryId']))),
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.GetCategoryContentParametersResponseFromJSON)(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getCategoryContentParameters.md) %} Возвращает список характеристик с допустимыми значениями для заданной [листовой категории](*list-category). Поля в ответе определяют правила передачи характеристики в методах: - [POST v2/businesses/{businessId}/offer-mappings/update](../../reference/business-offer-mappings/updateOfferMappings.md) - [POST v2/businesses/{businessId}/offer-cards/update](../../reference/content/updateOfferContent.md) {% include notitle [limit](../../_auto/method_limits/getCategoryContentParameters.md) %}
|
||||
* Списки характеристик товаров по категориям
|
||||
*/
|
||||
getCategoryContentParameters(categoryId, businessId, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.getCategoryContentParametersRaw({ categoryId: categoryId, businessId: businessId }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getOfferCardsContentStatus.md) %} Возвращает сведения о состоянии контента для заданных товаров: * создана ли карточка товара и в каком она статусе; * рейтинг карточки — на сколько процентов она заполнена; * переданные характеристики товаров; * есть ли ошибки или предупреждения, связанные с контентом; * рекомендации по заполнению карточки. Чтобы получить другие характеристики товаров, воспользуйтесь методом [POST v2/businesses/{businessId}/offer-mappings](../../reference/business-offer-mappings/getOfferMappings.md). {% include notitle [limit](../../_auto/method_limits/getOfferCardsContentStatus.md) %}
|
||||
* Получение информации о заполненности карточек магазина
|
||||
*/
|
||||
getOfferCardsContentStatusRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['businessId'] == null) {
|
||||
throw new runtime.RequiredError('businessId', 'Required parameter "businessId" was null or undefined when calling getOfferCardsContentStatus().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
if (requestParameters['pageToken'] != null) {
|
||||
queryParameters['pageToken'] = requestParameters['pageToken'];
|
||||
}
|
||||
if (requestParameters['limit'] != null) {
|
||||
queryParameters['limit'] = requestParameters['limit'];
|
||||
}
|
||||
const headerParameters = {};
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v2/businesses/{businessId}/offer-cards`.replace(`{${"businessId"}}`, encodeURIComponent(String(requestParameters['businessId']))),
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: (0, index_1.GetOfferCardsContentStatusRequestToJSON)(requestParameters['getOfferCardsContentStatusRequest']),
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.GetOfferCardsContentStatusResponseFromJSON)(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getOfferCardsContentStatus.md) %} Возвращает сведения о состоянии контента для заданных товаров: * создана ли карточка товара и в каком она статусе; * рейтинг карточки — на сколько процентов она заполнена; * переданные характеристики товаров; * есть ли ошибки или предупреждения, связанные с контентом; * рекомендации по заполнению карточки. Чтобы получить другие характеристики товаров, воспользуйтесь методом [POST v2/businesses/{businessId}/offer-mappings](../../reference/business-offer-mappings/getOfferMappings.md). {% include notitle [limit](../../_auto/method_limits/getOfferCardsContentStatus.md) %}
|
||||
* Получение информации о заполненности карточек магазина
|
||||
*/
|
||||
getOfferCardsContentStatus(businessId, pageToken, limit, getOfferCardsContentStatusRequest, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.getOfferCardsContentStatusRaw({ businessId: businessId, pageToken: pageToken, limit: limit, getOfferCardsContentStatusRequest: getOfferCardsContentStatusRequest }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/updateOfferContent.md) %} Редактирует характеристики товара, которые специфичны для категории, к которой он относится. {% note warning \"Здесь только то, что относится к конкретной категории\" %} Если вам нужно изменить основные параметры товара (название, описание, изображения, видео, производитель, штрихкод), воспользуйтесь запросом [POST v2/businesses/{businessId}/offer-mappings/update](../../reference/business-offer-mappings/updateOfferMappings.md). {% endnote %} Чтобы удалить характеристики, которые заданы в параметрах с типом `string`, передайте пустое значение. {% note info \"Данные в каталоге обновляются не мгновенно\" %} Это занимает до нескольких минут. {% endnote %} {% include notitle [limit](../../_auto/method_limits/updateOfferContent.md) %}
|
||||
* Редактирование категорийных характеристик товара
|
||||
*/
|
||||
updateOfferContentRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['businessId'] == null) {
|
||||
throw new runtime.RequiredError('businessId', 'Required parameter "businessId" was null or undefined when calling updateOfferContent().');
|
||||
}
|
||||
if (requestParameters['updateOfferContentRequest'] == null) {
|
||||
throw new runtime.RequiredError('updateOfferContentRequest', 'Required parameter "updateOfferContentRequest" was null or undefined when calling updateOfferContent().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
const headerParameters = {};
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v2/businesses/{businessId}/offer-cards/update`.replace(`{${"businessId"}}`, encodeURIComponent(String(requestParameters['businessId']))),
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: (0, index_1.UpdateOfferContentRequestToJSON)(requestParameters['updateOfferContentRequest']),
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.UpdateOfferContentResponseFromJSON)(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/updateOfferContent.md) %} Редактирует характеристики товара, которые специфичны для категории, к которой он относится. {% note warning \"Здесь только то, что относится к конкретной категории\" %} Если вам нужно изменить основные параметры товара (название, описание, изображения, видео, производитель, штрихкод), воспользуйтесь запросом [POST v2/businesses/{businessId}/offer-mappings/update](../../reference/business-offer-mappings/updateOfferMappings.md). {% endnote %} Чтобы удалить характеристики, которые заданы в параметрах с типом `string`, передайте пустое значение. {% note info \"Данные в каталоге обновляются не мгновенно\" %} Это занимает до нескольких минут. {% endnote %} {% include notitle [limit](../../_auto/method_limits/updateOfferContent.md) %}
|
||||
* Редактирование категорийных характеристик товара
|
||||
*/
|
||||
updateOfferContent(businessId, updateOfferContentRequest, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.updateOfferContentRaw({ businessId: businessId, updateOfferContentRequest: updateOfferContentRequest }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
}
|
||||
exports.ContentApi = ContentApi;
|
||||
2023
dist/apis/DbsApi.d.ts
vendored
Normal file
2023
dist/apis/DbsApi.d.ts
vendored
Normal file
File diff suppressed because one or more lines are too long
5956
dist/apis/DbsApi.js
vendored
Normal file
5956
dist/apis/DbsApi.js
vendored
Normal file
File diff suppressed because one or more lines are too long
46
dist/apis/DeliveryOptionsApi.d.ts
vendored
Normal file
46
dist/apis/DeliveryOptionsApi.d.ts
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
/**
|
||||
* API Яндекс Маркета для продавцов
|
||||
* API Яндекс Маркета помогает продавцам автоматизировать и упростить работу с маркетплейсом. В числе возможностей интеграции: * управление каталогом товаров и витриной, * обработка заказов, * изменение настроек магазина, * получение отчетов.
|
||||
*
|
||||
* The version of the OpenAPI document: LATEST
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
import * as runtime from '../runtime';
|
||||
import type { GetDeliveryOptionsRequest, GetDeliveryOptionsResponse, GetReturnDeliveryOptionsRequest, GetReturnDeliveryOptionsResponse } from '../models/index';
|
||||
export interface DeliveryOptionsApiGetDeliveryOptionsOperationRequest {
|
||||
campaignId: number;
|
||||
getDeliveryOptionsRequest: GetDeliveryOptionsRequest;
|
||||
}
|
||||
export interface DeliveryOptionsApiGetReturnDeliveryOptionsOperationRequest {
|
||||
campaignId: number;
|
||||
getReturnDeliveryOptionsRequest: GetReturnDeliveryOptionsRequest;
|
||||
}
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export declare class DeliveryOptionsApi extends runtime.BaseAPI {
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getDeliveryOptions.md) %} Возвращает список вариантов для доставки заказов. Выберите подходящий вариант доставки из ответа и передайте его при создании заказа. Укажите `courierDelivery` для курьерской доставки или `pickupDelivery` для доставки в пункт выдачи. Не передавайте оба параметра одновременно. {% include notitle [limit](../../_auto/method_limits/getDeliveryOptions.md) %}
|
||||
* Получение доступных вариантов доставки заказов
|
||||
*/
|
||||
getDeliveryOptionsRaw(requestParameters: DeliveryOptionsApiGetDeliveryOptionsOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetDeliveryOptionsResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getDeliveryOptions.md) %} Возвращает список вариантов для доставки заказов. Выберите подходящий вариант доставки из ответа и передайте его при создании заказа. Укажите `courierDelivery` для курьерской доставки или `pickupDelivery` для доставки в пункт выдачи. Не передавайте оба параметра одновременно. {% include notitle [limit](../../_auto/method_limits/getDeliveryOptions.md) %}
|
||||
* Получение доступных вариантов доставки заказов
|
||||
*/
|
||||
getDeliveryOptions(campaignId: number, getDeliveryOptionsRequest: GetDeliveryOptionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetDeliveryOptionsResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getReturnDeliveryOptions.md) %} Возвращает список идентификаторов пунктов выдачи, которые могут принять возврат указанных товаров. {% include notitle [limit](../../_auto/method_limits/getReturnDeliveryOptions.md) %}
|
||||
* Получение подходящих для возврата пунктов выдачи
|
||||
*/
|
||||
getReturnDeliveryOptionsRaw(requestParameters: DeliveryOptionsApiGetReturnDeliveryOptionsOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetReturnDeliveryOptionsResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getReturnDeliveryOptions.md) %} Возвращает список идентификаторов пунктов выдачи, которые могут принять возврат указанных товаров. {% include notitle [limit](../../_auto/method_limits/getReturnDeliveryOptions.md) %}
|
||||
* Получение подходящих для возврата пунктов выдачи
|
||||
*/
|
||||
getReturnDeliveryOptions(campaignId: number, getReturnDeliveryOptionsRequest: GetReturnDeliveryOptionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetReturnDeliveryOptionsResponse>;
|
||||
}
|
||||
117
dist/apis/DeliveryOptionsApi.js
vendored
Normal file
117
dist/apis/DeliveryOptionsApi.js
vendored
Normal file
@@ -0,0 +1,117 @@
|
||||
"use strict";
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* API Яндекс Маркета для продавцов
|
||||
* API Яндекс Маркета помогает продавцам автоматизировать и упростить работу с маркетплейсом. В числе возможностей интеграции: * управление каталогом товаров и витриной, * обработка заказов, * изменение настроек магазина, * получение отчетов.
|
||||
*
|
||||
* The version of the OpenAPI document: LATEST
|
||||
*
|
||||
*
|
||||
* 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.DeliveryOptionsApi = void 0;
|
||||
const runtime = require("../runtime");
|
||||
const index_1 = require("../models/index");
|
||||
/**
|
||||
*
|
||||
*/
|
||||
class DeliveryOptionsApi extends runtime.BaseAPI {
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getDeliveryOptions.md) %} Возвращает список вариантов для доставки заказов. Выберите подходящий вариант доставки из ответа и передайте его при создании заказа. Укажите `courierDelivery` для курьерской доставки или `pickupDelivery` для доставки в пункт выдачи. Не передавайте оба параметра одновременно. {% include notitle [limit](../../_auto/method_limits/getDeliveryOptions.md) %}
|
||||
* Получение доступных вариантов доставки заказов
|
||||
*/
|
||||
getDeliveryOptionsRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['campaignId'] == null) {
|
||||
throw new runtime.RequiredError('campaignId', 'Required parameter "campaignId" was null or undefined when calling getDeliveryOptions().');
|
||||
}
|
||||
if (requestParameters['getDeliveryOptionsRequest'] == null) {
|
||||
throw new runtime.RequiredError('getDeliveryOptionsRequest', 'Required parameter "getDeliveryOptionsRequest" was null or undefined when calling getDeliveryOptions().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
const headerParameters = {};
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v1/campaigns/{campaignId}/delivery-options`.replace(`{${"campaignId"}}`, encodeURIComponent(String(requestParameters['campaignId']))),
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: (0, index_1.GetDeliveryOptionsRequestToJSON)(requestParameters['getDeliveryOptionsRequest']),
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.GetDeliveryOptionsResponseFromJSON)(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getDeliveryOptions.md) %} Возвращает список вариантов для доставки заказов. Выберите подходящий вариант доставки из ответа и передайте его при создании заказа. Укажите `courierDelivery` для курьерской доставки или `pickupDelivery` для доставки в пункт выдачи. Не передавайте оба параметра одновременно. {% include notitle [limit](../../_auto/method_limits/getDeliveryOptions.md) %}
|
||||
* Получение доступных вариантов доставки заказов
|
||||
*/
|
||||
getDeliveryOptions(campaignId, getDeliveryOptionsRequest, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.getDeliveryOptionsRaw({ campaignId: campaignId, getDeliveryOptionsRequest: getDeliveryOptionsRequest }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getReturnDeliveryOptions.md) %} Возвращает список идентификаторов пунктов выдачи, которые могут принять возврат указанных товаров. {% include notitle [limit](../../_auto/method_limits/getReturnDeliveryOptions.md) %}
|
||||
* Получение подходящих для возврата пунктов выдачи
|
||||
*/
|
||||
getReturnDeliveryOptionsRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['campaignId'] == null) {
|
||||
throw new runtime.RequiredError('campaignId', 'Required parameter "campaignId" was null or undefined when calling getReturnDeliveryOptions().');
|
||||
}
|
||||
if (requestParameters['getReturnDeliveryOptionsRequest'] == null) {
|
||||
throw new runtime.RequiredError('getReturnDeliveryOptionsRequest', 'Required parameter "getReturnDeliveryOptionsRequest" was null or undefined when calling getReturnDeliveryOptions().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
const headerParameters = {};
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v1/campaigns/{campaignId}/return-delivery-options`.replace(`{${"campaignId"}}`, encodeURIComponent(String(requestParameters['campaignId']))),
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: (0, index_1.GetReturnDeliveryOptionsRequestToJSON)(requestParameters['getReturnDeliveryOptionsRequest']),
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.GetReturnDeliveryOptionsResponseFromJSON)(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getReturnDeliveryOptions.md) %} Возвращает список идентификаторов пунктов выдачи, которые могут принять возврат указанных товаров. {% include notitle [limit](../../_auto/method_limits/getReturnDeliveryOptions.md) %}
|
||||
* Получение подходящих для возврата пунктов выдачи
|
||||
*/
|
||||
getReturnDeliveryOptions(campaignId, getReturnDeliveryOptionsRequest, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.getReturnDeliveryOptionsRaw({ campaignId: campaignId, getReturnDeliveryOptionsRequest: getReturnDeliveryOptionsRequest }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
}
|
||||
exports.DeliveryOptionsApi = DeliveryOptionsApi;
|
||||
28
dist/apis/DeliveryServicesApi.d.ts
vendored
Normal file
28
dist/apis/DeliveryServicesApi.d.ts
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
/**
|
||||
* API Яндекс Маркета для продавцов
|
||||
* API Яндекс Маркета помогает продавцам автоматизировать и упростить работу с маркетплейсом. В числе возможностей интеграции: * управление каталогом товаров и витриной, * обработка заказов, * изменение настроек магазина, * получение отчетов.
|
||||
*
|
||||
* The version of the OpenAPI document: LATEST
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
import * as runtime from '../runtime';
|
||||
import type { GetDeliveryServicesResponse } from '../models/index';
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export declare class DeliveryServicesApi extends runtime.BaseAPI {
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getDeliveryServices.md) %} Возвращает справочник служб доставки: идентификаторы и наименования. {% include notitle [limit](../../_auto/method_limits/getDeliveryServices.md) %}
|
||||
* Справочник служб доставки
|
||||
*/
|
||||
getDeliveryServicesRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetDeliveryServicesResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getDeliveryServices.md) %} Возвращает справочник служб доставки: идентификаторы и наименования. {% include notitle [limit](../../_auto/method_limits/getDeliveryServices.md) %}
|
||||
* Справочник служб доставки
|
||||
*/
|
||||
getDeliveryServices(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetDeliveryServicesResponse>;
|
||||
}
|
||||
67
dist/apis/DeliveryServicesApi.js
vendored
Normal file
67
dist/apis/DeliveryServicesApi.js
vendored
Normal file
@@ -0,0 +1,67 @@
|
||||
"use strict";
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* API Яндекс Маркета для продавцов
|
||||
* API Яндекс Маркета помогает продавцам автоматизировать и упростить работу с маркетплейсом. В числе возможностей интеграции: * управление каталогом товаров и витриной, * обработка заказов, * изменение настроек магазина, * получение отчетов.
|
||||
*
|
||||
* The version of the OpenAPI document: LATEST
|
||||
*
|
||||
*
|
||||
* 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.DeliveryServicesApi = void 0;
|
||||
const runtime = require("../runtime");
|
||||
const index_1 = require("../models/index");
|
||||
/**
|
||||
*
|
||||
*/
|
||||
class DeliveryServicesApi extends runtime.BaseAPI {
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getDeliveryServices.md) %} Возвращает справочник служб доставки: идентификаторы и наименования. {% include notitle [limit](../../_auto/method_limits/getDeliveryServices.md) %}
|
||||
* Справочник служб доставки
|
||||
*/
|
||||
getDeliveryServicesRaw(initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const queryParameters = {};
|
||||
const headerParameters = {};
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v2/delivery/services`,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.GetDeliveryServicesResponseFromJSON)(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getDeliveryServices.md) %} Возвращает справочник служб доставки: идентификаторы и наименования. {% include notitle [limit](../../_auto/method_limits/getDeliveryServices.md) %}
|
||||
* Справочник служб доставки
|
||||
*/
|
||||
getDeliveryServices(initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.getDeliveryServicesRaw(initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
}
|
||||
exports.DeliveryServicesApi = DeliveryServicesApi;
|
||||
1779
dist/apis/ExpressApi.d.ts
vendored
Normal file
1779
dist/apis/ExpressApi.d.ts
vendored
Normal file
File diff suppressed because one or more lines are too long
5240
dist/apis/ExpressApi.js
vendored
Normal file
5240
dist/apis/ExpressApi.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1953
dist/apis/FbsApi.d.ts
vendored
Normal file
1953
dist/apis/FbsApi.d.ts
vendored
Normal file
File diff suppressed because one or more lines are too long
5743
dist/apis/FbsApi.js
vendored
Normal file
5743
dist/apis/FbsApi.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1572
dist/apis/FbyApi.d.ts
vendored
Normal file
1572
dist/apis/FbyApi.d.ts
vendored
Normal file
File diff suppressed because it is too large
Load Diff
4639
dist/apis/FbyApi.js
vendored
Normal file
4639
dist/apis/FbyApi.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
113
dist/apis/GoodsFeedbackApi.d.ts
vendored
Normal file
113
dist/apis/GoodsFeedbackApi.d.ts
vendored
Normal file
@@ -0,0 +1,113 @@
|
||||
/**
|
||||
* API Яндекс Маркета для продавцов
|
||||
* API Яндекс Маркета помогает продавцам автоматизировать и упростить работу с маркетплейсом. В числе возможностей интеграции: * управление каталогом товаров и витриной, * обработка заказов, * изменение настроек магазина, * получение отчетов.
|
||||
*
|
||||
* The version of the OpenAPI document: LATEST
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
import * as runtime from '../runtime';
|
||||
import type { DeleteGoodsFeedbackCommentRequest, EmptyApiResponse, GetGoodsFeedbackCommentsRequest, GetGoodsFeedbackCommentsResponse, GetGoodsFeedbackRequest, GetGoodsFeedbackResponse, GetGoodsFeedbackUrbanadsRequest, GetGoodsFeedbackUrbanadsResponse, SkipGoodsFeedbackReactionRequest, SourceType, UpdateGoodsFeedbackCommentRequest, UpdateGoodsFeedbackCommentResponse } from '../models/index';
|
||||
export interface GoodsFeedbackApiDeleteGoodsFeedbackCommentOperationRequest {
|
||||
businessId: number;
|
||||
deleteGoodsFeedbackCommentRequest: DeleteGoodsFeedbackCommentRequest;
|
||||
sourceType?: SourceType;
|
||||
}
|
||||
export interface GoodsFeedbackApiGetGoodsFeedbackCommentsOperationRequest {
|
||||
businessId: number;
|
||||
getGoodsFeedbackCommentsRequest: GetGoodsFeedbackCommentsRequest;
|
||||
pageToken?: string;
|
||||
limit?: number;
|
||||
sourceType?: SourceType;
|
||||
}
|
||||
export interface GoodsFeedbackApiGetGoodsFeedbacksRequest {
|
||||
businessId: number;
|
||||
pageToken?: string;
|
||||
limit?: number;
|
||||
getGoodsFeedbackRequest?: GetGoodsFeedbackRequest;
|
||||
}
|
||||
export interface GoodsFeedbackApiGetGoodsFeedbacksUrbanadsRequest {
|
||||
businessId: number;
|
||||
pageToken?: string;
|
||||
limit?: number;
|
||||
sourceType?: SourceType;
|
||||
getGoodsFeedbackUrbanadsRequest?: GetGoodsFeedbackUrbanadsRequest;
|
||||
}
|
||||
export interface GoodsFeedbackApiSkipGoodsFeedbacksReactionRequest {
|
||||
businessId: number;
|
||||
skipGoodsFeedbackReactionRequest: SkipGoodsFeedbackReactionRequest;
|
||||
sourceType?: SourceType;
|
||||
}
|
||||
export interface GoodsFeedbackApiUpdateGoodsFeedbackCommentOperationRequest {
|
||||
businessId: number;
|
||||
updateGoodsFeedbackCommentRequest: UpdateGoodsFeedbackCommentRequest;
|
||||
sourceType?: SourceType;
|
||||
}
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export declare class GoodsFeedbackApi extends runtime.BaseAPI {
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/deleteGoodsFeedbackComment.md) %} Удаляет комментарий магазина. {% include notitle [limit](../../_auto/method_limits/deleteGoodsFeedbackComment.md) %}
|
||||
* Удаление комментария к отзыву
|
||||
*/
|
||||
deleteGoodsFeedbackCommentRaw(requestParameters: GoodsFeedbackApiDeleteGoodsFeedbackCommentOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<EmptyApiResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/deleteGoodsFeedbackComment.md) %} Удаляет комментарий магазина. {% include notitle [limit](../../_auto/method_limits/deleteGoodsFeedbackComment.md) %}
|
||||
* Удаление комментария к отзыву
|
||||
*/
|
||||
deleteGoodsFeedbackComment(businessId: number, deleteGoodsFeedbackCommentRequest: DeleteGoodsFeedbackCommentRequest, sourceType?: SourceType, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<EmptyApiResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getGoodsFeedbackComments.md) %} Возвращает комментарии к отзыву, кроме: * тех, которые удалили пользователи или Маркет; * комментариев к удаленным отзывам. Идентификатор родительского комментария `parentId` возвращается только для ответов на другие комментарии, но не для ответов на отзывы. {% if audience == \"partner\" %} {% note tip \"Вы также можете настроить API-уведомления\" %} Маркет отправит вам [запрос](../../push-notifications/reference/sendNotification.md), когда появится новый комментарий. А полную информацию о нем можно получить с помощью этого метода. [{#T}](../../push-notifications/index.md) {% endnote %} {% endif %} Результаты возвращаются постранично. Комментарии расположены в порядке публикации, поэтому вы можете передавать определенный идентификатор страницы в `pageToken`, если вы получали его ранее. {% include notitle [limit](../../_auto/method_limits/getGoodsFeedbackComments.md) %}
|
||||
* Получение комментариев к отзыву
|
||||
*/
|
||||
getGoodsFeedbackCommentsRaw(requestParameters: GoodsFeedbackApiGetGoodsFeedbackCommentsOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetGoodsFeedbackCommentsResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getGoodsFeedbackComments.md) %} Возвращает комментарии к отзыву, кроме: * тех, которые удалили пользователи или Маркет; * комментариев к удаленным отзывам. Идентификатор родительского комментария `parentId` возвращается только для ответов на другие комментарии, но не для ответов на отзывы. {% if audience == \"partner\" %} {% note tip \"Вы также можете настроить API-уведомления\" %} Маркет отправит вам [запрос](../../push-notifications/reference/sendNotification.md), когда появится новый комментарий. А полную информацию о нем можно получить с помощью этого метода. [{#T}](../../push-notifications/index.md) {% endnote %} {% endif %} Результаты возвращаются постранично. Комментарии расположены в порядке публикации, поэтому вы можете передавать определенный идентификатор страницы в `pageToken`, если вы получали его ранее. {% include notitle [limit](../../_auto/method_limits/getGoodsFeedbackComments.md) %}
|
||||
* Получение комментариев к отзыву
|
||||
*/
|
||||
getGoodsFeedbackComments(businessId: number, getGoodsFeedbackCommentsRequest: GetGoodsFeedbackCommentsRequest, pageToken?: string, limit?: number, sourceType?: SourceType, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetGoodsFeedbackCommentsResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getGoodsFeedbacks.md) %} Возвращает отзывы о товарах продавца по указанным фильтрам. **Исключение:** отзывы, которые удалили покупатели или Маркет. {% note tip \"Вы также можете настроить API-уведомления\" %} Маркет отправит вам [запрос](../../push-notifications/reference/sendNotification.md), когда появится новый отзыв. А полную информацию о нем можно получить с помощью этого метода. [{#T}](../../push-notifications/index.md) {% endnote %} Результаты возвращаются постранично. Отзывы расположены в порядке публикации, поэтому вы можете передавать определенный идентификатор страницы в `pageToken`, если вы получали его ранее. {% include notitle [limit](../../_auto/method_limits/getGoodsFeedbacks.md) %}
|
||||
* Получение отзывов о товарах продавца
|
||||
*/
|
||||
getGoodsFeedbacksRaw(requestParameters: GoodsFeedbackApiGetGoodsFeedbacksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetGoodsFeedbackResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getGoodsFeedbacks.md) %} Возвращает отзывы о товарах продавца по указанным фильтрам. **Исключение:** отзывы, которые удалили покупатели или Маркет. {% note tip \"Вы также можете настроить API-уведомления\" %} Маркет отправит вам [запрос](../../push-notifications/reference/sendNotification.md), когда появится новый отзыв. А полную информацию о нем можно получить с помощью этого метода. [{#T}](../../push-notifications/index.md) {% endnote %} Результаты возвращаются постранично. Отзывы расположены в порядке публикации, поэтому вы можете передавать определенный идентификатор страницы в `pageToken`, если вы получали его ранее. {% include notitle [limit](../../_auto/method_limits/getGoodsFeedbacks.md) %}
|
||||
* Получение отзывов о товарах продавца
|
||||
*/
|
||||
getGoodsFeedbacks(businessId: number, pageToken?: string, limit?: number, getGoodsFeedbackRequest?: GetGoodsFeedbackRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetGoodsFeedbackResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getGoodsFeedbacksUrbanads.md) %} Возвращает отзывы о товарах бренда по указанным фильтрам. **Исключение:** отзывы, которые удалили покупатели или Маркет. Результаты возвращаются постранично. Отзывы расположены в порядке публикации, поэтому вы можете передавать определенный идентификатор страницы в `pageToken`, если вы получали его ранее. {% include notitle [limit](../../_auto/method_limits/getGoodsFeedbacksUrbanads.md) %}
|
||||
* Получение отзывов о товарах для рекламодателей
|
||||
*/
|
||||
getGoodsFeedbacksUrbanadsRaw(requestParameters: GoodsFeedbackApiGetGoodsFeedbacksUrbanadsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetGoodsFeedbackUrbanadsResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getGoodsFeedbacksUrbanads.md) %} Возвращает отзывы о товарах бренда по указанным фильтрам. **Исключение:** отзывы, которые удалили покупатели или Маркет. Результаты возвращаются постранично. Отзывы расположены в порядке публикации, поэтому вы можете передавать определенный идентификатор страницы в `pageToken`, если вы получали его ранее. {% include notitle [limit](../../_auto/method_limits/getGoodsFeedbacksUrbanads.md) %}
|
||||
* Получение отзывов о товарах для рекламодателей
|
||||
*/
|
||||
getGoodsFeedbacksUrbanads(businessId: number, pageToken?: string, limit?: number, sourceType?: SourceType, getGoodsFeedbackUrbanadsRequest?: GetGoodsFeedbackUrbanadsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetGoodsFeedbackUrbanadsResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/skipGoodsFeedbacksReaction.md) %} Пропускает реакцию на отзыв — параметр `needReaction` принимает значение `false` в методе получения всех отзывов [POST v2/businesses/{businessId}/goods-feedback](../../reference/goods-feedback/getGoodsFeedbacks.md). {% include notitle [limit](../../_auto/method_limits/skipGoodsFeedbacksReaction.md) %}
|
||||
* Пропуск реакции на отзывы
|
||||
*/
|
||||
skipGoodsFeedbacksReactionRaw(requestParameters: GoodsFeedbackApiSkipGoodsFeedbacksReactionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<EmptyApiResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/skipGoodsFeedbacksReaction.md) %} Пропускает реакцию на отзыв — параметр `needReaction` принимает значение `false` в методе получения всех отзывов [POST v2/businesses/{businessId}/goods-feedback](../../reference/goods-feedback/getGoodsFeedbacks.md). {% include notitle [limit](../../_auto/method_limits/skipGoodsFeedbacksReaction.md) %}
|
||||
* Пропуск реакции на отзывы
|
||||
*/
|
||||
skipGoodsFeedbacksReaction(businessId: number, skipGoodsFeedbackReactionRequest: SkipGoodsFeedbackReactionRequest, sourceType?: SourceType, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<EmptyApiResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/updateGoodsFeedbackComment.md) %} Добавляет новый комментарий магазина или изменяет комментарий, который магазин оставлял ранее. Для создания комментария к отзыву передайте только идентификатор отзыва `feedbackId`. Чтобы добавить комментарий к другому комментарию, передайте: * `feedbackId` — идентификатор отзыва; * `comment.parentId` — идентификатор родительского комментария. Чтобы изменить комментарий, передайте: * `feedbackId`— идентификатор отзыва; * `comment.id` — идентификатор комментария, который нужно изменить. Если передать одновременно `comment.parentId` и `comment.id`, будет изменен существующий комментарий. {% include notitle [limit](../../_auto/method_limits/updateGoodsFeedbackComment.md) %}
|
||||
* Добавление нового или изменение созданного комментария
|
||||
*/
|
||||
updateGoodsFeedbackCommentRaw(requestParameters: GoodsFeedbackApiUpdateGoodsFeedbackCommentOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UpdateGoodsFeedbackCommentResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/updateGoodsFeedbackComment.md) %} Добавляет новый комментарий магазина или изменяет комментарий, который магазин оставлял ранее. Для создания комментария к отзыву передайте только идентификатор отзыва `feedbackId`. Чтобы добавить комментарий к другому комментарию, передайте: * `feedbackId` — идентификатор отзыва; * `comment.parentId` — идентификатор родительского комментария. Чтобы изменить комментарий, передайте: * `feedbackId`— идентификатор отзыва; * `comment.id` — идентификатор комментария, который нужно изменить. Если передать одновременно `comment.parentId` и `comment.id`, будет изменен существующий комментарий. {% include notitle [limit](../../_auto/method_limits/updateGoodsFeedbackComment.md) %}
|
||||
* Добавление нового или изменение созданного комментария
|
||||
*/
|
||||
updateGoodsFeedbackComment(businessId: number, updateGoodsFeedbackCommentRequest: UpdateGoodsFeedbackCommentRequest, sourceType?: SourceType, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UpdateGoodsFeedbackCommentResponse>;
|
||||
}
|
||||
312
dist/apis/GoodsFeedbackApi.js
vendored
Normal file
312
dist/apis/GoodsFeedbackApi.js
vendored
Normal file
@@ -0,0 +1,312 @@
|
||||
"use strict";
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* API Яндекс Маркета для продавцов
|
||||
* API Яндекс Маркета помогает продавцам автоматизировать и упростить работу с маркетплейсом. В числе возможностей интеграции: * управление каталогом товаров и витриной, * обработка заказов, * изменение настроек магазина, * получение отчетов.
|
||||
*
|
||||
* The version of the OpenAPI document: LATEST
|
||||
*
|
||||
*
|
||||
* 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.GoodsFeedbackApi = void 0;
|
||||
const runtime = require("../runtime");
|
||||
const index_1 = require("../models/index");
|
||||
/**
|
||||
*
|
||||
*/
|
||||
class GoodsFeedbackApi extends runtime.BaseAPI {
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/deleteGoodsFeedbackComment.md) %} Удаляет комментарий магазина. {% include notitle [limit](../../_auto/method_limits/deleteGoodsFeedbackComment.md) %}
|
||||
* Удаление комментария к отзыву
|
||||
*/
|
||||
deleteGoodsFeedbackCommentRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['businessId'] == null) {
|
||||
throw new runtime.RequiredError('businessId', 'Required parameter "businessId" was null or undefined when calling deleteGoodsFeedbackComment().');
|
||||
}
|
||||
if (requestParameters['deleteGoodsFeedbackCommentRequest'] == null) {
|
||||
throw new runtime.RequiredError('deleteGoodsFeedbackCommentRequest', 'Required parameter "deleteGoodsFeedbackCommentRequest" was null or undefined when calling deleteGoodsFeedbackComment().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
if (requestParameters['sourceType'] != null) {
|
||||
queryParameters['sourceType'] = requestParameters['sourceType'];
|
||||
}
|
||||
const headerParameters = {};
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v2/businesses/{businessId}/goods-feedback/comments/delete`.replace(`{${"businessId"}}`, encodeURIComponent(String(requestParameters['businessId']))),
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: (0, index_1.DeleteGoodsFeedbackCommentRequestToJSON)(requestParameters['deleteGoodsFeedbackCommentRequest']),
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.EmptyApiResponseFromJSON)(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/deleteGoodsFeedbackComment.md) %} Удаляет комментарий магазина. {% include notitle [limit](../../_auto/method_limits/deleteGoodsFeedbackComment.md) %}
|
||||
* Удаление комментария к отзыву
|
||||
*/
|
||||
deleteGoodsFeedbackComment(businessId, deleteGoodsFeedbackCommentRequest, sourceType, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.deleteGoodsFeedbackCommentRaw({ businessId: businessId, deleteGoodsFeedbackCommentRequest: deleteGoodsFeedbackCommentRequest, sourceType: sourceType }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getGoodsFeedbackComments.md) %} Возвращает комментарии к отзыву, кроме: * тех, которые удалили пользователи или Маркет; * комментариев к удаленным отзывам. Идентификатор родительского комментария `parentId` возвращается только для ответов на другие комментарии, но не для ответов на отзывы. {% if audience == \"partner\" %} {% note tip \"Вы также можете настроить API-уведомления\" %} Маркет отправит вам [запрос](../../push-notifications/reference/sendNotification.md), когда появится новый комментарий. А полную информацию о нем можно получить с помощью этого метода. [{#T}](../../push-notifications/index.md) {% endnote %} {% endif %} Результаты возвращаются постранично. Комментарии расположены в порядке публикации, поэтому вы можете передавать определенный идентификатор страницы в `pageToken`, если вы получали его ранее. {% include notitle [limit](../../_auto/method_limits/getGoodsFeedbackComments.md) %}
|
||||
* Получение комментариев к отзыву
|
||||
*/
|
||||
getGoodsFeedbackCommentsRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['businessId'] == null) {
|
||||
throw new runtime.RequiredError('businessId', 'Required parameter "businessId" was null or undefined when calling getGoodsFeedbackComments().');
|
||||
}
|
||||
if (requestParameters['getGoodsFeedbackCommentsRequest'] == null) {
|
||||
throw new runtime.RequiredError('getGoodsFeedbackCommentsRequest', 'Required parameter "getGoodsFeedbackCommentsRequest" was null or undefined when calling getGoodsFeedbackComments().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
if (requestParameters['pageToken'] != null) {
|
||||
queryParameters['pageToken'] = requestParameters['pageToken'];
|
||||
}
|
||||
if (requestParameters['limit'] != null) {
|
||||
queryParameters['limit'] = requestParameters['limit'];
|
||||
}
|
||||
if (requestParameters['sourceType'] != null) {
|
||||
queryParameters['sourceType'] = requestParameters['sourceType'];
|
||||
}
|
||||
const headerParameters = {};
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v2/businesses/{businessId}/goods-feedback/comments`.replace(`{${"businessId"}}`, encodeURIComponent(String(requestParameters['businessId']))),
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: (0, index_1.GetGoodsFeedbackCommentsRequestToJSON)(requestParameters['getGoodsFeedbackCommentsRequest']),
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.GetGoodsFeedbackCommentsResponseFromJSON)(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getGoodsFeedbackComments.md) %} Возвращает комментарии к отзыву, кроме: * тех, которые удалили пользователи или Маркет; * комментариев к удаленным отзывам. Идентификатор родительского комментария `parentId` возвращается только для ответов на другие комментарии, но не для ответов на отзывы. {% if audience == \"partner\" %} {% note tip \"Вы также можете настроить API-уведомления\" %} Маркет отправит вам [запрос](../../push-notifications/reference/sendNotification.md), когда появится новый комментарий. А полную информацию о нем можно получить с помощью этого метода. [{#T}](../../push-notifications/index.md) {% endnote %} {% endif %} Результаты возвращаются постранично. Комментарии расположены в порядке публикации, поэтому вы можете передавать определенный идентификатор страницы в `pageToken`, если вы получали его ранее. {% include notitle [limit](../../_auto/method_limits/getGoodsFeedbackComments.md) %}
|
||||
* Получение комментариев к отзыву
|
||||
*/
|
||||
getGoodsFeedbackComments(businessId, getGoodsFeedbackCommentsRequest, pageToken, limit, sourceType, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.getGoodsFeedbackCommentsRaw({ businessId: businessId, getGoodsFeedbackCommentsRequest: getGoodsFeedbackCommentsRequest, pageToken: pageToken, limit: limit, sourceType: sourceType }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getGoodsFeedbacks.md) %} Возвращает отзывы о товарах продавца по указанным фильтрам. **Исключение:** отзывы, которые удалили покупатели или Маркет. {% note tip \"Вы также можете настроить API-уведомления\" %} Маркет отправит вам [запрос](../../push-notifications/reference/sendNotification.md), когда появится новый отзыв. А полную информацию о нем можно получить с помощью этого метода. [{#T}](../../push-notifications/index.md) {% endnote %} Результаты возвращаются постранично. Отзывы расположены в порядке публикации, поэтому вы можете передавать определенный идентификатор страницы в `pageToken`, если вы получали его ранее. {% include notitle [limit](../../_auto/method_limits/getGoodsFeedbacks.md) %}
|
||||
* Получение отзывов о товарах продавца
|
||||
*/
|
||||
getGoodsFeedbacksRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['businessId'] == null) {
|
||||
throw new runtime.RequiredError('businessId', 'Required parameter "businessId" was null or undefined when calling getGoodsFeedbacks().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
if (requestParameters['pageToken'] != null) {
|
||||
queryParameters['pageToken'] = requestParameters['pageToken'];
|
||||
}
|
||||
if (requestParameters['limit'] != null) {
|
||||
queryParameters['limit'] = requestParameters['limit'];
|
||||
}
|
||||
const headerParameters = {};
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v2/businesses/{businessId}/goods-feedback`.replace(`{${"businessId"}}`, encodeURIComponent(String(requestParameters['businessId']))),
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: (0, index_1.GetGoodsFeedbackRequestToJSON)(requestParameters['getGoodsFeedbackRequest']),
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.GetGoodsFeedbackResponseFromJSON)(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getGoodsFeedbacks.md) %} Возвращает отзывы о товарах продавца по указанным фильтрам. **Исключение:** отзывы, которые удалили покупатели или Маркет. {% note tip \"Вы также можете настроить API-уведомления\" %} Маркет отправит вам [запрос](../../push-notifications/reference/sendNotification.md), когда появится новый отзыв. А полную информацию о нем можно получить с помощью этого метода. [{#T}](../../push-notifications/index.md) {% endnote %} Результаты возвращаются постранично. Отзывы расположены в порядке публикации, поэтому вы можете передавать определенный идентификатор страницы в `pageToken`, если вы получали его ранее. {% include notitle [limit](../../_auto/method_limits/getGoodsFeedbacks.md) %}
|
||||
* Получение отзывов о товарах продавца
|
||||
*/
|
||||
getGoodsFeedbacks(businessId, pageToken, limit, getGoodsFeedbackRequest, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.getGoodsFeedbacksRaw({ businessId: businessId, pageToken: pageToken, limit: limit, getGoodsFeedbackRequest: getGoodsFeedbackRequest }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getGoodsFeedbacksUrbanads.md) %} Возвращает отзывы о товарах бренда по указанным фильтрам. **Исключение:** отзывы, которые удалили покупатели или Маркет. Результаты возвращаются постранично. Отзывы расположены в порядке публикации, поэтому вы можете передавать определенный идентификатор страницы в `pageToken`, если вы получали его ранее. {% include notitle [limit](../../_auto/method_limits/getGoodsFeedbacksUrbanads.md) %}
|
||||
* Получение отзывов о товарах для рекламодателей
|
||||
*/
|
||||
getGoodsFeedbacksUrbanadsRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['businessId'] == null) {
|
||||
throw new runtime.RequiredError('businessId', 'Required parameter "businessId" was null or undefined when calling getGoodsFeedbacksUrbanads().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
if (requestParameters['pageToken'] != null) {
|
||||
queryParameters['pageToken'] = requestParameters['pageToken'];
|
||||
}
|
||||
if (requestParameters['limit'] != null) {
|
||||
queryParameters['limit'] = requestParameters['limit'];
|
||||
}
|
||||
if (requestParameters['sourceType'] != null) {
|
||||
queryParameters['sourceType'] = requestParameters['sourceType'];
|
||||
}
|
||||
const headerParameters = {};
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v1/businesses/{businessId}/goods-feedback-advertiser`.replace(`{${"businessId"}}`, encodeURIComponent(String(requestParameters['businessId']))),
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: (0, index_1.GetGoodsFeedbackUrbanadsRequestToJSON)(requestParameters['getGoodsFeedbackUrbanadsRequest']),
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.GetGoodsFeedbackUrbanadsResponseFromJSON)(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getGoodsFeedbacksUrbanads.md) %} Возвращает отзывы о товарах бренда по указанным фильтрам. **Исключение:** отзывы, которые удалили покупатели или Маркет. Результаты возвращаются постранично. Отзывы расположены в порядке публикации, поэтому вы можете передавать определенный идентификатор страницы в `pageToken`, если вы получали его ранее. {% include notitle [limit](../../_auto/method_limits/getGoodsFeedbacksUrbanads.md) %}
|
||||
* Получение отзывов о товарах для рекламодателей
|
||||
*/
|
||||
getGoodsFeedbacksUrbanads(businessId, pageToken, limit, sourceType, getGoodsFeedbackUrbanadsRequest, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.getGoodsFeedbacksUrbanadsRaw({ businessId: businessId, pageToken: pageToken, limit: limit, sourceType: sourceType, getGoodsFeedbackUrbanadsRequest: getGoodsFeedbackUrbanadsRequest }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/skipGoodsFeedbacksReaction.md) %} Пропускает реакцию на отзыв — параметр `needReaction` принимает значение `false` в методе получения всех отзывов [POST v2/businesses/{businessId}/goods-feedback](../../reference/goods-feedback/getGoodsFeedbacks.md). {% include notitle [limit](../../_auto/method_limits/skipGoodsFeedbacksReaction.md) %}
|
||||
* Пропуск реакции на отзывы
|
||||
*/
|
||||
skipGoodsFeedbacksReactionRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['businessId'] == null) {
|
||||
throw new runtime.RequiredError('businessId', 'Required parameter "businessId" was null or undefined when calling skipGoodsFeedbacksReaction().');
|
||||
}
|
||||
if (requestParameters['skipGoodsFeedbackReactionRequest'] == null) {
|
||||
throw new runtime.RequiredError('skipGoodsFeedbackReactionRequest', 'Required parameter "skipGoodsFeedbackReactionRequest" was null or undefined when calling skipGoodsFeedbacksReaction().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
if (requestParameters['sourceType'] != null) {
|
||||
queryParameters['sourceType'] = requestParameters['sourceType'];
|
||||
}
|
||||
const headerParameters = {};
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v2/businesses/{businessId}/goods-feedback/skip-reaction`.replace(`{${"businessId"}}`, encodeURIComponent(String(requestParameters['businessId']))),
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: (0, index_1.SkipGoodsFeedbackReactionRequestToJSON)(requestParameters['skipGoodsFeedbackReactionRequest']),
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.EmptyApiResponseFromJSON)(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/skipGoodsFeedbacksReaction.md) %} Пропускает реакцию на отзыв — параметр `needReaction` принимает значение `false` в методе получения всех отзывов [POST v2/businesses/{businessId}/goods-feedback](../../reference/goods-feedback/getGoodsFeedbacks.md). {% include notitle [limit](../../_auto/method_limits/skipGoodsFeedbacksReaction.md) %}
|
||||
* Пропуск реакции на отзывы
|
||||
*/
|
||||
skipGoodsFeedbacksReaction(businessId, skipGoodsFeedbackReactionRequest, sourceType, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.skipGoodsFeedbacksReactionRaw({ businessId: businessId, skipGoodsFeedbackReactionRequest: skipGoodsFeedbackReactionRequest, sourceType: sourceType }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/updateGoodsFeedbackComment.md) %} Добавляет новый комментарий магазина или изменяет комментарий, который магазин оставлял ранее. Для создания комментария к отзыву передайте только идентификатор отзыва `feedbackId`. Чтобы добавить комментарий к другому комментарию, передайте: * `feedbackId` — идентификатор отзыва; * `comment.parentId` — идентификатор родительского комментария. Чтобы изменить комментарий, передайте: * `feedbackId`— идентификатор отзыва; * `comment.id` — идентификатор комментария, который нужно изменить. Если передать одновременно `comment.parentId` и `comment.id`, будет изменен существующий комментарий. {% include notitle [limit](../../_auto/method_limits/updateGoodsFeedbackComment.md) %}
|
||||
* Добавление нового или изменение созданного комментария
|
||||
*/
|
||||
updateGoodsFeedbackCommentRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['businessId'] == null) {
|
||||
throw new runtime.RequiredError('businessId', 'Required parameter "businessId" was null or undefined when calling updateGoodsFeedbackComment().');
|
||||
}
|
||||
if (requestParameters['updateGoodsFeedbackCommentRequest'] == null) {
|
||||
throw new runtime.RequiredError('updateGoodsFeedbackCommentRequest', 'Required parameter "updateGoodsFeedbackCommentRequest" was null or undefined when calling updateGoodsFeedbackComment().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
if (requestParameters['sourceType'] != null) {
|
||||
queryParameters['sourceType'] = requestParameters['sourceType'];
|
||||
}
|
||||
const headerParameters = {};
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v2/businesses/{businessId}/goods-feedback/comments/update`.replace(`{${"businessId"}}`, encodeURIComponent(String(requestParameters['businessId']))),
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: (0, index_1.UpdateGoodsFeedbackCommentRequestToJSON)(requestParameters['updateGoodsFeedbackCommentRequest']),
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.UpdateGoodsFeedbackCommentResponseFromJSON)(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/updateGoodsFeedbackComment.md) %} Добавляет новый комментарий магазина или изменяет комментарий, который магазин оставлял ранее. Для создания комментария к отзыву передайте только идентификатор отзыва `feedbackId`. Чтобы добавить комментарий к другому комментарию, передайте: * `feedbackId` — идентификатор отзыва; * `comment.parentId` — идентификатор родительского комментария. Чтобы изменить комментарий, передайте: * `feedbackId`— идентификатор отзыва; * `comment.id` — идентификатор комментария, который нужно изменить. Если передать одновременно `comment.parentId` и `comment.id`, будет изменен существующий комментарий. {% include notitle [limit](../../_auto/method_limits/updateGoodsFeedbackComment.md) %}
|
||||
* Добавление нового или изменение созданного комментария
|
||||
*/
|
||||
updateGoodsFeedbackComment(businessId, updateGoodsFeedbackCommentRequest, sourceType, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.updateGoodsFeedbackCommentRaw({ businessId: businessId, updateGoodsFeedbackCommentRequest: updateGoodsFeedbackCommentRequest, sourceType: sourceType }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
}
|
||||
exports.GoodsFeedbackApi = GoodsFeedbackApi;
|
||||
64
dist/apis/GoodsQuestionsApi.d.ts
vendored
Normal file
64
dist/apis/GoodsQuestionsApi.d.ts
vendored
Normal file
@@ -0,0 +1,64 @@
|
||||
/**
|
||||
* API Яндекс Маркета для продавцов
|
||||
* API Яндекс Маркета помогает продавцам автоматизировать и упростить работу с маркетплейсом. В числе возможностей интеграции: * управление каталогом товаров и витриной, * обработка заказов, * изменение настроек магазина, * получение отчетов.
|
||||
*
|
||||
* The version of the OpenAPI document: LATEST
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
import * as runtime from '../runtime';
|
||||
import type { GetAnswersRequest, GetAnswersResponse, GetQuestionsRequest, GetQuestionsResponse, UpdateGoodsQuestionTextEntityRequest, UpdateGoodsQuestionTextEntityResponse } from '../models/index';
|
||||
export interface GoodsQuestionsApiGetGoodsQuestionAnswersRequest {
|
||||
businessId: number;
|
||||
getAnswersRequest: GetAnswersRequest;
|
||||
pageToken?: string;
|
||||
limit?: number;
|
||||
}
|
||||
export interface GoodsQuestionsApiGetGoodsQuestionsRequest {
|
||||
businessId: number;
|
||||
pageToken?: string;
|
||||
limit?: number;
|
||||
getQuestionsRequest?: GetQuestionsRequest;
|
||||
}
|
||||
export interface GoodsQuestionsApiUpdateGoodsQuestionTextEntityOperationRequest {
|
||||
businessId: number;
|
||||
updateGoodsQuestionTextEntityRequest: UpdateGoodsQuestionTextEntityRequest;
|
||||
}
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export declare class GoodsQuestionsApi extends runtime.BaseAPI {
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getGoodsQuestionAnswers.md) %} Возвращает ответы на вопрос о товаре по указанным фильтрам. {% note tip \"Вы также можете настроить API-уведомления\" %} Маркет отправит вам [запрос](../../push-notifications/reference/sendNotification.md), когда появится новый ответ или комментарий. А полную информацию о них можно получить с помощью этого метода. [{#T}](../../push-notifications/index.md) {% endnote %} Результаты возвращаются постранично, одна страница содержит не более 50 ответов. {% include notitle [limit](../../_auto/method_limits/getGoodsQuestionAnswers.md) %}
|
||||
* Получение ответов на вопрос
|
||||
*/
|
||||
getGoodsQuestionAnswersRaw(requestParameters: GoodsQuestionsApiGetGoodsQuestionAnswersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetAnswersResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getGoodsQuestionAnswers.md) %} Возвращает ответы на вопрос о товаре по указанным фильтрам. {% note tip \"Вы также можете настроить API-уведомления\" %} Маркет отправит вам [запрос](../../push-notifications/reference/sendNotification.md), когда появится новый ответ или комментарий. А полную информацию о них можно получить с помощью этого метода. [{#T}](../../push-notifications/index.md) {% endnote %} Результаты возвращаются постранично, одна страница содержит не более 50 ответов. {% include notitle [limit](../../_auto/method_limits/getGoodsQuestionAnswers.md) %}
|
||||
* Получение ответов на вопрос
|
||||
*/
|
||||
getGoodsQuestionAnswers(businessId: number, getAnswersRequest: GetAnswersRequest, pageToken?: string, limit?: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetAnswersResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getGoodsQuestions.md) %} Возвращает вопросы о товарах продавца по указанным фильтрам. {% note tip \"Вы также можете настроить API-уведомления\" %} Маркет отправит вам [запрос](../../push-notifications/reference/sendNotification.md), когда появится новый вопрос. А полную информацию о нем можно получить с помощью этого метода. [{#T}](../../push-notifications/index.md) {% endnote %} Результаты возвращаются постранично, одна страница содержит не более 50 вопросов. {% include notitle [limit](../../_auto/method_limits/getGoodsQuestions.md) %}
|
||||
* Получение вопросов о товарах продавца
|
||||
*/
|
||||
getGoodsQuestionsRaw(requestParameters: GoodsQuestionsApiGetGoodsQuestionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetQuestionsResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getGoodsQuestions.md) %} Возвращает вопросы о товарах продавца по указанным фильтрам. {% note tip \"Вы также можете настроить API-уведомления\" %} Маркет отправит вам [запрос](../../push-notifications/reference/sendNotification.md), когда появится новый вопрос. А полную информацию о нем можно получить с помощью этого метода. [{#T}](../../push-notifications/index.md) {% endnote %} Результаты возвращаются постранично, одна страница содержит не более 50 вопросов. {% include notitle [limit](../../_auto/method_limits/getGoodsQuestions.md) %}
|
||||
* Получение вопросов о товарах продавца
|
||||
*/
|
||||
getGoodsQuestions(businessId: number, pageToken?: string, limit?: number, getQuestionsRequest?: GetQuestionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetQuestionsResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/updateGoodsQuestionTextEntity.md) %} Создание, изменение и удаление ответа или комментария. {% include notitle [limit](../../_auto/method_limits/updateGoodsQuestionTextEntity.md) %}
|
||||
* Создание, изменение и удаление ответа или комментария
|
||||
*/
|
||||
updateGoodsQuestionTextEntityRaw(requestParameters: GoodsQuestionsApiUpdateGoodsQuestionTextEntityOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UpdateGoodsQuestionTextEntityResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/updateGoodsQuestionTextEntity.md) %} Создание, изменение и удаление ответа или комментария. {% include notitle [limit](../../_auto/method_limits/updateGoodsQuestionTextEntity.md) %}
|
||||
* Создание, изменение и удаление ответа или комментария
|
||||
*/
|
||||
updateGoodsQuestionTextEntity(businessId: number, updateGoodsQuestionTextEntityRequest: UpdateGoodsQuestionTextEntityRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UpdateGoodsQuestionTextEntityResponse>;
|
||||
}
|
||||
168
dist/apis/GoodsQuestionsApi.js
vendored
Normal file
168
dist/apis/GoodsQuestionsApi.js
vendored
Normal file
@@ -0,0 +1,168 @@
|
||||
"use strict";
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* API Яндекс Маркета для продавцов
|
||||
* API Яндекс Маркета помогает продавцам автоматизировать и упростить работу с маркетплейсом. В числе возможностей интеграции: * управление каталогом товаров и витриной, * обработка заказов, * изменение настроек магазина, * получение отчетов.
|
||||
*
|
||||
* The version of the OpenAPI document: LATEST
|
||||
*
|
||||
*
|
||||
* 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.GoodsQuestionsApi = void 0;
|
||||
const runtime = require("../runtime");
|
||||
const index_1 = require("../models/index");
|
||||
/**
|
||||
*
|
||||
*/
|
||||
class GoodsQuestionsApi extends runtime.BaseAPI {
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getGoodsQuestionAnswers.md) %} Возвращает ответы на вопрос о товаре по указанным фильтрам. {% note tip \"Вы также можете настроить API-уведомления\" %} Маркет отправит вам [запрос](../../push-notifications/reference/sendNotification.md), когда появится новый ответ или комментарий. А полную информацию о них можно получить с помощью этого метода. [{#T}](../../push-notifications/index.md) {% endnote %} Результаты возвращаются постранично, одна страница содержит не более 50 ответов. {% include notitle [limit](../../_auto/method_limits/getGoodsQuestionAnswers.md) %}
|
||||
* Получение ответов на вопрос
|
||||
*/
|
||||
getGoodsQuestionAnswersRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['businessId'] == null) {
|
||||
throw new runtime.RequiredError('businessId', 'Required parameter "businessId" was null or undefined when calling getGoodsQuestionAnswers().');
|
||||
}
|
||||
if (requestParameters['getAnswersRequest'] == null) {
|
||||
throw new runtime.RequiredError('getAnswersRequest', 'Required parameter "getAnswersRequest" was null or undefined when calling getGoodsQuestionAnswers().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
if (requestParameters['pageToken'] != null) {
|
||||
queryParameters['pageToken'] = requestParameters['pageToken'];
|
||||
}
|
||||
if (requestParameters['limit'] != null) {
|
||||
queryParameters['limit'] = requestParameters['limit'];
|
||||
}
|
||||
const headerParameters = {};
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v1/businesses/{businessId}/goods-questions/answers`.replace(`{${"businessId"}}`, encodeURIComponent(String(requestParameters['businessId']))),
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: (0, index_1.GetAnswersRequestToJSON)(requestParameters['getAnswersRequest']),
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.GetAnswersResponseFromJSON)(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getGoodsQuestionAnswers.md) %} Возвращает ответы на вопрос о товаре по указанным фильтрам. {% note tip \"Вы также можете настроить API-уведомления\" %} Маркет отправит вам [запрос](../../push-notifications/reference/sendNotification.md), когда появится новый ответ или комментарий. А полную информацию о них можно получить с помощью этого метода. [{#T}](../../push-notifications/index.md) {% endnote %} Результаты возвращаются постранично, одна страница содержит не более 50 ответов. {% include notitle [limit](../../_auto/method_limits/getGoodsQuestionAnswers.md) %}
|
||||
* Получение ответов на вопрос
|
||||
*/
|
||||
getGoodsQuestionAnswers(businessId, getAnswersRequest, pageToken, limit, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.getGoodsQuestionAnswersRaw({ businessId: businessId, getAnswersRequest: getAnswersRequest, pageToken: pageToken, limit: limit }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getGoodsQuestions.md) %} Возвращает вопросы о товарах продавца по указанным фильтрам. {% note tip \"Вы также можете настроить API-уведомления\" %} Маркет отправит вам [запрос](../../push-notifications/reference/sendNotification.md), когда появится новый вопрос. А полную информацию о нем можно получить с помощью этого метода. [{#T}](../../push-notifications/index.md) {% endnote %} Результаты возвращаются постранично, одна страница содержит не более 50 вопросов. {% include notitle [limit](../../_auto/method_limits/getGoodsQuestions.md) %}
|
||||
* Получение вопросов о товарах продавца
|
||||
*/
|
||||
getGoodsQuestionsRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['businessId'] == null) {
|
||||
throw new runtime.RequiredError('businessId', 'Required parameter "businessId" was null or undefined when calling getGoodsQuestions().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
if (requestParameters['pageToken'] != null) {
|
||||
queryParameters['pageToken'] = requestParameters['pageToken'];
|
||||
}
|
||||
if (requestParameters['limit'] != null) {
|
||||
queryParameters['limit'] = requestParameters['limit'];
|
||||
}
|
||||
const headerParameters = {};
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v1/businesses/{businessId}/goods-questions`.replace(`{${"businessId"}}`, encodeURIComponent(String(requestParameters['businessId']))),
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: (0, index_1.GetQuestionsRequestToJSON)(requestParameters['getQuestionsRequest']),
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.GetQuestionsResponseFromJSON)(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getGoodsQuestions.md) %} Возвращает вопросы о товарах продавца по указанным фильтрам. {% note tip \"Вы также можете настроить API-уведомления\" %} Маркет отправит вам [запрос](../../push-notifications/reference/sendNotification.md), когда появится новый вопрос. А полную информацию о нем можно получить с помощью этого метода. [{#T}](../../push-notifications/index.md) {% endnote %} Результаты возвращаются постранично, одна страница содержит не более 50 вопросов. {% include notitle [limit](../../_auto/method_limits/getGoodsQuestions.md) %}
|
||||
* Получение вопросов о товарах продавца
|
||||
*/
|
||||
getGoodsQuestions(businessId, pageToken, limit, getQuestionsRequest, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.getGoodsQuestionsRaw({ businessId: businessId, pageToken: pageToken, limit: limit, getQuestionsRequest: getQuestionsRequest }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/updateGoodsQuestionTextEntity.md) %} Создание, изменение и удаление ответа или комментария. {% include notitle [limit](../../_auto/method_limits/updateGoodsQuestionTextEntity.md) %}
|
||||
* Создание, изменение и удаление ответа или комментария
|
||||
*/
|
||||
updateGoodsQuestionTextEntityRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['businessId'] == null) {
|
||||
throw new runtime.RequiredError('businessId', 'Required parameter "businessId" was null or undefined when calling updateGoodsQuestionTextEntity().');
|
||||
}
|
||||
if (requestParameters['updateGoodsQuestionTextEntityRequest'] == null) {
|
||||
throw new runtime.RequiredError('updateGoodsQuestionTextEntityRequest', 'Required parameter "updateGoodsQuestionTextEntityRequest" was null or undefined when calling updateGoodsQuestionTextEntity().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
const headerParameters = {};
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v1/businesses/{businessId}/goods-questions/update`.replace(`{${"businessId"}}`, encodeURIComponent(String(requestParameters['businessId']))),
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: (0, index_1.UpdateGoodsQuestionTextEntityRequestToJSON)(requestParameters['updateGoodsQuestionTextEntityRequest']),
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.UpdateGoodsQuestionTextEntityResponseFromJSON)(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/updateGoodsQuestionTextEntity.md) %} Создание, изменение и удаление ответа или комментария. {% include notitle [limit](../../_auto/method_limits/updateGoodsQuestionTextEntity.md) %}
|
||||
* Создание, изменение и удаление ответа или комментария
|
||||
*/
|
||||
updateGoodsQuestionTextEntity(businessId, updateGoodsQuestionTextEntityRequest, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.updateGoodsQuestionTextEntityRaw({ businessId: businessId, updateGoodsQuestionTextEntityRequest: updateGoodsQuestionTextEntityRequest }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
}
|
||||
exports.GoodsQuestionsApi = GoodsQuestionsApi;
|
||||
32
dist/apis/GoodsStatsApi.d.ts
vendored
Normal file
32
dist/apis/GoodsStatsApi.d.ts
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
/**
|
||||
* API Яндекс Маркета для продавцов
|
||||
* API Яндекс Маркета помогает продавцам автоматизировать и упростить работу с маркетплейсом. В числе возможностей интеграции: * управление каталогом товаров и витриной, * обработка заказов, * изменение настроек магазина, * получение отчетов.
|
||||
*
|
||||
* The version of the OpenAPI document: LATEST
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
import * as runtime from '../runtime';
|
||||
import type { GetGoodsStatsRequest, GetGoodsStatsResponse } from '../models/index';
|
||||
export interface GoodsStatsApiGetGoodsStatsOperationRequest {
|
||||
campaignId: number;
|
||||
getGoodsStatsRequest: GetGoodsStatsRequest;
|
||||
}
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export declare class GoodsStatsApi extends runtime.BaseAPI {
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getGoodsStats.md) %} Возвращает подробный отчет по товарам, которые вы разместили на Маркете. С помощью отчета вы можете узнать, например, об остатках на складе, об условиях хранения ваших товаров и т. д. {% include notitle [limit](../../_auto/method_limits/getGoodsStats.md) %}
|
||||
* Отчет по товарам
|
||||
*/
|
||||
getGoodsStatsRaw(requestParameters: GoodsStatsApiGetGoodsStatsOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetGoodsStatsResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getGoodsStats.md) %} Возвращает подробный отчет по товарам, которые вы разместили на Маркете. С помощью отчета вы можете узнать, например, об остатках на складе, об условиях хранения ваших товаров и т. д. {% include notitle [limit](../../_auto/method_limits/getGoodsStats.md) %}
|
||||
* Отчет по товарам
|
||||
*/
|
||||
getGoodsStats(campaignId: number, getGoodsStatsRequest: GetGoodsStatsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetGoodsStatsResponse>;
|
||||
}
|
||||
75
dist/apis/GoodsStatsApi.js
vendored
Normal file
75
dist/apis/GoodsStatsApi.js
vendored
Normal file
@@ -0,0 +1,75 @@
|
||||
"use strict";
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* API Яндекс Маркета для продавцов
|
||||
* API Яндекс Маркета помогает продавцам автоматизировать и упростить работу с маркетплейсом. В числе возможностей интеграции: * управление каталогом товаров и витриной, * обработка заказов, * изменение настроек магазина, * получение отчетов.
|
||||
*
|
||||
* The version of the OpenAPI document: LATEST
|
||||
*
|
||||
*
|
||||
* 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.GoodsStatsApi = void 0;
|
||||
const runtime = require("../runtime");
|
||||
const index_1 = require("../models/index");
|
||||
/**
|
||||
*
|
||||
*/
|
||||
class GoodsStatsApi extends runtime.BaseAPI {
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getGoodsStats.md) %} Возвращает подробный отчет по товарам, которые вы разместили на Маркете. С помощью отчета вы можете узнать, например, об остатках на складе, об условиях хранения ваших товаров и т. д. {% include notitle [limit](../../_auto/method_limits/getGoodsStats.md) %}
|
||||
* Отчет по товарам
|
||||
*/
|
||||
getGoodsStatsRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['campaignId'] == null) {
|
||||
throw new runtime.RequiredError('campaignId', 'Required parameter "campaignId" was null or undefined when calling getGoodsStats().');
|
||||
}
|
||||
if (requestParameters['getGoodsStatsRequest'] == null) {
|
||||
throw new runtime.RequiredError('getGoodsStatsRequest', 'Required parameter "getGoodsStatsRequest" was null or undefined when calling getGoodsStats().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
const headerParameters = {};
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v2/campaigns/{campaignId}/stats/skus`.replace(`{${"campaignId"}}`, encodeURIComponent(String(requestParameters['campaignId']))),
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: (0, index_1.GetGoodsStatsRequestToJSON)(requestParameters['getGoodsStatsRequest']),
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.GetGoodsStatsResponseFromJSON)(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getGoodsStats.md) %} Возвращает подробный отчет по товарам, которые вы разместили на Маркете. С помощью отчета вы можете узнать, например, об остатках на складе, об условиях хранения ваших товаров и т. д. {% include notitle [limit](../../_auto/method_limits/getGoodsStats.md) %}
|
||||
* Отчет по товарам
|
||||
*/
|
||||
getGoodsStats(campaignId, getGoodsStatsRequest, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.getGoodsStatsRaw({ campaignId: campaignId, getGoodsStatsRequest: getGoodsStatsRequest }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
}
|
||||
exports.GoodsStatsApi = GoodsStatsApi;
|
||||
62
dist/apis/HiddenOffersApi.d.ts
vendored
Normal file
62
dist/apis/HiddenOffersApi.d.ts
vendored
Normal file
@@ -0,0 +1,62 @@
|
||||
/**
|
||||
* API Яндекс Маркета для продавцов
|
||||
* API Яндекс Маркета помогает продавцам автоматизировать и упростить работу с маркетплейсом. В числе возможностей интеграции: * управление каталогом товаров и витриной, * обработка заказов, * изменение настроек магазина, * получение отчетов.
|
||||
*
|
||||
* The version of the OpenAPI document: LATEST
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
import * as runtime from '../runtime';
|
||||
import type { AddHiddenOffersRequest, DeleteHiddenOffersRequest, EmptyApiResponse, GetHiddenOffersResponse } from '../models/index';
|
||||
export interface HiddenOffersApiAddHiddenOffersOperationRequest {
|
||||
campaignId: number;
|
||||
addHiddenOffersRequest: AddHiddenOffersRequest;
|
||||
}
|
||||
export interface HiddenOffersApiDeleteHiddenOffersOperationRequest {
|
||||
campaignId: number;
|
||||
deleteHiddenOffersRequest: DeleteHiddenOffersRequest;
|
||||
}
|
||||
export interface HiddenOffersApiGetHiddenOffersRequest {
|
||||
campaignId: number;
|
||||
offerId?: Set<string>;
|
||||
pageToken?: string;
|
||||
limit?: number;
|
||||
}
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export declare class HiddenOffersApi extends runtime.BaseAPI {
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/addHiddenOffers.md) %} Скрывает товары магазина на Маркете. {% note info \"Данные в каталоге обновляются не мгновенно\" %} Это занимает до нескольких минут. {% endnote %} {% include notitle [limit](../../_auto/method_limits/addHiddenOffers.md) %}
|
||||
* Скрытие товаров и настройки скрытия
|
||||
*/
|
||||
addHiddenOffersRaw(requestParameters: HiddenOffersApiAddHiddenOffersOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<EmptyApiResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/addHiddenOffers.md) %} Скрывает товары магазина на Маркете. {% note info \"Данные в каталоге обновляются не мгновенно\" %} Это занимает до нескольких минут. {% endnote %} {% include notitle [limit](../../_auto/method_limits/addHiddenOffers.md) %}
|
||||
* Скрытие товаров и настройки скрытия
|
||||
*/
|
||||
addHiddenOffers(campaignId: number, addHiddenOffersRequest: AddHiddenOffersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<EmptyApiResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/deleteHiddenOffers.md) %} Возобновляет показ скрытых вами товаров магазина на Маркете. {% note info \"Данные в каталоге обновляются не мгновенно\" %} Это занимает до нескольких минут. {% endnote %} {% include notitle [limit](../../_auto/method_limits/deleteHiddenOffers.md) %}
|
||||
* Возобновление показа товаров
|
||||
*/
|
||||
deleteHiddenOffersRaw(requestParameters: HiddenOffersApiDeleteHiddenOffersOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<EmptyApiResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/deleteHiddenOffers.md) %} Возобновляет показ скрытых вами товаров магазина на Маркете. {% note info \"Данные в каталоге обновляются не мгновенно\" %} Это занимает до нескольких минут. {% endnote %} {% include notitle [limit](../../_auto/method_limits/deleteHiddenOffers.md) %}
|
||||
* Возобновление показа товаров
|
||||
*/
|
||||
deleteHiddenOffers(campaignId: number, deleteHiddenOffersRequest: DeleteHiddenOffersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<EmptyApiResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getHiddenOffers.md) %} Возвращает список скрытых вами товаров для заданного магазина. В списке будут товары, скрытые любым способом — через API, с помощью YML-фида, в кабинете и так далее. {% include notitle [limit](../../_auto/method_limits/getHiddenOffers.md) %}
|
||||
* Информация о скрытых вами товарах
|
||||
*/
|
||||
getHiddenOffersRaw(requestParameters: HiddenOffersApiGetHiddenOffersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetHiddenOffersResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getHiddenOffers.md) %} Возвращает список скрытых вами товаров для заданного магазина. В списке будут товары, скрытые любым способом — через API, с помощью YML-фида, в кабинете и так далее. {% include notitle [limit](../../_auto/method_limits/getHiddenOffers.md) %}
|
||||
* Информация о скрытых вами товарах
|
||||
*/
|
||||
getHiddenOffers(campaignId: number, offerId?: Set<string>, pageToken?: string, limit?: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetHiddenOffersResponse>;
|
||||
}
|
||||
163
dist/apis/HiddenOffersApi.js
vendored
Normal file
163
dist/apis/HiddenOffersApi.js
vendored
Normal file
@@ -0,0 +1,163 @@
|
||||
"use strict";
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* API Яндекс Маркета для продавцов
|
||||
* API Яндекс Маркета помогает продавцам автоматизировать и упростить работу с маркетплейсом. В числе возможностей интеграции: * управление каталогом товаров и витриной, * обработка заказов, * изменение настроек магазина, * получение отчетов.
|
||||
*
|
||||
* The version of the OpenAPI document: LATEST
|
||||
*
|
||||
*
|
||||
* 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.HiddenOffersApi = void 0;
|
||||
const runtime = require("../runtime");
|
||||
const index_1 = require("../models/index");
|
||||
/**
|
||||
*
|
||||
*/
|
||||
class HiddenOffersApi extends runtime.BaseAPI {
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/addHiddenOffers.md) %} Скрывает товары магазина на Маркете. {% note info \"Данные в каталоге обновляются не мгновенно\" %} Это занимает до нескольких минут. {% endnote %} {% include notitle [limit](../../_auto/method_limits/addHiddenOffers.md) %}
|
||||
* Скрытие товаров и настройки скрытия
|
||||
*/
|
||||
addHiddenOffersRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['campaignId'] == null) {
|
||||
throw new runtime.RequiredError('campaignId', 'Required parameter "campaignId" was null or undefined when calling addHiddenOffers().');
|
||||
}
|
||||
if (requestParameters['addHiddenOffersRequest'] == null) {
|
||||
throw new runtime.RequiredError('addHiddenOffersRequest', 'Required parameter "addHiddenOffersRequest" was null or undefined when calling addHiddenOffers().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
const headerParameters = {};
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v2/campaigns/{campaignId}/hidden-offers`.replace(`{${"campaignId"}}`, encodeURIComponent(String(requestParameters['campaignId']))),
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: (0, index_1.AddHiddenOffersRequestToJSON)(requestParameters['addHiddenOffersRequest']),
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.EmptyApiResponseFromJSON)(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/addHiddenOffers.md) %} Скрывает товары магазина на Маркете. {% note info \"Данные в каталоге обновляются не мгновенно\" %} Это занимает до нескольких минут. {% endnote %} {% include notitle [limit](../../_auto/method_limits/addHiddenOffers.md) %}
|
||||
* Скрытие товаров и настройки скрытия
|
||||
*/
|
||||
addHiddenOffers(campaignId, addHiddenOffersRequest, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.addHiddenOffersRaw({ campaignId: campaignId, addHiddenOffersRequest: addHiddenOffersRequest }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/deleteHiddenOffers.md) %} Возобновляет показ скрытых вами товаров магазина на Маркете. {% note info \"Данные в каталоге обновляются не мгновенно\" %} Это занимает до нескольких минут. {% endnote %} {% include notitle [limit](../../_auto/method_limits/deleteHiddenOffers.md) %}
|
||||
* Возобновление показа товаров
|
||||
*/
|
||||
deleteHiddenOffersRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['campaignId'] == null) {
|
||||
throw new runtime.RequiredError('campaignId', 'Required parameter "campaignId" was null or undefined when calling deleteHiddenOffers().');
|
||||
}
|
||||
if (requestParameters['deleteHiddenOffersRequest'] == null) {
|
||||
throw new runtime.RequiredError('deleteHiddenOffersRequest', 'Required parameter "deleteHiddenOffersRequest" was null or undefined when calling deleteHiddenOffers().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
const headerParameters = {};
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v2/campaigns/{campaignId}/hidden-offers/delete`.replace(`{${"campaignId"}}`, encodeURIComponent(String(requestParameters['campaignId']))),
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: (0, index_1.DeleteHiddenOffersRequestToJSON)(requestParameters['deleteHiddenOffersRequest']),
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.EmptyApiResponseFromJSON)(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/deleteHiddenOffers.md) %} Возобновляет показ скрытых вами товаров магазина на Маркете. {% note info \"Данные в каталоге обновляются не мгновенно\" %} Это занимает до нескольких минут. {% endnote %} {% include notitle [limit](../../_auto/method_limits/deleteHiddenOffers.md) %}
|
||||
* Возобновление показа товаров
|
||||
*/
|
||||
deleteHiddenOffers(campaignId, deleteHiddenOffersRequest, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.deleteHiddenOffersRaw({ campaignId: campaignId, deleteHiddenOffersRequest: deleteHiddenOffersRequest }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getHiddenOffers.md) %} Возвращает список скрытых вами товаров для заданного магазина. В списке будут товары, скрытые любым способом — через API, с помощью YML-фида, в кабинете и так далее. {% include notitle [limit](../../_auto/method_limits/getHiddenOffers.md) %}
|
||||
* Информация о скрытых вами товарах
|
||||
*/
|
||||
getHiddenOffersRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['campaignId'] == null) {
|
||||
throw new runtime.RequiredError('campaignId', 'Required parameter "campaignId" was null or undefined when calling getHiddenOffers().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
if (requestParameters['offerId'] != null) {
|
||||
queryParameters['offer_id'] = Array.from(requestParameters['offerId']).join(runtime.COLLECTION_FORMATS["csv"]);
|
||||
}
|
||||
if (requestParameters['pageToken'] != null) {
|
||||
queryParameters['pageToken'] = requestParameters['pageToken'];
|
||||
}
|
||||
if (requestParameters['limit'] != null) {
|
||||
queryParameters['limit'] = requestParameters['limit'];
|
||||
}
|
||||
const headerParameters = {};
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v2/campaigns/{campaignId}/hidden-offers`.replace(`{${"campaignId"}}`, encodeURIComponent(String(requestParameters['campaignId']))),
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.GetHiddenOffersResponseFromJSON)(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getHiddenOffers.md) %} Возвращает список скрытых вами товаров для заданного магазина. В списке будут товары, скрытые любым способом — через API, с помощью YML-фида, в кабинете и так далее. {% include notitle [limit](../../_auto/method_limits/getHiddenOffers.md) %}
|
||||
* Информация о скрытых вами товарах
|
||||
*/
|
||||
getHiddenOffers(campaignId, offerId, pageToken, limit, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.getHiddenOffersRaw({ campaignId: campaignId, offerId: offerId, pageToken: pageToken, limit: limit }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
}
|
||||
exports.HiddenOffersApi = HiddenOffersApi;
|
||||
835
dist/apis/LaasApi.d.ts
vendored
Normal file
835
dist/apis/LaasApi.d.ts
vendored
Normal file
@@ -0,0 +1,835 @@
|
||||
/**
|
||||
* API Яндекс Маркета для продавцов
|
||||
* API Яндекс Маркета помогает продавцам автоматизировать и упростить работу с маркетплейсом. В числе возможностей интеграции: * управление каталогом товаров и витриной, * обработка заказов, * изменение настроек магазина, * получение отчетов.
|
||||
*
|
||||
* The version of the OpenAPI document: LATEST
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
import * as runtime from '../runtime';
|
||||
import type { CancelReturnRequest, CancelReturnResponse, CatalogLanguageType, CreateOrderRequest, CreateOrderResponse, CreateReturnRequest, CreateReturnResponse, DeleteCampaignOffersRequest, DeleteCampaignOffersResponse, DeleteOffersRequest, DeleteOffersResponse, EmptyApiResponse, GenerateBarcodesReportRequest, GenerateClosureDocumentsDetalizationRequest, GenerateClosureDocumentsRequest, GenerateGoodsMovementReportRequest, GenerateMarketingDetalizationRequest, GenerateOfferBarcodesRequest, GenerateOfferBarcodesResponse, GenerateReportResponse, GenerateStocksOnWarehousesReportRequest, GenerateUnitedMarketplaceServicesReportRequest, GenerateUnitedReturnsRequest, GetBusinessOrdersRequest, GetBusinessOrdersResponse, GetBusinessSettingsResponse, GetCampaignOffersRequest, GetCampaignOffersResponse, GetCampaignResponse, GetCampaignSettingsResponse, GetCampaignsResponse, GetCategoriesRequest, GetCategoriesResponse, GetCategoryContentParametersResponse, GetDefaultPricesRequest, GetDefaultPricesResponse, GetDeliveryOptionsRequest, GetDeliveryOptionsResponse, GetFulfillmentWarehousesResponse, GetLogisticPointsResponse, GetOfferCardsContentStatusRequest, GetOfferCardsContentStatusResponse, GetOfferMappingsRequest, GetOfferMappingsResponse, GetOperationsRequest, GetOperationsResponse, GetOrderIdentifiersStatusResponse, GetOrderResponse, GetOrderUpdateOptionsRequest, GetOrderUpdateOptionsResponse, GetOrdersResponse, GetPricesByOfferIdsRequest, GetPricesByOfferIdsResponse, GetRegionByIdResponse, GetRegionWithChildrenResponse, GetRegionsCodesResponse, GetRegionsResponse, GetReportInfoResponse, GetReturnDeliveryOptionsRequest, GetReturnDeliveryOptionsResponse, GetReturnResponse, GetReturnsResponse, GetSupplyRequestDocumentsRequest, GetSupplyRequestDocumentsResponse, GetSupplyRequestItemsRequest, GetSupplyRequestItemsResponse, GetSupplyRequestsRequest, GetSupplyRequestsResponse, GetTokenInfoResponse, GetWarehouseStocksRequest, GetWarehouseStocksResponse, OrderBuyerType, OrderDeliveryDispatchType, OrderStatusType, OrderSubstatusType, RefundStatusType, ReportFormatType, ReportLanguageType, ReturnShipmentStatusType, ReturnType, SourceType, UpdateBusinessPricesRequest, UpdateCampaignOffersRequest, UpdateOfferContentRequest, UpdateOfferContentResponse, UpdateOfferMappingsRequest, UpdateOfferMappingsResponse, UpdateOrderRequest, UpdateOrderResponse, UpdateOrderStatusRequest, UpdateOrderStatusResponse, UpdateOrderStatusesRequest, UpdateOrderStatusesResponse, UpdatePricesRequest } from '../models/index';
|
||||
export interface LaasApiCancelReturnOperationRequest {
|
||||
campaignId: number;
|
||||
cancelReturnRequest: CancelReturnRequest;
|
||||
}
|
||||
export interface LaasApiCreateOrderOperationRequest {
|
||||
campaignId: number;
|
||||
createOrderRequest: CreateOrderRequest;
|
||||
}
|
||||
export interface LaasApiCreateReturnOperationRequest {
|
||||
campaignId: number;
|
||||
createReturnRequest: CreateReturnRequest;
|
||||
}
|
||||
export interface LaasApiDeleteCampaignOffersOperationRequest {
|
||||
campaignId: number;
|
||||
deleteCampaignOffersRequest: DeleteCampaignOffersRequest;
|
||||
}
|
||||
export interface LaasApiDeleteOffersOperationRequest {
|
||||
businessId: number;
|
||||
deleteOffersRequest: DeleteOffersRequest;
|
||||
}
|
||||
export interface LaasApiGenerateBarcodesReportOperationRequest {
|
||||
generateBarcodesReportRequest: GenerateBarcodesReportRequest;
|
||||
}
|
||||
export interface LaasApiGenerateClosureDocumentsDetalizationReportRequest {
|
||||
generateClosureDocumentsDetalizationRequest: GenerateClosureDocumentsDetalizationRequest;
|
||||
format?: ReportFormatType;
|
||||
}
|
||||
export interface LaasApiGenerateClosureDocumentsReportRequest {
|
||||
generateClosureDocumentsRequest: GenerateClosureDocumentsRequest;
|
||||
}
|
||||
export interface LaasApiGenerateGoodsMovementReportOperationRequest {
|
||||
generateGoodsMovementReportRequest: GenerateGoodsMovementReportRequest;
|
||||
format?: ReportFormatType;
|
||||
}
|
||||
export interface LaasApiGenerateMarketingDetalizationReportRequest {
|
||||
businessId: number;
|
||||
generateMarketingDetalizationRequest: GenerateMarketingDetalizationRequest;
|
||||
format?: ReportFormatType;
|
||||
sourceType?: SourceType;
|
||||
}
|
||||
export interface LaasApiGenerateOfferBarcodesOperationRequest {
|
||||
businessId: number;
|
||||
generateOfferBarcodesRequest: GenerateOfferBarcodesRequest;
|
||||
}
|
||||
export interface LaasApiGenerateStocksOnWarehousesReportOperationRequest {
|
||||
generateStocksOnWarehousesReportRequest: GenerateStocksOnWarehousesReportRequest;
|
||||
format?: ReportFormatType;
|
||||
}
|
||||
export interface LaasApiGenerateUnitedMarketplaceServicesReportOperationRequest {
|
||||
generateUnitedMarketplaceServicesReportRequest: GenerateUnitedMarketplaceServicesReportRequest;
|
||||
format?: ReportFormatType;
|
||||
language?: ReportLanguageType;
|
||||
}
|
||||
export interface LaasApiGenerateUnitedReturnsReportRequest {
|
||||
generateUnitedReturnsRequest: GenerateUnitedReturnsRequest;
|
||||
format?: ReportFormatType;
|
||||
}
|
||||
export interface LaasApiGetBusinessOrdersOperationRequest {
|
||||
businessId: number;
|
||||
getBusinessOrdersRequest: GetBusinessOrdersRequest;
|
||||
pageToken?: string;
|
||||
limit?: number;
|
||||
}
|
||||
export interface LaasApiGetBusinessSettingsRequest {
|
||||
businessId: number;
|
||||
}
|
||||
export interface LaasApiGetCampaignRequest {
|
||||
campaignId: number;
|
||||
}
|
||||
export interface LaasApiGetCampaignOffersOperationRequest {
|
||||
campaignId: number;
|
||||
getCampaignOffersRequest: GetCampaignOffersRequest;
|
||||
pageToken?: string;
|
||||
limit?: number;
|
||||
}
|
||||
export interface LaasApiGetCampaignSettingsRequest {
|
||||
campaignId: number;
|
||||
}
|
||||
export interface LaasApiGetCampaignsRequest {
|
||||
pageToken?: string;
|
||||
limit?: number;
|
||||
page?: number;
|
||||
pageSize?: number;
|
||||
}
|
||||
export interface LaasApiGetCategoriesTreeRequest {
|
||||
getCategoriesRequest?: GetCategoriesRequest;
|
||||
}
|
||||
export interface LaasApiGetCategoryContentParametersRequest {
|
||||
categoryId: number;
|
||||
businessId?: number;
|
||||
}
|
||||
export interface LaasApiGetDefaultPricesOperationRequest {
|
||||
businessId: number;
|
||||
pageToken?: string;
|
||||
limit?: number;
|
||||
getDefaultPricesRequest?: GetDefaultPricesRequest;
|
||||
}
|
||||
export interface LaasApiGetDeliveryOptionsOperationRequest {
|
||||
campaignId: number;
|
||||
getDeliveryOptionsRequest: GetDeliveryOptionsRequest;
|
||||
}
|
||||
export interface LaasApiGetFulfillmentWarehousesRequest {
|
||||
campaignId?: number;
|
||||
}
|
||||
export interface LaasApiGetLogisticPointsRequest {
|
||||
businessId: number;
|
||||
pageToken?: string;
|
||||
limit?: number;
|
||||
}
|
||||
export interface LaasApiGetOfferCardsContentStatusOperationRequest {
|
||||
businessId: number;
|
||||
pageToken?: string;
|
||||
limit?: number;
|
||||
getOfferCardsContentStatusRequest?: GetOfferCardsContentStatusRequest;
|
||||
}
|
||||
export interface LaasApiGetOfferMappingsOperationRequest {
|
||||
businessId: number;
|
||||
pageToken?: string;
|
||||
limit?: number;
|
||||
language?: CatalogLanguageType;
|
||||
getOfferMappingsRequest?: GetOfferMappingsRequest;
|
||||
}
|
||||
export interface LaasApiGetOperationsOperationRequest {
|
||||
businessId: number;
|
||||
getOperationsRequest: GetOperationsRequest;
|
||||
}
|
||||
export interface LaasApiGetOrderRequest {
|
||||
campaignId: number;
|
||||
orderId: number;
|
||||
}
|
||||
export interface LaasApiGetOrderIdentifiersStatusRequest {
|
||||
campaignId: number;
|
||||
orderId: number;
|
||||
}
|
||||
export interface LaasApiGetOrderUpdateOptionsOperationRequest {
|
||||
campaignId: number;
|
||||
getOrderUpdateOptionsRequest: GetOrderUpdateOptionsRequest;
|
||||
}
|
||||
export interface LaasApiGetOrdersRequest {
|
||||
campaignId: number;
|
||||
orderIds?: Array<number>;
|
||||
status?: Set<OrderStatusType>;
|
||||
substatus?: Set<OrderSubstatusType>;
|
||||
fromDate?: Date;
|
||||
toDate?: Date;
|
||||
supplierShipmentDateFrom?: Date;
|
||||
supplierShipmentDateTo?: Date;
|
||||
updatedAtFrom?: Date;
|
||||
updatedAtTo?: Date;
|
||||
dispatchType?: OrderDeliveryDispatchType;
|
||||
fake?: boolean;
|
||||
hasCis?: boolean;
|
||||
onlyWaitingForCancellationApprove?: boolean;
|
||||
onlyEstimatedDelivery?: boolean;
|
||||
buyerType?: OrderBuyerType;
|
||||
page?: number;
|
||||
pageSize?: number;
|
||||
pageToken?: string;
|
||||
limit?: number;
|
||||
}
|
||||
export interface LaasApiGetPricesByOfferIdsOperationRequest {
|
||||
campaignId: number;
|
||||
pageToken?: string;
|
||||
limit?: number;
|
||||
getPricesByOfferIdsRequest?: GetPricesByOfferIdsRequest;
|
||||
}
|
||||
export interface LaasApiGetReportInfoRequest {
|
||||
reportId: string;
|
||||
sourceType?: SourceType;
|
||||
}
|
||||
export interface LaasApiGetReturnRequest {
|
||||
campaignId: number;
|
||||
orderId: number;
|
||||
returnId: number;
|
||||
}
|
||||
export interface LaasApiGetReturnDeliveryOptionsOperationRequest {
|
||||
campaignId: number;
|
||||
getReturnDeliveryOptionsRequest: GetReturnDeliveryOptionsRequest;
|
||||
}
|
||||
export interface LaasApiGetReturnsRequest {
|
||||
campaignId: number;
|
||||
pageToken?: string;
|
||||
limit?: number;
|
||||
orderIds?: Set<number>;
|
||||
statuses?: Set<RefundStatusType>;
|
||||
shipmentStatuses?: Set<ReturnShipmentStatusType>;
|
||||
type?: ReturnType;
|
||||
fromDate?: Date;
|
||||
toDate?: Date;
|
||||
fromDate2?: Date;
|
||||
toDate2?: Date;
|
||||
}
|
||||
export interface LaasApiGetStocksRequest {
|
||||
campaignId: number;
|
||||
pageToken?: string;
|
||||
limit?: number;
|
||||
getWarehouseStocksRequest?: GetWarehouseStocksRequest;
|
||||
}
|
||||
export interface LaasApiGetSupplyRequestDocumentsOperationRequest {
|
||||
campaignId: number;
|
||||
getSupplyRequestDocumentsRequest: GetSupplyRequestDocumentsRequest;
|
||||
}
|
||||
export interface LaasApiGetSupplyRequestItemsOperationRequest {
|
||||
campaignId: number;
|
||||
getSupplyRequestItemsRequest: GetSupplyRequestItemsRequest;
|
||||
pageToken?: string;
|
||||
limit?: number;
|
||||
}
|
||||
export interface LaasApiGetSupplyRequestsOperationRequest {
|
||||
campaignId: number;
|
||||
pageToken?: string;
|
||||
limit?: number;
|
||||
getSupplyRequestsRequest?: GetSupplyRequestsRequest;
|
||||
}
|
||||
export interface LaasApiSearchRegionChildrenRequest {
|
||||
regionId: number;
|
||||
pageToken?: string;
|
||||
limit?: number;
|
||||
page?: number;
|
||||
pageSize?: number;
|
||||
}
|
||||
export interface LaasApiSearchRegionsByIdRequest {
|
||||
regionId: number;
|
||||
}
|
||||
export interface LaasApiSearchRegionsByNameRequest {
|
||||
name: string;
|
||||
pageToken?: string;
|
||||
limit?: number;
|
||||
}
|
||||
export interface LaasApiUpdateBusinessPricesOperationRequest {
|
||||
businessId: number;
|
||||
updateBusinessPricesRequest: UpdateBusinessPricesRequest;
|
||||
}
|
||||
export interface LaasApiUpdateCampaignOffersOperationRequest {
|
||||
campaignId: number;
|
||||
updateCampaignOffersRequest: UpdateCampaignOffersRequest;
|
||||
}
|
||||
export interface LaasApiUpdateOfferContentOperationRequest {
|
||||
businessId: number;
|
||||
updateOfferContentRequest: UpdateOfferContentRequest;
|
||||
}
|
||||
export interface LaasApiUpdateOfferMappingsOperationRequest {
|
||||
businessId: number;
|
||||
updateOfferMappingsRequest: UpdateOfferMappingsRequest;
|
||||
language?: CatalogLanguageType;
|
||||
}
|
||||
export interface LaasApiUpdateOrderOperationRequest {
|
||||
campaignId: number;
|
||||
updateOrderRequest: UpdateOrderRequest;
|
||||
}
|
||||
export interface LaasApiUpdateOrderStatusOperationRequest {
|
||||
campaignId: number;
|
||||
orderId: number;
|
||||
updateOrderStatusRequest: UpdateOrderStatusRequest;
|
||||
}
|
||||
export interface LaasApiUpdateOrderStatusesOperationRequest {
|
||||
campaignId: number;
|
||||
updateOrderStatusesRequest: UpdateOrderStatusesRequest;
|
||||
}
|
||||
export interface LaasApiUpdatePricesOperationRequest {
|
||||
campaignId: number;
|
||||
updatePricesRequest: UpdatePricesRequest;
|
||||
}
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export declare class LaasApi extends runtime.BaseAPI {
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/cancelReturn.md) %} Отменяет возврат. Это можно сделать только до принятия в пункте выдачи (`\"shipmentStatus\": \"CREATED\"`). {% note info \"Возврат отменяется не мгновенно\" %} Отмена возврата применяется в течение нескольких минут и только в случае успешного завершения операции. [Как проверить статус операции](../../reference/operations/getOperations.md) {% endnote %} {% note tip \"Используйте этот метод в подобных ситуациях\" %} Вы создали возврат, в котором указали 3 товара. Но покупатель передумал и решил вернуть только 2. Отмените возврат и создайте новый. {% endnote %} {% include notitle [limit](../../_auto/method_limits/cancelReturn.md) %}
|
||||
* Отмена возврата
|
||||
*/
|
||||
cancelReturnRaw(requestParameters: LaasApiCancelReturnOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CancelReturnResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/cancelReturn.md) %} Отменяет возврат. Это можно сделать только до принятия в пункте выдачи (`\"shipmentStatus\": \"CREATED\"`). {% note info \"Возврат отменяется не мгновенно\" %} Отмена возврата применяется в течение нескольких минут и только в случае успешного завершения операции. [Как проверить статус операции](../../reference/operations/getOperations.md) {% endnote %} {% note tip \"Используйте этот метод в подобных ситуациях\" %} Вы создали возврат, в котором указали 3 товара. Но покупатель передумал и решил вернуть только 2. Отмените возврат и создайте новый. {% endnote %} {% include notitle [limit](../../_auto/method_limits/cancelReturn.md) %}
|
||||
* Отмена возврата
|
||||
*/
|
||||
cancelReturn(campaignId: number, cancelReturnRequest: CancelReturnRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CancelReturnResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/createOrder.md) %} Создает новый заказ, если на складе Маркета есть нужное количество товаров. Укажите `courierDelivery` для курьерской доставки или `pickupDelivery` для доставки в пункт выдачи. Не передавайте оба параметра одновременно. Значение параметра `draft`: * `true` — Маркет создаст заказ в статусе `RESERVED` и будет ждать подтверждения от магазина. Когда будете готовы, передайте статус `PROCESSING` с подстатусом `STARTED` в методе [PUT v2/campaigns/{campaignId}/orders/{orderId}/status](../../reference/orders/updateOrderStatus.md). Если не сделать это в течение часа после создания заказа, Маркет отменит его. * `false` — Маркет создаст заказ в статусе `PROCESSING` с подстатусом `STARTED`, подтверждение не требуется. Значение параметра `fake`: * `true` — тестовый заказ. Позволяет проверить работу магазина и его API на [тестовых заказах](../../concepts/sandbox.md). Такой заказ не будет отгружен и не влияет на остатки. * `false` — настоящий заказ. {% note warning \"Перед вызовом метода\" %} Получите доступные варианты доставки — [POST v2/campaigns/{campaignId}/delivery-options](../../reference/delivery-options/getDeliveryOptions.md). {% endnote %} {% include notitle [limit](../../_auto/method_limits/createOrder.md) %}
|
||||
* Создание заказа
|
||||
*/
|
||||
createOrderRaw(requestParameters: LaasApiCreateOrderOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CreateOrderResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/createOrder.md) %} Создает новый заказ, если на складе Маркета есть нужное количество товаров. Укажите `courierDelivery` для курьерской доставки или `pickupDelivery` для доставки в пункт выдачи. Не передавайте оба параметра одновременно. Значение параметра `draft`: * `true` — Маркет создаст заказ в статусе `RESERVED` и будет ждать подтверждения от магазина. Когда будете готовы, передайте статус `PROCESSING` с подстатусом `STARTED` в методе [PUT v2/campaigns/{campaignId}/orders/{orderId}/status](../../reference/orders/updateOrderStatus.md). Если не сделать это в течение часа после создания заказа, Маркет отменит его. * `false` — Маркет создаст заказ в статусе `PROCESSING` с подстатусом `STARTED`, подтверждение не требуется. Значение параметра `fake`: * `true` — тестовый заказ. Позволяет проверить работу магазина и его API на [тестовых заказах](../../concepts/sandbox.md). Такой заказ не будет отгружен и не влияет на остатки. * `false` — настоящий заказ. {% note warning \"Перед вызовом метода\" %} Получите доступные варианты доставки — [POST v2/campaigns/{campaignId}/delivery-options](../../reference/delivery-options/getDeliveryOptions.md). {% endnote %} {% include notitle [limit](../../_auto/method_limits/createOrder.md) %}
|
||||
* Создание заказа
|
||||
*/
|
||||
createOrder(campaignId: number, createOrderRequest: CreateOrderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CreateOrderResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/createReturn.md) %} Создает новый возврат. Это можно сделать только для заказа в статусе `DELIVERED`. {% note warning \"Перед вызовом метода\" %} Проверьте, подходят ли пункты выдачи для возврата указанных товаров, — [POST v1/campaigns/{campaignId}/return-delivery-options](../../reference/delivery-options/getReturnDeliveryOptions.md). {% endnote %} {% include notitle [limit](../../_auto/method_limits/createReturn.md) %}
|
||||
* Создание возврата
|
||||
*/
|
||||
createReturnRaw(requestParameters: LaasApiCreateReturnOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CreateReturnResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/createReturn.md) %} Создает новый возврат. Это можно сделать только для заказа в статусе `DELIVERED`. {% note warning \"Перед вызовом метода\" %} Проверьте, подходят ли пункты выдачи для возврата указанных товаров, — [POST v1/campaigns/{campaignId}/return-delivery-options](../../reference/delivery-options/getReturnDeliveryOptions.md). {% endnote %} {% include notitle [limit](../../_auto/method_limits/createReturn.md) %}
|
||||
* Создание возврата
|
||||
*/
|
||||
createReturn(campaignId: number, createReturnRequest: CreateReturnRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CreateReturnResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/deleteCampaignOffers.md) %} Удаляет заданные товары из заданного магазина. {% note warning \"Запрос удаляет товары из конкретного магазина\" %} На продажи в других магазинах и на наличие товара в общем каталоге он не влияет. {% endnote %} Товар не получится удалить, если он хранится на складах Маркета. {% include notitle [limit](../../_auto/method_limits/deleteCampaignOffers.md) %}
|
||||
* Удаление товаров из ассортимента магазина
|
||||
*/
|
||||
deleteCampaignOffersRaw(requestParameters: LaasApiDeleteCampaignOffersOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DeleteCampaignOffersResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/deleteCampaignOffers.md) %} Удаляет заданные товары из заданного магазина. {% note warning \"Запрос удаляет товары из конкретного магазина\" %} На продажи в других магазинах и на наличие товара в общем каталоге он не влияет. {% endnote %} Товар не получится удалить, если он хранится на складах Маркета. {% include notitle [limit](../../_auto/method_limits/deleteCampaignOffers.md) %}
|
||||
* Удаление товаров из ассортимента магазина
|
||||
*/
|
||||
deleteCampaignOffers(campaignId: number, deleteCampaignOffersRequest: DeleteCampaignOffersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DeleteCampaignOffersResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/deleteOffers.md) %} Удаляет товары из каталога. {% include notitle [limit](../../_auto/method_limits/deleteOffers.md) %}
|
||||
* Удаление товаров из каталога
|
||||
*/
|
||||
deleteOffersRaw(requestParameters: LaasApiDeleteOffersOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DeleteOffersResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/deleteOffers.md) %} Удаляет товары из каталога. {% include notitle [limit](../../_auto/method_limits/deleteOffers.md) %}
|
||||
* Удаление товаров из каталога
|
||||
*/
|
||||
deleteOffers(businessId: number, deleteOffersRequest: DeleteOffersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DeleteOffersResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/generateBarcodesReport.md) %} Запускает генерацию PDF-файла со штрихкодами переданных товаров или товаров в указанной заявке на поставку. Файл не получится сгенерировать, если в нем будет более 1 500 штрихкодов. Узнать статус генерации и получить ссылку на готовый файл можно с помощью запроса [GET v2/reports/info/{reportId}](../../reference/reports/getReportInfo.md). {% include notitle [limit](../../_auto/method_limits/generateBarcodesReport.md) %}
|
||||
* Получение файла со штрихкодами
|
||||
*/
|
||||
generateBarcodesReportRaw(requestParameters: LaasApiGenerateBarcodesReportOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GenerateReportResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/generateBarcodesReport.md) %} Запускает генерацию PDF-файла со штрихкодами переданных товаров или товаров в указанной заявке на поставку. Файл не получится сгенерировать, если в нем будет более 1 500 штрихкодов. Узнать статус генерации и получить ссылку на готовый файл можно с помощью запроса [GET v2/reports/info/{reportId}](../../reference/reports/getReportInfo.md). {% include notitle [limit](../../_auto/method_limits/generateBarcodesReport.md) %}
|
||||
* Получение файла со штрихкодами
|
||||
*/
|
||||
generateBarcodesReport(generateBarcodesReportRequest: GenerateBarcodesReportRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GenerateReportResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/generateClosureDocumentsDetalizationReport.md) %} Запускает генерацию отчета по схождению с закрывающими документами в зависимости от типа договора. Узнать статус генерации и получить ссылку на готовый отчет можно с помощью запроса [GET v2/reports/info/{reportId}](../../reference/reports/getReportInfo.md). {% list tabs %} - Договор на размещение {% include notitle [reports](../../_auto/reports/period_closure/period_closure_income.md) %} - Договор на продвижение {% include notitle [reports](../../_auto/reports/period_closure/period_closure_outcome.md) %} {% endlist %} {% include notitle [limit](../../_auto/method_limits/generateClosureDocumentsDetalizationReport.md) %}
|
||||
* Отчет по схождению с закрывающими документами
|
||||
*/
|
||||
generateClosureDocumentsDetalizationReportRaw(requestParameters: LaasApiGenerateClosureDocumentsDetalizationReportRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GenerateReportResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/generateClosureDocumentsDetalizationReport.md) %} Запускает генерацию отчета по схождению с закрывающими документами в зависимости от типа договора. Узнать статус генерации и получить ссылку на готовый отчет можно с помощью запроса [GET v2/reports/info/{reportId}](../../reference/reports/getReportInfo.md). {% list tabs %} - Договор на размещение {% include notitle [reports](../../_auto/reports/period_closure/period_closure_income.md) %} - Договор на продвижение {% include notitle [reports](../../_auto/reports/period_closure/period_closure_outcome.md) %} {% endlist %} {% include notitle [limit](../../_auto/method_limits/generateClosureDocumentsDetalizationReport.md) %}
|
||||
* Отчет по схождению с закрывающими документами
|
||||
*/
|
||||
generateClosureDocumentsDetalizationReport(generateClosureDocumentsDetalizationRequest: GenerateClosureDocumentsDetalizationRequest, format?: ReportFormatType, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GenerateReportResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/generateClosureDocumentsReport.md) %} Возвращает ZIP-архив с закрывающими документами в формате PDF за указанный месяц. {% cut \"Состав документов в зависимости от типа договора\" %} * **Договор на размещение** * [акт об оказанных услугах](*acts-main-act) * [счет-фактура](*acts-main-invoice) * [сводный отчет по данным статистики](*acts-main-report) * [отчет об исполнении поручения и о зачете взаимных требований](*acts-main-agent) (отчет агента) * **Договор на продвижение** (в России не заключается после 30 сентября 2024 года) * [акт об оказании услуг](*acts-discounts-act) * [счет-фактура](*acts-discounts-invoice), если этого требует схема налогообложения * **Договор на маркетинг** * [акт об оказанных услугах](*acts-marketing-act) * [счет-фактура](*acts-main-invoice) * [счет-фактура на аванс](*acts-marketing-invoice) * [выписка по лицевому счету](*acts-marketing-account) * [детализация к акту](*acts-marketing-details) {% endcut %} Узнать статус генерации и получить ссылку на архив можно с помощью запроса [GET v2/reports/info/{reportId}](../../reference/reports/getReportInfo.md). {% include notitle [limit](../../_auto/method_limits/generateClosureDocumentsReport.md) %}
|
||||
* Закрывающие документы
|
||||
*/
|
||||
generateClosureDocumentsReportRaw(requestParameters: LaasApiGenerateClosureDocumentsReportRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GenerateReportResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/generateClosureDocumentsReport.md) %} Возвращает ZIP-архив с закрывающими документами в формате PDF за указанный месяц. {% cut \"Состав документов в зависимости от типа договора\" %} * **Договор на размещение** * [акт об оказанных услугах](*acts-main-act) * [счет-фактура](*acts-main-invoice) * [сводный отчет по данным статистики](*acts-main-report) * [отчет об исполнении поручения и о зачете взаимных требований](*acts-main-agent) (отчет агента) * **Договор на продвижение** (в России не заключается после 30 сентября 2024 года) * [акт об оказании услуг](*acts-discounts-act) * [счет-фактура](*acts-discounts-invoice), если этого требует схема налогообложения * **Договор на маркетинг** * [акт об оказанных услугах](*acts-marketing-act) * [счет-фактура](*acts-main-invoice) * [счет-фактура на аванс](*acts-marketing-invoice) * [выписка по лицевому счету](*acts-marketing-account) * [детализация к акту](*acts-marketing-details) {% endcut %} Узнать статус генерации и получить ссылку на архив можно с помощью запроса [GET v2/reports/info/{reportId}](../../reference/reports/getReportInfo.md). {% include notitle [limit](../../_auto/method_limits/generateClosureDocumentsReport.md) %}
|
||||
* Закрывающие документы
|
||||
*/
|
||||
generateClosureDocumentsReport(generateClosureDocumentsRequest: GenerateClosureDocumentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GenerateReportResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/generateGoodsMovementReport.md) %} Запускает генерацию отчета по движению товаров. [Что это за отчет](https://yandex.ru/support/marketplace/analytics/reports-fby-fbs.html#flow) Узнать статус генерации и получить ссылку на готовый отчет можно с помощью запроса [GET v2/reports/info/{reportId}](../../reference/reports/getReportInfo.md). {% include notitle [reports](../../_auto/reports/sku/movement/movement_config.md) %} {% include notitle [tariff-period](../../_includes/common/report-data-period-unchanged.md) %} {% include notitle [limit](../../_auto/method_limits/generateGoodsMovementReport.md) %}
|
||||
* Отчет по движению товаров
|
||||
*/
|
||||
generateGoodsMovementReportRaw(requestParameters: LaasApiGenerateGoodsMovementReportOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GenerateReportResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/generateGoodsMovementReport.md) %} Запускает генерацию отчета по движению товаров. [Что это за отчет](https://yandex.ru/support/marketplace/analytics/reports-fby-fbs.html#flow) Узнать статус генерации и получить ссылку на готовый отчет можно с помощью запроса [GET v2/reports/info/{reportId}](../../reference/reports/getReportInfo.md). {% include notitle [reports](../../_auto/reports/sku/movement/movement_config.md) %} {% include notitle [tariff-period](../../_includes/common/report-data-period-unchanged.md) %} {% include notitle [limit](../../_auto/method_limits/generateGoodsMovementReport.md) %}
|
||||
* Отчет по движению товаров
|
||||
*/
|
||||
generateGoodsMovementReport(generateGoodsMovementReportRequest: GenerateGoodsMovementReportRequest, format?: ReportFormatType, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GenerateReportResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/generateMarketingDetalizationReport.md) %} Запускает генерацию отчета по счету маркетинга. Узнать статус генерации и получить ссылку на готовый отчет можно с помощью запроса [GET v2/reports/info/{reportId}](../../reference/reports/getReportInfo.md). {% include notitle [reports](../../_auto/reports/advertiser_billing_operations/advertiser_billing_operations.md) %} {% include notitle [limit](../../_auto/method_limits/generateMarketingDetalizationReport.md) %}
|
||||
* Отчет по счету маркетинга
|
||||
*/
|
||||
generateMarketingDetalizationReportRaw(requestParameters: LaasApiGenerateMarketingDetalizationReportRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GenerateReportResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/generateMarketingDetalizationReport.md) %} Запускает генерацию отчета по счету маркетинга. Узнать статус генерации и получить ссылку на готовый отчет можно с помощью запроса [GET v2/reports/info/{reportId}](../../reference/reports/getReportInfo.md). {% include notitle [reports](../../_auto/reports/advertiser_billing_operations/advertiser_billing_operations.md) %} {% include notitle [limit](../../_auto/method_limits/generateMarketingDetalizationReport.md) %}
|
||||
* Отчет по счету маркетинга
|
||||
*/
|
||||
generateMarketingDetalizationReport(businessId: number, generateMarketingDetalizationRequest: GenerateMarketingDetalizationRequest, format?: ReportFormatType, sourceType?: SourceType, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GenerateReportResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/generateOfferBarcodes.md) %} Генерирует штрихкоды и присваивает их указанным товарам. Если у товара на упаковке уже есть штрихкод производителя, передайте его в параметре `barcodes` в методе [POST v2/businesses/{businessId}/offer-mappings/update](../../reference/business-offer-mappings/updateOfferMappings.md). Генерировать новый не нужно. {% include notitle [limit](../../_auto/method_limits/generateOfferBarcodes.md) %}
|
||||
* Генерация штрихкодов
|
||||
*/
|
||||
generateOfferBarcodesRaw(requestParameters: LaasApiGenerateOfferBarcodesOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GenerateOfferBarcodesResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/generateOfferBarcodes.md) %} Генерирует штрихкоды и присваивает их указанным товарам. Если у товара на упаковке уже есть штрихкод производителя, передайте его в параметре `barcodes` в методе [POST v2/businesses/{businessId}/offer-mappings/update](../../reference/business-offer-mappings/updateOfferMappings.md). Генерировать новый не нужно. {% include notitle [limit](../../_auto/method_limits/generateOfferBarcodes.md) %}
|
||||
* Генерация штрихкодов
|
||||
*/
|
||||
generateOfferBarcodes(businessId: number, generateOfferBarcodesRequest: GenerateOfferBarcodesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GenerateOfferBarcodesResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/generateStocksOnWarehousesReport.md) %} Запускает генерацию отчета по остаткам на складах. [Что это за отчет](https://yandex.ru/support/marketplace/ru/storage/logistics#remains-history) {% note warning \"Когда использовать этот метод\" %} Метод актуален: * для моделей FBY и LaaS; * для моделей FBS, DBS и Экспресс, если в кабинете есть группы складов. Если в кабинете нет групп складов и вы работаете с моделями FBS, DBS или Экспресс, используйте метод [POST v3/businesses/{businessId}/reports/stocks/generate](../../reference/reports/generateStocksReport.md). [Что такое группы складов и зачем они нужны](https://yandex.ru/support/marketplace/assortment/operations/stocks.html#unified-stocks). {% endnote %} **Какая информация вернется:** * Для моделей FBY и LaaS, если указать `campaignId`, — об остатках на складах Маркета. * Для остальных моделей, если указать `campaignId`, — об остатках на соответствующем складе магазина. * Для остальных моделей, если указать `businessId`, — об остатках на всех складах магазинов в кабинете, кроме FBY и LaaS. Используйте фильтр `campaignIds`, чтобы указать определенные магазины. ⚠️ Не передавайте одновременно `campaignId` и `businessId`. Узнать статус генерации и получить ссылку на готовый отчет можно с помощью запроса [GET v2/reports/info/{reportId}](../../reference/reports/getReportInfo.md). {% list tabs %} - Склад Маркета {% include notitle [reports](../../_auto/reports/stocks/stocks_on_warehouses.md) %} - Склад магазина {% include notitle [reports](../../_auto/reports/offers/mass/mass_shared_stocks_business_csv_config.md) %} - Все склады магазинов в кабинете, кроме FBY и LaaS {% include notitle [reports](../../_auto/reports/offers/stocks_business_config.md) %} {% endlist %} {% include notitle [limit](../../_auto/method_limits/generateStocksOnWarehousesReport.md) %}
|
||||
* Отчет по остаткам на складах
|
||||
*/
|
||||
generateStocksOnWarehousesReportRaw(requestParameters: LaasApiGenerateStocksOnWarehousesReportOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GenerateReportResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/generateStocksOnWarehousesReport.md) %} Запускает генерацию отчета по остаткам на складах. [Что это за отчет](https://yandex.ru/support/marketplace/ru/storage/logistics#remains-history) {% note warning \"Когда использовать этот метод\" %} Метод актуален: * для моделей FBY и LaaS; * для моделей FBS, DBS и Экспресс, если в кабинете есть группы складов. Если в кабинете нет групп складов и вы работаете с моделями FBS, DBS или Экспресс, используйте метод [POST v3/businesses/{businessId}/reports/stocks/generate](../../reference/reports/generateStocksReport.md). [Что такое группы складов и зачем они нужны](https://yandex.ru/support/marketplace/assortment/operations/stocks.html#unified-stocks). {% endnote %} **Какая информация вернется:** * Для моделей FBY и LaaS, если указать `campaignId`, — об остатках на складах Маркета. * Для остальных моделей, если указать `campaignId`, — об остатках на соответствующем складе магазина. * Для остальных моделей, если указать `businessId`, — об остатках на всех складах магазинов в кабинете, кроме FBY и LaaS. Используйте фильтр `campaignIds`, чтобы указать определенные магазины. ⚠️ Не передавайте одновременно `campaignId` и `businessId`. Узнать статус генерации и получить ссылку на готовый отчет можно с помощью запроса [GET v2/reports/info/{reportId}](../../reference/reports/getReportInfo.md). {% list tabs %} - Склад Маркета {% include notitle [reports](../../_auto/reports/stocks/stocks_on_warehouses.md) %} - Склад магазина {% include notitle [reports](../../_auto/reports/offers/mass/mass_shared_stocks_business_csv_config.md) %} - Все склады магазинов в кабинете, кроме FBY и LaaS {% include notitle [reports](../../_auto/reports/offers/stocks_business_config.md) %} {% endlist %} {% include notitle [limit](../../_auto/method_limits/generateStocksOnWarehousesReport.md) %}
|
||||
* Отчет по остаткам на складах
|
||||
*/
|
||||
generateStocksOnWarehousesReport(generateStocksOnWarehousesReportRequest: GenerateStocksOnWarehousesReportRequest, format?: ReportFormatType, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GenerateReportResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/generateUnitedMarketplaceServicesReport.md) %} Запускает генерацию отчета по стоимости услуг за заданный период. [Что это за отчет](https://yandex.ru/support/marketplace/ru/accounting/transactions#reports) Тип отчета зависит от того, какие поля заполнены в запросе: |**Тип отчета** |**Какие поля нужны** | |-----------------------------|---------------------------------| |По дате начисления услуги |`dateFrom` и `dateTo` | |По дате формирования акта |`year` и `month` | Заказать отчеты обоих типов одним запросом нельзя. Узнать статус генерации и получить ссылку на готовый отчет можно с помощью запроса [GET v2/reports/info/{reportId}](../../reference/reports/getReportInfo.md). {% include notitle [reports](../../_auto/reports/united/services/generator/united_marketplace_services.md) %} {% include notitle [limit](../../_auto/method_limits/generateUnitedMarketplaceServicesReport.md) %}
|
||||
* Отчет по стоимости услуг
|
||||
*/
|
||||
generateUnitedMarketplaceServicesReportRaw(requestParameters: LaasApiGenerateUnitedMarketplaceServicesReportOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GenerateReportResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/generateUnitedMarketplaceServicesReport.md) %} Запускает генерацию отчета по стоимости услуг за заданный период. [Что это за отчет](https://yandex.ru/support/marketplace/ru/accounting/transactions#reports) Тип отчета зависит от того, какие поля заполнены в запросе: |**Тип отчета** |**Какие поля нужны** | |-----------------------------|---------------------------------| |По дате начисления услуги |`dateFrom` и `dateTo` | |По дате формирования акта |`year` и `month` | Заказать отчеты обоих типов одним запросом нельзя. Узнать статус генерации и получить ссылку на готовый отчет можно с помощью запроса [GET v2/reports/info/{reportId}](../../reference/reports/getReportInfo.md). {% include notitle [reports](../../_auto/reports/united/services/generator/united_marketplace_services.md) %} {% include notitle [limit](../../_auto/method_limits/generateUnitedMarketplaceServicesReport.md) %}
|
||||
* Отчет по стоимости услуг
|
||||
*/
|
||||
generateUnitedMarketplaceServicesReport(generateUnitedMarketplaceServicesReportRequest: GenerateUnitedMarketplaceServicesReportRequest, format?: ReportFormatType, language?: ReportLanguageType, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GenerateReportResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/generateUnitedReturnsReport.md) %} Запускает генерацию сводного отчета по невыкупам и возвратам за заданный период. [Что это за отчет](https://yandex.ru/support/marketplace/ru/orders/returns/logistic#rejected-orders) Отчет содержит информацию о невыкупах и возвратах за указанный период, а также о тех, которые готовы к выдаче. Узнать статус генерации и получить ссылку на готовый отчет можно с помощью запроса [GET v2/reports/info/{reportId}](../../reference/reports/getReportInfo.md). {% include notitle [reports](../../_auto/reports/united/returns/generator/united_returns.md) %} {% include notitle [tariff-period](../../_includes/common/report-data-period-unchanged.md) %} {% include notitle [limit](../../_auto/method_limits/generateUnitedReturnsReport.md) %}
|
||||
* Отчет по невыкупам и возвратам
|
||||
*/
|
||||
generateUnitedReturnsReportRaw(requestParameters: LaasApiGenerateUnitedReturnsReportRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GenerateReportResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/generateUnitedReturnsReport.md) %} Запускает генерацию сводного отчета по невыкупам и возвратам за заданный период. [Что это за отчет](https://yandex.ru/support/marketplace/ru/orders/returns/logistic#rejected-orders) Отчет содержит информацию о невыкупах и возвратах за указанный период, а также о тех, которые готовы к выдаче. Узнать статус генерации и получить ссылку на готовый отчет можно с помощью запроса [GET v2/reports/info/{reportId}](../../reference/reports/getReportInfo.md). {% include notitle [reports](../../_auto/reports/united/returns/generator/united_returns.md) %} {% include notitle [tariff-period](../../_includes/common/report-data-period-unchanged.md) %} {% include notitle [limit](../../_auto/method_limits/generateUnitedReturnsReport.md) %}
|
||||
* Отчет по невыкупам и возвратам
|
||||
*/
|
||||
generateUnitedReturnsReport(generateUnitedReturnsRequest: GenerateUnitedReturnsRequest, format?: ReportFormatType, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GenerateReportResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getAuthTokenInfo.md) %} {% note info \"Метод доступен только для Api-Key-токена.\" %} {% endnote %} Возвращает информацию о переданном токене авторизации. {% include notitle [limit](../../_auto/method_limits/getAuthTokenInfo.md) %}
|
||||
* Получение информации о токене авторизации
|
||||
*/
|
||||
getAuthTokenInfoRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetTokenInfoResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getAuthTokenInfo.md) %} {% note info \"Метод доступен только для Api-Key-токена.\" %} {% endnote %} Возвращает информацию о переданном токене авторизации. {% include notitle [limit](../../_auto/method_limits/getAuthTokenInfo.md) %}
|
||||
* Получение информации о токене авторизации
|
||||
*/
|
||||
getAuthTokenInfo(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetTokenInfoResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getBusinessOrders.md) %} Возвращает информацию о заказах в кабинете. Запрос можно использовать для отслеживания заказов и их статусов. {% note tip \"Вы также можете настроить API-уведомления\" %} Маркет отправит вам [запрос](../../push-notifications/reference/sendNotification.md), когда появится новый заказ или изменится его статус. А полную информацию можно получить с помощью этого метода. [{#T}](../../push-notifications/index.md) {% endnote %} Доступна фильтрация по параметрам: * дата оформления заказа; * дата и время обновления заказа; * дата отгрузки; * статусы заказов (`statuses`); * этапы обработки или причины отмены (`substatuses`); * идентификаторы кампаний; * идентификаторы заказов; * внешние идентификаторы заказов; * тип заказа (настоящий или тестовый); * модели размещения; * наличие запросов от покупателей на отмену заказа. Максимальный диапазон дат за один запрос — 30 дней (передается в параметрах `fromDate` и `toDate`). Если их не передать, возвращается информация за последние 30 дней. Результаты возвращаются постранично. Для навигации используйте параметры `pageToken` и `limit`. Получить более подробную информацию о покупателе и его номере телефона можно с помощью запроса [GET v2/campaigns/{campaignId}/orders/{orderId}/buyer](../../reference/order-delivery/getOrderBuyerInfo.md). {% include notitle [limit](../../_auto/method_limits/getBusinessOrders.md) %}
|
||||
* Информация о заказах в кабинете
|
||||
*/
|
||||
getBusinessOrdersRaw(requestParameters: LaasApiGetBusinessOrdersOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetBusinessOrdersResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getBusinessOrders.md) %} Возвращает информацию о заказах в кабинете. Запрос можно использовать для отслеживания заказов и их статусов. {% note tip \"Вы также можете настроить API-уведомления\" %} Маркет отправит вам [запрос](../../push-notifications/reference/sendNotification.md), когда появится новый заказ или изменится его статус. А полную информацию можно получить с помощью этого метода. [{#T}](../../push-notifications/index.md) {% endnote %} Доступна фильтрация по параметрам: * дата оформления заказа; * дата и время обновления заказа; * дата отгрузки; * статусы заказов (`statuses`); * этапы обработки или причины отмены (`substatuses`); * идентификаторы кампаний; * идентификаторы заказов; * внешние идентификаторы заказов; * тип заказа (настоящий или тестовый); * модели размещения; * наличие запросов от покупателей на отмену заказа. Максимальный диапазон дат за один запрос — 30 дней (передается в параметрах `fromDate` и `toDate`). Если их не передать, возвращается информация за последние 30 дней. Результаты возвращаются постранично. Для навигации используйте параметры `pageToken` и `limit`. Получить более подробную информацию о покупателе и его номере телефона можно с помощью запроса [GET v2/campaigns/{campaignId}/orders/{orderId}/buyer](../../reference/order-delivery/getOrderBuyerInfo.md). {% include notitle [limit](../../_auto/method_limits/getBusinessOrders.md) %}
|
||||
* Информация о заказах в кабинете
|
||||
*/
|
||||
getBusinessOrders(businessId: number, getBusinessOrdersRequest: GetBusinessOrdersRequest, pageToken?: string, limit?: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetBusinessOrdersResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getBusinessSettings.md) %} Возвращает информацию о настройках кабинета, идентификатор которого указан в запросе. {% include notitle [limit](../../_auto/method_limits/getBusinessSettings.md) %}
|
||||
* Настройки кабинета
|
||||
*/
|
||||
getBusinessSettingsRaw(requestParameters: LaasApiGetBusinessSettingsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetBusinessSettingsResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getBusinessSettings.md) %} Возвращает информацию о настройках кабинета, идентификатор которого указан в запросе. {% include notitle [limit](../../_auto/method_limits/getBusinessSettings.md) %}
|
||||
* Настройки кабинета
|
||||
*/
|
||||
getBusinessSettings(businessId: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetBusinessSettingsResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getCampaign.md) %} Возвращает информацию о магазине. {% include notitle [limit](../../_auto/method_limits/getCampaign.md) %}
|
||||
* Информация о магазине
|
||||
*/
|
||||
getCampaignRaw(requestParameters: LaasApiGetCampaignRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetCampaignResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getCampaign.md) %} Возвращает информацию о магазине. {% include notitle [limit](../../_auto/method_limits/getCampaign.md) %}
|
||||
* Информация о магазине
|
||||
*/
|
||||
getCampaign(campaignId: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetCampaignResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getCampaignOffers.md) %} Возвращает список товаров, которые размещены в заданном магазине. Для каждого товара указываются параметры размещения. {% include notitle [limit](../../_auto/method_limits/getCampaignOffers.md) %}
|
||||
* Информация о товарах, которые размещены в заданном магазине
|
||||
*/
|
||||
getCampaignOffersRaw(requestParameters: LaasApiGetCampaignOffersOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetCampaignOffersResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getCampaignOffers.md) %} Возвращает список товаров, которые размещены в заданном магазине. Для каждого товара указываются параметры размещения. {% include notitle [limit](../../_auto/method_limits/getCampaignOffers.md) %}
|
||||
* Информация о товарах, которые размещены в заданном магазине
|
||||
*/
|
||||
getCampaignOffers(campaignId: number, getCampaignOffersRequest: GetCampaignOffersRequest, pageToken?: string, limit?: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetCampaignOffersResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getCampaignSettings.md) %} Возвращает информацию о настройках магазина, идентификатор которого указан в запросе. {% include notitle [limit](../../_auto/method_limits/getCampaignSettings.md) %}
|
||||
* Настройки магазина
|
||||
*/
|
||||
getCampaignSettingsRaw(requestParameters: LaasApiGetCampaignSettingsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetCampaignSettingsResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getCampaignSettings.md) %} Возвращает информацию о настройках магазина, идентификатор которого указан в запросе. {% include notitle [limit](../../_auto/method_limits/getCampaignSettings.md) %}
|
||||
* Настройки магазина
|
||||
*/
|
||||
getCampaignSettings(campaignId: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetCampaignSettingsResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getCampaigns.md) %} **Для Api-Key-токена:** возвращает список магазинов в кабинете, для которого выдан токен. Нельзя получить список только подагентских магазинов. **Для OAuth-токена:** возвращает список магазинов, к которым имеет доступ пользователь — владелец токена авторизации, использованного в запросе. Для агентских пользователей список состоит из подагентских магазинов. {% note warning \"Ограничение для параметра `pageSize`\" %} Не передавайте значение больше 100. {% endnote %} {% include notitle [limit](../../_auto/method_limits/getCampaigns.md) %}
|
||||
* Список магазинов пользователя
|
||||
*/
|
||||
getCampaignsRaw(requestParameters: LaasApiGetCampaignsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetCampaignsResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getCampaigns.md) %} **Для Api-Key-токена:** возвращает список магазинов в кабинете, для которого выдан токен. Нельзя получить список только подагентских магазинов. **Для OAuth-токена:** возвращает список магазинов, к которым имеет доступ пользователь — владелец токена авторизации, использованного в запросе. Для агентских пользователей список состоит из подагентских магазинов. {% note warning \"Ограничение для параметра `pageSize`\" %} Не передавайте значение больше 100. {% endnote %} {% include notitle [limit](../../_auto/method_limits/getCampaigns.md) %}
|
||||
* Список магазинов пользователя
|
||||
*/
|
||||
getCampaigns(pageToken?: string, limit?: number, page?: number, pageSize?: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetCampaignsResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getCategoriesTree.md) %} Возвращает дерево категорий Маркета. {% include notitle [limit](../../_auto/method_limits/getCategoriesTree.md) %}
|
||||
* Дерево категорий
|
||||
*/
|
||||
getCategoriesTreeRaw(requestParameters: LaasApiGetCategoriesTreeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetCategoriesResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getCategoriesTree.md) %} Возвращает дерево категорий Маркета. {% include notitle [limit](../../_auto/method_limits/getCategoriesTree.md) %}
|
||||
* Дерево категорий
|
||||
*/
|
||||
getCategoriesTree(getCategoriesRequest?: GetCategoriesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetCategoriesResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getCategoryContentParameters.md) %} Возвращает список характеристик с допустимыми значениями для заданной [листовой категории](*list-category). Поля в ответе определяют правила передачи характеристики в методах: - [POST v2/businesses/{businessId}/offer-mappings/update](../../reference/business-offer-mappings/updateOfferMappings.md) - [POST v2/businesses/{businessId}/offer-cards/update](../../reference/content/updateOfferContent.md) {% include notitle [limit](../../_auto/method_limits/getCategoryContentParameters.md) %}
|
||||
* Списки характеристик товаров по категориям
|
||||
*/
|
||||
getCategoryContentParametersRaw(requestParameters: LaasApiGetCategoryContentParametersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetCategoryContentParametersResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getCategoryContentParameters.md) %} Возвращает список характеристик с допустимыми значениями для заданной [листовой категории](*list-category). Поля в ответе определяют правила передачи характеристики в методах: - [POST v2/businesses/{businessId}/offer-mappings/update](../../reference/business-offer-mappings/updateOfferMappings.md) - [POST v2/businesses/{businessId}/offer-cards/update](../../reference/content/updateOfferContent.md) {% include notitle [limit](../../_auto/method_limits/getCategoryContentParameters.md) %}
|
||||
* Списки характеристик товаров по категориям
|
||||
*/
|
||||
getCategoryContentParameters(categoryId: number, businessId?: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetCategoryContentParametersResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getDefaultPrices.md) %} Возвращает список цен, которые вы установили для всех магазинов любым способом. Например, через API или с помощью Excel-шаблона. О способах установки цен читайте [в Справке Маркета для продавцов](https://yandex.ru/support/marketplace/assortment/operations/prices.html). {% include notitle [limit](../../_auto/method_limits/getDefaultPrices.md) %}
|
||||
* Просмотр цен на указанные товары во всех магазинах
|
||||
*/
|
||||
getDefaultPricesRaw(requestParameters: LaasApiGetDefaultPricesOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetDefaultPricesResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getDefaultPrices.md) %} Возвращает список цен, которые вы установили для всех магазинов любым способом. Например, через API или с помощью Excel-шаблона. О способах установки цен читайте [в Справке Маркета для продавцов](https://yandex.ru/support/marketplace/assortment/operations/prices.html). {% include notitle [limit](../../_auto/method_limits/getDefaultPrices.md) %}
|
||||
* Просмотр цен на указанные товары во всех магазинах
|
||||
*/
|
||||
getDefaultPrices(businessId: number, pageToken?: string, limit?: number, getDefaultPricesRequest?: GetDefaultPricesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetDefaultPricesResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getDeliveryOptions.md) %} Возвращает список вариантов для доставки заказов. Выберите подходящий вариант доставки из ответа и передайте его при создании заказа. Укажите `courierDelivery` для курьерской доставки или `pickupDelivery` для доставки в пункт выдачи. Не передавайте оба параметра одновременно. {% include notitle [limit](../../_auto/method_limits/getDeliveryOptions.md) %}
|
||||
* Получение доступных вариантов доставки заказов
|
||||
*/
|
||||
getDeliveryOptionsRaw(requestParameters: LaasApiGetDeliveryOptionsOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetDeliveryOptionsResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getDeliveryOptions.md) %} Возвращает список вариантов для доставки заказов. Выберите подходящий вариант доставки из ответа и передайте его при создании заказа. Укажите `courierDelivery` для курьерской доставки или `pickupDelivery` для доставки в пункт выдачи. Не передавайте оба параметра одновременно. {% include notitle [limit](../../_auto/method_limits/getDeliveryOptions.md) %}
|
||||
* Получение доступных вариантов доставки заказов
|
||||
*/
|
||||
getDeliveryOptions(campaignId: number, getDeliveryOptionsRequest: GetDeliveryOptionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetDeliveryOptionsResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getFulfillmentWarehouses.md) %} Возвращает список фулфилмент-складов Маркета с их идентификаторами. {% include notitle [limit](../../_auto/method_limits/getFulfillmentWarehouses.md) %}
|
||||
* Идентификаторы фулфилмент-складов Маркета
|
||||
*/
|
||||
getFulfillmentWarehousesRaw(requestParameters: LaasApiGetFulfillmentWarehousesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetFulfillmentWarehousesResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getFulfillmentWarehouses.md) %} Возвращает список фулфилмент-складов Маркета с их идентификаторами. {% include notitle [limit](../../_auto/method_limits/getFulfillmentWarehouses.md) %}
|
||||
* Идентификаторы фулфилмент-складов Маркета
|
||||
*/
|
||||
getFulfillmentWarehouses(campaignId?: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetFulfillmentWarehousesResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getLogisticPoints.md) %} Возвращает список пунктов выдачи заказов Маркета. Регулярно запрашивайте эту информацию, чтобы в системе магазина хранить актуальные данные. Например, раз в день. {% include notitle [limit](../../_auto/method_limits/getLogisticPoints.md) %}
|
||||
* Получение точек ПВЗ Маркета
|
||||
*/
|
||||
getLogisticPointsRaw(requestParameters: LaasApiGetLogisticPointsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetLogisticPointsResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getLogisticPoints.md) %} Возвращает список пунктов выдачи заказов Маркета. Регулярно запрашивайте эту информацию, чтобы в системе магазина хранить актуальные данные. Например, раз в день. {% include notitle [limit](../../_auto/method_limits/getLogisticPoints.md) %}
|
||||
* Получение точек ПВЗ Маркета
|
||||
*/
|
||||
getLogisticPoints(businessId: number, pageToken?: string, limit?: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetLogisticPointsResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getOfferCardsContentStatus.md) %} Возвращает сведения о состоянии контента для заданных товаров: * создана ли карточка товара и в каком она статусе; * рейтинг карточки — на сколько процентов она заполнена; * переданные характеристики товаров; * есть ли ошибки или предупреждения, связанные с контентом; * рекомендации по заполнению карточки. Чтобы получить другие характеристики товаров, воспользуйтесь методом [POST v2/businesses/{businessId}/offer-mappings](../../reference/business-offer-mappings/getOfferMappings.md). {% include notitle [limit](../../_auto/method_limits/getOfferCardsContentStatus.md) %}
|
||||
* Получение информации о заполненности карточек магазина
|
||||
*/
|
||||
getOfferCardsContentStatusRaw(requestParameters: LaasApiGetOfferCardsContentStatusOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetOfferCardsContentStatusResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getOfferCardsContentStatus.md) %} Возвращает сведения о состоянии контента для заданных товаров: * создана ли карточка товара и в каком она статусе; * рейтинг карточки — на сколько процентов она заполнена; * переданные характеристики товаров; * есть ли ошибки или предупреждения, связанные с контентом; * рекомендации по заполнению карточки. Чтобы получить другие характеристики товаров, воспользуйтесь методом [POST v2/businesses/{businessId}/offer-mappings](../../reference/business-offer-mappings/getOfferMappings.md). {% include notitle [limit](../../_auto/method_limits/getOfferCardsContentStatus.md) %}
|
||||
* Получение информации о заполненности карточек магазина
|
||||
*/
|
||||
getOfferCardsContentStatus(businessId: number, pageToken?: string, limit?: number, getOfferCardsContentStatusRequest?: GetOfferCardsContentStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetOfferCardsContentStatusResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getOfferMappings.md) %} Возвращает список товаров в каталоге, их категории на Маркете и характеристики каждого товара. Можно использовать тремя способами: * задать список интересующих SKU; * задать фильтр — в этом случае результаты возвращаются постранично; * не передавать тело запроса, чтобы получить список всех товаров в каталоге. Чтобы получить категорийные характеристики товаров, воспользуйтесь методом [POST v2/businesses/{businessId}/offer-cards](../../reference/content/getOfferCardsContentStatus.md). {% include notitle [limit](../../_auto/method_limits/getOfferMappings.md) %}
|
||||
* Информация о товарах в каталоге
|
||||
*/
|
||||
getOfferMappingsRaw(requestParameters: LaasApiGetOfferMappingsOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetOfferMappingsResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getOfferMappings.md) %} Возвращает список товаров в каталоге, их категории на Маркете и характеристики каждого товара. Можно использовать тремя способами: * задать список интересующих SKU; * задать фильтр — в этом случае результаты возвращаются постранично; * не передавать тело запроса, чтобы получить список всех товаров в каталоге. Чтобы получить категорийные характеристики товаров, воспользуйтесь методом [POST v2/businesses/{businessId}/offer-cards](../../reference/content/getOfferCardsContentStatus.md). {% include notitle [limit](../../_auto/method_limits/getOfferMappings.md) %}
|
||||
* Информация о товарах в каталоге
|
||||
*/
|
||||
getOfferMappings(businessId: number, pageToken?: string, limit?: number, language?: CatalogLanguageType, getOfferMappingsRequest?: GetOfferMappingsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetOfferMappingsResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getOperations.md) %} Возвращает статусы запущенных операций по их идентификаторам. {% include notitle [limit](../../_auto/method_limits/getOperations.md) %}
|
||||
* Получение статусов операций
|
||||
*/
|
||||
getOperationsRaw(requestParameters: LaasApiGetOperationsOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetOperationsResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getOperations.md) %} Возвращает статусы запущенных операций по их идентификаторам. {% include notitle [limit](../../_auto/method_limits/getOperations.md) %}
|
||||
* Получение статусов операций
|
||||
*/
|
||||
getOperations(businessId: number, getOperationsRequest: GetOperationsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetOperationsResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getOrder.md) %} Возвращает информацию о заказе в магазине. {% note tip \"Вы также можете настроить API-уведомления\" %} Маркет отправит вам [запрос](../../push-notifications/reference/sendNotification.md), когда появится новый заказ или изменится его статус. А полную информацию можно получить с помощью метода [POST v1/businesses/{businessId}/orders](../../reference/orders/getBusinessOrders.md). [{#T}](../../push-notifications/index.md) {% endnote %} Получить более подробную информацию о покупателе и его номере телефона можно с помощью запроса [GET v2/campaigns/{campaignId}/orders/{orderId}/buyer](../../reference/order-delivery/getOrderBuyerInfo.md). {% include notitle [limit](../../_auto/method_limits/getOrder.md) %}
|
||||
* Информация об одном заказе в магазине
|
||||
* @deprecated
|
||||
*/
|
||||
getOrderRaw(requestParameters: LaasApiGetOrderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetOrderResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getOrder.md) %} Возвращает информацию о заказе в магазине. {% note tip \"Вы также можете настроить API-уведомления\" %} Маркет отправит вам [запрос](../../push-notifications/reference/sendNotification.md), когда появится новый заказ или изменится его статус. А полную информацию можно получить с помощью метода [POST v1/businesses/{businessId}/orders](../../reference/orders/getBusinessOrders.md). [{#T}](../../push-notifications/index.md) {% endnote %} Получить более подробную информацию о покупателе и его номере телефона можно с помощью запроса [GET v2/campaigns/{campaignId}/orders/{orderId}/buyer](../../reference/order-delivery/getOrderBuyerInfo.md). {% include notitle [limit](../../_auto/method_limits/getOrder.md) %}
|
||||
* Информация об одном заказе в магазине
|
||||
* @deprecated
|
||||
*/
|
||||
getOrder(campaignId: number, orderId: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetOrderResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getOrderIdentifiersStatus.md) %} Возвращает статусы проверки кодов маркировки в заказе. Заказ, в котором есть ювелирные изделия или товары с обязательной маркировкой в системе [«Честный ЗНАК»](https://честныйзнак.рф/), можно перевести в статус `READY_TO_SHIP`, только когда: 1. В методе [PUT v2/campaigns/{campaignId}/orders/{orderId}/boxes](../../reference/orders/setOrderBoxLayout.md) вы передадите Маркету: * [УИНы](:no-translate[*uin]) по каждому ювелирному изделию в заказе; * коды маркировки в системе :no-translate[«Честный ЗНАК»] по всем товарам в заказе, для которых она обязательна. 2. Все коды маркировки успешно пройдут проверку. {% include notitle [limit](../../_auto/method_limits/getOrderIdentifiersStatus.md) %}
|
||||
* Статусы проверки кодов маркировки
|
||||
*/
|
||||
getOrderIdentifiersStatusRaw(requestParameters: LaasApiGetOrderIdentifiersStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetOrderIdentifiersStatusResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getOrderIdentifiersStatus.md) %} Возвращает статусы проверки кодов маркировки в заказе. Заказ, в котором есть ювелирные изделия или товары с обязательной маркировкой в системе [«Честный ЗНАК»](https://честныйзнак.рф/), можно перевести в статус `READY_TO_SHIP`, только когда: 1. В методе [PUT v2/campaigns/{campaignId}/orders/{orderId}/boxes](../../reference/orders/setOrderBoxLayout.md) вы передадите Маркету: * [УИНы](:no-translate[*uin]) по каждому ювелирному изделию в заказе; * коды маркировки в системе :no-translate[«Честный ЗНАК»] по всем товарам в заказе, для которых она обязательна. 2. Все коды маркировки успешно пройдут проверку. {% include notitle [limit](../../_auto/method_limits/getOrderIdentifiersStatus.md) %}
|
||||
* Статусы проверки кодов маркировки
|
||||
*/
|
||||
getOrderIdentifiersStatus(campaignId: number, orderId: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetOrderIdentifiersStatusResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getOrderUpdateOptions.md) %} Возвращает список доступных интервалов для изменения даты и времени курьерской доставки. {% include notitle [limit](../../_auto/method_limits/getOrderUpdateOptions.md) %}
|
||||
* Получение временных интервалов для изменения заказа
|
||||
*/
|
||||
getOrderUpdateOptionsRaw(requestParameters: LaasApiGetOrderUpdateOptionsOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetOrderUpdateOptionsResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getOrderUpdateOptions.md) %} Возвращает список доступных интервалов для изменения даты и времени курьерской доставки. {% include notitle [limit](../../_auto/method_limits/getOrderUpdateOptions.md) %}
|
||||
* Получение временных интервалов для изменения заказа
|
||||
*/
|
||||
getOrderUpdateOptions(campaignId: number, getOrderUpdateOptionsRequest: GetOrderUpdateOptionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetOrderUpdateOptionsResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getOrders.md) %} Возвращает информацию о заказах в магазине. Запрос можно использовать для отслеживания заказов и их статусов. По умолчанию данные о тестовых заказах не приходят. Чтобы их получить, передайте значение `true` в параметре `fake`. {% note tip \"Вы также можете настроить API-уведомления\" %} Маркет отправит вам [запрос](../../push-notifications/reference/sendNotification.md), когда появится новый заказ или изменится его статус. А полную информацию можно получить с помощью метода [POST v1/businesses/{businessId}/orders](../../reference/orders/getBusinessOrders.md). [{#T}](../../push-notifications/index.md) {% endnote %} Доступна фильтрация по параметрам: * дата оформления заказа; * дата и время обновления заказа; * дата отгрузки; * статусы заказов (`statuses`); * этапы обработки или причины отмены (`substatuses`); * идентификаторы заказов; * тип заказа (настоящий или тестовый). Не возвращается информация о заказах, которые доставили или отменили больше 30 дней назад. Как ее получить: * [POST v1/businesses/{businessId}/orders](../../reference/orders/getBusinessOrders.md); * [POST v2/campaigns/{campaignId}/stats/orders](../../reference/orders-stats/getOrdersStats.md). Максимальный диапазон дат за один запрос — 30 дней (передается в параметрах `fromDate` и `toDate`). Если их не передать, возвращается информация за последние 30 дней. Результаты возвращаются постранично. Для навигации используйте параметры `pageToken` и `limit`. Получить более подробную информацию о покупателе и его номере телефона можно с помощью запроса [GET v2/campaigns/{campaignId}/orders/{orderId}/buyer](../../reference/order-delivery/getOrderBuyerInfo.md). {% include notitle [limit](../../_auto/method_limits/getOrders.md) %}
|
||||
* Информация о заказах в магазине
|
||||
* @deprecated
|
||||
*/
|
||||
getOrdersRaw(requestParameters: LaasApiGetOrdersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetOrdersResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getOrders.md) %} Возвращает информацию о заказах в магазине. Запрос можно использовать для отслеживания заказов и их статусов. По умолчанию данные о тестовых заказах не приходят. Чтобы их получить, передайте значение `true` в параметре `fake`. {% note tip \"Вы также можете настроить API-уведомления\" %} Маркет отправит вам [запрос](../../push-notifications/reference/sendNotification.md), когда появится новый заказ или изменится его статус. А полную информацию можно получить с помощью метода [POST v1/businesses/{businessId}/orders](../../reference/orders/getBusinessOrders.md). [{#T}](../../push-notifications/index.md) {% endnote %} Доступна фильтрация по параметрам: * дата оформления заказа; * дата и время обновления заказа; * дата отгрузки; * статусы заказов (`statuses`); * этапы обработки или причины отмены (`substatuses`); * идентификаторы заказов; * тип заказа (настоящий или тестовый). Не возвращается информация о заказах, которые доставили или отменили больше 30 дней назад. Как ее получить: * [POST v1/businesses/{businessId}/orders](../../reference/orders/getBusinessOrders.md); * [POST v2/campaigns/{campaignId}/stats/orders](../../reference/orders-stats/getOrdersStats.md). Максимальный диапазон дат за один запрос — 30 дней (передается в параметрах `fromDate` и `toDate`). Если их не передать, возвращается информация за последние 30 дней. Результаты возвращаются постранично. Для навигации используйте параметры `pageToken` и `limit`. Получить более подробную информацию о покупателе и его номере телефона можно с помощью запроса [GET v2/campaigns/{campaignId}/orders/{orderId}/buyer](../../reference/order-delivery/getOrderBuyerInfo.md). {% include notitle [limit](../../_auto/method_limits/getOrders.md) %}
|
||||
* Информация о заказах в магазине
|
||||
* @deprecated
|
||||
*/
|
||||
getOrders(campaignId: number, orderIds?: Array<number>, status?: Set<OrderStatusType>, substatus?: Set<OrderSubstatusType>, fromDate?: Date, toDate?: Date, supplierShipmentDateFrom?: Date, supplierShipmentDateTo?: Date, updatedAtFrom?: Date, updatedAtTo?: Date, dispatchType?: OrderDeliveryDispatchType, fake?: boolean, hasCis?: boolean, onlyWaitingForCancellationApprove?: boolean, onlyEstimatedDelivery?: boolean, buyerType?: OrderBuyerType, page?: number, pageSize?: number, pageToken?: string, limit?: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetOrdersResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getPricesByOfferIds.md) %} Возвращает список цен на указанные товары в магазине. {% note warning \"Метод только для отдельных магазинов\" %} Используйте этот метод, только если в кабинете установлены уникальные цены в отдельных магазинах. Для просмотра цен, которые действуют во всех магазинах, используйте [POST v2/businesses/{businessId}/offer-mappings](../../reference/business-offer-mappings/getOfferMappings.md). {% endnote %} {% include notitle [limit](../../_auto/method_limits/getPricesByOfferIds.md) %}
|
||||
* Просмотр цен на указанные товары в конкретном магазине
|
||||
*/
|
||||
getPricesByOfferIdsRaw(requestParameters: LaasApiGetPricesByOfferIdsOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetPricesByOfferIdsResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getPricesByOfferIds.md) %} Возвращает список цен на указанные товары в магазине. {% note warning \"Метод только для отдельных магазинов\" %} Используйте этот метод, только если в кабинете установлены уникальные цены в отдельных магазинах. Для просмотра цен, которые действуют во всех магазинах, используйте [POST v2/businesses/{businessId}/offer-mappings](../../reference/business-offer-mappings/getOfferMappings.md). {% endnote %} {% include notitle [limit](../../_auto/method_limits/getPricesByOfferIds.md) %}
|
||||
* Просмотр цен на указанные товары в конкретном магазине
|
||||
*/
|
||||
getPricesByOfferIds(campaignId: number, pageToken?: string, limit?: number, getPricesByOfferIdsRequest?: GetPricesByOfferIdsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetPricesByOfferIdsResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getRegionsCodes.md) %} Возвращает список стран с их кодами в формате :no-translate[ISO 3166-1 alpha-2]. Страна производства `countryCode` понадобится при продаже товаров из-за рубежа для бизнеса. [Инструкция](../../step-by-step/business-info.md) {% include notitle [limit](../../_auto/method_limits/getRegionsCodes.md) %}
|
||||
* Список допустимых кодов стран
|
||||
*/
|
||||
getRegionsCodesRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetRegionsCodesResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getRegionsCodes.md) %} Возвращает список стран с их кодами в формате :no-translate[ISO 3166-1 alpha-2]. Страна производства `countryCode` понадобится при продаже товаров из-за рубежа для бизнеса. [Инструкция](../../step-by-step/business-info.md) {% include notitle [limit](../../_auto/method_limits/getRegionsCodes.md) %}
|
||||
* Список допустимых кодов стран
|
||||
*/
|
||||
getRegionsCodes(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetRegionsCodesResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getReportInfo.md) %} Возвращает статус генерации заданного отчета или документа и, если он готов, ссылку для скачивания. Чтобы воспользоваться этим запросом, вначале нужно запустить генерацию отчета или документа. [Инструкция](../../step-by-step/reports.md) {% include notitle [limit](../../_auto/method_limits/getReportInfo.md) %}
|
||||
* Получение заданного отчета или документа
|
||||
*/
|
||||
getReportInfoRaw(requestParameters: LaasApiGetReportInfoRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetReportInfoResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getReportInfo.md) %} Возвращает статус генерации заданного отчета или документа и, если он готов, ссылку для скачивания. Чтобы воспользоваться этим запросом, вначале нужно запустить генерацию отчета или документа. [Инструкция](../../step-by-step/reports.md) {% include notitle [limit](../../_auto/method_limits/getReportInfo.md) %}
|
||||
* Получение заданного отчета или документа
|
||||
*/
|
||||
getReportInfo(reportId: string, sourceType?: SourceType, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetReportInfoResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getReturn.md) %} Получает информацию по одному невыкупу или возврату. {% note tip \"Подключите API-уведомления\" %} Маркет отправит вам запрос [POST notification](../../push-notifications/reference/sendNotification.md), когда появится новый невыкуп или возврат. [{#T}](../../push-notifications/index.md) {% endnote %} {% include notitle [limit](../../_auto/method_limits/getReturn.md) %}
|
||||
* Информация о невыкупе или возврате
|
||||
*/
|
||||
getReturnRaw(requestParameters: LaasApiGetReturnRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetReturnResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getReturn.md) %} Получает информацию по одному невыкупу или возврату. {% note tip \"Подключите API-уведомления\" %} Маркет отправит вам запрос [POST notification](../../push-notifications/reference/sendNotification.md), когда появится новый невыкуп или возврат. [{#T}](../../push-notifications/index.md) {% endnote %} {% include notitle [limit](../../_auto/method_limits/getReturn.md) %}
|
||||
* Информация о невыкупе или возврате
|
||||
*/
|
||||
getReturn(campaignId: number, orderId: number, returnId: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetReturnResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getReturnDeliveryOptions.md) %} Возвращает список идентификаторов пунктов выдачи, которые могут принять возврат указанных товаров. {% include notitle [limit](../../_auto/method_limits/getReturnDeliveryOptions.md) %}
|
||||
* Получение подходящих для возврата пунктов выдачи
|
||||
*/
|
||||
getReturnDeliveryOptionsRaw(requestParameters: LaasApiGetReturnDeliveryOptionsOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetReturnDeliveryOptionsResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getReturnDeliveryOptions.md) %} Возвращает список идентификаторов пунктов выдачи, которые могут принять возврат указанных товаров. {% include notitle [limit](../../_auto/method_limits/getReturnDeliveryOptions.md) %}
|
||||
* Получение подходящих для возврата пунктов выдачи
|
||||
*/
|
||||
getReturnDeliveryOptions(campaignId: number, getReturnDeliveryOptionsRequest: GetReturnDeliveryOptionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetReturnDeliveryOptionsResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getReturns.md) %} Получает список невыкупов и возвратов. Чтобы получить информацию по одному невыкупу или возврату, выполните запрос [GET v2/campaigns/{campaignId}/orders/{orderId}/returns/{returnId}](../../reference/returns/getReturn.md). {% note tip \"Подключите API-уведомления\" %} Маркет отправит вам запрос [POST notification](../../push-notifications/reference/sendNotification.md), когда появится новый невыкуп или возврат. [{#T}](../../push-notifications/index.md) {% endnote %} {% include notitle [limit](../../_auto/method_limits/getReturns.md) %}
|
||||
* Список невыкупов и возвратов
|
||||
*/
|
||||
getReturnsRaw(requestParameters: LaasApiGetReturnsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetReturnsResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getReturns.md) %} Получает список невыкупов и возвратов. Чтобы получить информацию по одному невыкупу или возврату, выполните запрос [GET v2/campaigns/{campaignId}/orders/{orderId}/returns/{returnId}](../../reference/returns/getReturn.md). {% note tip \"Подключите API-уведомления\" %} Маркет отправит вам запрос [POST notification](../../push-notifications/reference/sendNotification.md), когда появится новый невыкуп или возврат. [{#T}](../../push-notifications/index.md) {% endnote %} {% include notitle [limit](../../_auto/method_limits/getReturns.md) %}
|
||||
* Список невыкупов и возвратов
|
||||
*/
|
||||
getReturns(campaignId: number, pageToken?: string, limit?: number, orderIds?: Set<number>, statuses?: Set<RefundStatusType>, shipmentStatuses?: Set<ReturnShipmentStatusType>, type?: ReturnType, fromDate?: Date, toDate?: Date, fromDate2?: Date, toDate2?: Date, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetReturnsResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getStocks.md) %} Возвращает данные об остатках товаров (для всех моделей) и об [оборачиваемости](*turnover) товаров (для модели FBY). {% note warning \"Когда использовать этот метод\" %} Метод актуален: * для моделей FBY и LaaS; * для моделей FBS, DBS и Экспресс, если в кабинете есть группы складов. Если в кабинете нет групп складов и вы работаете с моделями FBS, DBS или Экспресс, используйте метод [POST v3/businesses/{businessId}/offers/stocks](../../reference/stocks/getStocksOnPartnerWarehouses.md). [Что такое группы складов и зачем они нужны](https://yandex.ru/support/marketplace/assortment/operations/stocks.html#unified-stocks). {% endnote %} {% note info \"По умолчанию данные по оборачивамости не возращаются\" %} Чтобы они были в ответе, передавайте `true` в поле `withTurnover`. {% endnote %} **Для моделей FBY и LaaS:** информация об остатках может возвращаться с нескольких складов Маркета, у которых будут разные `warehouseId`. Получить список складов Маркета можно с помощью метода [GET v2/warehouses](../../reference/warehouses/getFulfillmentWarehouses.md). **Для модели FBS:** в ответе может вернуться не только партнерский склад, но и склад возвратов Маркета. Это возможно, если возврат поступил в указанную продавцом точку возвратов и долго не был забран. {% include notitle [limit](../../_auto/method_limits/getStocks.md) %} [//]: <> (turnover: Среднее количество дней, за которое товар продается. Подробно об оборачиваемости рассказано в Справке Маркета для продавцов https://yandex.ru/support/marketplace/analytics/turnover.html.)
|
||||
* Информация об остатках и оборачиваемости
|
||||
*/
|
||||
getStocksRaw(requestParameters: LaasApiGetStocksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetWarehouseStocksResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getStocks.md) %} Возвращает данные об остатках товаров (для всех моделей) и об [оборачиваемости](*turnover) товаров (для модели FBY). {% note warning \"Когда использовать этот метод\" %} Метод актуален: * для моделей FBY и LaaS; * для моделей FBS, DBS и Экспресс, если в кабинете есть группы складов. Если в кабинете нет групп складов и вы работаете с моделями FBS, DBS или Экспресс, используйте метод [POST v3/businesses/{businessId}/offers/stocks](../../reference/stocks/getStocksOnPartnerWarehouses.md). [Что такое группы складов и зачем они нужны](https://yandex.ru/support/marketplace/assortment/operations/stocks.html#unified-stocks). {% endnote %} {% note info \"По умолчанию данные по оборачивамости не возращаются\" %} Чтобы они были в ответе, передавайте `true` в поле `withTurnover`. {% endnote %} **Для моделей FBY и LaaS:** информация об остатках может возвращаться с нескольких складов Маркета, у которых будут разные `warehouseId`. Получить список складов Маркета можно с помощью метода [GET v2/warehouses](../../reference/warehouses/getFulfillmentWarehouses.md). **Для модели FBS:** в ответе может вернуться не только партнерский склад, но и склад возвратов Маркета. Это возможно, если возврат поступил в указанную продавцом точку возвратов и долго не был забран. {% include notitle [limit](../../_auto/method_limits/getStocks.md) %} [//]: <> (turnover: Среднее количество дней, за которое товар продается. Подробно об оборачиваемости рассказано в Справке Маркета для продавцов https://yandex.ru/support/marketplace/analytics/turnover.html.)
|
||||
* Информация об остатках и оборачиваемости
|
||||
*/
|
||||
getStocks(campaignId: number, pageToken?: string, limit?: number, getWarehouseStocksRequest?: GetWarehouseStocksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetWarehouseStocksResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getSupplyRequestDocuments.md) %} Возвращает документы по заявке. {% include notitle [limit](../../_auto/method_limits/getSupplyRequestDocuments.md) %}
|
||||
* Получение документов по заявке на поставку, вывоз или утилизацию
|
||||
*/
|
||||
getSupplyRequestDocumentsRaw(requestParameters: LaasApiGetSupplyRequestDocumentsOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetSupplyRequestDocumentsResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getSupplyRequestDocuments.md) %} Возвращает документы по заявке. {% include notitle [limit](../../_auto/method_limits/getSupplyRequestDocuments.md) %}
|
||||
* Получение документов по заявке на поставку, вывоз или утилизацию
|
||||
*/
|
||||
getSupplyRequestDocuments(campaignId: number, getSupplyRequestDocumentsRequest: GetSupplyRequestDocumentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetSupplyRequestDocumentsResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getSupplyRequestItems.md) %} Возвращает список товаров в заявке и информацию по ним. {% include notitle [limit](../../_auto/method_limits/getSupplyRequestItems.md) %}
|
||||
* Получение товаров в заявке на поставку, вывоз или утилизацию
|
||||
*/
|
||||
getSupplyRequestItemsRaw(requestParameters: LaasApiGetSupplyRequestItemsOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetSupplyRequestItemsResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getSupplyRequestItems.md) %} Возвращает список товаров в заявке и информацию по ним. {% include notitle [limit](../../_auto/method_limits/getSupplyRequestItems.md) %}
|
||||
* Получение товаров в заявке на поставку, вывоз или утилизацию
|
||||
*/
|
||||
getSupplyRequestItems(campaignId: number, getSupplyRequestItemsRequest: GetSupplyRequestItemsRequest, pageToken?: string, limit?: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetSupplyRequestItemsResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getSupplyRequests.md) %} По указанным фильтрам возвращает заявки на поставку, вывоз и утилизацию, а также информацию по ним. {% include notitle [limit](../../_auto/method_limits/getSupplyRequests.md) %}
|
||||
* Получение информации о заявках на поставку, вывоз и утилизацию
|
||||
*/
|
||||
getSupplyRequestsRaw(requestParameters: LaasApiGetSupplyRequestsOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetSupplyRequestsResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getSupplyRequests.md) %} По указанным фильтрам возвращает заявки на поставку, вывоз и утилизацию, а также информацию по ним. {% include notitle [limit](../../_auto/method_limits/getSupplyRequests.md) %}
|
||||
* Получение информации о заявках на поставку, вывоз и утилизацию
|
||||
*/
|
||||
getSupplyRequests(campaignId: number, pageToken?: string, limit?: number, getSupplyRequestsRequest?: GetSupplyRequestsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetSupplyRequestsResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/searchRegionChildren.md) %} Возвращает информацию о регионах, являющихся дочерними по отношению к региону, идентификатор которого указан в запросе. {% include notitle [limit](../../_auto/method_limits/searchRegionChildren.md) %}
|
||||
* Информация о дочерних регионах
|
||||
*/
|
||||
searchRegionChildrenRaw(requestParameters: LaasApiSearchRegionChildrenRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetRegionWithChildrenResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/searchRegionChildren.md) %} Возвращает информацию о регионах, являющихся дочерними по отношению к региону, идентификатор которого указан в запросе. {% include notitle [limit](../../_auto/method_limits/searchRegionChildren.md) %}
|
||||
* Информация о дочерних регионах
|
||||
*/
|
||||
searchRegionChildren(regionId: number, pageToken?: string, limit?: number, page?: number, pageSize?: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetRegionWithChildrenResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/searchRegionsById.md) %} Возвращает информацию о регионе. {% include notitle [limit](../../_auto/method_limits/searchRegionsById.md) %}
|
||||
* Информация о регионе
|
||||
*/
|
||||
searchRegionsByIdRaw(requestParameters: LaasApiSearchRegionsByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetRegionByIdResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/searchRegionsById.md) %} Возвращает информацию о регионе. {% include notitle [limit](../../_auto/method_limits/searchRegionsById.md) %}
|
||||
* Информация о регионе
|
||||
*/
|
||||
searchRegionsById(regionId: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetRegionByIdResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/searchRegionsByName.md) %} Возвращает информацию о регионе, удовлетворяющем заданным в запросе условиям поиска. Если найдено несколько регионов, удовлетворяющих условиям поиска, возвращается информация по каждому найденному региону (но не более десяти регионов) для возможности определения нужного региона по родительским регионам. {% include notitle [limit](../../_auto/method_limits/searchRegionsByName.md) %}
|
||||
* Поиск регионов по их имени
|
||||
*/
|
||||
searchRegionsByNameRaw(requestParameters: LaasApiSearchRegionsByNameRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetRegionsResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/searchRegionsByName.md) %} Возвращает информацию о регионе, удовлетворяющем заданным в запросе условиям поиска. Если найдено несколько регионов, удовлетворяющих условиям поиска, возвращается информация по каждому найденному региону (но не более десяти регионов) для возможности определения нужного региона по родительским регионам. {% include notitle [limit](../../_auto/method_limits/searchRegionsByName.md) %}
|
||||
* Поиск регионов по их имени
|
||||
*/
|
||||
searchRegionsByName(name: string, pageToken?: string, limit?: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetRegionsResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/updateBusinessPrices.md) %} Устанавливает цены, которые действуют во всех магазинах. Чтобы получить рекомендации Маркета, касающиеся цен, выполните запрос [POST v2/businesses/{businessId}/offers/recommendations](../../reference/offers/getOfferRecommendations.md). При необходимости передавайте НДС с помощью параметра `vat` в запросе [POST v2/campaigns/{campaignId}/offers/update](../../reference/offers/updateCampaignOffers.md). {% note info \"Данные в каталоге обновляются не мгновенно\" %} Это занимает до нескольких минут. {% endnote %} {% include notitle [limit](../../_auto/method_limits/updateBusinessPrices.md) %}
|
||||
* Установка цен на товары для всех магазинов
|
||||
*/
|
||||
updateBusinessPricesRaw(requestParameters: LaasApiUpdateBusinessPricesOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<EmptyApiResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/updateBusinessPrices.md) %} Устанавливает цены, которые действуют во всех магазинах. Чтобы получить рекомендации Маркета, касающиеся цен, выполните запрос [POST v2/businesses/{businessId}/offers/recommendations](../../reference/offers/getOfferRecommendations.md). При необходимости передавайте НДС с помощью параметра `vat` в запросе [POST v2/campaigns/{campaignId}/offers/update](../../reference/offers/updateCampaignOffers.md). {% note info \"Данные в каталоге обновляются не мгновенно\" %} Это занимает до нескольких минут. {% endnote %} {% include notitle [limit](../../_auto/method_limits/updateBusinessPrices.md) %}
|
||||
* Установка цен на товары для всех магазинов
|
||||
*/
|
||||
updateBusinessPrices(businessId: number, updateBusinessPricesRequest: UpdateBusinessPricesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<EmptyApiResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/updateCampaignOffers.md) %} Изменяет параметры размещения товаров в конкретном магазине: доступность товара и применяемый НДС. {% include notitle [limit](../../_auto/method_limits/updateCampaignOffers.md) %}
|
||||
* Изменение условий продажи товаров в магазине
|
||||
*/
|
||||
updateCampaignOffersRaw(requestParameters: LaasApiUpdateCampaignOffersOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<EmptyApiResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/updateCampaignOffers.md) %} Изменяет параметры размещения товаров в конкретном магазине: доступность товара и применяемый НДС. {% include notitle [limit](../../_auto/method_limits/updateCampaignOffers.md) %}
|
||||
* Изменение условий продажи товаров в магазине
|
||||
*/
|
||||
updateCampaignOffers(campaignId: number, updateCampaignOffersRequest: UpdateCampaignOffersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<EmptyApiResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/updateOfferContent.md) %} Редактирует характеристики товара, которые специфичны для категории, к которой он относится. {% note warning \"Здесь только то, что относится к конкретной категории\" %} Если вам нужно изменить основные параметры товара (название, описание, изображения, видео, производитель, штрихкод), воспользуйтесь запросом [POST v2/businesses/{businessId}/offer-mappings/update](../../reference/business-offer-mappings/updateOfferMappings.md). {% endnote %} Чтобы удалить характеристики, которые заданы в параметрах с типом `string`, передайте пустое значение. {% note info \"Данные в каталоге обновляются не мгновенно\" %} Это занимает до нескольких минут. {% endnote %} {% include notitle [limit](../../_auto/method_limits/updateOfferContent.md) %}
|
||||
* Редактирование категорийных характеристик товара
|
||||
*/
|
||||
updateOfferContentRaw(requestParameters: LaasApiUpdateOfferContentOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UpdateOfferContentResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/updateOfferContent.md) %} Редактирует характеристики товара, которые специфичны для категории, к которой он относится. {% note warning \"Здесь только то, что относится к конкретной категории\" %} Если вам нужно изменить основные параметры товара (название, описание, изображения, видео, производитель, штрихкод), воспользуйтесь запросом [POST v2/businesses/{businessId}/offer-mappings/update](../../reference/business-offer-mappings/updateOfferMappings.md). {% endnote %} Чтобы удалить характеристики, которые заданы в параметрах с типом `string`, передайте пустое значение. {% note info \"Данные в каталоге обновляются не мгновенно\" %} Это занимает до нескольких минут. {% endnote %} {% include notitle [limit](../../_auto/method_limits/updateOfferContent.md) %}
|
||||
* Редактирование категорийных характеристик товара
|
||||
*/
|
||||
updateOfferContent(businessId: number, updateOfferContentRequest: UpdateOfferContentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UpdateOfferContentResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/updateOfferMappings.md) %} Добавляет товары в каталог и передает: * их [листовые категории](*list-categories) на Маркете и категорийные характеристики; * основные характеристики; * цены на товары в кабинете. Также объединяет товары на карточке, редактирует и удаляет информацию об уже добавленных товарах, в том числе цены в кабинете и категории товаров. Список категорий Маркета можно получить с помощью запроса [POST v2/categories/tree](../../reference/categories/getCategoriesTree.md), а характеристики товаров по категориям с помощью [POST v2/category/{categoryId}/parameters](../../reference/content/getCategoryContentParameters.md). {% cut \"Добавить новый товар\" %} Передайте его с новым идентификатором, который раньше никогда не использовался в каталоге. Обязательно укажите параметры: `offerId`, `name`, `marketCategoryId`, `pictures`, `vendor`, `description`. Старайтесь сразу передать как можно больше информации — она потребуется Маркету для подбора подходящей карточки или создания новой. Если известно, какой карточке на Маркете соответствует товар, можно сразу указать идентификатор этой карточки (SKU на Маркете) в поле `marketSKU`. **Для продавцов Market Yandex Go:** Когда вы добавляете товары в каталог, указывайте значения параметров `name` и `description` на русском языке. Чтобы на витрине они отображались и на другом языке, еще раз выполните запрос `POST v2/businesses/{businessId}/offer-mappings/update`, где укажите: * язык в параметре `language`; * значения параметров `name` и `description` на указанном языке. Повторно передавать остальные характеристики товара не нужно. {% endcut %} {% cut \"Изменить информацию о товаре\" %} Передайте новые данные, указав в `offerId` SKU товара в вашей системе. Поля, в которых ничего не меняется, можно не передавать. {% endcut %} {% cut \"Удалить переданные ранее параметры товара\" %} В `deleteParameters` укажите значения параметров, которые хотите удалить. Можно передать сразу несколько значений. Для параметров с типом `string` также можно передать пустое значение. {% endcut %} Параметр `offerId` (SKU товара в вашей системе) должен быть **уникальным** для всех товаров, которые вы передаете. {% note warning \"Правила использования SKU\" %} * У каждого товара SKU должен быть свой. * Уже заданный SKU нельзя освободить и использовать заново для другого товара. Каждый товар должен получать новый идентификатор, до того никогда не использовавшийся в вашем каталоге. SKU товара можно изменить в кабинете продавца на Маркете. О том, как это сделать, читайте [в Справке Маркета для продавцов](https://yandex.ru/support2/marketplace/ru/assortment/operations/edit-sku). {% endnote %} {% note info \"Данные в каталоге обновляются не мгновенно\" %} Это занимает до нескольких минут. {% endnote %} {% include notitle [limit](../../_auto/method_limits/updateOfferMappings.md) %}
|
||||
* Добавление товаров в каталог и изменение информации о них
|
||||
*/
|
||||
updateOfferMappingsRaw(requestParameters: LaasApiUpdateOfferMappingsOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UpdateOfferMappingsResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/updateOfferMappings.md) %} Добавляет товары в каталог и передает: * их [листовые категории](*list-categories) на Маркете и категорийные характеристики; * основные характеристики; * цены на товары в кабинете. Также объединяет товары на карточке, редактирует и удаляет информацию об уже добавленных товарах, в том числе цены в кабинете и категории товаров. Список категорий Маркета можно получить с помощью запроса [POST v2/categories/tree](../../reference/categories/getCategoriesTree.md), а характеристики товаров по категориям с помощью [POST v2/category/{categoryId}/parameters](../../reference/content/getCategoryContentParameters.md). {% cut \"Добавить новый товар\" %} Передайте его с новым идентификатором, который раньше никогда не использовался в каталоге. Обязательно укажите параметры: `offerId`, `name`, `marketCategoryId`, `pictures`, `vendor`, `description`. Старайтесь сразу передать как можно больше информации — она потребуется Маркету для подбора подходящей карточки или создания новой. Если известно, какой карточке на Маркете соответствует товар, можно сразу указать идентификатор этой карточки (SKU на Маркете) в поле `marketSKU`. **Для продавцов Market Yandex Go:** Когда вы добавляете товары в каталог, указывайте значения параметров `name` и `description` на русском языке. Чтобы на витрине они отображались и на другом языке, еще раз выполните запрос `POST v2/businesses/{businessId}/offer-mappings/update`, где укажите: * язык в параметре `language`; * значения параметров `name` и `description` на указанном языке. Повторно передавать остальные характеристики товара не нужно. {% endcut %} {% cut \"Изменить информацию о товаре\" %} Передайте новые данные, указав в `offerId` SKU товара в вашей системе. Поля, в которых ничего не меняется, можно не передавать. {% endcut %} {% cut \"Удалить переданные ранее параметры товара\" %} В `deleteParameters` укажите значения параметров, которые хотите удалить. Можно передать сразу несколько значений. Для параметров с типом `string` также можно передать пустое значение. {% endcut %} Параметр `offerId` (SKU товара в вашей системе) должен быть **уникальным** для всех товаров, которые вы передаете. {% note warning \"Правила использования SKU\" %} * У каждого товара SKU должен быть свой. * Уже заданный SKU нельзя освободить и использовать заново для другого товара. Каждый товар должен получать новый идентификатор, до того никогда не использовавшийся в вашем каталоге. SKU товара можно изменить в кабинете продавца на Маркете. О том, как это сделать, читайте [в Справке Маркета для продавцов](https://yandex.ru/support2/marketplace/ru/assortment/operations/edit-sku). {% endnote %} {% note info \"Данные в каталоге обновляются не мгновенно\" %} Это занимает до нескольких минут. {% endnote %} {% include notitle [limit](../../_auto/method_limits/updateOfferMappings.md) %}
|
||||
* Добавление товаров в каталог и изменение информации о них
|
||||
*/
|
||||
updateOfferMappings(businessId: number, updateOfferMappingsRequest: UpdateOfferMappingsRequest, language?: CatalogLanguageType, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UpdateOfferMappingsResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/updateOrder.md) %} Изменяет в заказе: * данные получателя; * интервал дат курьерской доставки. Передавайте только ту информацию, которую хотите изменить. При необходимости вы можете отредактировать и данные получателя, и интервал доставки одновременно. Заказ можно изменить в любом статусе до вручения покупателю или отмены (`DELIVERED` или `CANCELLED`). {% note info \"Данные заказа обновляются не мгновенно\" %} Изменения применяются в течение нескольких минут и только в случае успешного завершения операции. [Как проверить статус операции](../../reference/operations/getOperations.md) {% endnote %} {% include notitle [limit](../../_auto/method_limits/updateOrder.md) %}
|
||||
* Изменение заказа
|
||||
*/
|
||||
updateOrderRaw(requestParameters: LaasApiUpdateOrderOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UpdateOrderResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/updateOrder.md) %} Изменяет в заказе: * данные получателя; * интервал дат курьерской доставки. Передавайте только ту информацию, которую хотите изменить. При необходимости вы можете отредактировать и данные получателя, и интервал доставки одновременно. Заказ можно изменить в любом статусе до вручения покупателю или отмены (`DELIVERED` или `CANCELLED`). {% note info \"Данные заказа обновляются не мгновенно\" %} Изменения применяются в течение нескольких минут и только в случае успешного завершения операции. [Как проверить статус операции](../../reference/operations/getOperations.md) {% endnote %} {% include notitle [limit](../../_auto/method_limits/updateOrder.md) %}
|
||||
* Изменение заказа
|
||||
*/
|
||||
updateOrder(campaignId: number, updateOrderRequest: UpdateOrderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UpdateOrderResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/updateOrderStatus.md) %} Изменяет статус заказа. Возможные изменения статусов: * Если магазин подтвердил и подготовил заказ к отправке, то заказ из статуса `\"status\": \"PROCESSING\"` и этапа обработки `\"substatus\": \"STARTED\"` нужно перевести в статус `\"status\": \"PROCESSING\"` и этап обработки `\"substatus\": \"READY_TO_SHIP\"`. * Если магазин подтвердил заказ, но не может его выполнить (например, товар числится в базе, но отсутствует на складе или нет нужного цвета), то заказ из статуса `\"status\": \"PROCESSING\"` и этапа обработки `\"substatus\": \"STARTED\"` нужно перевести в статус `\"status\": \"CANCELLED\"` с причиной отмены заказа `\"substatus\": \"SHOP_FAILED\"`. * Если магазин подготовил заказ к отгрузке, но не может его выполнить (например, последний товар был поврежден или оказался с браком), то заказ из статуса `\"status\": \"PROCESSING\"` и этапа обработки `\"substatus\": \"READY_TO_SHIP\"` нужно перевести в статус `\"status\": \"CANCELLED\"` с причиной отмены заказа `\"substatus\": \"SHOP_FAILED\"`. Полная информация о статусной модели DBS-заказов: [Как изменяются статусы заказов](../../concepts/dbs-order-status-model.md). {% cut \"**Как подтвердить LaaS-заказ**\" %} Для подтверждения черновика заказа передайте статус `\"status\": \"PROCESSING\"` с подстатусом `\"substatus\": \"STARTED\"`. Подтверждение заказа, созданного с параметром `draft` равным `false`, не требуется. {% endcut %} {% cut \"**Как отменить LaaS-заказ**\" %} Передайте статус `\"status\": \"CANCELLED\"` с причиной отмены заказа `\"substatus\": \"SHOP_FAILED\"`. При успешном выполнении запроса отмена произойдет через некоторое время. [Как проверить статус операции](../../reference/operations/getOperations.md) {% endcut %} {% include notitle [limit](../../_auto/method_limits/updateOrderStatus.md) %}
|
||||
* Изменение статуса одного заказа
|
||||
*/
|
||||
updateOrderStatusRaw(requestParameters: LaasApiUpdateOrderStatusOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UpdateOrderStatusResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/updateOrderStatus.md) %} Изменяет статус заказа. Возможные изменения статусов: * Если магазин подтвердил и подготовил заказ к отправке, то заказ из статуса `\"status\": \"PROCESSING\"` и этапа обработки `\"substatus\": \"STARTED\"` нужно перевести в статус `\"status\": \"PROCESSING\"` и этап обработки `\"substatus\": \"READY_TO_SHIP\"`. * Если магазин подтвердил заказ, но не может его выполнить (например, товар числится в базе, но отсутствует на складе или нет нужного цвета), то заказ из статуса `\"status\": \"PROCESSING\"` и этапа обработки `\"substatus\": \"STARTED\"` нужно перевести в статус `\"status\": \"CANCELLED\"` с причиной отмены заказа `\"substatus\": \"SHOP_FAILED\"`. * Если магазин подготовил заказ к отгрузке, но не может его выполнить (например, последний товар был поврежден или оказался с браком), то заказ из статуса `\"status\": \"PROCESSING\"` и этапа обработки `\"substatus\": \"READY_TO_SHIP\"` нужно перевести в статус `\"status\": \"CANCELLED\"` с причиной отмены заказа `\"substatus\": \"SHOP_FAILED\"`. Полная информация о статусной модели DBS-заказов: [Как изменяются статусы заказов](../../concepts/dbs-order-status-model.md). {% cut \"**Как подтвердить LaaS-заказ**\" %} Для подтверждения черновика заказа передайте статус `\"status\": \"PROCESSING\"` с подстатусом `\"substatus\": \"STARTED\"`. Подтверждение заказа, созданного с параметром `draft` равным `false`, не требуется. {% endcut %} {% cut \"**Как отменить LaaS-заказ**\" %} Передайте статус `\"status\": \"CANCELLED\"` с причиной отмены заказа `\"substatus\": \"SHOP_FAILED\"`. При успешном выполнении запроса отмена произойдет через некоторое время. [Как проверить статус операции](../../reference/operations/getOperations.md) {% endcut %} {% include notitle [limit](../../_auto/method_limits/updateOrderStatus.md) %}
|
||||
* Изменение статуса одного заказа
|
||||
*/
|
||||
updateOrderStatus(campaignId: number, orderId: number, updateOrderStatusRequest: UpdateOrderStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UpdateOrderStatusResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/updateOrderStatuses.md) %} Изменяет статусы нескольких заказов. Возможные изменения статусов: * Если магазин подтвердил и подготовил заказ к отправке, то заказ из статуса `\"status\": \"PROCESSING\"`и этапа обработки `\"substatus\": \"STARTED\"` нужно перевести в статус `\"status\": \"PROCESSING\"` и этап обработки `\"substatus\": \"READY_TO_SHIP\"`. * Если магазин подтвердил заказ, но не может его выполнить (например, товар числится в базе, но отсутствует на складе или нет нужного цвета), то заказ из статуса `\"status\": \"PROCESSING\"` и этапа обработки `\"substatus\": \"STARTED\"` нужно перевести в статус `\"status\": \"CANCELLED\"` с причиной отмены заказа `\"substatus\": \"SHOP_FAILED\"`. * Если магазин подготовил заказ к отгрузке, но не может его выполнить (например, последний товар был поврежден или оказался с браком), то заказ из статуса `\"status\": \"PROCESSING\"` и этапа обработки `\"substatus\": \"READY_TO_SHIP\"` нужно перевести в статус `\"status\": \"CANCELLED\"` с причиной отмены заказа `\"substatus\": \"SHOP_FAILED\"`. Полная информация о статусной модели DBS-заказов: [Как изменяются статусы заказов](../../concepts/dbs-order-status-model.md). {% cut \"**Как подтвердить LaaS-заказ**\" %} Для подтверждения черновика заказа передайте статус `\"status\": \"PROCESSING\"` с подстатусом `\"substatus\": \"STARTED\"`. Подтверждение заказа, созданного с параметром `draft` равным `false`, не требуется. {% endcut %} {% cut \"**Как отменить LaaS-заказ**\" %} Передайте статус `\"status\": \"CANCELLED\"` с причиной отмены заказа `\"substatus\": \"SHOP_FAILED\"`. При успешном выполнении запроса отмена произойдет через некоторое время. [Как проверить статус операции](../../reference/operations/getOperations.md) {% endcut %} {% include notitle [limit](../../_auto/method_limits/updateOrderStatuses.md) %}
|
||||
* Изменение статусов нескольких заказов
|
||||
*/
|
||||
updateOrderStatusesRaw(requestParameters: LaasApiUpdateOrderStatusesOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UpdateOrderStatusesResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/updateOrderStatuses.md) %} Изменяет статусы нескольких заказов. Возможные изменения статусов: * Если магазин подтвердил и подготовил заказ к отправке, то заказ из статуса `\"status\": \"PROCESSING\"`и этапа обработки `\"substatus\": \"STARTED\"` нужно перевести в статус `\"status\": \"PROCESSING\"` и этап обработки `\"substatus\": \"READY_TO_SHIP\"`. * Если магазин подтвердил заказ, но не может его выполнить (например, товар числится в базе, но отсутствует на складе или нет нужного цвета), то заказ из статуса `\"status\": \"PROCESSING\"` и этапа обработки `\"substatus\": \"STARTED\"` нужно перевести в статус `\"status\": \"CANCELLED\"` с причиной отмены заказа `\"substatus\": \"SHOP_FAILED\"`. * Если магазин подготовил заказ к отгрузке, но не может его выполнить (например, последний товар был поврежден или оказался с браком), то заказ из статуса `\"status\": \"PROCESSING\"` и этапа обработки `\"substatus\": \"READY_TO_SHIP\"` нужно перевести в статус `\"status\": \"CANCELLED\"` с причиной отмены заказа `\"substatus\": \"SHOP_FAILED\"`. Полная информация о статусной модели DBS-заказов: [Как изменяются статусы заказов](../../concepts/dbs-order-status-model.md). {% cut \"**Как подтвердить LaaS-заказ**\" %} Для подтверждения черновика заказа передайте статус `\"status\": \"PROCESSING\"` с подстатусом `\"substatus\": \"STARTED\"`. Подтверждение заказа, созданного с параметром `draft` равным `false`, не требуется. {% endcut %} {% cut \"**Как отменить LaaS-заказ**\" %} Передайте статус `\"status\": \"CANCELLED\"` с причиной отмены заказа `\"substatus\": \"SHOP_FAILED\"`. При успешном выполнении запроса отмена произойдет через некоторое время. [Как проверить статус операции](../../reference/operations/getOperations.md) {% endcut %} {% include notitle [limit](../../_auto/method_limits/updateOrderStatuses.md) %}
|
||||
* Изменение статусов нескольких заказов
|
||||
*/
|
||||
updateOrderStatuses(campaignId: number, updateOrderStatusesRequest: UpdateOrderStatusesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UpdateOrderStatusesResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/updatePrices.md) %} Устанавливает цены на товары в магазине. Чтобы получить рекомендации Маркета, касающиеся цен, выполните запрос [POST v2/businesses/{businessId}/offers/recommendations](../../reference/offers/getOfferRecommendations.md). {% note warning \"Метод только для отдельных магазинов\" %} Вам доступен этот метод, если в кабинете продавца на Маркете есть возможность установить уникальные цены в отдельных магазинах. Как это проверить — в методе [POST v2/businesses/{businessId}/settings](../../reference/businesses/getBusinessSettings.md) в параметре `onlyDefaultPrice` возвращается значение `false`. В ином случае используйте метод управления ценами, которые действуют во всех магазинах, — [POST v2/businesses/{businessId}/offer-prices/updates](../../reference/prices/updateBusinessPrices.md). {% endnote %} {% note info \"Данные в каталоге обновляются не мгновенно\" %} Это занимает до нескольких минут. {% endnote %} {% include notitle [limit](../../_auto/method_limits/updatePrices.md) %}
|
||||
* Установка цен на товары в конкретном магазине
|
||||
*/
|
||||
updatePricesRaw(requestParameters: LaasApiUpdatePricesOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<EmptyApiResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/updatePrices.md) %} Устанавливает цены на товары в магазине. Чтобы получить рекомендации Маркета, касающиеся цен, выполните запрос [POST v2/businesses/{businessId}/offers/recommendations](../../reference/offers/getOfferRecommendations.md). {% note warning \"Метод только для отдельных магазинов\" %} Вам доступен этот метод, если в кабинете продавца на Маркете есть возможность установить уникальные цены в отдельных магазинах. Как это проверить — в методе [POST v2/businesses/{businessId}/settings](../../reference/businesses/getBusinessSettings.md) в параметре `onlyDefaultPrice` возвращается значение `false`. В ином случае используйте метод управления ценами, которые действуют во всех магазинах, — [POST v2/businesses/{businessId}/offer-prices/updates](../../reference/prices/updateBusinessPrices.md). {% endnote %} {% note info \"Данные в каталоге обновляются не мгновенно\" %} Это занимает до нескольких минут. {% endnote %} {% include notitle [limit](../../_auto/method_limits/updatePrices.md) %}
|
||||
* Установка цен на товары в конкретном магазине
|
||||
*/
|
||||
updatePrices(campaignId: number, updatePricesRequest: UpdatePricesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<EmptyApiResponse>;
|
||||
}
|
||||
2434
dist/apis/LaasApi.js
vendored
Normal file
2434
dist/apis/LaasApi.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
33
dist/apis/LogisticPointsApi.d.ts
vendored
Normal file
33
dist/apis/LogisticPointsApi.d.ts
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
/**
|
||||
* API Яндекс Маркета для продавцов
|
||||
* API Яндекс Маркета помогает продавцам автоматизировать и упростить работу с маркетплейсом. В числе возможностей интеграции: * управление каталогом товаров и витриной, * обработка заказов, * изменение настроек магазина, * получение отчетов.
|
||||
*
|
||||
* The version of the OpenAPI document: LATEST
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
import * as runtime from '../runtime';
|
||||
import type { GetLogisticPointsResponse } from '../models/index';
|
||||
export interface LogisticPointsApiGetLogisticPointsRequest {
|
||||
businessId: number;
|
||||
pageToken?: string;
|
||||
limit?: number;
|
||||
}
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export declare class LogisticPointsApi extends runtime.BaseAPI {
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getLogisticPoints.md) %} Возвращает список пунктов выдачи заказов Маркета. Регулярно запрашивайте эту информацию, чтобы в системе магазина хранить актуальные данные. Например, раз в день. {% include notitle [limit](../../_auto/method_limits/getLogisticPoints.md) %}
|
||||
* Получение точек ПВЗ Маркета
|
||||
*/
|
||||
getLogisticPointsRaw(requestParameters: LogisticPointsApiGetLogisticPointsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetLogisticPointsResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getLogisticPoints.md) %} Возвращает список пунктов выдачи заказов Маркета. Регулярно запрашивайте эту информацию, чтобы в системе магазина хранить актуальные данные. Например, раз в день. {% include notitle [limit](../../_auto/method_limits/getLogisticPoints.md) %}
|
||||
* Получение точек ПВЗ Маркета
|
||||
*/
|
||||
getLogisticPoints(businessId: number, pageToken?: string, limit?: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetLogisticPointsResponse>;
|
||||
}
|
||||
76
dist/apis/LogisticPointsApi.js
vendored
Normal file
76
dist/apis/LogisticPointsApi.js
vendored
Normal file
@@ -0,0 +1,76 @@
|
||||
"use strict";
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* API Яндекс Маркета для продавцов
|
||||
* API Яндекс Маркета помогает продавцам автоматизировать и упростить работу с маркетплейсом. В числе возможностей интеграции: * управление каталогом товаров и витриной, * обработка заказов, * изменение настроек магазина, * получение отчетов.
|
||||
*
|
||||
* The version of the OpenAPI document: LATEST
|
||||
*
|
||||
*
|
||||
* 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.LogisticPointsApi = void 0;
|
||||
const runtime = require("../runtime");
|
||||
const index_1 = require("../models/index");
|
||||
/**
|
||||
*
|
||||
*/
|
||||
class LogisticPointsApi extends runtime.BaseAPI {
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getLogisticPoints.md) %} Возвращает список пунктов выдачи заказов Маркета. Регулярно запрашивайте эту информацию, чтобы в системе магазина хранить актуальные данные. Например, раз в день. {% include notitle [limit](../../_auto/method_limits/getLogisticPoints.md) %}
|
||||
* Получение точек ПВЗ Маркета
|
||||
*/
|
||||
getLogisticPointsRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['businessId'] == null) {
|
||||
throw new runtime.RequiredError('businessId', 'Required parameter "businessId" was null or undefined when calling getLogisticPoints().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
if (requestParameters['pageToken'] != null) {
|
||||
queryParameters['pageToken'] = requestParameters['pageToken'];
|
||||
}
|
||||
if (requestParameters['limit'] != null) {
|
||||
queryParameters['limit'] = requestParameters['limit'];
|
||||
}
|
||||
const headerParameters = {};
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v1/businesses/{businessId}/logistics-points`.replace(`{${"businessId"}}`, encodeURIComponent(String(requestParameters['businessId']))),
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.GetLogisticPointsResponseFromJSON)(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getLogisticPoints.md) %} Возвращает список пунктов выдачи заказов Маркета. Регулярно запрашивайте эту информацию, чтобы в системе магазина хранить актуальные данные. Например, раз в день. {% include notitle [limit](../../_auto/method_limits/getLogisticPoints.md) %}
|
||||
* Получение точек ПВЗ Маркета
|
||||
*/
|
||||
getLogisticPoints(businessId, pageToken, limit, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.getLogisticPointsRaw({ businessId: businessId, pageToken: pageToken, limit: limit }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
}
|
||||
exports.LogisticPointsApi = LogisticPointsApi;
|
||||
78
dist/apis/OffersApi.d.ts
vendored
Normal file
78
dist/apis/OffersApi.d.ts
vendored
Normal file
@@ -0,0 +1,78 @@
|
||||
/**
|
||||
* API Яндекс Маркета для продавцов
|
||||
* API Яндекс Маркета помогает продавцам автоматизировать и упростить работу с маркетплейсом. В числе возможностей интеграции: * управление каталогом товаров и витриной, * обработка заказов, * изменение настроек магазина, * получение отчетов.
|
||||
*
|
||||
* The version of the OpenAPI document: LATEST
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
import * as runtime from '../runtime';
|
||||
import type { DeleteCampaignOffersRequest, DeleteCampaignOffersResponse, EmptyApiResponse, GetCampaignOffersRequest, GetCampaignOffersResponse, GetOfferRecommendationsRequest, GetOfferRecommendationsResponse, UpdateCampaignOffersRequest } from '../models/index';
|
||||
export interface OffersApiDeleteCampaignOffersOperationRequest {
|
||||
campaignId: number;
|
||||
deleteCampaignOffersRequest: DeleteCampaignOffersRequest;
|
||||
}
|
||||
export interface OffersApiGetCampaignOffersOperationRequest {
|
||||
campaignId: number;
|
||||
getCampaignOffersRequest: GetCampaignOffersRequest;
|
||||
pageToken?: string;
|
||||
limit?: number;
|
||||
}
|
||||
export interface OffersApiGetOfferRecommendationsOperationRequest {
|
||||
businessId: number;
|
||||
getOfferRecommendationsRequest: GetOfferRecommendationsRequest;
|
||||
pageToken?: string;
|
||||
limit?: number;
|
||||
}
|
||||
export interface OffersApiUpdateCampaignOffersOperationRequest {
|
||||
campaignId: number;
|
||||
updateCampaignOffersRequest: UpdateCampaignOffersRequest;
|
||||
}
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export declare class OffersApi extends runtime.BaseAPI {
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/deleteCampaignOffers.md) %} Удаляет заданные товары из заданного магазина. {% note warning \"Запрос удаляет товары из конкретного магазина\" %} На продажи в других магазинах и на наличие товара в общем каталоге он не влияет. {% endnote %} Товар не получится удалить, если он хранится на складах Маркета. {% include notitle [limit](../../_auto/method_limits/deleteCampaignOffers.md) %}
|
||||
* Удаление товаров из ассортимента магазина
|
||||
*/
|
||||
deleteCampaignOffersRaw(requestParameters: OffersApiDeleteCampaignOffersOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DeleteCampaignOffersResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/deleteCampaignOffers.md) %} Удаляет заданные товары из заданного магазина. {% note warning \"Запрос удаляет товары из конкретного магазина\" %} На продажи в других магазинах и на наличие товара в общем каталоге он не влияет. {% endnote %} Товар не получится удалить, если он хранится на складах Маркета. {% include notitle [limit](../../_auto/method_limits/deleteCampaignOffers.md) %}
|
||||
* Удаление товаров из ассортимента магазина
|
||||
*/
|
||||
deleteCampaignOffers(campaignId: number, deleteCampaignOffersRequest: DeleteCampaignOffersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DeleteCampaignOffersResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getCampaignOffers.md) %} Возвращает список товаров, которые размещены в заданном магазине. Для каждого товара указываются параметры размещения. {% include notitle [limit](../../_auto/method_limits/getCampaignOffers.md) %}
|
||||
* Информация о товарах, которые размещены в заданном магазине
|
||||
*/
|
||||
getCampaignOffersRaw(requestParameters: OffersApiGetCampaignOffersOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetCampaignOffersResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getCampaignOffers.md) %} Возвращает список товаров, которые размещены в заданном магазине. Для каждого товара указываются параметры размещения. {% include notitle [limit](../../_auto/method_limits/getCampaignOffers.md) %}
|
||||
* Информация о товарах, которые размещены в заданном магазине
|
||||
*/
|
||||
getCampaignOffers(campaignId: number, getCampaignOffersRequest: GetCampaignOffersRequest, pageToken?: string, limit?: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetCampaignOffersResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getOfferRecommendations.md) %} Метод возвращает рекомендации нескольких типов. 1. Порог для привлекательной цены. 2. Оценка привлекательности цен на витрине. Рекомендации показывают, какие цены нужно установить, чтобы привлечь покупателя. В запросе можно использовать фильтры. Результаты возвращаются постранично. {% include notitle [limit](../../_auto/method_limits/getOfferRecommendations.md) %}
|
||||
* Рекомендации Маркета, касающиеся цен
|
||||
*/
|
||||
getOfferRecommendationsRaw(requestParameters: OffersApiGetOfferRecommendationsOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetOfferRecommendationsResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getOfferRecommendations.md) %} Метод возвращает рекомендации нескольких типов. 1. Порог для привлекательной цены. 2. Оценка привлекательности цен на витрине. Рекомендации показывают, какие цены нужно установить, чтобы привлечь покупателя. В запросе можно использовать фильтры. Результаты возвращаются постранично. {% include notitle [limit](../../_auto/method_limits/getOfferRecommendations.md) %}
|
||||
* Рекомендации Маркета, касающиеся цен
|
||||
*/
|
||||
getOfferRecommendations(businessId: number, getOfferRecommendationsRequest: GetOfferRecommendationsRequest, pageToken?: string, limit?: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetOfferRecommendationsResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/updateCampaignOffers.md) %} Изменяет параметры размещения товаров в конкретном магазине: доступность товара и применяемый НДС. {% include notitle [limit](../../_auto/method_limits/updateCampaignOffers.md) %}
|
||||
* Изменение условий продажи товаров в магазине
|
||||
*/
|
||||
updateCampaignOffersRaw(requestParameters: OffersApiUpdateCampaignOffersOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<EmptyApiResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/updateCampaignOffers.md) %} Изменяет параметры размещения товаров в конкретном магазине: доступность товара и применяемый НДС. {% include notitle [limit](../../_auto/method_limits/updateCampaignOffers.md) %}
|
||||
* Изменение условий продажи товаров в магазине
|
||||
*/
|
||||
updateCampaignOffers(campaignId: number, updateCampaignOffersRequest: UpdateCampaignOffersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<EmptyApiResponse>;
|
||||
}
|
||||
213
dist/apis/OffersApi.js
vendored
Normal file
213
dist/apis/OffersApi.js
vendored
Normal file
@@ -0,0 +1,213 @@
|
||||
"use strict";
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* API Яндекс Маркета для продавцов
|
||||
* API Яндекс Маркета помогает продавцам автоматизировать и упростить работу с маркетплейсом. В числе возможностей интеграции: * управление каталогом товаров и витриной, * обработка заказов, * изменение настроек магазина, * получение отчетов.
|
||||
*
|
||||
* The version of the OpenAPI document: LATEST
|
||||
*
|
||||
*
|
||||
* 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.OffersApi = void 0;
|
||||
const runtime = require("../runtime");
|
||||
const index_1 = require("../models/index");
|
||||
/**
|
||||
*
|
||||
*/
|
||||
class OffersApi extends runtime.BaseAPI {
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/deleteCampaignOffers.md) %} Удаляет заданные товары из заданного магазина. {% note warning \"Запрос удаляет товары из конкретного магазина\" %} На продажи в других магазинах и на наличие товара в общем каталоге он не влияет. {% endnote %} Товар не получится удалить, если он хранится на складах Маркета. {% include notitle [limit](../../_auto/method_limits/deleteCampaignOffers.md) %}
|
||||
* Удаление товаров из ассортимента магазина
|
||||
*/
|
||||
deleteCampaignOffersRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['campaignId'] == null) {
|
||||
throw new runtime.RequiredError('campaignId', 'Required parameter "campaignId" was null or undefined when calling deleteCampaignOffers().');
|
||||
}
|
||||
if (requestParameters['deleteCampaignOffersRequest'] == null) {
|
||||
throw new runtime.RequiredError('deleteCampaignOffersRequest', 'Required parameter "deleteCampaignOffersRequest" was null or undefined when calling deleteCampaignOffers().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
const headerParameters = {};
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v2/campaigns/{campaignId}/offers/delete`.replace(`{${"campaignId"}}`, encodeURIComponent(String(requestParameters['campaignId']))),
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: (0, index_1.DeleteCampaignOffersRequestToJSON)(requestParameters['deleteCampaignOffersRequest']),
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.DeleteCampaignOffersResponseFromJSON)(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/deleteCampaignOffers.md) %} Удаляет заданные товары из заданного магазина. {% note warning \"Запрос удаляет товары из конкретного магазина\" %} На продажи в других магазинах и на наличие товара в общем каталоге он не влияет. {% endnote %} Товар не получится удалить, если он хранится на складах Маркета. {% include notitle [limit](../../_auto/method_limits/deleteCampaignOffers.md) %}
|
||||
* Удаление товаров из ассортимента магазина
|
||||
*/
|
||||
deleteCampaignOffers(campaignId, deleteCampaignOffersRequest, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.deleteCampaignOffersRaw({ campaignId: campaignId, deleteCampaignOffersRequest: deleteCampaignOffersRequest }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getCampaignOffers.md) %} Возвращает список товаров, которые размещены в заданном магазине. Для каждого товара указываются параметры размещения. {% include notitle [limit](../../_auto/method_limits/getCampaignOffers.md) %}
|
||||
* Информация о товарах, которые размещены в заданном магазине
|
||||
*/
|
||||
getCampaignOffersRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['campaignId'] == null) {
|
||||
throw new runtime.RequiredError('campaignId', 'Required parameter "campaignId" was null or undefined when calling getCampaignOffers().');
|
||||
}
|
||||
if (requestParameters['getCampaignOffersRequest'] == null) {
|
||||
throw new runtime.RequiredError('getCampaignOffersRequest', 'Required parameter "getCampaignOffersRequest" was null or undefined when calling getCampaignOffers().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
if (requestParameters['pageToken'] != null) {
|
||||
queryParameters['pageToken'] = requestParameters['pageToken'];
|
||||
}
|
||||
if (requestParameters['limit'] != null) {
|
||||
queryParameters['limit'] = requestParameters['limit'];
|
||||
}
|
||||
const headerParameters = {};
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v2/campaigns/{campaignId}/offers`.replace(`{${"campaignId"}}`, encodeURIComponent(String(requestParameters['campaignId']))),
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: (0, index_1.GetCampaignOffersRequestToJSON)(requestParameters['getCampaignOffersRequest']),
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.GetCampaignOffersResponseFromJSON)(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getCampaignOffers.md) %} Возвращает список товаров, которые размещены в заданном магазине. Для каждого товара указываются параметры размещения. {% include notitle [limit](../../_auto/method_limits/getCampaignOffers.md) %}
|
||||
* Информация о товарах, которые размещены в заданном магазине
|
||||
*/
|
||||
getCampaignOffers(campaignId, getCampaignOffersRequest, pageToken, limit, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.getCampaignOffersRaw({ campaignId: campaignId, getCampaignOffersRequest: getCampaignOffersRequest, pageToken: pageToken, limit: limit }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getOfferRecommendations.md) %} Метод возвращает рекомендации нескольких типов. 1. Порог для привлекательной цены. 2. Оценка привлекательности цен на витрине. Рекомендации показывают, какие цены нужно установить, чтобы привлечь покупателя. В запросе можно использовать фильтры. Результаты возвращаются постранично. {% include notitle [limit](../../_auto/method_limits/getOfferRecommendations.md) %}
|
||||
* Рекомендации Маркета, касающиеся цен
|
||||
*/
|
||||
getOfferRecommendationsRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['businessId'] == null) {
|
||||
throw new runtime.RequiredError('businessId', 'Required parameter "businessId" was null or undefined when calling getOfferRecommendations().');
|
||||
}
|
||||
if (requestParameters['getOfferRecommendationsRequest'] == null) {
|
||||
throw new runtime.RequiredError('getOfferRecommendationsRequest', 'Required parameter "getOfferRecommendationsRequest" was null or undefined when calling getOfferRecommendations().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
if (requestParameters['pageToken'] != null) {
|
||||
queryParameters['pageToken'] = requestParameters['pageToken'];
|
||||
}
|
||||
if (requestParameters['limit'] != null) {
|
||||
queryParameters['limit'] = requestParameters['limit'];
|
||||
}
|
||||
const headerParameters = {};
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v2/businesses/{businessId}/offers/recommendations`.replace(`{${"businessId"}}`, encodeURIComponent(String(requestParameters['businessId']))),
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: (0, index_1.GetOfferRecommendationsRequestToJSON)(requestParameters['getOfferRecommendationsRequest']),
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.GetOfferRecommendationsResponseFromJSON)(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getOfferRecommendations.md) %} Метод возвращает рекомендации нескольких типов. 1. Порог для привлекательной цены. 2. Оценка привлекательности цен на витрине. Рекомендации показывают, какие цены нужно установить, чтобы привлечь покупателя. В запросе можно использовать фильтры. Результаты возвращаются постранично. {% include notitle [limit](../../_auto/method_limits/getOfferRecommendations.md) %}
|
||||
* Рекомендации Маркета, касающиеся цен
|
||||
*/
|
||||
getOfferRecommendations(businessId, getOfferRecommendationsRequest, pageToken, limit, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.getOfferRecommendationsRaw({ businessId: businessId, getOfferRecommendationsRequest: getOfferRecommendationsRequest, pageToken: pageToken, limit: limit }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/updateCampaignOffers.md) %} Изменяет параметры размещения товаров в конкретном магазине: доступность товара и применяемый НДС. {% include notitle [limit](../../_auto/method_limits/updateCampaignOffers.md) %}
|
||||
* Изменение условий продажи товаров в магазине
|
||||
*/
|
||||
updateCampaignOffersRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['campaignId'] == null) {
|
||||
throw new runtime.RequiredError('campaignId', 'Required parameter "campaignId" was null or undefined when calling updateCampaignOffers().');
|
||||
}
|
||||
if (requestParameters['updateCampaignOffersRequest'] == null) {
|
||||
throw new runtime.RequiredError('updateCampaignOffersRequest', 'Required parameter "updateCampaignOffersRequest" was null or undefined when calling updateCampaignOffers().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
const headerParameters = {};
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v2/campaigns/{campaignId}/offers/update`.replace(`{${"campaignId"}}`, encodeURIComponent(String(requestParameters['campaignId']))),
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: (0, index_1.UpdateCampaignOffersRequestToJSON)(requestParameters['updateCampaignOffersRequest']),
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.EmptyApiResponseFromJSON)(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/updateCampaignOffers.md) %} Изменяет параметры размещения товаров в конкретном магазине: доступность товара и применяемый НДС. {% include notitle [limit](../../_auto/method_limits/updateCampaignOffers.md) %}
|
||||
* Изменение условий продажи товаров в магазине
|
||||
*/
|
||||
updateCampaignOffers(campaignId, updateCampaignOffersRequest, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.updateCampaignOffersRaw({ campaignId: campaignId, updateCampaignOffersRequest: updateCampaignOffersRequest }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
}
|
||||
exports.OffersApi = OffersApi;
|
||||
32
dist/apis/OperationsApi.d.ts
vendored
Normal file
32
dist/apis/OperationsApi.d.ts
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
/**
|
||||
* API Яндекс Маркета для продавцов
|
||||
* API Яндекс Маркета помогает продавцам автоматизировать и упростить работу с маркетплейсом. В числе возможностей интеграции: * управление каталогом товаров и витриной, * обработка заказов, * изменение настроек магазина, * получение отчетов.
|
||||
*
|
||||
* The version of the OpenAPI document: LATEST
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
import * as runtime from '../runtime';
|
||||
import type { GetOperationsRequest, GetOperationsResponse } from '../models/index';
|
||||
export interface OperationsApiGetOperationsOperationRequest {
|
||||
businessId: number;
|
||||
getOperationsRequest: GetOperationsRequest;
|
||||
}
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export declare class OperationsApi extends runtime.BaseAPI {
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getOperations.md) %} Возвращает статусы запущенных операций по их идентификаторам. {% include notitle [limit](../../_auto/method_limits/getOperations.md) %}
|
||||
* Получение статусов операций
|
||||
*/
|
||||
getOperationsRaw(requestParameters: OperationsApiGetOperationsOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetOperationsResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getOperations.md) %} Возвращает статусы запущенных операций по их идентификаторам. {% include notitle [limit](../../_auto/method_limits/getOperations.md) %}
|
||||
* Получение статусов операций
|
||||
*/
|
||||
getOperations(businessId: number, getOperationsRequest: GetOperationsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetOperationsResponse>;
|
||||
}
|
||||
75
dist/apis/OperationsApi.js
vendored
Normal file
75
dist/apis/OperationsApi.js
vendored
Normal file
@@ -0,0 +1,75 @@
|
||||
"use strict";
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* API Яндекс Маркета для продавцов
|
||||
* API Яндекс Маркета помогает продавцам автоматизировать и упростить работу с маркетплейсом. В числе возможностей интеграции: * управление каталогом товаров и витриной, * обработка заказов, * изменение настроек магазина, * получение отчетов.
|
||||
*
|
||||
* The version of the OpenAPI document: LATEST
|
||||
*
|
||||
*
|
||||
* 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.OperationsApi = void 0;
|
||||
const runtime = require("../runtime");
|
||||
const index_1 = require("../models/index");
|
||||
/**
|
||||
*
|
||||
*/
|
||||
class OperationsApi extends runtime.BaseAPI {
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getOperations.md) %} Возвращает статусы запущенных операций по их идентификаторам. {% include notitle [limit](../../_auto/method_limits/getOperations.md) %}
|
||||
* Получение статусов операций
|
||||
*/
|
||||
getOperationsRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['businessId'] == null) {
|
||||
throw new runtime.RequiredError('businessId', 'Required parameter "businessId" was null or undefined when calling getOperations().');
|
||||
}
|
||||
if (requestParameters['getOperationsRequest'] == null) {
|
||||
throw new runtime.RequiredError('getOperationsRequest', 'Required parameter "getOperationsRequest" was null or undefined when calling getOperations().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
const headerParameters = {};
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v1/businesses/{businessId}/operations`.replace(`{${"businessId"}}`, encodeURIComponent(String(requestParameters['businessId']))),
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: (0, index_1.GetOperationsRequestToJSON)(requestParameters['getOperationsRequest']),
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.GetOperationsResponseFromJSON)(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getOperations.md) %} Возвращает статусы запущенных операций по их идентификаторам. {% include notitle [limit](../../_auto/method_limits/getOperations.md) %}
|
||||
* Получение статусов операций
|
||||
*/
|
||||
getOperations(businessId, getOperationsRequest, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.getOperationsRaw({ businessId: businessId, getOperationsRequest: getOperationsRequest }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
}
|
||||
exports.OperationsApi = OperationsApi;
|
||||
46
dist/apis/OrderBusinessInformationApi.d.ts
vendored
Normal file
46
dist/apis/OrderBusinessInformationApi.d.ts
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
/**
|
||||
* API Яндекс Маркета для продавцов
|
||||
* API Яндекс Маркета помогает продавцам автоматизировать и упростить работу с маркетплейсом. В числе возможностей интеграции: * управление каталогом товаров и витриной, * обработка заказов, * изменение настроек магазина, * получение отчетов.
|
||||
*
|
||||
* The version of the OpenAPI document: LATEST
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
import * as runtime from '../runtime';
|
||||
import type { GetBusinessBuyerInfoResponse, GetBusinessDocumentsInfoResponse } from '../models/index';
|
||||
export interface OrderBusinessInformationApiGetOrderBusinessBuyerInfoRequest {
|
||||
campaignId: number;
|
||||
orderId: number;
|
||||
}
|
||||
export interface OrderBusinessInformationApiGetOrderBusinessDocumentsInfoRequest {
|
||||
campaignId: number;
|
||||
orderId: number;
|
||||
}
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export declare class OrderBusinessInformationApi extends runtime.BaseAPI {
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getOrderBusinessBuyerInfo.md) %} Возвращает информацию о покупателе по идентификатору заказа. {% note info \"Как получить информацию о покупателе, который является физическим лицом\" %} Воспользуйтесь запросом [GET v2/campaigns/{campaignId}/orders/{orderId}/buyer](../../reference/order-delivery/getOrderBuyerInfo.md). {% endnote %} Получить данные можно, только если заказ находится в статусе `PROCESSING`, `DELIVERY`, `PICKUP` или `DELIVERED`. {% include notitle [limit](../../_auto/method_limits/getOrderBusinessBuyerInfo.md) %}
|
||||
* Информация о покупателе — юридическом лице
|
||||
*/
|
||||
getOrderBusinessBuyerInfoRaw(requestParameters: OrderBusinessInformationApiGetOrderBusinessBuyerInfoRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetBusinessBuyerInfoResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getOrderBusinessBuyerInfo.md) %} Возвращает информацию о покупателе по идентификатору заказа. {% note info \"Как получить информацию о покупателе, который является физическим лицом\" %} Воспользуйтесь запросом [GET v2/campaigns/{campaignId}/orders/{orderId}/buyer](../../reference/order-delivery/getOrderBuyerInfo.md). {% endnote %} Получить данные можно, только если заказ находится в статусе `PROCESSING`, `DELIVERY`, `PICKUP` или `DELIVERED`. {% include notitle [limit](../../_auto/method_limits/getOrderBusinessBuyerInfo.md) %}
|
||||
* Информация о покупателе — юридическом лице
|
||||
*/
|
||||
getOrderBusinessBuyerInfo(campaignId: number, orderId: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetBusinessBuyerInfoResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getOrderBusinessDocumentsInfo.md) %} Возвращает информацию о документах по идентификатору заказа. Получить данные можно после того, как заказ перейдет в статус `DELIVERED`. {% include notitle [limit](../../_auto/method_limits/getOrderBusinessDocumentsInfo.md) %}
|
||||
* Информация о документах
|
||||
*/
|
||||
getOrderBusinessDocumentsInfoRaw(requestParameters: OrderBusinessInformationApiGetOrderBusinessDocumentsInfoRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetBusinessDocumentsInfoResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getOrderBusinessDocumentsInfo.md) %} Возвращает информацию о документах по идентификатору заказа. Получить данные можно после того, как заказ перейдет в статус `DELIVERED`. {% include notitle [limit](../../_auto/method_limits/getOrderBusinessDocumentsInfo.md) %}
|
||||
* Информация о документах
|
||||
*/
|
||||
getOrderBusinessDocumentsInfo(campaignId: number, orderId: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetBusinessDocumentsInfoResponse>;
|
||||
}
|
||||
113
dist/apis/OrderBusinessInformationApi.js
vendored
Normal file
113
dist/apis/OrderBusinessInformationApi.js
vendored
Normal file
@@ -0,0 +1,113 @@
|
||||
"use strict";
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* API Яндекс Маркета для продавцов
|
||||
* API Яндекс Маркета помогает продавцам автоматизировать и упростить работу с маркетплейсом. В числе возможностей интеграции: * управление каталогом товаров и витриной, * обработка заказов, * изменение настроек магазина, * получение отчетов.
|
||||
*
|
||||
* The version of the OpenAPI document: LATEST
|
||||
*
|
||||
*
|
||||
* 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.OrderBusinessInformationApi = void 0;
|
||||
const runtime = require("../runtime");
|
||||
const index_1 = require("../models/index");
|
||||
/**
|
||||
*
|
||||
*/
|
||||
class OrderBusinessInformationApi extends runtime.BaseAPI {
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getOrderBusinessBuyerInfo.md) %} Возвращает информацию о покупателе по идентификатору заказа. {% note info \"Как получить информацию о покупателе, который является физическим лицом\" %} Воспользуйтесь запросом [GET v2/campaigns/{campaignId}/orders/{orderId}/buyer](../../reference/order-delivery/getOrderBuyerInfo.md). {% endnote %} Получить данные можно, только если заказ находится в статусе `PROCESSING`, `DELIVERY`, `PICKUP` или `DELIVERED`. {% include notitle [limit](../../_auto/method_limits/getOrderBusinessBuyerInfo.md) %}
|
||||
* Информация о покупателе — юридическом лице
|
||||
*/
|
||||
getOrderBusinessBuyerInfoRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['campaignId'] == null) {
|
||||
throw new runtime.RequiredError('campaignId', 'Required parameter "campaignId" was null or undefined when calling getOrderBusinessBuyerInfo().');
|
||||
}
|
||||
if (requestParameters['orderId'] == null) {
|
||||
throw new runtime.RequiredError('orderId', 'Required parameter "orderId" was null or undefined when calling getOrderBusinessBuyerInfo().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
const headerParameters = {};
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v2/campaigns/{campaignId}/orders/{orderId}/business-buyer`.replace(`{${"campaignId"}}`, encodeURIComponent(String(requestParameters['campaignId']))).replace(`{${"orderId"}}`, encodeURIComponent(String(requestParameters['orderId']))),
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.GetBusinessBuyerInfoResponseFromJSON)(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getOrderBusinessBuyerInfo.md) %} Возвращает информацию о покупателе по идентификатору заказа. {% note info \"Как получить информацию о покупателе, который является физическим лицом\" %} Воспользуйтесь запросом [GET v2/campaigns/{campaignId}/orders/{orderId}/buyer](../../reference/order-delivery/getOrderBuyerInfo.md). {% endnote %} Получить данные можно, только если заказ находится в статусе `PROCESSING`, `DELIVERY`, `PICKUP` или `DELIVERED`. {% include notitle [limit](../../_auto/method_limits/getOrderBusinessBuyerInfo.md) %}
|
||||
* Информация о покупателе — юридическом лице
|
||||
*/
|
||||
getOrderBusinessBuyerInfo(campaignId, orderId, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.getOrderBusinessBuyerInfoRaw({ campaignId: campaignId, orderId: orderId }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getOrderBusinessDocumentsInfo.md) %} Возвращает информацию о документах по идентификатору заказа. Получить данные можно после того, как заказ перейдет в статус `DELIVERED`. {% include notitle [limit](../../_auto/method_limits/getOrderBusinessDocumentsInfo.md) %}
|
||||
* Информация о документах
|
||||
*/
|
||||
getOrderBusinessDocumentsInfoRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['campaignId'] == null) {
|
||||
throw new runtime.RequiredError('campaignId', 'Required parameter "campaignId" was null or undefined when calling getOrderBusinessDocumentsInfo().');
|
||||
}
|
||||
if (requestParameters['orderId'] == null) {
|
||||
throw new runtime.RequiredError('orderId', 'Required parameter "orderId" was null or undefined when calling getOrderBusinessDocumentsInfo().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
const headerParameters = {};
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v2/campaigns/{campaignId}/orders/{orderId}/documents`.replace(`{${"campaignId"}}`, encodeURIComponent(String(requestParameters['campaignId']))).replace(`{${"orderId"}}`, encodeURIComponent(String(requestParameters['orderId']))),
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.GetBusinessDocumentsInfoResponseFromJSON)(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getOrderBusinessDocumentsInfo.md) %} Возвращает информацию о документах по идентификатору заказа. Получить данные можно после того, как заказ перейдет в статус `DELIVERED`. {% include notitle [limit](../../_auto/method_limits/getOrderBusinessDocumentsInfo.md) %}
|
||||
* Информация о документах
|
||||
*/
|
||||
getOrderBusinessDocumentsInfo(campaignId, orderId, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.getOrderBusinessDocumentsInfoRaw({ campaignId: campaignId, orderId: orderId }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
}
|
||||
exports.OrderBusinessInformationApi = OrderBusinessInformationApi;
|
||||
92
dist/apis/OrderDeliveryApi.d.ts
vendored
Normal file
92
dist/apis/OrderDeliveryApi.d.ts
vendored
Normal file
@@ -0,0 +1,92 @@
|
||||
/**
|
||||
* API Яндекс Маркета для продавцов
|
||||
* API Яндекс Маркета помогает продавцам автоматизировать и упростить работу с маркетплейсом. В числе возможностей интеграции: * управление каталогом товаров и витриной, * обработка заказов, * изменение настроек магазина, * получение отчетов.
|
||||
*
|
||||
* The version of the OpenAPI document: LATEST
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
import * as runtime from '../runtime';
|
||||
import type { EmptyApiResponse, GetOrderBuyerInfoResponse, SetOrderDeliveryDateRequest, SetOrderDeliveryTrackCodeRequest, UpdateOrderStorageLimitRequest, VerifyOrderEacRequest, VerifyOrderEacResponse } from '../models/index';
|
||||
export interface OrderDeliveryApiGetOrderBuyerInfoRequest {
|
||||
campaignId: number;
|
||||
orderId: number;
|
||||
}
|
||||
export interface OrderDeliveryApiSetOrderDeliveryDateOperationRequest {
|
||||
campaignId: number;
|
||||
orderId: number;
|
||||
setOrderDeliveryDateRequest: SetOrderDeliveryDateRequest;
|
||||
}
|
||||
export interface OrderDeliveryApiSetOrderDeliveryTrackCodeOperationRequest {
|
||||
campaignId: number;
|
||||
orderId: number;
|
||||
setOrderDeliveryTrackCodeRequest: SetOrderDeliveryTrackCodeRequest;
|
||||
}
|
||||
export interface OrderDeliveryApiUpdateOrderStorageLimitOperationRequest {
|
||||
campaignId: number;
|
||||
orderId: number;
|
||||
updateOrderStorageLimitRequest: UpdateOrderStorageLimitRequest;
|
||||
}
|
||||
export interface OrderDeliveryApiVerifyOrderEacOperationRequest {
|
||||
campaignId: number;
|
||||
orderId: number;
|
||||
verifyOrderEacRequest: VerifyOrderEacRequest;
|
||||
}
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export declare class OrderDeliveryApi extends runtime.BaseAPI {
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getOrderBuyerInfo.md) %} Возвращает информацию о покупателе по идентификатору заказа. {% note info \"Как получить информацию о покупателе, который является юридическим лицом\" %} Воспользуйтесь запросом [POST v2/campaigns/{campaignId}/orders/{orderId}/business-buyer](../../reference/order-business-information/getOrderBusinessBuyerInfo.md). {% endnote %} Получить данные можно, только если заказ находится в статусе `PROCESSING`, `DELIVERY` или `PICKUP`. {% include notitle [limit](../../_auto/method_limits/getOrderBuyerInfo.md) %}
|
||||
* Информация о покупателе — физическом лице
|
||||
*/
|
||||
getOrderBuyerInfoRaw(requestParameters: OrderDeliveryApiGetOrderBuyerInfoRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetOrderBuyerInfoResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getOrderBuyerInfo.md) %} Возвращает информацию о покупателе по идентификатору заказа. {% note info \"Как получить информацию о покупателе, который является юридическим лицом\" %} Воспользуйтесь запросом [POST v2/campaigns/{campaignId}/orders/{orderId}/business-buyer](../../reference/order-business-information/getOrderBusinessBuyerInfo.md). {% endnote %} Получить данные можно, только если заказ находится в статусе `PROCESSING`, `DELIVERY` или `PICKUP`. {% include notitle [limit](../../_auto/method_limits/getOrderBuyerInfo.md) %}
|
||||
* Информация о покупателе — физическом лице
|
||||
*/
|
||||
getOrderBuyerInfo(campaignId: number, orderId: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetOrderBuyerInfoResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/setOrderDeliveryDate.md) %} Метод изменяет дату доставки заказа в статусе `PROCESSING` или `DELIVERY`. Для заказов с другими статусами дату доставки изменить нельзя. {% include notitle [limit](../../_auto/method_limits/setOrderDeliveryDate.md) %}
|
||||
* Изменение даты доставки заказа
|
||||
*/
|
||||
setOrderDeliveryDateRaw(requestParameters: OrderDeliveryApiSetOrderDeliveryDateOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<EmptyApiResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/setOrderDeliveryDate.md) %} Метод изменяет дату доставки заказа в статусе `PROCESSING` или `DELIVERY`. Для заказов с другими статусами дату доставки изменить нельзя. {% include notitle [limit](../../_auto/method_limits/setOrderDeliveryDate.md) %}
|
||||
* Изменение даты доставки заказа
|
||||
*/
|
||||
setOrderDeliveryDate(campaignId: number, orderId: number, setOrderDeliveryDateRequest: SetOrderDeliveryDateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<EmptyApiResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/setOrderDeliveryTrackCode.md) %} Передает Маркету трек‑номер, по которому покупатель может отследить посылку со своим заказом через службу доставки. Если покупатели смогут узнать, на каком этапе доставки находятся их заказы, доверие покупателей к вашему магазину может возрасти. Передать трек‑номер можно, только если заказ находится в статусе `PROCESSING`, `DELIVERY` или `PICKUP`. {% include notitle [limit](../../_auto/method_limits/setOrderDeliveryTrackCode.md) %}
|
||||
* Передача трек‑номера посылки
|
||||
*/
|
||||
setOrderDeliveryTrackCodeRaw(requestParameters: OrderDeliveryApiSetOrderDeliveryTrackCodeOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<EmptyApiResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/setOrderDeliveryTrackCode.md) %} Передает Маркету трек‑номер, по которому покупатель может отследить посылку со своим заказом через службу доставки. Если покупатели смогут узнать, на каком этапе доставки находятся их заказы, доверие покупателей к вашему магазину может возрасти. Передать трек‑номер можно, только если заказ находится в статусе `PROCESSING`, `DELIVERY` или `PICKUP`. {% include notitle [limit](../../_auto/method_limits/setOrderDeliveryTrackCode.md) %}
|
||||
* Передача трек‑номера посылки
|
||||
*/
|
||||
setOrderDeliveryTrackCode(campaignId: number, orderId: number, setOrderDeliveryTrackCodeRequest: SetOrderDeliveryTrackCodeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<EmptyApiResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/updateOrderStorageLimit.md) %} Продлевает срок хранения заказа в пункте выдачи продавца. Заказ должен быть в статусе `PICKUP`. Продлить срок можно только один раз, не больше чем на 30 дней. Новый срок хранения можно получить в параметре `outletStorageLimitDate` в ответе метода [POST v1/businesses/{businessId}/orders](../../reference/orders/getBusinessOrders.md). {% include notitle [limit](../../_auto/method_limits/updateOrderStorageLimit.md) %}
|
||||
* Продление срока хранения заказа
|
||||
*/
|
||||
updateOrderStorageLimitRaw(requestParameters: OrderDeliveryApiUpdateOrderStorageLimitOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<EmptyApiResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/updateOrderStorageLimit.md) %} Продлевает срок хранения заказа в пункте выдачи продавца. Заказ должен быть в статусе `PICKUP`. Продлить срок можно только один раз, не больше чем на 30 дней. Новый срок хранения можно получить в параметре `outletStorageLimitDate` в ответе метода [POST v1/businesses/{businessId}/orders](../../reference/orders/getBusinessOrders.md). {% include notitle [limit](../../_auto/method_limits/updateOrderStorageLimit.md) %}
|
||||
* Продление срока хранения заказа
|
||||
*/
|
||||
updateOrderStorageLimit(campaignId: number, orderId: number, updateOrderStorageLimitRequest: UpdateOrderStorageLimitRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<EmptyApiResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/verifyOrderEac.md) %} Отправляет Маркету код подтверждения для его проверки. **Если у магазина настроена работа с кодами подтверждения:** В параметре `delivery`, вложенном в `order`, возвращается параметр `eacType` с типом `Enum` (тип кода подтверждения для передачи заказа) в методах: * [POST v1/businesses/{businessId}/orders](../../reference/orders/getBusinessOrders.md); * [PUT v2/campaigns/{campaignId}/orders/{orderId}/status](../../reference/orders/updateOrderStatus.md). Возможные значения: * `MERCHANT_TO_COURIER` (временно не возвращается) — продавец передает код курьеру для получения невыкупа; * `COURIER_TO_MERCHANT` — курьер передает код продавцу для получения заказа. Параметр `eacType` возвращается при статусах заказа `COURIER_FOUND`, `COURIER_ARRIVED_TO_SENDER` и `DELIVERY_SERVICE_UNDELIVERED`. Если заказ в других статусах, параметр может отсутствовать. {% include notitle [limit](../../_auto/method_limits/verifyOrderEac.md) %}
|
||||
* Передача кода подтверждения
|
||||
*/
|
||||
verifyOrderEacRaw(requestParameters: OrderDeliveryApiVerifyOrderEacOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<VerifyOrderEacResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/verifyOrderEac.md) %} Отправляет Маркету код подтверждения для его проверки. **Если у магазина настроена работа с кодами подтверждения:** В параметре `delivery`, вложенном в `order`, возвращается параметр `eacType` с типом `Enum` (тип кода подтверждения для передачи заказа) в методах: * [POST v1/businesses/{businessId}/orders](../../reference/orders/getBusinessOrders.md); * [PUT v2/campaigns/{campaignId}/orders/{orderId}/status](../../reference/orders/updateOrderStatus.md). Возможные значения: * `MERCHANT_TO_COURIER` (временно не возвращается) — продавец передает код курьеру для получения невыкупа; * `COURIER_TO_MERCHANT` — курьер передает код продавцу для получения заказа. Параметр `eacType` возвращается при статусах заказа `COURIER_FOUND`, `COURIER_ARRIVED_TO_SENDER` и `DELIVERY_SERVICE_UNDELIVERED`. Если заказ в других статусах, параметр может отсутствовать. {% include notitle [limit](../../_auto/method_limits/verifyOrderEac.md) %}
|
||||
* Передача кода подтверждения
|
||||
*/
|
||||
verifyOrderEac(campaignId: number, orderId: number, verifyOrderEacRequest: VerifyOrderEacRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<VerifyOrderEacResponse>;
|
||||
}
|
||||
253
dist/apis/OrderDeliveryApi.js
vendored
Normal file
253
dist/apis/OrderDeliveryApi.js
vendored
Normal file
@@ -0,0 +1,253 @@
|
||||
"use strict";
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* API Яндекс Маркета для продавцов
|
||||
* API Яндекс Маркета помогает продавцам автоматизировать и упростить работу с маркетплейсом. В числе возможностей интеграции: * управление каталогом товаров и витриной, * обработка заказов, * изменение настроек магазина, * получение отчетов.
|
||||
*
|
||||
* The version of the OpenAPI document: LATEST
|
||||
*
|
||||
*
|
||||
* 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.OrderDeliveryApi = void 0;
|
||||
const runtime = require("../runtime");
|
||||
const index_1 = require("../models/index");
|
||||
/**
|
||||
*
|
||||
*/
|
||||
class OrderDeliveryApi extends runtime.BaseAPI {
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getOrderBuyerInfo.md) %} Возвращает информацию о покупателе по идентификатору заказа. {% note info \"Как получить информацию о покупателе, который является юридическим лицом\" %} Воспользуйтесь запросом [POST v2/campaigns/{campaignId}/orders/{orderId}/business-buyer](../../reference/order-business-information/getOrderBusinessBuyerInfo.md). {% endnote %} Получить данные можно, только если заказ находится в статусе `PROCESSING`, `DELIVERY` или `PICKUP`. {% include notitle [limit](../../_auto/method_limits/getOrderBuyerInfo.md) %}
|
||||
* Информация о покупателе — физическом лице
|
||||
*/
|
||||
getOrderBuyerInfoRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['campaignId'] == null) {
|
||||
throw new runtime.RequiredError('campaignId', 'Required parameter "campaignId" was null or undefined when calling getOrderBuyerInfo().');
|
||||
}
|
||||
if (requestParameters['orderId'] == null) {
|
||||
throw new runtime.RequiredError('orderId', 'Required parameter "orderId" was null or undefined when calling getOrderBuyerInfo().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
const headerParameters = {};
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v2/campaigns/{campaignId}/orders/{orderId}/buyer`.replace(`{${"campaignId"}}`, encodeURIComponent(String(requestParameters['campaignId']))).replace(`{${"orderId"}}`, encodeURIComponent(String(requestParameters['orderId']))),
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.GetOrderBuyerInfoResponseFromJSON)(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getOrderBuyerInfo.md) %} Возвращает информацию о покупателе по идентификатору заказа. {% note info \"Как получить информацию о покупателе, который является юридическим лицом\" %} Воспользуйтесь запросом [POST v2/campaigns/{campaignId}/orders/{orderId}/business-buyer](../../reference/order-business-information/getOrderBusinessBuyerInfo.md). {% endnote %} Получить данные можно, только если заказ находится в статусе `PROCESSING`, `DELIVERY` или `PICKUP`. {% include notitle [limit](../../_auto/method_limits/getOrderBuyerInfo.md) %}
|
||||
* Информация о покупателе — физическом лице
|
||||
*/
|
||||
getOrderBuyerInfo(campaignId, orderId, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.getOrderBuyerInfoRaw({ campaignId: campaignId, orderId: orderId }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/setOrderDeliveryDate.md) %} Метод изменяет дату доставки заказа в статусе `PROCESSING` или `DELIVERY`. Для заказов с другими статусами дату доставки изменить нельзя. {% include notitle [limit](../../_auto/method_limits/setOrderDeliveryDate.md) %}
|
||||
* Изменение даты доставки заказа
|
||||
*/
|
||||
setOrderDeliveryDateRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['campaignId'] == null) {
|
||||
throw new runtime.RequiredError('campaignId', 'Required parameter "campaignId" was null or undefined when calling setOrderDeliveryDate().');
|
||||
}
|
||||
if (requestParameters['orderId'] == null) {
|
||||
throw new runtime.RequiredError('orderId', 'Required parameter "orderId" was null or undefined when calling setOrderDeliveryDate().');
|
||||
}
|
||||
if (requestParameters['setOrderDeliveryDateRequest'] == null) {
|
||||
throw new runtime.RequiredError('setOrderDeliveryDateRequest', 'Required parameter "setOrderDeliveryDateRequest" was null or undefined when calling setOrderDeliveryDate().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
const headerParameters = {};
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v2/campaigns/{campaignId}/orders/{orderId}/delivery/date`.replace(`{${"campaignId"}}`, encodeURIComponent(String(requestParameters['campaignId']))).replace(`{${"orderId"}}`, encodeURIComponent(String(requestParameters['orderId']))),
|
||||
method: 'PUT',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: (0, index_1.SetOrderDeliveryDateRequestToJSON)(requestParameters['setOrderDeliveryDateRequest']),
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.EmptyApiResponseFromJSON)(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/setOrderDeliveryDate.md) %} Метод изменяет дату доставки заказа в статусе `PROCESSING` или `DELIVERY`. Для заказов с другими статусами дату доставки изменить нельзя. {% include notitle [limit](../../_auto/method_limits/setOrderDeliveryDate.md) %}
|
||||
* Изменение даты доставки заказа
|
||||
*/
|
||||
setOrderDeliveryDate(campaignId, orderId, setOrderDeliveryDateRequest, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.setOrderDeliveryDateRaw({ campaignId: campaignId, orderId: orderId, setOrderDeliveryDateRequest: setOrderDeliveryDateRequest }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/setOrderDeliveryTrackCode.md) %} Передает Маркету трек‑номер, по которому покупатель может отследить посылку со своим заказом через службу доставки. Если покупатели смогут узнать, на каком этапе доставки находятся их заказы, доверие покупателей к вашему магазину может возрасти. Передать трек‑номер можно, только если заказ находится в статусе `PROCESSING`, `DELIVERY` или `PICKUP`. {% include notitle [limit](../../_auto/method_limits/setOrderDeliveryTrackCode.md) %}
|
||||
* Передача трек‑номера посылки
|
||||
*/
|
||||
setOrderDeliveryTrackCodeRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['campaignId'] == null) {
|
||||
throw new runtime.RequiredError('campaignId', 'Required parameter "campaignId" was null or undefined when calling setOrderDeliveryTrackCode().');
|
||||
}
|
||||
if (requestParameters['orderId'] == null) {
|
||||
throw new runtime.RequiredError('orderId', 'Required parameter "orderId" was null or undefined when calling setOrderDeliveryTrackCode().');
|
||||
}
|
||||
if (requestParameters['setOrderDeliveryTrackCodeRequest'] == null) {
|
||||
throw new runtime.RequiredError('setOrderDeliveryTrackCodeRequest', 'Required parameter "setOrderDeliveryTrackCodeRequest" was null or undefined when calling setOrderDeliveryTrackCode().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
const headerParameters = {};
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v2/campaigns/{campaignId}/orders/{orderId}/delivery/track`.replace(`{${"campaignId"}}`, encodeURIComponent(String(requestParameters['campaignId']))).replace(`{${"orderId"}}`, encodeURIComponent(String(requestParameters['orderId']))),
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: (0, index_1.SetOrderDeliveryTrackCodeRequestToJSON)(requestParameters['setOrderDeliveryTrackCodeRequest']),
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.EmptyApiResponseFromJSON)(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/setOrderDeliveryTrackCode.md) %} Передает Маркету трек‑номер, по которому покупатель может отследить посылку со своим заказом через службу доставки. Если покупатели смогут узнать, на каком этапе доставки находятся их заказы, доверие покупателей к вашему магазину может возрасти. Передать трек‑номер можно, только если заказ находится в статусе `PROCESSING`, `DELIVERY` или `PICKUP`. {% include notitle [limit](../../_auto/method_limits/setOrderDeliveryTrackCode.md) %}
|
||||
* Передача трек‑номера посылки
|
||||
*/
|
||||
setOrderDeliveryTrackCode(campaignId, orderId, setOrderDeliveryTrackCodeRequest, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.setOrderDeliveryTrackCodeRaw({ campaignId: campaignId, orderId: orderId, setOrderDeliveryTrackCodeRequest: setOrderDeliveryTrackCodeRequest }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/updateOrderStorageLimit.md) %} Продлевает срок хранения заказа в пункте выдачи продавца. Заказ должен быть в статусе `PICKUP`. Продлить срок можно только один раз, не больше чем на 30 дней. Новый срок хранения можно получить в параметре `outletStorageLimitDate` в ответе метода [POST v1/businesses/{businessId}/orders](../../reference/orders/getBusinessOrders.md). {% include notitle [limit](../../_auto/method_limits/updateOrderStorageLimit.md) %}
|
||||
* Продление срока хранения заказа
|
||||
*/
|
||||
updateOrderStorageLimitRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['campaignId'] == null) {
|
||||
throw new runtime.RequiredError('campaignId', 'Required parameter "campaignId" was null or undefined when calling updateOrderStorageLimit().');
|
||||
}
|
||||
if (requestParameters['orderId'] == null) {
|
||||
throw new runtime.RequiredError('orderId', 'Required parameter "orderId" was null or undefined when calling updateOrderStorageLimit().');
|
||||
}
|
||||
if (requestParameters['updateOrderStorageLimitRequest'] == null) {
|
||||
throw new runtime.RequiredError('updateOrderStorageLimitRequest', 'Required parameter "updateOrderStorageLimitRequest" was null or undefined when calling updateOrderStorageLimit().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
const headerParameters = {};
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v2/campaigns/{campaignId}/orders/{orderId}/delivery/storage-limit`.replace(`{${"campaignId"}}`, encodeURIComponent(String(requestParameters['campaignId']))).replace(`{${"orderId"}}`, encodeURIComponent(String(requestParameters['orderId']))),
|
||||
method: 'PUT',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: (0, index_1.UpdateOrderStorageLimitRequestToJSON)(requestParameters['updateOrderStorageLimitRequest']),
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.EmptyApiResponseFromJSON)(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/updateOrderStorageLimit.md) %} Продлевает срок хранения заказа в пункте выдачи продавца. Заказ должен быть в статусе `PICKUP`. Продлить срок можно только один раз, не больше чем на 30 дней. Новый срок хранения можно получить в параметре `outletStorageLimitDate` в ответе метода [POST v1/businesses/{businessId}/orders](../../reference/orders/getBusinessOrders.md). {% include notitle [limit](../../_auto/method_limits/updateOrderStorageLimit.md) %}
|
||||
* Продление срока хранения заказа
|
||||
*/
|
||||
updateOrderStorageLimit(campaignId, orderId, updateOrderStorageLimitRequest, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.updateOrderStorageLimitRaw({ campaignId: campaignId, orderId: orderId, updateOrderStorageLimitRequest: updateOrderStorageLimitRequest }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/verifyOrderEac.md) %} Отправляет Маркету код подтверждения для его проверки. **Если у магазина настроена работа с кодами подтверждения:** В параметре `delivery`, вложенном в `order`, возвращается параметр `eacType` с типом `Enum` (тип кода подтверждения для передачи заказа) в методах: * [POST v1/businesses/{businessId}/orders](../../reference/orders/getBusinessOrders.md); * [PUT v2/campaigns/{campaignId}/orders/{orderId}/status](../../reference/orders/updateOrderStatus.md). Возможные значения: * `MERCHANT_TO_COURIER` (временно не возвращается) — продавец передает код курьеру для получения невыкупа; * `COURIER_TO_MERCHANT` — курьер передает код продавцу для получения заказа. Параметр `eacType` возвращается при статусах заказа `COURIER_FOUND`, `COURIER_ARRIVED_TO_SENDER` и `DELIVERY_SERVICE_UNDELIVERED`. Если заказ в других статусах, параметр может отсутствовать. {% include notitle [limit](../../_auto/method_limits/verifyOrderEac.md) %}
|
||||
* Передача кода подтверждения
|
||||
*/
|
||||
verifyOrderEacRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['campaignId'] == null) {
|
||||
throw new runtime.RequiredError('campaignId', 'Required parameter "campaignId" was null or undefined when calling verifyOrderEac().');
|
||||
}
|
||||
if (requestParameters['orderId'] == null) {
|
||||
throw new runtime.RequiredError('orderId', 'Required parameter "orderId" was null or undefined when calling verifyOrderEac().');
|
||||
}
|
||||
if (requestParameters['verifyOrderEacRequest'] == null) {
|
||||
throw new runtime.RequiredError('verifyOrderEacRequest', 'Required parameter "verifyOrderEacRequest" was null or undefined when calling verifyOrderEac().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
const headerParameters = {};
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v2/campaigns/{campaignId}/orders/{orderId}/verifyEac`.replace(`{${"campaignId"}}`, encodeURIComponent(String(requestParameters['campaignId']))).replace(`{${"orderId"}}`, encodeURIComponent(String(requestParameters['orderId']))),
|
||||
method: 'PUT',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: (0, index_1.VerifyOrderEacRequestToJSON)(requestParameters['verifyOrderEacRequest']),
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.VerifyOrderEacResponseFromJSON)(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/verifyOrderEac.md) %} Отправляет Маркету код подтверждения для его проверки. **Если у магазина настроена работа с кодами подтверждения:** В параметре `delivery`, вложенном в `order`, возвращается параметр `eacType` с типом `Enum` (тип кода подтверждения для передачи заказа) в методах: * [POST v1/businesses/{businessId}/orders](../../reference/orders/getBusinessOrders.md); * [PUT v2/campaigns/{campaignId}/orders/{orderId}/status](../../reference/orders/updateOrderStatus.md). Возможные значения: * `MERCHANT_TO_COURIER` (временно не возвращается) — продавец передает код курьеру для получения невыкупа; * `COURIER_TO_MERCHANT` — курьер передает код продавцу для получения заказа. Параметр `eacType` возвращается при статусах заказа `COURIER_FOUND`, `COURIER_ARRIVED_TO_SENDER` и `DELIVERY_SERVICE_UNDELIVERED`. Если заказ в других статусах, параметр может отсутствовать. {% include notitle [limit](../../_auto/method_limits/verifyOrderEac.md) %}
|
||||
* Передача кода подтверждения
|
||||
*/
|
||||
verifyOrderEac(campaignId, orderId, verifyOrderEacRequest, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.verifyOrderEacRaw({ campaignId: campaignId, orderId: orderId, verifyOrderEacRequest: verifyOrderEacRequest }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
}
|
||||
exports.OrderDeliveryApi = OrderDeliveryApi;
|
||||
64
dist/apis/OrderLabelsApi.d.ts
vendored
Normal file
64
dist/apis/OrderLabelsApi.d.ts
vendored
Normal file
@@ -0,0 +1,64 @@
|
||||
/**
|
||||
* API Яндекс Маркета для продавцов
|
||||
* API Яндекс Маркета помогает продавцам автоматизировать и упростить работу с маркетплейсом. В числе возможностей интеграции: * управление каталогом товаров и витриной, * обработка заказов, * изменение настроек магазина, * получение отчетов.
|
||||
*
|
||||
* The version of the OpenAPI document: LATEST
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
import * as runtime from '../runtime';
|
||||
import type { GetOrderLabelsDataResponse, PageFormatType } from '../models/index';
|
||||
export interface OrderLabelsApiGenerateOrderLabelRequest {
|
||||
campaignId: number;
|
||||
orderId: number;
|
||||
shipmentId: number;
|
||||
boxId: number;
|
||||
format?: PageFormatType;
|
||||
}
|
||||
export interface OrderLabelsApiGenerateOrderLabelsRequest {
|
||||
campaignId: number;
|
||||
orderId: number;
|
||||
format?: PageFormatType;
|
||||
}
|
||||
export interface OrderLabelsApiGetOrderLabelsDataRequest {
|
||||
campaignId: number;
|
||||
orderId: number;
|
||||
}
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export declare class OrderLabelsApi extends runtime.BaseAPI {
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/generateOrderLabel.md) %} Формирует ярлык‑наклейку для коробки в заказе и возвращает ярлык в PDF‑файле. Чтобы на ярлыке отображался внешний идентификатор заказа, передайте его в методе [POST v2/campaigns/{campaignId}/orders/{orderId}/external-id](../../reference/orders/updateExternalOrderId.md). {% include notitle [limit](../../_auto/method_limits/generateOrderLabel.md) %}
|
||||
* Готовый ярлык‑наклейка для коробки в заказе
|
||||
*/
|
||||
generateOrderLabelRaw(requestParameters: OrderLabelsApiGenerateOrderLabelRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Blob>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/generateOrderLabel.md) %} Формирует ярлык‑наклейку для коробки в заказе и возвращает ярлык в PDF‑файле. Чтобы на ярлыке отображался внешний идентификатор заказа, передайте его в методе [POST v2/campaigns/{campaignId}/orders/{orderId}/external-id](../../reference/orders/updateExternalOrderId.md). {% include notitle [limit](../../_auto/method_limits/generateOrderLabel.md) %}
|
||||
* Готовый ярлык‑наклейка для коробки в заказе
|
||||
*/
|
||||
generateOrderLabel(campaignId: number, orderId: number, shipmentId: number, boxId: number, format?: PageFormatType, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Blob>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/generateOrderLabels.md) %} Возвращает PDF-файл с ярлыками, которые нужно наклеить на коробки перед отгрузкой. Подробно о том, зачем они нужны и как выглядят, рассказано [в Справке Маркета для продавцов](https://yandex.ru/support/marketplace/orders/fbs/packaging/marking.html). На вход нужно передать идентификатор заказа и один необязательный параметр, который управляет версткой PDF-файла. Чтобы на ярлыке отображался внешний идентификатор заказа, передайте его в методе [POST v2/campaigns/{campaignId}/orders/{orderId}/external-id](../../reference/orders/updateExternalOrderId.md). {% include notitle [limit](../../_auto/method_limits/generateOrderLabels.md) %}
|
||||
* Готовые ярлыки‑наклейки на все коробки в одном заказе
|
||||
*/
|
||||
generateOrderLabelsRaw(requestParameters: OrderLabelsApiGenerateOrderLabelsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Blob>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/generateOrderLabels.md) %} Возвращает PDF-файл с ярлыками, которые нужно наклеить на коробки перед отгрузкой. Подробно о том, зачем они нужны и как выглядят, рассказано [в Справке Маркета для продавцов](https://yandex.ru/support/marketplace/orders/fbs/packaging/marking.html). На вход нужно передать идентификатор заказа и один необязательный параметр, который управляет версткой PDF-файла. Чтобы на ярлыке отображался внешний идентификатор заказа, передайте его в методе [POST v2/campaigns/{campaignId}/orders/{orderId}/external-id](../../reference/orders/updateExternalOrderId.md). {% include notitle [limit](../../_auto/method_limits/generateOrderLabels.md) %}
|
||||
* Готовые ярлыки‑наклейки на все коробки в одном заказе
|
||||
*/
|
||||
generateOrderLabels(campaignId: number, orderId: number, format?: PageFormatType, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Blob>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getOrderLabelsData.md) %} Возвращает информацию на ярлыках, которые клеятся на коробки в заказе. {% include notitle [limit](../../_auto/method_limits/getOrderLabelsData.md) %}
|
||||
* Данные для самостоятельного изготовления ярлыков
|
||||
*/
|
||||
getOrderLabelsDataRaw(requestParameters: OrderLabelsApiGetOrderLabelsDataRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetOrderLabelsDataResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getOrderLabelsData.md) %} Возвращает информацию на ярлыках, которые клеятся на коробки в заказе. {% include notitle [limit](../../_auto/method_limits/getOrderLabelsData.md) %}
|
||||
* Данные для самостоятельного изготовления ярлыков
|
||||
*/
|
||||
getOrderLabelsData(campaignId: number, orderId: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetOrderLabelsDataResponse>;
|
||||
}
|
||||
165
dist/apis/OrderLabelsApi.js
vendored
Normal file
165
dist/apis/OrderLabelsApi.js
vendored
Normal file
@@ -0,0 +1,165 @@
|
||||
"use strict";
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* API Яндекс Маркета для продавцов
|
||||
* API Яндекс Маркета помогает продавцам автоматизировать и упростить работу с маркетплейсом. В числе возможностей интеграции: * управление каталогом товаров и витриной, * обработка заказов, * изменение настроек магазина, * получение отчетов.
|
||||
*
|
||||
* The version of the OpenAPI document: LATEST
|
||||
*
|
||||
*
|
||||
* 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.OrderLabelsApi = void 0;
|
||||
const runtime = require("../runtime");
|
||||
const index_1 = require("../models/index");
|
||||
/**
|
||||
*
|
||||
*/
|
||||
class OrderLabelsApi extends runtime.BaseAPI {
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/generateOrderLabel.md) %} Формирует ярлык‑наклейку для коробки в заказе и возвращает ярлык в PDF‑файле. Чтобы на ярлыке отображался внешний идентификатор заказа, передайте его в методе [POST v2/campaigns/{campaignId}/orders/{orderId}/external-id](../../reference/orders/updateExternalOrderId.md). {% include notitle [limit](../../_auto/method_limits/generateOrderLabel.md) %}
|
||||
* Готовый ярлык‑наклейка для коробки в заказе
|
||||
*/
|
||||
generateOrderLabelRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['campaignId'] == null) {
|
||||
throw new runtime.RequiredError('campaignId', 'Required parameter "campaignId" was null or undefined when calling generateOrderLabel().');
|
||||
}
|
||||
if (requestParameters['orderId'] == null) {
|
||||
throw new runtime.RequiredError('orderId', 'Required parameter "orderId" was null or undefined when calling generateOrderLabel().');
|
||||
}
|
||||
if (requestParameters['shipmentId'] == null) {
|
||||
throw new runtime.RequiredError('shipmentId', 'Required parameter "shipmentId" was null or undefined when calling generateOrderLabel().');
|
||||
}
|
||||
if (requestParameters['boxId'] == null) {
|
||||
throw new runtime.RequiredError('boxId', 'Required parameter "boxId" was null or undefined when calling generateOrderLabel().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
if (requestParameters['format'] != null) {
|
||||
queryParameters['format'] = requestParameters['format'];
|
||||
}
|
||||
const headerParameters = {};
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v2/campaigns/{campaignId}/orders/{orderId}/delivery/shipments/{shipmentId}/boxes/{boxId}/label`.replace(`{${"campaignId"}}`, encodeURIComponent(String(requestParameters['campaignId']))).replace(`{${"orderId"}}`, encodeURIComponent(String(requestParameters['orderId']))).replace(`{${"shipmentId"}}`, encodeURIComponent(String(requestParameters['shipmentId']))).replace(`{${"boxId"}}`, encodeURIComponent(String(requestParameters['boxId']))),
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
return new runtime.BlobApiResponse(response);
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/generateOrderLabel.md) %} Формирует ярлык‑наклейку для коробки в заказе и возвращает ярлык в PDF‑файле. Чтобы на ярлыке отображался внешний идентификатор заказа, передайте его в методе [POST v2/campaigns/{campaignId}/orders/{orderId}/external-id](../../reference/orders/updateExternalOrderId.md). {% include notitle [limit](../../_auto/method_limits/generateOrderLabel.md) %}
|
||||
* Готовый ярлык‑наклейка для коробки в заказе
|
||||
*/
|
||||
generateOrderLabel(campaignId, orderId, shipmentId, boxId, format, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.generateOrderLabelRaw({ campaignId: campaignId, orderId: orderId, shipmentId: shipmentId, boxId: boxId, format: format }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/generateOrderLabels.md) %} Возвращает PDF-файл с ярлыками, которые нужно наклеить на коробки перед отгрузкой. Подробно о том, зачем они нужны и как выглядят, рассказано [в Справке Маркета для продавцов](https://yandex.ru/support/marketplace/orders/fbs/packaging/marking.html). На вход нужно передать идентификатор заказа и один необязательный параметр, который управляет версткой PDF-файла. Чтобы на ярлыке отображался внешний идентификатор заказа, передайте его в методе [POST v2/campaigns/{campaignId}/orders/{orderId}/external-id](../../reference/orders/updateExternalOrderId.md). {% include notitle [limit](../../_auto/method_limits/generateOrderLabels.md) %}
|
||||
* Готовые ярлыки‑наклейки на все коробки в одном заказе
|
||||
*/
|
||||
generateOrderLabelsRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['campaignId'] == null) {
|
||||
throw new runtime.RequiredError('campaignId', 'Required parameter "campaignId" was null or undefined when calling generateOrderLabels().');
|
||||
}
|
||||
if (requestParameters['orderId'] == null) {
|
||||
throw new runtime.RequiredError('orderId', 'Required parameter "orderId" was null or undefined when calling generateOrderLabels().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
if (requestParameters['format'] != null) {
|
||||
queryParameters['format'] = requestParameters['format'];
|
||||
}
|
||||
const headerParameters = {};
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v2/campaigns/{campaignId}/orders/{orderId}/delivery/labels`.replace(`{${"campaignId"}}`, encodeURIComponent(String(requestParameters['campaignId']))).replace(`{${"orderId"}}`, encodeURIComponent(String(requestParameters['orderId']))),
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
return new runtime.BlobApiResponse(response);
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/generateOrderLabels.md) %} Возвращает PDF-файл с ярлыками, которые нужно наклеить на коробки перед отгрузкой. Подробно о том, зачем они нужны и как выглядят, рассказано [в Справке Маркета для продавцов](https://yandex.ru/support/marketplace/orders/fbs/packaging/marking.html). На вход нужно передать идентификатор заказа и один необязательный параметр, который управляет версткой PDF-файла. Чтобы на ярлыке отображался внешний идентификатор заказа, передайте его в методе [POST v2/campaigns/{campaignId}/orders/{orderId}/external-id](../../reference/orders/updateExternalOrderId.md). {% include notitle [limit](../../_auto/method_limits/generateOrderLabels.md) %}
|
||||
* Готовые ярлыки‑наклейки на все коробки в одном заказе
|
||||
*/
|
||||
generateOrderLabels(campaignId, orderId, format, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.generateOrderLabelsRaw({ campaignId: campaignId, orderId: orderId, format: format }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getOrderLabelsData.md) %} Возвращает информацию на ярлыках, которые клеятся на коробки в заказе. {% include notitle [limit](../../_auto/method_limits/getOrderLabelsData.md) %}
|
||||
* Данные для самостоятельного изготовления ярлыков
|
||||
*/
|
||||
getOrderLabelsDataRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['campaignId'] == null) {
|
||||
throw new runtime.RequiredError('campaignId', 'Required parameter "campaignId" was null or undefined when calling getOrderLabelsData().');
|
||||
}
|
||||
if (requestParameters['orderId'] == null) {
|
||||
throw new runtime.RequiredError('orderId', 'Required parameter "orderId" was null or undefined when calling getOrderLabelsData().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
const headerParameters = {};
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v2/campaigns/{campaignId}/orders/{orderId}/delivery/labels/data`.replace(`{${"campaignId"}}`, encodeURIComponent(String(requestParameters['campaignId']))).replace(`{${"orderId"}}`, encodeURIComponent(String(requestParameters['orderId']))),
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.GetOrderLabelsDataResponseFromJSON)(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getOrderLabelsData.md) %} Возвращает информацию на ярлыках, которые клеятся на коробки в заказе. {% include notitle [limit](../../_auto/method_limits/getOrderLabelsData.md) %}
|
||||
* Данные для самостоятельного изготовления ярлыков
|
||||
*/
|
||||
getOrderLabelsData(campaignId, orderId, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.getOrderLabelsDataRaw({ campaignId: campaignId, orderId: orderId }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
}
|
||||
exports.OrderLabelsApi = OrderLabelsApi;
|
||||
277
dist/apis/OrdersApi.d.ts
vendored
Normal file
277
dist/apis/OrdersApi.d.ts
vendored
Normal file
File diff suppressed because one or more lines are too long
791
dist/apis/OrdersApi.js
vendored
Normal file
791
dist/apis/OrdersApi.js
vendored
Normal file
File diff suppressed because one or more lines are too long
34
dist/apis/OrdersStatsApi.d.ts
vendored
Normal file
34
dist/apis/OrdersStatsApi.d.ts
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
/**
|
||||
* API Яндекс Маркета для продавцов
|
||||
* API Яндекс Маркета помогает продавцам автоматизировать и упростить работу с маркетплейсом. В числе возможностей интеграции: * управление каталогом товаров и витриной, * обработка заказов, * изменение настроек магазина, * получение отчетов.
|
||||
*
|
||||
* The version of the OpenAPI document: LATEST
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
import * as runtime from '../runtime';
|
||||
import type { GetOrdersStatsRequest, GetOrdersStatsResponse } from '../models/index';
|
||||
export interface OrdersStatsApiGetOrdersStatsOperationRequest {
|
||||
campaignId: number;
|
||||
pageToken?: string;
|
||||
limit?: number;
|
||||
getOrdersStatsRequest?: GetOrdersStatsRequest;
|
||||
}
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export declare class OrdersStatsApi extends runtime.BaseAPI {
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getOrdersStats.md) %} Возвращает информацию по заказам на Маркете, в которых есть ваши товары. С помощью нее вы можете собрать статистику по вашим заказам и узнать, например, какие из товаров чаще всего возвращаются покупателями, какие, наоборот, пользуются большим спросом и т. п. {% note tip \"Информация по созданным или обновленным заказам может появиться с задержкой до 40 минут\" %} Чтобы получить данные без задержки, используйте метод [POST v1/businesses/{businessId}/orders](../../reference/orders/getBusinessOrders.md). {% endnote %} В одном запросе можно получить информацию не более чем по 200 заказам. {% include notitle [limit](../../_auto/method_limits/getOrdersStats.md) %}
|
||||
* Детальная информация по заказам
|
||||
*/
|
||||
getOrdersStatsRaw(requestParameters: OrdersStatsApiGetOrdersStatsOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetOrdersStatsResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getOrdersStats.md) %} Возвращает информацию по заказам на Маркете, в которых есть ваши товары. С помощью нее вы можете собрать статистику по вашим заказам и узнать, например, какие из товаров чаще всего возвращаются покупателями, какие, наоборот, пользуются большим спросом и т. п. {% note tip \"Информация по созданным или обновленным заказам может появиться с задержкой до 40 минут\" %} Чтобы получить данные без задержки, используйте метод [POST v1/businesses/{businessId}/orders](../../reference/orders/getBusinessOrders.md). {% endnote %} В одном запросе можно получить информацию не более чем по 200 заказам. {% include notitle [limit](../../_auto/method_limits/getOrdersStats.md) %}
|
||||
* Детальная информация по заказам
|
||||
*/
|
||||
getOrdersStats(campaignId: number, pageToken?: string, limit?: number, getOrdersStatsRequest?: GetOrdersStatsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetOrdersStatsResponse>;
|
||||
}
|
||||
78
dist/apis/OrdersStatsApi.js
vendored
Normal file
78
dist/apis/OrdersStatsApi.js
vendored
Normal file
@@ -0,0 +1,78 @@
|
||||
"use strict";
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* API Яндекс Маркета для продавцов
|
||||
* API Яндекс Маркета помогает продавцам автоматизировать и упростить работу с маркетплейсом. В числе возможностей интеграции: * управление каталогом товаров и витриной, * обработка заказов, * изменение настроек магазина, * получение отчетов.
|
||||
*
|
||||
* The version of the OpenAPI document: LATEST
|
||||
*
|
||||
*
|
||||
* 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.OrdersStatsApi = void 0;
|
||||
const runtime = require("../runtime");
|
||||
const index_1 = require("../models/index");
|
||||
/**
|
||||
*
|
||||
*/
|
||||
class OrdersStatsApi extends runtime.BaseAPI {
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getOrdersStats.md) %} Возвращает информацию по заказам на Маркете, в которых есть ваши товары. С помощью нее вы можете собрать статистику по вашим заказам и узнать, например, какие из товаров чаще всего возвращаются покупателями, какие, наоборот, пользуются большим спросом и т. п. {% note tip \"Информация по созданным или обновленным заказам может появиться с задержкой до 40 минут\" %} Чтобы получить данные без задержки, используйте метод [POST v1/businesses/{businessId}/orders](../../reference/orders/getBusinessOrders.md). {% endnote %} В одном запросе можно получить информацию не более чем по 200 заказам. {% include notitle [limit](../../_auto/method_limits/getOrdersStats.md) %}
|
||||
* Детальная информация по заказам
|
||||
*/
|
||||
getOrdersStatsRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['campaignId'] == null) {
|
||||
throw new runtime.RequiredError('campaignId', 'Required parameter "campaignId" was null or undefined when calling getOrdersStats().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
if (requestParameters['pageToken'] != null) {
|
||||
queryParameters['pageToken'] = requestParameters['pageToken'];
|
||||
}
|
||||
if (requestParameters['limit'] != null) {
|
||||
queryParameters['limit'] = requestParameters['limit'];
|
||||
}
|
||||
const headerParameters = {};
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v2/campaigns/{campaignId}/stats/orders`.replace(`{${"campaignId"}}`, encodeURIComponent(String(requestParameters['campaignId']))),
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: (0, index_1.GetOrdersStatsRequestToJSON)(requestParameters['getOrdersStatsRequest']),
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.GetOrdersStatsResponseFromJSON)(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getOrdersStats.md) %} Возвращает информацию по заказам на Маркете, в которых есть ваши товары. С помощью нее вы можете собрать статистику по вашим заказам и узнать, например, какие из товаров чаще всего возвращаются покупателями, какие, наоборот, пользуются большим спросом и т. п. {% note tip \"Информация по созданным или обновленным заказам может появиться с задержкой до 40 минут\" %} Чтобы получить данные без задержки, используйте метод [POST v1/businesses/{businessId}/orders](../../reference/orders/getBusinessOrders.md). {% endnote %} В одном запросе можно получить информацию не более чем по 200 заказам. {% include notitle [limit](../../_auto/method_limits/getOrdersStats.md) %}
|
||||
* Детальная информация по заказам
|
||||
*/
|
||||
getOrdersStats(campaignId, pageToken, limit, getOrdersStatsRequest, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.getOrdersStatsRaw({ campaignId: campaignId, pageToken: pageToken, limit: limit, getOrdersStatsRequest: getOrdersStatsRequest }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
}
|
||||
exports.OrdersStatsApi = OrdersStatsApi;
|
||||
61
dist/apis/OutletLicensesApi.d.ts
vendored
Normal file
61
dist/apis/OutletLicensesApi.d.ts
vendored
Normal file
@@ -0,0 +1,61 @@
|
||||
/**
|
||||
* API Яндекс Маркета для продавцов
|
||||
* API Яндекс Маркета помогает продавцам автоматизировать и упростить работу с маркетплейсом. В числе возможностей интеграции: * управление каталогом товаров и витриной, * обработка заказов, * изменение настроек магазина, * получение отчетов.
|
||||
*
|
||||
* The version of the OpenAPI document: LATEST
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
import * as runtime from '../runtime';
|
||||
import type { EmptyApiResponse, GetOutletLicensesResponse, UpdateOutletLicenseRequest } from '../models/index';
|
||||
export interface OutletLicensesApiDeleteOutletLicensesRequest {
|
||||
campaignId: number;
|
||||
ids: Set<number>;
|
||||
}
|
||||
export interface OutletLicensesApiGetOutletLicensesRequest {
|
||||
campaignId: number;
|
||||
outletIds?: Set<number>;
|
||||
ids?: Set<number>;
|
||||
}
|
||||
export interface OutletLicensesApiUpdateOutletLicensesRequest {
|
||||
campaignId: number;
|
||||
updateOutletLicenseRequest: UpdateOutletLicenseRequest;
|
||||
}
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export declare class OutletLicensesApi extends runtime.BaseAPI {
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/deleteOutletLicenses.md) %} Удаляет информацию о лицензиях для точек продаж. {% include notitle [limit](../../_auto/method_limits/deleteOutletLicenses.md) %}
|
||||
* Удаление лицензий для точек продаж
|
||||
*/
|
||||
deleteOutletLicensesRaw(requestParameters: OutletLicensesApiDeleteOutletLicensesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<EmptyApiResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/deleteOutletLicenses.md) %} Удаляет информацию о лицензиях для точек продаж. {% include notitle [limit](../../_auto/method_limits/deleteOutletLicenses.md) %}
|
||||
* Удаление лицензий для точек продаж
|
||||
*/
|
||||
deleteOutletLicenses(campaignId: number, ids: Set<number>, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<EmptyApiResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getOutletLicenses.md) %} Возвращает информацию о лицензиях для точек продаж. {% include notitle [limit](../../_auto/method_limits/getOutletLicenses.md) %}
|
||||
* Информация о лицензиях для точек продаж
|
||||
*/
|
||||
getOutletLicensesRaw(requestParameters: OutletLicensesApiGetOutletLicensesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetOutletLicensesResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getOutletLicenses.md) %} Возвращает информацию о лицензиях для точек продаж. {% include notitle [limit](../../_auto/method_limits/getOutletLicenses.md) %}
|
||||
* Информация о лицензиях для точек продаж
|
||||
*/
|
||||
getOutletLicenses(campaignId: number, outletIds?: Set<number>, ids?: Set<number>, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetOutletLicensesResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/updateOutletLicenses.md) %} Передает информацию о новых и существующих лицензиях для точек продаж. Поддерживаются только лицензии на розничную продажу алкоголя. Чтобы размещать алкогольную продукцию на Маркете, надо также прислать гарантийное письмо (если вы еще не делали этого раньше) и правильно оформить предложения в прайс-листе. Далее информация о лицензиях проходит проверку. {% include notitle [limit](../../_auto/method_limits/updateOutletLicenses.md) %}
|
||||
* Создание и изменение лицензий для точек продаж
|
||||
*/
|
||||
updateOutletLicensesRaw(requestParameters: OutletLicensesApiUpdateOutletLicensesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<EmptyApiResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/updateOutletLicenses.md) %} Передает информацию о новых и существующих лицензиях для точек продаж. Поддерживаются только лицензии на розничную продажу алкоголя. Чтобы размещать алкогольную продукцию на Маркете, надо также прислать гарантийное письмо (если вы еще не делали этого раньше) и правильно оформить предложения в прайс-листе. Далее информация о лицензиях проходит проверку. {% include notitle [limit](../../_auto/method_limits/updateOutletLicenses.md) %}
|
||||
* Создание и изменение лицензий для точек продаж
|
||||
*/
|
||||
updateOutletLicenses(campaignId: number, updateOutletLicenseRequest: UpdateOutletLicenseRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<EmptyApiResponse>;
|
||||
}
|
||||
161
dist/apis/OutletLicensesApi.js
vendored
Normal file
161
dist/apis/OutletLicensesApi.js
vendored
Normal file
@@ -0,0 +1,161 @@
|
||||
"use strict";
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* API Яндекс Маркета для продавцов
|
||||
* API Яндекс Маркета помогает продавцам автоматизировать и упростить работу с маркетплейсом. В числе возможностей интеграции: * управление каталогом товаров и витриной, * обработка заказов, * изменение настроек магазина, * получение отчетов.
|
||||
*
|
||||
* The version of the OpenAPI document: LATEST
|
||||
*
|
||||
*
|
||||
* 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.OutletLicensesApi = void 0;
|
||||
const runtime = require("../runtime");
|
||||
const index_1 = require("../models/index");
|
||||
/**
|
||||
*
|
||||
*/
|
||||
class OutletLicensesApi extends runtime.BaseAPI {
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/deleteOutletLicenses.md) %} Удаляет информацию о лицензиях для точек продаж. {% include notitle [limit](../../_auto/method_limits/deleteOutletLicenses.md) %}
|
||||
* Удаление лицензий для точек продаж
|
||||
*/
|
||||
deleteOutletLicensesRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['campaignId'] == null) {
|
||||
throw new runtime.RequiredError('campaignId', 'Required parameter "campaignId" was null or undefined when calling deleteOutletLicenses().');
|
||||
}
|
||||
if (requestParameters['ids'] == null) {
|
||||
throw new runtime.RequiredError('ids', 'Required parameter "ids" was null or undefined when calling deleteOutletLicenses().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
if (requestParameters['ids'] != null) {
|
||||
queryParameters['ids'] = Array.from(requestParameters['ids']).join(runtime.COLLECTION_FORMATS["csv"]);
|
||||
}
|
||||
const headerParameters = {};
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v2/campaigns/{campaignId}/outlets/licenses`.replace(`{${"campaignId"}}`, encodeURIComponent(String(requestParameters['campaignId']))),
|
||||
method: 'DELETE',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.EmptyApiResponseFromJSON)(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/deleteOutletLicenses.md) %} Удаляет информацию о лицензиях для точек продаж. {% include notitle [limit](../../_auto/method_limits/deleteOutletLicenses.md) %}
|
||||
* Удаление лицензий для точек продаж
|
||||
*/
|
||||
deleteOutletLicenses(campaignId, ids, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.deleteOutletLicensesRaw({ campaignId: campaignId, ids: ids }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getOutletLicenses.md) %} Возвращает информацию о лицензиях для точек продаж. {% include notitle [limit](../../_auto/method_limits/getOutletLicenses.md) %}
|
||||
* Информация о лицензиях для точек продаж
|
||||
*/
|
||||
getOutletLicensesRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['campaignId'] == null) {
|
||||
throw new runtime.RequiredError('campaignId', 'Required parameter "campaignId" was null or undefined when calling getOutletLicenses().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
if (requestParameters['outletIds'] != null) {
|
||||
queryParameters['outletIds'] = Array.from(requestParameters['outletIds']).join(runtime.COLLECTION_FORMATS["csv"]);
|
||||
}
|
||||
if (requestParameters['ids'] != null) {
|
||||
queryParameters['ids'] = Array.from(requestParameters['ids']).join(runtime.COLLECTION_FORMATS["csv"]);
|
||||
}
|
||||
const headerParameters = {};
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v2/campaigns/{campaignId}/outlets/licenses`.replace(`{${"campaignId"}}`, encodeURIComponent(String(requestParameters['campaignId']))),
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.GetOutletLicensesResponseFromJSON)(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getOutletLicenses.md) %} Возвращает информацию о лицензиях для точек продаж. {% include notitle [limit](../../_auto/method_limits/getOutletLicenses.md) %}
|
||||
* Информация о лицензиях для точек продаж
|
||||
*/
|
||||
getOutletLicenses(campaignId, outletIds, ids, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.getOutletLicensesRaw({ campaignId: campaignId, outletIds: outletIds, ids: ids }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/updateOutletLicenses.md) %} Передает информацию о новых и существующих лицензиях для точек продаж. Поддерживаются только лицензии на розничную продажу алкоголя. Чтобы размещать алкогольную продукцию на Маркете, надо также прислать гарантийное письмо (если вы еще не делали этого раньше) и правильно оформить предложения в прайс-листе. Далее информация о лицензиях проходит проверку. {% include notitle [limit](../../_auto/method_limits/updateOutletLicenses.md) %}
|
||||
* Создание и изменение лицензий для точек продаж
|
||||
*/
|
||||
updateOutletLicensesRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['campaignId'] == null) {
|
||||
throw new runtime.RequiredError('campaignId', 'Required parameter "campaignId" was null or undefined when calling updateOutletLicenses().');
|
||||
}
|
||||
if (requestParameters['updateOutletLicenseRequest'] == null) {
|
||||
throw new runtime.RequiredError('updateOutletLicenseRequest', 'Required parameter "updateOutletLicenseRequest" was null or undefined when calling updateOutletLicenses().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
const headerParameters = {};
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v2/campaigns/{campaignId}/outlets/licenses`.replace(`{${"campaignId"}}`, encodeURIComponent(String(requestParameters['campaignId']))),
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: (0, index_1.UpdateOutletLicenseRequestToJSON)(requestParameters['updateOutletLicenseRequest']),
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.EmptyApiResponseFromJSON)(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/updateOutletLicenses.md) %} Передает информацию о новых и существующих лицензиях для точек продаж. Поддерживаются только лицензии на розничную продажу алкоголя. Чтобы размещать алкогольную продукцию на Маркете, надо также прислать гарантийное письмо (если вы еще не делали этого раньше) и правильно оформить предложения в прайс-листе. Далее информация о лицензиях проходит проверку. {% include notitle [limit](../../_auto/method_limits/updateOutletLicenses.md) %}
|
||||
* Создание и изменение лицензий для точек продаж
|
||||
*/
|
||||
updateOutletLicenses(campaignId, updateOutletLicenseRequest, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.updateOutletLicensesRaw({ campaignId: campaignId, updateOutletLicenseRequest: updateOutletLicenseRequest }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
}
|
||||
exports.OutletLicensesApi = OutletLicensesApi;
|
||||
93
dist/apis/OutletsApi.d.ts
vendored
Normal file
93
dist/apis/OutletsApi.d.ts
vendored
Normal file
@@ -0,0 +1,93 @@
|
||||
/**
|
||||
* API Яндекс Маркета для продавцов
|
||||
* API Яндекс Маркета помогает продавцам автоматизировать и упростить работу с маркетплейсом. В числе возможностей интеграции: * управление каталогом товаров и витриной, * обработка заказов, * изменение настроек магазина, * получение отчетов.
|
||||
*
|
||||
* The version of the OpenAPI document: LATEST
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
import * as runtime from '../runtime';
|
||||
import type { ChangeOutletRequest, CreateOutletResponse, EmptyApiResponse, GetOutletResponse, GetOutletsResponse } from '../models/index';
|
||||
export interface OutletsApiCreateOutletRequest {
|
||||
campaignId: number;
|
||||
changeOutletRequest: ChangeOutletRequest;
|
||||
}
|
||||
export interface OutletsApiDeleteOutletRequest {
|
||||
campaignId: number;
|
||||
outletId: number;
|
||||
}
|
||||
export interface OutletsApiGetOutletRequest {
|
||||
campaignId: number;
|
||||
outletId: number;
|
||||
}
|
||||
export interface OutletsApiGetOutletsRequest {
|
||||
campaignId: number;
|
||||
pageToken?: string;
|
||||
limit?: number;
|
||||
regionId?: number;
|
||||
shopOutletCode?: string;
|
||||
regionId2?: number;
|
||||
}
|
||||
export interface OutletsApiUpdateOutletRequest {
|
||||
campaignId: number;
|
||||
outletId: number;
|
||||
changeOutletRequest: ChangeOutletRequest;
|
||||
}
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export declare class OutletsApi extends runtime.BaseAPI {
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/createOutlet.md) %} Создает точку продаж магазина на Маркете. {% include notitle [limit](../../_auto/method_limits/createOutlet.md) %}
|
||||
* Создание точки продаж
|
||||
*/
|
||||
createOutletRaw(requestParameters: OutletsApiCreateOutletRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CreateOutletResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/createOutlet.md) %} Создает точку продаж магазина на Маркете. {% include notitle [limit](../../_auto/method_limits/createOutlet.md) %}
|
||||
* Создание точки продаж
|
||||
*/
|
||||
createOutlet(campaignId: number, changeOutletRequest: ChangeOutletRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CreateOutletResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/deleteOutlet.md) %} Удаляет точку продаж магазина на Маркете. {% include notitle [limit](../../_auto/method_limits/deleteOutlet.md) %}
|
||||
* Удаление точки продаж
|
||||
*/
|
||||
deleteOutletRaw(requestParameters: OutletsApiDeleteOutletRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<EmptyApiResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/deleteOutlet.md) %} Удаляет точку продаж магазина на Маркете. {% include notitle [limit](../../_auto/method_limits/deleteOutlet.md) %}
|
||||
* Удаление точки продаж
|
||||
*/
|
||||
deleteOutlet(campaignId: number, outletId: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<EmptyApiResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getOutlet.md) %} Возвращает информацию о точках продаж магазина. {% include notitle [limit](../../_auto/method_limits/getOutlet.md) %}
|
||||
* Информация об одной точке продаж
|
||||
*/
|
||||
getOutletRaw(requestParameters: OutletsApiGetOutletRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetOutletResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getOutlet.md) %} Возвращает информацию о точках продаж магазина. {% include notitle [limit](../../_auto/method_limits/getOutlet.md) %}
|
||||
* Информация об одной точке продаж
|
||||
*/
|
||||
getOutlet(campaignId: number, outletId: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetOutletResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getOutlets.md) %} Возвращает список точек продаж магазина. {% include notitle [limit](../../_auto/method_limits/getOutlets.md) %}
|
||||
* Информация о нескольких точках продаж
|
||||
*/
|
||||
getOutletsRaw(requestParameters: OutletsApiGetOutletsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetOutletsResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getOutlets.md) %} Возвращает список точек продаж магазина. {% include notitle [limit](../../_auto/method_limits/getOutlets.md) %}
|
||||
* Информация о нескольких точках продаж
|
||||
*/
|
||||
getOutlets(campaignId: number, pageToken?: string, limit?: number, regionId?: number, shopOutletCode?: string, regionId2?: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetOutletsResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/updateOutlet.md) %} Изменяет информацию о точке продаж магазина на Маркете. {% include notitle [limit](../../_auto/method_limits/updateOutlet.md) %}
|
||||
* Изменение информации о точке продаж
|
||||
*/
|
||||
updateOutletRaw(requestParameters: OutletsApiUpdateOutletRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<EmptyApiResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/updateOutlet.md) %} Изменяет информацию о точке продаж магазина на Маркете. {% include notitle [limit](../../_auto/method_limits/updateOutlet.md) %}
|
||||
* Изменение информации о точке продаж
|
||||
*/
|
||||
updateOutlet(campaignId: number, outletId: number, changeOutletRequest: ChangeOutletRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<EmptyApiResponse>;
|
||||
}
|
||||
252
dist/apis/OutletsApi.js
vendored
Normal file
252
dist/apis/OutletsApi.js
vendored
Normal file
@@ -0,0 +1,252 @@
|
||||
"use strict";
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* API Яндекс Маркета для продавцов
|
||||
* API Яндекс Маркета помогает продавцам автоматизировать и упростить работу с маркетплейсом. В числе возможностей интеграции: * управление каталогом товаров и витриной, * обработка заказов, * изменение настроек магазина, * получение отчетов.
|
||||
*
|
||||
* The version of the OpenAPI document: LATEST
|
||||
*
|
||||
*
|
||||
* 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.OutletsApi = void 0;
|
||||
const runtime = require("../runtime");
|
||||
const index_1 = require("../models/index");
|
||||
/**
|
||||
*
|
||||
*/
|
||||
class OutletsApi extends runtime.BaseAPI {
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/createOutlet.md) %} Создает точку продаж магазина на Маркете. {% include notitle [limit](../../_auto/method_limits/createOutlet.md) %}
|
||||
* Создание точки продаж
|
||||
*/
|
||||
createOutletRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['campaignId'] == null) {
|
||||
throw new runtime.RequiredError('campaignId', 'Required parameter "campaignId" was null or undefined when calling createOutlet().');
|
||||
}
|
||||
if (requestParameters['changeOutletRequest'] == null) {
|
||||
throw new runtime.RequiredError('changeOutletRequest', 'Required parameter "changeOutletRequest" was null or undefined when calling createOutlet().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
const headerParameters = {};
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v2/campaigns/{campaignId}/outlets`.replace(`{${"campaignId"}}`, encodeURIComponent(String(requestParameters['campaignId']))),
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: (0, index_1.ChangeOutletRequestToJSON)(requestParameters['changeOutletRequest']),
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.CreateOutletResponseFromJSON)(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/createOutlet.md) %} Создает точку продаж магазина на Маркете. {% include notitle [limit](../../_auto/method_limits/createOutlet.md) %}
|
||||
* Создание точки продаж
|
||||
*/
|
||||
createOutlet(campaignId, changeOutletRequest, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.createOutletRaw({ campaignId: campaignId, changeOutletRequest: changeOutletRequest }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/deleteOutlet.md) %} Удаляет точку продаж магазина на Маркете. {% include notitle [limit](../../_auto/method_limits/deleteOutlet.md) %}
|
||||
* Удаление точки продаж
|
||||
*/
|
||||
deleteOutletRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['campaignId'] == null) {
|
||||
throw new runtime.RequiredError('campaignId', 'Required parameter "campaignId" was null or undefined when calling deleteOutlet().');
|
||||
}
|
||||
if (requestParameters['outletId'] == null) {
|
||||
throw new runtime.RequiredError('outletId', 'Required parameter "outletId" was null or undefined when calling deleteOutlet().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
const headerParameters = {};
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v2/campaigns/{campaignId}/outlets/{outletId}`.replace(`{${"campaignId"}}`, encodeURIComponent(String(requestParameters['campaignId']))).replace(`{${"outletId"}}`, encodeURIComponent(String(requestParameters['outletId']))),
|
||||
method: 'DELETE',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.EmptyApiResponseFromJSON)(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/deleteOutlet.md) %} Удаляет точку продаж магазина на Маркете. {% include notitle [limit](../../_auto/method_limits/deleteOutlet.md) %}
|
||||
* Удаление точки продаж
|
||||
*/
|
||||
deleteOutlet(campaignId, outletId, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.deleteOutletRaw({ campaignId: campaignId, outletId: outletId }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getOutlet.md) %} Возвращает информацию о точках продаж магазина. {% include notitle [limit](../../_auto/method_limits/getOutlet.md) %}
|
||||
* Информация об одной точке продаж
|
||||
*/
|
||||
getOutletRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['campaignId'] == null) {
|
||||
throw new runtime.RequiredError('campaignId', 'Required parameter "campaignId" was null or undefined when calling getOutlet().');
|
||||
}
|
||||
if (requestParameters['outletId'] == null) {
|
||||
throw new runtime.RequiredError('outletId', 'Required parameter "outletId" was null or undefined when calling getOutlet().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
const headerParameters = {};
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v2/campaigns/{campaignId}/outlets/{outletId}`.replace(`{${"campaignId"}}`, encodeURIComponent(String(requestParameters['campaignId']))).replace(`{${"outletId"}}`, encodeURIComponent(String(requestParameters['outletId']))),
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.GetOutletResponseFromJSON)(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getOutlet.md) %} Возвращает информацию о точках продаж магазина. {% include notitle [limit](../../_auto/method_limits/getOutlet.md) %}
|
||||
* Информация об одной точке продаж
|
||||
*/
|
||||
getOutlet(campaignId, outletId, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.getOutletRaw({ campaignId: campaignId, outletId: outletId }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getOutlets.md) %} Возвращает список точек продаж магазина. {% include notitle [limit](../../_auto/method_limits/getOutlets.md) %}
|
||||
* Информация о нескольких точках продаж
|
||||
*/
|
||||
getOutletsRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['campaignId'] == null) {
|
||||
throw new runtime.RequiredError('campaignId', 'Required parameter "campaignId" was null or undefined when calling getOutlets().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
if (requestParameters['pageToken'] != null) {
|
||||
queryParameters['pageToken'] = requestParameters['pageToken'];
|
||||
}
|
||||
if (requestParameters['limit'] != null) {
|
||||
queryParameters['limit'] = requestParameters['limit'];
|
||||
}
|
||||
if (requestParameters['regionId'] != null) {
|
||||
queryParameters['region_id'] = requestParameters['regionId'];
|
||||
}
|
||||
if (requestParameters['shopOutletCode'] != null) {
|
||||
queryParameters['shop_outlet_code'] = requestParameters['shopOutletCode'];
|
||||
}
|
||||
if (requestParameters['regionId2'] != null) {
|
||||
queryParameters['regionId'] = requestParameters['regionId2'];
|
||||
}
|
||||
const headerParameters = {};
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v2/campaigns/{campaignId}/outlets`.replace(`{${"campaignId"}}`, encodeURIComponent(String(requestParameters['campaignId']))),
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.GetOutletsResponseFromJSON)(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getOutlets.md) %} Возвращает список точек продаж магазина. {% include notitle [limit](../../_auto/method_limits/getOutlets.md) %}
|
||||
* Информация о нескольких точках продаж
|
||||
*/
|
||||
getOutlets(campaignId, pageToken, limit, regionId, shopOutletCode, regionId2, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.getOutletsRaw({ campaignId: campaignId, pageToken: pageToken, limit: limit, regionId: regionId, shopOutletCode: shopOutletCode, regionId2: regionId2 }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/updateOutlet.md) %} Изменяет информацию о точке продаж магазина на Маркете. {% include notitle [limit](../../_auto/method_limits/updateOutlet.md) %}
|
||||
* Изменение информации о точке продаж
|
||||
*/
|
||||
updateOutletRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['campaignId'] == null) {
|
||||
throw new runtime.RequiredError('campaignId', 'Required parameter "campaignId" was null or undefined when calling updateOutlet().');
|
||||
}
|
||||
if (requestParameters['outletId'] == null) {
|
||||
throw new runtime.RequiredError('outletId', 'Required parameter "outletId" was null or undefined when calling updateOutlet().');
|
||||
}
|
||||
if (requestParameters['changeOutletRequest'] == null) {
|
||||
throw new runtime.RequiredError('changeOutletRequest', 'Required parameter "changeOutletRequest" was null or undefined when calling updateOutlet().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
const headerParameters = {};
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v2/campaigns/{campaignId}/outlets/{outletId}`.replace(`{${"campaignId"}}`, encodeURIComponent(String(requestParameters['campaignId']))).replace(`{${"outletId"}}`, encodeURIComponent(String(requestParameters['outletId']))),
|
||||
method: 'PUT',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: (0, index_1.ChangeOutletRequestToJSON)(requestParameters['changeOutletRequest']),
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.EmptyApiResponseFromJSON)(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/updateOutlet.md) %} Изменяет информацию о точке продаж магазина на Маркете. {% include notitle [limit](../../_auto/method_limits/updateOutlet.md) %}
|
||||
* Изменение информации о точке продаж
|
||||
*/
|
||||
updateOutlet(campaignId, outletId, changeOutletRequest, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.updateOutletRaw({ campaignId: campaignId, outletId: outletId, changeOutletRequest: changeOutletRequest }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
}
|
||||
exports.OutletsApi = OutletsApi;
|
||||
78
dist/apis/PriceQuarantineApi.d.ts
vendored
Normal file
78
dist/apis/PriceQuarantineApi.d.ts
vendored
Normal file
@@ -0,0 +1,78 @@
|
||||
/**
|
||||
* API Яндекс Маркета для продавцов
|
||||
* API Яндекс Маркета помогает продавцам автоматизировать и упростить работу с маркетплейсом. В числе возможностей интеграции: * управление каталогом товаров и витриной, * обработка заказов, * изменение настроек магазина, * получение отчетов.
|
||||
*
|
||||
* The version of the OpenAPI document: LATEST
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
import * as runtime from '../runtime';
|
||||
import type { ConfirmPricesRequest, EmptyApiResponse, GetQuarantineOffersRequest, GetQuarantineOffersResponse } from '../models/index';
|
||||
export interface PriceQuarantineApiConfirmBusinessPricesRequest {
|
||||
businessId: number;
|
||||
confirmPricesRequest: ConfirmPricesRequest;
|
||||
}
|
||||
export interface PriceQuarantineApiConfirmCampaignPricesRequest {
|
||||
campaignId: number;
|
||||
confirmPricesRequest: ConfirmPricesRequest;
|
||||
}
|
||||
export interface PriceQuarantineApiGetBusinessQuarantineOffersRequest {
|
||||
businessId: number;
|
||||
getQuarantineOffersRequest: GetQuarantineOffersRequest;
|
||||
pageToken?: string;
|
||||
limit?: number;
|
||||
}
|
||||
export interface PriceQuarantineApiGetCampaignQuarantineOffersRequest {
|
||||
campaignId: number;
|
||||
getQuarantineOffersRequest: GetQuarantineOffersRequest;
|
||||
pageToken?: string;
|
||||
limit?: number;
|
||||
}
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export declare class PriceQuarantineApi extends runtime.BaseAPI {
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/confirmBusinessPrices.md) %} Подтверждает во всех магазинах цену на товары, которые попали в карантин, и удаляет их из карантина. Товар попадает в карантин, если его цена меняется слишком резко. [Как настроить карантин](https://yandex.ru/support/marketplace/assortment/operations/prices.html#quarantine) Чтобы увидеть список товаров, которые попали в карантин, используйте запрос [POST v2/businesses/{businessId}/price-quarantine](getBusinessQuarantineOffers.md). {% include notitle [limit](../../_auto/method_limits/confirmBusinessPrices.md) %}
|
||||
* Удаление товара из карантина по цене в кабинете
|
||||
*/
|
||||
confirmBusinessPricesRaw(requestParameters: PriceQuarantineApiConfirmBusinessPricesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<EmptyApiResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/confirmBusinessPrices.md) %} Подтверждает во всех магазинах цену на товары, которые попали в карантин, и удаляет их из карантина. Товар попадает в карантин, если его цена меняется слишком резко. [Как настроить карантин](https://yandex.ru/support/marketplace/assortment/operations/prices.html#quarantine) Чтобы увидеть список товаров, которые попали в карантин, используйте запрос [POST v2/businesses/{businessId}/price-quarantine](getBusinessQuarantineOffers.md). {% include notitle [limit](../../_auto/method_limits/confirmBusinessPrices.md) %}
|
||||
* Удаление товара из карантина по цене в кабинете
|
||||
*/
|
||||
confirmBusinessPrices(businessId: number, confirmPricesRequest: ConfirmPricesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<EmptyApiResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/confirmCampaignPrices.md) %} Подтверждает в заданном магазине цену на товары, которые попали в карантин, и удаляет их из карантина. Товар попадает в карантин, если его цена меняется слишком резко. [Как настроить карантин](https://yandex.ru/support/marketplace/assortment/operations/prices.html#quarantine) Чтобы увидеть список товаров, которые попали в карантин, используйте запрос [POST v2/campaigns/{campaignId}/price-quarantine](getCampaignQuarantineOffers.md). {% include notitle [limit](../../_auto/method_limits/confirmCampaignPrices.md) %}
|
||||
* Удаление товара из карантина по цене в магазине
|
||||
*/
|
||||
confirmCampaignPricesRaw(requestParameters: PriceQuarantineApiConfirmCampaignPricesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<EmptyApiResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/confirmCampaignPrices.md) %} Подтверждает в заданном магазине цену на товары, которые попали в карантин, и удаляет их из карантина. Товар попадает в карантин, если его цена меняется слишком резко. [Как настроить карантин](https://yandex.ru/support/marketplace/assortment/operations/prices.html#quarantine) Чтобы увидеть список товаров, которые попали в карантин, используйте запрос [POST v2/campaigns/{campaignId}/price-quarantine](getCampaignQuarantineOffers.md). {% include notitle [limit](../../_auto/method_limits/confirmCampaignPrices.md) %}
|
||||
* Удаление товара из карантина по цене в магазине
|
||||
*/
|
||||
confirmCampaignPrices(campaignId: number, confirmPricesRequest: ConfirmPricesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<EmptyApiResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getBusinessQuarantineOffers.md) %} Возвращает список товаров, которые находятся в карантине по цене, установленной для всех магазинов кабинета. Проверьте цену каждого из товаров, который попал в карантин. Если ошибки нет и цена правильная, подтвердите ее с помощью запроса [POST v2/businesses/{businessId}/price-quarantine/confirm](../../reference/price-quarantine/confirmBusinessPrices.md). Если цена в самом деле ошибочная, установите верную с помощью запроса [POST v2/businesses/{businessId}/offer-prices/updates](../../reference/prices/updateBusinessPrices.md). {% note info \"Что такое карантин?\" %} Товар попадает в карантин, если его цена меняется слишком резко или слишком сильно отличается от рыночной. [Подробнее](https://yandex.ru/support/marketplace/assortment/operations/prices.html#quarantine) {% endnote %} В запросе можно использовать фильтры. Результаты возвращаются постранично. {% include notitle [limit](../../_auto/method_limits/getBusinessQuarantineOffers.md) %}
|
||||
* Список товаров, находящихся в карантине по цене в кабинете
|
||||
*/
|
||||
getBusinessQuarantineOffersRaw(requestParameters: PriceQuarantineApiGetBusinessQuarantineOffersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetQuarantineOffersResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getBusinessQuarantineOffers.md) %} Возвращает список товаров, которые находятся в карантине по цене, установленной для всех магазинов кабинета. Проверьте цену каждого из товаров, который попал в карантин. Если ошибки нет и цена правильная, подтвердите ее с помощью запроса [POST v2/businesses/{businessId}/price-quarantine/confirm](../../reference/price-quarantine/confirmBusinessPrices.md). Если цена в самом деле ошибочная, установите верную с помощью запроса [POST v2/businesses/{businessId}/offer-prices/updates](../../reference/prices/updateBusinessPrices.md). {% note info \"Что такое карантин?\" %} Товар попадает в карантин, если его цена меняется слишком резко или слишком сильно отличается от рыночной. [Подробнее](https://yandex.ru/support/marketplace/assortment/operations/prices.html#quarantine) {% endnote %} В запросе можно использовать фильтры. Результаты возвращаются постранично. {% include notitle [limit](../../_auto/method_limits/getBusinessQuarantineOffers.md) %}
|
||||
* Список товаров, находящихся в карантине по цене в кабинете
|
||||
*/
|
||||
getBusinessQuarantineOffers(businessId: number, getQuarantineOffersRequest: GetQuarantineOffersRequest, pageToken?: string, limit?: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetQuarantineOffersResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getCampaignQuarantineOffers.md) %} Возвращает список товаров, которые находятся в карантине по цене, установленной в заданном магазине. Проверьте цену каждого из товаров, который попал в карантин. Если ошибки нет и цена правильная, подтвердите ее с помощью запроса [POST v2/campaigns/{campaignId}/price-quarantine/confirm](../../reference/price-quarantine/confirmCampaignPrices.md). Если цена в самом деле ошибочная, установите верную с помощью запроса [POST v2/campaigns/{campaignId}/offer-prices/updates](../../reference/prices/updatePrices.md). {% note info \"Что такое карантин?\" %} Товар попадает в карантин, если его цена меняется слишком резко или слишком сильно отличается от рыночной. [Подробнее](https://yandex.ru/support/marketplace/assortment/operations/prices.html#quarantine) {% endnote %} В запросе можно использовать фильтры. Результаты возвращаются постранично. {% include notitle [limit](../../_auto/method_limits/getCampaignQuarantineOffers.md) %}
|
||||
* Список товаров, находящихся в карантине по цене в магазине
|
||||
*/
|
||||
getCampaignQuarantineOffersRaw(requestParameters: PriceQuarantineApiGetCampaignQuarantineOffersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetQuarantineOffersResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getCampaignQuarantineOffers.md) %} Возвращает список товаров, которые находятся в карантине по цене, установленной в заданном магазине. Проверьте цену каждого из товаров, который попал в карантин. Если ошибки нет и цена правильная, подтвердите ее с помощью запроса [POST v2/campaigns/{campaignId}/price-quarantine/confirm](../../reference/price-quarantine/confirmCampaignPrices.md). Если цена в самом деле ошибочная, установите верную с помощью запроса [POST v2/campaigns/{campaignId}/offer-prices/updates](../../reference/prices/updatePrices.md). {% note info \"Что такое карантин?\" %} Товар попадает в карантин, если его цена меняется слишком резко или слишком сильно отличается от рыночной. [Подробнее](https://yandex.ru/support/marketplace/assortment/operations/prices.html#quarantine) {% endnote %} В запросе можно использовать фильтры. Результаты возвращаются постранично. {% include notitle [limit](../../_auto/method_limits/getCampaignQuarantineOffers.md) %}
|
||||
* Список товаров, находящихся в карантине по цене в магазине
|
||||
*/
|
||||
getCampaignQuarantineOffers(campaignId: number, getQuarantineOffersRequest: GetQuarantineOffersRequest, pageToken?: string, limit?: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetQuarantineOffersResponse>;
|
||||
}
|
||||
213
dist/apis/PriceQuarantineApi.js
vendored
Normal file
213
dist/apis/PriceQuarantineApi.js
vendored
Normal file
@@ -0,0 +1,213 @@
|
||||
"use strict";
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* API Яндекс Маркета для продавцов
|
||||
* API Яндекс Маркета помогает продавцам автоматизировать и упростить работу с маркетплейсом. В числе возможностей интеграции: * управление каталогом товаров и витриной, * обработка заказов, * изменение настроек магазина, * получение отчетов.
|
||||
*
|
||||
* The version of the OpenAPI document: LATEST
|
||||
*
|
||||
*
|
||||
* 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.PriceQuarantineApi = void 0;
|
||||
const runtime = require("../runtime");
|
||||
const index_1 = require("../models/index");
|
||||
/**
|
||||
*
|
||||
*/
|
||||
class PriceQuarantineApi extends runtime.BaseAPI {
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/confirmBusinessPrices.md) %} Подтверждает во всех магазинах цену на товары, которые попали в карантин, и удаляет их из карантина. Товар попадает в карантин, если его цена меняется слишком резко. [Как настроить карантин](https://yandex.ru/support/marketplace/assortment/operations/prices.html#quarantine) Чтобы увидеть список товаров, которые попали в карантин, используйте запрос [POST v2/businesses/{businessId}/price-quarantine](getBusinessQuarantineOffers.md). {% include notitle [limit](../../_auto/method_limits/confirmBusinessPrices.md) %}
|
||||
* Удаление товара из карантина по цене в кабинете
|
||||
*/
|
||||
confirmBusinessPricesRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['businessId'] == null) {
|
||||
throw new runtime.RequiredError('businessId', 'Required parameter "businessId" was null or undefined when calling confirmBusinessPrices().');
|
||||
}
|
||||
if (requestParameters['confirmPricesRequest'] == null) {
|
||||
throw new runtime.RequiredError('confirmPricesRequest', 'Required parameter "confirmPricesRequest" was null or undefined when calling confirmBusinessPrices().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
const headerParameters = {};
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v2/businesses/{businessId}/price-quarantine/confirm`.replace(`{${"businessId"}}`, encodeURIComponent(String(requestParameters['businessId']))),
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: (0, index_1.ConfirmPricesRequestToJSON)(requestParameters['confirmPricesRequest']),
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.EmptyApiResponseFromJSON)(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/confirmBusinessPrices.md) %} Подтверждает во всех магазинах цену на товары, которые попали в карантин, и удаляет их из карантина. Товар попадает в карантин, если его цена меняется слишком резко. [Как настроить карантин](https://yandex.ru/support/marketplace/assortment/operations/prices.html#quarantine) Чтобы увидеть список товаров, которые попали в карантин, используйте запрос [POST v2/businesses/{businessId}/price-quarantine](getBusinessQuarantineOffers.md). {% include notitle [limit](../../_auto/method_limits/confirmBusinessPrices.md) %}
|
||||
* Удаление товара из карантина по цене в кабинете
|
||||
*/
|
||||
confirmBusinessPrices(businessId, confirmPricesRequest, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.confirmBusinessPricesRaw({ businessId: businessId, confirmPricesRequest: confirmPricesRequest }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/confirmCampaignPrices.md) %} Подтверждает в заданном магазине цену на товары, которые попали в карантин, и удаляет их из карантина. Товар попадает в карантин, если его цена меняется слишком резко. [Как настроить карантин](https://yandex.ru/support/marketplace/assortment/operations/prices.html#quarantine) Чтобы увидеть список товаров, которые попали в карантин, используйте запрос [POST v2/campaigns/{campaignId}/price-quarantine](getCampaignQuarantineOffers.md). {% include notitle [limit](../../_auto/method_limits/confirmCampaignPrices.md) %}
|
||||
* Удаление товара из карантина по цене в магазине
|
||||
*/
|
||||
confirmCampaignPricesRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['campaignId'] == null) {
|
||||
throw new runtime.RequiredError('campaignId', 'Required parameter "campaignId" was null or undefined when calling confirmCampaignPrices().');
|
||||
}
|
||||
if (requestParameters['confirmPricesRequest'] == null) {
|
||||
throw new runtime.RequiredError('confirmPricesRequest', 'Required parameter "confirmPricesRequest" was null or undefined when calling confirmCampaignPrices().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
const headerParameters = {};
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v2/campaigns/{campaignId}/price-quarantine/confirm`.replace(`{${"campaignId"}}`, encodeURIComponent(String(requestParameters['campaignId']))),
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: (0, index_1.ConfirmPricesRequestToJSON)(requestParameters['confirmPricesRequest']),
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.EmptyApiResponseFromJSON)(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/confirmCampaignPrices.md) %} Подтверждает в заданном магазине цену на товары, которые попали в карантин, и удаляет их из карантина. Товар попадает в карантин, если его цена меняется слишком резко. [Как настроить карантин](https://yandex.ru/support/marketplace/assortment/operations/prices.html#quarantine) Чтобы увидеть список товаров, которые попали в карантин, используйте запрос [POST v2/campaigns/{campaignId}/price-quarantine](getCampaignQuarantineOffers.md). {% include notitle [limit](../../_auto/method_limits/confirmCampaignPrices.md) %}
|
||||
* Удаление товара из карантина по цене в магазине
|
||||
*/
|
||||
confirmCampaignPrices(campaignId, confirmPricesRequest, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.confirmCampaignPricesRaw({ campaignId: campaignId, confirmPricesRequest: confirmPricesRequest }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getBusinessQuarantineOffers.md) %} Возвращает список товаров, которые находятся в карантине по цене, установленной для всех магазинов кабинета. Проверьте цену каждого из товаров, который попал в карантин. Если ошибки нет и цена правильная, подтвердите ее с помощью запроса [POST v2/businesses/{businessId}/price-quarantine/confirm](../../reference/price-quarantine/confirmBusinessPrices.md). Если цена в самом деле ошибочная, установите верную с помощью запроса [POST v2/businesses/{businessId}/offer-prices/updates](../../reference/prices/updateBusinessPrices.md). {% note info \"Что такое карантин?\" %} Товар попадает в карантин, если его цена меняется слишком резко или слишком сильно отличается от рыночной. [Подробнее](https://yandex.ru/support/marketplace/assortment/operations/prices.html#quarantine) {% endnote %} В запросе можно использовать фильтры. Результаты возвращаются постранично. {% include notitle [limit](../../_auto/method_limits/getBusinessQuarantineOffers.md) %}
|
||||
* Список товаров, находящихся в карантине по цене в кабинете
|
||||
*/
|
||||
getBusinessQuarantineOffersRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['businessId'] == null) {
|
||||
throw new runtime.RequiredError('businessId', 'Required parameter "businessId" was null or undefined when calling getBusinessQuarantineOffers().');
|
||||
}
|
||||
if (requestParameters['getQuarantineOffersRequest'] == null) {
|
||||
throw new runtime.RequiredError('getQuarantineOffersRequest', 'Required parameter "getQuarantineOffersRequest" was null or undefined when calling getBusinessQuarantineOffers().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
if (requestParameters['pageToken'] != null) {
|
||||
queryParameters['pageToken'] = requestParameters['pageToken'];
|
||||
}
|
||||
if (requestParameters['limit'] != null) {
|
||||
queryParameters['limit'] = requestParameters['limit'];
|
||||
}
|
||||
const headerParameters = {};
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v2/businesses/{businessId}/price-quarantine`.replace(`{${"businessId"}}`, encodeURIComponent(String(requestParameters['businessId']))),
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: (0, index_1.GetQuarantineOffersRequestToJSON)(requestParameters['getQuarantineOffersRequest']),
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.GetQuarantineOffersResponseFromJSON)(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getBusinessQuarantineOffers.md) %} Возвращает список товаров, которые находятся в карантине по цене, установленной для всех магазинов кабинета. Проверьте цену каждого из товаров, который попал в карантин. Если ошибки нет и цена правильная, подтвердите ее с помощью запроса [POST v2/businesses/{businessId}/price-quarantine/confirm](../../reference/price-quarantine/confirmBusinessPrices.md). Если цена в самом деле ошибочная, установите верную с помощью запроса [POST v2/businesses/{businessId}/offer-prices/updates](../../reference/prices/updateBusinessPrices.md). {% note info \"Что такое карантин?\" %} Товар попадает в карантин, если его цена меняется слишком резко или слишком сильно отличается от рыночной. [Подробнее](https://yandex.ru/support/marketplace/assortment/operations/prices.html#quarantine) {% endnote %} В запросе можно использовать фильтры. Результаты возвращаются постранично. {% include notitle [limit](../../_auto/method_limits/getBusinessQuarantineOffers.md) %}
|
||||
* Список товаров, находящихся в карантине по цене в кабинете
|
||||
*/
|
||||
getBusinessQuarantineOffers(businessId, getQuarantineOffersRequest, pageToken, limit, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.getBusinessQuarantineOffersRaw({ businessId: businessId, getQuarantineOffersRequest: getQuarantineOffersRequest, pageToken: pageToken, limit: limit }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getCampaignQuarantineOffers.md) %} Возвращает список товаров, которые находятся в карантине по цене, установленной в заданном магазине. Проверьте цену каждого из товаров, который попал в карантин. Если ошибки нет и цена правильная, подтвердите ее с помощью запроса [POST v2/campaigns/{campaignId}/price-quarantine/confirm](../../reference/price-quarantine/confirmCampaignPrices.md). Если цена в самом деле ошибочная, установите верную с помощью запроса [POST v2/campaigns/{campaignId}/offer-prices/updates](../../reference/prices/updatePrices.md). {% note info \"Что такое карантин?\" %} Товар попадает в карантин, если его цена меняется слишком резко или слишком сильно отличается от рыночной. [Подробнее](https://yandex.ru/support/marketplace/assortment/operations/prices.html#quarantine) {% endnote %} В запросе можно использовать фильтры. Результаты возвращаются постранично. {% include notitle [limit](../../_auto/method_limits/getCampaignQuarantineOffers.md) %}
|
||||
* Список товаров, находящихся в карантине по цене в магазине
|
||||
*/
|
||||
getCampaignQuarantineOffersRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['campaignId'] == null) {
|
||||
throw new runtime.RequiredError('campaignId', 'Required parameter "campaignId" was null or undefined when calling getCampaignQuarantineOffers().');
|
||||
}
|
||||
if (requestParameters['getQuarantineOffersRequest'] == null) {
|
||||
throw new runtime.RequiredError('getQuarantineOffersRequest', 'Required parameter "getQuarantineOffersRequest" was null or undefined when calling getCampaignQuarantineOffers().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
if (requestParameters['pageToken'] != null) {
|
||||
queryParameters['pageToken'] = requestParameters['pageToken'];
|
||||
}
|
||||
if (requestParameters['limit'] != null) {
|
||||
queryParameters['limit'] = requestParameters['limit'];
|
||||
}
|
||||
const headerParameters = {};
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v2/campaigns/{campaignId}/price-quarantine`.replace(`{${"campaignId"}}`, encodeURIComponent(String(requestParameters['campaignId']))),
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: (0, index_1.GetQuarantineOffersRequestToJSON)(requestParameters['getQuarantineOffersRequest']),
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.GetQuarantineOffersResponseFromJSON)(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getCampaignQuarantineOffers.md) %} Возвращает список товаров, которые находятся в карантине по цене, установленной в заданном магазине. Проверьте цену каждого из товаров, который попал в карантин. Если ошибки нет и цена правильная, подтвердите ее с помощью запроса [POST v2/campaigns/{campaignId}/price-quarantine/confirm](../../reference/price-quarantine/confirmCampaignPrices.md). Если цена в самом деле ошибочная, установите верную с помощью запроса [POST v2/campaigns/{campaignId}/offer-prices/updates](../../reference/prices/updatePrices.md). {% note info \"Что такое карантин?\" %} Товар попадает в карантин, если его цена меняется слишком резко или слишком сильно отличается от рыночной. [Подробнее](https://yandex.ru/support/marketplace/assortment/operations/prices.html#quarantine) {% endnote %} В запросе можно использовать фильтры. Результаты возвращаются постранично. {% include notitle [limit](../../_auto/method_limits/getCampaignQuarantineOffers.md) %}
|
||||
* Список товаров, находящихся в карантине по цене в магазине
|
||||
*/
|
||||
getCampaignQuarantineOffers(campaignId, getQuarantineOffersRequest, pageToken, limit, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.getCampaignQuarantineOffersRaw({ campaignId: campaignId, getQuarantineOffersRequest: getQuarantineOffersRequest, pageToken: pageToken, limit: limit }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
}
|
||||
exports.PriceQuarantineApi = PriceQuarantineApi;
|
||||
96
dist/apis/PricesApi.d.ts
vendored
Normal file
96
dist/apis/PricesApi.d.ts
vendored
Normal file
@@ -0,0 +1,96 @@
|
||||
/**
|
||||
* API Яндекс Маркета для продавцов
|
||||
* API Яндекс Маркета помогает продавцам автоматизировать и упростить работу с маркетплейсом. В числе возможностей интеграции: * управление каталогом товаров и витриной, * обработка заказов, * изменение настроек магазина, * получение отчетов.
|
||||
*
|
||||
* The version of the OpenAPI document: LATEST
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
import * as runtime from '../runtime';
|
||||
import type { EmptyApiResponse, GetDefaultPricesRequest, GetDefaultPricesResponse, GetPricesByOfferIdsRequest, GetPricesByOfferIdsResponse, GetPricesResponse, UpdateBusinessPricesRequest, UpdatePricesRequest } from '../models/index';
|
||||
export interface PricesApiGetDefaultPricesOperationRequest {
|
||||
businessId: number;
|
||||
pageToken?: string;
|
||||
limit?: number;
|
||||
getDefaultPricesRequest?: GetDefaultPricesRequest;
|
||||
}
|
||||
export interface PricesApiGetPricesRequest {
|
||||
campaignId: number;
|
||||
pageToken?: string;
|
||||
limit?: number;
|
||||
archived?: boolean;
|
||||
}
|
||||
export interface PricesApiGetPricesByOfferIdsOperationRequest {
|
||||
campaignId: number;
|
||||
pageToken?: string;
|
||||
limit?: number;
|
||||
getPricesByOfferIdsRequest?: GetPricesByOfferIdsRequest;
|
||||
}
|
||||
export interface PricesApiUpdateBusinessPricesOperationRequest {
|
||||
businessId: number;
|
||||
updateBusinessPricesRequest: UpdateBusinessPricesRequest;
|
||||
}
|
||||
export interface PricesApiUpdatePricesOperationRequest {
|
||||
campaignId: number;
|
||||
updatePricesRequest: UpdatePricesRequest;
|
||||
}
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export declare class PricesApi extends runtime.BaseAPI {
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getDefaultPrices.md) %} Возвращает список цен, которые вы установили для всех магазинов любым способом. Например, через API или с помощью Excel-шаблона. О способах установки цен читайте [в Справке Маркета для продавцов](https://yandex.ru/support/marketplace/assortment/operations/prices.html). {% include notitle [limit](../../_auto/method_limits/getDefaultPrices.md) %}
|
||||
* Просмотр цен на указанные товары во всех магазинах
|
||||
*/
|
||||
getDefaultPricesRaw(requestParameters: PricesApiGetDefaultPricesOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetDefaultPricesResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getDefaultPrices.md) %} Возвращает список цен, которые вы установили для всех магазинов любым способом. Например, через API или с помощью Excel-шаблона. О способах установки цен читайте [в Справке Маркета для продавцов](https://yandex.ru/support/marketplace/assortment/operations/prices.html). {% include notitle [limit](../../_auto/method_limits/getDefaultPrices.md) %}
|
||||
* Просмотр цен на указанные товары во всех магазинах
|
||||
*/
|
||||
getDefaultPrices(businessId: number, pageToken?: string, limit?: number, getDefaultPricesRequest?: GetDefaultPricesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetDefaultPricesResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getPrices.md) %} Возвращает список цен, установленных вами на товары любым способом: например, через API или в файле с каталогом. Способы установки цен описаны [в Справке Маркета для продавцов](https://yandex.ru/support/marketplace/assortment/operations/prices.html). {% include notitle [limit](../../_auto/method_limits/getPrices.md) %}
|
||||
* Список цен
|
||||
* @deprecated
|
||||
*/
|
||||
getPricesRaw(requestParameters: PricesApiGetPricesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetPricesResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getPrices.md) %} Возвращает список цен, установленных вами на товары любым способом: например, через API или в файле с каталогом. Способы установки цен описаны [в Справке Маркета для продавцов](https://yandex.ru/support/marketplace/assortment/operations/prices.html). {% include notitle [limit](../../_auto/method_limits/getPrices.md) %}
|
||||
* Список цен
|
||||
* @deprecated
|
||||
*/
|
||||
getPrices(campaignId: number, pageToken?: string, limit?: number, archived?: boolean, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetPricesResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getPricesByOfferIds.md) %} Возвращает список цен на указанные товары в магазине. {% note warning \"Метод только для отдельных магазинов\" %} Используйте этот метод, только если в кабинете установлены уникальные цены в отдельных магазинах. Для просмотра цен, которые действуют во всех магазинах, используйте [POST v2/businesses/{businessId}/offer-mappings](../../reference/business-offer-mappings/getOfferMappings.md). {% endnote %} {% include notitle [limit](../../_auto/method_limits/getPricesByOfferIds.md) %}
|
||||
* Просмотр цен на указанные товары в конкретном магазине
|
||||
*/
|
||||
getPricesByOfferIdsRaw(requestParameters: PricesApiGetPricesByOfferIdsOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetPricesByOfferIdsResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getPricesByOfferIds.md) %} Возвращает список цен на указанные товары в магазине. {% note warning \"Метод только для отдельных магазинов\" %} Используйте этот метод, только если в кабинете установлены уникальные цены в отдельных магазинах. Для просмотра цен, которые действуют во всех магазинах, используйте [POST v2/businesses/{businessId}/offer-mappings](../../reference/business-offer-mappings/getOfferMappings.md). {% endnote %} {% include notitle [limit](../../_auto/method_limits/getPricesByOfferIds.md) %}
|
||||
* Просмотр цен на указанные товары в конкретном магазине
|
||||
*/
|
||||
getPricesByOfferIds(campaignId: number, pageToken?: string, limit?: number, getPricesByOfferIdsRequest?: GetPricesByOfferIdsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetPricesByOfferIdsResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/updateBusinessPrices.md) %} Устанавливает цены, которые действуют во всех магазинах. Чтобы получить рекомендации Маркета, касающиеся цен, выполните запрос [POST v2/businesses/{businessId}/offers/recommendations](../../reference/offers/getOfferRecommendations.md). При необходимости передавайте НДС с помощью параметра `vat` в запросе [POST v2/campaigns/{campaignId}/offers/update](../../reference/offers/updateCampaignOffers.md). {% note info \"Данные в каталоге обновляются не мгновенно\" %} Это занимает до нескольких минут. {% endnote %} {% include notitle [limit](../../_auto/method_limits/updateBusinessPrices.md) %}
|
||||
* Установка цен на товары для всех магазинов
|
||||
*/
|
||||
updateBusinessPricesRaw(requestParameters: PricesApiUpdateBusinessPricesOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<EmptyApiResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/updateBusinessPrices.md) %} Устанавливает цены, которые действуют во всех магазинах. Чтобы получить рекомендации Маркета, касающиеся цен, выполните запрос [POST v2/businesses/{businessId}/offers/recommendations](../../reference/offers/getOfferRecommendations.md). При необходимости передавайте НДС с помощью параметра `vat` в запросе [POST v2/campaigns/{campaignId}/offers/update](../../reference/offers/updateCampaignOffers.md). {% note info \"Данные в каталоге обновляются не мгновенно\" %} Это занимает до нескольких минут. {% endnote %} {% include notitle [limit](../../_auto/method_limits/updateBusinessPrices.md) %}
|
||||
* Установка цен на товары для всех магазинов
|
||||
*/
|
||||
updateBusinessPrices(businessId: number, updateBusinessPricesRequest: UpdateBusinessPricesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<EmptyApiResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/updatePrices.md) %} Устанавливает цены на товары в магазине. Чтобы получить рекомендации Маркета, касающиеся цен, выполните запрос [POST v2/businesses/{businessId}/offers/recommendations](../../reference/offers/getOfferRecommendations.md). {% note warning \"Метод только для отдельных магазинов\" %} Вам доступен этот метод, если в кабинете продавца на Маркете есть возможность установить уникальные цены в отдельных магазинах. Как это проверить — в методе [POST v2/businesses/{businessId}/settings](../../reference/businesses/getBusinessSettings.md) в параметре `onlyDefaultPrice` возвращается значение `false`. В ином случае используйте метод управления ценами, которые действуют во всех магазинах, — [POST v2/businesses/{businessId}/offer-prices/updates](../../reference/prices/updateBusinessPrices.md). {% endnote %} {% note info \"Данные в каталоге обновляются не мгновенно\" %} Это занимает до нескольких минут. {% endnote %} {% include notitle [limit](../../_auto/method_limits/updatePrices.md) %}
|
||||
* Установка цен на товары в конкретном магазине
|
||||
*/
|
||||
updatePricesRaw(requestParameters: PricesApiUpdatePricesOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<EmptyApiResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/updatePrices.md) %} Устанавливает цены на товары в магазине. Чтобы получить рекомендации Маркета, касающиеся цен, выполните запрос [POST v2/businesses/{businessId}/offers/recommendations](../../reference/offers/getOfferRecommendations.md). {% note warning \"Метод только для отдельных магазинов\" %} Вам доступен этот метод, если в кабинете продавца на Маркете есть возможность установить уникальные цены в отдельных магазинах. Как это проверить — в методе [POST v2/businesses/{businessId}/settings](../../reference/businesses/getBusinessSettings.md) в параметре `onlyDefaultPrice` возвращается значение `false`. В ином случае используйте метод управления ценами, которые действуют во всех магазинах, — [POST v2/businesses/{businessId}/offer-prices/updates](../../reference/prices/updateBusinessPrices.md). {% endnote %} {% note info \"Данные в каталоге обновляются не мгновенно\" %} Это занимает до нескольких минут. {% endnote %} {% include notitle [limit](../../_auto/method_limits/updatePrices.md) %}
|
||||
* Установка цен на товары в конкретном магазине
|
||||
*/
|
||||
updatePrices(campaignId: number, updatePricesRequest: UpdatePricesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<EmptyApiResponse>;
|
||||
}
|
||||
255
dist/apis/PricesApi.js
vendored
Normal file
255
dist/apis/PricesApi.js
vendored
Normal file
@@ -0,0 +1,255 @@
|
||||
"use strict";
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* API Яндекс Маркета для продавцов
|
||||
* API Яндекс Маркета помогает продавцам автоматизировать и упростить работу с маркетплейсом. В числе возможностей интеграции: * управление каталогом товаров и витриной, * обработка заказов, * изменение настроек магазина, * получение отчетов.
|
||||
*
|
||||
* The version of the OpenAPI document: LATEST
|
||||
*
|
||||
*
|
||||
* 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.PricesApi = void 0;
|
||||
const runtime = require("../runtime");
|
||||
const index_1 = require("../models/index");
|
||||
/**
|
||||
*
|
||||
*/
|
||||
class PricesApi extends runtime.BaseAPI {
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getDefaultPrices.md) %} Возвращает список цен, которые вы установили для всех магазинов любым способом. Например, через API или с помощью Excel-шаблона. О способах установки цен читайте [в Справке Маркета для продавцов](https://yandex.ru/support/marketplace/assortment/operations/prices.html). {% include notitle [limit](../../_auto/method_limits/getDefaultPrices.md) %}
|
||||
* Просмотр цен на указанные товары во всех магазинах
|
||||
*/
|
||||
getDefaultPricesRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['businessId'] == null) {
|
||||
throw new runtime.RequiredError('businessId', 'Required parameter "businessId" was null or undefined when calling getDefaultPrices().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
if (requestParameters['pageToken'] != null) {
|
||||
queryParameters['pageToken'] = requestParameters['pageToken'];
|
||||
}
|
||||
if (requestParameters['limit'] != null) {
|
||||
queryParameters['limit'] = requestParameters['limit'];
|
||||
}
|
||||
const headerParameters = {};
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v2/businesses/{businessId}/offer-prices`.replace(`{${"businessId"}}`, encodeURIComponent(String(requestParameters['businessId']))),
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: (0, index_1.GetDefaultPricesRequestToJSON)(requestParameters['getDefaultPricesRequest']),
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.GetDefaultPricesResponseFromJSON)(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getDefaultPrices.md) %} Возвращает список цен, которые вы установили для всех магазинов любым способом. Например, через API или с помощью Excel-шаблона. О способах установки цен читайте [в Справке Маркета для продавцов](https://yandex.ru/support/marketplace/assortment/operations/prices.html). {% include notitle [limit](../../_auto/method_limits/getDefaultPrices.md) %}
|
||||
* Просмотр цен на указанные товары во всех магазинах
|
||||
*/
|
||||
getDefaultPrices(businessId, pageToken, limit, getDefaultPricesRequest, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.getDefaultPricesRaw({ businessId: businessId, pageToken: pageToken, limit: limit, getDefaultPricesRequest: getDefaultPricesRequest }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getPrices.md) %} Возвращает список цен, установленных вами на товары любым способом: например, через API или в файле с каталогом. Способы установки цен описаны [в Справке Маркета для продавцов](https://yandex.ru/support/marketplace/assortment/operations/prices.html). {% include notitle [limit](../../_auto/method_limits/getPrices.md) %}
|
||||
* Список цен
|
||||
* @deprecated
|
||||
*/
|
||||
getPricesRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['campaignId'] == null) {
|
||||
throw new runtime.RequiredError('campaignId', 'Required parameter "campaignId" was null or undefined when calling getPrices().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
if (requestParameters['pageToken'] != null) {
|
||||
queryParameters['pageToken'] = requestParameters['pageToken'];
|
||||
}
|
||||
if (requestParameters['limit'] != null) {
|
||||
queryParameters['limit'] = requestParameters['limit'];
|
||||
}
|
||||
if (requestParameters['archived'] != null) {
|
||||
queryParameters['archived'] = requestParameters['archived'];
|
||||
}
|
||||
const headerParameters = {};
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v2/campaigns/{campaignId}/offer-prices`.replace(`{${"campaignId"}}`, encodeURIComponent(String(requestParameters['campaignId']))),
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.GetPricesResponseFromJSON)(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getPrices.md) %} Возвращает список цен, установленных вами на товары любым способом: например, через API или в файле с каталогом. Способы установки цен описаны [в Справке Маркета для продавцов](https://yandex.ru/support/marketplace/assortment/operations/prices.html). {% include notitle [limit](../../_auto/method_limits/getPrices.md) %}
|
||||
* Список цен
|
||||
* @deprecated
|
||||
*/
|
||||
getPrices(campaignId, pageToken, limit, archived, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.getPricesRaw({ campaignId: campaignId, pageToken: pageToken, limit: limit, archived: archived }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getPricesByOfferIds.md) %} Возвращает список цен на указанные товары в магазине. {% note warning \"Метод только для отдельных магазинов\" %} Используйте этот метод, только если в кабинете установлены уникальные цены в отдельных магазинах. Для просмотра цен, которые действуют во всех магазинах, используйте [POST v2/businesses/{businessId}/offer-mappings](../../reference/business-offer-mappings/getOfferMappings.md). {% endnote %} {% include notitle [limit](../../_auto/method_limits/getPricesByOfferIds.md) %}
|
||||
* Просмотр цен на указанные товары в конкретном магазине
|
||||
*/
|
||||
getPricesByOfferIdsRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['campaignId'] == null) {
|
||||
throw new runtime.RequiredError('campaignId', 'Required parameter "campaignId" was null or undefined when calling getPricesByOfferIds().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
if (requestParameters['pageToken'] != null) {
|
||||
queryParameters['pageToken'] = requestParameters['pageToken'];
|
||||
}
|
||||
if (requestParameters['limit'] != null) {
|
||||
queryParameters['limit'] = requestParameters['limit'];
|
||||
}
|
||||
const headerParameters = {};
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v2/campaigns/{campaignId}/offer-prices`.replace(`{${"campaignId"}}`, encodeURIComponent(String(requestParameters['campaignId']))),
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: (0, index_1.GetPricesByOfferIdsRequestToJSON)(requestParameters['getPricesByOfferIdsRequest']),
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.GetPricesByOfferIdsResponseFromJSON)(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getPricesByOfferIds.md) %} Возвращает список цен на указанные товары в магазине. {% note warning \"Метод только для отдельных магазинов\" %} Используйте этот метод, только если в кабинете установлены уникальные цены в отдельных магазинах. Для просмотра цен, которые действуют во всех магазинах, используйте [POST v2/businesses/{businessId}/offer-mappings](../../reference/business-offer-mappings/getOfferMappings.md). {% endnote %} {% include notitle [limit](../../_auto/method_limits/getPricesByOfferIds.md) %}
|
||||
* Просмотр цен на указанные товары в конкретном магазине
|
||||
*/
|
||||
getPricesByOfferIds(campaignId, pageToken, limit, getPricesByOfferIdsRequest, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.getPricesByOfferIdsRaw({ campaignId: campaignId, pageToken: pageToken, limit: limit, getPricesByOfferIdsRequest: getPricesByOfferIdsRequest }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/updateBusinessPrices.md) %} Устанавливает цены, которые действуют во всех магазинах. Чтобы получить рекомендации Маркета, касающиеся цен, выполните запрос [POST v2/businesses/{businessId}/offers/recommendations](../../reference/offers/getOfferRecommendations.md). При необходимости передавайте НДС с помощью параметра `vat` в запросе [POST v2/campaigns/{campaignId}/offers/update](../../reference/offers/updateCampaignOffers.md). {% note info \"Данные в каталоге обновляются не мгновенно\" %} Это занимает до нескольких минут. {% endnote %} {% include notitle [limit](../../_auto/method_limits/updateBusinessPrices.md) %}
|
||||
* Установка цен на товары для всех магазинов
|
||||
*/
|
||||
updateBusinessPricesRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['businessId'] == null) {
|
||||
throw new runtime.RequiredError('businessId', 'Required parameter "businessId" was null or undefined when calling updateBusinessPrices().');
|
||||
}
|
||||
if (requestParameters['updateBusinessPricesRequest'] == null) {
|
||||
throw new runtime.RequiredError('updateBusinessPricesRequest', 'Required parameter "updateBusinessPricesRequest" was null or undefined when calling updateBusinessPrices().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
const headerParameters = {};
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v2/businesses/{businessId}/offer-prices/updates`.replace(`{${"businessId"}}`, encodeURIComponent(String(requestParameters['businessId']))),
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: (0, index_1.UpdateBusinessPricesRequestToJSON)(requestParameters['updateBusinessPricesRequest']),
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.EmptyApiResponseFromJSON)(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/updateBusinessPrices.md) %} Устанавливает цены, которые действуют во всех магазинах. Чтобы получить рекомендации Маркета, касающиеся цен, выполните запрос [POST v2/businesses/{businessId}/offers/recommendations](../../reference/offers/getOfferRecommendations.md). При необходимости передавайте НДС с помощью параметра `vat` в запросе [POST v2/campaigns/{campaignId}/offers/update](../../reference/offers/updateCampaignOffers.md). {% note info \"Данные в каталоге обновляются не мгновенно\" %} Это занимает до нескольких минут. {% endnote %} {% include notitle [limit](../../_auto/method_limits/updateBusinessPrices.md) %}
|
||||
* Установка цен на товары для всех магазинов
|
||||
*/
|
||||
updateBusinessPrices(businessId, updateBusinessPricesRequest, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.updateBusinessPricesRaw({ businessId: businessId, updateBusinessPricesRequest: updateBusinessPricesRequest }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/updatePrices.md) %} Устанавливает цены на товары в магазине. Чтобы получить рекомендации Маркета, касающиеся цен, выполните запрос [POST v2/businesses/{businessId}/offers/recommendations](../../reference/offers/getOfferRecommendations.md). {% note warning \"Метод только для отдельных магазинов\" %} Вам доступен этот метод, если в кабинете продавца на Маркете есть возможность установить уникальные цены в отдельных магазинах. Как это проверить — в методе [POST v2/businesses/{businessId}/settings](../../reference/businesses/getBusinessSettings.md) в параметре `onlyDefaultPrice` возвращается значение `false`. В ином случае используйте метод управления ценами, которые действуют во всех магазинах, — [POST v2/businesses/{businessId}/offer-prices/updates](../../reference/prices/updateBusinessPrices.md). {% endnote %} {% note info \"Данные в каталоге обновляются не мгновенно\" %} Это занимает до нескольких минут. {% endnote %} {% include notitle [limit](../../_auto/method_limits/updatePrices.md) %}
|
||||
* Установка цен на товары в конкретном магазине
|
||||
*/
|
||||
updatePricesRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['campaignId'] == null) {
|
||||
throw new runtime.RequiredError('campaignId', 'Required parameter "campaignId" was null or undefined when calling updatePrices().');
|
||||
}
|
||||
if (requestParameters['updatePricesRequest'] == null) {
|
||||
throw new runtime.RequiredError('updatePricesRequest', 'Required parameter "updatePricesRequest" was null or undefined when calling updatePrices().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
const headerParameters = {};
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v2/campaigns/{campaignId}/offer-prices/updates`.replace(`{${"campaignId"}}`, encodeURIComponent(String(requestParameters['campaignId']))),
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: (0, index_1.UpdatePricesRequestToJSON)(requestParameters['updatePricesRequest']),
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.EmptyApiResponseFromJSON)(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/updatePrices.md) %} Устанавливает цены на товары в магазине. Чтобы получить рекомендации Маркета, касающиеся цен, выполните запрос [POST v2/businesses/{businessId}/offers/recommendations](../../reference/offers/getOfferRecommendations.md). {% note warning \"Метод только для отдельных магазинов\" %} Вам доступен этот метод, если в кабинете продавца на Маркете есть возможность установить уникальные цены в отдельных магазинах. Как это проверить — в методе [POST v2/businesses/{businessId}/settings](../../reference/businesses/getBusinessSettings.md) в параметре `onlyDefaultPrice` возвращается значение `false`. В ином случае используйте метод управления ценами, которые действуют во всех магазинах, — [POST v2/businesses/{businessId}/offer-prices/updates](../../reference/prices/updateBusinessPrices.md). {% endnote %} {% note info \"Данные в каталоге обновляются не мгновенно\" %} Это занимает до нескольких минут. {% endnote %} {% include notitle [limit](../../_auto/method_limits/updatePrices.md) %}
|
||||
* Установка цен на товары в конкретном магазине
|
||||
*/
|
||||
updatePrices(campaignId, updatePricesRequest, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.updatePricesRaw({ campaignId: campaignId, updatePricesRequest: updatePricesRequest }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
}
|
||||
exports.PricesApi = PricesApi;
|
||||
76
dist/apis/PromosApi.d.ts
vendored
Normal file
76
dist/apis/PromosApi.d.ts
vendored
Normal file
@@ -0,0 +1,76 @@
|
||||
/**
|
||||
* API Яндекс Маркета для продавцов
|
||||
* API Яндекс Маркета помогает продавцам автоматизировать и упростить работу с маркетплейсом. В числе возможностей интеграции: * управление каталогом товаров и витриной, * обработка заказов, * изменение настроек магазина, * получение отчетов.
|
||||
*
|
||||
* The version of the OpenAPI document: LATEST
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
import * as runtime from '../runtime';
|
||||
import type { DeletePromoOffersRequest, DeletePromoOffersResponse, GetPromoOffersRequest, GetPromoOffersResponse, GetPromosRequest, GetPromosResponse, UpdatePromoOffersRequest, UpdatePromoOffersResponse } from '../models/index';
|
||||
export interface PromosApiDeletePromoOffersOperationRequest {
|
||||
businessId: number;
|
||||
deletePromoOffersRequest: DeletePromoOffersRequest;
|
||||
}
|
||||
export interface PromosApiGetPromoOffersOperationRequest {
|
||||
businessId: number;
|
||||
getPromoOffersRequest: GetPromoOffersRequest;
|
||||
pageToken?: string;
|
||||
limit?: number;
|
||||
}
|
||||
export interface PromosApiGetPromosOperationRequest {
|
||||
businessId: number;
|
||||
getPromosRequest?: GetPromosRequest;
|
||||
}
|
||||
export interface PromosApiUpdatePromoOffersOperationRequest {
|
||||
businessId: number;
|
||||
updatePromoOffersRequest: UpdatePromoOffersRequest;
|
||||
}
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export declare class PromosApi extends runtime.BaseAPI {
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/deletePromoOffers.md) %} Убирает товары из акции. Изменения начинают действовать в течение 4–6 часов. Узнать, применились ли они, можно с помощью параметра `processing` в ответе метода [POST v2/businesses/{businessId}/promos](../../reference/promos/getPromos.md). {% include notitle [limit](../../_auto/method_limits/deletePromoOffers.md) %}
|
||||
* Удаление товаров из акции
|
||||
*/
|
||||
deletePromoOffersRaw(requestParameters: PromosApiDeletePromoOffersOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DeletePromoOffersResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/deletePromoOffers.md) %} Убирает товары из акции. Изменения начинают действовать в течение 4–6 часов. Узнать, применились ли они, можно с помощью параметра `processing` в ответе метода [POST v2/businesses/{businessId}/promos](../../reference/promos/getPromos.md). {% include notitle [limit](../../_auto/method_limits/deletePromoOffers.md) %}
|
||||
* Удаление товаров из акции
|
||||
*/
|
||||
deletePromoOffers(businessId: number, deletePromoOffersRequest: DeletePromoOffersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DeletePromoOffersResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getPromoOffers.md) %} Возвращает список товаров, которые участвуют или могут участвовать в акции. {% note warning \"Условия участия в акциях могут меняться\" %} Например, `maxPromoPrice`. Установленные цены меняться не будут — `price` и `promoPrice`. {% endnote %} {% include notitle [limit](../../_auto/method_limits/getPromoOffers.md) %}
|
||||
* Получение списка товаров, которые участвуют или могут участвовать в акции
|
||||
*/
|
||||
getPromoOffersRaw(requestParameters: PromosApiGetPromoOffersOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetPromoOffersResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getPromoOffers.md) %} Возвращает список товаров, которые участвуют или могут участвовать в акции. {% note warning \"Условия участия в акциях могут меняться\" %} Например, `maxPromoPrice`. Установленные цены меняться не будут — `price` и `promoPrice`. {% endnote %} {% include notitle [limit](../../_auto/method_limits/getPromoOffers.md) %}
|
||||
* Получение списка товаров, которые участвуют или могут участвовать в акции
|
||||
*/
|
||||
getPromoOffers(businessId: number, getPromoOffersRequest: GetPromoOffersRequest, pageToken?: string, limit?: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetPromoOffersResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getPromos.md) %} Возвращает информацию об акциях Маркета. Не возвращает данные об акциях, которые создал продавец. По умолчанию возвращаются акции, в которых продавец участвует или может принять участие. Чтобы получить текущие или завершенные акции, передайте параметр `participation`. Типы акций, которые возвращаются в ответе: * прямая скидка; * флеш-акция; * скидка по промокоду. {% include notitle [limit](../../_auto/method_limits/getPromos.md) %}
|
||||
* Получение списка акций
|
||||
*/
|
||||
getPromosRaw(requestParameters: PromosApiGetPromosOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetPromosResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getPromos.md) %} Возвращает информацию об акциях Маркета. Не возвращает данные об акциях, которые создал продавец. По умолчанию возвращаются акции, в которых продавец участвует или может принять участие. Чтобы получить текущие или завершенные акции, передайте параметр `participation`. Типы акций, которые возвращаются в ответе: * прямая скидка; * флеш-акция; * скидка по промокоду. {% include notitle [limit](../../_auto/method_limits/getPromos.md) %}
|
||||
* Получение списка акций
|
||||
*/
|
||||
getPromos(businessId: number, getPromosRequest?: GetPromosRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetPromosResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/updatePromoOffers.md) %} Добавляет товары в акцию или изменяет цены на товары, которые участвуют в акции. Изменения начинают действовать в течение 4–6 часов. Узнать, применились ли они, можно с помощью параметра `processing` в ответе метода [POST v2/businesses/{businessId}/promos](../../reference/promos/getPromos.md). {% include notitle [limit](../../_auto/method_limits/updatePromoOffers.md) %}
|
||||
* Добавление товаров в акцию или изменение их цен
|
||||
*/
|
||||
updatePromoOffersRaw(requestParameters: PromosApiUpdatePromoOffersOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UpdatePromoOffersResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/updatePromoOffers.md) %} Добавляет товары в акцию или изменяет цены на товары, которые участвуют в акции. Изменения начинают действовать в течение 4–6 часов. Узнать, применились ли они, можно с помощью параметра `processing` в ответе метода [POST v2/businesses/{businessId}/promos](../../reference/promos/getPromos.md). {% include notitle [limit](../../_auto/method_limits/updatePromoOffers.md) %}
|
||||
* Добавление товаров в акцию или изменение их цен
|
||||
*/
|
||||
updatePromoOffers(businessId: number, updatePromoOffersRequest: UpdatePromoOffersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UpdatePromoOffersResponse>;
|
||||
}
|
||||
204
dist/apis/PromosApi.js
vendored
Normal file
204
dist/apis/PromosApi.js
vendored
Normal file
@@ -0,0 +1,204 @@
|
||||
"use strict";
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* API Яндекс Маркета для продавцов
|
||||
* API Яндекс Маркета помогает продавцам автоматизировать и упростить работу с маркетплейсом. В числе возможностей интеграции: * управление каталогом товаров и витриной, * обработка заказов, * изменение настроек магазина, * получение отчетов.
|
||||
*
|
||||
* The version of the OpenAPI document: LATEST
|
||||
*
|
||||
*
|
||||
* 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.PromosApi = void 0;
|
||||
const runtime = require("../runtime");
|
||||
const index_1 = require("../models/index");
|
||||
/**
|
||||
*
|
||||
*/
|
||||
class PromosApi extends runtime.BaseAPI {
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/deletePromoOffers.md) %} Убирает товары из акции. Изменения начинают действовать в течение 4–6 часов. Узнать, применились ли они, можно с помощью параметра `processing` в ответе метода [POST v2/businesses/{businessId}/promos](../../reference/promos/getPromos.md). {% include notitle [limit](../../_auto/method_limits/deletePromoOffers.md) %}
|
||||
* Удаление товаров из акции
|
||||
*/
|
||||
deletePromoOffersRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['businessId'] == null) {
|
||||
throw new runtime.RequiredError('businessId', 'Required parameter "businessId" was null or undefined when calling deletePromoOffers().');
|
||||
}
|
||||
if (requestParameters['deletePromoOffersRequest'] == null) {
|
||||
throw new runtime.RequiredError('deletePromoOffersRequest', 'Required parameter "deletePromoOffersRequest" was null or undefined when calling deletePromoOffers().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
const headerParameters = {};
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v2/businesses/{businessId}/promos/offers/delete`.replace(`{${"businessId"}}`, encodeURIComponent(String(requestParameters['businessId']))),
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: (0, index_1.DeletePromoOffersRequestToJSON)(requestParameters['deletePromoOffersRequest']),
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.DeletePromoOffersResponseFromJSON)(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/deletePromoOffers.md) %} Убирает товары из акции. Изменения начинают действовать в течение 4–6 часов. Узнать, применились ли они, можно с помощью параметра `processing` в ответе метода [POST v2/businesses/{businessId}/promos](../../reference/promos/getPromos.md). {% include notitle [limit](../../_auto/method_limits/deletePromoOffers.md) %}
|
||||
* Удаление товаров из акции
|
||||
*/
|
||||
deletePromoOffers(businessId, deletePromoOffersRequest, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.deletePromoOffersRaw({ businessId: businessId, deletePromoOffersRequest: deletePromoOffersRequest }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getPromoOffers.md) %} Возвращает список товаров, которые участвуют или могут участвовать в акции. {% note warning \"Условия участия в акциях могут меняться\" %} Например, `maxPromoPrice`. Установленные цены меняться не будут — `price` и `promoPrice`. {% endnote %} {% include notitle [limit](../../_auto/method_limits/getPromoOffers.md) %}
|
||||
* Получение списка товаров, которые участвуют или могут участвовать в акции
|
||||
*/
|
||||
getPromoOffersRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['businessId'] == null) {
|
||||
throw new runtime.RequiredError('businessId', 'Required parameter "businessId" was null or undefined when calling getPromoOffers().');
|
||||
}
|
||||
if (requestParameters['getPromoOffersRequest'] == null) {
|
||||
throw new runtime.RequiredError('getPromoOffersRequest', 'Required parameter "getPromoOffersRequest" was null or undefined when calling getPromoOffers().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
if (requestParameters['pageToken'] != null) {
|
||||
queryParameters['pageToken'] = requestParameters['pageToken'];
|
||||
}
|
||||
if (requestParameters['limit'] != null) {
|
||||
queryParameters['limit'] = requestParameters['limit'];
|
||||
}
|
||||
const headerParameters = {};
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v2/businesses/{businessId}/promos/offers`.replace(`{${"businessId"}}`, encodeURIComponent(String(requestParameters['businessId']))),
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: (0, index_1.GetPromoOffersRequestToJSON)(requestParameters['getPromoOffersRequest']),
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.GetPromoOffersResponseFromJSON)(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getPromoOffers.md) %} Возвращает список товаров, которые участвуют или могут участвовать в акции. {% note warning \"Условия участия в акциях могут меняться\" %} Например, `maxPromoPrice`. Установленные цены меняться не будут — `price` и `promoPrice`. {% endnote %} {% include notitle [limit](../../_auto/method_limits/getPromoOffers.md) %}
|
||||
* Получение списка товаров, которые участвуют или могут участвовать в акции
|
||||
*/
|
||||
getPromoOffers(businessId, getPromoOffersRequest, pageToken, limit, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.getPromoOffersRaw({ businessId: businessId, getPromoOffersRequest: getPromoOffersRequest, pageToken: pageToken, limit: limit }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getPromos.md) %} Возвращает информацию об акциях Маркета. Не возвращает данные об акциях, которые создал продавец. По умолчанию возвращаются акции, в которых продавец участвует или может принять участие. Чтобы получить текущие или завершенные акции, передайте параметр `participation`. Типы акций, которые возвращаются в ответе: * прямая скидка; * флеш-акция; * скидка по промокоду. {% include notitle [limit](../../_auto/method_limits/getPromos.md) %}
|
||||
* Получение списка акций
|
||||
*/
|
||||
getPromosRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['businessId'] == null) {
|
||||
throw new runtime.RequiredError('businessId', 'Required parameter "businessId" was null or undefined when calling getPromos().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
const headerParameters = {};
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v2/businesses/{businessId}/promos`.replace(`{${"businessId"}}`, encodeURIComponent(String(requestParameters['businessId']))),
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: (0, index_1.GetPromosRequestToJSON)(requestParameters['getPromosRequest']),
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.GetPromosResponseFromJSON)(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getPromos.md) %} Возвращает информацию об акциях Маркета. Не возвращает данные об акциях, которые создал продавец. По умолчанию возвращаются акции, в которых продавец участвует или может принять участие. Чтобы получить текущие или завершенные акции, передайте параметр `participation`. Типы акций, которые возвращаются в ответе: * прямая скидка; * флеш-акция; * скидка по промокоду. {% include notitle [limit](../../_auto/method_limits/getPromos.md) %}
|
||||
* Получение списка акций
|
||||
*/
|
||||
getPromos(businessId, getPromosRequest, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.getPromosRaw({ businessId: businessId, getPromosRequest: getPromosRequest }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/updatePromoOffers.md) %} Добавляет товары в акцию или изменяет цены на товары, которые участвуют в акции. Изменения начинают действовать в течение 4–6 часов. Узнать, применились ли они, можно с помощью параметра `processing` в ответе метода [POST v2/businesses/{businessId}/promos](../../reference/promos/getPromos.md). {% include notitle [limit](../../_auto/method_limits/updatePromoOffers.md) %}
|
||||
* Добавление товаров в акцию или изменение их цен
|
||||
*/
|
||||
updatePromoOffersRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['businessId'] == null) {
|
||||
throw new runtime.RequiredError('businessId', 'Required parameter "businessId" was null or undefined when calling updatePromoOffers().');
|
||||
}
|
||||
if (requestParameters['updatePromoOffersRequest'] == null) {
|
||||
throw new runtime.RequiredError('updatePromoOffersRequest', 'Required parameter "updatePromoOffersRequest" was null or undefined when calling updatePromoOffers().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
const headerParameters = {};
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v2/businesses/{businessId}/promos/offers/update`.replace(`{${"businessId"}}`, encodeURIComponent(String(requestParameters['businessId']))),
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: (0, index_1.UpdatePromoOffersRequestToJSON)(requestParameters['updatePromoOffersRequest']),
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.UpdatePromoOffersResponseFromJSON)(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/updatePromoOffers.md) %} Добавляет товары в акцию или изменяет цены на товары, которые участвуют в акции. Изменения начинают действовать в течение 4–6 часов. Узнать, применились ли они, можно с помощью параметра `processing` в ответе метода [POST v2/businesses/{businessId}/promos](../../reference/promos/getPromos.md). {% include notitle [limit](../../_auto/method_limits/updatePromoOffers.md) %}
|
||||
* Добавление товаров в акцию или изменение их цен
|
||||
*/
|
||||
updatePromoOffers(businessId, updatePromoOffersRequest, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.updatePromoOffersRaw({ businessId: businessId, updatePromoOffersRequest: updatePromoOffersRequest }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
}
|
||||
exports.PromosApi = PromosApi;
|
||||
45
dist/apis/RatingsApi.d.ts
vendored
Normal file
45
dist/apis/RatingsApi.d.ts
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
/**
|
||||
* API Яндекс Маркета для продавцов
|
||||
* API Яндекс Маркета помогает продавцам автоматизировать и упростить работу с маркетплейсом. В числе возможностей интеграции: * управление каталогом товаров и витриной, * обработка заказов, * изменение настроек магазина, * получение отчетов.
|
||||
*
|
||||
* The version of the OpenAPI document: LATEST
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
import * as runtime from '../runtime';
|
||||
import type { GetQualityRatingDetailsResponse, GetQualityRatingRequest, GetQualityRatingResponse } from '../models/index';
|
||||
export interface RatingsApiGetQualityRatingDetailsRequest {
|
||||
campaignId: number;
|
||||
}
|
||||
export interface RatingsApiGetQualityRatingsRequest {
|
||||
businessId: number;
|
||||
getQualityRatingRequest: GetQualityRatingRequest;
|
||||
}
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export declare class RatingsApi extends runtime.BaseAPI {
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getQualityRatingDetails.md) %} Возвращает список заказов, которые повлияли на индекс качества магазина. Чтобы узнать значение индекса качества, выполните запрос [POST v2/businesses/{businessId}/ratings/quality](../../reference/ratings/getQualityRatings.md). {% include notitle [limit](../../_auto/method_limits/getQualityRatingDetails.md) %}
|
||||
* Заказы, которые повлияли на индекс качества
|
||||
*/
|
||||
getQualityRatingDetailsRaw(requestParameters: RatingsApiGetQualityRatingDetailsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetQualityRatingDetailsResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getQualityRatingDetails.md) %} Возвращает список заказов, которые повлияли на индекс качества магазина. Чтобы узнать значение индекса качества, выполните запрос [POST v2/businesses/{businessId}/ratings/quality](../../reference/ratings/getQualityRatings.md). {% include notitle [limit](../../_auto/method_limits/getQualityRatingDetails.md) %}
|
||||
* Заказы, которые повлияли на индекс качества
|
||||
*/
|
||||
getQualityRatingDetails(campaignId: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetQualityRatingDetailsResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getQualityRatings.md) %} Возвращает значение индекса качества магазинов и его составляющие. Подробнее об индексе качества читайте [в Справке Маркета для продавцов](https://yandex.ru/support2/marketplace/ru/quality/score/). {% include notitle [limit](../../_auto/method_limits/getQualityRatings.md) %}
|
||||
* Индекс качества магазинов
|
||||
*/
|
||||
getQualityRatingsRaw(requestParameters: RatingsApiGetQualityRatingsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetQualityRatingResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getQualityRatings.md) %} Возвращает значение индекса качества магазинов и его составляющие. Подробнее об индексе качества читайте [в Справке Маркета для продавцов](https://yandex.ru/support2/marketplace/ru/quality/score/). {% include notitle [limit](../../_auto/method_limits/getQualityRatings.md) %}
|
||||
* Индекс качества магазинов
|
||||
*/
|
||||
getQualityRatings(businessId: number, getQualityRatingRequest: GetQualityRatingRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetQualityRatingResponse>;
|
||||
}
|
||||
112
dist/apis/RatingsApi.js
vendored
Normal file
112
dist/apis/RatingsApi.js
vendored
Normal file
@@ -0,0 +1,112 @@
|
||||
"use strict";
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* API Яндекс Маркета для продавцов
|
||||
* API Яндекс Маркета помогает продавцам автоматизировать и упростить работу с маркетплейсом. В числе возможностей интеграции: * управление каталогом товаров и витриной, * обработка заказов, * изменение настроек магазина, * получение отчетов.
|
||||
*
|
||||
* The version of the OpenAPI document: LATEST
|
||||
*
|
||||
*
|
||||
* 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.RatingsApi = void 0;
|
||||
const runtime = require("../runtime");
|
||||
const index_1 = require("../models/index");
|
||||
/**
|
||||
*
|
||||
*/
|
||||
class RatingsApi extends runtime.BaseAPI {
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getQualityRatingDetails.md) %} Возвращает список заказов, которые повлияли на индекс качества магазина. Чтобы узнать значение индекса качества, выполните запрос [POST v2/businesses/{businessId}/ratings/quality](../../reference/ratings/getQualityRatings.md). {% include notitle [limit](../../_auto/method_limits/getQualityRatingDetails.md) %}
|
||||
* Заказы, которые повлияли на индекс качества
|
||||
*/
|
||||
getQualityRatingDetailsRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['campaignId'] == null) {
|
||||
throw new runtime.RequiredError('campaignId', 'Required parameter "campaignId" was null or undefined when calling getQualityRatingDetails().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
const headerParameters = {};
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v2/campaigns/{campaignId}/ratings/quality/details`.replace(`{${"campaignId"}}`, encodeURIComponent(String(requestParameters['campaignId']))),
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.GetQualityRatingDetailsResponseFromJSON)(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getQualityRatingDetails.md) %} Возвращает список заказов, которые повлияли на индекс качества магазина. Чтобы узнать значение индекса качества, выполните запрос [POST v2/businesses/{businessId}/ratings/quality](../../reference/ratings/getQualityRatings.md). {% include notitle [limit](../../_auto/method_limits/getQualityRatingDetails.md) %}
|
||||
* Заказы, которые повлияли на индекс качества
|
||||
*/
|
||||
getQualityRatingDetails(campaignId, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.getQualityRatingDetailsRaw({ campaignId: campaignId }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getQualityRatings.md) %} Возвращает значение индекса качества магазинов и его составляющие. Подробнее об индексе качества читайте [в Справке Маркета для продавцов](https://yandex.ru/support2/marketplace/ru/quality/score/). {% include notitle [limit](../../_auto/method_limits/getQualityRatings.md) %}
|
||||
* Индекс качества магазинов
|
||||
*/
|
||||
getQualityRatingsRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['businessId'] == null) {
|
||||
throw new runtime.RequiredError('businessId', 'Required parameter "businessId" was null or undefined when calling getQualityRatings().');
|
||||
}
|
||||
if (requestParameters['getQualityRatingRequest'] == null) {
|
||||
throw new runtime.RequiredError('getQualityRatingRequest', 'Required parameter "getQualityRatingRequest" was null or undefined when calling getQualityRatings().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
const headerParameters = {};
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v2/businesses/{businessId}/ratings/quality`.replace(`{${"businessId"}}`, encodeURIComponent(String(requestParameters['businessId']))),
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: (0, index_1.GetQualityRatingRequestToJSON)(requestParameters['getQualityRatingRequest']),
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.GetQualityRatingResponseFromJSON)(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getQualityRatings.md) %} Возвращает значение индекса качества магазинов и его составляющие. Подробнее об индексе качества читайте [в Справке Маркета для продавцов](https://yandex.ru/support2/marketplace/ru/quality/score/). {% include notitle [limit](../../_auto/method_limits/getQualityRatings.md) %}
|
||||
* Индекс качества магазинов
|
||||
*/
|
||||
getQualityRatings(businessId, getQualityRatingRequest, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.getQualityRatingsRaw({ businessId: businessId, getQualityRatingRequest: getQualityRatingRequest }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
}
|
||||
exports.RatingsApi = RatingsApi;
|
||||
73
dist/apis/RegionsApi.d.ts
vendored
Normal file
73
dist/apis/RegionsApi.d.ts
vendored
Normal file
@@ -0,0 +1,73 @@
|
||||
/**
|
||||
* API Яндекс Маркета для продавцов
|
||||
* API Яндекс Маркета помогает продавцам автоматизировать и упростить работу с маркетплейсом. В числе возможностей интеграции: * управление каталогом товаров и витриной, * обработка заказов, * изменение настроек магазина, * получение отчетов.
|
||||
*
|
||||
* The version of the OpenAPI document: LATEST
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
import * as runtime from '../runtime';
|
||||
import type { GetRegionByIdResponse, GetRegionWithChildrenResponse, GetRegionsCodesResponse, GetRegionsResponse } from '../models/index';
|
||||
export interface RegionsApiSearchRegionChildrenRequest {
|
||||
regionId: number;
|
||||
pageToken?: string;
|
||||
limit?: number;
|
||||
page?: number;
|
||||
pageSize?: number;
|
||||
}
|
||||
export interface RegionsApiSearchRegionsByIdRequest {
|
||||
regionId: number;
|
||||
}
|
||||
export interface RegionsApiSearchRegionsByNameRequest {
|
||||
name: string;
|
||||
pageToken?: string;
|
||||
limit?: number;
|
||||
}
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export declare class RegionsApi extends runtime.BaseAPI {
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getRegionsCodes.md) %} Возвращает список стран с их кодами в формате :no-translate[ISO 3166-1 alpha-2]. Страна производства `countryCode` понадобится при продаже товаров из-за рубежа для бизнеса. [Инструкция](../../step-by-step/business-info.md) {% include notitle [limit](../../_auto/method_limits/getRegionsCodes.md) %}
|
||||
* Список допустимых кодов стран
|
||||
*/
|
||||
getRegionsCodesRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetRegionsCodesResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getRegionsCodes.md) %} Возвращает список стран с их кодами в формате :no-translate[ISO 3166-1 alpha-2]. Страна производства `countryCode` понадобится при продаже товаров из-за рубежа для бизнеса. [Инструкция](../../step-by-step/business-info.md) {% include notitle [limit](../../_auto/method_limits/getRegionsCodes.md) %}
|
||||
* Список допустимых кодов стран
|
||||
*/
|
||||
getRegionsCodes(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetRegionsCodesResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/searchRegionChildren.md) %} Возвращает информацию о регионах, являющихся дочерними по отношению к региону, идентификатор которого указан в запросе. {% include notitle [limit](../../_auto/method_limits/searchRegionChildren.md) %}
|
||||
* Информация о дочерних регионах
|
||||
*/
|
||||
searchRegionChildrenRaw(requestParameters: RegionsApiSearchRegionChildrenRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetRegionWithChildrenResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/searchRegionChildren.md) %} Возвращает информацию о регионах, являющихся дочерними по отношению к региону, идентификатор которого указан в запросе. {% include notitle [limit](../../_auto/method_limits/searchRegionChildren.md) %}
|
||||
* Информация о дочерних регионах
|
||||
*/
|
||||
searchRegionChildren(regionId: number, pageToken?: string, limit?: number, page?: number, pageSize?: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetRegionWithChildrenResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/searchRegionsById.md) %} Возвращает информацию о регионе. {% include notitle [limit](../../_auto/method_limits/searchRegionsById.md) %}
|
||||
* Информация о регионе
|
||||
*/
|
||||
searchRegionsByIdRaw(requestParameters: RegionsApiSearchRegionsByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetRegionByIdResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/searchRegionsById.md) %} Возвращает информацию о регионе. {% include notitle [limit](../../_auto/method_limits/searchRegionsById.md) %}
|
||||
* Информация о регионе
|
||||
*/
|
||||
searchRegionsById(regionId: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetRegionByIdResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/searchRegionsByName.md) %} Возвращает информацию о регионе, удовлетворяющем заданным в запросе условиям поиска. Если найдено несколько регионов, удовлетворяющих условиям поиска, возвращается информация по каждому найденному региону (но не более десяти регионов) для возможности определения нужного региона по родительским регионам. {% include notitle [limit](../../_auto/method_limits/searchRegionsByName.md) %}
|
||||
* Поиск регионов по их имени
|
||||
*/
|
||||
searchRegionsByNameRaw(requestParameters: RegionsApiSearchRegionsByNameRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetRegionsResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/searchRegionsByName.md) %} Возвращает информацию о регионе, удовлетворяющем заданным в запросе условиям поиска. Если найдено несколько регионов, удовлетворяющих условиям поиска, возвращается информация по каждому найденному региону (но не более десяти регионов) для возможности определения нужного региона по родительским регионам. {% include notitle [limit](../../_auto/method_limits/searchRegionsByName.md) %}
|
||||
* Поиск регионов по их имени
|
||||
*/
|
||||
searchRegionsByName(name: string, pageToken?: string, limit?: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetRegionsResponse>;
|
||||
}
|
||||
199
dist/apis/RegionsApi.js
vendored
Normal file
199
dist/apis/RegionsApi.js
vendored
Normal file
@@ -0,0 +1,199 @@
|
||||
"use strict";
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* API Яндекс Маркета для продавцов
|
||||
* API Яндекс Маркета помогает продавцам автоматизировать и упростить работу с маркетплейсом. В числе возможностей интеграции: * управление каталогом товаров и витриной, * обработка заказов, * изменение настроек магазина, * получение отчетов.
|
||||
*
|
||||
* The version of the OpenAPI document: LATEST
|
||||
*
|
||||
*
|
||||
* 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.RegionsApi = void 0;
|
||||
const runtime = require("../runtime");
|
||||
const index_1 = require("../models/index");
|
||||
/**
|
||||
*
|
||||
*/
|
||||
class RegionsApi extends runtime.BaseAPI {
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getRegionsCodes.md) %} Возвращает список стран с их кодами в формате :no-translate[ISO 3166-1 alpha-2]. Страна производства `countryCode` понадобится при продаже товаров из-за рубежа для бизнеса. [Инструкция](../../step-by-step/business-info.md) {% include notitle [limit](../../_auto/method_limits/getRegionsCodes.md) %}
|
||||
* Список допустимых кодов стран
|
||||
*/
|
||||
getRegionsCodesRaw(initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const queryParameters = {};
|
||||
const headerParameters = {};
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v2/regions/countries`,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.GetRegionsCodesResponseFromJSON)(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getRegionsCodes.md) %} Возвращает список стран с их кодами в формате :no-translate[ISO 3166-1 alpha-2]. Страна производства `countryCode` понадобится при продаже товаров из-за рубежа для бизнеса. [Инструкция](../../step-by-step/business-info.md) {% include notitle [limit](../../_auto/method_limits/getRegionsCodes.md) %}
|
||||
* Список допустимых кодов стран
|
||||
*/
|
||||
getRegionsCodes(initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.getRegionsCodesRaw(initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/searchRegionChildren.md) %} Возвращает информацию о регионах, являющихся дочерними по отношению к региону, идентификатор которого указан в запросе. {% include notitle [limit](../../_auto/method_limits/searchRegionChildren.md) %}
|
||||
* Информация о дочерних регионах
|
||||
*/
|
||||
searchRegionChildrenRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['regionId'] == null) {
|
||||
throw new runtime.RequiredError('regionId', 'Required parameter "regionId" was null or undefined when calling searchRegionChildren().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
if (requestParameters['pageToken'] != null) {
|
||||
queryParameters['pageToken'] = requestParameters['pageToken'];
|
||||
}
|
||||
if (requestParameters['limit'] != null) {
|
||||
queryParameters['limit'] = requestParameters['limit'];
|
||||
}
|
||||
if (requestParameters['page'] != null) {
|
||||
queryParameters['page'] = requestParameters['page'];
|
||||
}
|
||||
if (requestParameters['pageSize'] != null) {
|
||||
queryParameters['pageSize'] = requestParameters['pageSize'];
|
||||
}
|
||||
const headerParameters = {};
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v2/regions/{regionId}/children`.replace(`{${"regionId"}}`, encodeURIComponent(String(requestParameters['regionId']))),
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.GetRegionWithChildrenResponseFromJSON)(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/searchRegionChildren.md) %} Возвращает информацию о регионах, являющихся дочерними по отношению к региону, идентификатор которого указан в запросе. {% include notitle [limit](../../_auto/method_limits/searchRegionChildren.md) %}
|
||||
* Информация о дочерних регионах
|
||||
*/
|
||||
searchRegionChildren(regionId, pageToken, limit, page, pageSize, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.searchRegionChildrenRaw({ regionId: regionId, pageToken: pageToken, limit: limit, page: page, pageSize: pageSize }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/searchRegionsById.md) %} Возвращает информацию о регионе. {% include notitle [limit](../../_auto/method_limits/searchRegionsById.md) %}
|
||||
* Информация о регионе
|
||||
*/
|
||||
searchRegionsByIdRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['regionId'] == null) {
|
||||
throw new runtime.RequiredError('regionId', 'Required parameter "regionId" was null or undefined when calling searchRegionsById().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
const headerParameters = {};
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v2/regions/{regionId}`.replace(`{${"regionId"}}`, encodeURIComponent(String(requestParameters['regionId']))),
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.GetRegionByIdResponseFromJSON)(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/searchRegionsById.md) %} Возвращает информацию о регионе. {% include notitle [limit](../../_auto/method_limits/searchRegionsById.md) %}
|
||||
* Информация о регионе
|
||||
*/
|
||||
searchRegionsById(regionId, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.searchRegionsByIdRaw({ regionId: regionId }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/searchRegionsByName.md) %} Возвращает информацию о регионе, удовлетворяющем заданным в запросе условиям поиска. Если найдено несколько регионов, удовлетворяющих условиям поиска, возвращается информация по каждому найденному региону (но не более десяти регионов) для возможности определения нужного региона по родительским регионам. {% include notitle [limit](../../_auto/method_limits/searchRegionsByName.md) %}
|
||||
* Поиск регионов по их имени
|
||||
*/
|
||||
searchRegionsByNameRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['name'] == null) {
|
||||
throw new runtime.RequiredError('name', 'Required parameter "name" was null or undefined when calling searchRegionsByName().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
if (requestParameters['name'] != null) {
|
||||
queryParameters['name'] = requestParameters['name'];
|
||||
}
|
||||
if (requestParameters['pageToken'] != null) {
|
||||
queryParameters['pageToken'] = requestParameters['pageToken'];
|
||||
}
|
||||
if (requestParameters['limit'] != null) {
|
||||
queryParameters['limit'] = requestParameters['limit'];
|
||||
}
|
||||
const headerParameters = {};
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v2/regions`,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.GetRegionsResponseFromJSON)(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/searchRegionsByName.md) %} Возвращает информацию о регионе, удовлетворяющем заданным в запросе условиям поиска. Если найдено несколько регионов, удовлетворяющих условиям поиска, возвращается информация по каждому найденному региону (но не более десяти регионов) для возможности определения нужного региона по родительским регионам. {% include notitle [limit](../../_auto/method_limits/searchRegionsByName.md) %}
|
||||
* Поиск регионов по их имени
|
||||
*/
|
||||
searchRegionsByName(name, pageToken, limit, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.searchRegionsByNameRaw({ name: name, pageToken: pageToken, limit: limit }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
}
|
||||
exports.RegionsApi = RegionsApi;
|
||||
403
dist/apis/ReportsApi.d.ts
vendored
Normal file
403
dist/apis/ReportsApi.d.ts
vendored
Normal file
@@ -0,0 +1,403 @@
|
||||
/**
|
||||
* API Яндекс Маркета для продавцов
|
||||
* API Яндекс Маркета помогает продавцам автоматизировать и упростить работу с маркетплейсом. В числе возможностей интеграции: * управление каталогом товаров и витриной, * обработка заказов, * изменение настроек магазина, * получение отчетов.
|
||||
*
|
||||
* The version of the OpenAPI document: LATEST
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
import * as runtime from '../runtime';
|
||||
import type { GenerateBannersStatisticsRequest, GenerateBarcodesReportRequest, GenerateBoostConsolidatedRequest, GenerateClosureDocumentsDetalizationRequest, GenerateClosureDocumentsRequest, GenerateCompetitorsPositionReportRequest, GenerateGoodsFeedbackRequest, GenerateGoodsMovementReportRequest, GenerateGoodsPricesReportRequest, GenerateGoodsRealizationReportRequest, GenerateGoodsTurnoverRequest, GenerateJewelryFiscalReportRequest, GenerateKeyIndicatorsRequest, GenerateMarketingDetalizationRequest, GenerateMassOrderLabelsRequest, GenerateReportResponse, GenerateSalesGeographyRequest, GenerateShelfsStatisticsRequest, GenerateShipmentListDocumentReportRequest, GenerateShowsBoostRequest, GenerateShowsSalesReportRequest, GenerateStocksOnWarehousesReportRequest, GenerateStocksReportRequest, GenerateUnitedMarketplaceServicesReportRequest, GenerateUnitedNettingReportRequest, GenerateUnitedOrdersRequest, GenerateUnitedReturnsRequest, GetReportInfoResponse, PageFormatType, ReportFormatType, ReportLanguageType, SourceType } from '../models/index';
|
||||
export interface ReportsApiGenerateBannersStatisticsReportRequest {
|
||||
generateBannersStatisticsRequest: GenerateBannersStatisticsRequest;
|
||||
format?: ReportFormatType;
|
||||
sourceType?: SourceType;
|
||||
}
|
||||
export interface ReportsApiGenerateBarcodesReportOperationRequest {
|
||||
generateBarcodesReportRequest: GenerateBarcodesReportRequest;
|
||||
}
|
||||
export interface ReportsApiGenerateBoostConsolidatedReportRequest {
|
||||
generateBoostConsolidatedRequest: GenerateBoostConsolidatedRequest;
|
||||
format?: ReportFormatType;
|
||||
sourceType?: SourceType;
|
||||
}
|
||||
export interface ReportsApiGenerateClosureDocumentsDetalizationReportRequest {
|
||||
generateClosureDocumentsDetalizationRequest: GenerateClosureDocumentsDetalizationRequest;
|
||||
format?: ReportFormatType;
|
||||
}
|
||||
export interface ReportsApiGenerateClosureDocumentsReportRequest {
|
||||
generateClosureDocumentsRequest: GenerateClosureDocumentsRequest;
|
||||
}
|
||||
export interface ReportsApiGenerateCompetitorsPositionReportOperationRequest {
|
||||
generateCompetitorsPositionReportRequest: GenerateCompetitorsPositionReportRequest;
|
||||
format?: ReportFormatType;
|
||||
}
|
||||
export interface ReportsApiGenerateGoodsFeedbackReportRequest {
|
||||
generateGoodsFeedbackRequest: GenerateGoodsFeedbackRequest;
|
||||
format?: ReportFormatType;
|
||||
}
|
||||
export interface ReportsApiGenerateGoodsMovementReportOperationRequest {
|
||||
generateGoodsMovementReportRequest: GenerateGoodsMovementReportRequest;
|
||||
format?: ReportFormatType;
|
||||
}
|
||||
export interface ReportsApiGenerateGoodsPricesReportOperationRequest {
|
||||
generateGoodsPricesReportRequest: GenerateGoodsPricesReportRequest;
|
||||
format?: ReportFormatType;
|
||||
}
|
||||
export interface ReportsApiGenerateGoodsRealizationReportOperationRequest {
|
||||
generateGoodsRealizationReportRequest: GenerateGoodsRealizationReportRequest;
|
||||
format?: ReportFormatType;
|
||||
}
|
||||
export interface ReportsApiGenerateGoodsTurnoverReportRequest {
|
||||
generateGoodsTurnoverRequest: GenerateGoodsTurnoverRequest;
|
||||
format?: ReportFormatType;
|
||||
}
|
||||
export interface ReportsApiGenerateJewelryFiscalReportOperationRequest {
|
||||
generateJewelryFiscalReportRequest: GenerateJewelryFiscalReportRequest;
|
||||
format?: ReportFormatType;
|
||||
}
|
||||
export interface ReportsApiGenerateKeyIndicatorsReportRequest {
|
||||
generateKeyIndicatorsRequest: GenerateKeyIndicatorsRequest;
|
||||
format?: ReportFormatType;
|
||||
}
|
||||
export interface ReportsApiGenerateMarketingDetalizationReportRequest {
|
||||
businessId: number;
|
||||
generateMarketingDetalizationRequest: GenerateMarketingDetalizationRequest;
|
||||
format?: ReportFormatType;
|
||||
sourceType?: SourceType;
|
||||
}
|
||||
export interface ReportsApiGenerateMassOrderLabelsReportRequest {
|
||||
generateMassOrderLabelsRequest: GenerateMassOrderLabelsRequest;
|
||||
format?: PageFormatType;
|
||||
}
|
||||
export interface ReportsApiGenerateSalesGeographyReportRequest {
|
||||
generateSalesGeographyRequest: GenerateSalesGeographyRequest;
|
||||
format?: ReportFormatType;
|
||||
}
|
||||
export interface ReportsApiGenerateShelfsStatisticsReportRequest {
|
||||
generateShelfsStatisticsRequest: GenerateShelfsStatisticsRequest;
|
||||
format?: ReportFormatType;
|
||||
sourceType?: SourceType;
|
||||
}
|
||||
export interface ReportsApiGenerateShipmentListDocumentReportOperationRequest {
|
||||
generateShipmentListDocumentReportRequest: GenerateShipmentListDocumentReportRequest;
|
||||
}
|
||||
export interface ReportsApiGenerateShowsBoostReportRequest {
|
||||
generateShowsBoostRequest: GenerateShowsBoostRequest;
|
||||
format?: ReportFormatType;
|
||||
sourceType?: SourceType;
|
||||
}
|
||||
export interface ReportsApiGenerateShowsSalesReportOperationRequest {
|
||||
generateShowsSalesReportRequest: GenerateShowsSalesReportRequest;
|
||||
format?: ReportFormatType;
|
||||
}
|
||||
export interface ReportsApiGenerateStocksOnWarehousesReportOperationRequest {
|
||||
generateStocksOnWarehousesReportRequest: GenerateStocksOnWarehousesReportRequest;
|
||||
format?: ReportFormatType;
|
||||
}
|
||||
export interface ReportsApiGenerateStocksReportOperationRequest {
|
||||
businessId: number;
|
||||
format?: ReportFormatType;
|
||||
generateStocksReportRequest?: GenerateStocksReportRequest;
|
||||
}
|
||||
export interface ReportsApiGenerateUnitedMarketplaceServicesReportOperationRequest {
|
||||
generateUnitedMarketplaceServicesReportRequest: GenerateUnitedMarketplaceServicesReportRequest;
|
||||
format?: ReportFormatType;
|
||||
language?: ReportLanguageType;
|
||||
}
|
||||
export interface ReportsApiGenerateUnitedNettingReportOperationRequest {
|
||||
generateUnitedNettingReportRequest: GenerateUnitedNettingReportRequest;
|
||||
format?: ReportFormatType;
|
||||
language?: ReportLanguageType;
|
||||
}
|
||||
export interface ReportsApiGenerateUnitedOrdersReportRequest {
|
||||
generateUnitedOrdersRequest: GenerateUnitedOrdersRequest;
|
||||
format?: ReportFormatType;
|
||||
language?: ReportLanguageType;
|
||||
}
|
||||
export interface ReportsApiGenerateUnitedReturnsReportRequest {
|
||||
generateUnitedReturnsRequest: GenerateUnitedReturnsRequest;
|
||||
format?: ReportFormatType;
|
||||
}
|
||||
export interface ReportsApiGetReportInfoRequest {
|
||||
reportId: string;
|
||||
sourceType?: SourceType;
|
||||
}
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export declare class ReportsApi extends runtime.BaseAPI {
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/generateBannersStatisticsReport.md) %} Запускает генерацию сводного отчета по охватному продвижению. {% if audience == \"partner\" %}Что это за отчет: [для баннеров](https://yandex.ru/support/marketplace/ru/marketing/advertising-tools/banner#statistics), [для пуш-уведомлений](https://yandex.ru/support/marketplace/ru/marketing/advertising-tools/push-notifications#statistics).{% endif %} Узнать статус генерации и получить ссылку на готовый отчет можно с помощью запроса [GET v2/reports/info/{reportId}](../../reference/reports/getReportInfo.md). {% include notitle [reports](../../_auto/reports/incuts/banners_statistics.md) %} {% if audience != \"advertiser\" %} {% include notitle [tariff-period](../../_includes/common/report-data-period-400-days.md) %} {% endif %} {% include notitle [limit](../../_auto/method_limits/generateBannersStatisticsReport.md) %}
|
||||
* Отчет по охватному продвижению
|
||||
*/
|
||||
generateBannersStatisticsReportRaw(requestParameters: ReportsApiGenerateBannersStatisticsReportRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GenerateReportResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/generateBannersStatisticsReport.md) %} Запускает генерацию сводного отчета по охватному продвижению. {% if audience == \"partner\" %}Что это за отчет: [для баннеров](https://yandex.ru/support/marketplace/ru/marketing/advertising-tools/banner#statistics), [для пуш-уведомлений](https://yandex.ru/support/marketplace/ru/marketing/advertising-tools/push-notifications#statistics).{% endif %} Узнать статус генерации и получить ссылку на готовый отчет можно с помощью запроса [GET v2/reports/info/{reportId}](../../reference/reports/getReportInfo.md). {% include notitle [reports](../../_auto/reports/incuts/banners_statistics.md) %} {% if audience != \"advertiser\" %} {% include notitle [tariff-period](../../_includes/common/report-data-period-400-days.md) %} {% endif %} {% include notitle [limit](../../_auto/method_limits/generateBannersStatisticsReport.md) %}
|
||||
* Отчет по охватному продвижению
|
||||
*/
|
||||
generateBannersStatisticsReport(generateBannersStatisticsRequest: GenerateBannersStatisticsRequest, format?: ReportFormatType, sourceType?: SourceType, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GenerateReportResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/generateBarcodesReport.md) %} Запускает генерацию PDF-файла со штрихкодами переданных товаров или товаров в указанной заявке на поставку. Файл не получится сгенерировать, если в нем будет более 1 500 штрихкодов. Узнать статус генерации и получить ссылку на готовый файл можно с помощью запроса [GET v2/reports/info/{reportId}](../../reference/reports/getReportInfo.md). {% include notitle [limit](../../_auto/method_limits/generateBarcodesReport.md) %}
|
||||
* Получение файла со штрихкодами
|
||||
*/
|
||||
generateBarcodesReportRaw(requestParameters: ReportsApiGenerateBarcodesReportOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GenerateReportResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/generateBarcodesReport.md) %} Запускает генерацию PDF-файла со штрихкодами переданных товаров или товаров в указанной заявке на поставку. Файл не получится сгенерировать, если в нем будет более 1 500 штрихкодов. Узнать статус генерации и получить ссылку на готовый файл можно с помощью запроса [GET v2/reports/info/{reportId}](../../reference/reports/getReportInfo.md). {% include notitle [limit](../../_auto/method_limits/generateBarcodesReport.md) %}
|
||||
* Получение файла со штрихкодами
|
||||
*/
|
||||
generateBarcodesReport(generateBarcodesReportRequest: GenerateBarcodesReportRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GenerateReportResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/generateBoostConsolidatedReport.md) %} Запускает генерацию сводного отчета по бусту продаж за заданный период. {% if audience == \"partner\" %}[Что такое буст продаж](https://yandex.ru/support/marketplace/ru/marketing/campaigns){% endif %} Отчет содержит информацию по всем кампаниям, созданным и через API, и в кабинете. Узнать статус генерации и получить ссылку на готовый отчет можно с помощью запроса [GET v2/reports/info/{reportId}](../../reference/reports/getReportInfo.md). {% include notitle [reports]({{ report-columns-boost-consolidated }}) %} {% if audience != \"advertiser\" %} {% include notitle [tariff-period](../../_includes/common/report-data-period-400-days.md) %} {% endif %} {% include notitle [limit](../../_auto/method_limits/generateBoostConsolidatedReport.md) %}
|
||||
* Отчет по бусту продаж
|
||||
*/
|
||||
generateBoostConsolidatedReportRaw(requestParameters: ReportsApiGenerateBoostConsolidatedReportRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GenerateReportResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/generateBoostConsolidatedReport.md) %} Запускает генерацию сводного отчета по бусту продаж за заданный период. {% if audience == \"partner\" %}[Что такое буст продаж](https://yandex.ru/support/marketplace/ru/marketing/campaigns){% endif %} Отчет содержит информацию по всем кампаниям, созданным и через API, и в кабинете. Узнать статус генерации и получить ссылку на готовый отчет можно с помощью запроса [GET v2/reports/info/{reportId}](../../reference/reports/getReportInfo.md). {% include notitle [reports]({{ report-columns-boost-consolidated }}) %} {% if audience != \"advertiser\" %} {% include notitle [tariff-period](../../_includes/common/report-data-period-400-days.md) %} {% endif %} {% include notitle [limit](../../_auto/method_limits/generateBoostConsolidatedReport.md) %}
|
||||
* Отчет по бусту продаж
|
||||
*/
|
||||
generateBoostConsolidatedReport(generateBoostConsolidatedRequest: GenerateBoostConsolidatedRequest, format?: ReportFormatType, sourceType?: SourceType, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GenerateReportResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/generateClosureDocumentsDetalizationReport.md) %} Запускает генерацию отчета по схождению с закрывающими документами в зависимости от типа договора. Узнать статус генерации и получить ссылку на готовый отчет можно с помощью запроса [GET v2/reports/info/{reportId}](../../reference/reports/getReportInfo.md). {% list tabs %} - Договор на размещение {% include notitle [reports](../../_auto/reports/period_closure/period_closure_income.md) %} - Договор на продвижение {% include notitle [reports](../../_auto/reports/period_closure/period_closure_outcome.md) %} {% endlist %} {% include notitle [limit](../../_auto/method_limits/generateClosureDocumentsDetalizationReport.md) %}
|
||||
* Отчет по схождению с закрывающими документами
|
||||
*/
|
||||
generateClosureDocumentsDetalizationReportRaw(requestParameters: ReportsApiGenerateClosureDocumentsDetalizationReportRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GenerateReportResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/generateClosureDocumentsDetalizationReport.md) %} Запускает генерацию отчета по схождению с закрывающими документами в зависимости от типа договора. Узнать статус генерации и получить ссылку на готовый отчет можно с помощью запроса [GET v2/reports/info/{reportId}](../../reference/reports/getReportInfo.md). {% list tabs %} - Договор на размещение {% include notitle [reports](../../_auto/reports/period_closure/period_closure_income.md) %} - Договор на продвижение {% include notitle [reports](../../_auto/reports/period_closure/period_closure_outcome.md) %} {% endlist %} {% include notitle [limit](../../_auto/method_limits/generateClosureDocumentsDetalizationReport.md) %}
|
||||
* Отчет по схождению с закрывающими документами
|
||||
*/
|
||||
generateClosureDocumentsDetalizationReport(generateClosureDocumentsDetalizationRequest: GenerateClosureDocumentsDetalizationRequest, format?: ReportFormatType, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GenerateReportResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/generateClosureDocumentsReport.md) %} Возвращает ZIP-архив с закрывающими документами в формате PDF за указанный месяц. {% cut \"Состав документов в зависимости от типа договора\" %} * **Договор на размещение** * [акт об оказанных услугах](*acts-main-act) * [счет-фактура](*acts-main-invoice) * [сводный отчет по данным статистики](*acts-main-report) * [отчет об исполнении поручения и о зачете взаимных требований](*acts-main-agent) (отчет агента) * **Договор на продвижение** (в России не заключается после 30 сентября 2024 года) * [акт об оказании услуг](*acts-discounts-act) * [счет-фактура](*acts-discounts-invoice), если этого требует схема налогообложения * **Договор на маркетинг** * [акт об оказанных услугах](*acts-marketing-act) * [счет-фактура](*acts-main-invoice) * [счет-фактура на аванс](*acts-marketing-invoice) * [выписка по лицевому счету](*acts-marketing-account) * [детализация к акту](*acts-marketing-details) {% endcut %} Узнать статус генерации и получить ссылку на архив можно с помощью запроса [GET v2/reports/info/{reportId}](../../reference/reports/getReportInfo.md). {% include notitle [limit](../../_auto/method_limits/generateClosureDocumentsReport.md) %}
|
||||
* Закрывающие документы
|
||||
*/
|
||||
generateClosureDocumentsReportRaw(requestParameters: ReportsApiGenerateClosureDocumentsReportRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GenerateReportResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/generateClosureDocumentsReport.md) %} Возвращает ZIP-архив с закрывающими документами в формате PDF за указанный месяц. {% cut \"Состав документов в зависимости от типа договора\" %} * **Договор на размещение** * [акт об оказанных услугах](*acts-main-act) * [счет-фактура](*acts-main-invoice) * [сводный отчет по данным статистики](*acts-main-report) * [отчет об исполнении поручения и о зачете взаимных требований](*acts-main-agent) (отчет агента) * **Договор на продвижение** (в России не заключается после 30 сентября 2024 года) * [акт об оказании услуг](*acts-discounts-act) * [счет-фактура](*acts-discounts-invoice), если этого требует схема налогообложения * **Договор на маркетинг** * [акт об оказанных услугах](*acts-marketing-act) * [счет-фактура](*acts-main-invoice) * [счет-фактура на аванс](*acts-marketing-invoice) * [выписка по лицевому счету](*acts-marketing-account) * [детализация к акту](*acts-marketing-details) {% endcut %} Узнать статус генерации и получить ссылку на архив можно с помощью запроса [GET v2/reports/info/{reportId}](../../reference/reports/getReportInfo.md). {% include notitle [limit](../../_auto/method_limits/generateClosureDocumentsReport.md) %}
|
||||
* Закрывающие документы
|
||||
*/
|
||||
generateClosureDocumentsReport(generateClosureDocumentsRequest: GenerateClosureDocumentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GenerateReportResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/generateCompetitorsPositionReport.md) %} Запускает генерацию отчета «Конкурентная позиция» за заданный период. [Что это за отчет](https://yandex.ru/support2/marketplace/ru/analytics/competitors.html) Узнать статус генерации и получить ссылку на готовый отчет можно с помощью запроса [GET v2/reports/info/{reportId}](../../reference/reports/getReportInfo.md). {% note info \"Значение -1 в отчете\" %} Если в CSV-файле в столбце :no-translate[**POSITION**] стоит -1, в этот день не было заказов с товарами в указанной категории. {% endnote %} {% include notitle [reports](../../_auto/reports/masterstat/competitors_position.md) %} {% include notitle [tariff-period](../../_includes/common/report-data-period-400-days.md) %} {% include notitle [limit](../../_auto/method_limits/generateCompetitorsPositionReport.md) %}
|
||||
* Отчет «Конкурентная позиция»
|
||||
*/
|
||||
generateCompetitorsPositionReportRaw(requestParameters: ReportsApiGenerateCompetitorsPositionReportOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GenerateReportResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/generateCompetitorsPositionReport.md) %} Запускает генерацию отчета «Конкурентная позиция» за заданный период. [Что это за отчет](https://yandex.ru/support2/marketplace/ru/analytics/competitors.html) Узнать статус генерации и получить ссылку на готовый отчет можно с помощью запроса [GET v2/reports/info/{reportId}](../../reference/reports/getReportInfo.md). {% note info \"Значение -1 в отчете\" %} Если в CSV-файле в столбце :no-translate[**POSITION**] стоит -1, в этот день не было заказов с товарами в указанной категории. {% endnote %} {% include notitle [reports](../../_auto/reports/masterstat/competitors_position.md) %} {% include notitle [tariff-period](../../_includes/common/report-data-period-400-days.md) %} {% include notitle [limit](../../_auto/method_limits/generateCompetitorsPositionReport.md) %}
|
||||
* Отчет «Конкурентная позиция»
|
||||
*/
|
||||
generateCompetitorsPositionReport(generateCompetitorsPositionReportRequest: GenerateCompetitorsPositionReportRequest, format?: ReportFormatType, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GenerateReportResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/generateGoodsFeedbackReport.md) %} Запускает генерацию отчета по отзывам о товарах. [Что это за отчет](https://yandex.ru/support/marketplace/ru/marketing/plus-reviews#stat) Узнать статус генерации и получить ссылку на готовый отчет можно с помощью запроса [GET v2/reports/info/{reportId}](../../reference/reports/getReportInfo.md). {% include notitle [reports](../../_auto/reports/paid_opinion_models/paid_opinion_models.md) %} {% include notitle [tariff-period](../../_includes/common/simultaneously-generated-reports-amount.md) %} {% include notitle [limit](../../_auto/method_limits/generateGoodsFeedbackReport.md) %}
|
||||
* Отчет по отзывам о товарах
|
||||
*/
|
||||
generateGoodsFeedbackReportRaw(requestParameters: ReportsApiGenerateGoodsFeedbackReportRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GenerateReportResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/generateGoodsFeedbackReport.md) %} Запускает генерацию отчета по отзывам о товарах. [Что это за отчет](https://yandex.ru/support/marketplace/ru/marketing/plus-reviews#stat) Узнать статус генерации и получить ссылку на готовый отчет можно с помощью запроса [GET v2/reports/info/{reportId}](../../reference/reports/getReportInfo.md). {% include notitle [reports](../../_auto/reports/paid_opinion_models/paid_opinion_models.md) %} {% include notitle [tariff-period](../../_includes/common/simultaneously-generated-reports-amount.md) %} {% include notitle [limit](../../_auto/method_limits/generateGoodsFeedbackReport.md) %}
|
||||
* Отчет по отзывам о товарах
|
||||
*/
|
||||
generateGoodsFeedbackReport(generateGoodsFeedbackRequest: GenerateGoodsFeedbackRequest, format?: ReportFormatType, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GenerateReportResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/generateGoodsMovementReport.md) %} Запускает генерацию отчета по движению товаров. [Что это за отчет](https://yandex.ru/support/marketplace/analytics/reports-fby-fbs.html#flow) Узнать статус генерации и получить ссылку на готовый отчет можно с помощью запроса [GET v2/reports/info/{reportId}](../../reference/reports/getReportInfo.md). {% include notitle [reports](../../_auto/reports/sku/movement/movement_config.md) %} {% include notitle [tariff-period](../../_includes/common/report-data-period-unchanged.md) %} {% include notitle [limit](../../_auto/method_limits/generateGoodsMovementReport.md) %}
|
||||
* Отчет по движению товаров
|
||||
*/
|
||||
generateGoodsMovementReportRaw(requestParameters: ReportsApiGenerateGoodsMovementReportOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GenerateReportResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/generateGoodsMovementReport.md) %} Запускает генерацию отчета по движению товаров. [Что это за отчет](https://yandex.ru/support/marketplace/analytics/reports-fby-fbs.html#flow) Узнать статус генерации и получить ссылку на готовый отчет можно с помощью запроса [GET v2/reports/info/{reportId}](../../reference/reports/getReportInfo.md). {% include notitle [reports](../../_auto/reports/sku/movement/movement_config.md) %} {% include notitle [tariff-period](../../_includes/common/report-data-period-unchanged.md) %} {% include notitle [limit](../../_auto/method_limits/generateGoodsMovementReport.md) %}
|
||||
* Отчет по движению товаров
|
||||
*/
|
||||
generateGoodsMovementReport(generateGoodsMovementReportRequest: GenerateGoodsMovementReportRequest, format?: ReportFormatType, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GenerateReportResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/generateGoodsPricesReport.md) %} Запускает генерацию отчета «Цены». **Какая информация вернется:** * если передать `businessId` — по единым ценам кабинета; * если [включены магазинные цены](*onlyDefaultPrice-false) и указать `campaignId` — по ценам в соответствующем магазине. Узнать статус генерации и получить ссылку на готовый отчет можно с помощью запроса [GET v2/reports/info/{reportId}](../../reference/reports/getReportInfo.md). {% list tabs %} - Цены во всех магазинах кабинета {% include notitle [reports](../../_auto/reports/prices/mass_assortment_business_price_v2.md) %} - Магазинные цены {% include notitle [reports](../../_auto/reports/prices/mass_assortment_price_v2.md) %} {% endlist %} {% include notitle [tariff-period](../../_includes/common/simultaneously-generated-reports-amount.md) %} {% include notitle [limit](../../_auto/method_limits/generateGoodsPricesReport.md) %}
|
||||
* Отчет «Цены»
|
||||
*/
|
||||
generateGoodsPricesReportRaw(requestParameters: ReportsApiGenerateGoodsPricesReportOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GenerateReportResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/generateGoodsPricesReport.md) %} Запускает генерацию отчета «Цены». **Какая информация вернется:** * если передать `businessId` — по единым ценам кабинета; * если [включены магазинные цены](*onlyDefaultPrice-false) и указать `campaignId` — по ценам в соответствующем магазине. Узнать статус генерации и получить ссылку на готовый отчет можно с помощью запроса [GET v2/reports/info/{reportId}](../../reference/reports/getReportInfo.md). {% list tabs %} - Цены во всех магазинах кабинета {% include notitle [reports](../../_auto/reports/prices/mass_assortment_business_price_v2.md) %} - Магазинные цены {% include notitle [reports](../../_auto/reports/prices/mass_assortment_price_v2.md) %} {% endlist %} {% include notitle [tariff-period](../../_includes/common/simultaneously-generated-reports-amount.md) %} {% include notitle [limit](../../_auto/method_limits/generateGoodsPricesReport.md) %}
|
||||
* Отчет «Цены»
|
||||
*/
|
||||
generateGoodsPricesReport(generateGoodsPricesReportRequest: GenerateGoodsPricesReportRequest, format?: ReportFormatType, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GenerateReportResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/generateGoodsRealizationReport.md) %} Запускает генерацию отчета по реализации за заданный период. [Что это за отчет](https://yandex.ru/support/marketplace/ru/accounting/transactions#sales-report) Узнать статус генерации и получить ссылку на готовый отчет можно с помощью запроса [GET v2/reports/info/{reportId}](../../reference/reports/getReportInfo.md). {% list tabs %} - FBY, FBS, Экспресс {% include notitle [reports](../../_auto/reports/united/statistics/generator/united_statistics_v2.md) %} - DBS {% include notitle [reports](../../_auto/reports/united/statistics/generator/united_statistics_v2_dbs.md) %} {% endlist %} {% include notitle [limit](../../_auto/method_limits/generateGoodsRealizationReport.md) %}
|
||||
* Отчет по реализации
|
||||
*/
|
||||
generateGoodsRealizationReportRaw(requestParameters: ReportsApiGenerateGoodsRealizationReportOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GenerateReportResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/generateGoodsRealizationReport.md) %} Запускает генерацию отчета по реализации за заданный период. [Что это за отчет](https://yandex.ru/support/marketplace/ru/accounting/transactions#sales-report) Узнать статус генерации и получить ссылку на готовый отчет можно с помощью запроса [GET v2/reports/info/{reportId}](../../reference/reports/getReportInfo.md). {% list tabs %} - FBY, FBS, Экспресс {% include notitle [reports](../../_auto/reports/united/statistics/generator/united_statistics_v2.md) %} - DBS {% include notitle [reports](../../_auto/reports/united/statistics/generator/united_statistics_v2_dbs.md) %} {% endlist %} {% include notitle [limit](../../_auto/method_limits/generateGoodsRealizationReport.md) %}
|
||||
* Отчет по реализации
|
||||
*/
|
||||
generateGoodsRealizationReport(generateGoodsRealizationReportRequest: GenerateGoodsRealizationReportRequest, format?: ReportFormatType, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GenerateReportResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/generateGoodsTurnoverReport.md) %} Запускает генерацию отчета по оборачиваемости за заданную дату. [Что это за отчет](https://yandex.ru/support/marketplace/ru/storage/logistics#turnover) Узнать статус генерации и получить ссылку на готовый отчет можно с помощью запроса [GET v2/reports/info/{reportId}](../../reference/reports/getReportInfo.md). {% include notitle [reports](../../_auto/reports/turnover/turnover.md) %} {% include notitle [tariff-period](../../_includes/common/report-data-period-unchanged.md) %} {% include notitle [limit](../../_auto/method_limits/generateGoodsTurnoverReport.md) %}
|
||||
* Отчет по оборачиваемости
|
||||
*/
|
||||
generateGoodsTurnoverReportRaw(requestParameters: ReportsApiGenerateGoodsTurnoverReportRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GenerateReportResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/generateGoodsTurnoverReport.md) %} Запускает генерацию отчета по оборачиваемости за заданную дату. [Что это за отчет](https://yandex.ru/support/marketplace/ru/storage/logistics#turnover) Узнать статус генерации и получить ссылку на готовый отчет можно с помощью запроса [GET v2/reports/info/{reportId}](../../reference/reports/getReportInfo.md). {% include notitle [reports](../../_auto/reports/turnover/turnover.md) %} {% include notitle [tariff-period](../../_includes/common/report-data-period-unchanged.md) %} {% include notitle [limit](../../_auto/method_limits/generateGoodsTurnoverReport.md) %}
|
||||
* Отчет по оборачиваемости
|
||||
*/
|
||||
generateGoodsTurnoverReport(generateGoodsTurnoverRequest: GenerateGoodsTurnoverRequest, format?: ReportFormatType, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GenerateReportResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/generateJewelryFiscalReport.md) %} Запускает генерацию отчета по заказам с ювелирными изделиями. Узнать статус генерации и получить ссылку на готовый отчет можно с помощью запроса [GET v2/reports/info/{reportId}](../../reference/reports/getReportInfo.md). {% include notitle [reports](../../_auto/reports/identifiers/jewelry/orders_jewelry_fiscal.md) %} {% include notitle [tariff-period](../../_includes/common/report-data-period-unchanged.md) %} {% include notitle [limit](../../_auto/method_limits/generateJewelryFiscalReport.md) %}
|
||||
* Отчет по заказам с ювелирными изделиями
|
||||
*/
|
||||
generateJewelryFiscalReportRaw(requestParameters: ReportsApiGenerateJewelryFiscalReportOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GenerateReportResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/generateJewelryFiscalReport.md) %} Запускает генерацию отчета по заказам с ювелирными изделиями. Узнать статус генерации и получить ссылку на готовый отчет можно с помощью запроса [GET v2/reports/info/{reportId}](../../reference/reports/getReportInfo.md). {% include notitle [reports](../../_auto/reports/identifiers/jewelry/orders_jewelry_fiscal.md) %} {% include notitle [tariff-period](../../_includes/common/report-data-period-unchanged.md) %} {% include notitle [limit](../../_auto/method_limits/generateJewelryFiscalReport.md) %}
|
||||
* Отчет по заказам с ювелирными изделиями
|
||||
*/
|
||||
generateJewelryFiscalReport(generateJewelryFiscalReportRequest: GenerateJewelryFiscalReportRequest, format?: ReportFormatType, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GenerateReportResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/generateKeyIndicatorsReport.md) %} Запускает генерацию отчета по ключевым показателям. [Что это за отчет](https://yandex.ru/support/marketplace/ru/analytics/key-metrics) Узнать статус генерации и получить ссылку на готовый отчет можно с помощью запроса [GET v2/reports/info/{reportId}](../../reference/reports/getReportInfo.md). {% include notitle [reports](../../_auto/reports/key_indicators/key_indicators.md) %} {% include notitle [tariff-period](../../_includes/common/report-data-period-400-days.md) %} {% include notitle [limit](../../_auto/method_limits/generateKeyIndicatorsReport.md) %}
|
||||
* Отчет по ключевым показателям
|
||||
*/
|
||||
generateKeyIndicatorsReportRaw(requestParameters: ReportsApiGenerateKeyIndicatorsReportRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GenerateReportResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/generateKeyIndicatorsReport.md) %} Запускает генерацию отчета по ключевым показателям. [Что это за отчет](https://yandex.ru/support/marketplace/ru/analytics/key-metrics) Узнать статус генерации и получить ссылку на готовый отчет можно с помощью запроса [GET v2/reports/info/{reportId}](../../reference/reports/getReportInfo.md). {% include notitle [reports](../../_auto/reports/key_indicators/key_indicators.md) %} {% include notitle [tariff-period](../../_includes/common/report-data-period-400-days.md) %} {% include notitle [limit](../../_auto/method_limits/generateKeyIndicatorsReport.md) %}
|
||||
* Отчет по ключевым показателям
|
||||
*/
|
||||
generateKeyIndicatorsReport(generateKeyIndicatorsRequest: GenerateKeyIndicatorsRequest, format?: ReportFormatType, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GenerateReportResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/generateMarketingDetalizationReport.md) %} Запускает генерацию отчета по счету маркетинга. Узнать статус генерации и получить ссылку на готовый отчет можно с помощью запроса [GET v2/reports/info/{reportId}](../../reference/reports/getReportInfo.md). {% include notitle [reports](../../_auto/reports/advertiser_billing_operations/advertiser_billing_operations.md) %} {% include notitle [limit](../../_auto/method_limits/generateMarketingDetalizationReport.md) %}
|
||||
* Отчет по счету маркетинга
|
||||
*/
|
||||
generateMarketingDetalizationReportRaw(requestParameters: ReportsApiGenerateMarketingDetalizationReportRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GenerateReportResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/generateMarketingDetalizationReport.md) %} Запускает генерацию отчета по счету маркетинга. Узнать статус генерации и получить ссылку на готовый отчет можно с помощью запроса [GET v2/reports/info/{reportId}](../../reference/reports/getReportInfo.md). {% include notitle [reports](../../_auto/reports/advertiser_billing_operations/advertiser_billing_operations.md) %} {% include notitle [limit](../../_auto/method_limits/generateMarketingDetalizationReport.md) %}
|
||||
* Отчет по счету маркетинга
|
||||
*/
|
||||
generateMarketingDetalizationReport(businessId: number, generateMarketingDetalizationRequest: GenerateMarketingDetalizationRequest, format?: ReportFormatType, sourceType?: SourceType, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GenerateReportResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/generateMassOrderLabelsReport.md) %} Запускает генерацию PDF-файла с ярлыками для переданных заказов. Подробно о том, зачем они нужны и как выглядят, рассказано [в Справке Маркета для продавцов](https://yandex.ru/support/marketplace/orders/fbs/packaging/marking.html). Чтобы на ярлыке отображался внешний идентификатор заказа, передайте его в методе [POST v2/campaigns/{campaignId}/orders/{orderId}/external-id](../../reference/orders/updateExternalOrderId.md). Узнать статус генерации и получить ссылку на готовый файл можно с помощью запроса [GET v2/reports/info/{reportId}](../../reference/reports/getReportInfo.md). {% include notitle [limit](../../_auto/method_limits/generateMassOrderLabelsReport.md) %}
|
||||
* Готовые ярлыки‑наклейки на все коробки в нескольких заказах
|
||||
*/
|
||||
generateMassOrderLabelsReportRaw(requestParameters: ReportsApiGenerateMassOrderLabelsReportRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GenerateReportResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/generateMassOrderLabelsReport.md) %} Запускает генерацию PDF-файла с ярлыками для переданных заказов. Подробно о том, зачем они нужны и как выглядят, рассказано [в Справке Маркета для продавцов](https://yandex.ru/support/marketplace/orders/fbs/packaging/marking.html). Чтобы на ярлыке отображался внешний идентификатор заказа, передайте его в методе [POST v2/campaigns/{campaignId}/orders/{orderId}/external-id](../../reference/orders/updateExternalOrderId.md). Узнать статус генерации и получить ссылку на готовый файл можно с помощью запроса [GET v2/reports/info/{reportId}](../../reference/reports/getReportInfo.md). {% include notitle [limit](../../_auto/method_limits/generateMassOrderLabelsReport.md) %}
|
||||
* Готовые ярлыки‑наклейки на все коробки в нескольких заказах
|
||||
*/
|
||||
generateMassOrderLabelsReport(generateMassOrderLabelsRequest: GenerateMassOrderLabelsRequest, format?: PageFormatType, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GenerateReportResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/generateSalesGeographyReport.md) %} Запускает генерацию отчета по географии продаж. [Что это за отчет](https://yandex.ru/support/marketplace/ru/analytics/sales-geography) Узнать статус генерации и получить ссылку на готовый отчет можно с помощью запроса [GET v2/reports/info/{reportId}](../../reference/reports/getReportInfo.md). {% include notitle [reports](../../_auto/reports/locality/locality_offers_report_v2.md) %} {% include notitle [tariff-period](../../_includes/common/report-data-period-400-days.md) %} {% include notitle [limit](../../_auto/method_limits/generateSalesGeographyReport.md) %}
|
||||
* Отчет по географии продаж
|
||||
*/
|
||||
generateSalesGeographyReportRaw(requestParameters: ReportsApiGenerateSalesGeographyReportRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GenerateReportResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/generateSalesGeographyReport.md) %} Запускает генерацию отчета по географии продаж. [Что это за отчет](https://yandex.ru/support/marketplace/ru/analytics/sales-geography) Узнать статус генерации и получить ссылку на готовый отчет можно с помощью запроса [GET v2/reports/info/{reportId}](../../reference/reports/getReportInfo.md). {% include notitle [reports](../../_auto/reports/locality/locality_offers_report_v2.md) %} {% include notitle [tariff-period](../../_includes/common/report-data-period-400-days.md) %} {% include notitle [limit](../../_auto/method_limits/generateSalesGeographyReport.md) %}
|
||||
* Отчет по географии продаж
|
||||
*/
|
||||
generateSalesGeographyReport(generateSalesGeographyRequest: GenerateSalesGeographyRequest, format?: ReportFormatType, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GenerateReportResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/generateShelfsStatisticsReport.md) %} Запускает генерацию сводного отчета по полкам — рекламным блокам с баннером или видео и набором товаров. {% if audience == \"partner\" %}Подробнее о них читайте [в Справке Маркета для продавцов](https://yandex.ru/support2/marketplace/ru/marketing/shelf).{% endif %} Узнать статус генерации и получить ссылку на готовый отчет можно с помощью запроса [GET v2/reports/info/{reportId}](../../reference/reports/getReportInfo.md). {% include notitle [reports](../../_auto/reports/incuts/shelfs_statistics.md) %} {% if audience != \"advertiser\" %} {% include notitle [tariff-period](../../_includes/common/report-data-period-400-days.md) %} {% endif %} {% include notitle [limit](../../_auto/method_limits/generateShelfsStatisticsReport.md) %}
|
||||
* Отчет по полкам
|
||||
*/
|
||||
generateShelfsStatisticsReportRaw(requestParameters: ReportsApiGenerateShelfsStatisticsReportRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GenerateReportResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/generateShelfsStatisticsReport.md) %} Запускает генерацию сводного отчета по полкам — рекламным блокам с баннером или видео и набором товаров. {% if audience == \"partner\" %}Подробнее о них читайте [в Справке Маркета для продавцов](https://yandex.ru/support2/marketplace/ru/marketing/shelf).{% endif %} Узнать статус генерации и получить ссылку на готовый отчет можно с помощью запроса [GET v2/reports/info/{reportId}](../../reference/reports/getReportInfo.md). {% include notitle [reports](../../_auto/reports/incuts/shelfs_statistics.md) %} {% if audience != \"advertiser\" %} {% include notitle [tariff-period](../../_includes/common/report-data-period-400-days.md) %} {% endif %} {% include notitle [limit](../../_auto/method_limits/generateShelfsStatisticsReport.md) %}
|
||||
* Отчет по полкам
|
||||
*/
|
||||
generateShelfsStatisticsReport(generateShelfsStatisticsRequest: GenerateShelfsStatisticsRequest, format?: ReportFormatType, sourceType?: SourceType, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GenerateReportResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/generateShipmentListDocumentReport.md) %} Запускает генерацию **листа сборки** для отгрузки. Чтобы на в листе сборки отображался внешний идентификатор заказа, передайте его в методе [POST v2/campaigns/{campaignId}/orders/{orderId}/external-id](../../reference/orders/updateExternalOrderId.md). Узнать статус генерации и получить ссылку на готовый документ можно с помощью запроса [GET v2/reports/info/{reportId}](../../reference/reports/getReportInfo.md). {% include notitle [limit](../../_auto/method_limits/generateShipmentListDocumentReport.md) %}
|
||||
* Получение листа сборки
|
||||
*/
|
||||
generateShipmentListDocumentReportRaw(requestParameters: ReportsApiGenerateShipmentListDocumentReportOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GenerateReportResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/generateShipmentListDocumentReport.md) %} Запускает генерацию **листа сборки** для отгрузки. Чтобы на в листе сборки отображался внешний идентификатор заказа, передайте его в методе [POST v2/campaigns/{campaignId}/orders/{orderId}/external-id](../../reference/orders/updateExternalOrderId.md). Узнать статус генерации и получить ссылку на готовый документ можно с помощью запроса [GET v2/reports/info/{reportId}](../../reference/reports/getReportInfo.md). {% include notitle [limit](../../_auto/method_limits/generateShipmentListDocumentReport.md) %}
|
||||
* Получение листа сборки
|
||||
*/
|
||||
generateShipmentListDocumentReport(generateShipmentListDocumentReportRequest: GenerateShipmentListDocumentReportRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GenerateReportResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/generateShowsBoostReport.md) %} Запускает генерацию сводного отчета по бусту показов за заданный период. {% if audience == \"partner\" %}[Что такое буст показов](https://yandex.ru/support/marketplace/ru/marketing/boost-shows){% endif %} Узнать статус генерации и получить ссылку на готовый отчет можно с помощью запроса [GET v2/reports/info/{reportId}](../../reference/reports/getReportInfo.md). {% include notitle [reports]({{ report-columns-shows-boost }}) %} {% if audience != \"advertiser\" %} {% include notitle [tariff-period](../../_includes/common/report-data-period-400-days.md) %} {% endif %} {% include notitle [limit](../../_auto/method_limits/generateShowsBoostReport.md) %}
|
||||
* Отчет по бусту показов
|
||||
*/
|
||||
generateShowsBoostReportRaw(requestParameters: ReportsApiGenerateShowsBoostReportRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GenerateReportResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/generateShowsBoostReport.md) %} Запускает генерацию сводного отчета по бусту показов за заданный период. {% if audience == \"partner\" %}[Что такое буст показов](https://yandex.ru/support/marketplace/ru/marketing/boost-shows){% endif %} Узнать статус генерации и получить ссылку на готовый отчет можно с помощью запроса [GET v2/reports/info/{reportId}](../../reference/reports/getReportInfo.md). {% include notitle [reports]({{ report-columns-shows-boost }}) %} {% if audience != \"advertiser\" %} {% include notitle [tariff-period](../../_includes/common/report-data-period-400-days.md) %} {% endif %} {% include notitle [limit](../../_auto/method_limits/generateShowsBoostReport.md) %}
|
||||
* Отчет по бусту показов
|
||||
*/
|
||||
generateShowsBoostReport(generateShowsBoostRequest: GenerateShowsBoostRequest, format?: ReportFormatType, sourceType?: SourceType, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GenerateReportResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/generateShowsSalesReport.md) %} Запускает генерацию отчета «Аналитика продаж» за заданный период. [Что это за отчет](https://yandex.ru/support/marketplace/analytics/shows-sales.html) Узнать статус генерации и получить ссылку на готовый отчет можно с помощью запроса [GET v2/reports/info/{reportId}](../../reference/reports/getReportInfo.md). {% include notitle [reports](../../_auto/reports/masterstat/sales_funnel_by_created_at.md) %} {% include notitle [tariff-period](../../_includes/common/report-data-period-400-days.md) %} {% include notitle [limit](../../_auto/method_limits/generateShowsSalesReport.md) %}
|
||||
* Отчет «Аналитика продаж»
|
||||
*/
|
||||
generateShowsSalesReportRaw(requestParameters: ReportsApiGenerateShowsSalesReportOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GenerateReportResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/generateShowsSalesReport.md) %} Запускает генерацию отчета «Аналитика продаж» за заданный период. [Что это за отчет](https://yandex.ru/support/marketplace/analytics/shows-sales.html) Узнать статус генерации и получить ссылку на готовый отчет можно с помощью запроса [GET v2/reports/info/{reportId}](../../reference/reports/getReportInfo.md). {% include notitle [reports](../../_auto/reports/masterstat/sales_funnel_by_created_at.md) %} {% include notitle [tariff-period](../../_includes/common/report-data-period-400-days.md) %} {% include notitle [limit](../../_auto/method_limits/generateShowsSalesReport.md) %}
|
||||
* Отчет «Аналитика продаж»
|
||||
*/
|
||||
generateShowsSalesReport(generateShowsSalesReportRequest: GenerateShowsSalesReportRequest, format?: ReportFormatType, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GenerateReportResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/generateStocksOnWarehousesReport.md) %} Запускает генерацию отчета по остаткам на складах. [Что это за отчет](https://yandex.ru/support/marketplace/ru/storage/logistics#remains-history) {% note warning \"Когда использовать этот метод\" %} Метод актуален: * для моделей FBY и LaaS; * для моделей FBS, DBS и Экспресс, если в кабинете есть группы складов. Если в кабинете нет групп складов и вы работаете с моделями FBS, DBS или Экспресс, используйте метод [POST v3/businesses/{businessId}/reports/stocks/generate](../../reference/reports/generateStocksReport.md). [Что такое группы складов и зачем они нужны](https://yandex.ru/support/marketplace/assortment/operations/stocks.html#unified-stocks). {% endnote %} **Какая информация вернется:** * Для моделей FBY и LaaS, если указать `campaignId`, — об остатках на складах Маркета. * Для остальных моделей, если указать `campaignId`, — об остатках на соответствующем складе магазина. * Для остальных моделей, если указать `businessId`, — об остатках на всех складах магазинов в кабинете, кроме FBY и LaaS. Используйте фильтр `campaignIds`, чтобы указать определенные магазины. ⚠️ Не передавайте одновременно `campaignId` и `businessId`. Узнать статус генерации и получить ссылку на готовый отчет можно с помощью запроса [GET v2/reports/info/{reportId}](../../reference/reports/getReportInfo.md). {% list tabs %} - Склад Маркета {% include notitle [reports](../../_auto/reports/stocks/stocks_on_warehouses.md) %} - Склад магазина {% include notitle [reports](../../_auto/reports/offers/mass/mass_shared_stocks_business_csv_config.md) %} - Все склады магазинов в кабинете, кроме FBY и LaaS {% include notitle [reports](../../_auto/reports/offers/stocks_business_config.md) %} {% endlist %} {% include notitle [limit](../../_auto/method_limits/generateStocksOnWarehousesReport.md) %}
|
||||
* Отчет по остаткам на складах
|
||||
*/
|
||||
generateStocksOnWarehousesReportRaw(requestParameters: ReportsApiGenerateStocksOnWarehousesReportOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GenerateReportResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/generateStocksOnWarehousesReport.md) %} Запускает генерацию отчета по остаткам на складах. [Что это за отчет](https://yandex.ru/support/marketplace/ru/storage/logistics#remains-history) {% note warning \"Когда использовать этот метод\" %} Метод актуален: * для моделей FBY и LaaS; * для моделей FBS, DBS и Экспресс, если в кабинете есть группы складов. Если в кабинете нет групп складов и вы работаете с моделями FBS, DBS или Экспресс, используйте метод [POST v3/businesses/{businessId}/reports/stocks/generate](../../reference/reports/generateStocksReport.md). [Что такое группы складов и зачем они нужны](https://yandex.ru/support/marketplace/assortment/operations/stocks.html#unified-stocks). {% endnote %} **Какая информация вернется:** * Для моделей FBY и LaaS, если указать `campaignId`, — об остатках на складах Маркета. * Для остальных моделей, если указать `campaignId`, — об остатках на соответствующем складе магазина. * Для остальных моделей, если указать `businessId`, — об остатках на всех складах магазинов в кабинете, кроме FBY и LaaS. Используйте фильтр `campaignIds`, чтобы указать определенные магазины. ⚠️ Не передавайте одновременно `campaignId` и `businessId`. Узнать статус генерации и получить ссылку на готовый отчет можно с помощью запроса [GET v2/reports/info/{reportId}](../../reference/reports/getReportInfo.md). {% list tabs %} - Склад Маркета {% include notitle [reports](../../_auto/reports/stocks/stocks_on_warehouses.md) %} - Склад магазина {% include notitle [reports](../../_auto/reports/offers/mass/mass_shared_stocks_business_csv_config.md) %} - Все склады магазинов в кабинете, кроме FBY и LaaS {% include notitle [reports](../../_auto/reports/offers/stocks_business_config.md) %} {% endlist %} {% include notitle [limit](../../_auto/method_limits/generateStocksOnWarehousesReport.md) %}
|
||||
* Отчет по остаткам на складах
|
||||
*/
|
||||
generateStocksOnWarehousesReport(generateStocksOnWarehousesReportRequest: GenerateStocksOnWarehousesReportRequest, format?: ReportFormatType, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GenerateReportResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/generateStocksReport.md) %} Запускает генерацию отчета по остаткам на складах магазинов в кабинете. [Что это за отчет](https://yandex.ru/support/marketplace/ru/storage/logistics#remains-history) **Какая информация вернется:** * Об остатках на всех складах магазинов в кабинете (модели DBS, FBS и Экспресс). * По каждому товару — ваш SKU, название, модель работы, склад, доступное для заказа количество, резерв, цену и статус. Узнать статус генерации и получить ссылку на готовый отчет можно с помощью запроса [GET v2/reports/info/{reportId}](../../reference/reports/getReportInfo.md). {% list tabs %} - Все склады магазинов в кабинете {% include notitle [reports](../../_auto/reports/offers/stocks_business_config.md) %} {% endlist %} {% note warning \"Метод подходит, только если в кабинете нет групп складов\" %} Если в кабинете есть группы складов, используйте метод [POST v2/reports/stocks-on-warehouses/generate](../../reference/reports/generateStocksOnWarehousesReport.md). [Что такое группы складов и зачем они нужны](https://yandex.ru/support/marketplace/assortment/operations/stocks.html#unified-stocks). {% endnote %} {% include notitle [limit](../../_auto/method_limits/generateStocksReport.md) %}
|
||||
* Отчет по остаткам на складах партнера
|
||||
*/
|
||||
generateStocksReportRaw(requestParameters: ReportsApiGenerateStocksReportOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GenerateReportResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/generateStocksReport.md) %} Запускает генерацию отчета по остаткам на складах магазинов в кабинете. [Что это за отчет](https://yandex.ru/support/marketplace/ru/storage/logistics#remains-history) **Какая информация вернется:** * Об остатках на всех складах магазинов в кабинете (модели DBS, FBS и Экспресс). * По каждому товару — ваш SKU, название, модель работы, склад, доступное для заказа количество, резерв, цену и статус. Узнать статус генерации и получить ссылку на готовый отчет можно с помощью запроса [GET v2/reports/info/{reportId}](../../reference/reports/getReportInfo.md). {% list tabs %} - Все склады магазинов в кабинете {% include notitle [reports](../../_auto/reports/offers/stocks_business_config.md) %} {% endlist %} {% note warning \"Метод подходит, только если в кабинете нет групп складов\" %} Если в кабинете есть группы складов, используйте метод [POST v2/reports/stocks-on-warehouses/generate](../../reference/reports/generateStocksOnWarehousesReport.md). [Что такое группы складов и зачем они нужны](https://yandex.ru/support/marketplace/assortment/operations/stocks.html#unified-stocks). {% endnote %} {% include notitle [limit](../../_auto/method_limits/generateStocksReport.md) %}
|
||||
* Отчет по остаткам на складах партнера
|
||||
*/
|
||||
generateStocksReport(businessId: number, format?: ReportFormatType, generateStocksReportRequest?: GenerateStocksReportRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GenerateReportResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/generateUnitedMarketplaceServicesReport.md) %} Запускает генерацию отчета по стоимости услуг за заданный период. [Что это за отчет](https://yandex.ru/support/marketplace/ru/accounting/transactions#reports) Тип отчета зависит от того, какие поля заполнены в запросе: |**Тип отчета** |**Какие поля нужны** | |-----------------------------|---------------------------------| |По дате начисления услуги |`dateFrom` и `dateTo` | |По дате формирования акта |`year` и `month` | Заказать отчеты обоих типов одним запросом нельзя. Узнать статус генерации и получить ссылку на готовый отчет можно с помощью запроса [GET v2/reports/info/{reportId}](../../reference/reports/getReportInfo.md). {% include notitle [reports](../../_auto/reports/united/services/generator/united_marketplace_services.md) %} {% include notitle [limit](../../_auto/method_limits/generateUnitedMarketplaceServicesReport.md) %}
|
||||
* Отчет по стоимости услуг
|
||||
*/
|
||||
generateUnitedMarketplaceServicesReportRaw(requestParameters: ReportsApiGenerateUnitedMarketplaceServicesReportOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GenerateReportResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/generateUnitedMarketplaceServicesReport.md) %} Запускает генерацию отчета по стоимости услуг за заданный период. [Что это за отчет](https://yandex.ru/support/marketplace/ru/accounting/transactions#reports) Тип отчета зависит от того, какие поля заполнены в запросе: |**Тип отчета** |**Какие поля нужны** | |-----------------------------|---------------------------------| |По дате начисления услуги |`dateFrom` и `dateTo` | |По дате формирования акта |`year` и `month` | Заказать отчеты обоих типов одним запросом нельзя. Узнать статус генерации и получить ссылку на готовый отчет можно с помощью запроса [GET v2/reports/info/{reportId}](../../reference/reports/getReportInfo.md). {% include notitle [reports](../../_auto/reports/united/services/generator/united_marketplace_services.md) %} {% include notitle [limit](../../_auto/method_limits/generateUnitedMarketplaceServicesReport.md) %}
|
||||
* Отчет по стоимости услуг
|
||||
*/
|
||||
generateUnitedMarketplaceServicesReport(generateUnitedMarketplaceServicesReportRequest: GenerateUnitedMarketplaceServicesReportRequest, format?: ReportFormatType, language?: ReportLanguageType, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GenerateReportResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/generateUnitedNettingReport.md) %} Запускает генерацию отчета по платежам за заданный период. [Что это за отчет](https://yandex.ru/support/marketplace/ru/accounting/transactions#all-pay) Узнать статус генерации и получить ссылку на готовый отчет можно с помощью запроса [GET v2/reports/info/{reportId}](../../reference/reports/getReportInfo.md). Тип отчета зависит от того, какие поля заполнены в запросе: #| || **Тип отчета** | **Какие поля нужны** | **Комментарий** || || О платежах за период | `dateFrom` и `dateTo` | В отчет попадают все платежи, которые были выплачены и начислены в выбранный период. Пример: если перевод выполнен 31 августа и зачислен 1 сентября, он попадет в отчет за оба месяца. || || О платежном поручении | `bankOrderId` и `bankOrderDateTime` |—|| || [О баллах Маркета](*баллы_маркета) | `monthOfYear` |—|| |# Заказать отчеты нескольких типов одним запросом нельзя. {% include notitle [reports](../../_auto/reports/united/netting/generator/united_netting.md) %} {% include notitle [limit](../../_auto/method_limits/generateUnitedNettingReport.md) %}
|
||||
* Отчет по платежам
|
||||
*/
|
||||
generateUnitedNettingReportRaw(requestParameters: ReportsApiGenerateUnitedNettingReportOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GenerateReportResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/generateUnitedNettingReport.md) %} Запускает генерацию отчета по платежам за заданный период. [Что это за отчет](https://yandex.ru/support/marketplace/ru/accounting/transactions#all-pay) Узнать статус генерации и получить ссылку на готовый отчет можно с помощью запроса [GET v2/reports/info/{reportId}](../../reference/reports/getReportInfo.md). Тип отчета зависит от того, какие поля заполнены в запросе: #| || **Тип отчета** | **Какие поля нужны** | **Комментарий** || || О платежах за период | `dateFrom` и `dateTo` | В отчет попадают все платежи, которые были выплачены и начислены в выбранный период. Пример: если перевод выполнен 31 августа и зачислен 1 сентября, он попадет в отчет за оба месяца. || || О платежном поручении | `bankOrderId` и `bankOrderDateTime` |—|| || [О баллах Маркета](*баллы_маркета) | `monthOfYear` |—|| |# Заказать отчеты нескольких типов одним запросом нельзя. {% include notitle [reports](../../_auto/reports/united/netting/generator/united_netting.md) %} {% include notitle [limit](../../_auto/method_limits/generateUnitedNettingReport.md) %}
|
||||
* Отчет по платежам
|
||||
*/
|
||||
generateUnitedNettingReport(generateUnitedNettingReportRequest: GenerateUnitedNettingReportRequest, format?: ReportFormatType, language?: ReportLanguageType, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GenerateReportResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/generateUnitedOrdersReport.md) %} Запускает генерацию отчета по заказам за заданный период. [Что это за отчет](https://yandex.ru/support/marketplace/ru/accounting/transactions#get-report) Узнать статус генерации и получить ссылку на готовый отчет можно с помощью запроса [GET v2/reports/info/{reportId}](../../reference/reports/getReportInfo.md). {% include notitle [reports](../../_auto/reports/united/orders/generator/united_orders.md) %} {% include notitle [tariff-period](../../_includes/common/report-data-period-unchanged.md) %} {% include notitle [limit](../../_auto/method_limits/generateUnitedOrdersReport.md) %}
|
||||
* Отчет по заказам
|
||||
*/
|
||||
generateUnitedOrdersReportRaw(requestParameters: ReportsApiGenerateUnitedOrdersReportRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GenerateReportResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/generateUnitedOrdersReport.md) %} Запускает генерацию отчета по заказам за заданный период. [Что это за отчет](https://yandex.ru/support/marketplace/ru/accounting/transactions#get-report) Узнать статус генерации и получить ссылку на готовый отчет можно с помощью запроса [GET v2/reports/info/{reportId}](../../reference/reports/getReportInfo.md). {% include notitle [reports](../../_auto/reports/united/orders/generator/united_orders.md) %} {% include notitle [tariff-period](../../_includes/common/report-data-period-unchanged.md) %} {% include notitle [limit](../../_auto/method_limits/generateUnitedOrdersReport.md) %}
|
||||
* Отчет по заказам
|
||||
*/
|
||||
generateUnitedOrdersReport(generateUnitedOrdersRequest: GenerateUnitedOrdersRequest, format?: ReportFormatType, language?: ReportLanguageType, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GenerateReportResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/generateUnitedReturnsReport.md) %} Запускает генерацию сводного отчета по невыкупам и возвратам за заданный период. [Что это за отчет](https://yandex.ru/support/marketplace/ru/orders/returns/logistic#rejected-orders) Отчет содержит информацию о невыкупах и возвратах за указанный период, а также о тех, которые готовы к выдаче. Узнать статус генерации и получить ссылку на готовый отчет можно с помощью запроса [GET v2/reports/info/{reportId}](../../reference/reports/getReportInfo.md). {% include notitle [reports](../../_auto/reports/united/returns/generator/united_returns.md) %} {% include notitle [tariff-period](../../_includes/common/report-data-period-unchanged.md) %} {% include notitle [limit](../../_auto/method_limits/generateUnitedReturnsReport.md) %}
|
||||
* Отчет по невыкупам и возвратам
|
||||
*/
|
||||
generateUnitedReturnsReportRaw(requestParameters: ReportsApiGenerateUnitedReturnsReportRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GenerateReportResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/generateUnitedReturnsReport.md) %} Запускает генерацию сводного отчета по невыкупам и возвратам за заданный период. [Что это за отчет](https://yandex.ru/support/marketplace/ru/orders/returns/logistic#rejected-orders) Отчет содержит информацию о невыкупах и возвратах за указанный период, а также о тех, которые готовы к выдаче. Узнать статус генерации и получить ссылку на готовый отчет можно с помощью запроса [GET v2/reports/info/{reportId}](../../reference/reports/getReportInfo.md). {% include notitle [reports](../../_auto/reports/united/returns/generator/united_returns.md) %} {% include notitle [tariff-period](../../_includes/common/report-data-period-unchanged.md) %} {% include notitle [limit](../../_auto/method_limits/generateUnitedReturnsReport.md) %}
|
||||
* Отчет по невыкупам и возвратам
|
||||
*/
|
||||
generateUnitedReturnsReport(generateUnitedReturnsRequest: GenerateUnitedReturnsRequest, format?: ReportFormatType, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GenerateReportResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getReportInfo.md) %} Возвращает статус генерации заданного отчета или документа и, если он готов, ссылку для скачивания. Чтобы воспользоваться этим запросом, вначале нужно запустить генерацию отчета или документа. [Инструкция](../../step-by-step/reports.md) {% include notitle [limit](../../_auto/method_limits/getReportInfo.md) %}
|
||||
* Получение заданного отчета или документа
|
||||
*/
|
||||
getReportInfoRaw(requestParameters: ReportsApiGetReportInfoRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetReportInfoResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getReportInfo.md) %} Возвращает статус генерации заданного отчета или документа и, если он готов, ссылку для скачивания. Чтобы воспользоваться этим запросом, вначале нужно запустить генерацию отчета или документа. [Инструкция](../../step-by-step/reports.md) {% include notitle [limit](../../_auto/method_limits/getReportInfo.md) %}
|
||||
* Получение заданного отчета или документа
|
||||
*/
|
||||
getReportInfo(reportId: string, sourceType?: SourceType, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetReportInfoResponse>;
|
||||
}
|
||||
1183
dist/apis/ReportsApi.js
vendored
Normal file
1183
dist/apis/ReportsApi.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
164
dist/apis/ReturnsApi.d.ts
vendored
Normal file
164
dist/apis/ReturnsApi.d.ts
vendored
Normal file
@@ -0,0 +1,164 @@
|
||||
/**
|
||||
* API Яндекс Маркета для продавцов
|
||||
* API Яндекс Маркета помогает продавцам автоматизировать и упростить работу с маркетплейсом. В числе возможностей интеграции: * управление каталогом товаров и витриной, * обработка заказов, * изменение настроек магазина, * получение отчетов.
|
||||
*
|
||||
* The version of the OpenAPI document: LATEST
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
import * as runtime from '../runtime';
|
||||
import type { CancelReturnRequest, CancelReturnResponse, CreateReturnRequest, CreateReturnResponse, EmptyApiResponse, GetReturnAvailableDecisionsRequest, GetReturnAvailableDecisionsResponse, GetReturnResponse, GetReturnsResponse, RefundStatusType, ReturnShipmentStatusType, ReturnType, SetReturnDecisionRequest, SubmitReturnDecisionRequest } from '../models/index';
|
||||
export interface ReturnsApiCancelReturnOperationRequest {
|
||||
campaignId: number;
|
||||
cancelReturnRequest: CancelReturnRequest;
|
||||
}
|
||||
export interface ReturnsApiCreateReturnOperationRequest {
|
||||
campaignId: number;
|
||||
createReturnRequest: CreateReturnRequest;
|
||||
}
|
||||
export interface ReturnsApiGetReturnRequest {
|
||||
campaignId: number;
|
||||
orderId: number;
|
||||
returnId: number;
|
||||
}
|
||||
export interface ReturnsApiGetReturnApplicationRequest {
|
||||
campaignId: number;
|
||||
orderId: number;
|
||||
returnId: number;
|
||||
}
|
||||
export interface ReturnsApiGetReturnAvailableDecisionsOperationRequest {
|
||||
businessId: number;
|
||||
getReturnAvailableDecisionsRequest: GetReturnAvailableDecisionsRequest;
|
||||
}
|
||||
export interface ReturnsApiGetReturnPhotoRequest {
|
||||
campaignId: number;
|
||||
orderId: number;
|
||||
returnId: number;
|
||||
itemId: number;
|
||||
imageHash: string;
|
||||
}
|
||||
export interface ReturnsApiGetReturnsRequest {
|
||||
campaignId: number;
|
||||
pageToken?: string;
|
||||
limit?: number;
|
||||
orderIds?: Set<number>;
|
||||
statuses?: Set<RefundStatusType>;
|
||||
shipmentStatuses?: Set<ReturnShipmentStatusType>;
|
||||
type?: ReturnType;
|
||||
fromDate?: Date;
|
||||
toDate?: Date;
|
||||
fromDate2?: Date;
|
||||
toDate2?: Date;
|
||||
}
|
||||
export interface ReturnsApiSetReturnDecisionOperationRequest {
|
||||
campaignId: number;
|
||||
orderId: number;
|
||||
returnId: number;
|
||||
setReturnDecisionRequest: SetReturnDecisionRequest;
|
||||
}
|
||||
export interface ReturnsApiSubmitReturnDecisionOperationRequest {
|
||||
campaignId: number;
|
||||
orderId: number;
|
||||
returnId: number;
|
||||
submitReturnDecisionRequest?: SubmitReturnDecisionRequest;
|
||||
}
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export declare class ReturnsApi extends runtime.BaseAPI {
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/cancelReturn.md) %} Отменяет возврат. Это можно сделать только до принятия в пункте выдачи (`\"shipmentStatus\": \"CREATED\"`). {% note info \"Возврат отменяется не мгновенно\" %} Отмена возврата применяется в течение нескольких минут и только в случае успешного завершения операции. [Как проверить статус операции](../../reference/operations/getOperations.md) {% endnote %} {% note tip \"Используйте этот метод в подобных ситуациях\" %} Вы создали возврат, в котором указали 3 товара. Но покупатель передумал и решил вернуть только 2. Отмените возврат и создайте новый. {% endnote %} {% include notitle [limit](../../_auto/method_limits/cancelReturn.md) %}
|
||||
* Отмена возврата
|
||||
*/
|
||||
cancelReturnRaw(requestParameters: ReturnsApiCancelReturnOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CancelReturnResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/cancelReturn.md) %} Отменяет возврат. Это можно сделать только до принятия в пункте выдачи (`\"shipmentStatus\": \"CREATED\"`). {% note info \"Возврат отменяется не мгновенно\" %} Отмена возврата применяется в течение нескольких минут и только в случае успешного завершения операции. [Как проверить статус операции](../../reference/operations/getOperations.md) {% endnote %} {% note tip \"Используйте этот метод в подобных ситуациях\" %} Вы создали возврат, в котором указали 3 товара. Но покупатель передумал и решил вернуть только 2. Отмените возврат и создайте новый. {% endnote %} {% include notitle [limit](../../_auto/method_limits/cancelReturn.md) %}
|
||||
* Отмена возврата
|
||||
*/
|
||||
cancelReturn(campaignId: number, cancelReturnRequest: CancelReturnRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CancelReturnResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/createReturn.md) %} Создает новый возврат. Это можно сделать только для заказа в статусе `DELIVERED`. {% note warning \"Перед вызовом метода\" %} Проверьте, подходят ли пункты выдачи для возврата указанных товаров, — [POST v1/campaigns/{campaignId}/return-delivery-options](../../reference/delivery-options/getReturnDeliveryOptions.md). {% endnote %} {% include notitle [limit](../../_auto/method_limits/createReturn.md) %}
|
||||
* Создание возврата
|
||||
*/
|
||||
createReturnRaw(requestParameters: ReturnsApiCreateReturnOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CreateReturnResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/createReturn.md) %} Создает новый возврат. Это можно сделать только для заказа в статусе `DELIVERED`. {% note warning \"Перед вызовом метода\" %} Проверьте, подходят ли пункты выдачи для возврата указанных товаров, — [POST v1/campaigns/{campaignId}/return-delivery-options](../../reference/delivery-options/getReturnDeliveryOptions.md). {% endnote %} {% include notitle [limit](../../_auto/method_limits/createReturn.md) %}
|
||||
* Создание возврата
|
||||
*/
|
||||
createReturn(campaignId: number, createReturnRequest: CreateReturnRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CreateReturnResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getReturn.md) %} Получает информацию по одному невыкупу или возврату. {% note tip \"Подключите API-уведомления\" %} Маркет отправит вам запрос [POST notification](../../push-notifications/reference/sendNotification.md), когда появится новый невыкуп или возврат. [{#T}](../../push-notifications/index.md) {% endnote %} {% include notitle [limit](../../_auto/method_limits/getReturn.md) %}
|
||||
* Информация о невыкупе или возврате
|
||||
*/
|
||||
getReturnRaw(requestParameters: ReturnsApiGetReturnRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetReturnResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getReturn.md) %} Получает информацию по одному невыкупу или возврату. {% note tip \"Подключите API-уведомления\" %} Маркет отправит вам запрос [POST notification](../../push-notifications/reference/sendNotification.md), когда появится новый невыкуп или возврат. [{#T}](../../push-notifications/index.md) {% endnote %} {% include notitle [limit](../../_auto/method_limits/getReturn.md) %}
|
||||
* Информация о невыкупе или возврате
|
||||
*/
|
||||
getReturn(campaignId: number, orderId: number, returnId: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetReturnResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getReturnApplication.md) %} Загружает заявление покупателя на возврат товара. {% include notitle [limit](../../_auto/method_limits/getReturnApplication.md) %}
|
||||
* Получение заявления на возврат
|
||||
*/
|
||||
getReturnApplicationRaw(requestParameters: ReturnsApiGetReturnApplicationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Blob>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getReturnApplication.md) %} Загружает заявление покупателя на возврат товара. {% include notitle [limit](../../_auto/method_limits/getReturnApplication.md) %}
|
||||
* Получение заявления на возврат
|
||||
*/
|
||||
getReturnApplication(campaignId: number, orderId: number, returnId: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Blob>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getReturnAvailableDecisions.md) %} Возвращает список доступных решений по возврату. {% include notitle [limit](../../_auto/method_limits/getReturnAvailableDecisions.md) %}
|
||||
* Получение возможных решений по возврату
|
||||
*/
|
||||
getReturnAvailableDecisionsRaw(requestParameters: ReturnsApiGetReturnAvailableDecisionsOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetReturnAvailableDecisionsResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getReturnAvailableDecisions.md) %} Возвращает список доступных решений по возврату. {% include notitle [limit](../../_auto/method_limits/getReturnAvailableDecisions.md) %}
|
||||
* Получение возможных решений по возврату
|
||||
*/
|
||||
getReturnAvailableDecisions(businessId: number, getReturnAvailableDecisionsRequest: GetReturnAvailableDecisionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetReturnAvailableDecisionsResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getReturnPhoto.md) %} Получает фотографии товаров, которые покупатель приложил к заявлению на возврат. Хеш изображения (`imageHash`) можно получить из ответов методов [GET v2/campaigns/{campaignId}/orders/{orderId}/returns/{returnId}](../../reference/returns/getReturn.md) и [GET v2/campaigns/{campaignId}/returns](../../reference/returns/getReturns.md) — в поле `images` решения по товару. Максимальный размер изображения — 50 МБ. Тип изображения можно определить по заголовку `Content-Type` в ответе. {% include notitle [limit](../../_auto/method_limits/getReturnPhoto.md) %}
|
||||
* Получение фотографий товаров в возврате
|
||||
*/
|
||||
getReturnPhotoRaw(requestParameters: ReturnsApiGetReturnPhotoRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Blob>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getReturnPhoto.md) %} Получает фотографии товаров, которые покупатель приложил к заявлению на возврат. Хеш изображения (`imageHash`) можно получить из ответов методов [GET v2/campaigns/{campaignId}/orders/{orderId}/returns/{returnId}](../../reference/returns/getReturn.md) и [GET v2/campaigns/{campaignId}/returns](../../reference/returns/getReturns.md) — в поле `images` решения по товару. Максимальный размер изображения — 50 МБ. Тип изображения можно определить по заголовку `Content-Type` в ответе. {% include notitle [limit](../../_auto/method_limits/getReturnPhoto.md) %}
|
||||
* Получение фотографий товаров в возврате
|
||||
*/
|
||||
getReturnPhoto(campaignId: number, orderId: number, returnId: number, itemId: number, imageHash: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Blob>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getReturns.md) %} Получает список невыкупов и возвратов. Чтобы получить информацию по одному невыкупу или возврату, выполните запрос [GET v2/campaigns/{campaignId}/orders/{orderId}/returns/{returnId}](../../reference/returns/getReturn.md). {% note tip \"Подключите API-уведомления\" %} Маркет отправит вам запрос [POST notification](../../push-notifications/reference/sendNotification.md), когда появится новый невыкуп или возврат. [{#T}](../../push-notifications/index.md) {% endnote %} {% include notitle [limit](../../_auto/method_limits/getReturns.md) %}
|
||||
* Список невыкупов и возвратов
|
||||
*/
|
||||
getReturnsRaw(requestParameters: ReturnsApiGetReturnsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetReturnsResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getReturns.md) %} Получает список невыкупов и возвратов. Чтобы получить информацию по одному невыкупу или возврату, выполните запрос [GET v2/campaigns/{campaignId}/orders/{orderId}/returns/{returnId}](../../reference/returns/getReturn.md). {% note tip \"Подключите API-уведомления\" %} Маркет отправит вам запрос [POST notification](../../push-notifications/reference/sendNotification.md), когда появится новый невыкуп или возврат. [{#T}](../../push-notifications/index.md) {% endnote %} {% include notitle [limit](../../_auto/method_limits/getReturns.md) %}
|
||||
* Список невыкупов и возвратов
|
||||
*/
|
||||
getReturns(campaignId: number, pageToken?: string, limit?: number, orderIds?: Set<number>, statuses?: Set<RefundStatusType>, shipmentStatuses?: Set<ReturnShipmentStatusType>, type?: ReturnType, fromDate?: Date, toDate?: Date, fromDate2?: Date, toDate2?: Date, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetReturnsResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/setReturnDecision.md) %} Выбирает решение по возврату от покупателя. После этого для подтверждения решения нужно выполнить запрос [POST v2/campaigns/{campaignId}/orders/{orderId}/returns/{returnId}/decision/submit](../../reference/returns/submitReturnDecision.md). {% include notitle [limit](../../_auto/method_limits/setReturnDecision.md) %}
|
||||
* Принятие или изменение решения по возврату
|
||||
* @deprecated
|
||||
*/
|
||||
setReturnDecisionRaw(requestParameters: ReturnsApiSetReturnDecisionOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<EmptyApiResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/setReturnDecision.md) %} Выбирает решение по возврату от покупателя. После этого для подтверждения решения нужно выполнить запрос [POST v2/campaigns/{campaignId}/orders/{orderId}/returns/{returnId}/decision/submit](../../reference/returns/submitReturnDecision.md). {% include notitle [limit](../../_auto/method_limits/setReturnDecision.md) %}
|
||||
* Принятие или изменение решения по возврату
|
||||
* @deprecated
|
||||
*/
|
||||
setReturnDecision(campaignId: number, orderId: number, returnId: number, setReturnDecisionRequest: SetReturnDecisionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<EmptyApiResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/submitReturnDecision.md) %} Позволяет передать список решений по возврату. {% note info \"Перед вызовом метода\" %} Получите список доступных решений — [POST v1/businesses/{businessId}/returns/decisions](../../reference/returns/getReturnAvailableDecisions.md). {% endnote %} {% include notitle [limit](../../_auto/method_limits/submitReturnDecision.md) %}
|
||||
* Передача решения по возврату
|
||||
*/
|
||||
submitReturnDecisionRaw(requestParameters: ReturnsApiSubmitReturnDecisionOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<EmptyApiResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/submitReturnDecision.md) %} Позволяет передать список решений по возврату. {% note info \"Перед вызовом метода\" %} Получите список доступных решений — [POST v1/businesses/{businessId}/returns/decisions](../../reference/returns/getReturnAvailableDecisions.md). {% endnote %} {% include notitle [limit](../../_auto/method_limits/submitReturnDecision.md) %}
|
||||
* Передача решения по возврату
|
||||
*/
|
||||
submitReturnDecision(campaignId: number, orderId: number, returnId: number, submitReturnDecisionRequest?: SubmitReturnDecisionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<EmptyApiResponse>;
|
||||
}
|
||||
456
dist/apis/ReturnsApi.js
vendored
Normal file
456
dist/apis/ReturnsApi.js
vendored
Normal file
@@ -0,0 +1,456 @@
|
||||
"use strict";
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* API Яндекс Маркета для продавцов
|
||||
* API Яндекс Маркета помогает продавцам автоматизировать и упростить работу с маркетплейсом. В числе возможностей интеграции: * управление каталогом товаров и витриной, * обработка заказов, * изменение настроек магазина, * получение отчетов.
|
||||
*
|
||||
* The version of the OpenAPI document: LATEST
|
||||
*
|
||||
*
|
||||
* 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.ReturnsApi = void 0;
|
||||
const runtime = require("../runtime");
|
||||
const index_1 = require("../models/index");
|
||||
/**
|
||||
*
|
||||
*/
|
||||
class ReturnsApi extends runtime.BaseAPI {
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/cancelReturn.md) %} Отменяет возврат. Это можно сделать только до принятия в пункте выдачи (`\"shipmentStatus\": \"CREATED\"`). {% note info \"Возврат отменяется не мгновенно\" %} Отмена возврата применяется в течение нескольких минут и только в случае успешного завершения операции. [Как проверить статус операции](../../reference/operations/getOperations.md) {% endnote %} {% note tip \"Используйте этот метод в подобных ситуациях\" %} Вы создали возврат, в котором указали 3 товара. Но покупатель передумал и решил вернуть только 2. Отмените возврат и создайте новый. {% endnote %} {% include notitle [limit](../../_auto/method_limits/cancelReturn.md) %}
|
||||
* Отмена возврата
|
||||
*/
|
||||
cancelReturnRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['campaignId'] == null) {
|
||||
throw new runtime.RequiredError('campaignId', 'Required parameter "campaignId" was null or undefined when calling cancelReturn().');
|
||||
}
|
||||
if (requestParameters['cancelReturnRequest'] == null) {
|
||||
throw new runtime.RequiredError('cancelReturnRequest', 'Required parameter "cancelReturnRequest" was null or undefined when calling cancelReturn().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
const headerParameters = {};
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v1/campaigns/{campaignId}/returns/cancel`.replace(`{${"campaignId"}}`, encodeURIComponent(String(requestParameters['campaignId']))),
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: (0, index_1.CancelReturnRequestToJSON)(requestParameters['cancelReturnRequest']),
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.CancelReturnResponseFromJSON)(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/cancelReturn.md) %} Отменяет возврат. Это можно сделать только до принятия в пункте выдачи (`\"shipmentStatus\": \"CREATED\"`). {% note info \"Возврат отменяется не мгновенно\" %} Отмена возврата применяется в течение нескольких минут и только в случае успешного завершения операции. [Как проверить статус операции](../../reference/operations/getOperations.md) {% endnote %} {% note tip \"Используйте этот метод в подобных ситуациях\" %} Вы создали возврат, в котором указали 3 товара. Но покупатель передумал и решил вернуть только 2. Отмените возврат и создайте новый. {% endnote %} {% include notitle [limit](../../_auto/method_limits/cancelReturn.md) %}
|
||||
* Отмена возврата
|
||||
*/
|
||||
cancelReturn(campaignId, cancelReturnRequest, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.cancelReturnRaw({ campaignId: campaignId, cancelReturnRequest: cancelReturnRequest }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/createReturn.md) %} Создает новый возврат. Это можно сделать только для заказа в статусе `DELIVERED`. {% note warning \"Перед вызовом метода\" %} Проверьте, подходят ли пункты выдачи для возврата указанных товаров, — [POST v1/campaigns/{campaignId}/return-delivery-options](../../reference/delivery-options/getReturnDeliveryOptions.md). {% endnote %} {% include notitle [limit](../../_auto/method_limits/createReturn.md) %}
|
||||
* Создание возврата
|
||||
*/
|
||||
createReturnRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['campaignId'] == null) {
|
||||
throw new runtime.RequiredError('campaignId', 'Required parameter "campaignId" was null or undefined when calling createReturn().');
|
||||
}
|
||||
if (requestParameters['createReturnRequest'] == null) {
|
||||
throw new runtime.RequiredError('createReturnRequest', 'Required parameter "createReturnRequest" was null or undefined when calling createReturn().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
const headerParameters = {};
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v1/campaigns/{campaignId}/returns/create`.replace(`{${"campaignId"}}`, encodeURIComponent(String(requestParameters['campaignId']))),
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: (0, index_1.CreateReturnRequestToJSON)(requestParameters['createReturnRequest']),
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.CreateReturnResponseFromJSON)(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/createReturn.md) %} Создает новый возврат. Это можно сделать только для заказа в статусе `DELIVERED`. {% note warning \"Перед вызовом метода\" %} Проверьте, подходят ли пункты выдачи для возврата указанных товаров, — [POST v1/campaigns/{campaignId}/return-delivery-options](../../reference/delivery-options/getReturnDeliveryOptions.md). {% endnote %} {% include notitle [limit](../../_auto/method_limits/createReturn.md) %}
|
||||
* Создание возврата
|
||||
*/
|
||||
createReturn(campaignId, createReturnRequest, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.createReturnRaw({ campaignId: campaignId, createReturnRequest: createReturnRequest }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getReturn.md) %} Получает информацию по одному невыкупу или возврату. {% note tip \"Подключите API-уведомления\" %} Маркет отправит вам запрос [POST notification](../../push-notifications/reference/sendNotification.md), когда появится новый невыкуп или возврат. [{#T}](../../push-notifications/index.md) {% endnote %} {% include notitle [limit](../../_auto/method_limits/getReturn.md) %}
|
||||
* Информация о невыкупе или возврате
|
||||
*/
|
||||
getReturnRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['campaignId'] == null) {
|
||||
throw new runtime.RequiredError('campaignId', 'Required parameter "campaignId" was null or undefined when calling getReturn().');
|
||||
}
|
||||
if (requestParameters['orderId'] == null) {
|
||||
throw new runtime.RequiredError('orderId', 'Required parameter "orderId" was null or undefined when calling getReturn().');
|
||||
}
|
||||
if (requestParameters['returnId'] == null) {
|
||||
throw new runtime.RequiredError('returnId', 'Required parameter "returnId" was null or undefined when calling getReturn().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
const headerParameters = {};
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v2/campaigns/{campaignId}/orders/{orderId}/returns/{returnId}`.replace(`{${"campaignId"}}`, encodeURIComponent(String(requestParameters['campaignId']))).replace(`{${"orderId"}}`, encodeURIComponent(String(requestParameters['orderId']))).replace(`{${"returnId"}}`, encodeURIComponent(String(requestParameters['returnId']))),
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.GetReturnResponseFromJSON)(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getReturn.md) %} Получает информацию по одному невыкупу или возврату. {% note tip \"Подключите API-уведомления\" %} Маркет отправит вам запрос [POST notification](../../push-notifications/reference/sendNotification.md), когда появится новый невыкуп или возврат. [{#T}](../../push-notifications/index.md) {% endnote %} {% include notitle [limit](../../_auto/method_limits/getReturn.md) %}
|
||||
* Информация о невыкупе или возврате
|
||||
*/
|
||||
getReturn(campaignId, orderId, returnId, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.getReturnRaw({ campaignId: campaignId, orderId: orderId, returnId: returnId }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getReturnApplication.md) %} Загружает заявление покупателя на возврат товара. {% include notitle [limit](../../_auto/method_limits/getReturnApplication.md) %}
|
||||
* Получение заявления на возврат
|
||||
*/
|
||||
getReturnApplicationRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['campaignId'] == null) {
|
||||
throw new runtime.RequiredError('campaignId', 'Required parameter "campaignId" was null or undefined when calling getReturnApplication().');
|
||||
}
|
||||
if (requestParameters['orderId'] == null) {
|
||||
throw new runtime.RequiredError('orderId', 'Required parameter "orderId" was null or undefined when calling getReturnApplication().');
|
||||
}
|
||||
if (requestParameters['returnId'] == null) {
|
||||
throw new runtime.RequiredError('returnId', 'Required parameter "returnId" was null or undefined when calling getReturnApplication().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
const headerParameters = {};
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v2/campaigns/{campaignId}/orders/{orderId}/returns/{returnId}/application`.replace(`{${"campaignId"}}`, encodeURIComponent(String(requestParameters['campaignId']))).replace(`{${"orderId"}}`, encodeURIComponent(String(requestParameters['orderId']))).replace(`{${"returnId"}}`, encodeURIComponent(String(requestParameters['returnId']))),
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
return new runtime.BlobApiResponse(response);
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getReturnApplication.md) %} Загружает заявление покупателя на возврат товара. {% include notitle [limit](../../_auto/method_limits/getReturnApplication.md) %}
|
||||
* Получение заявления на возврат
|
||||
*/
|
||||
getReturnApplication(campaignId, orderId, returnId, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.getReturnApplicationRaw({ campaignId: campaignId, orderId: orderId, returnId: returnId }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getReturnAvailableDecisions.md) %} Возвращает список доступных решений по возврату. {% include notitle [limit](../../_auto/method_limits/getReturnAvailableDecisions.md) %}
|
||||
* Получение возможных решений по возврату
|
||||
*/
|
||||
getReturnAvailableDecisionsRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['businessId'] == null) {
|
||||
throw new runtime.RequiredError('businessId', 'Required parameter "businessId" was null or undefined when calling getReturnAvailableDecisions().');
|
||||
}
|
||||
if (requestParameters['getReturnAvailableDecisionsRequest'] == null) {
|
||||
throw new runtime.RequiredError('getReturnAvailableDecisionsRequest', 'Required parameter "getReturnAvailableDecisionsRequest" was null or undefined when calling getReturnAvailableDecisions().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
const headerParameters = {};
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v1/businesses/{businessId}/returns/decisions`.replace(`{${"businessId"}}`, encodeURIComponent(String(requestParameters['businessId']))),
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: (0, index_1.GetReturnAvailableDecisionsRequestToJSON)(requestParameters['getReturnAvailableDecisionsRequest']),
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.GetReturnAvailableDecisionsResponseFromJSON)(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getReturnAvailableDecisions.md) %} Возвращает список доступных решений по возврату. {% include notitle [limit](../../_auto/method_limits/getReturnAvailableDecisions.md) %}
|
||||
* Получение возможных решений по возврату
|
||||
*/
|
||||
getReturnAvailableDecisions(businessId, getReturnAvailableDecisionsRequest, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.getReturnAvailableDecisionsRaw({ businessId: businessId, getReturnAvailableDecisionsRequest: getReturnAvailableDecisionsRequest }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getReturnPhoto.md) %} Получает фотографии товаров, которые покупатель приложил к заявлению на возврат. Хеш изображения (`imageHash`) можно получить из ответов методов [GET v2/campaigns/{campaignId}/orders/{orderId}/returns/{returnId}](../../reference/returns/getReturn.md) и [GET v2/campaigns/{campaignId}/returns](../../reference/returns/getReturns.md) — в поле `images` решения по товару. Максимальный размер изображения — 50 МБ. Тип изображения можно определить по заголовку `Content-Type` в ответе. {% include notitle [limit](../../_auto/method_limits/getReturnPhoto.md) %}
|
||||
* Получение фотографий товаров в возврате
|
||||
*/
|
||||
getReturnPhotoRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['campaignId'] == null) {
|
||||
throw new runtime.RequiredError('campaignId', 'Required parameter "campaignId" was null or undefined when calling getReturnPhoto().');
|
||||
}
|
||||
if (requestParameters['orderId'] == null) {
|
||||
throw new runtime.RequiredError('orderId', 'Required parameter "orderId" was null or undefined when calling getReturnPhoto().');
|
||||
}
|
||||
if (requestParameters['returnId'] == null) {
|
||||
throw new runtime.RequiredError('returnId', 'Required parameter "returnId" was null or undefined when calling getReturnPhoto().');
|
||||
}
|
||||
if (requestParameters['itemId'] == null) {
|
||||
throw new runtime.RequiredError('itemId', 'Required parameter "itemId" was null or undefined when calling getReturnPhoto().');
|
||||
}
|
||||
if (requestParameters['imageHash'] == null) {
|
||||
throw new runtime.RequiredError('imageHash', 'Required parameter "imageHash" was null or undefined when calling getReturnPhoto().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
const headerParameters = {};
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v2/campaigns/{campaignId}/orders/{orderId}/returns/{returnId}/decision/{itemId}/image/{imageHash}`.replace(`{${"campaignId"}}`, encodeURIComponent(String(requestParameters['campaignId']))).replace(`{${"orderId"}}`, encodeURIComponent(String(requestParameters['orderId']))).replace(`{${"returnId"}}`, encodeURIComponent(String(requestParameters['returnId']))).replace(`{${"itemId"}}`, encodeURIComponent(String(requestParameters['itemId']))).replace(`{${"imageHash"}}`, encodeURIComponent(String(requestParameters['imageHash']))),
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
return new runtime.BlobApiResponse(response);
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getReturnPhoto.md) %} Получает фотографии товаров, которые покупатель приложил к заявлению на возврат. Хеш изображения (`imageHash`) можно получить из ответов методов [GET v2/campaigns/{campaignId}/orders/{orderId}/returns/{returnId}](../../reference/returns/getReturn.md) и [GET v2/campaigns/{campaignId}/returns](../../reference/returns/getReturns.md) — в поле `images` решения по товару. Максимальный размер изображения — 50 МБ. Тип изображения можно определить по заголовку `Content-Type` в ответе. {% include notitle [limit](../../_auto/method_limits/getReturnPhoto.md) %}
|
||||
* Получение фотографий товаров в возврате
|
||||
*/
|
||||
getReturnPhoto(campaignId, orderId, returnId, itemId, imageHash, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.getReturnPhotoRaw({ campaignId: campaignId, orderId: orderId, returnId: returnId, itemId: itemId, imageHash: imageHash }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getReturns.md) %} Получает список невыкупов и возвратов. Чтобы получить информацию по одному невыкупу или возврату, выполните запрос [GET v2/campaigns/{campaignId}/orders/{orderId}/returns/{returnId}](../../reference/returns/getReturn.md). {% note tip \"Подключите API-уведомления\" %} Маркет отправит вам запрос [POST notification](../../push-notifications/reference/sendNotification.md), когда появится новый невыкуп или возврат. [{#T}](../../push-notifications/index.md) {% endnote %} {% include notitle [limit](../../_auto/method_limits/getReturns.md) %}
|
||||
* Список невыкупов и возвратов
|
||||
*/
|
||||
getReturnsRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['campaignId'] == null) {
|
||||
throw new runtime.RequiredError('campaignId', 'Required parameter "campaignId" was null or undefined when calling getReturns().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
if (requestParameters['pageToken'] != null) {
|
||||
queryParameters['pageToken'] = requestParameters['pageToken'];
|
||||
}
|
||||
if (requestParameters['limit'] != null) {
|
||||
queryParameters['limit'] = requestParameters['limit'];
|
||||
}
|
||||
if (requestParameters['orderIds'] != null) {
|
||||
queryParameters['orderIds'] = Array.from(requestParameters['orderIds']).join(runtime.COLLECTION_FORMATS["csv"]);
|
||||
}
|
||||
if (requestParameters['statuses'] != null) {
|
||||
queryParameters['statuses'] = Array.from(requestParameters['statuses']).join(runtime.COLLECTION_FORMATS["csv"]);
|
||||
}
|
||||
if (requestParameters['shipmentStatuses'] != null) {
|
||||
queryParameters['shipmentStatuses'] = Array.from(requestParameters['shipmentStatuses']).join(runtime.COLLECTION_FORMATS["csv"]);
|
||||
}
|
||||
if (requestParameters['type'] != null) {
|
||||
queryParameters['type'] = requestParameters['type'];
|
||||
}
|
||||
if (requestParameters['fromDate'] != null) {
|
||||
queryParameters['fromDate'] = requestParameters['fromDate'].toISOString().substring(0, 10);
|
||||
}
|
||||
if (requestParameters['toDate'] != null) {
|
||||
queryParameters['toDate'] = requestParameters['toDate'].toISOString().substring(0, 10);
|
||||
}
|
||||
if (requestParameters['fromDate2'] != null) {
|
||||
queryParameters['from_date'] = requestParameters['fromDate2'].toISOString().substring(0, 10);
|
||||
}
|
||||
if (requestParameters['toDate2'] != null) {
|
||||
queryParameters['to_date'] = requestParameters['toDate2'].toISOString().substring(0, 10);
|
||||
}
|
||||
const headerParameters = {};
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v2/campaigns/{campaignId}/returns`.replace(`{${"campaignId"}}`, encodeURIComponent(String(requestParameters['campaignId']))),
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.GetReturnsResponseFromJSON)(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getReturns.md) %} Получает список невыкупов и возвратов. Чтобы получить информацию по одному невыкупу или возврату, выполните запрос [GET v2/campaigns/{campaignId}/orders/{orderId}/returns/{returnId}](../../reference/returns/getReturn.md). {% note tip \"Подключите API-уведомления\" %} Маркет отправит вам запрос [POST notification](../../push-notifications/reference/sendNotification.md), когда появится новый невыкуп или возврат. [{#T}](../../push-notifications/index.md) {% endnote %} {% include notitle [limit](../../_auto/method_limits/getReturns.md) %}
|
||||
* Список невыкупов и возвратов
|
||||
*/
|
||||
getReturns(campaignId, pageToken, limit, orderIds, statuses, shipmentStatuses, type, fromDate, toDate, fromDate2, toDate2, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.getReturnsRaw({ campaignId: campaignId, pageToken: pageToken, limit: limit, orderIds: orderIds, statuses: statuses, shipmentStatuses: shipmentStatuses, type: type, fromDate: fromDate, toDate: toDate, fromDate2: fromDate2, toDate2: toDate2 }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/setReturnDecision.md) %} Выбирает решение по возврату от покупателя. После этого для подтверждения решения нужно выполнить запрос [POST v2/campaigns/{campaignId}/orders/{orderId}/returns/{returnId}/decision/submit](../../reference/returns/submitReturnDecision.md). {% include notitle [limit](../../_auto/method_limits/setReturnDecision.md) %}
|
||||
* Принятие или изменение решения по возврату
|
||||
* @deprecated
|
||||
*/
|
||||
setReturnDecisionRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['campaignId'] == null) {
|
||||
throw new runtime.RequiredError('campaignId', 'Required parameter "campaignId" was null or undefined when calling setReturnDecision().');
|
||||
}
|
||||
if (requestParameters['orderId'] == null) {
|
||||
throw new runtime.RequiredError('orderId', 'Required parameter "orderId" was null or undefined when calling setReturnDecision().');
|
||||
}
|
||||
if (requestParameters['returnId'] == null) {
|
||||
throw new runtime.RequiredError('returnId', 'Required parameter "returnId" was null or undefined when calling setReturnDecision().');
|
||||
}
|
||||
if (requestParameters['setReturnDecisionRequest'] == null) {
|
||||
throw new runtime.RequiredError('setReturnDecisionRequest', 'Required parameter "setReturnDecisionRequest" was null or undefined when calling setReturnDecision().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
const headerParameters = {};
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v2/campaigns/{campaignId}/orders/{orderId}/returns/{returnId}/decision`.replace(`{${"campaignId"}}`, encodeURIComponent(String(requestParameters['campaignId']))).replace(`{${"orderId"}}`, encodeURIComponent(String(requestParameters['orderId']))).replace(`{${"returnId"}}`, encodeURIComponent(String(requestParameters['returnId']))),
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: (0, index_1.SetReturnDecisionRequestToJSON)(requestParameters['setReturnDecisionRequest']),
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.EmptyApiResponseFromJSON)(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/setReturnDecision.md) %} Выбирает решение по возврату от покупателя. После этого для подтверждения решения нужно выполнить запрос [POST v2/campaigns/{campaignId}/orders/{orderId}/returns/{returnId}/decision/submit](../../reference/returns/submitReturnDecision.md). {% include notitle [limit](../../_auto/method_limits/setReturnDecision.md) %}
|
||||
* Принятие или изменение решения по возврату
|
||||
* @deprecated
|
||||
*/
|
||||
setReturnDecision(campaignId, orderId, returnId, setReturnDecisionRequest, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.setReturnDecisionRaw({ campaignId: campaignId, orderId: orderId, returnId: returnId, setReturnDecisionRequest: setReturnDecisionRequest }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/submitReturnDecision.md) %} Позволяет передать список решений по возврату. {% note info \"Перед вызовом метода\" %} Получите список доступных решений — [POST v1/businesses/{businessId}/returns/decisions](../../reference/returns/getReturnAvailableDecisions.md). {% endnote %} {% include notitle [limit](../../_auto/method_limits/submitReturnDecision.md) %}
|
||||
* Передача решения по возврату
|
||||
*/
|
||||
submitReturnDecisionRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['campaignId'] == null) {
|
||||
throw new runtime.RequiredError('campaignId', 'Required parameter "campaignId" was null or undefined when calling submitReturnDecision().');
|
||||
}
|
||||
if (requestParameters['orderId'] == null) {
|
||||
throw new runtime.RequiredError('orderId', 'Required parameter "orderId" was null or undefined when calling submitReturnDecision().');
|
||||
}
|
||||
if (requestParameters['returnId'] == null) {
|
||||
throw new runtime.RequiredError('returnId', 'Required parameter "returnId" was null or undefined when calling submitReturnDecision().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
const headerParameters = {};
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v2/campaigns/{campaignId}/orders/{orderId}/returns/{returnId}/decision/submit`.replace(`{${"campaignId"}}`, encodeURIComponent(String(requestParameters['campaignId']))).replace(`{${"orderId"}}`, encodeURIComponent(String(requestParameters['orderId']))).replace(`{${"returnId"}}`, encodeURIComponent(String(requestParameters['returnId']))),
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: (0, index_1.SubmitReturnDecisionRequestToJSON)(requestParameters['submitReturnDecisionRequest']),
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.EmptyApiResponseFromJSON)(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/submitReturnDecision.md) %} Позволяет передать список решений по возврату. {% note info \"Перед вызовом метода\" %} Получите список доступных решений — [POST v1/businesses/{businessId}/returns/decisions](../../reference/returns/getReturnAvailableDecisions.md). {% endnote %} {% include notitle [limit](../../_auto/method_limits/submitReturnDecision.md) %}
|
||||
* Передача решения по возврату
|
||||
*/
|
||||
submitReturnDecision(campaignId, orderId, returnId, submitReturnDecisionRequest, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.submitReturnDecisionRaw({ campaignId: campaignId, orderId: orderId, returnId: returnId, submitReturnDecisionRequest: submitReturnDecisionRequest }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
}
|
||||
exports.ReturnsApi = ReturnsApi;
|
||||
194
dist/apis/ShipmentsApi.d.ts
vendored
Normal file
194
dist/apis/ShipmentsApi.d.ts
vendored
Normal file
File diff suppressed because one or more lines are too long
542
dist/apis/ShipmentsApi.js
vendored
Normal file
542
dist/apis/ShipmentsApi.js
vendored
Normal file
File diff suppressed because one or more lines are too long
78
dist/apis/StocksApi.d.ts
vendored
Normal file
78
dist/apis/StocksApi.d.ts
vendored
Normal file
@@ -0,0 +1,78 @@
|
||||
/**
|
||||
* API Яндекс Маркета для продавцов
|
||||
* API Яндекс Маркета помогает продавцам автоматизировать и упростить работу с маркетплейсом. В числе возможностей интеграции: * управление каталогом товаров и витриной, * обработка заказов, * изменение настроек магазина, * получение отчетов.
|
||||
*
|
||||
* The version of the OpenAPI document: LATEST
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
import * as runtime from '../runtime';
|
||||
import type { EmptyApiResponse, GetStocksOnPartnerWarehousesRequest, GetStocksOnPartnerWarehousesResponse, GetWarehouseStocksRequest, GetWarehouseStocksResponse, UpdateStocksOnWarehousesRequest, UpdateStocksRequest } from '../models/index';
|
||||
export interface StocksApiGetStocksRequest {
|
||||
campaignId: number;
|
||||
pageToken?: string;
|
||||
limit?: number;
|
||||
getWarehouseStocksRequest?: GetWarehouseStocksRequest;
|
||||
}
|
||||
export interface StocksApiGetStocksOnPartnerWarehousesOperationRequest {
|
||||
businessId: number;
|
||||
getStocksOnPartnerWarehousesRequest: GetStocksOnPartnerWarehousesRequest;
|
||||
pageToken?: string;
|
||||
limit?: number;
|
||||
}
|
||||
export interface StocksApiUpdateStocksOperationRequest {
|
||||
campaignId: number;
|
||||
updateStocksRequest: UpdateStocksRequest;
|
||||
}
|
||||
export interface StocksApiUpdateStocksOnPartnerWarehousesRequest {
|
||||
businessId: number;
|
||||
updateStocksOnWarehousesRequest: UpdateStocksOnWarehousesRequest;
|
||||
}
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export declare class StocksApi extends runtime.BaseAPI {
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getStocks.md) %} Возвращает данные об остатках товаров (для всех моделей) и об [оборачиваемости](*turnover) товаров (для модели FBY). {% note warning \"Когда использовать этот метод\" %} Метод актуален: * для моделей FBY и LaaS; * для моделей FBS, DBS и Экспресс, если в кабинете есть группы складов. Если в кабинете нет групп складов и вы работаете с моделями FBS, DBS или Экспресс, используйте метод [POST v3/businesses/{businessId}/offers/stocks](../../reference/stocks/getStocksOnPartnerWarehouses.md). [Что такое группы складов и зачем они нужны](https://yandex.ru/support/marketplace/assortment/operations/stocks.html#unified-stocks). {% endnote %} {% note info \"По умолчанию данные по оборачивамости не возращаются\" %} Чтобы они были в ответе, передавайте `true` в поле `withTurnover`. {% endnote %} **Для моделей FBY и LaaS:** информация об остатках может возвращаться с нескольких складов Маркета, у которых будут разные `warehouseId`. Получить список складов Маркета можно с помощью метода [GET v2/warehouses](../../reference/warehouses/getFulfillmentWarehouses.md). **Для модели FBS:** в ответе может вернуться не только партнерский склад, но и склад возвратов Маркета. Это возможно, если возврат поступил в указанную продавцом точку возвратов и долго не был забран. {% include notitle [limit](../../_auto/method_limits/getStocks.md) %} [//]: <> (turnover: Среднее количество дней, за которое товар продается. Подробно об оборачиваемости рассказано в Справке Маркета для продавцов https://yandex.ru/support/marketplace/analytics/turnover.html.)
|
||||
* Информация об остатках и оборачиваемости
|
||||
*/
|
||||
getStocksRaw(requestParameters: StocksApiGetStocksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetWarehouseStocksResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getStocks.md) %} Возвращает данные об остатках товаров (для всех моделей) и об [оборачиваемости](*turnover) товаров (для модели FBY). {% note warning \"Когда использовать этот метод\" %} Метод актуален: * для моделей FBY и LaaS; * для моделей FBS, DBS и Экспресс, если в кабинете есть группы складов. Если в кабинете нет групп складов и вы работаете с моделями FBS, DBS или Экспресс, используйте метод [POST v3/businesses/{businessId}/offers/stocks](../../reference/stocks/getStocksOnPartnerWarehouses.md). [Что такое группы складов и зачем они нужны](https://yandex.ru/support/marketplace/assortment/operations/stocks.html#unified-stocks). {% endnote %} {% note info \"По умолчанию данные по оборачивамости не возращаются\" %} Чтобы они были в ответе, передавайте `true` в поле `withTurnover`. {% endnote %} **Для моделей FBY и LaaS:** информация об остатках может возвращаться с нескольких складов Маркета, у которых будут разные `warehouseId`. Получить список складов Маркета можно с помощью метода [GET v2/warehouses](../../reference/warehouses/getFulfillmentWarehouses.md). **Для модели FBS:** в ответе может вернуться не только партнерский склад, но и склад возвратов Маркета. Это возможно, если возврат поступил в указанную продавцом точку возвратов и долго не был забран. {% include notitle [limit](../../_auto/method_limits/getStocks.md) %} [//]: <> (turnover: Среднее количество дней, за которое товар продается. Подробно об оборачиваемости рассказано в Справке Маркета для продавцов https://yandex.ru/support/marketplace/analytics/turnover.html.)
|
||||
* Информация об остатках и оборачиваемости
|
||||
*/
|
||||
getStocks(campaignId: number, pageToken?: string, limit?: number, getWarehouseStocksRequest?: GetWarehouseStocksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetWarehouseStocksResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getStocksOnPartnerWarehouses.md) %} Возвращает данные об остатках товаров на складе кабинета. {% note warning \"Метод подходит, только если в кабинете нет групп складов\" %} Если в кабинете есть группы складов, используйте метод [POST v2/campaigns/{campaignId}/offers/stocks](../../reference/stocks/getStocks.md). [Что такое группы складов и зачем они нужны](https://yandex.ru/support/marketplace/assortment/operations/stocks.html#unified-stocks). {% endnote %} {% include notitle [limit](../../_auto/method_limits/getStocksOnPartnerWarehouses.md) %}
|
||||
* Информация об остатках
|
||||
*/
|
||||
getStocksOnPartnerWarehousesRaw(requestParameters: StocksApiGetStocksOnPartnerWarehousesOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetStocksOnPartnerWarehousesResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getStocksOnPartnerWarehouses.md) %} Возвращает данные об остатках товаров на складе кабинета. {% note warning \"Метод подходит, только если в кабинете нет групп складов\" %} Если в кабинете есть группы складов, используйте метод [POST v2/campaigns/{campaignId}/offers/stocks](../../reference/stocks/getStocks.md). [Что такое группы складов и зачем они нужны](https://yandex.ru/support/marketplace/assortment/operations/stocks.html#unified-stocks). {% endnote %} {% include notitle [limit](../../_auto/method_limits/getStocksOnPartnerWarehouses.md) %}
|
||||
* Информация об остатках
|
||||
*/
|
||||
getStocksOnPartnerWarehouses(businessId: number, getStocksOnPartnerWarehousesRequest: GetStocksOnPartnerWarehousesRequest, pageToken?: string, limit?: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetStocksOnPartnerWarehousesResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/updateStocks.md) %} Передает данные об остатках товаров на витрине. {% note warning \"Когда использовать этот метод\" %} Метод актуален только для кабинетов с группами складов. Если в кабинете нет групп складов, используйте метод [POST v3/businesses/{businessId}/offers/stocks/update](../../reference/stocks/updateStocksOnPartnerWarehouses.md). [Что такое группы складов и зачем они нужны](https://yandex.ru/support/marketplace/assortment/operations/stocks.html#unified-stocks). {% endnote %} Для группы складов передавайте остатки только для **одного любого склада**. Информация для остальных складов в этой группе обновится автоматически. Обязательно указывайте SKU **в точности** так, как он указан в каталоге. Например, _557722_ и _0557722_ — это два разных SKU. {% note info \"Данные в каталоге обновляются не мгновенно\" %} Это занимает до нескольких минут. {% endnote %} {% include notitle [limit](../../_auto/method_limits/updateStocks.md) %}
|
||||
* Передача информации об остатках
|
||||
*/
|
||||
updateStocksRaw(requestParameters: StocksApiUpdateStocksOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<EmptyApiResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/updateStocks.md) %} Передает данные об остатках товаров на витрине. {% note warning \"Когда использовать этот метод\" %} Метод актуален только для кабинетов с группами складов. Если в кабинете нет групп складов, используйте метод [POST v3/businesses/{businessId}/offers/stocks/update](../../reference/stocks/updateStocksOnPartnerWarehouses.md). [Что такое группы складов и зачем они нужны](https://yandex.ru/support/marketplace/assortment/operations/stocks.html#unified-stocks). {% endnote %} Для группы складов передавайте остатки только для **одного любого склада**. Информация для остальных складов в этой группе обновится автоматически. Обязательно указывайте SKU **в точности** так, как он указан в каталоге. Например, _557722_ и _0557722_ — это два разных SKU. {% note info \"Данные в каталоге обновляются не мгновенно\" %} Это занимает до нескольких минут. {% endnote %} {% include notitle [limit](../../_auto/method_limits/updateStocks.md) %}
|
||||
* Передача информации об остатках
|
||||
*/
|
||||
updateStocks(campaignId: number, updateStocksRequest: UpdateStocksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<EmptyApiResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/updateStocksOnPartnerWarehouses.md) %} Передает данные об остатках товаров на витрине. Обязательно указывайте SKU **в точности** так, как он указан в каталоге. Например, _557722_ и _0557722_ — это два разных SKU. {% note info \"Данные в каталоге обновляются не мгновенно\" %} Это занимает до нескольких минут. {% endnote %} {% note warning \"Метод подходит, только если в кабинете нет групп складов\" %} Если в кабинете есть группы складов, используйте метод [PUT v2/campaigns/{campaignId}/offers/stocks](../../reference/stocks/updateStocks.md). [Что такое группы складов и зачем они нужны](https://yandex.ru/support/marketplace/assortment/operations/stocks.html#unified-stocks). {% endnote %} {% include notitle [limit](../../_auto/method_limits/updateStocksOnPartnerWarehouses.md) %}
|
||||
* Передача информации об остатках
|
||||
*/
|
||||
updateStocksOnPartnerWarehousesRaw(requestParameters: StocksApiUpdateStocksOnPartnerWarehousesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<EmptyApiResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/updateStocksOnPartnerWarehouses.md) %} Передает данные об остатках товаров на витрине. Обязательно указывайте SKU **в точности** так, как он указан в каталоге. Например, _557722_ и _0557722_ — это два разных SKU. {% note info \"Данные в каталоге обновляются не мгновенно\" %} Это занимает до нескольких минут. {% endnote %} {% note warning \"Метод подходит, только если в кабинете нет групп складов\" %} Если в кабинете есть группы складов, используйте метод [PUT v2/campaigns/{campaignId}/offers/stocks](../../reference/stocks/updateStocks.md). [Что такое группы складов и зачем они нужны](https://yandex.ru/support/marketplace/assortment/operations/stocks.html#unified-stocks). {% endnote %} {% include notitle [limit](../../_auto/method_limits/updateStocksOnPartnerWarehouses.md) %}
|
||||
* Передача информации об остатках
|
||||
*/
|
||||
updateStocksOnPartnerWarehouses(businessId: number, updateStocksOnWarehousesRequest: UpdateStocksOnWarehousesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<EmptyApiResponse>;
|
||||
}
|
||||
210
dist/apis/StocksApi.js
vendored
Normal file
210
dist/apis/StocksApi.js
vendored
Normal file
@@ -0,0 +1,210 @@
|
||||
"use strict";
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* API Яндекс Маркета для продавцов
|
||||
* API Яндекс Маркета помогает продавцам автоматизировать и упростить работу с маркетплейсом. В числе возможностей интеграции: * управление каталогом товаров и витриной, * обработка заказов, * изменение настроек магазина, * получение отчетов.
|
||||
*
|
||||
* The version of the OpenAPI document: LATEST
|
||||
*
|
||||
*
|
||||
* 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.StocksApi = void 0;
|
||||
const runtime = require("../runtime");
|
||||
const index_1 = require("../models/index");
|
||||
/**
|
||||
*
|
||||
*/
|
||||
class StocksApi extends runtime.BaseAPI {
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getStocks.md) %} Возвращает данные об остатках товаров (для всех моделей) и об [оборачиваемости](*turnover) товаров (для модели FBY). {% note warning \"Когда использовать этот метод\" %} Метод актуален: * для моделей FBY и LaaS; * для моделей FBS, DBS и Экспресс, если в кабинете есть группы складов. Если в кабинете нет групп складов и вы работаете с моделями FBS, DBS или Экспресс, используйте метод [POST v3/businesses/{businessId}/offers/stocks](../../reference/stocks/getStocksOnPartnerWarehouses.md). [Что такое группы складов и зачем они нужны](https://yandex.ru/support/marketplace/assortment/operations/stocks.html#unified-stocks). {% endnote %} {% note info \"По умолчанию данные по оборачивамости не возращаются\" %} Чтобы они были в ответе, передавайте `true` в поле `withTurnover`. {% endnote %} **Для моделей FBY и LaaS:** информация об остатках может возвращаться с нескольких складов Маркета, у которых будут разные `warehouseId`. Получить список складов Маркета можно с помощью метода [GET v2/warehouses](../../reference/warehouses/getFulfillmentWarehouses.md). **Для модели FBS:** в ответе может вернуться не только партнерский склад, но и склад возвратов Маркета. Это возможно, если возврат поступил в указанную продавцом точку возвратов и долго не был забран. {% include notitle [limit](../../_auto/method_limits/getStocks.md) %} [//]: <> (turnover: Среднее количество дней, за которое товар продается. Подробно об оборачиваемости рассказано в Справке Маркета для продавцов https://yandex.ru/support/marketplace/analytics/turnover.html.)
|
||||
* Информация об остатках и оборачиваемости
|
||||
*/
|
||||
getStocksRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['campaignId'] == null) {
|
||||
throw new runtime.RequiredError('campaignId', 'Required parameter "campaignId" was null or undefined when calling getStocks().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
if (requestParameters['pageToken'] != null) {
|
||||
queryParameters['pageToken'] = requestParameters['pageToken'];
|
||||
}
|
||||
if (requestParameters['limit'] != null) {
|
||||
queryParameters['limit'] = requestParameters['limit'];
|
||||
}
|
||||
const headerParameters = {};
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v2/campaigns/{campaignId}/offers/stocks`.replace(`{${"campaignId"}}`, encodeURIComponent(String(requestParameters['campaignId']))),
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: (0, index_1.GetWarehouseStocksRequestToJSON)(requestParameters['getWarehouseStocksRequest']),
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.GetWarehouseStocksResponseFromJSON)(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getStocks.md) %} Возвращает данные об остатках товаров (для всех моделей) и об [оборачиваемости](*turnover) товаров (для модели FBY). {% note warning \"Когда использовать этот метод\" %} Метод актуален: * для моделей FBY и LaaS; * для моделей FBS, DBS и Экспресс, если в кабинете есть группы складов. Если в кабинете нет групп складов и вы работаете с моделями FBS, DBS или Экспресс, используйте метод [POST v3/businesses/{businessId}/offers/stocks](../../reference/stocks/getStocksOnPartnerWarehouses.md). [Что такое группы складов и зачем они нужны](https://yandex.ru/support/marketplace/assortment/operations/stocks.html#unified-stocks). {% endnote %} {% note info \"По умолчанию данные по оборачивамости не возращаются\" %} Чтобы они были в ответе, передавайте `true` в поле `withTurnover`. {% endnote %} **Для моделей FBY и LaaS:** информация об остатках может возвращаться с нескольких складов Маркета, у которых будут разные `warehouseId`. Получить список складов Маркета можно с помощью метода [GET v2/warehouses](../../reference/warehouses/getFulfillmentWarehouses.md). **Для модели FBS:** в ответе может вернуться не только партнерский склад, но и склад возвратов Маркета. Это возможно, если возврат поступил в указанную продавцом точку возвратов и долго не был забран. {% include notitle [limit](../../_auto/method_limits/getStocks.md) %} [//]: <> (turnover: Среднее количество дней, за которое товар продается. Подробно об оборачиваемости рассказано в Справке Маркета для продавцов https://yandex.ru/support/marketplace/analytics/turnover.html.)
|
||||
* Информация об остатках и оборачиваемости
|
||||
*/
|
||||
getStocks(campaignId, pageToken, limit, getWarehouseStocksRequest, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.getStocksRaw({ campaignId: campaignId, pageToken: pageToken, limit: limit, getWarehouseStocksRequest: getWarehouseStocksRequest }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getStocksOnPartnerWarehouses.md) %} Возвращает данные об остатках товаров на складе кабинета. {% note warning \"Метод подходит, только если в кабинете нет групп складов\" %} Если в кабинете есть группы складов, используйте метод [POST v2/campaigns/{campaignId}/offers/stocks](../../reference/stocks/getStocks.md). [Что такое группы складов и зачем они нужны](https://yandex.ru/support/marketplace/assortment/operations/stocks.html#unified-stocks). {% endnote %} {% include notitle [limit](../../_auto/method_limits/getStocksOnPartnerWarehouses.md) %}
|
||||
* Информация об остатках
|
||||
*/
|
||||
getStocksOnPartnerWarehousesRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['businessId'] == null) {
|
||||
throw new runtime.RequiredError('businessId', 'Required parameter "businessId" was null or undefined when calling getStocksOnPartnerWarehouses().');
|
||||
}
|
||||
if (requestParameters['getStocksOnPartnerWarehousesRequest'] == null) {
|
||||
throw new runtime.RequiredError('getStocksOnPartnerWarehousesRequest', 'Required parameter "getStocksOnPartnerWarehousesRequest" was null or undefined when calling getStocksOnPartnerWarehouses().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
if (requestParameters['pageToken'] != null) {
|
||||
queryParameters['pageToken'] = requestParameters['pageToken'];
|
||||
}
|
||||
if (requestParameters['limit'] != null) {
|
||||
queryParameters['limit'] = requestParameters['limit'];
|
||||
}
|
||||
const headerParameters = {};
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v3/businesses/{businessId}/offers/stocks`.replace(`{${"businessId"}}`, encodeURIComponent(String(requestParameters['businessId']))),
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: (0, index_1.GetStocksOnPartnerWarehousesRequestToJSON)(requestParameters['getStocksOnPartnerWarehousesRequest']),
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.GetStocksOnPartnerWarehousesResponseFromJSON)(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getStocksOnPartnerWarehouses.md) %} Возвращает данные об остатках товаров на складе кабинета. {% note warning \"Метод подходит, только если в кабинете нет групп складов\" %} Если в кабинете есть группы складов, используйте метод [POST v2/campaigns/{campaignId}/offers/stocks](../../reference/stocks/getStocks.md). [Что такое группы складов и зачем они нужны](https://yandex.ru/support/marketplace/assortment/operations/stocks.html#unified-stocks). {% endnote %} {% include notitle [limit](../../_auto/method_limits/getStocksOnPartnerWarehouses.md) %}
|
||||
* Информация об остатках
|
||||
*/
|
||||
getStocksOnPartnerWarehouses(businessId, getStocksOnPartnerWarehousesRequest, pageToken, limit, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.getStocksOnPartnerWarehousesRaw({ businessId: businessId, getStocksOnPartnerWarehousesRequest: getStocksOnPartnerWarehousesRequest, pageToken: pageToken, limit: limit }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/updateStocks.md) %} Передает данные об остатках товаров на витрине. {% note warning \"Когда использовать этот метод\" %} Метод актуален только для кабинетов с группами складов. Если в кабинете нет групп складов, используйте метод [POST v3/businesses/{businessId}/offers/stocks/update](../../reference/stocks/updateStocksOnPartnerWarehouses.md). [Что такое группы складов и зачем они нужны](https://yandex.ru/support/marketplace/assortment/operations/stocks.html#unified-stocks). {% endnote %} Для группы складов передавайте остатки только для **одного любого склада**. Информация для остальных складов в этой группе обновится автоматически. Обязательно указывайте SKU **в точности** так, как он указан в каталоге. Например, _557722_ и _0557722_ — это два разных SKU. {% note info \"Данные в каталоге обновляются не мгновенно\" %} Это занимает до нескольких минут. {% endnote %} {% include notitle [limit](../../_auto/method_limits/updateStocks.md) %}
|
||||
* Передача информации об остатках
|
||||
*/
|
||||
updateStocksRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['campaignId'] == null) {
|
||||
throw new runtime.RequiredError('campaignId', 'Required parameter "campaignId" was null or undefined when calling updateStocks().');
|
||||
}
|
||||
if (requestParameters['updateStocksRequest'] == null) {
|
||||
throw new runtime.RequiredError('updateStocksRequest', 'Required parameter "updateStocksRequest" was null or undefined when calling updateStocks().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
const headerParameters = {};
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v2/campaigns/{campaignId}/offers/stocks`.replace(`{${"campaignId"}}`, encodeURIComponent(String(requestParameters['campaignId']))),
|
||||
method: 'PUT',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: (0, index_1.UpdateStocksRequestToJSON)(requestParameters['updateStocksRequest']),
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.EmptyApiResponseFromJSON)(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/updateStocks.md) %} Передает данные об остатках товаров на витрине. {% note warning \"Когда использовать этот метод\" %} Метод актуален только для кабинетов с группами складов. Если в кабинете нет групп складов, используйте метод [POST v3/businesses/{businessId}/offers/stocks/update](../../reference/stocks/updateStocksOnPartnerWarehouses.md). [Что такое группы складов и зачем они нужны](https://yandex.ru/support/marketplace/assortment/operations/stocks.html#unified-stocks). {% endnote %} Для группы складов передавайте остатки только для **одного любого склада**. Информация для остальных складов в этой группе обновится автоматически. Обязательно указывайте SKU **в точности** так, как он указан в каталоге. Например, _557722_ и _0557722_ — это два разных SKU. {% note info \"Данные в каталоге обновляются не мгновенно\" %} Это занимает до нескольких минут. {% endnote %} {% include notitle [limit](../../_auto/method_limits/updateStocks.md) %}
|
||||
* Передача информации об остатках
|
||||
*/
|
||||
updateStocks(campaignId, updateStocksRequest, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.updateStocksRaw({ campaignId: campaignId, updateStocksRequest: updateStocksRequest }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/updateStocksOnPartnerWarehouses.md) %} Передает данные об остатках товаров на витрине. Обязательно указывайте SKU **в точности** так, как он указан в каталоге. Например, _557722_ и _0557722_ — это два разных SKU. {% note info \"Данные в каталоге обновляются не мгновенно\" %} Это занимает до нескольких минут. {% endnote %} {% note warning \"Метод подходит, только если в кабинете нет групп складов\" %} Если в кабинете есть группы складов, используйте метод [PUT v2/campaigns/{campaignId}/offers/stocks](../../reference/stocks/updateStocks.md). [Что такое группы складов и зачем они нужны](https://yandex.ru/support/marketplace/assortment/operations/stocks.html#unified-stocks). {% endnote %} {% include notitle [limit](../../_auto/method_limits/updateStocksOnPartnerWarehouses.md) %}
|
||||
* Передача информации об остатках
|
||||
*/
|
||||
updateStocksOnPartnerWarehousesRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['businessId'] == null) {
|
||||
throw new runtime.RequiredError('businessId', 'Required parameter "businessId" was null or undefined when calling updateStocksOnPartnerWarehouses().');
|
||||
}
|
||||
if (requestParameters['updateStocksOnWarehousesRequest'] == null) {
|
||||
throw new runtime.RequiredError('updateStocksOnWarehousesRequest', 'Required parameter "updateStocksOnWarehousesRequest" was null or undefined when calling updateStocksOnPartnerWarehouses().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
const headerParameters = {};
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v3/businesses/{businessId}/offers/stocks/update`.replace(`{${"businessId"}}`, encodeURIComponent(String(requestParameters['businessId']))),
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: (0, index_1.UpdateStocksOnWarehousesRequestToJSON)(requestParameters['updateStocksOnWarehousesRequest']),
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.EmptyApiResponseFromJSON)(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/updateStocksOnPartnerWarehouses.md) %} Передает данные об остатках товаров на витрине. Обязательно указывайте SKU **в точности** так, как он указан в каталоге. Например, _557722_ и _0557722_ — это два разных SKU. {% note info \"Данные в каталоге обновляются не мгновенно\" %} Это занимает до нескольких минут. {% endnote %} {% note warning \"Метод подходит, только если в кабинете нет групп складов\" %} Если в кабинете есть группы складов, используйте метод [PUT v2/campaigns/{campaignId}/offers/stocks](../../reference/stocks/updateStocks.md). [Что такое группы складов и зачем они нужны](https://yandex.ru/support/marketplace/assortment/operations/stocks.html#unified-stocks). {% endnote %} {% include notitle [limit](../../_auto/method_limits/updateStocksOnPartnerWarehouses.md) %}
|
||||
* Передача информации об остатках
|
||||
*/
|
||||
updateStocksOnPartnerWarehouses(businessId, updateStocksOnWarehousesRequest, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.updateStocksOnPartnerWarehousesRaw({ businessId: businessId, updateStocksOnWarehousesRequest: updateStocksOnWarehousesRequest }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
}
|
||||
exports.StocksApi = StocksApi;
|
||||
64
dist/apis/SupplyRequestsApi.d.ts
vendored
Normal file
64
dist/apis/SupplyRequestsApi.d.ts
vendored
Normal file
@@ -0,0 +1,64 @@
|
||||
/**
|
||||
* API Яндекс Маркета для продавцов
|
||||
* API Яндекс Маркета помогает продавцам автоматизировать и упростить работу с маркетплейсом. В числе возможностей интеграции: * управление каталогом товаров и витриной, * обработка заказов, * изменение настроек магазина, * получение отчетов.
|
||||
*
|
||||
* The version of the OpenAPI document: LATEST
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
import * as runtime from '../runtime';
|
||||
import type { GetSupplyRequestDocumentsRequest, GetSupplyRequestDocumentsResponse, GetSupplyRequestItemsRequest, GetSupplyRequestItemsResponse, GetSupplyRequestsRequest, GetSupplyRequestsResponse } from '../models/index';
|
||||
export interface SupplyRequestsApiGetSupplyRequestDocumentsOperationRequest {
|
||||
campaignId: number;
|
||||
getSupplyRequestDocumentsRequest: GetSupplyRequestDocumentsRequest;
|
||||
}
|
||||
export interface SupplyRequestsApiGetSupplyRequestItemsOperationRequest {
|
||||
campaignId: number;
|
||||
getSupplyRequestItemsRequest: GetSupplyRequestItemsRequest;
|
||||
pageToken?: string;
|
||||
limit?: number;
|
||||
}
|
||||
export interface SupplyRequestsApiGetSupplyRequestsOperationRequest {
|
||||
campaignId: number;
|
||||
pageToken?: string;
|
||||
limit?: number;
|
||||
getSupplyRequestsRequest?: GetSupplyRequestsRequest;
|
||||
}
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export declare class SupplyRequestsApi extends runtime.BaseAPI {
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getSupplyRequestDocuments.md) %} Возвращает документы по заявке. {% include notitle [limit](../../_auto/method_limits/getSupplyRequestDocuments.md) %}
|
||||
* Получение документов по заявке на поставку, вывоз или утилизацию
|
||||
*/
|
||||
getSupplyRequestDocumentsRaw(requestParameters: SupplyRequestsApiGetSupplyRequestDocumentsOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetSupplyRequestDocumentsResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getSupplyRequestDocuments.md) %} Возвращает документы по заявке. {% include notitle [limit](../../_auto/method_limits/getSupplyRequestDocuments.md) %}
|
||||
* Получение документов по заявке на поставку, вывоз или утилизацию
|
||||
*/
|
||||
getSupplyRequestDocuments(campaignId: number, getSupplyRequestDocumentsRequest: GetSupplyRequestDocumentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetSupplyRequestDocumentsResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getSupplyRequestItems.md) %} Возвращает список товаров в заявке и информацию по ним. {% include notitle [limit](../../_auto/method_limits/getSupplyRequestItems.md) %}
|
||||
* Получение товаров в заявке на поставку, вывоз или утилизацию
|
||||
*/
|
||||
getSupplyRequestItemsRaw(requestParameters: SupplyRequestsApiGetSupplyRequestItemsOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetSupplyRequestItemsResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getSupplyRequestItems.md) %} Возвращает список товаров в заявке и информацию по ним. {% include notitle [limit](../../_auto/method_limits/getSupplyRequestItems.md) %}
|
||||
* Получение товаров в заявке на поставку, вывоз или утилизацию
|
||||
*/
|
||||
getSupplyRequestItems(campaignId: number, getSupplyRequestItemsRequest: GetSupplyRequestItemsRequest, pageToken?: string, limit?: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetSupplyRequestItemsResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getSupplyRequests.md) %} По указанным фильтрам возвращает заявки на поставку, вывоз и утилизацию, а также информацию по ним. {% include notitle [limit](../../_auto/method_limits/getSupplyRequests.md) %}
|
||||
* Получение информации о заявках на поставку, вывоз и утилизацию
|
||||
*/
|
||||
getSupplyRequestsRaw(requestParameters: SupplyRequestsApiGetSupplyRequestsOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetSupplyRequestsResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getSupplyRequests.md) %} По указанным фильтрам возвращает заявки на поставку, вывоз и утилизацию, а также информацию по ним. {% include notitle [limit](../../_auto/method_limits/getSupplyRequests.md) %}
|
||||
* Получение информации о заявках на поставку, вывоз и утилизацию
|
||||
*/
|
||||
getSupplyRequests(campaignId: number, pageToken?: string, limit?: number, getSupplyRequestsRequest?: GetSupplyRequestsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetSupplyRequestsResponse>;
|
||||
}
|
||||
168
dist/apis/SupplyRequestsApi.js
vendored
Normal file
168
dist/apis/SupplyRequestsApi.js
vendored
Normal file
@@ -0,0 +1,168 @@
|
||||
"use strict";
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* API Яндекс Маркета для продавцов
|
||||
* API Яндекс Маркета помогает продавцам автоматизировать и упростить работу с маркетплейсом. В числе возможностей интеграции: * управление каталогом товаров и витриной, * обработка заказов, * изменение настроек магазина, * получение отчетов.
|
||||
*
|
||||
* The version of the OpenAPI document: LATEST
|
||||
*
|
||||
*
|
||||
* 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.SupplyRequestsApi = void 0;
|
||||
const runtime = require("../runtime");
|
||||
const index_1 = require("../models/index");
|
||||
/**
|
||||
*
|
||||
*/
|
||||
class SupplyRequestsApi extends runtime.BaseAPI {
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getSupplyRequestDocuments.md) %} Возвращает документы по заявке. {% include notitle [limit](../../_auto/method_limits/getSupplyRequestDocuments.md) %}
|
||||
* Получение документов по заявке на поставку, вывоз или утилизацию
|
||||
*/
|
||||
getSupplyRequestDocumentsRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['campaignId'] == null) {
|
||||
throw new runtime.RequiredError('campaignId', 'Required parameter "campaignId" was null or undefined when calling getSupplyRequestDocuments().');
|
||||
}
|
||||
if (requestParameters['getSupplyRequestDocumentsRequest'] == null) {
|
||||
throw new runtime.RequiredError('getSupplyRequestDocumentsRequest', 'Required parameter "getSupplyRequestDocumentsRequest" was null or undefined when calling getSupplyRequestDocuments().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
const headerParameters = {};
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v2/campaigns/{campaignId}/supply-requests/documents`.replace(`{${"campaignId"}}`, encodeURIComponent(String(requestParameters['campaignId']))),
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: (0, index_1.GetSupplyRequestDocumentsRequestToJSON)(requestParameters['getSupplyRequestDocumentsRequest']),
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.GetSupplyRequestDocumentsResponseFromJSON)(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getSupplyRequestDocuments.md) %} Возвращает документы по заявке. {% include notitle [limit](../../_auto/method_limits/getSupplyRequestDocuments.md) %}
|
||||
* Получение документов по заявке на поставку, вывоз или утилизацию
|
||||
*/
|
||||
getSupplyRequestDocuments(campaignId, getSupplyRequestDocumentsRequest, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.getSupplyRequestDocumentsRaw({ campaignId: campaignId, getSupplyRequestDocumentsRequest: getSupplyRequestDocumentsRequest }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getSupplyRequestItems.md) %} Возвращает список товаров в заявке и информацию по ним. {% include notitle [limit](../../_auto/method_limits/getSupplyRequestItems.md) %}
|
||||
* Получение товаров в заявке на поставку, вывоз или утилизацию
|
||||
*/
|
||||
getSupplyRequestItemsRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['campaignId'] == null) {
|
||||
throw new runtime.RequiredError('campaignId', 'Required parameter "campaignId" was null or undefined when calling getSupplyRequestItems().');
|
||||
}
|
||||
if (requestParameters['getSupplyRequestItemsRequest'] == null) {
|
||||
throw new runtime.RequiredError('getSupplyRequestItemsRequest', 'Required parameter "getSupplyRequestItemsRequest" was null or undefined when calling getSupplyRequestItems().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
if (requestParameters['pageToken'] != null) {
|
||||
queryParameters['pageToken'] = requestParameters['pageToken'];
|
||||
}
|
||||
if (requestParameters['limit'] != null) {
|
||||
queryParameters['limit'] = requestParameters['limit'];
|
||||
}
|
||||
const headerParameters = {};
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v2/campaigns/{campaignId}/supply-requests/items`.replace(`{${"campaignId"}}`, encodeURIComponent(String(requestParameters['campaignId']))),
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: (0, index_1.GetSupplyRequestItemsRequestToJSON)(requestParameters['getSupplyRequestItemsRequest']),
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.GetSupplyRequestItemsResponseFromJSON)(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getSupplyRequestItems.md) %} Возвращает список товаров в заявке и информацию по ним. {% include notitle [limit](../../_auto/method_limits/getSupplyRequestItems.md) %}
|
||||
* Получение товаров в заявке на поставку, вывоз или утилизацию
|
||||
*/
|
||||
getSupplyRequestItems(campaignId, getSupplyRequestItemsRequest, pageToken, limit, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.getSupplyRequestItemsRaw({ campaignId: campaignId, getSupplyRequestItemsRequest: getSupplyRequestItemsRequest, pageToken: pageToken, limit: limit }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getSupplyRequests.md) %} По указанным фильтрам возвращает заявки на поставку, вывоз и утилизацию, а также информацию по ним. {% include notitle [limit](../../_auto/method_limits/getSupplyRequests.md) %}
|
||||
* Получение информации о заявках на поставку, вывоз и утилизацию
|
||||
*/
|
||||
getSupplyRequestsRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['campaignId'] == null) {
|
||||
throw new runtime.RequiredError('campaignId', 'Required parameter "campaignId" was null or undefined when calling getSupplyRequests().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
if (requestParameters['pageToken'] != null) {
|
||||
queryParameters['pageToken'] = requestParameters['pageToken'];
|
||||
}
|
||||
if (requestParameters['limit'] != null) {
|
||||
queryParameters['limit'] = requestParameters['limit'];
|
||||
}
|
||||
const headerParameters = {};
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v2/campaigns/{campaignId}/supply-requests`.replace(`{${"campaignId"}}`, encodeURIComponent(String(requestParameters['campaignId']))),
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: (0, index_1.GetSupplyRequestsRequestToJSON)(requestParameters['getSupplyRequestsRequest']),
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.GetSupplyRequestsResponseFromJSON)(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getSupplyRequests.md) %} По указанным фильтрам возвращает заявки на поставку, вывоз и утилизацию, а также информацию по ним. {% include notitle [limit](../../_auto/method_limits/getSupplyRequests.md) %}
|
||||
* Получение информации о заявках на поставку, вывоз и утилизацию
|
||||
*/
|
||||
getSupplyRequests(campaignId, pageToken, limit, getSupplyRequestsRequest, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.getSupplyRequestsRaw({ campaignId: campaignId, pageToken: pageToken, limit: limit, getSupplyRequestsRequest: getSupplyRequestsRequest }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
}
|
||||
exports.SupplyRequestsApi = SupplyRequestsApi;
|
||||
31
dist/apis/TariffsApi.d.ts
vendored
Normal file
31
dist/apis/TariffsApi.d.ts
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
/**
|
||||
* API Яндекс Маркета для продавцов
|
||||
* API Яндекс Маркета помогает продавцам автоматизировать и упростить работу с маркетплейсом. В числе возможностей интеграции: * управление каталогом товаров и витриной, * обработка заказов, * изменение настроек магазина, * получение отчетов.
|
||||
*
|
||||
* The version of the OpenAPI document: LATEST
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
import * as runtime from '../runtime';
|
||||
import type { CalculateTariffsRequest, CalculateTariffsResponse } from '../models/index';
|
||||
export interface TariffsApiCalculateTariffsOperationRequest {
|
||||
calculateTariffsRequest: CalculateTariffsRequest;
|
||||
}
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export declare class TariffsApi extends runtime.BaseAPI {
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/calculateTariffs.md) %} Рассчитывает стоимость услуг Маркета для товаров с заданными параметрами. Порядок товаров в запросе и ответе сохраняется, чтобы определить, для какого товара рассчитана стоимость услуги. Обратите внимание: калькулятор осуществляет примерные расчеты. Финальная стоимость для каждого заказа зависит от предоставленных услуг. Если у вас оформлена подписка, сниженный тариф применится в расчетах. Подробнее о подписке для продавцов читайте [в Справке Маркета для продавцов](https://yandex.ru/support/marketplace/ru/marketing/subscription). В запросе можно указать либо параметр `campaignId`, либо `sellingProgram`. Совместное использование параметров приведет к ошибке. {% include notitle [limit](../../_auto/method_limits/calculateTariffs.md) %}
|
||||
* Калькулятор стоимости услуг
|
||||
*/
|
||||
calculateTariffsRaw(requestParameters: TariffsApiCalculateTariffsOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CalculateTariffsResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/calculateTariffs.md) %} Рассчитывает стоимость услуг Маркета для товаров с заданными параметрами. Порядок товаров в запросе и ответе сохраняется, чтобы определить, для какого товара рассчитана стоимость услуги. Обратите внимание: калькулятор осуществляет примерные расчеты. Финальная стоимость для каждого заказа зависит от предоставленных услуг. Если у вас оформлена подписка, сниженный тариф применится в расчетах. Подробнее о подписке для продавцов читайте [в Справке Маркета для продавцов](https://yandex.ru/support/marketplace/ru/marketing/subscription). В запросе можно указать либо параметр `campaignId`, либо `sellingProgram`. Совместное использование параметров приведет к ошибке. {% include notitle [limit](../../_auto/method_limits/calculateTariffs.md) %}
|
||||
* Калькулятор стоимости услуг
|
||||
*/
|
||||
calculateTariffs(calculateTariffsRequest: CalculateTariffsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CalculateTariffsResponse>;
|
||||
}
|
||||
72
dist/apis/TariffsApi.js
vendored
Normal file
72
dist/apis/TariffsApi.js
vendored
Normal file
@@ -0,0 +1,72 @@
|
||||
"use strict";
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* API Яндекс Маркета для продавцов
|
||||
* API Яндекс Маркета помогает продавцам автоматизировать и упростить работу с маркетплейсом. В числе возможностей интеграции: * управление каталогом товаров и витриной, * обработка заказов, * изменение настроек магазина, * получение отчетов.
|
||||
*
|
||||
* The version of the OpenAPI document: LATEST
|
||||
*
|
||||
*
|
||||
* 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.TariffsApi = void 0;
|
||||
const runtime = require("../runtime");
|
||||
const index_1 = require("../models/index");
|
||||
/**
|
||||
*
|
||||
*/
|
||||
class TariffsApi extends runtime.BaseAPI {
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/calculateTariffs.md) %} Рассчитывает стоимость услуг Маркета для товаров с заданными параметрами. Порядок товаров в запросе и ответе сохраняется, чтобы определить, для какого товара рассчитана стоимость услуги. Обратите внимание: калькулятор осуществляет примерные расчеты. Финальная стоимость для каждого заказа зависит от предоставленных услуг. Если у вас оформлена подписка, сниженный тариф применится в расчетах. Подробнее о подписке для продавцов читайте [в Справке Маркета для продавцов](https://yandex.ru/support/marketplace/ru/marketing/subscription). В запросе можно указать либо параметр `campaignId`, либо `sellingProgram`. Совместное использование параметров приведет к ошибке. {% include notitle [limit](../../_auto/method_limits/calculateTariffs.md) %}
|
||||
* Калькулятор стоимости услуг
|
||||
*/
|
||||
calculateTariffsRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['calculateTariffsRequest'] == null) {
|
||||
throw new runtime.RequiredError('calculateTariffsRequest', 'Required parameter "calculateTariffsRequest" was null or undefined when calling calculateTariffs().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
const headerParameters = {};
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v2/tariffs/calculate`,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: (0, index_1.CalculateTariffsRequestToJSON)(requestParameters['calculateTariffsRequest']),
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.CalculateTariffsResponseFromJSON)(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/calculateTariffs.md) %} Рассчитывает стоимость услуг Маркета для товаров с заданными параметрами. Порядок товаров в запросе и ответе сохраняется, чтобы определить, для какого товара рассчитана стоимость услуги. Обратите внимание: калькулятор осуществляет примерные расчеты. Финальная стоимость для каждого заказа зависит от предоставленных услуг. Если у вас оформлена подписка, сниженный тариф применится в расчетах. Подробнее о подписке для продавцов читайте [в Справке Маркета для продавцов](https://yandex.ru/support/marketplace/ru/marketing/subscription). В запросе можно указать либо параметр `campaignId`, либо `sellingProgram`. Совместное использование параметров приведет к ошибке. {% include notitle [limit](../../_auto/method_limits/calculateTariffs.md) %}
|
||||
* Калькулятор стоимости услуг
|
||||
*/
|
||||
calculateTariffs(calculateTariffsRequest, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.calculateTariffsRaw({ calculateTariffsRequest: calculateTariffsRequest }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
}
|
||||
exports.TariffsApi = TariffsApi;
|
||||
108
dist/apis/WarehousesApi.d.ts
vendored
Normal file
108
dist/apis/WarehousesApi.d.ts
vendored
Normal file
@@ -0,0 +1,108 @@
|
||||
/**
|
||||
* API Яндекс Маркета для продавцов
|
||||
* API Яндекс Маркета помогает продавцам автоматизировать и упростить работу с маркетплейсом. В числе возможностей интеграции: * управление каталогом товаров и витриной, * обработка заказов, * изменение настроек магазина, * получение отчетов.
|
||||
*
|
||||
* The version of the OpenAPI document: LATEST
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
import * as runtime from '../runtime';
|
||||
import type { GetFulfillmentWarehousesResponse, GetPagedWarehousesRequest, GetPagedWarehousesResponse, GetPartnerWarehousesRequest, GetPartnerWarehousesResponse, GetWarehousesResponse, UpdateWarehouseModelStatusRequest, UpdateWarehouseModelStatusResponse, UpdateWarehouseStatusRequest, UpdateWarehouseStatusResponse } from '../models/index';
|
||||
export interface WarehousesApiGetFulfillmentWarehousesRequest {
|
||||
campaignId?: number;
|
||||
}
|
||||
export interface WarehousesApiGetPagedWarehousesOperationRequest {
|
||||
businessId: number;
|
||||
pageToken?: string;
|
||||
limit?: number;
|
||||
getPagedWarehousesRequest?: GetPagedWarehousesRequest;
|
||||
}
|
||||
export interface WarehousesApiGetPartnerWarehousesOperationRequest {
|
||||
businessId: number;
|
||||
pageToken?: string;
|
||||
limit?: number;
|
||||
getPartnerWarehousesRequest?: GetPartnerWarehousesRequest;
|
||||
}
|
||||
export interface WarehousesApiGetWarehousesRequest {
|
||||
businessId: number;
|
||||
}
|
||||
export interface WarehousesApiUpdateWarehouseModelStatusOperationRequest {
|
||||
businessId: number;
|
||||
updateWarehouseModelStatusRequest: UpdateWarehouseModelStatusRequest;
|
||||
}
|
||||
export interface WarehousesApiUpdateWarehouseStatusOperationRequest {
|
||||
campaignId: number;
|
||||
updateWarehouseStatusRequest: UpdateWarehouseStatusRequest;
|
||||
}
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export declare class WarehousesApi extends runtime.BaseAPI {
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getFulfillmentWarehouses.md) %} Возвращает список фулфилмент-складов Маркета с их идентификаторами. {% include notitle [limit](../../_auto/method_limits/getFulfillmentWarehouses.md) %}
|
||||
* Идентификаторы фулфилмент-складов Маркета
|
||||
*/
|
||||
getFulfillmentWarehousesRaw(requestParameters: WarehousesApiGetFulfillmentWarehousesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetFulfillmentWarehousesResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getFulfillmentWarehouses.md) %} Возвращает список фулфилмент-складов Маркета с их идентификаторами. {% include notitle [limit](../../_auto/method_limits/getFulfillmentWarehouses.md) %}
|
||||
* Идентификаторы фулфилмент-складов Маркета
|
||||
*/
|
||||
getFulfillmentWarehouses(campaignId?: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetFulfillmentWarehousesResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getPagedWarehouses.md) %} Возвращает список складов и информацию о них. {% note warning \"Когда использовать этот метод\" %} Метод актуален для кабинетов с группами складов. Если в кабинете нет групп складов, используйте метод [POST v3/businesses/{businessId}/warehouses](../../reference/warehouses/getPartnerWarehouses.md). [Что такое группы складов и зачем они нужны](https://yandex.ru/support/marketplace/assortment/operations/stocks.html#unified-stocks). {% endnote %} {% include notitle [limit](../../_auto/method_limits/getPagedWarehouses.md) %}
|
||||
* Список складов
|
||||
*/
|
||||
getPagedWarehousesRaw(requestParameters: WarehousesApiGetPagedWarehousesOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetPagedWarehousesResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getPagedWarehouses.md) %} Возвращает список складов и информацию о них. {% note warning \"Когда использовать этот метод\" %} Метод актуален для кабинетов с группами складов. Если в кабинете нет групп складов, используйте метод [POST v3/businesses/{businessId}/warehouses](../../reference/warehouses/getPartnerWarehouses.md). [Что такое группы складов и зачем они нужны](https://yandex.ru/support/marketplace/assortment/operations/stocks.html#unified-stocks). {% endnote %} {% include notitle [limit](../../_auto/method_limits/getPagedWarehouses.md) %}
|
||||
* Список складов
|
||||
*/
|
||||
getPagedWarehouses(businessId: number, pageToken?: string, limit?: number, getPagedWarehousesRequest?: GetPagedWarehousesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetPagedWarehousesResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getPartnerWarehouses.md) %} Возвращает список складов кабинета и информацию о них. Для каждого склада возвращается список моделей работы (FBS, DBS, Экспресс) и доступность API для каждой модели. {% note warning \"Метод подходит, только если в кабинете нет групп складов\" %} Метод возвращает только отдельные склады и не возвращает группы складов. Если в кабинете есть группы складов, используйте метод [POST v2/businesses/{businessId}/warehouses](../../reference/warehouses/getPagedWarehouses.md). [Что такое группы складов и зачем они нужны](https://yandex.ru/support/marketplace/assortment/operations/stocks.html#unified-stocks). {% endnote %} {% include notitle [limit](../../_auto/method_limits/getPartnerWarehouses.md) %}
|
||||
* Список складов
|
||||
*/
|
||||
getPartnerWarehousesRaw(requestParameters: WarehousesApiGetPartnerWarehousesOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetPartnerWarehousesResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getPartnerWarehouses.md) %} Возвращает список складов кабинета и информацию о них. Для каждого склада возвращается список моделей работы (FBS, DBS, Экспресс) и доступность API для каждой модели. {% note warning \"Метод подходит, только если в кабинете нет групп складов\" %} Метод возвращает только отдельные склады и не возвращает группы складов. Если в кабинете есть группы складов, используйте метод [POST v2/businesses/{businessId}/warehouses](../../reference/warehouses/getPagedWarehouses.md). [Что такое группы складов и зачем они нужны](https://yandex.ru/support/marketplace/assortment/operations/stocks.html#unified-stocks). {% endnote %} {% include notitle [limit](../../_auto/method_limits/getPartnerWarehouses.md) %}
|
||||
* Список складов
|
||||
*/
|
||||
getPartnerWarehouses(businessId: number, pageToken?: string, limit?: number, getPartnerWarehousesRequest?: GetPartnerWarehousesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetPartnerWarehousesResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getWarehouses.md) %} Возвращает список складов и, если склады объединены, список групп складов. [Что такое группы складов и зачем они нужны](https://yandex.ru/support/marketplace/assortment/operations/stocks.html#unified-stocks) Среди прочего запрос позволяет определить идентификатор, который нужно использовать при передаче остатков для группы складов. {% include notitle [limit](../../_auto/method_limits/getWarehouses.md) %}
|
||||
* Список складов и групп складов
|
||||
* @deprecated
|
||||
*/
|
||||
getWarehousesRaw(requestParameters: WarehousesApiGetWarehousesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetWarehousesResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getWarehouses.md) %} Возвращает список складов и, если склады объединены, список групп складов. [Что такое группы складов и зачем они нужны](https://yandex.ru/support/marketplace/assortment/operations/stocks.html#unified-stocks) Среди прочего запрос позволяет определить идентификатор, который нужно использовать при передаче остатков для группы складов. {% include notitle [limit](../../_auto/method_limits/getWarehouses.md) %}
|
||||
* Список складов и групп складов
|
||||
* @deprecated
|
||||
*/
|
||||
getWarehouses(businessId: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetWarehousesResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/updateWarehouseModelStatus.md) %} Отключает или включает модель работы (FBS, DBS или Экспресс) для указанного склада. После отключения модели товары, которые работают по ней на данном складе, скрываются через 15 минут. После включения они возвращаются на витрину через 15 минут, а если модель была выключена 30 дней или дольше — через 4 часа. {% include notitle [limit](../../_auto/method_limits/updateWarehouseModelStatus.md) %}
|
||||
* Включение/выключение модели работы склада
|
||||
*/
|
||||
updateWarehouseModelStatusRaw(requestParameters: WarehousesApiUpdateWarehouseModelStatusOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UpdateWarehouseModelStatusResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/updateWarehouseModelStatus.md) %} Отключает или включает модель работы (FBS, DBS или Экспресс) для указанного склада. После отключения модели товары, которые работают по ней на данном складе, скрываются через 15 минут. После включения они возвращаются на витрину через 15 минут, а если модель была выключена 30 дней или дольше — через 4 часа. {% include notitle [limit](../../_auto/method_limits/updateWarehouseModelStatus.md) %}
|
||||
* Включение/выключение модели работы склада
|
||||
*/
|
||||
updateWarehouseModelStatus(businessId: number, updateWarehouseModelStatusRequest: UpdateWarehouseModelStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UpdateWarehouseModelStatusResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/updateWarehouseStatus.md) %} Отключает или включает склад. После отключения склада товары, которые находятся на нем, скрываются через 15 минут. После включения они возвращаются на витрину через 15 минут, а если склад был выключен 30 дней или дольше — через 4 часа. {% include notitle [limit](../../_auto/method_limits/updateWarehouseStatus.md) %}
|
||||
* Изменение статуса склада
|
||||
* @deprecated
|
||||
*/
|
||||
updateWarehouseStatusRaw(requestParameters: WarehousesApiUpdateWarehouseStatusOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UpdateWarehouseStatusResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/updateWarehouseStatus.md) %} Отключает или включает склад. После отключения склада товары, которые находятся на нем, скрываются через 15 минут. После включения они возвращаются на витрину через 15 минут, а если склад был выключен 30 дней или дольше — через 4 часа. {% include notitle [limit](../../_auto/method_limits/updateWarehouseStatus.md) %}
|
||||
* Изменение статуса склада
|
||||
* @deprecated
|
||||
*/
|
||||
updateWarehouseStatus(campaignId: number, updateWarehouseStatusRequest: UpdateWarehouseStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UpdateWarehouseStatusResponse>;
|
||||
}
|
||||
285
dist/apis/WarehousesApi.js
vendored
Normal file
285
dist/apis/WarehousesApi.js
vendored
Normal file
@@ -0,0 +1,285 @@
|
||||
"use strict";
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* API Яндекс Маркета для продавцов
|
||||
* API Яндекс Маркета помогает продавцам автоматизировать и упростить работу с маркетплейсом. В числе возможностей интеграции: * управление каталогом товаров и витриной, * обработка заказов, * изменение настроек магазина, * получение отчетов.
|
||||
*
|
||||
* The version of the OpenAPI document: LATEST
|
||||
*
|
||||
*
|
||||
* 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.WarehousesApi = void 0;
|
||||
const runtime = require("../runtime");
|
||||
const index_1 = require("../models/index");
|
||||
/**
|
||||
*
|
||||
*/
|
||||
class WarehousesApi extends runtime.BaseAPI {
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getFulfillmentWarehouses.md) %} Возвращает список фулфилмент-складов Маркета с их идентификаторами. {% include notitle [limit](../../_auto/method_limits/getFulfillmentWarehouses.md) %}
|
||||
* Идентификаторы фулфилмент-складов Маркета
|
||||
*/
|
||||
getFulfillmentWarehousesRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const queryParameters = {};
|
||||
if (requestParameters['campaignId'] != null) {
|
||||
queryParameters['campaignId'] = requestParameters['campaignId'];
|
||||
}
|
||||
const headerParameters = {};
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v2/warehouses`,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.GetFulfillmentWarehousesResponseFromJSON)(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getFulfillmentWarehouses.md) %} Возвращает список фулфилмент-складов Маркета с их идентификаторами. {% include notitle [limit](../../_auto/method_limits/getFulfillmentWarehouses.md) %}
|
||||
* Идентификаторы фулфилмент-складов Маркета
|
||||
*/
|
||||
getFulfillmentWarehouses(campaignId, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.getFulfillmentWarehousesRaw({ campaignId: campaignId }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getPagedWarehouses.md) %} Возвращает список складов и информацию о них. {% note warning \"Когда использовать этот метод\" %} Метод актуален для кабинетов с группами складов. Если в кабинете нет групп складов, используйте метод [POST v3/businesses/{businessId}/warehouses](../../reference/warehouses/getPartnerWarehouses.md). [Что такое группы складов и зачем они нужны](https://yandex.ru/support/marketplace/assortment/operations/stocks.html#unified-stocks). {% endnote %} {% include notitle [limit](../../_auto/method_limits/getPagedWarehouses.md) %}
|
||||
* Список складов
|
||||
*/
|
||||
getPagedWarehousesRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['businessId'] == null) {
|
||||
throw new runtime.RequiredError('businessId', 'Required parameter "businessId" was null or undefined when calling getPagedWarehouses().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
if (requestParameters['pageToken'] != null) {
|
||||
queryParameters['pageToken'] = requestParameters['pageToken'];
|
||||
}
|
||||
if (requestParameters['limit'] != null) {
|
||||
queryParameters['limit'] = requestParameters['limit'];
|
||||
}
|
||||
const headerParameters = {};
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v2/businesses/{businessId}/warehouses`.replace(`{${"businessId"}}`, encodeURIComponent(String(requestParameters['businessId']))),
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: (0, index_1.GetPagedWarehousesRequestToJSON)(requestParameters['getPagedWarehousesRequest']),
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.GetPagedWarehousesResponseFromJSON)(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getPagedWarehouses.md) %} Возвращает список складов и информацию о них. {% note warning \"Когда использовать этот метод\" %} Метод актуален для кабинетов с группами складов. Если в кабинете нет групп складов, используйте метод [POST v3/businesses/{businessId}/warehouses](../../reference/warehouses/getPartnerWarehouses.md). [Что такое группы складов и зачем они нужны](https://yandex.ru/support/marketplace/assortment/operations/stocks.html#unified-stocks). {% endnote %} {% include notitle [limit](../../_auto/method_limits/getPagedWarehouses.md) %}
|
||||
* Список складов
|
||||
*/
|
||||
getPagedWarehouses(businessId, pageToken, limit, getPagedWarehousesRequest, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.getPagedWarehousesRaw({ businessId: businessId, pageToken: pageToken, limit: limit, getPagedWarehousesRequest: getPagedWarehousesRequest }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getPartnerWarehouses.md) %} Возвращает список складов кабинета и информацию о них. Для каждого склада возвращается список моделей работы (FBS, DBS, Экспресс) и доступность API для каждой модели. {% note warning \"Метод подходит, только если в кабинете нет групп складов\" %} Метод возвращает только отдельные склады и не возвращает группы складов. Если в кабинете есть группы складов, используйте метод [POST v2/businesses/{businessId}/warehouses](../../reference/warehouses/getPagedWarehouses.md). [Что такое группы складов и зачем они нужны](https://yandex.ru/support/marketplace/assortment/operations/stocks.html#unified-stocks). {% endnote %} {% include notitle [limit](../../_auto/method_limits/getPartnerWarehouses.md) %}
|
||||
* Список складов
|
||||
*/
|
||||
getPartnerWarehousesRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['businessId'] == null) {
|
||||
throw new runtime.RequiredError('businessId', 'Required parameter "businessId" was null or undefined when calling getPartnerWarehouses().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
if (requestParameters['pageToken'] != null) {
|
||||
queryParameters['pageToken'] = requestParameters['pageToken'];
|
||||
}
|
||||
if (requestParameters['limit'] != null) {
|
||||
queryParameters['limit'] = requestParameters['limit'];
|
||||
}
|
||||
const headerParameters = {};
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v3/businesses/{businessId}/warehouses`.replace(`{${"businessId"}}`, encodeURIComponent(String(requestParameters['businessId']))),
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: (0, index_1.GetPartnerWarehousesRequestToJSON)(requestParameters['getPartnerWarehousesRequest']),
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.GetPartnerWarehousesResponseFromJSON)(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getPartnerWarehouses.md) %} Возвращает список складов кабинета и информацию о них. Для каждого склада возвращается список моделей работы (FBS, DBS, Экспресс) и доступность API для каждой модели. {% note warning \"Метод подходит, только если в кабинете нет групп складов\" %} Метод возвращает только отдельные склады и не возвращает группы складов. Если в кабинете есть группы складов, используйте метод [POST v2/businesses/{businessId}/warehouses](../../reference/warehouses/getPagedWarehouses.md). [Что такое группы складов и зачем они нужны](https://yandex.ru/support/marketplace/assortment/operations/stocks.html#unified-stocks). {% endnote %} {% include notitle [limit](../../_auto/method_limits/getPartnerWarehouses.md) %}
|
||||
* Список складов
|
||||
*/
|
||||
getPartnerWarehouses(businessId, pageToken, limit, getPartnerWarehousesRequest, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.getPartnerWarehousesRaw({ businessId: businessId, pageToken: pageToken, limit: limit, getPartnerWarehousesRequest: getPartnerWarehousesRequest }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getWarehouses.md) %} Возвращает список складов и, если склады объединены, список групп складов. [Что такое группы складов и зачем они нужны](https://yandex.ru/support/marketplace/assortment/operations/stocks.html#unified-stocks) Среди прочего запрос позволяет определить идентификатор, который нужно использовать при передаче остатков для группы складов. {% include notitle [limit](../../_auto/method_limits/getWarehouses.md) %}
|
||||
* Список складов и групп складов
|
||||
* @deprecated
|
||||
*/
|
||||
getWarehousesRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['businessId'] == null) {
|
||||
throw new runtime.RequiredError('businessId', 'Required parameter "businessId" was null or undefined when calling getWarehouses().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
const headerParameters = {};
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v2/businesses/{businessId}/warehouses`.replace(`{${"businessId"}}`, encodeURIComponent(String(requestParameters['businessId']))),
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.GetWarehousesResponseFromJSON)(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getWarehouses.md) %} Возвращает список складов и, если склады объединены, список групп складов. [Что такое группы складов и зачем они нужны](https://yandex.ru/support/marketplace/assortment/operations/stocks.html#unified-stocks) Среди прочего запрос позволяет определить идентификатор, который нужно использовать при передаче остатков для группы складов. {% include notitle [limit](../../_auto/method_limits/getWarehouses.md) %}
|
||||
* Список складов и групп складов
|
||||
* @deprecated
|
||||
*/
|
||||
getWarehouses(businessId, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.getWarehousesRaw({ businessId: businessId }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/updateWarehouseModelStatus.md) %} Отключает или включает модель работы (FBS, DBS или Экспресс) для указанного склада. После отключения модели товары, которые работают по ней на данном складе, скрываются через 15 минут. После включения они возвращаются на витрину через 15 минут, а если модель была выключена 30 дней или дольше — через 4 часа. {% include notitle [limit](../../_auto/method_limits/updateWarehouseModelStatus.md) %}
|
||||
* Включение/выключение модели работы склада
|
||||
*/
|
||||
updateWarehouseModelStatusRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['businessId'] == null) {
|
||||
throw new runtime.RequiredError('businessId', 'Required parameter "businessId" was null or undefined when calling updateWarehouseModelStatus().');
|
||||
}
|
||||
if (requestParameters['updateWarehouseModelStatusRequest'] == null) {
|
||||
throw new runtime.RequiredError('updateWarehouseModelStatusRequest', 'Required parameter "updateWarehouseModelStatusRequest" was null or undefined when calling updateWarehouseModelStatus().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
const headerParameters = {};
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v3/businesses/{businessId}/warehouse/models/status`.replace(`{${"businessId"}}`, encodeURIComponent(String(requestParameters['businessId']))),
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: (0, index_1.UpdateWarehouseModelStatusRequestToJSON)(requestParameters['updateWarehouseModelStatusRequest']),
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.UpdateWarehouseModelStatusResponseFromJSON)(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/updateWarehouseModelStatus.md) %} Отключает или включает модель работы (FBS, DBS или Экспресс) для указанного склада. После отключения модели товары, которые работают по ней на данном складе, скрываются через 15 минут. После включения они возвращаются на витрину через 15 минут, а если модель была выключена 30 дней или дольше — через 4 часа. {% include notitle [limit](../../_auto/method_limits/updateWarehouseModelStatus.md) %}
|
||||
* Включение/выключение модели работы склада
|
||||
*/
|
||||
updateWarehouseModelStatus(businessId, updateWarehouseModelStatusRequest, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.updateWarehouseModelStatusRaw({ businessId: businessId, updateWarehouseModelStatusRequest: updateWarehouseModelStatusRequest }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/updateWarehouseStatus.md) %} Отключает или включает склад. После отключения склада товары, которые находятся на нем, скрываются через 15 минут. После включения они возвращаются на витрину через 15 минут, а если склад был выключен 30 дней или дольше — через 4 часа. {% include notitle [limit](../../_auto/method_limits/updateWarehouseStatus.md) %}
|
||||
* Изменение статуса склада
|
||||
* @deprecated
|
||||
*/
|
||||
updateWarehouseStatusRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['campaignId'] == null) {
|
||||
throw new runtime.RequiredError('campaignId', 'Required parameter "campaignId" was null or undefined when calling updateWarehouseStatus().');
|
||||
}
|
||||
if (requestParameters['updateWarehouseStatusRequest'] == null) {
|
||||
throw new runtime.RequiredError('updateWarehouseStatusRequest', 'Required parameter "updateWarehouseStatusRequest" was null or undefined when calling updateWarehouseStatus().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
const headerParameters = {};
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v2/campaigns/{campaignId}/warehouse/status`.replace(`{${"campaignId"}}`, encodeURIComponent(String(requestParameters['campaignId']))),
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: (0, index_1.UpdateWarehouseStatusRequestToJSON)(requestParameters['updateWarehouseStatusRequest']),
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.UpdateWarehouseStatusResponseFromJSON)(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/updateWarehouseStatus.md) %} Отключает или включает склад. После отключения склада товары, которые находятся на нем, скрываются через 15 минут. После включения они возвращаются на витрину через 15 минут, а если склад был выключен 30 дней или дольше — через 4 часа. {% include notitle [limit](../../_auto/method_limits/updateWarehouseStatus.md) %}
|
||||
* Изменение статуса склада
|
||||
* @deprecated
|
||||
*/
|
||||
updateWarehouseStatus(campaignId, updateWarehouseStatusRequest, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.updateWarehouseStatusRaw({ campaignId: campaignId, updateWarehouseStatusRequest: updateWarehouseStatusRequest }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
}
|
||||
exports.WarehousesApi = WarehousesApi;
|
||||
41
dist/apis/index.d.ts
vendored
Normal file
41
dist/apis/index.d.ts
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
export * from './AuthApi';
|
||||
export * from './BidsApi';
|
||||
export * from './BusinessOfferMappingsApi';
|
||||
export * from './BusinessesApi';
|
||||
export * from './CampaignsApi';
|
||||
export * from './CategoriesApi';
|
||||
export * from './ChatsApi';
|
||||
export * from './ContentApi';
|
||||
export * from './DbsApi';
|
||||
export * from './DeliveryOptionsApi';
|
||||
export * from './DeliveryServicesApi';
|
||||
export * from './ExpressApi';
|
||||
export * from './FbsApi';
|
||||
export * from './FbyApi';
|
||||
export * from './GoodsFeedbackApi';
|
||||
export * from './GoodsQuestionsApi';
|
||||
export * from './GoodsStatsApi';
|
||||
export * from './HiddenOffersApi';
|
||||
export * from './LaasApi';
|
||||
export * from './LogisticPointsApi';
|
||||
export * from './OffersApi';
|
||||
export * from './OperationsApi';
|
||||
export * from './OrderBusinessInformationApi';
|
||||
export * from './OrderDeliveryApi';
|
||||
export * from './OrderLabelsApi';
|
||||
export * from './OrdersApi';
|
||||
export * from './OrdersStatsApi';
|
||||
export * from './OutletLicensesApi';
|
||||
export * from './OutletsApi';
|
||||
export * from './PriceQuarantineApi';
|
||||
export * from './PricesApi';
|
||||
export * from './PromosApi';
|
||||
export * from './RatingsApi';
|
||||
export * from './RegionsApi';
|
||||
export * from './ReportsApi';
|
||||
export * from './ReturnsApi';
|
||||
export * from './ShipmentsApi';
|
||||
export * from './StocksApi';
|
||||
export * from './SupplyRequestsApi';
|
||||
export * from './TariffsApi';
|
||||
export * from './WarehousesApi';
|
||||
59
dist/apis/index.js
vendored
Normal file
59
dist/apis/index.js
vendored
Normal file
@@ -0,0 +1,59 @@
|
||||
"use strict";
|
||||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
var desc = Object.getOwnPropertyDescriptor(m, k);
|
||||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
||||
desc = { enumerable: true, get: function() { return m[k]; } };
|
||||
}
|
||||
Object.defineProperty(o, k2, desc);
|
||||
}) : (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
o[k2] = m[k];
|
||||
}));
|
||||
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
||||
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
__exportStar(require("./AuthApi"), exports);
|
||||
__exportStar(require("./BidsApi"), exports);
|
||||
__exportStar(require("./BusinessOfferMappingsApi"), exports);
|
||||
__exportStar(require("./BusinessesApi"), exports);
|
||||
__exportStar(require("./CampaignsApi"), exports);
|
||||
__exportStar(require("./CategoriesApi"), exports);
|
||||
__exportStar(require("./ChatsApi"), exports);
|
||||
__exportStar(require("./ContentApi"), exports);
|
||||
__exportStar(require("./DbsApi"), exports);
|
||||
__exportStar(require("./DeliveryOptionsApi"), exports);
|
||||
__exportStar(require("./DeliveryServicesApi"), exports);
|
||||
__exportStar(require("./ExpressApi"), exports);
|
||||
__exportStar(require("./FbsApi"), exports);
|
||||
__exportStar(require("./FbyApi"), exports);
|
||||
__exportStar(require("./GoodsFeedbackApi"), exports);
|
||||
__exportStar(require("./GoodsQuestionsApi"), exports);
|
||||
__exportStar(require("./GoodsStatsApi"), exports);
|
||||
__exportStar(require("./HiddenOffersApi"), exports);
|
||||
__exportStar(require("./LaasApi"), exports);
|
||||
__exportStar(require("./LogisticPointsApi"), exports);
|
||||
__exportStar(require("./OffersApi"), exports);
|
||||
__exportStar(require("./OperationsApi"), exports);
|
||||
__exportStar(require("./OrderBusinessInformationApi"), exports);
|
||||
__exportStar(require("./OrderDeliveryApi"), exports);
|
||||
__exportStar(require("./OrderLabelsApi"), exports);
|
||||
__exportStar(require("./OrdersApi"), exports);
|
||||
__exportStar(require("./OrdersStatsApi"), exports);
|
||||
__exportStar(require("./OutletLicensesApi"), exports);
|
||||
__exportStar(require("./OutletsApi"), exports);
|
||||
__exportStar(require("./PriceQuarantineApi"), exports);
|
||||
__exportStar(require("./PricesApi"), exports);
|
||||
__exportStar(require("./PromosApi"), exports);
|
||||
__exportStar(require("./RatingsApi"), exports);
|
||||
__exportStar(require("./RegionsApi"), exports);
|
||||
__exportStar(require("./ReportsApi"), exports);
|
||||
__exportStar(require("./ReturnsApi"), exports);
|
||||
__exportStar(require("./ShipmentsApi"), exports);
|
||||
__exportStar(require("./StocksApi"), exports);
|
||||
__exportStar(require("./SupplyRequestsApi"), exports);
|
||||
__exportStar(require("./TariffsApi"), exports);
|
||||
__exportStar(require("./WarehousesApi"), exports);
|
||||
28
dist/esm/apis/AuthApi.d.ts
vendored
Normal file
28
dist/esm/apis/AuthApi.d.ts
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
/**
|
||||
* API Яндекс Маркета для продавцов
|
||||
* API Яндекс Маркета помогает продавцам автоматизировать и упростить работу с маркетплейсом. В числе возможностей интеграции: * управление каталогом товаров и витриной, * обработка заказов, * изменение настроек магазина, * получение отчетов.
|
||||
*
|
||||
* The version of the OpenAPI document: LATEST
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
import * as runtime from '../runtime';
|
||||
import type { GetTokenInfoResponse } from '../models/index';
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export declare class AuthApi extends runtime.BaseAPI {
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getAuthTokenInfo.md) %} {% note info \"Метод доступен только для Api-Key-токена.\" %} {% endnote %} Возвращает информацию о переданном токене авторизации. {% include notitle [limit](../../_auto/method_limits/getAuthTokenInfo.md) %}
|
||||
* Получение информации о токене авторизации
|
||||
*/
|
||||
getAuthTokenInfoRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetTokenInfoResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getAuthTokenInfo.md) %} {% note info \"Метод доступен только для Api-Key-токена.\" %} {% endnote %} Возвращает информацию о переданном токене авторизации. {% include notitle [limit](../../_auto/method_limits/getAuthTokenInfo.md) %}
|
||||
* Получение информации о токене авторизации
|
||||
*/
|
||||
getAuthTokenInfo(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetTokenInfoResponse>;
|
||||
}
|
||||
63
dist/esm/apis/AuthApi.js
vendored
Normal file
63
dist/esm/apis/AuthApi.js
vendored
Normal file
@@ -0,0 +1,63 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* API Яндекс Маркета для продавцов
|
||||
* API Яндекс Маркета помогает продавцам автоматизировать и упростить работу с маркетплейсом. В числе возможностей интеграции: * управление каталогом товаров и витриной, * обработка заказов, * изменение настроек магазина, * получение отчетов.
|
||||
*
|
||||
* The version of the OpenAPI document: LATEST
|
||||
*
|
||||
*
|
||||
* 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());
|
||||
});
|
||||
};
|
||||
import * as runtime from '../runtime';
|
||||
import { GetTokenInfoResponseFromJSON, } from '../models/index';
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export class AuthApi extends runtime.BaseAPI {
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getAuthTokenInfo.md) %} {% note info \"Метод доступен только для Api-Key-токена.\" %} {% endnote %} Возвращает информацию о переданном токене авторизации. {% include notitle [limit](../../_auto/method_limits/getAuthTokenInfo.md) %}
|
||||
* Получение информации о токене авторизации
|
||||
*/
|
||||
getAuthTokenInfoRaw(initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const queryParameters = {};
|
||||
const headerParameters = {};
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v2/auth/token`,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => GetTokenInfoResponseFromJSON(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getAuthTokenInfo.md) %} {% note info \"Метод доступен только для Api-Key-токена.\" %} {% endnote %} Возвращает информацию о переданном токене авторизации. {% include notitle [limit](../../_auto/method_limits/getAuthTokenInfo.md) %}
|
||||
* Получение информации о токене авторизации
|
||||
*/
|
||||
getAuthTokenInfo(initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.getAuthTokenInfoRaw(initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
}
|
||||
76
dist/esm/apis/BidsApi.d.ts
vendored
Normal file
76
dist/esm/apis/BidsApi.d.ts
vendored
Normal file
@@ -0,0 +1,76 @@
|
||||
/**
|
||||
* API Яндекс Маркета для продавцов
|
||||
* API Яндекс Маркета помогает продавцам автоматизировать и упростить работу с маркетплейсом. В числе возможностей интеграции: * управление каталогом товаров и витриной, * обработка заказов, * изменение настроек магазина, * получение отчетов.
|
||||
*
|
||||
* The version of the OpenAPI document: LATEST
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
import * as runtime from '../runtime';
|
||||
import type { EmptyApiResponse, GetBidsInfoRequest, GetBidsInfoResponse, GetBidsRecommendationsRequest, GetBidsRecommendationsResponse, PutSkuBidsRequest } from '../models/index';
|
||||
export interface BidsApiGetBidsInfoForBusinessRequest {
|
||||
businessId: number;
|
||||
pageToken?: string;
|
||||
limit?: number;
|
||||
getBidsInfoRequest?: GetBidsInfoRequest;
|
||||
}
|
||||
export interface BidsApiGetBidsRecommendationsOperationRequest {
|
||||
businessId: number;
|
||||
getBidsRecommendationsRequest: GetBidsRecommendationsRequest;
|
||||
}
|
||||
export interface BidsApiPutBidsForBusinessRequest {
|
||||
businessId: number;
|
||||
putSkuBidsRequest: PutSkuBidsRequest;
|
||||
}
|
||||
export interface BidsApiPutBidsForCampaignRequest {
|
||||
campaignId: number;
|
||||
putSkuBidsRequest: PutSkuBidsRequest;
|
||||
}
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export declare class BidsApi extends runtime.BaseAPI {
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getBidsInfoForBusiness.md) %} Возвращает значения ставок для заданных товаров. {% note warning \"Получить информацию по кампаниям, созданным в кабинете, не получится\" %} В ответе возвращаются значения только тех ставок, которые вы установили через запрос [PUT v2/businesses/{businessId}/bids](../../reference/bids/putBidsForBusiness.md). {% endnote %} {% include notitle [limit](../../_auto/method_limits/getBidsInfoForBusiness.md) %}
|
||||
* Информация об установленных ставках
|
||||
*/
|
||||
getBidsInfoForBusinessRaw(requestParameters: BidsApiGetBidsInfoForBusinessRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetBidsInfoResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getBidsInfoForBusiness.md) %} Возвращает значения ставок для заданных товаров. {% note warning \"Получить информацию по кампаниям, созданным в кабинете, не получится\" %} В ответе возвращаются значения только тех ставок, которые вы установили через запрос [PUT v2/businesses/{businessId}/bids](../../reference/bids/putBidsForBusiness.md). {% endnote %} {% include notitle [limit](../../_auto/method_limits/getBidsInfoForBusiness.md) %}
|
||||
* Информация об установленных ставках
|
||||
*/
|
||||
getBidsInfoForBusiness(businessId: number, pageToken?: string, limit?: number, getBidsInfoRequest?: GetBidsInfoRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetBidsInfoResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getBidsRecommendations.md) %} Возвращает рекомендованные ставки для заданных товаров, что обеспечивает вашим предложениям определенную долю показов, и дополнительные инструменты продвижения. Для одного товара может возвращаться одна рекомендованная ставка или несколько. Во втором случае разные ставки предназначены для достижения разной доли показов и получения дополнительных инструментов продвижения. Если товар только добавлен в каталог, но пока не продается, рекомендованной ставки для него не будет. В одном запросе может быть максимум 1500 товаров. {% include notitle [limit](../../_auto/method_limits/getBidsRecommendations.md) %}
|
||||
* Рекомендованные ставки для заданных товаров
|
||||
*/
|
||||
getBidsRecommendationsRaw(requestParameters: BidsApiGetBidsRecommendationsOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetBidsRecommendationsResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getBidsRecommendations.md) %} Возвращает рекомендованные ставки для заданных товаров, что обеспечивает вашим предложениям определенную долю показов, и дополнительные инструменты продвижения. Для одного товара может возвращаться одна рекомендованная ставка или несколько. Во втором случае разные ставки предназначены для достижения разной доли показов и получения дополнительных инструментов продвижения. Если товар только добавлен в каталог, но пока не продается, рекомендованной ставки для него не будет. В одном запросе может быть максимум 1500 товаров. {% include notitle [limit](../../_auto/method_limits/getBidsRecommendations.md) %}
|
||||
* Рекомендованные ставки для заданных товаров
|
||||
*/
|
||||
getBidsRecommendations(businessId: number, getBidsRecommendationsRequest: GetBidsRecommendationsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetBidsRecommendationsResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/putBidsForBusiness.md) %} Запускает буст продаж — создает и включает кампанию, добавляет в нее товары и назначает на них ставки. {% cut \"Как в кабинете выглядит кампания, созданная через API\" %}  {% endcut %} При первом использовании запроса Маркет: создаст единую на все магазины бизнес-аккаунта кампанию, добавит в нее товары с указанными ставками, включит для них ценовую стратегию и запустит продвижение. Повторное использование запроса позволит обновить ставки на товары в этой кампании или добавить новые. Подробнее о ценовой стратегии читайте в [Справке Маркета для продавцов](https://yandex.ru/support/marketplace/marketing/campaigns.html#price-strategy). Если товара с указанным SKU нет, он будет проигнорирован. Если в будущем в каталоге появится товар с таким SKU, он автоматически будет добавлен в кампанию с указанной ставкой. Запрос всегда работает с одной и той же созданной через API кампанией. Если в кабинете удалить ее, при следующем выполнении запроса Маркет создаст новую. Другими кампаниями управлять через API не получится. У созданной через API кампании всегда наибольший приоритет над остальными — изменить его нельзя. Выполнение запроса включает кампанию и ценовую стратегию, если они были отключены. Внести другие изменения в созданную через API кампанию можно в кабинете: * выключить или включить кампанию; * изменить ее название; * выключить или включить ценовую стратегию. Чтобы остановить продвижение отдельных товаров и удалить их из кампании, передайте для них нулевую ставку в параметре `bid`. Подробнее о том, как работает буст продаж, читайте в [Справке Маркета для продавцов](https://yandex.ru/support/marketplace/marketing/campaigns.html). Узнать расходы на буст продаж можно с помощью запроса [POST v2/campaigns/{campaignId}/stats/orders](../../reference/orders-stats/getOrdersStats.md). Сумма содержится в поле `bidFee`. {% note info \"Данные обновляются не мгновенно\" %} Это занимает до нескольких минут. {% endnote %} {% include notitle [limit](../../_auto/method_limits/putBidsForBusiness.md) %}
|
||||
* Включение буста продаж и установка ставок
|
||||
*/
|
||||
putBidsForBusinessRaw(requestParameters: BidsApiPutBidsForBusinessRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<EmptyApiResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/putBidsForBusiness.md) %} Запускает буст продаж — создает и включает кампанию, добавляет в нее товары и назначает на них ставки. {% cut \"Как в кабинете выглядит кампания, созданная через API\" %}  {% endcut %} При первом использовании запроса Маркет: создаст единую на все магазины бизнес-аккаунта кампанию, добавит в нее товары с указанными ставками, включит для них ценовую стратегию и запустит продвижение. Повторное использование запроса позволит обновить ставки на товары в этой кампании или добавить новые. Подробнее о ценовой стратегии читайте в [Справке Маркета для продавцов](https://yandex.ru/support/marketplace/marketing/campaigns.html#price-strategy). Если товара с указанным SKU нет, он будет проигнорирован. Если в будущем в каталоге появится товар с таким SKU, он автоматически будет добавлен в кампанию с указанной ставкой. Запрос всегда работает с одной и той же созданной через API кампанией. Если в кабинете удалить ее, при следующем выполнении запроса Маркет создаст новую. Другими кампаниями управлять через API не получится. У созданной через API кампании всегда наибольший приоритет над остальными — изменить его нельзя. Выполнение запроса включает кампанию и ценовую стратегию, если они были отключены. Внести другие изменения в созданную через API кампанию можно в кабинете: * выключить или включить кампанию; * изменить ее название; * выключить или включить ценовую стратегию. Чтобы остановить продвижение отдельных товаров и удалить их из кампании, передайте для них нулевую ставку в параметре `bid`. Подробнее о том, как работает буст продаж, читайте в [Справке Маркета для продавцов](https://yandex.ru/support/marketplace/marketing/campaigns.html). Узнать расходы на буст продаж можно с помощью запроса [POST v2/campaigns/{campaignId}/stats/orders](../../reference/orders-stats/getOrdersStats.md). Сумма содержится в поле `bidFee`. {% note info \"Данные обновляются не мгновенно\" %} Это занимает до нескольких минут. {% endnote %} {% include notitle [limit](../../_auto/method_limits/putBidsForBusiness.md) %}
|
||||
* Включение буста продаж и установка ставок
|
||||
*/
|
||||
putBidsForBusiness(businessId: number, putSkuBidsRequest: PutSkuBidsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<EmptyApiResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/putBidsForCampaign.md) %} Запускает буст продаж в указанном магазине — создает и включает кампанию, добавляет в нее товары и назначает на них ставки. При первом использовании запроса Маркет: создаст кампанию, добавит в нее товары с указанными ставками для заданного магазина, включит для них ценовую стратегию и запустит продвижение. Повторное использование запроса позволит обновить ставки на товары в этой кампании или добавить новые. Подробнее о ценовой стратегии читайте в [Справке Маркета для продавцов](https://yandex.ru/support/marketplace/marketing/campaigns.html#price-strategy). Если товара с указанным SKU нет, он будет проигнорирован. Если в будущем в каталоге появится товар с таким SKU, он автоматически будет добавлен в кампанию с указанной ставкой. Запрос всегда работает с одной и той же кампанией, созданной через этот запрос или [PUT v2/businesses/{businessId}/bids](/reference/bids/putBidsForBusiness). Если в кабинете удалить ее, при следующем выполнении запроса Маркет создаст новую. У созданной через API кампании всегда наибольший приоритет над остальными — изменить его нельзя. Выполнение запроса включает кампанию и ценовую стратегию, если они были отключены. Внести другие изменения в созданную через API кампанию можно в кабинете: * выключить или включить кампанию; * изменить ее название; * выключить или включить ценовую стратегию. Чтобы остановить продвижение отдельных товаров и удалить их из кампании, передайте для них нулевую ставку в параметре `bid`. Подробнее о том, как работает буст продаж, читайте в [Справке Маркета для продавцов](https://yandex.ru/support/marketplace/marketing/campaigns.html). Узнать расходы на буст продаж можно с помощью запроса [POST v2/campaigns/{campaignId}/stats/orders](../../reference/orders-stats/getOrdersStats.md). Сумма содержится в поле `bidFee`. {% note info \"Данные обновляются не мгновенно\" %} Это занимает до нескольких минут. {% endnote %} {% include notitle [limit](../../_auto/method_limits/putBidsForCampaign.md) %}
|
||||
* Включение буста продаж и установка ставок для магазина
|
||||
*/
|
||||
putBidsForCampaignRaw(requestParameters: BidsApiPutBidsForCampaignRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<EmptyApiResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/putBidsForCampaign.md) %} Запускает буст продаж в указанном магазине — создает и включает кампанию, добавляет в нее товары и назначает на них ставки. При первом использовании запроса Маркет: создаст кампанию, добавит в нее товары с указанными ставками для заданного магазина, включит для них ценовую стратегию и запустит продвижение. Повторное использование запроса позволит обновить ставки на товары в этой кампании или добавить новые. Подробнее о ценовой стратегии читайте в [Справке Маркета для продавцов](https://yandex.ru/support/marketplace/marketing/campaigns.html#price-strategy). Если товара с указанным SKU нет, он будет проигнорирован. Если в будущем в каталоге появится товар с таким SKU, он автоматически будет добавлен в кампанию с указанной ставкой. Запрос всегда работает с одной и той же кампанией, созданной через этот запрос или [PUT v2/businesses/{businessId}/bids](/reference/bids/putBidsForBusiness). Если в кабинете удалить ее, при следующем выполнении запроса Маркет создаст новую. У созданной через API кампании всегда наибольший приоритет над остальными — изменить его нельзя. Выполнение запроса включает кампанию и ценовую стратегию, если они были отключены. Внести другие изменения в созданную через API кампанию можно в кабинете: * выключить или включить кампанию; * изменить ее название; * выключить или включить ценовую стратегию. Чтобы остановить продвижение отдельных товаров и удалить их из кампании, передайте для них нулевую ставку в параметре `bid`. Подробнее о том, как работает буст продаж, читайте в [Справке Маркета для продавцов](https://yandex.ru/support/marketplace/marketing/campaigns.html). Узнать расходы на буст продаж можно с помощью запроса [POST v2/campaigns/{campaignId}/stats/orders](../../reference/orders-stats/getOrdersStats.md). Сумма содержится в поле `bidFee`. {% note info \"Данные обновляются не мгновенно\" %} Это занимает до нескольких минут. {% endnote %} {% include notitle [limit](../../_auto/method_limits/putBidsForCampaign.md) %}
|
||||
* Включение буста продаж и установка ставок для магазина
|
||||
*/
|
||||
putBidsForCampaign(campaignId: number, putSkuBidsRequest: PutSkuBidsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<EmptyApiResponse>;
|
||||
}
|
||||
200
dist/esm/apis/BidsApi.js
vendored
Normal file
200
dist/esm/apis/BidsApi.js
vendored
Normal file
@@ -0,0 +1,200 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* API Яндекс Маркета для продавцов
|
||||
* API Яндекс Маркета помогает продавцам автоматизировать и упростить работу с маркетплейсом. В числе возможностей интеграции: * управление каталогом товаров и витриной, * обработка заказов, * изменение настроек магазина, * получение отчетов.
|
||||
*
|
||||
* The version of the OpenAPI document: LATEST
|
||||
*
|
||||
*
|
||||
* 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());
|
||||
});
|
||||
};
|
||||
import * as runtime from '../runtime';
|
||||
import { EmptyApiResponseFromJSON, GetBidsInfoRequestToJSON, GetBidsInfoResponseFromJSON, GetBidsRecommendationsRequestToJSON, GetBidsRecommendationsResponseFromJSON, PutSkuBidsRequestToJSON, } from '../models/index';
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export class BidsApi extends runtime.BaseAPI {
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getBidsInfoForBusiness.md) %} Возвращает значения ставок для заданных товаров. {% note warning \"Получить информацию по кампаниям, созданным в кабинете, не получится\" %} В ответе возвращаются значения только тех ставок, которые вы установили через запрос [PUT v2/businesses/{businessId}/bids](../../reference/bids/putBidsForBusiness.md). {% endnote %} {% include notitle [limit](../../_auto/method_limits/getBidsInfoForBusiness.md) %}
|
||||
* Информация об установленных ставках
|
||||
*/
|
||||
getBidsInfoForBusinessRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['businessId'] == null) {
|
||||
throw new runtime.RequiredError('businessId', 'Required parameter "businessId" was null or undefined when calling getBidsInfoForBusiness().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
if (requestParameters['pageToken'] != null) {
|
||||
queryParameters['pageToken'] = requestParameters['pageToken'];
|
||||
}
|
||||
if (requestParameters['limit'] != null) {
|
||||
queryParameters['limit'] = requestParameters['limit'];
|
||||
}
|
||||
const headerParameters = {};
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v2/businesses/{businessId}/bids/info`.replace(`{${"businessId"}}`, encodeURIComponent(String(requestParameters['businessId']))),
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: GetBidsInfoRequestToJSON(requestParameters['getBidsInfoRequest']),
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => GetBidsInfoResponseFromJSON(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getBidsInfoForBusiness.md) %} Возвращает значения ставок для заданных товаров. {% note warning \"Получить информацию по кампаниям, созданным в кабинете, не получится\" %} В ответе возвращаются значения только тех ставок, которые вы установили через запрос [PUT v2/businesses/{businessId}/bids](../../reference/bids/putBidsForBusiness.md). {% endnote %} {% include notitle [limit](../../_auto/method_limits/getBidsInfoForBusiness.md) %}
|
||||
* Информация об установленных ставках
|
||||
*/
|
||||
getBidsInfoForBusiness(businessId, pageToken, limit, getBidsInfoRequest, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.getBidsInfoForBusinessRaw({ businessId: businessId, pageToken: pageToken, limit: limit, getBidsInfoRequest: getBidsInfoRequest }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getBidsRecommendations.md) %} Возвращает рекомендованные ставки для заданных товаров, что обеспечивает вашим предложениям определенную долю показов, и дополнительные инструменты продвижения. Для одного товара может возвращаться одна рекомендованная ставка или несколько. Во втором случае разные ставки предназначены для достижения разной доли показов и получения дополнительных инструментов продвижения. Если товар только добавлен в каталог, но пока не продается, рекомендованной ставки для него не будет. В одном запросе может быть максимум 1500 товаров. {% include notitle [limit](../../_auto/method_limits/getBidsRecommendations.md) %}
|
||||
* Рекомендованные ставки для заданных товаров
|
||||
*/
|
||||
getBidsRecommendationsRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['businessId'] == null) {
|
||||
throw new runtime.RequiredError('businessId', 'Required parameter "businessId" was null or undefined when calling getBidsRecommendations().');
|
||||
}
|
||||
if (requestParameters['getBidsRecommendationsRequest'] == null) {
|
||||
throw new runtime.RequiredError('getBidsRecommendationsRequest', 'Required parameter "getBidsRecommendationsRequest" was null or undefined when calling getBidsRecommendations().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
const headerParameters = {};
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v2/businesses/{businessId}/bids/recommendations`.replace(`{${"businessId"}}`, encodeURIComponent(String(requestParameters['businessId']))),
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: GetBidsRecommendationsRequestToJSON(requestParameters['getBidsRecommendationsRequest']),
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => GetBidsRecommendationsResponseFromJSON(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getBidsRecommendations.md) %} Возвращает рекомендованные ставки для заданных товаров, что обеспечивает вашим предложениям определенную долю показов, и дополнительные инструменты продвижения. Для одного товара может возвращаться одна рекомендованная ставка или несколько. Во втором случае разные ставки предназначены для достижения разной доли показов и получения дополнительных инструментов продвижения. Если товар только добавлен в каталог, но пока не продается, рекомендованной ставки для него не будет. В одном запросе может быть максимум 1500 товаров. {% include notitle [limit](../../_auto/method_limits/getBidsRecommendations.md) %}
|
||||
* Рекомендованные ставки для заданных товаров
|
||||
*/
|
||||
getBidsRecommendations(businessId, getBidsRecommendationsRequest, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.getBidsRecommendationsRaw({ businessId: businessId, getBidsRecommendationsRequest: getBidsRecommendationsRequest }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/putBidsForBusiness.md) %} Запускает буст продаж — создает и включает кампанию, добавляет в нее товары и назначает на них ставки. {% cut \"Как в кабинете выглядит кампания, созданная через API\" %}  {% endcut %} При первом использовании запроса Маркет: создаст единую на все магазины бизнес-аккаунта кампанию, добавит в нее товары с указанными ставками, включит для них ценовую стратегию и запустит продвижение. Повторное использование запроса позволит обновить ставки на товары в этой кампании или добавить новые. Подробнее о ценовой стратегии читайте в [Справке Маркета для продавцов](https://yandex.ru/support/marketplace/marketing/campaigns.html#price-strategy). Если товара с указанным SKU нет, он будет проигнорирован. Если в будущем в каталоге появится товар с таким SKU, он автоматически будет добавлен в кампанию с указанной ставкой. Запрос всегда работает с одной и той же созданной через API кампанией. Если в кабинете удалить ее, при следующем выполнении запроса Маркет создаст новую. Другими кампаниями управлять через API не получится. У созданной через API кампании всегда наибольший приоритет над остальными — изменить его нельзя. Выполнение запроса включает кампанию и ценовую стратегию, если они были отключены. Внести другие изменения в созданную через API кампанию можно в кабинете: * выключить или включить кампанию; * изменить ее название; * выключить или включить ценовую стратегию. Чтобы остановить продвижение отдельных товаров и удалить их из кампании, передайте для них нулевую ставку в параметре `bid`. Подробнее о том, как работает буст продаж, читайте в [Справке Маркета для продавцов](https://yandex.ru/support/marketplace/marketing/campaigns.html). Узнать расходы на буст продаж можно с помощью запроса [POST v2/campaigns/{campaignId}/stats/orders](../../reference/orders-stats/getOrdersStats.md). Сумма содержится в поле `bidFee`. {% note info \"Данные обновляются не мгновенно\" %} Это занимает до нескольких минут. {% endnote %} {% include notitle [limit](../../_auto/method_limits/putBidsForBusiness.md) %}
|
||||
* Включение буста продаж и установка ставок
|
||||
*/
|
||||
putBidsForBusinessRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['businessId'] == null) {
|
||||
throw new runtime.RequiredError('businessId', 'Required parameter "businessId" was null or undefined when calling putBidsForBusiness().');
|
||||
}
|
||||
if (requestParameters['putSkuBidsRequest'] == null) {
|
||||
throw new runtime.RequiredError('putSkuBidsRequest', 'Required parameter "putSkuBidsRequest" was null or undefined when calling putBidsForBusiness().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
const headerParameters = {};
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v2/businesses/{businessId}/bids`.replace(`{${"businessId"}}`, encodeURIComponent(String(requestParameters['businessId']))),
|
||||
method: 'PUT',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: PutSkuBidsRequestToJSON(requestParameters['putSkuBidsRequest']),
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => EmptyApiResponseFromJSON(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/putBidsForBusiness.md) %} Запускает буст продаж — создает и включает кампанию, добавляет в нее товары и назначает на них ставки. {% cut \"Как в кабинете выглядит кампания, созданная через API\" %}  {% endcut %} При первом использовании запроса Маркет: создаст единую на все магазины бизнес-аккаунта кампанию, добавит в нее товары с указанными ставками, включит для них ценовую стратегию и запустит продвижение. Повторное использование запроса позволит обновить ставки на товары в этой кампании или добавить новые. Подробнее о ценовой стратегии читайте в [Справке Маркета для продавцов](https://yandex.ru/support/marketplace/marketing/campaigns.html#price-strategy). Если товара с указанным SKU нет, он будет проигнорирован. Если в будущем в каталоге появится товар с таким SKU, он автоматически будет добавлен в кампанию с указанной ставкой. Запрос всегда работает с одной и той же созданной через API кампанией. Если в кабинете удалить ее, при следующем выполнении запроса Маркет создаст новую. Другими кампаниями управлять через API не получится. У созданной через API кампании всегда наибольший приоритет над остальными — изменить его нельзя. Выполнение запроса включает кампанию и ценовую стратегию, если они были отключены. Внести другие изменения в созданную через API кампанию можно в кабинете: * выключить или включить кампанию; * изменить ее название; * выключить или включить ценовую стратегию. Чтобы остановить продвижение отдельных товаров и удалить их из кампании, передайте для них нулевую ставку в параметре `bid`. Подробнее о том, как работает буст продаж, читайте в [Справке Маркета для продавцов](https://yandex.ru/support/marketplace/marketing/campaigns.html). Узнать расходы на буст продаж можно с помощью запроса [POST v2/campaigns/{campaignId}/stats/orders](../../reference/orders-stats/getOrdersStats.md). Сумма содержится в поле `bidFee`. {% note info \"Данные обновляются не мгновенно\" %} Это занимает до нескольких минут. {% endnote %} {% include notitle [limit](../../_auto/method_limits/putBidsForBusiness.md) %}
|
||||
* Включение буста продаж и установка ставок
|
||||
*/
|
||||
putBidsForBusiness(businessId, putSkuBidsRequest, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.putBidsForBusinessRaw({ businessId: businessId, putSkuBidsRequest: putSkuBidsRequest }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/putBidsForCampaign.md) %} Запускает буст продаж в указанном магазине — создает и включает кампанию, добавляет в нее товары и назначает на них ставки. При первом использовании запроса Маркет: создаст кампанию, добавит в нее товары с указанными ставками для заданного магазина, включит для них ценовую стратегию и запустит продвижение. Повторное использование запроса позволит обновить ставки на товары в этой кампании или добавить новые. Подробнее о ценовой стратегии читайте в [Справке Маркета для продавцов](https://yandex.ru/support/marketplace/marketing/campaigns.html#price-strategy). Если товара с указанным SKU нет, он будет проигнорирован. Если в будущем в каталоге появится товар с таким SKU, он автоматически будет добавлен в кампанию с указанной ставкой. Запрос всегда работает с одной и той же кампанией, созданной через этот запрос или [PUT v2/businesses/{businessId}/bids](/reference/bids/putBidsForBusiness). Если в кабинете удалить ее, при следующем выполнении запроса Маркет создаст новую. У созданной через API кампании всегда наибольший приоритет над остальными — изменить его нельзя. Выполнение запроса включает кампанию и ценовую стратегию, если они были отключены. Внести другие изменения в созданную через API кампанию можно в кабинете: * выключить или включить кампанию; * изменить ее название; * выключить или включить ценовую стратегию. Чтобы остановить продвижение отдельных товаров и удалить их из кампании, передайте для них нулевую ставку в параметре `bid`. Подробнее о том, как работает буст продаж, читайте в [Справке Маркета для продавцов](https://yandex.ru/support/marketplace/marketing/campaigns.html). Узнать расходы на буст продаж можно с помощью запроса [POST v2/campaigns/{campaignId}/stats/orders](../../reference/orders-stats/getOrdersStats.md). Сумма содержится в поле `bidFee`. {% note info \"Данные обновляются не мгновенно\" %} Это занимает до нескольких минут. {% endnote %} {% include notitle [limit](../../_auto/method_limits/putBidsForCampaign.md) %}
|
||||
* Включение буста продаж и установка ставок для магазина
|
||||
*/
|
||||
putBidsForCampaignRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['campaignId'] == null) {
|
||||
throw new runtime.RequiredError('campaignId', 'Required parameter "campaignId" was null or undefined when calling putBidsForCampaign().');
|
||||
}
|
||||
if (requestParameters['putSkuBidsRequest'] == null) {
|
||||
throw new runtime.RequiredError('putSkuBidsRequest', 'Required parameter "putSkuBidsRequest" was null or undefined when calling putBidsForCampaign().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
const headerParameters = {};
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v2/campaigns/{campaignId}/bids`.replace(`{${"campaignId"}}`, encodeURIComponent(String(requestParameters['campaignId']))),
|
||||
method: 'PUT',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: PutSkuBidsRequestToJSON(requestParameters['putSkuBidsRequest']),
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => EmptyApiResponseFromJSON(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/putBidsForCampaign.md) %} Запускает буст продаж в указанном магазине — создает и включает кампанию, добавляет в нее товары и назначает на них ставки. При первом использовании запроса Маркет: создаст кампанию, добавит в нее товары с указанными ставками для заданного магазина, включит для них ценовую стратегию и запустит продвижение. Повторное использование запроса позволит обновить ставки на товары в этой кампании или добавить новые. Подробнее о ценовой стратегии читайте в [Справке Маркета для продавцов](https://yandex.ru/support/marketplace/marketing/campaigns.html#price-strategy). Если товара с указанным SKU нет, он будет проигнорирован. Если в будущем в каталоге появится товар с таким SKU, он автоматически будет добавлен в кампанию с указанной ставкой. Запрос всегда работает с одной и той же кампанией, созданной через этот запрос или [PUT v2/businesses/{businessId}/bids](/reference/bids/putBidsForBusiness). Если в кабинете удалить ее, при следующем выполнении запроса Маркет создаст новую. У созданной через API кампании всегда наибольший приоритет над остальными — изменить его нельзя. Выполнение запроса включает кампанию и ценовую стратегию, если они были отключены. Внести другие изменения в созданную через API кампанию можно в кабинете: * выключить или включить кампанию; * изменить ее название; * выключить или включить ценовую стратегию. Чтобы остановить продвижение отдельных товаров и удалить их из кампании, передайте для них нулевую ставку в параметре `bid`. Подробнее о том, как работает буст продаж, читайте в [Справке Маркета для продавцов](https://yandex.ru/support/marketplace/marketing/campaigns.html). Узнать расходы на буст продаж можно с помощью запроса [POST v2/campaigns/{campaignId}/stats/orders](../../reference/orders-stats/getOrdersStats.md). Сумма содержится в поле `bidFee`. {% note info \"Данные обновляются не мгновенно\" %} Это занимает до нескольких минут. {% endnote %} {% include notitle [limit](../../_auto/method_limits/putBidsForCampaign.md) %}
|
||||
* Включение буста продаж и установка ставок для магазина
|
||||
*/
|
||||
putBidsForCampaign(campaignId, putSkuBidsRequest, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.putBidsForCampaignRaw({ campaignId: campaignId, putSkuBidsRequest: putSkuBidsRequest }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
}
|
||||
106
dist/esm/apis/BusinessOfferMappingsApi.d.ts
vendored
Normal file
106
dist/esm/apis/BusinessOfferMappingsApi.d.ts
vendored
Normal file
@@ -0,0 +1,106 @@
|
||||
/**
|
||||
* API Яндекс Маркета для продавцов
|
||||
* API Яндекс Маркета помогает продавцам автоматизировать и упростить работу с маркетплейсом. В числе возможностей интеграции: * управление каталогом товаров и витриной, * обработка заказов, * изменение настроек магазина, * получение отчетов.
|
||||
*
|
||||
* The version of the OpenAPI document: LATEST
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
import * as runtime from '../runtime';
|
||||
import type { AddOffersToArchiveRequest, AddOffersToArchiveResponse, CatalogLanguageType, DeleteOffersFromArchiveRequest, DeleteOffersFromArchiveResponse, DeleteOffersRequest, DeleteOffersResponse, GenerateOfferBarcodesRequest, GenerateOfferBarcodesResponse, GetOfferMappingsRequest, GetOfferMappingsResponse, UpdateOfferMappingsRequest, UpdateOfferMappingsResponse } from '../models/index';
|
||||
export interface BusinessOfferMappingsApiAddOffersToArchiveOperationRequest {
|
||||
businessId: number;
|
||||
addOffersToArchiveRequest: AddOffersToArchiveRequest;
|
||||
}
|
||||
export interface BusinessOfferMappingsApiDeleteOffersOperationRequest {
|
||||
businessId: number;
|
||||
deleteOffersRequest: DeleteOffersRequest;
|
||||
}
|
||||
export interface BusinessOfferMappingsApiDeleteOffersFromArchiveOperationRequest {
|
||||
businessId: number;
|
||||
deleteOffersFromArchiveRequest: DeleteOffersFromArchiveRequest;
|
||||
}
|
||||
export interface BusinessOfferMappingsApiGenerateOfferBarcodesOperationRequest {
|
||||
businessId: number;
|
||||
generateOfferBarcodesRequest: GenerateOfferBarcodesRequest;
|
||||
}
|
||||
export interface BusinessOfferMappingsApiGetOfferMappingsOperationRequest {
|
||||
businessId: number;
|
||||
pageToken?: string;
|
||||
limit?: number;
|
||||
language?: CatalogLanguageType;
|
||||
getOfferMappingsRequest?: GetOfferMappingsRequest;
|
||||
}
|
||||
export interface BusinessOfferMappingsApiUpdateOfferMappingsOperationRequest {
|
||||
businessId: number;
|
||||
updateOfferMappingsRequest: UpdateOfferMappingsRequest;
|
||||
language?: CatalogLanguageType;
|
||||
}
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export declare class BusinessOfferMappingsApi extends runtime.BaseAPI {
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/addOffersToArchive.md) %} Помещает товары в архив. Товары, помещенные в архив, скрыты с витрины во всех магазинах кабинета. {% note warning \"В архив нельзя отправить товар, который хранится на складе Маркета\" %} Вначале такой товар нужно распродать или вывезти. {% endnote %} {% include notitle [limit](../../_auto/method_limits/addOffersToArchive.md) %}
|
||||
* Добавление товаров в архив
|
||||
*/
|
||||
addOffersToArchiveRaw(requestParameters: BusinessOfferMappingsApiAddOffersToArchiveOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AddOffersToArchiveResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/addOffersToArchive.md) %} Помещает товары в архив. Товары, помещенные в архив, скрыты с витрины во всех магазинах кабинета. {% note warning \"В архив нельзя отправить товар, который хранится на складе Маркета\" %} Вначале такой товар нужно распродать или вывезти. {% endnote %} {% include notitle [limit](../../_auto/method_limits/addOffersToArchive.md) %}
|
||||
* Добавление товаров в архив
|
||||
*/
|
||||
addOffersToArchive(businessId: number, addOffersToArchiveRequest: AddOffersToArchiveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AddOffersToArchiveResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/deleteOffers.md) %} Удаляет товары из каталога. {% include notitle [limit](../../_auto/method_limits/deleteOffers.md) %}
|
||||
* Удаление товаров из каталога
|
||||
*/
|
||||
deleteOffersRaw(requestParameters: BusinessOfferMappingsApiDeleteOffersOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DeleteOffersResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/deleteOffers.md) %} Удаляет товары из каталога. {% include notitle [limit](../../_auto/method_limits/deleteOffers.md) %}
|
||||
* Удаление товаров из каталога
|
||||
*/
|
||||
deleteOffers(businessId: number, deleteOffersRequest: DeleteOffersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DeleteOffersResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/deleteOffersFromArchive.md) %} Восстанавливает товары из архива. {% include notitle [limit](../../_auto/method_limits/deleteOffersFromArchive.md) %}
|
||||
* Удаление товаров из архива
|
||||
*/
|
||||
deleteOffersFromArchiveRaw(requestParameters: BusinessOfferMappingsApiDeleteOffersFromArchiveOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DeleteOffersFromArchiveResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/deleteOffersFromArchive.md) %} Восстанавливает товары из архива. {% include notitle [limit](../../_auto/method_limits/deleteOffersFromArchive.md) %}
|
||||
* Удаление товаров из архива
|
||||
*/
|
||||
deleteOffersFromArchive(businessId: number, deleteOffersFromArchiveRequest: DeleteOffersFromArchiveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DeleteOffersFromArchiveResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/generateOfferBarcodes.md) %} Генерирует штрихкоды и присваивает их указанным товарам. Если у товара на упаковке уже есть штрихкод производителя, передайте его в параметре `barcodes` в методе [POST v2/businesses/{businessId}/offer-mappings/update](../../reference/business-offer-mappings/updateOfferMappings.md). Генерировать новый не нужно. {% include notitle [limit](../../_auto/method_limits/generateOfferBarcodes.md) %}
|
||||
* Генерация штрихкодов
|
||||
*/
|
||||
generateOfferBarcodesRaw(requestParameters: BusinessOfferMappingsApiGenerateOfferBarcodesOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GenerateOfferBarcodesResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/generateOfferBarcodes.md) %} Генерирует штрихкоды и присваивает их указанным товарам. Если у товара на упаковке уже есть штрихкод производителя, передайте его в параметре `barcodes` в методе [POST v2/businesses/{businessId}/offer-mappings/update](../../reference/business-offer-mappings/updateOfferMappings.md). Генерировать новый не нужно. {% include notitle [limit](../../_auto/method_limits/generateOfferBarcodes.md) %}
|
||||
* Генерация штрихкодов
|
||||
*/
|
||||
generateOfferBarcodes(businessId: number, generateOfferBarcodesRequest: GenerateOfferBarcodesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GenerateOfferBarcodesResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getOfferMappings.md) %} Возвращает список товаров в каталоге, их категории на Маркете и характеристики каждого товара. Можно использовать тремя способами: * задать список интересующих SKU; * задать фильтр — в этом случае результаты возвращаются постранично; * не передавать тело запроса, чтобы получить список всех товаров в каталоге. Чтобы получить категорийные характеристики товаров, воспользуйтесь методом [POST v2/businesses/{businessId}/offer-cards](../../reference/content/getOfferCardsContentStatus.md). {% include notitle [limit](../../_auto/method_limits/getOfferMappings.md) %}
|
||||
* Информация о товарах в каталоге
|
||||
*/
|
||||
getOfferMappingsRaw(requestParameters: BusinessOfferMappingsApiGetOfferMappingsOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetOfferMappingsResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getOfferMappings.md) %} Возвращает список товаров в каталоге, их категории на Маркете и характеристики каждого товара. Можно использовать тремя способами: * задать список интересующих SKU; * задать фильтр — в этом случае результаты возвращаются постранично; * не передавать тело запроса, чтобы получить список всех товаров в каталоге. Чтобы получить категорийные характеристики товаров, воспользуйтесь методом [POST v2/businesses/{businessId}/offer-cards](../../reference/content/getOfferCardsContentStatus.md). {% include notitle [limit](../../_auto/method_limits/getOfferMappings.md) %}
|
||||
* Информация о товарах в каталоге
|
||||
*/
|
||||
getOfferMappings(businessId: number, pageToken?: string, limit?: number, language?: CatalogLanguageType, getOfferMappingsRequest?: GetOfferMappingsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetOfferMappingsResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/updateOfferMappings.md) %} Добавляет товары в каталог и передает: * их [листовые категории](*list-categories) на Маркете и категорийные характеристики; * основные характеристики; * цены на товары в кабинете. Также объединяет товары на карточке, редактирует и удаляет информацию об уже добавленных товарах, в том числе цены в кабинете и категории товаров. Список категорий Маркета можно получить с помощью запроса [POST v2/categories/tree](../../reference/categories/getCategoriesTree.md), а характеристики товаров по категориям с помощью [POST v2/category/{categoryId}/parameters](../../reference/content/getCategoryContentParameters.md). {% cut \"Добавить новый товар\" %} Передайте его с новым идентификатором, который раньше никогда не использовался в каталоге. Обязательно укажите параметры: `offerId`, `name`, `marketCategoryId`, `pictures`, `vendor`, `description`. Старайтесь сразу передать как можно больше информации — она потребуется Маркету для подбора подходящей карточки или создания новой. Если известно, какой карточке на Маркете соответствует товар, можно сразу указать идентификатор этой карточки (SKU на Маркете) в поле `marketSKU`. **Для продавцов Market Yandex Go:** Когда вы добавляете товары в каталог, указывайте значения параметров `name` и `description` на русском языке. Чтобы на витрине они отображались и на другом языке, еще раз выполните запрос `POST v2/businesses/{businessId}/offer-mappings/update`, где укажите: * язык в параметре `language`; * значения параметров `name` и `description` на указанном языке. Повторно передавать остальные характеристики товара не нужно. {% endcut %} {% cut \"Изменить информацию о товаре\" %} Передайте новые данные, указав в `offerId` SKU товара в вашей системе. Поля, в которых ничего не меняется, можно не передавать. {% endcut %} {% cut \"Удалить переданные ранее параметры товара\" %} В `deleteParameters` укажите значения параметров, которые хотите удалить. Можно передать сразу несколько значений. Для параметров с типом `string` также можно передать пустое значение. {% endcut %} Параметр `offerId` (SKU товара в вашей системе) должен быть **уникальным** для всех товаров, которые вы передаете. {% note warning \"Правила использования SKU\" %} * У каждого товара SKU должен быть свой. * Уже заданный SKU нельзя освободить и использовать заново для другого товара. Каждый товар должен получать новый идентификатор, до того никогда не использовавшийся в вашем каталоге. SKU товара можно изменить в кабинете продавца на Маркете. О том, как это сделать, читайте [в Справке Маркета для продавцов](https://yandex.ru/support2/marketplace/ru/assortment/operations/edit-sku). {% endnote %} {% note info \"Данные в каталоге обновляются не мгновенно\" %} Это занимает до нескольких минут. {% endnote %} {% include notitle [limit](../../_auto/method_limits/updateOfferMappings.md) %}
|
||||
* Добавление товаров в каталог и изменение информации о них
|
||||
*/
|
||||
updateOfferMappingsRaw(requestParameters: BusinessOfferMappingsApiUpdateOfferMappingsOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UpdateOfferMappingsResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/updateOfferMappings.md) %} Добавляет товары в каталог и передает: * их [листовые категории](*list-categories) на Маркете и категорийные характеристики; * основные характеристики; * цены на товары в кабинете. Также объединяет товары на карточке, редактирует и удаляет информацию об уже добавленных товарах, в том числе цены в кабинете и категории товаров. Список категорий Маркета можно получить с помощью запроса [POST v2/categories/tree](../../reference/categories/getCategoriesTree.md), а характеристики товаров по категориям с помощью [POST v2/category/{categoryId}/parameters](../../reference/content/getCategoryContentParameters.md). {% cut \"Добавить новый товар\" %} Передайте его с новым идентификатором, который раньше никогда не использовался в каталоге. Обязательно укажите параметры: `offerId`, `name`, `marketCategoryId`, `pictures`, `vendor`, `description`. Старайтесь сразу передать как можно больше информации — она потребуется Маркету для подбора подходящей карточки или создания новой. Если известно, какой карточке на Маркете соответствует товар, можно сразу указать идентификатор этой карточки (SKU на Маркете) в поле `marketSKU`. **Для продавцов Market Yandex Go:** Когда вы добавляете товары в каталог, указывайте значения параметров `name` и `description` на русском языке. Чтобы на витрине они отображались и на другом языке, еще раз выполните запрос `POST v2/businesses/{businessId}/offer-mappings/update`, где укажите: * язык в параметре `language`; * значения параметров `name` и `description` на указанном языке. Повторно передавать остальные характеристики товара не нужно. {% endcut %} {% cut \"Изменить информацию о товаре\" %} Передайте новые данные, указав в `offerId` SKU товара в вашей системе. Поля, в которых ничего не меняется, можно не передавать. {% endcut %} {% cut \"Удалить переданные ранее параметры товара\" %} В `deleteParameters` укажите значения параметров, которые хотите удалить. Можно передать сразу несколько значений. Для параметров с типом `string` также можно передать пустое значение. {% endcut %} Параметр `offerId` (SKU товара в вашей системе) должен быть **уникальным** для всех товаров, которые вы передаете. {% note warning \"Правила использования SKU\" %} * У каждого товара SKU должен быть свой. * Уже заданный SKU нельзя освободить и использовать заново для другого товара. Каждый товар должен получать новый идентификатор, до того никогда не использовавшийся в вашем каталоге. SKU товара можно изменить в кабинете продавца на Маркете. О том, как это сделать, читайте [в Справке Маркета для продавцов](https://yandex.ru/support2/marketplace/ru/assortment/operations/edit-sku). {% endnote %} {% note info \"Данные в каталоге обновляются не мгновенно\" %} Это занимает до нескольких минут. {% endnote %} {% include notitle [limit](../../_auto/method_limits/updateOfferMappings.md) %}
|
||||
* Добавление товаров в каталог и изменение информации о них
|
||||
*/
|
||||
updateOfferMappings(businessId: number, updateOfferMappingsRequest: UpdateOfferMappingsRequest, language?: CatalogLanguageType, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UpdateOfferMappingsResponse>;
|
||||
}
|
||||
290
dist/esm/apis/BusinessOfferMappingsApi.js
vendored
Normal file
290
dist/esm/apis/BusinessOfferMappingsApi.js
vendored
Normal file
@@ -0,0 +1,290 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* API Яндекс Маркета для продавцов
|
||||
* API Яндекс Маркета помогает продавцам автоматизировать и упростить работу с маркетплейсом. В числе возможностей интеграции: * управление каталогом товаров и витриной, * обработка заказов, * изменение настроек магазина, * получение отчетов.
|
||||
*
|
||||
* The version of the OpenAPI document: LATEST
|
||||
*
|
||||
*
|
||||
* 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());
|
||||
});
|
||||
};
|
||||
import * as runtime from '../runtime';
|
||||
import { AddOffersToArchiveRequestToJSON, AddOffersToArchiveResponseFromJSON, DeleteOffersFromArchiveRequestToJSON, DeleteOffersFromArchiveResponseFromJSON, DeleteOffersRequestToJSON, DeleteOffersResponseFromJSON, GenerateOfferBarcodesRequestToJSON, GenerateOfferBarcodesResponseFromJSON, GetOfferMappingsRequestToJSON, GetOfferMappingsResponseFromJSON, UpdateOfferMappingsRequestToJSON, UpdateOfferMappingsResponseFromJSON, } from '../models/index';
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export class BusinessOfferMappingsApi extends runtime.BaseAPI {
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/addOffersToArchive.md) %} Помещает товары в архив. Товары, помещенные в архив, скрыты с витрины во всех магазинах кабинета. {% note warning \"В архив нельзя отправить товар, который хранится на складе Маркета\" %} Вначале такой товар нужно распродать или вывезти. {% endnote %} {% include notitle [limit](../../_auto/method_limits/addOffersToArchive.md) %}
|
||||
* Добавление товаров в архив
|
||||
*/
|
||||
addOffersToArchiveRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['businessId'] == null) {
|
||||
throw new runtime.RequiredError('businessId', 'Required parameter "businessId" was null or undefined when calling addOffersToArchive().');
|
||||
}
|
||||
if (requestParameters['addOffersToArchiveRequest'] == null) {
|
||||
throw new runtime.RequiredError('addOffersToArchiveRequest', 'Required parameter "addOffersToArchiveRequest" was null or undefined when calling addOffersToArchive().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
const headerParameters = {};
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v2/businesses/{businessId}/offer-mappings/archive`.replace(`{${"businessId"}}`, encodeURIComponent(String(requestParameters['businessId']))),
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: AddOffersToArchiveRequestToJSON(requestParameters['addOffersToArchiveRequest']),
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => AddOffersToArchiveResponseFromJSON(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/addOffersToArchive.md) %} Помещает товары в архив. Товары, помещенные в архив, скрыты с витрины во всех магазинах кабинета. {% note warning \"В архив нельзя отправить товар, который хранится на складе Маркета\" %} Вначале такой товар нужно распродать или вывезти. {% endnote %} {% include notitle [limit](../../_auto/method_limits/addOffersToArchive.md) %}
|
||||
* Добавление товаров в архив
|
||||
*/
|
||||
addOffersToArchive(businessId, addOffersToArchiveRequest, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.addOffersToArchiveRaw({ businessId: businessId, addOffersToArchiveRequest: addOffersToArchiveRequest }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/deleteOffers.md) %} Удаляет товары из каталога. {% include notitle [limit](../../_auto/method_limits/deleteOffers.md) %}
|
||||
* Удаление товаров из каталога
|
||||
*/
|
||||
deleteOffersRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['businessId'] == null) {
|
||||
throw new runtime.RequiredError('businessId', 'Required parameter "businessId" was null or undefined when calling deleteOffers().');
|
||||
}
|
||||
if (requestParameters['deleteOffersRequest'] == null) {
|
||||
throw new runtime.RequiredError('deleteOffersRequest', 'Required parameter "deleteOffersRequest" was null or undefined when calling deleteOffers().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
const headerParameters = {};
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v2/businesses/{businessId}/offer-mappings/delete`.replace(`{${"businessId"}}`, encodeURIComponent(String(requestParameters['businessId']))),
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: DeleteOffersRequestToJSON(requestParameters['deleteOffersRequest']),
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => DeleteOffersResponseFromJSON(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/deleteOffers.md) %} Удаляет товары из каталога. {% include notitle [limit](../../_auto/method_limits/deleteOffers.md) %}
|
||||
* Удаление товаров из каталога
|
||||
*/
|
||||
deleteOffers(businessId, deleteOffersRequest, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.deleteOffersRaw({ businessId: businessId, deleteOffersRequest: deleteOffersRequest }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/deleteOffersFromArchive.md) %} Восстанавливает товары из архива. {% include notitle [limit](../../_auto/method_limits/deleteOffersFromArchive.md) %}
|
||||
* Удаление товаров из архива
|
||||
*/
|
||||
deleteOffersFromArchiveRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['businessId'] == null) {
|
||||
throw new runtime.RequiredError('businessId', 'Required parameter "businessId" was null or undefined when calling deleteOffersFromArchive().');
|
||||
}
|
||||
if (requestParameters['deleteOffersFromArchiveRequest'] == null) {
|
||||
throw new runtime.RequiredError('deleteOffersFromArchiveRequest', 'Required parameter "deleteOffersFromArchiveRequest" was null or undefined when calling deleteOffersFromArchive().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
const headerParameters = {};
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v2/businesses/{businessId}/offer-mappings/unarchive`.replace(`{${"businessId"}}`, encodeURIComponent(String(requestParameters['businessId']))),
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: DeleteOffersFromArchiveRequestToJSON(requestParameters['deleteOffersFromArchiveRequest']),
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => DeleteOffersFromArchiveResponseFromJSON(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/deleteOffersFromArchive.md) %} Восстанавливает товары из архива. {% include notitle [limit](../../_auto/method_limits/deleteOffersFromArchive.md) %}
|
||||
* Удаление товаров из архива
|
||||
*/
|
||||
deleteOffersFromArchive(businessId, deleteOffersFromArchiveRequest, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.deleteOffersFromArchiveRaw({ businessId: businessId, deleteOffersFromArchiveRequest: deleteOffersFromArchiveRequest }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/generateOfferBarcodes.md) %} Генерирует штрихкоды и присваивает их указанным товарам. Если у товара на упаковке уже есть штрихкод производителя, передайте его в параметре `barcodes` в методе [POST v2/businesses/{businessId}/offer-mappings/update](../../reference/business-offer-mappings/updateOfferMappings.md). Генерировать новый не нужно. {% include notitle [limit](../../_auto/method_limits/generateOfferBarcodes.md) %}
|
||||
* Генерация штрихкодов
|
||||
*/
|
||||
generateOfferBarcodesRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['businessId'] == null) {
|
||||
throw new runtime.RequiredError('businessId', 'Required parameter "businessId" was null or undefined when calling generateOfferBarcodes().');
|
||||
}
|
||||
if (requestParameters['generateOfferBarcodesRequest'] == null) {
|
||||
throw new runtime.RequiredError('generateOfferBarcodesRequest', 'Required parameter "generateOfferBarcodesRequest" was null or undefined when calling generateOfferBarcodes().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
const headerParameters = {};
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v1/businesses/{businessId}/offer-mappings/barcodes/generate`.replace(`{${"businessId"}}`, encodeURIComponent(String(requestParameters['businessId']))),
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: GenerateOfferBarcodesRequestToJSON(requestParameters['generateOfferBarcodesRequest']),
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => GenerateOfferBarcodesResponseFromJSON(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/generateOfferBarcodes.md) %} Генерирует штрихкоды и присваивает их указанным товарам. Если у товара на упаковке уже есть штрихкод производителя, передайте его в параметре `barcodes` в методе [POST v2/businesses/{businessId}/offer-mappings/update](../../reference/business-offer-mappings/updateOfferMappings.md). Генерировать новый не нужно. {% include notitle [limit](../../_auto/method_limits/generateOfferBarcodes.md) %}
|
||||
* Генерация штрихкодов
|
||||
*/
|
||||
generateOfferBarcodes(businessId, generateOfferBarcodesRequest, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.generateOfferBarcodesRaw({ businessId: businessId, generateOfferBarcodesRequest: generateOfferBarcodesRequest }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getOfferMappings.md) %} Возвращает список товаров в каталоге, их категории на Маркете и характеристики каждого товара. Можно использовать тремя способами: * задать список интересующих SKU; * задать фильтр — в этом случае результаты возвращаются постранично; * не передавать тело запроса, чтобы получить список всех товаров в каталоге. Чтобы получить категорийные характеристики товаров, воспользуйтесь методом [POST v2/businesses/{businessId}/offer-cards](../../reference/content/getOfferCardsContentStatus.md). {% include notitle [limit](../../_auto/method_limits/getOfferMappings.md) %}
|
||||
* Информация о товарах в каталоге
|
||||
*/
|
||||
getOfferMappingsRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['businessId'] == null) {
|
||||
throw new runtime.RequiredError('businessId', 'Required parameter "businessId" was null or undefined when calling getOfferMappings().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
if (requestParameters['pageToken'] != null) {
|
||||
queryParameters['pageToken'] = requestParameters['pageToken'];
|
||||
}
|
||||
if (requestParameters['limit'] != null) {
|
||||
queryParameters['limit'] = requestParameters['limit'];
|
||||
}
|
||||
if (requestParameters['language'] != null) {
|
||||
queryParameters['language'] = requestParameters['language'];
|
||||
}
|
||||
const headerParameters = {};
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v2/businesses/{businessId}/offer-mappings`.replace(`{${"businessId"}}`, encodeURIComponent(String(requestParameters['businessId']))),
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: GetOfferMappingsRequestToJSON(requestParameters['getOfferMappingsRequest']),
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => GetOfferMappingsResponseFromJSON(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getOfferMappings.md) %} Возвращает список товаров в каталоге, их категории на Маркете и характеристики каждого товара. Можно использовать тремя способами: * задать список интересующих SKU; * задать фильтр — в этом случае результаты возвращаются постранично; * не передавать тело запроса, чтобы получить список всех товаров в каталоге. Чтобы получить категорийные характеристики товаров, воспользуйтесь методом [POST v2/businesses/{businessId}/offer-cards](../../reference/content/getOfferCardsContentStatus.md). {% include notitle [limit](../../_auto/method_limits/getOfferMappings.md) %}
|
||||
* Информация о товарах в каталоге
|
||||
*/
|
||||
getOfferMappings(businessId, pageToken, limit, language, getOfferMappingsRequest, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.getOfferMappingsRaw({ businessId: businessId, pageToken: pageToken, limit: limit, language: language, getOfferMappingsRequest: getOfferMappingsRequest }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/updateOfferMappings.md) %} Добавляет товары в каталог и передает: * их [листовые категории](*list-categories) на Маркете и категорийные характеристики; * основные характеристики; * цены на товары в кабинете. Также объединяет товары на карточке, редактирует и удаляет информацию об уже добавленных товарах, в том числе цены в кабинете и категории товаров. Список категорий Маркета можно получить с помощью запроса [POST v2/categories/tree](../../reference/categories/getCategoriesTree.md), а характеристики товаров по категориям с помощью [POST v2/category/{categoryId}/parameters](../../reference/content/getCategoryContentParameters.md). {% cut \"Добавить новый товар\" %} Передайте его с новым идентификатором, который раньше никогда не использовался в каталоге. Обязательно укажите параметры: `offerId`, `name`, `marketCategoryId`, `pictures`, `vendor`, `description`. Старайтесь сразу передать как можно больше информации — она потребуется Маркету для подбора подходящей карточки или создания новой. Если известно, какой карточке на Маркете соответствует товар, можно сразу указать идентификатор этой карточки (SKU на Маркете) в поле `marketSKU`. **Для продавцов Market Yandex Go:** Когда вы добавляете товары в каталог, указывайте значения параметров `name` и `description` на русском языке. Чтобы на витрине они отображались и на другом языке, еще раз выполните запрос `POST v2/businesses/{businessId}/offer-mappings/update`, где укажите: * язык в параметре `language`; * значения параметров `name` и `description` на указанном языке. Повторно передавать остальные характеристики товара не нужно. {% endcut %} {% cut \"Изменить информацию о товаре\" %} Передайте новые данные, указав в `offerId` SKU товара в вашей системе. Поля, в которых ничего не меняется, можно не передавать. {% endcut %} {% cut \"Удалить переданные ранее параметры товара\" %} В `deleteParameters` укажите значения параметров, которые хотите удалить. Можно передать сразу несколько значений. Для параметров с типом `string` также можно передать пустое значение. {% endcut %} Параметр `offerId` (SKU товара в вашей системе) должен быть **уникальным** для всех товаров, которые вы передаете. {% note warning \"Правила использования SKU\" %} * У каждого товара SKU должен быть свой. * Уже заданный SKU нельзя освободить и использовать заново для другого товара. Каждый товар должен получать новый идентификатор, до того никогда не использовавшийся в вашем каталоге. SKU товара можно изменить в кабинете продавца на Маркете. О том, как это сделать, читайте [в Справке Маркета для продавцов](https://yandex.ru/support2/marketplace/ru/assortment/operations/edit-sku). {% endnote %} {% note info \"Данные в каталоге обновляются не мгновенно\" %} Это занимает до нескольких минут. {% endnote %} {% include notitle [limit](../../_auto/method_limits/updateOfferMappings.md) %}
|
||||
* Добавление товаров в каталог и изменение информации о них
|
||||
*/
|
||||
updateOfferMappingsRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['businessId'] == null) {
|
||||
throw new runtime.RequiredError('businessId', 'Required parameter "businessId" was null or undefined when calling updateOfferMappings().');
|
||||
}
|
||||
if (requestParameters['updateOfferMappingsRequest'] == null) {
|
||||
throw new runtime.RequiredError('updateOfferMappingsRequest', 'Required parameter "updateOfferMappingsRequest" was null or undefined when calling updateOfferMappings().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
if (requestParameters['language'] != null) {
|
||||
queryParameters['language'] = requestParameters['language'];
|
||||
}
|
||||
const headerParameters = {};
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v2/businesses/{businessId}/offer-mappings/update`.replace(`{${"businessId"}}`, encodeURIComponent(String(requestParameters['businessId']))),
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: UpdateOfferMappingsRequestToJSON(requestParameters['updateOfferMappingsRequest']),
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => UpdateOfferMappingsResponseFromJSON(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/updateOfferMappings.md) %} Добавляет товары в каталог и передает: * их [листовые категории](*list-categories) на Маркете и категорийные характеристики; * основные характеристики; * цены на товары в кабинете. Также объединяет товары на карточке, редактирует и удаляет информацию об уже добавленных товарах, в том числе цены в кабинете и категории товаров. Список категорий Маркета можно получить с помощью запроса [POST v2/categories/tree](../../reference/categories/getCategoriesTree.md), а характеристики товаров по категориям с помощью [POST v2/category/{categoryId}/parameters](../../reference/content/getCategoryContentParameters.md). {% cut \"Добавить новый товар\" %} Передайте его с новым идентификатором, который раньше никогда не использовался в каталоге. Обязательно укажите параметры: `offerId`, `name`, `marketCategoryId`, `pictures`, `vendor`, `description`. Старайтесь сразу передать как можно больше информации — она потребуется Маркету для подбора подходящей карточки или создания новой. Если известно, какой карточке на Маркете соответствует товар, можно сразу указать идентификатор этой карточки (SKU на Маркете) в поле `marketSKU`. **Для продавцов Market Yandex Go:** Когда вы добавляете товары в каталог, указывайте значения параметров `name` и `description` на русском языке. Чтобы на витрине они отображались и на другом языке, еще раз выполните запрос `POST v2/businesses/{businessId}/offer-mappings/update`, где укажите: * язык в параметре `language`; * значения параметров `name` и `description` на указанном языке. Повторно передавать остальные характеристики товара не нужно. {% endcut %} {% cut \"Изменить информацию о товаре\" %} Передайте новые данные, указав в `offerId` SKU товара в вашей системе. Поля, в которых ничего не меняется, можно не передавать. {% endcut %} {% cut \"Удалить переданные ранее параметры товара\" %} В `deleteParameters` укажите значения параметров, которые хотите удалить. Можно передать сразу несколько значений. Для параметров с типом `string` также можно передать пустое значение. {% endcut %} Параметр `offerId` (SKU товара в вашей системе) должен быть **уникальным** для всех товаров, которые вы передаете. {% note warning \"Правила использования SKU\" %} * У каждого товара SKU должен быть свой. * Уже заданный SKU нельзя освободить и использовать заново для другого товара. Каждый товар должен получать новый идентификатор, до того никогда не использовавшийся в вашем каталоге. SKU товара можно изменить в кабинете продавца на Маркете. О том, как это сделать, читайте [в Справке Маркета для продавцов](https://yandex.ru/support2/marketplace/ru/assortment/operations/edit-sku). {% endnote %} {% note info \"Данные в каталоге обновляются не мгновенно\" %} Это занимает до нескольких минут. {% endnote %} {% include notitle [limit](../../_auto/method_limits/updateOfferMappings.md) %}
|
||||
* Добавление товаров в каталог и изменение информации о них
|
||||
*/
|
||||
updateOfferMappings(businessId, updateOfferMappingsRequest, language, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.updateOfferMappingsRaw({ businessId: businessId, updateOfferMappingsRequest: updateOfferMappingsRequest, language: language }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
}
|
||||
31
dist/esm/apis/BusinessesApi.d.ts
vendored
Normal file
31
dist/esm/apis/BusinessesApi.d.ts
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
/**
|
||||
* API Яндекс Маркета для продавцов
|
||||
* API Яндекс Маркета помогает продавцам автоматизировать и упростить работу с маркетплейсом. В числе возможностей интеграции: * управление каталогом товаров и витриной, * обработка заказов, * изменение настроек магазина, * получение отчетов.
|
||||
*
|
||||
* The version of the OpenAPI document: LATEST
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
import * as runtime from '../runtime';
|
||||
import type { GetBusinessSettingsResponse } from '../models/index';
|
||||
export interface BusinessesApiGetBusinessSettingsRequest {
|
||||
businessId: number;
|
||||
}
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export declare class BusinessesApi extends runtime.BaseAPI {
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getBusinessSettings.md) %} Возвращает информацию о настройках кабинета, идентификатор которого указан в запросе. {% include notitle [limit](../../_auto/method_limits/getBusinessSettings.md) %}
|
||||
* Настройки кабинета
|
||||
*/
|
||||
getBusinessSettingsRaw(requestParameters: BusinessesApiGetBusinessSettingsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetBusinessSettingsResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getBusinessSettings.md) %} Возвращает информацию о настройках кабинета, идентификатор которого указан в запросе. {% include notitle [limit](../../_auto/method_limits/getBusinessSettings.md) %}
|
||||
* Настройки кабинета
|
||||
*/
|
||||
getBusinessSettings(businessId: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetBusinessSettingsResponse>;
|
||||
}
|
||||
66
dist/esm/apis/BusinessesApi.js
vendored
Normal file
66
dist/esm/apis/BusinessesApi.js
vendored
Normal file
@@ -0,0 +1,66 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* API Яндекс Маркета для продавцов
|
||||
* API Яндекс Маркета помогает продавцам автоматизировать и упростить работу с маркетплейсом. В числе возможностей интеграции: * управление каталогом товаров и витриной, * обработка заказов, * изменение настроек магазина, * получение отчетов.
|
||||
*
|
||||
* The version of the OpenAPI document: LATEST
|
||||
*
|
||||
*
|
||||
* 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());
|
||||
});
|
||||
};
|
||||
import * as runtime from '../runtime';
|
||||
import { GetBusinessSettingsResponseFromJSON, } from '../models/index';
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export class BusinessesApi extends runtime.BaseAPI {
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getBusinessSettings.md) %} Возвращает информацию о настройках кабинета, идентификатор которого указан в запросе. {% include notitle [limit](../../_auto/method_limits/getBusinessSettings.md) %}
|
||||
* Настройки кабинета
|
||||
*/
|
||||
getBusinessSettingsRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['businessId'] == null) {
|
||||
throw new runtime.RequiredError('businessId', 'Required parameter "businessId" was null or undefined when calling getBusinessSettings().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
const headerParameters = {};
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v2/businesses/{businessId}/settings`.replace(`{${"businessId"}}`, encodeURIComponent(String(requestParameters['businessId']))),
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => GetBusinessSettingsResponseFromJSON(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getBusinessSettings.md) %} Возвращает информацию о настройках кабинета, идентификатор которого указан в запросе. {% include notitle [limit](../../_auto/method_limits/getBusinessSettings.md) %}
|
||||
* Настройки кабинета
|
||||
*/
|
||||
getBusinessSettings(businessId, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.getBusinessSettingsRaw({ businessId: businessId }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
}
|
||||
60
dist/esm/apis/CampaignsApi.d.ts
vendored
Normal file
60
dist/esm/apis/CampaignsApi.d.ts
vendored
Normal file
@@ -0,0 +1,60 @@
|
||||
/**
|
||||
* API Яндекс Маркета для продавцов
|
||||
* API Яндекс Маркета помогает продавцам автоматизировать и упростить работу с маркетплейсом. В числе возможностей интеграции: * управление каталогом товаров и витриной, * обработка заказов, * изменение настроек магазина, * получение отчетов.
|
||||
*
|
||||
* The version of the OpenAPI document: LATEST
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
import * as runtime from '../runtime';
|
||||
import type { GetCampaignResponse, GetCampaignSettingsResponse, GetCampaignsResponse } from '../models/index';
|
||||
export interface CampaignsApiGetCampaignRequest {
|
||||
campaignId: number;
|
||||
}
|
||||
export interface CampaignsApiGetCampaignSettingsRequest {
|
||||
campaignId: number;
|
||||
}
|
||||
export interface CampaignsApiGetCampaignsRequest {
|
||||
pageToken?: string;
|
||||
limit?: number;
|
||||
page?: number;
|
||||
pageSize?: number;
|
||||
}
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export declare class CampaignsApi extends runtime.BaseAPI {
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getCampaign.md) %} Возвращает информацию о магазине. {% include notitle [limit](../../_auto/method_limits/getCampaign.md) %}
|
||||
* Информация о магазине
|
||||
*/
|
||||
getCampaignRaw(requestParameters: CampaignsApiGetCampaignRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetCampaignResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getCampaign.md) %} Возвращает информацию о магазине. {% include notitle [limit](../../_auto/method_limits/getCampaign.md) %}
|
||||
* Информация о магазине
|
||||
*/
|
||||
getCampaign(campaignId: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetCampaignResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getCampaignSettings.md) %} Возвращает информацию о настройках магазина, идентификатор которого указан в запросе. {% include notitle [limit](../../_auto/method_limits/getCampaignSettings.md) %}
|
||||
* Настройки магазина
|
||||
*/
|
||||
getCampaignSettingsRaw(requestParameters: CampaignsApiGetCampaignSettingsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetCampaignSettingsResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getCampaignSettings.md) %} Возвращает информацию о настройках магазина, идентификатор которого указан в запросе. {% include notitle [limit](../../_auto/method_limits/getCampaignSettings.md) %}
|
||||
* Настройки магазина
|
||||
*/
|
||||
getCampaignSettings(campaignId: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetCampaignSettingsResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getCampaigns.md) %} **Для Api-Key-токена:** возвращает список магазинов в кабинете, для которого выдан токен. Нельзя получить список только подагентских магазинов. **Для OAuth-токена:** возвращает список магазинов, к которым имеет доступ пользователь — владелец токена авторизации, использованного в запросе. Для агентских пользователей список состоит из подагентских магазинов. {% note warning \"Ограничение для параметра `pageSize`\" %} Не передавайте значение больше 100. {% endnote %} {% include notitle [limit](../../_auto/method_limits/getCampaigns.md) %}
|
||||
* Список магазинов пользователя
|
||||
*/
|
||||
getCampaignsRaw(requestParameters: CampaignsApiGetCampaignsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetCampaignsResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getCampaigns.md) %} **Для Api-Key-токена:** возвращает список магазинов в кабинете, для которого выдан токен. Нельзя получить список только подагентских магазинов. **Для OAuth-токена:** возвращает список магазинов, к которым имеет доступ пользователь — владелец токена авторизации, использованного в запросе. Для агентских пользователей список состоит из подагентских магазинов. {% note warning \"Ограничение для параметра `pageSize`\" %} Не передавайте значение больше 100. {% endnote %} {% include notitle [limit](../../_auto/method_limits/getCampaigns.md) %}
|
||||
* Список магазинов пользователя
|
||||
*/
|
||||
getCampaigns(pageToken?: string, limit?: number, page?: number, pageSize?: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetCampaignsResponse>;
|
||||
}
|
||||
149
dist/esm/apis/CampaignsApi.js
vendored
Normal file
149
dist/esm/apis/CampaignsApi.js
vendored
Normal file
@@ -0,0 +1,149 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* API Яндекс Маркета для продавцов
|
||||
* API Яндекс Маркета помогает продавцам автоматизировать и упростить работу с маркетплейсом. В числе возможностей интеграции: * управление каталогом товаров и витриной, * обработка заказов, * изменение настроек магазина, * получение отчетов.
|
||||
*
|
||||
* The version of the OpenAPI document: LATEST
|
||||
*
|
||||
*
|
||||
* 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());
|
||||
});
|
||||
};
|
||||
import * as runtime from '../runtime';
|
||||
import { GetCampaignResponseFromJSON, GetCampaignSettingsResponseFromJSON, GetCampaignsResponseFromJSON, } from '../models/index';
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export class CampaignsApi extends runtime.BaseAPI {
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getCampaign.md) %} Возвращает информацию о магазине. {% include notitle [limit](../../_auto/method_limits/getCampaign.md) %}
|
||||
* Информация о магазине
|
||||
*/
|
||||
getCampaignRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['campaignId'] == null) {
|
||||
throw new runtime.RequiredError('campaignId', 'Required parameter "campaignId" was null or undefined when calling getCampaign().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
const headerParameters = {};
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v2/campaigns/{campaignId}`.replace(`{${"campaignId"}}`, encodeURIComponent(String(requestParameters['campaignId']))),
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => GetCampaignResponseFromJSON(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getCampaign.md) %} Возвращает информацию о магазине. {% include notitle [limit](../../_auto/method_limits/getCampaign.md) %}
|
||||
* Информация о магазине
|
||||
*/
|
||||
getCampaign(campaignId, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.getCampaignRaw({ campaignId: campaignId }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getCampaignSettings.md) %} Возвращает информацию о настройках магазина, идентификатор которого указан в запросе. {% include notitle [limit](../../_auto/method_limits/getCampaignSettings.md) %}
|
||||
* Настройки магазина
|
||||
*/
|
||||
getCampaignSettingsRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['campaignId'] == null) {
|
||||
throw new runtime.RequiredError('campaignId', 'Required parameter "campaignId" was null or undefined when calling getCampaignSettings().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
const headerParameters = {};
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v2/campaigns/{campaignId}/settings`.replace(`{${"campaignId"}}`, encodeURIComponent(String(requestParameters['campaignId']))),
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => GetCampaignSettingsResponseFromJSON(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getCampaignSettings.md) %} Возвращает информацию о настройках магазина, идентификатор которого указан в запросе. {% include notitle [limit](../../_auto/method_limits/getCampaignSettings.md) %}
|
||||
* Настройки магазина
|
||||
*/
|
||||
getCampaignSettings(campaignId, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.getCampaignSettingsRaw({ campaignId: campaignId }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getCampaigns.md) %} **Для Api-Key-токена:** возвращает список магазинов в кабинете, для которого выдан токен. Нельзя получить список только подагентских магазинов. **Для OAuth-токена:** возвращает список магазинов, к которым имеет доступ пользователь — владелец токена авторизации, использованного в запросе. Для агентских пользователей список состоит из подагентских магазинов. {% note warning \"Ограничение для параметра `pageSize`\" %} Не передавайте значение больше 100. {% endnote %} {% include notitle [limit](../../_auto/method_limits/getCampaigns.md) %}
|
||||
* Список магазинов пользователя
|
||||
*/
|
||||
getCampaignsRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const queryParameters = {};
|
||||
if (requestParameters['pageToken'] != null) {
|
||||
queryParameters['pageToken'] = requestParameters['pageToken'];
|
||||
}
|
||||
if (requestParameters['limit'] != null) {
|
||||
queryParameters['limit'] = requestParameters['limit'];
|
||||
}
|
||||
if (requestParameters['page'] != null) {
|
||||
queryParameters['page'] = requestParameters['page'];
|
||||
}
|
||||
if (requestParameters['pageSize'] != null) {
|
||||
queryParameters['pageSize'] = requestParameters['pageSize'];
|
||||
}
|
||||
const headerParameters = {};
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v2/campaigns`,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => GetCampaignsResponseFromJSON(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getCampaigns.md) %} **Для Api-Key-токена:** возвращает список магазинов в кабинете, для которого выдан токен. Нельзя получить список только подагентских магазинов. **Для OAuth-токена:** возвращает список магазинов, к которым имеет доступ пользователь — владелец токена авторизации, использованного в запросе. Для агентских пользователей список состоит из подагентских магазинов. {% note warning \"Ограничение для параметра `pageSize`\" %} Не передавайте значение больше 100. {% endnote %} {% include notitle [limit](../../_auto/method_limits/getCampaigns.md) %}
|
||||
* Список магазинов пользователя
|
||||
*/
|
||||
getCampaigns(pageToken, limit, page, pageSize, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.getCampaignsRaw({ pageToken: pageToken, limit: limit, page: page, pageSize: pageSize }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
}
|
||||
46
dist/esm/apis/CategoriesApi.d.ts
vendored
Normal file
46
dist/esm/apis/CategoriesApi.d.ts
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
/**
|
||||
* API Яндекс Маркета для продавцов
|
||||
* API Яндекс Маркета помогает продавцам автоматизировать и упростить работу с маркетплейсом. В числе возможностей интеграции: * управление каталогом товаров и витриной, * обработка заказов, * изменение настроек магазина, * получение отчетов.
|
||||
*
|
||||
* The version of the OpenAPI document: LATEST
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
import * as runtime from '../runtime';
|
||||
import type { GetCategoriesMaxSaleQuantumRequest, GetCategoriesMaxSaleQuantumResponse, GetCategoriesRequest, GetCategoriesResponse } from '../models/index';
|
||||
export interface CategoriesApiGetCategoriesMaxSaleQuantumOperationRequest {
|
||||
getCategoriesMaxSaleQuantumRequest: GetCategoriesMaxSaleQuantumRequest;
|
||||
}
|
||||
export interface CategoriesApiGetCategoriesTreeRequest {
|
||||
getCategoriesRequest?: GetCategoriesRequest;
|
||||
}
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export declare class CategoriesApi extends runtime.BaseAPI {
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getCategoriesMaxSaleQuantum.md) %} Возвращает лимит на установку [кванта](*quantum) и минимального количества товаров в заказе, которые вы можете задать для товаров указанных категорий. Если вы передадите значение кванта или минимального количества товаров выше установленного Маркетом ограничения, товар будет скрыт с витрины. Подробнее о том, как продавать товары по несколько штук, читайте [в Справке Маркета для продавцов](https://yandex.ru/support2/marketplace/ru/assortment/fields/quantum). {% include notitle [limit](../../_auto/method_limits/getCategoriesMaxSaleQuantum.md) %}
|
||||
* Лимит на установку кванта продажи и минимального количества товаров в заказе
|
||||
* @deprecated
|
||||
*/
|
||||
getCategoriesMaxSaleQuantumRaw(requestParameters: CategoriesApiGetCategoriesMaxSaleQuantumOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetCategoriesMaxSaleQuantumResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getCategoriesMaxSaleQuantum.md) %} Возвращает лимит на установку [кванта](*quantum) и минимального количества товаров в заказе, которые вы можете задать для товаров указанных категорий. Если вы передадите значение кванта или минимального количества товаров выше установленного Маркетом ограничения, товар будет скрыт с витрины. Подробнее о том, как продавать товары по несколько штук, читайте [в Справке Маркета для продавцов](https://yandex.ru/support2/marketplace/ru/assortment/fields/quantum). {% include notitle [limit](../../_auto/method_limits/getCategoriesMaxSaleQuantum.md) %}
|
||||
* Лимит на установку кванта продажи и минимального количества товаров в заказе
|
||||
* @deprecated
|
||||
*/
|
||||
getCategoriesMaxSaleQuantum(getCategoriesMaxSaleQuantumRequest: GetCategoriesMaxSaleQuantumRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetCategoriesMaxSaleQuantumResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getCategoriesTree.md) %} Возвращает дерево категорий Маркета. {% include notitle [limit](../../_auto/method_limits/getCategoriesTree.md) %}
|
||||
* Дерево категорий
|
||||
*/
|
||||
getCategoriesTreeRaw(requestParameters: CategoriesApiGetCategoriesTreeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetCategoriesResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getCategoriesTree.md) %} Возвращает дерево категорий Маркета. {% include notitle [limit](../../_auto/method_limits/getCategoriesTree.md) %}
|
||||
* Дерево категорий
|
||||
*/
|
||||
getCategoriesTree(getCategoriesRequest?: GetCategoriesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetCategoriesResponse>;
|
||||
}
|
||||
106
dist/esm/apis/CategoriesApi.js
vendored
Normal file
106
dist/esm/apis/CategoriesApi.js
vendored
Normal file
@@ -0,0 +1,106 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* API Яндекс Маркета для продавцов
|
||||
* API Яндекс Маркета помогает продавцам автоматизировать и упростить работу с маркетплейсом. В числе возможностей интеграции: * управление каталогом товаров и витриной, * обработка заказов, * изменение настроек магазина, * получение отчетов.
|
||||
*
|
||||
* The version of the OpenAPI document: LATEST
|
||||
*
|
||||
*
|
||||
* 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());
|
||||
});
|
||||
};
|
||||
import * as runtime from '../runtime';
|
||||
import { GetCategoriesMaxSaleQuantumRequestToJSON, GetCategoriesMaxSaleQuantumResponseFromJSON, GetCategoriesRequestToJSON, GetCategoriesResponseFromJSON, } from '../models/index';
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export class CategoriesApi extends runtime.BaseAPI {
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getCategoriesMaxSaleQuantum.md) %} Возвращает лимит на установку [кванта](*quantum) и минимального количества товаров в заказе, которые вы можете задать для товаров указанных категорий. Если вы передадите значение кванта или минимального количества товаров выше установленного Маркетом ограничения, товар будет скрыт с витрины. Подробнее о том, как продавать товары по несколько штук, читайте [в Справке Маркета для продавцов](https://yandex.ru/support2/marketplace/ru/assortment/fields/quantum). {% include notitle [limit](../../_auto/method_limits/getCategoriesMaxSaleQuantum.md) %}
|
||||
* Лимит на установку кванта продажи и минимального количества товаров в заказе
|
||||
* @deprecated
|
||||
*/
|
||||
getCategoriesMaxSaleQuantumRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['getCategoriesMaxSaleQuantumRequest'] == null) {
|
||||
throw new runtime.RequiredError('getCategoriesMaxSaleQuantumRequest', 'Required parameter "getCategoriesMaxSaleQuantumRequest" was null or undefined when calling getCategoriesMaxSaleQuantum().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
const headerParameters = {};
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v2/categories/max-sale-quantum`,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: GetCategoriesMaxSaleQuantumRequestToJSON(requestParameters['getCategoriesMaxSaleQuantumRequest']),
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => GetCategoriesMaxSaleQuantumResponseFromJSON(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getCategoriesMaxSaleQuantum.md) %} Возвращает лимит на установку [кванта](*quantum) и минимального количества товаров в заказе, которые вы можете задать для товаров указанных категорий. Если вы передадите значение кванта или минимального количества товаров выше установленного Маркетом ограничения, товар будет скрыт с витрины. Подробнее о том, как продавать товары по несколько штук, читайте [в Справке Маркета для продавцов](https://yandex.ru/support2/marketplace/ru/assortment/fields/quantum). {% include notitle [limit](../../_auto/method_limits/getCategoriesMaxSaleQuantum.md) %}
|
||||
* Лимит на установку кванта продажи и минимального количества товаров в заказе
|
||||
* @deprecated
|
||||
*/
|
||||
getCategoriesMaxSaleQuantum(getCategoriesMaxSaleQuantumRequest, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.getCategoriesMaxSaleQuantumRaw({ getCategoriesMaxSaleQuantumRequest: getCategoriesMaxSaleQuantumRequest }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getCategoriesTree.md) %} Возвращает дерево категорий Маркета. {% include notitle [limit](../../_auto/method_limits/getCategoriesTree.md) %}
|
||||
* Дерево категорий
|
||||
*/
|
||||
getCategoriesTreeRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const queryParameters = {};
|
||||
const headerParameters = {};
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v2/categories/tree`,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: GetCategoriesRequestToJSON(requestParameters['getCategoriesRequest']),
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => GetCategoriesResponseFromJSON(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getCategoriesTree.md) %} Возвращает дерево категорий Маркета. {% include notitle [limit](../../_auto/method_limits/getCategoriesTree.md) %}
|
||||
* Дерево категорий
|
||||
*/
|
||||
getCategoriesTree(getCategoriesRequest, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.getCategoriesTreeRaw({ getCategoriesRequest: getCategoriesRequest }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
}
|
||||
124
dist/esm/apis/ChatsApi.d.ts
vendored
Normal file
124
dist/esm/apis/ChatsApi.d.ts
vendored
Normal file
@@ -0,0 +1,124 @@
|
||||
/**
|
||||
* API Яндекс Маркета для продавцов
|
||||
* API Яндекс Маркета помогает продавцам автоматизировать и упростить работу с маркетплейсом. В числе возможностей интеграции: * управление каталогом товаров и витриной, * обработка заказов, * изменение настроек магазина, * получение отчетов.
|
||||
*
|
||||
* The version of the OpenAPI document: LATEST
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
import * as runtime from '../runtime';
|
||||
import type { CreateChatRequest, CreateChatResponse, EmptyApiResponse, GetChatHistoryRequest, GetChatHistoryResponse, GetChatMessageResponse, GetChatResponse, GetChatsRequest, GetChatsResponse, SendMessageToChatRequest } from '../models/index';
|
||||
export interface ChatsApiCreateChatOperationRequest {
|
||||
businessId: number;
|
||||
createChatRequest: CreateChatRequest;
|
||||
}
|
||||
export interface ChatsApiGetChatRequest {
|
||||
businessId: number;
|
||||
chatId: number;
|
||||
}
|
||||
export interface ChatsApiGetChatHistoryOperationRequest {
|
||||
businessId: number;
|
||||
chatId: number;
|
||||
getChatHistoryRequest: GetChatHistoryRequest;
|
||||
pageToken?: string;
|
||||
limit?: number;
|
||||
}
|
||||
export interface ChatsApiGetChatMessageRequest {
|
||||
businessId: number;
|
||||
chatId: number;
|
||||
messageId: number;
|
||||
}
|
||||
export interface ChatsApiGetChatsOperationRequest {
|
||||
businessId: number;
|
||||
getChatsRequest: GetChatsRequest;
|
||||
pageToken?: string;
|
||||
limit?: number;
|
||||
}
|
||||
export interface ChatsApiSendFileToChatRequest {
|
||||
businessId: number;
|
||||
chatId: number;
|
||||
file: Blob;
|
||||
}
|
||||
export interface ChatsApiSendMessageToChatOperationRequest {
|
||||
businessId: number;
|
||||
chatId: number;
|
||||
sendMessageToChatRequest: SendMessageToChatRequest;
|
||||
}
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export declare class ChatsApi extends runtime.BaseAPI {
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/createChat.md) %} Создает новый чат с покупателем и возвращает информацию о нем или созданном ранее. Типы чатов, которые может начать продавец: * по заказам; * по возвратам (доступны только для FBY-, FBS- и Экспресс-магазинов). {% include notitle [limit](../../_auto/method_limits/createChat.md) %}
|
||||
* Создание нового чата с покупателем
|
||||
*/
|
||||
createChatRaw(requestParameters: ChatsApiCreateChatOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CreateChatResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/createChat.md) %} Создает новый чат с покупателем и возвращает информацию о нем или созданном ранее. Типы чатов, которые может начать продавец: * по заказам; * по возвратам (доступны только для FBY-, FBS- и Экспресс-магазинов). {% include notitle [limit](../../_auto/method_limits/createChat.md) %}
|
||||
* Создание нового чата с покупателем
|
||||
*/
|
||||
createChat(businessId: number, createChatRequest: CreateChatRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CreateChatResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getChat.md) %} Возвращает чат по его идентификатору. {% note tip \"Подключите API-уведомления\" %} Маркет отправит вам запрос [POST notification](../../push-notifications/reference/sendNotification.md), когда появится новый чат или сообщение. [{#T}](../../push-notifications/index.md) {% endnote %} {% include notitle [limit](../../_auto/method_limits/getChat.md) %}
|
||||
* Получение чата по идентификатору
|
||||
*/
|
||||
getChatRaw(requestParameters: ChatsApiGetChatRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetChatResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getChat.md) %} Возвращает чат по его идентификатору. {% note tip \"Подключите API-уведомления\" %} Маркет отправит вам запрос [POST notification](../../push-notifications/reference/sendNotification.md), когда появится новый чат или сообщение. [{#T}](../../push-notifications/index.md) {% endnote %} {% include notitle [limit](../../_auto/method_limits/getChat.md) %}
|
||||
* Получение чата по идентификатору
|
||||
*/
|
||||
getChat(businessId: number, chatId: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetChatResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getChatHistory.md) %} Возвращает историю сообщений в чате с покупателем. {% include notitle [limit](../../_auto/method_limits/getChatHistory.md) %}
|
||||
* Получение истории сообщений в чате
|
||||
*/
|
||||
getChatHistoryRaw(requestParameters: ChatsApiGetChatHistoryOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetChatHistoryResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getChatHistory.md) %} Возвращает историю сообщений в чате с покупателем. {% include notitle [limit](../../_auto/method_limits/getChatHistory.md) %}
|
||||
* Получение истории сообщений в чате
|
||||
*/
|
||||
getChatHistory(businessId: number, chatId: number, getChatHistoryRequest: GetChatHistoryRequest, pageToken?: string, limit?: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetChatHistoryResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getChatMessage.md) %} Возвращает сообщение по его идентификатору. {% note tip \"Подключите API-уведомления\" %} Маркет отправит вам запрос [POST notification](../../push-notifications/reference/sendNotification.md), когда появится новый чат или сообщение. [{#T}](../../push-notifications/index.md) {% endnote %} {% include notitle [limit](../../_auto/method_limits/getChatMessage.md) %}
|
||||
* Получение сообщения в чате
|
||||
*/
|
||||
getChatMessageRaw(requestParameters: ChatsApiGetChatMessageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetChatMessageResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getChatMessage.md) %} Возвращает сообщение по его идентификатору. {% note tip \"Подключите API-уведомления\" %} Маркет отправит вам запрос [POST notification](../../push-notifications/reference/sendNotification.md), когда появится новый чат или сообщение. [{#T}](../../push-notifications/index.md) {% endnote %} {% include notitle [limit](../../_auto/method_limits/getChatMessage.md) %}
|
||||
* Получение сообщения в чате
|
||||
*/
|
||||
getChatMessage(businessId: number, chatId: number, messageId: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetChatMessageResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getChats.md) %} Возвращает чаты с покупателями. {% note tip \"Подключите API-уведомления\" %} Маркет отправит вам запрос [POST notification](../../push-notifications/reference/sendNotification.md), когда появится новый чат или сообщение. [{#T}](../../push-notifications/index.md) {% endnote %} {% include notitle [limit](../../_auto/method_limits/getChats.md) %}
|
||||
* Получение доступных чатов
|
||||
*/
|
||||
getChatsRaw(requestParameters: ChatsApiGetChatsOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetChatsResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getChats.md) %} Возвращает чаты с покупателями. {% note tip \"Подключите API-уведомления\" %} Маркет отправит вам запрос [POST notification](../../push-notifications/reference/sendNotification.md), когда появится новый чат или сообщение. [{#T}](../../push-notifications/index.md) {% endnote %} {% include notitle [limit](../../_auto/method_limits/getChats.md) %}
|
||||
* Получение доступных чатов
|
||||
*/
|
||||
getChats(businessId: number, getChatsRequest: GetChatsRequest, pageToken?: string, limit?: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetChatsResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/sendFileToChat.md) %} Отправляет файл в чат с покупателем. {% include notitle [limit](../../_auto/method_limits/sendFileToChat.md) %}
|
||||
* Отправка файла в чат
|
||||
*/
|
||||
sendFileToChatRaw(requestParameters: ChatsApiSendFileToChatRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<EmptyApiResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/sendFileToChat.md) %} Отправляет файл в чат с покупателем. {% include notitle [limit](../../_auto/method_limits/sendFileToChat.md) %}
|
||||
* Отправка файла в чат
|
||||
*/
|
||||
sendFileToChat(businessId: number, chatId: number, file: Blob, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<EmptyApiResponse>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/sendMessageToChat.md) %} Отправляет сообщение в чат с покупателем. {% include notitle [limit](../../_auto/method_limits/sendMessageToChat.md) %}
|
||||
* Отправка сообщения в чат
|
||||
*/
|
||||
sendMessageToChatRaw(requestParameters: ChatsApiSendMessageToChatOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<EmptyApiResponse>>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/sendMessageToChat.md) %} Отправляет сообщение в чат с покупателем. {% include notitle [limit](../../_auto/method_limits/sendMessageToChat.md) %}
|
||||
* Отправка сообщения в чат
|
||||
*/
|
||||
sendMessageToChat(businessId: number, chatId: number, sendMessageToChatRequest: SendMessageToChatRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<EmptyApiResponse>;
|
||||
}
|
||||
378
dist/esm/apis/ChatsApi.js
vendored
Normal file
378
dist/esm/apis/ChatsApi.js
vendored
Normal file
@@ -0,0 +1,378 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* API Яндекс Маркета для продавцов
|
||||
* API Яндекс Маркета помогает продавцам автоматизировать и упростить работу с маркетплейсом. В числе возможностей интеграции: * управление каталогом товаров и витриной, * обработка заказов, * изменение настроек магазина, * получение отчетов.
|
||||
*
|
||||
* The version of the OpenAPI document: LATEST
|
||||
*
|
||||
*
|
||||
* 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());
|
||||
});
|
||||
};
|
||||
import * as runtime from '../runtime';
|
||||
import { CreateChatRequestToJSON, CreateChatResponseFromJSON, EmptyApiResponseFromJSON, GetChatHistoryRequestToJSON, GetChatHistoryResponseFromJSON, GetChatMessageResponseFromJSON, GetChatResponseFromJSON, GetChatsRequestToJSON, GetChatsResponseFromJSON, SendMessageToChatRequestToJSON, } from '../models/index';
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export class ChatsApi extends runtime.BaseAPI {
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/createChat.md) %} Создает новый чат с покупателем и возвращает информацию о нем или созданном ранее. Типы чатов, которые может начать продавец: * по заказам; * по возвратам (доступны только для FBY-, FBS- и Экспресс-магазинов). {% include notitle [limit](../../_auto/method_limits/createChat.md) %}
|
||||
* Создание нового чата с покупателем
|
||||
*/
|
||||
createChatRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['businessId'] == null) {
|
||||
throw new runtime.RequiredError('businessId', 'Required parameter "businessId" was null or undefined when calling createChat().');
|
||||
}
|
||||
if (requestParameters['createChatRequest'] == null) {
|
||||
throw new runtime.RequiredError('createChatRequest', 'Required parameter "createChatRequest" was null or undefined when calling createChat().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
const headerParameters = {};
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v2/businesses/{businessId}/chats/new`.replace(`{${"businessId"}}`, encodeURIComponent(String(requestParameters['businessId']))),
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: CreateChatRequestToJSON(requestParameters['createChatRequest']),
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => CreateChatResponseFromJSON(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/createChat.md) %} Создает новый чат с покупателем и возвращает информацию о нем или созданном ранее. Типы чатов, которые может начать продавец: * по заказам; * по возвратам (доступны только для FBY-, FBS- и Экспресс-магазинов). {% include notitle [limit](../../_auto/method_limits/createChat.md) %}
|
||||
* Создание нового чата с покупателем
|
||||
*/
|
||||
createChat(businessId, createChatRequest, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.createChatRaw({ businessId: businessId, createChatRequest: createChatRequest }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getChat.md) %} Возвращает чат по его идентификатору. {% note tip \"Подключите API-уведомления\" %} Маркет отправит вам запрос [POST notification](../../push-notifications/reference/sendNotification.md), когда появится новый чат или сообщение. [{#T}](../../push-notifications/index.md) {% endnote %} {% include notitle [limit](../../_auto/method_limits/getChat.md) %}
|
||||
* Получение чата по идентификатору
|
||||
*/
|
||||
getChatRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['businessId'] == null) {
|
||||
throw new runtime.RequiredError('businessId', 'Required parameter "businessId" was null or undefined when calling getChat().');
|
||||
}
|
||||
if (requestParameters['chatId'] == null) {
|
||||
throw new runtime.RequiredError('chatId', 'Required parameter "chatId" was null or undefined when calling getChat().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
if (requestParameters['chatId'] != null) {
|
||||
queryParameters['chatId'] = requestParameters['chatId'];
|
||||
}
|
||||
const headerParameters = {};
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v2/businesses/{businessId}/chat`.replace(`{${"businessId"}}`, encodeURIComponent(String(requestParameters['businessId']))),
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => GetChatResponseFromJSON(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getChat.md) %} Возвращает чат по его идентификатору. {% note tip \"Подключите API-уведомления\" %} Маркет отправит вам запрос [POST notification](../../push-notifications/reference/sendNotification.md), когда появится новый чат или сообщение. [{#T}](../../push-notifications/index.md) {% endnote %} {% include notitle [limit](../../_auto/method_limits/getChat.md) %}
|
||||
* Получение чата по идентификатору
|
||||
*/
|
||||
getChat(businessId, chatId, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.getChatRaw({ businessId: businessId, chatId: chatId }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getChatHistory.md) %} Возвращает историю сообщений в чате с покупателем. {% include notitle [limit](../../_auto/method_limits/getChatHistory.md) %}
|
||||
* Получение истории сообщений в чате
|
||||
*/
|
||||
getChatHistoryRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['businessId'] == null) {
|
||||
throw new runtime.RequiredError('businessId', 'Required parameter "businessId" was null or undefined when calling getChatHistory().');
|
||||
}
|
||||
if (requestParameters['chatId'] == null) {
|
||||
throw new runtime.RequiredError('chatId', 'Required parameter "chatId" was null or undefined when calling getChatHistory().');
|
||||
}
|
||||
if (requestParameters['getChatHistoryRequest'] == null) {
|
||||
throw new runtime.RequiredError('getChatHistoryRequest', 'Required parameter "getChatHistoryRequest" was null or undefined when calling getChatHistory().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
if (requestParameters['chatId'] != null) {
|
||||
queryParameters['chatId'] = requestParameters['chatId'];
|
||||
}
|
||||
if (requestParameters['pageToken'] != null) {
|
||||
queryParameters['pageToken'] = requestParameters['pageToken'];
|
||||
}
|
||||
if (requestParameters['limit'] != null) {
|
||||
queryParameters['limit'] = requestParameters['limit'];
|
||||
}
|
||||
const headerParameters = {};
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v2/businesses/{businessId}/chats/history`.replace(`{${"businessId"}}`, encodeURIComponent(String(requestParameters['businessId']))),
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: GetChatHistoryRequestToJSON(requestParameters['getChatHistoryRequest']),
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => GetChatHistoryResponseFromJSON(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getChatHistory.md) %} Возвращает историю сообщений в чате с покупателем. {% include notitle [limit](../../_auto/method_limits/getChatHistory.md) %}
|
||||
* Получение истории сообщений в чате
|
||||
*/
|
||||
getChatHistory(businessId, chatId, getChatHistoryRequest, pageToken, limit, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.getChatHistoryRaw({ businessId: businessId, chatId: chatId, getChatHistoryRequest: getChatHistoryRequest, pageToken: pageToken, limit: limit }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getChatMessage.md) %} Возвращает сообщение по его идентификатору. {% note tip \"Подключите API-уведомления\" %} Маркет отправит вам запрос [POST notification](../../push-notifications/reference/sendNotification.md), когда появится новый чат или сообщение. [{#T}](../../push-notifications/index.md) {% endnote %} {% include notitle [limit](../../_auto/method_limits/getChatMessage.md) %}
|
||||
* Получение сообщения в чате
|
||||
*/
|
||||
getChatMessageRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['businessId'] == null) {
|
||||
throw new runtime.RequiredError('businessId', 'Required parameter "businessId" was null or undefined when calling getChatMessage().');
|
||||
}
|
||||
if (requestParameters['chatId'] == null) {
|
||||
throw new runtime.RequiredError('chatId', 'Required parameter "chatId" was null or undefined when calling getChatMessage().');
|
||||
}
|
||||
if (requestParameters['messageId'] == null) {
|
||||
throw new runtime.RequiredError('messageId', 'Required parameter "messageId" was null or undefined when calling getChatMessage().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
if (requestParameters['chatId'] != null) {
|
||||
queryParameters['chatId'] = requestParameters['chatId'];
|
||||
}
|
||||
if (requestParameters['messageId'] != null) {
|
||||
queryParameters['messageId'] = requestParameters['messageId'];
|
||||
}
|
||||
const headerParameters = {};
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v2/businesses/{businessId}/chats/message`.replace(`{${"businessId"}}`, encodeURIComponent(String(requestParameters['businessId']))),
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => GetChatMessageResponseFromJSON(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getChatMessage.md) %} Возвращает сообщение по его идентификатору. {% note tip \"Подключите API-уведомления\" %} Маркет отправит вам запрос [POST notification](../../push-notifications/reference/sendNotification.md), когда появится новый чат или сообщение. [{#T}](../../push-notifications/index.md) {% endnote %} {% include notitle [limit](../../_auto/method_limits/getChatMessage.md) %}
|
||||
* Получение сообщения в чате
|
||||
*/
|
||||
getChatMessage(businessId, chatId, messageId, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.getChatMessageRaw({ businessId: businessId, chatId: chatId, messageId: messageId }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getChats.md) %} Возвращает чаты с покупателями. {% note tip \"Подключите API-уведомления\" %} Маркет отправит вам запрос [POST notification](../../push-notifications/reference/sendNotification.md), когда появится новый чат или сообщение. [{#T}](../../push-notifications/index.md) {% endnote %} {% include notitle [limit](../../_auto/method_limits/getChats.md) %}
|
||||
* Получение доступных чатов
|
||||
*/
|
||||
getChatsRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['businessId'] == null) {
|
||||
throw new runtime.RequiredError('businessId', 'Required parameter "businessId" was null or undefined when calling getChats().');
|
||||
}
|
||||
if (requestParameters['getChatsRequest'] == null) {
|
||||
throw new runtime.RequiredError('getChatsRequest', 'Required parameter "getChatsRequest" was null or undefined when calling getChats().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
if (requestParameters['pageToken'] != null) {
|
||||
queryParameters['pageToken'] = requestParameters['pageToken'];
|
||||
}
|
||||
if (requestParameters['limit'] != null) {
|
||||
queryParameters['limit'] = requestParameters['limit'];
|
||||
}
|
||||
const headerParameters = {};
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v2/businesses/{businessId}/chats`.replace(`{${"businessId"}}`, encodeURIComponent(String(requestParameters['businessId']))),
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: GetChatsRequestToJSON(requestParameters['getChatsRequest']),
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => GetChatsResponseFromJSON(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getChats.md) %} Возвращает чаты с покупателями. {% note tip \"Подключите API-уведомления\" %} Маркет отправит вам запрос [POST notification](../../push-notifications/reference/sendNotification.md), когда появится новый чат или сообщение. [{#T}](../../push-notifications/index.md) {% endnote %} {% include notitle [limit](../../_auto/method_limits/getChats.md) %}
|
||||
* Получение доступных чатов
|
||||
*/
|
||||
getChats(businessId, getChatsRequest, pageToken, limit, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.getChatsRaw({ businessId: businessId, getChatsRequest: getChatsRequest, pageToken: pageToken, limit: limit }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/sendFileToChat.md) %} Отправляет файл в чат с покупателем. {% include notitle [limit](../../_auto/method_limits/sendFileToChat.md) %}
|
||||
* Отправка файла в чат
|
||||
*/
|
||||
sendFileToChatRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['businessId'] == null) {
|
||||
throw new runtime.RequiredError('businessId', 'Required parameter "businessId" was null or undefined when calling sendFileToChat().');
|
||||
}
|
||||
if (requestParameters['chatId'] == null) {
|
||||
throw new runtime.RequiredError('chatId', 'Required parameter "chatId" was null or undefined when calling sendFileToChat().');
|
||||
}
|
||||
if (requestParameters['file'] == null) {
|
||||
throw new runtime.RequiredError('file', 'Required parameter "file" was null or undefined when calling sendFileToChat().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
if (requestParameters['chatId'] != null) {
|
||||
queryParameters['chatId'] = requestParameters['chatId'];
|
||||
}
|
||||
const headerParameters = {};
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const consumes = [
|
||||
{ contentType: 'multipart/form-data' },
|
||||
];
|
||||
// @ts-ignore: canConsumeForm may be unused
|
||||
const canConsumeForm = runtime.canConsumeForm(consumes);
|
||||
let formParams;
|
||||
let useForm = false;
|
||||
// use FormData to transmit files using content-type "multipart/form-data"
|
||||
useForm = canConsumeForm;
|
||||
if (useForm) {
|
||||
formParams = new FormData();
|
||||
}
|
||||
else {
|
||||
formParams = new URLSearchParams();
|
||||
}
|
||||
if (requestParameters['file'] != null) {
|
||||
formParams.append('file', requestParameters['file']);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v2/businesses/{businessId}/chats/file/send`.replace(`{${"businessId"}}`, encodeURIComponent(String(requestParameters['businessId']))),
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: formParams,
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => EmptyApiResponseFromJSON(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/sendFileToChat.md) %} Отправляет файл в чат с покупателем. {% include notitle [limit](../../_auto/method_limits/sendFileToChat.md) %}
|
||||
* Отправка файла в чат
|
||||
*/
|
||||
sendFileToChat(businessId, chatId, file, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.sendFileToChatRaw({ businessId: businessId, chatId: chatId, file: file }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/sendMessageToChat.md) %} Отправляет сообщение в чат с покупателем. {% include notitle [limit](../../_auto/method_limits/sendMessageToChat.md) %}
|
||||
* Отправка сообщения в чат
|
||||
*/
|
||||
sendMessageToChatRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['businessId'] == null) {
|
||||
throw new runtime.RequiredError('businessId', 'Required parameter "businessId" was null or undefined when calling sendMessageToChat().');
|
||||
}
|
||||
if (requestParameters['chatId'] == null) {
|
||||
throw new runtime.RequiredError('chatId', 'Required parameter "chatId" was null or undefined when calling sendMessageToChat().');
|
||||
}
|
||||
if (requestParameters['sendMessageToChatRequest'] == null) {
|
||||
throw new runtime.RequiredError('sendMessageToChatRequest', 'Required parameter "sendMessageToChatRequest" was null or undefined when calling sendMessageToChat().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
if (requestParameters['chatId'] != null) {
|
||||
queryParameters['chatId'] = requestParameters['chatId'];
|
||||
}
|
||||
const headerParameters = {};
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v2/businesses/{businessId}/chats/message`.replace(`{${"businessId"}}`, encodeURIComponent(String(requestParameters['businessId']))),
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: SendMessageToChatRequestToJSON(requestParameters['sendMessageToChatRequest']),
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => EmptyApiResponseFromJSON(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/sendMessageToChat.md) %} Отправляет сообщение в чат с покупателем. {% include notitle [limit](../../_auto/method_limits/sendMessageToChat.md) %}
|
||||
* Отправка сообщения в чат
|
||||
*/
|
||||
sendMessageToChat(businessId, chatId, sendMessageToChatRequest, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.sendMessageToChatRaw({ businessId: businessId, chatId: chatId, sendMessageToChatRequest: sendMessageToChatRequest }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user