@jellyfin/sdk
Version:
A TypeScript SDK for Jellyfin.
333 lines (332 loc) • 12.3 kB
TypeScript
/**
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* Do not edit the class manually.
*
* Jellyfin API
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
import { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
import { Configuration } from '../configuration';
import { RequestArgs, BaseAPI } from '../base';
import { AdminNotificationDto } from '../models';
import { NameIdPair } from '../models';
import { NotificationResultDto } from '../models';
import { NotificationTypeInfo } from '../models';
import { NotificationsSummaryDto } from '../models';
/**
* NotificationsApi - axios parameter creator
* @export
*/
export declare const NotificationsApiAxiosParamCreator: (configuration?: Configuration) => {
/**
*
* @summary Sends a notification to all admins.
* @param {AdminNotificationDto} adminNotificationDto The notification request.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
createAdminNotification: (adminNotificationDto: AdminNotificationDto, options?: AxiosRequestConfig) => Promise<RequestArgs>;
/**
*
* @summary Gets notification services.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getNotificationServices: (options?: AxiosRequestConfig) => Promise<RequestArgs>;
/**
*
* @summary Gets notification types.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getNotificationTypes: (options?: AxiosRequestConfig) => Promise<RequestArgs>;
/**
*
* @summary Gets a user\'s notifications.
* @param {string} userId
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getNotifications: (userId: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
/**
*
* @summary Gets a user\'s notification summary.
* @param {string} userId
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getNotificationsSummary: (userId: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
/**
*
* @summary Sets notifications as read.
* @param {string} userId
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
setRead: (userId: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
/**
*
* @summary Sets notifications as unread.
* @param {string} userId
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
setUnread: (userId: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
};
/**
* NotificationsApi - functional programming interface
* @export
*/
export declare const NotificationsApiFp: (configuration?: Configuration) => {
/**
*
* @summary Sends a notification to all admins.
* @param {AdminNotificationDto} adminNotificationDto The notification request.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
createAdminNotification(adminNotificationDto: AdminNotificationDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>>;
/**
*
* @summary Gets notification services.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getNotificationServices(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<NameIdPair>>>;
/**
*
* @summary Gets notification types.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getNotificationTypes(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<NotificationTypeInfo>>>;
/**
*
* @summary Gets a user\'s notifications.
* @param {string} userId
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getNotifications(userId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<NotificationResultDto>>;
/**
*
* @summary Gets a user\'s notification summary.
* @param {string} userId
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getNotificationsSummary(userId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<NotificationsSummaryDto>>;
/**
*
* @summary Sets notifications as read.
* @param {string} userId
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
setRead(userId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>>;
/**
*
* @summary Sets notifications as unread.
* @param {string} userId
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
setUnread(userId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>>;
};
/**
* NotificationsApi - factory interface
* @export
*/
export declare const NotificationsApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
/**
*
* @summary Sends a notification to all admins.
* @param {AdminNotificationDto} adminNotificationDto The notification request.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
createAdminNotification(adminNotificationDto: AdminNotificationDto, options?: any): AxiosPromise<void>;
/**
*
* @summary Gets notification services.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getNotificationServices(options?: any): AxiosPromise<Array<NameIdPair>>;
/**
*
* @summary Gets notification types.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getNotificationTypes(options?: any): AxiosPromise<Array<NotificationTypeInfo>>;
/**
*
* @summary Gets a user\'s notifications.
* @param {string} userId
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getNotifications(userId: string, options?: any): AxiosPromise<NotificationResultDto>;
/**
*
* @summary Gets a user\'s notification summary.
* @param {string} userId
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getNotificationsSummary(userId: string, options?: any): AxiosPromise<NotificationsSummaryDto>;
/**
*
* @summary Sets notifications as read.
* @param {string} userId
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
setRead(userId: string, options?: any): AxiosPromise<void>;
/**
*
* @summary Sets notifications as unread.
* @param {string} userId
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
setUnread(userId: string, options?: any): AxiosPromise<void>;
};
/**
* Request parameters for createAdminNotification operation in NotificationsApi.
* @export
* @interface NotificationsApiCreateAdminNotificationRequest
*/
export interface NotificationsApiCreateAdminNotificationRequest {
/**
* The notification request.
* @type {AdminNotificationDto}
* @memberof NotificationsApiCreateAdminNotification
*/
readonly adminNotificationDto: AdminNotificationDto;
}
/**
* Request parameters for getNotifications operation in NotificationsApi.
* @export
* @interface NotificationsApiGetNotificationsRequest
*/
export interface NotificationsApiGetNotificationsRequest {
/**
*
* @type {string}
* @memberof NotificationsApiGetNotifications
*/
readonly userId: string;
}
/**
* Request parameters for getNotificationsSummary operation in NotificationsApi.
* @export
* @interface NotificationsApiGetNotificationsSummaryRequest
*/
export interface NotificationsApiGetNotificationsSummaryRequest {
/**
*
* @type {string}
* @memberof NotificationsApiGetNotificationsSummary
*/
readonly userId: string;
}
/**
* Request parameters for setRead operation in NotificationsApi.
* @export
* @interface NotificationsApiSetReadRequest
*/
export interface NotificationsApiSetReadRequest {
/**
*
* @type {string}
* @memberof NotificationsApiSetRead
*/
readonly userId: string;
}
/**
* Request parameters for setUnread operation in NotificationsApi.
* @export
* @interface NotificationsApiSetUnreadRequest
*/
export interface NotificationsApiSetUnreadRequest {
/**
*
* @type {string}
* @memberof NotificationsApiSetUnread
*/
readonly userId: string;
}
/**
* NotificationsApi - object-oriented interface
* @export
* @class NotificationsApi
* @extends {BaseAPI}
*/
export declare class NotificationsApi extends BaseAPI {
/**
*
* @summary Sends a notification to all admins.
* @param {NotificationsApiCreateAdminNotificationRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof NotificationsApi
*/
createAdminNotification(requestParameters: NotificationsApiCreateAdminNotificationRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any>>;
/**
*
* @summary Gets notification services.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof NotificationsApi
*/
getNotificationServices(options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<NameIdPair[], any>>;
/**
*
* @summary Gets notification types.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof NotificationsApi
*/
getNotificationTypes(options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<NotificationTypeInfo[], any>>;
/**
*
* @summary Gets a user\'s notifications.
* @param {NotificationsApiGetNotificationsRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof NotificationsApi
*/
getNotifications(requestParameters: NotificationsApiGetNotificationsRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<NotificationResultDto, any>>;
/**
*
* @summary Gets a user\'s notification summary.
* @param {NotificationsApiGetNotificationsSummaryRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof NotificationsApi
*/
getNotificationsSummary(requestParameters: NotificationsApiGetNotificationsSummaryRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<NotificationsSummaryDto, any>>;
/**
*
* @summary Sets notifications as read.
* @param {NotificationsApiSetReadRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof NotificationsApi
*/
setRead(requestParameters: NotificationsApiSetReadRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any>>;
/**
*
* @summary Sets notifications as unread.
* @param {NotificationsApiSetUnreadRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof NotificationsApi
*/
setUnread(requestParameters: NotificationsApiSetUnreadRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any>>;
}