baasic-sdk-javascript
Version:
JavaScript SDK provides core functionality for building web and mobile applications on [Baasic](http://www.baasic.com/).
109 lines (108 loc) • 5.56 kB
TypeScript
/**
* @module articleCommentsRoute
* @description Baasic Article Comments Route Definition provides Baasic route templates which can be expanded to Baasic REST URIs. Various services can use Baasic Article Comments Route Definition 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 { IArticleComment } from './contracts';
export declare class ArticleCommentsRoute extends BaseRoute {
protected appOptions: IAppOptions;
readonly findRoute: string;
readonly getRoute: string;
readonly createRoute: string;
readonly updateRoute: string;
readonly deleteRoute: string;
readonly approveRoute: string;
readonly unapproveRoute: string;
readonly flagRoute: string;
readonly unflagRoute: string;
readonly reportRoute: string;
readonly unreportRoute: 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 resources using the phrase search.
* - `page` - A value used to set the page number, i.e. to retrieve certain article comment 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 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 states that specify where search should be done (Allowed states: Approved, Spam, Reported, Flagged and UnApproved).
* @method
* @param options Query resource options object.
* @example articleCommentsRoute.find({ searchQuery: '<search-phrase>' });
**/
find(options?: IOptions): any;
/**
* Parses get route which can be expanded with additional options. Supported items are:
* - `id` - Id which uniquely identifies article comment resource that needs to be retrieved.
* - `embed` - Comma separated list of resources to be contained within the current representation.
* @method
* @param id Id which uniquely identifies article comment resource that needs to be retrieved.
* @param options Options object that contains embed data.
* @example articleCommentsRoute.get().expand({ id: '<comment-id>' });
**/
get(id: string, options?: IGetRequestOptions): any;
/**
* Parses create route; this URI template doesnt support any additional options.
* @method
* @param data An article comment object that needs to be inserted into the system.
* @example articleCommentsRoute.create(data);
**/
create(data: IArticleComment): any;
/**
* Parses update route; this URI template doesnt support any additional options.
* @method An article comment object used to update specified article comment resource.
* @example articleCommentsRoute.update(data);
**/
update(data: IArticleComment): any;
/**
* Parses delete route; this URI template doesnt support any additional options.
* @method An article comment object used to delete specified article comment resource.
* @example articleCommentsRoute.delete(data);
**/
delete(data: IArticleComment): any;
/**
* Parses approve route; this URI template doesnt support any additional options.
* @method An article comment object.
* @example articleCommentsRoute.approve(data);
**/
approve(data: IArticleComment): any;
/**
* Parses unapprove route; this URI template doesnt support any additional options.
* @method An article comment object.
* @example articleCommentsRoute.unapprove(data);
**/
unapprove(data: IArticleComment): any;
/**
* Parses flag route; this URI template doesnt support any additional options.
* @method An article comment object.
* @example articleCommentsRoute.flag(data);
**/
flag(data: IArticleComment): any;
/**
* Parses unflag route; this URI template doesnt support any additional options.
* @method An article comment object.
* @example articleCommentsRoute.unflag(data);
**/
unflag(data: IArticleComment): any;
/**
* Parses report route; this URI template doesnt support any additional options.
* @method An article comment object.
* @example articleCommentsRoute.report(data);
**/
report(data: IArticleComment): any;
/**
* Parses unreport route; this URI template doesnt support any additional options.
* @method An article comment object.
* @example articleCommentsRoute.unreport(data);
**/
unreport(data: IArticleComment): 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.
*/