UNPKG

baasic-sdk-javascript

Version:

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

74 lines (73 loc) 4.38 kB
/** * @module articleInstanceCommentRepliesRoute * @description Baasic Article Instance Comment Replies Route Definition provides Baasic route templates which can be expanded to Baasic REST URIs. Various services can use Baasic Article Instance Comment Replies 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 { IGetRequestOptions, IOptions } from '../../../common/contracts'; import { IAppOptions } from '../../../core/contracts'; import { IArticle, IArticleCommentReply } from '../contracts'; export declare class ArticleInstanceCommentRepliesRoute extends BaseRoute { protected appOptions: IAppOptions; readonly findRoute: string; readonly getRoute: string; readonly createRoute: string; readonly updateRoute: string; readonly approveRoute: string; readonly unapproveRoute: string; readonly flagRoute: string; readonly unflagRoute: string; readonly reportRoute: string; readonly deleteRoute: string; readonly deleteAllRoute: string; readonly unreportRoute: string; readonly spamRoute: string; readonly unspamRoute: string; constructor(appOptions: IAppOptions); /** * Parses find route which can be expanded with additional options. Supported items are: * - `searchQuery` - A string value used to identify article comment reply resources using the phrase search. * - `page` - A value used to set the page number, i.e. to retrieve certain article comment reply subset from the storage. * - `rpp` - A value used to limit the size of result set per page. * - `sort` - A string used to set the article comment reply property to sort the result collection by. * - `embed` - Comma separated list of resources to be contained within the current representation. * - `statuses` - Comma separated list of article comment reply states that specify where search should be done (Allowed states: Approved, Spam, Reported, Flagged and UnApproved). * @method * @param articleId Article id which uniquely identifies article whose comment reply resources need to be retrieved. * @param commentId Comment id which uniquely identifies comment whose reply resources need to be retrieved. * @param options Query resource options. * @example articleCommentRepliesRoute.find({ searchQuery: '<search-phrase>' }); **/ find(articleId: string, commentId: string, options?: IOptions): any; /** * Parses get route which can be expanded with additional options. Supported items are: * - `id` - Id which uniquely identifies article comment reply resource that needs to be retrieved. * - `embed` - Comma separated list of resources to be contained within the current representation. * @method * @example articleCommentRepliesRoute.get({ id: '<comment-reply-id>' }); **/ get(articleId: string, commentId: string, replyId: string, options?: IGetRequestOptions): any; /** * Parses create article comment reply route; this URI template does not support any additional items. * @method * @example articleCommentRepliesRoute.create(data); **/ create(articleId: string, data: IArticleCommentReply): any; update(data: IArticleCommentReply): any; approve(data: IArticleCommentReply): any; unapprove(data: IArticleCommentReply): any; flag(data: IArticleCommentReply): any; unflag(data: IArticleCommentReply): any; report(data: IArticleCommentReply): any; delete(data: IArticleCommentReply): any; deleteAll(data: IArticle): any; unreport(data: IArticleCommentReply): any; spam(data: IArticleCommentReply): any; unspam(data: IArticleCommentReply): any; } /** * @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. - [URI Template](https://github.com/Baasic/uritemplate-js) syntax enables expanding the Baasic route templates to Baasic REST URIs providing it with an object that contains URI parameters. - All end-point objects are transformed by the associated route service. */