UNPKG

baasic-sdk-javascript

Version:

JavaScript SDK provides core functionality for building web and mobile applications on [Baasic](http://www.baasic.com/).

42 lines (41 loc) 2.13 kB
/** * @module notificationsPublishBatchClient * @description Notifications Publish Batch Client provides an easy way to consume Notifications REST API end-points. In order to obtain needed routes `notificationsPublishBatchClient` uses `notificationsPublishBatchRoute`. */ import { ApiClient, IHttpResponse } from '../../httpApi'; import { NotificationsPublishBatchRoute } from './'; import { INotification } from './contracts'; export declare class NotificationsPublishBatchClient { protected notificationsPublishBatchRoute: NotificationsPublishBatchRoute; protected apiClient: ApiClient; readonly routeDefinition: NotificationsPublishBatchRoute; constructor(notificationsPublishBatchRoute: NotificationsPublishBatchRoute, apiClient: ApiClient); /** * Returns a promise that is resolved once the create notification action has been performed; this action creates new notification resources. * @method * @param data The notification collection. * @returns A promise that is resolved once the create notification action has been performed. * @example notificationsPublishBatchClient.create([{ channels: ['<channel-name', '<channel-name>'], moduleName: '<module-name>', templateName: '<template-name>', templateContext: { prop1: '<prop1-value>', prop2: '<prop2-value>' } }]) .then(function (data) { // perform success action here }, function (response, status, headers, config) { // perform error handling here }); */ create(data: INotification[]): PromiseLike<IHttpResponse<INotification[]>>; } /** * @overview ***Notes:** - Refer to the [REST API documentation](https://github.com/Baasic/baasic-rest-api/wiki) for detailed information about available Baasic REST API end-points. - All end-point objects are transformed by the associated route service. */