@zeplin/sdk
Version:
Zeplin API client for JavaScript
201 lines (200 loc) • 10.3 kB
TypeScript
/**
* Zeplin API
* Access your resources in Zeplin
*
* Contact: support@zeplin.io
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { AxiosPromise, AxiosInstance, AxiosResponse } from 'axios';
import { Configuration } from '../configuration';
import { RequestArgs, BaseAPI } from '../base';
import { Notification } from '../models';
import { NotificationTypeEnum } from '../models';
import { NotificationUpdateBody } from '../models';
/**
* NotificationsApi - axios parameter creator
* @export
*/
export declare const NotificationsApiAxiosParamCreator: (configuration?: Configuration | undefined) => {
/**
* Get a notification by id
* @summary Get a notification of user
* @param {string} notificationId Notification id
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getUserNotification: (notificationId: string, options?: any) => Promise<RequestArgs>;
/**
* List all notifications of the user
* @summary Get user notifications
* @param {number} [limit] Pagination limit
* @param {number} [offset] Pagination offset
* @param {boolean} [isRead] Whether the notification is read or not
* @param {Set<NotificationTypeEnum>} [type] Filter by type Example: `?type=project.extension&type=styleguide.extension`
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getUserNotifications: (limit?: number | undefined, offset?: number | undefined, isRead?: boolean | undefined, type?: Set<NotificationTypeEnum> | undefined, options?: any) => Promise<RequestArgs>;
/**
* Update a notification for the user
* @summary Update user notification
* @param {string} notificationId Notification id
* @param {NotificationUpdateBody} notificationUpdateBody
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
updateUserNotification: (notificationId: string, notificationUpdateBody: NotificationUpdateBody, options?: any) => Promise<RequestArgs>;
/**
* Updates all user notifications unless `type` or `id` parameter is given. If `type` parameter is provided, updates notifications with matching type. Similarly, updates notifications with matching identifiers if `id` parameter is provided. ☝️ `type` and `id` should not be used in conjunction.
* @summary Bulk update user notifications
* @param {NotificationUpdateBody} notificationUpdateBody
* @param {Set<NotificationTypeEnum>} [type] Filter by type Example: `?type=project.extension&type=styleguide.extension`
* @param {Array<string>} [id] Filter by id Example: `?id=5fbe387f8c72ef23659fb500&id=602281f4783f72fccc045484`
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
updateUserNotifications: (notificationUpdateBody: NotificationUpdateBody, type?: Set<NotificationTypeEnum> | undefined, id?: string[] | undefined, options?: any) => Promise<RequestArgs>;
};
/**
* NotificationsApi - functional programming interface
* @export
*/
export declare const NotificationsApiFp: (configuration?: Configuration | undefined) => {
/**
* Get a notification by id
* @summary Get a notification of user
* @param {string} notificationId Notification id
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getUserNotification(notificationId: string, options?: any): Promise<(axios?: AxiosInstance | undefined, basePath?: string | undefined) => AxiosPromise<any>>;
/**
* List all notifications of the user
* @summary Get user notifications
* @param {number} [limit] Pagination limit
* @param {number} [offset] Pagination offset
* @param {boolean} [isRead] Whether the notification is read or not
* @param {Set<NotificationTypeEnum>} [type] Filter by type Example: `?type=project.extension&type=styleguide.extension`
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getUserNotifications(limit?: number | undefined, offset?: number | undefined, isRead?: boolean | undefined, type?: Set<NotificationTypeEnum> | undefined, options?: any): Promise<(axios?: AxiosInstance | undefined, basePath?: string | undefined) => AxiosPromise<any>>;
/**
* Update a notification for the user
* @summary Update user notification
* @param {string} notificationId Notification id
* @param {NotificationUpdateBody} notificationUpdateBody
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
updateUserNotification(notificationId: string, notificationUpdateBody: NotificationUpdateBody, options?: any): Promise<(axios?: AxiosInstance | undefined, basePath?: string | undefined) => AxiosPromise<any>>;
/**
* Updates all user notifications unless `type` or `id` parameter is given. If `type` parameter is provided, updates notifications with matching type. Similarly, updates notifications with matching identifiers if `id` parameter is provided. ☝️ `type` and `id` should not be used in conjunction.
* @summary Bulk update user notifications
* @param {NotificationUpdateBody} notificationUpdateBody
* @param {Set<NotificationTypeEnum>} [type] Filter by type Example: `?type=project.extension&type=styleguide.extension`
* @param {Array<string>} [id] Filter by id Example: `?id=5fbe387f8c72ef23659fb500&id=602281f4783f72fccc045484`
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
updateUserNotifications(notificationUpdateBody: NotificationUpdateBody, type?: Set<NotificationTypeEnum> | undefined, id?: string[] | undefined, options?: any): Promise<(axios?: AxiosInstance | undefined, basePath?: string | undefined) => AxiosPromise<any>>;
};
/**
* Search parameters for getUserNotifications operation in NotificationsApi.
* @export
* @interface NotificationsApiGetUserNotificationsSearchParams
*/
export interface NotificationsApiGetUserNotificationsSearchParams {
/**
* Pagination limit
* @type {number}
* @memberof NotificationsApiGetUserNotificationsSearchParams
*/
readonly limit?: number;
/**
* Pagination offset
* @type {number}
* @memberof NotificationsApiGetUserNotificationsSearchParams
*/
readonly offset?: number;
/**
* Whether the notification is read or not
* @type {boolean}
* @memberof NotificationsApiGetUserNotificationsSearchParams
*/
readonly isRead?: boolean;
/**
* Filter by type Example: `?type=project.extension&type=styleguide.extension`
* @type {Set<NotificationTypeEnum>}
* @memberof NotificationsApiGetUserNotificationsSearchParams
*/
readonly type?: Set<NotificationTypeEnum>;
}
/**
* Search parameters for updateUserNotifications operation in NotificationsApi.
* @export
* @interface NotificationsApiUpdateUserNotificationsSearchParams
*/
export interface NotificationsApiUpdateUserNotificationsSearchParams {
/**
* Filter by type Example: `?type=project.extension&type=styleguide.extension`
* @type {Set<NotificationTypeEnum>}
* @memberof NotificationsApiUpdateUserNotificationsSearchParams
*/
readonly type?: Set<NotificationTypeEnum>;
/**
* Filter by id Example: `?id=5fbe387f8c72ef23659fb500&id=602281f4783f72fccc045484`
* @type {Array<string>}
* @memberof NotificationsApiUpdateUserNotificationsSearchParams
*/
readonly id?: Array<string>;
}
/**
* NotificationsApi - object-oriented interface
* @export
* @class NotificationsApi
* @extends {BaseAPI}
*/
export declare class NotificationsApi extends BaseAPI {
/**
* Get a notification by id
* @summary Get a notification of user
* @param {string} notificationId Notification id
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof NotificationsApi
*/
getUserNotification(notificationId: string, options?: any): Promise<AxiosResponse<Notification>>;
/**
* List all notifications of the user
* @summary Get user notifications
* @param {NotificationsApiGetUserNotificationsSearchParams} [searchParams] Search parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof NotificationsApi
*/
getUserNotifications(searchParams?: NotificationsApiGetUserNotificationsSearchParams, options?: any): Promise<AxiosResponse<Array<Notification>>>;
/**
* Update a notification for the user
* @summary Update user notification
* @param {string} notificationId Notification id
* @param {NotificationUpdateBody} notificationUpdateBody
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof NotificationsApi
*/
updateUserNotification(notificationId: string, notificationUpdateBody: NotificationUpdateBody, options?: any): Promise<AxiosResponse<void>>;
/**
* Updates all user notifications unless `type` or `id` parameter is given. If `type` parameter is provided, updates notifications with matching type. Similarly, updates notifications with matching identifiers if `id` parameter is provided. ☝️ `type` and `id` should not be used in conjunction.
* @summary Bulk update user notifications
* @param {NotificationUpdateBody} notificationUpdateBody
* @param {NotificationsApiUpdateUserNotificationsSearchParams} [searchParams] Search parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof NotificationsApi
*/
updateUserNotifications(notificationUpdateBody: NotificationUpdateBody, searchParams?: NotificationsApiUpdateUserNotificationsSearchParams, options?: any): Promise<AxiosResponse<void>>;
}