release 0.1.0
This commit is contained in:
327
dist/apis/Notification.js
vendored
Normal file
327
dist/apis/Notification.js
vendored
Normal file
@@ -0,0 +1,327 @@
|
||||
"use strict";
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Документация Ozon Seller API
|
||||
* По вопросам работы с Seller API обращайтесь в поддержку через личный кабинет. <aside class=\"warning\">Обновляем корневой TLS/SSL-сертификат GlobalSign — вместо него будем использовать <a href=\"https://app.harica.gr/\">HARICA</a>.<br><a href=\"https://dev.ozon.ru/news/775-Izmeneniia-v-Ozon-API-migratsiia-kornevogo-sertifikata-UTs-Ozon/\">Подробнее о переходе на HARICA на платформе разработчиков Ozon for dev</a></aside> > [Инструкции по работе с маркетплейсом](https://seller-edu.ozon.ru) > [Информационная платформа и сообщество разработчиков Ozon for dev](https://dev.ozon.ru/)
|
||||
*
|
||||
* The version of the OpenAPI document: 2.1
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.Notification = void 0;
|
||||
const runtime = require("../runtime");
|
||||
const index_1 = require("../models/index");
|
||||
/**
|
||||
*
|
||||
*/
|
||||
class Notification extends runtime.BaseAPI {
|
||||
/**
|
||||
* Вы можете оставить обратную связь о работе метода в [комментариях](https://dev.ozon.ru/community/1978-Novye-beta-metody-dlia-upravleniia-podkliucheniiami-PUSH-uvedomlenii/) в сообществе разработчиков Ozon for dev.
|
||||
* Проверить URL-адрес для уведомлений
|
||||
*/
|
||||
checkNotificationRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['clientId'] == null) {
|
||||
throw new runtime.RequiredError('clientId', 'Required parameter "clientId" was null or undefined when calling checkNotification().');
|
||||
}
|
||||
if (requestParameters['apiKey'] == null) {
|
||||
throw new runtime.RequiredError('apiKey', 'Required parameter "apiKey" was null or undefined when calling checkNotification().');
|
||||
}
|
||||
if (requestParameters['notificationV1CheckNotificationRequest'] == null) {
|
||||
throw new runtime.RequiredError('notificationV1CheckNotificationRequest', 'Required parameter "notificationV1CheckNotificationRequest" was null or undefined when calling checkNotification().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
const headerParameters = {};
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
if (requestParameters['clientId'] != null) {
|
||||
headerParameters['Client-Id'] = String(requestParameters['clientId']);
|
||||
}
|
||||
if (requestParameters['apiKey'] != null) {
|
||||
headerParameters['Api-Key'] = String(requestParameters['apiKey']);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v1/notification/check`,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: (0, index_1.NotificationV1CheckNotificationRequestToJSON)(requestParameters['notificationV1CheckNotificationRequest']),
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.NotificationV1CheckNotificationResponseFromJSON)(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Вы можете оставить обратную связь о работе метода в [комментариях](https://dev.ozon.ru/community/1978-Novye-beta-metody-dlia-upravleniia-podkliucheniiami-PUSH-uvedomlenii/) в сообществе разработчиков Ozon for dev.
|
||||
* Проверить URL-адрес для уведомлений
|
||||
*/
|
||||
checkNotification(clientId, apiKey, notificationV1CheckNotificationRequest, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.checkNotificationRaw({ clientId: clientId, apiKey: apiKey, notificationV1CheckNotificationRequest: notificationV1CheckNotificationRequest }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Вы можете оставить обратную связь о работе метода в [комментариях](https://dev.ozon.ru/community/1978-Novye-beta-metody-dlia-upravleniia-podkliucheniiami-PUSH-uvedomlenii/) в сообществе разработчиков Ozon for dev.
|
||||
* Удалить URL-адрес для уведомлений
|
||||
*/
|
||||
deleteNotificationRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['clientId'] == null) {
|
||||
throw new runtime.RequiredError('clientId', 'Required parameter "clientId" was null or undefined when calling deleteNotification().');
|
||||
}
|
||||
if (requestParameters['apiKey'] == null) {
|
||||
throw new runtime.RequiredError('apiKey', 'Required parameter "apiKey" was null or undefined when calling deleteNotification().');
|
||||
}
|
||||
if (requestParameters['notificationV1DeleteNotificationRequest'] == null) {
|
||||
throw new runtime.RequiredError('notificationV1DeleteNotificationRequest', 'Required parameter "notificationV1DeleteNotificationRequest" was null or undefined when calling deleteNotification().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
const headerParameters = {};
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
if (requestParameters['clientId'] != null) {
|
||||
headerParameters['Client-Id'] = String(requestParameters['clientId']);
|
||||
}
|
||||
if (requestParameters['apiKey'] != null) {
|
||||
headerParameters['Api-Key'] = String(requestParameters['apiKey']);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v1/notification/delete`,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: (0, index_1.NotificationV1DeleteNotificationRequestToJSON)(requestParameters['notificationV1DeleteNotificationRequest']),
|
||||
}, initOverrides);
|
||||
return new runtime.VoidApiResponse(response);
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Вы можете оставить обратную связь о работе метода в [комментариях](https://dev.ozon.ru/community/1978-Novye-beta-metody-dlia-upravleniia-podkliucheniiami-PUSH-uvedomlenii/) в сообществе разработчиков Ozon for dev.
|
||||
* Удалить URL-адрес для уведомлений
|
||||
*/
|
||||
deleteNotification(clientId, apiKey, notificationV1DeleteNotificationRequest, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
yield this.deleteNotificationRaw({ clientId: clientId, apiKey: apiKey, notificationV1DeleteNotificationRequest: notificationV1DeleteNotificationRequest }, initOverrides);
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Вы можете оставить обратную связь о работе метода в [комментариях](https://dev.ozon.ru/community/1978-Novye-beta-metody-dlia-upravleniia-podkliucheniiami-PUSH-uvedomlenii/) в сообществе разработчиков Ozon for dev.
|
||||
* Включить или выключить уведомления на URL-адрес
|
||||
*/
|
||||
enableNotificationRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['clientId'] == null) {
|
||||
throw new runtime.RequiredError('clientId', 'Required parameter "clientId" was null or undefined when calling enableNotification().');
|
||||
}
|
||||
if (requestParameters['apiKey'] == null) {
|
||||
throw new runtime.RequiredError('apiKey', 'Required parameter "apiKey" was null or undefined when calling enableNotification().');
|
||||
}
|
||||
if (requestParameters['notificationV1EnableNotificationRequest'] == null) {
|
||||
throw new runtime.RequiredError('notificationV1EnableNotificationRequest', 'Required parameter "notificationV1EnableNotificationRequest" was null or undefined when calling enableNotification().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
const headerParameters = {};
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
if (requestParameters['clientId'] != null) {
|
||||
headerParameters['Client-Id'] = String(requestParameters['clientId']);
|
||||
}
|
||||
if (requestParameters['apiKey'] != null) {
|
||||
headerParameters['Api-Key'] = String(requestParameters['apiKey']);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v1/notification/enable`,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: (0, index_1.NotificationV1EnableNotificationRequestToJSON)(requestParameters['notificationV1EnableNotificationRequest']),
|
||||
}, initOverrides);
|
||||
return new runtime.VoidApiResponse(response);
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Вы можете оставить обратную связь о работе метода в [комментариях](https://dev.ozon.ru/community/1978-Novye-beta-metody-dlia-upravleniia-podkliucheniiami-PUSH-uvedomlenii/) в сообществе разработчиков Ozon for dev.
|
||||
* Включить или выключить уведомления на URL-адрес
|
||||
*/
|
||||
enableNotification(clientId, apiKey, notificationV1EnableNotificationRequest, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
yield this.enableNotificationRaw({ clientId: clientId, apiKey: apiKey, notificationV1EnableNotificationRequest: notificationV1EnableNotificationRequest }, initOverrides);
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Вы можете оставить обратную связь о работе метода в [комментариях](https://dev.ozon.ru/community/1978-Novye-beta-metody-dlia-upravleniia-podkliucheniiami-PUSH-uvedomlenii/) в сообществе разработчиков Ozon for dev.
|
||||
* Получить типы пуш-уведомлений
|
||||
*/
|
||||
getNotificationPushTypeListRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['clientId'] == null) {
|
||||
throw new runtime.RequiredError('clientId', 'Required parameter "clientId" was null or undefined when calling getNotificationPushTypeList().');
|
||||
}
|
||||
if (requestParameters['apiKey'] == null) {
|
||||
throw new runtime.RequiredError('apiKey', 'Required parameter "apiKey" was null or undefined when calling getNotificationPushTypeList().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
const headerParameters = {};
|
||||
if (requestParameters['clientId'] != null) {
|
||||
headerParameters['Client-Id'] = String(requestParameters['clientId']);
|
||||
}
|
||||
if (requestParameters['apiKey'] != null) {
|
||||
headerParameters['Api-Key'] = String(requestParameters['apiKey']);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v1/notification/push-type/list`,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.NotificationV1GetNotificationPushTypeListResponseFromJSON)(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Вы можете оставить обратную связь о работе метода в [комментариях](https://dev.ozon.ru/community/1978-Novye-beta-metody-dlia-upravleniia-podkliucheniiami-PUSH-uvedomlenii/) в сообществе разработчиков Ozon for dev.
|
||||
* Получить типы пуш-уведомлений
|
||||
*/
|
||||
getNotificationPushTypeList(clientId, apiKey, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.getNotificationPushTypeListRaw({ clientId: clientId, apiKey: apiKey }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Вы можете оставить обратную связь о работе метода в [комментариях](https://dev.ozon.ru/community/1978-Novye-beta-metody-dlia-upravleniia-podkliucheniiami-PUSH-uvedomlenii/) в сообществе разработчиков Ozon for dev.
|
||||
* Получить информацию по подключённым URL-адресам
|
||||
*/
|
||||
notificationListRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['clientId'] == null) {
|
||||
throw new runtime.RequiredError('clientId', 'Required parameter "clientId" was null or undefined when calling notificationList().');
|
||||
}
|
||||
if (requestParameters['apiKey'] == null) {
|
||||
throw new runtime.RequiredError('apiKey', 'Required parameter "apiKey" was null or undefined when calling notificationList().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
const headerParameters = {};
|
||||
if (requestParameters['clientId'] != null) {
|
||||
headerParameters['Client-Id'] = String(requestParameters['clientId']);
|
||||
}
|
||||
if (requestParameters['apiKey'] != null) {
|
||||
headerParameters['Api-Key'] = String(requestParameters['apiKey']);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v1/notification/list`,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.NotificationV1NotificationListResponseFromJSON)(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Вы можете оставить обратную связь о работе метода в [комментариях](https://dev.ozon.ru/community/1978-Novye-beta-metody-dlia-upravleniia-podkliucheniiami-PUSH-uvedomlenii/) в сообществе разработчиков Ozon for dev.
|
||||
* Получить информацию по подключённым URL-адресам
|
||||
*/
|
||||
notificationList(clientId, apiKey, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.notificationListRaw({ clientId: clientId, apiKey: apiKey }, initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Вы можете оставить обратную связь о работе метода в [комментариях](https://dev.ozon.ru/community/1978-Novye-beta-metody-dlia-upravleniia-podkliucheniiami-PUSH-uvedomlenii/) в сообществе разработчиков Ozon for dev.
|
||||
* Подключить URL-адрес для уведомлений
|
||||
*/
|
||||
setNotificationRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['clientId'] == null) {
|
||||
throw new runtime.RequiredError('clientId', 'Required parameter "clientId" was null or undefined when calling setNotification().');
|
||||
}
|
||||
if (requestParameters['apiKey'] == null) {
|
||||
throw new runtime.RequiredError('apiKey', 'Required parameter "apiKey" was null or undefined when calling setNotification().');
|
||||
}
|
||||
if (requestParameters['notificationV1SetNotificationRequest'] == null) {
|
||||
throw new runtime.RequiredError('notificationV1SetNotificationRequest', 'Required parameter "notificationV1SetNotificationRequest" was null or undefined when calling setNotification().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
const headerParameters = {};
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
if (requestParameters['clientId'] != null) {
|
||||
headerParameters['Client-Id'] = String(requestParameters['clientId']);
|
||||
}
|
||||
if (requestParameters['apiKey'] != null) {
|
||||
headerParameters['Api-Key'] = String(requestParameters['apiKey']);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v1/notification/set`,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: (0, index_1.NotificationV1SetNotificationRequestToJSON)(requestParameters['notificationV1SetNotificationRequest']),
|
||||
}, initOverrides);
|
||||
return new runtime.VoidApiResponse(response);
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Вы можете оставить обратную связь о работе метода в [комментариях](https://dev.ozon.ru/community/1978-Novye-beta-metody-dlia-upravleniia-podkliucheniiami-PUSH-uvedomlenii/) в сообществе разработчиков Ozon for dev.
|
||||
* Подключить URL-адрес для уведомлений
|
||||
*/
|
||||
setNotification(clientId, apiKey, notificationV1SetNotificationRequest, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
yield this.setNotificationRaw({ clientId: clientId, apiKey: apiKey, notificationV1SetNotificationRequest: notificationV1SetNotificationRequest }, initOverrides);
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Вы можете оставить обратную связь о работе метода в [комментариях](https://dev.ozon.ru/community/1978-Novye-beta-metody-dlia-upravleniia-podkliucheniiami-PUSH-uvedomlenii/) в сообществе разработчиков Ozon for dev.
|
||||
* Изменить URL-адрес для уведомлений
|
||||
*/
|
||||
updateNotificationRaw(requestParameters, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestParameters['clientId'] == null) {
|
||||
throw new runtime.RequiredError('clientId', 'Required parameter "clientId" was null or undefined when calling updateNotification().');
|
||||
}
|
||||
if (requestParameters['apiKey'] == null) {
|
||||
throw new runtime.RequiredError('apiKey', 'Required parameter "apiKey" was null or undefined when calling updateNotification().');
|
||||
}
|
||||
if (requestParameters['notificationV1UpdateNotificationRequest'] == null) {
|
||||
throw new runtime.RequiredError('notificationV1UpdateNotificationRequest', 'Required parameter "notificationV1UpdateNotificationRequest" was null or undefined when calling updateNotification().');
|
||||
}
|
||||
const queryParameters = {};
|
||||
const headerParameters = {};
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
if (requestParameters['clientId'] != null) {
|
||||
headerParameters['Client-Id'] = String(requestParameters['clientId']);
|
||||
}
|
||||
if (requestParameters['apiKey'] != null) {
|
||||
headerParameters['Api-Key'] = String(requestParameters['apiKey']);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v1/notification/update`,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: (0, index_1.NotificationV1UpdateNotificationRequestToJSON)(requestParameters['notificationV1UpdateNotificationRequest']),
|
||||
}, initOverrides);
|
||||
return new runtime.VoidApiResponse(response);
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Вы можете оставить обратную связь о работе метода в [комментариях](https://dev.ozon.ru/community/1978-Novye-beta-metody-dlia-upravleniia-podkliucheniiami-PUSH-uvedomlenii/) в сообществе разработчиков Ozon for dev.
|
||||
* Изменить URL-адрес для уведомлений
|
||||
*/
|
||||
updateNotification(clientId, apiKey, notificationV1UpdateNotificationRequest, initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
yield this.updateNotificationRaw({ clientId: clientId, apiKey: apiKey, notificationV1UpdateNotificationRequest: notificationV1UpdateNotificationRequest }, initOverrides);
|
||||
});
|
||||
}
|
||||
}
|
||||
exports.Notification = Notification;
|
||||
Reference in New Issue
Block a user