UNPKG

baasic-sdk-javascript

Version:

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

40 lines (39 loc) 2.15 kB
/** * @module articleSubscriptionsArticleRoute * @description Baasic Article Subscriptions Article Route Definition provides Baasic route templates which can be expanded to Baasic REST URIs. Various services can use Baasic Article Subscriptions Article Route Service to obtain needed routes while other routes will be obtained through HAL. By convention, all route services use the same function names as their corresponding services. */ import { BaseRoute } from '../../../common'; import { IAppOptions } from '../../../core/contracts'; import { IArticle, IArticleSubscription } from '../contracts'; export declare class ArticleSubscriptionsArticleRoute extends BaseRoute { protected appOptions: IAppOptions; readonly subscribeRoute: string; readonly isSubscribedRoute: string; readonly unSubscribeRoute: string; constructor(appOptions: IAppOptions); /** * Parses article subscribe route which must be expanded with id of the article. * @method * @param article The article identifier. * @param data The subscribe information. * @example articleSubscriptionsArticleRoute.subscribe({id: '<article-id>'}); **/ subscribe(article: IArticle, data: IArticleSubscription): any; /** * Parses article isSubscribed route which must be expanded with subscriber Id and the id of the article. * @method * @param article The article identifier. * @param data The subscriber identifier. * @example articleRoute.subscriptions.article.isSubscribed.expand({id: '<article-id>', subscriberId: '<subscriber-id>' }); **/ isSubscribed(article: IArticle, data: IArticleSubscription): any; /** * Parses article unSubscribe route which must be expanded with the id of the article. * @method * @param article The article identifier. * @param data The unsubscribe information. * @example articleSubscriptionsArticleRoute.unSubscribe({id: '<article-id>'}); **/ unSubscribe(article: IArticle, data: IArticleSubscription): any; subscribeParams(article: IArticle, data: IArticleSubscription): any; }