baasic-sdk-javascript
Version:
JavaScript SDK provides core functionality for building web and mobile applications on [Baasic](http://www.baasic.com/).
144 lines (143 loc) • 7.44 kB
TypeScript
/**
* @module blogPostCommentRoute
* @description Baasic Blog Comment Route Definition provides Baasic route templates which can be expanded to Baasic REST URIs. Various services can use Baasic blogPost 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 } from '../../common/contracts';
import { IAppOptions } from '../../core/contracts';
import { IBlogPostComment, IBlogPostCommentOptions } from './contracts';
export declare class BlogPostCommentRoute extends BaseRoute {
protected appOptions: IAppOptions;
readonly findRoute: string;
readonly getRoute: string;
readonly purgeRoute: string;
readonly createRoute: string;
readonly updateRoute: string;
readonly deleteRoute: string;
readonly approveRoute: string;
readonly flagRoute: string;
readonly spamRoute: string;
readonly reportRoute: string;
readonly unapproveRoute: string;
readonly unflagRoute: string;
readonly unspamRoute: string;
readonly unreportRoute: string;
constructor(appOptions: IAppOptions);
/**
* Parses find blogPost route which can be expanded with additional options. Supported items are:
* - `searchQuery` - A string referencing blogPost properties using the phrase or BQL (Baasic Query Language) search.
* - `page` - A value used to set the page number, i.e. to retrieve certain blogPost subset from the storage.
* - `rpp` - A value used to limit the size of result set per page.
* - `sort` - A string used to set the blogPost property to sort the result collection by.
* - `embed` - Comma separated list of resources to be contained within the current representation.
* - `startDate` - A value used to specify the blogPost creation, publish or archive date date starting from which blogPost resource collection should be returned.
* - `endDate` - A value used to specify the blogPost creation, publish or archive date until (and including) which blogPost resource collection should be returned.
* - `statuses` - Comma separated list of blogPost statuses that specify where search should be done (Allowed statuses: Published, Draft and Archived).
* - `tags` - A value used to restrict the search to blogPost resources with these tags. Multiple tags should be comma separated.
* @method
* @param options A promise that is resolved once the find action has been performed.
* @example blogPostCommentRoute.find.expand({searchQuery: '<search-phrase>'});
**/
find(options?: IBlogPostCommentOptions): string;
/**
* Parses get blogPost route which must be expanded with the Id of the previously created blogPost resource in the system. Additional expand supported items are:
* - `embed` - Comma separated list of resources to be contained within the current representation.
* @method
* @param id blogPost slug or id which uniquely identifies blogPost resource that needs to be retrieved.
* @param options Options object that contains embed items.
* @example blogPostCommentRoute.get({id: '<blogPost-id>'});
**/
get(id: string, options?: IGetRequestOptions): string;
/**
* Parses purge blogPost route, this URI template doesn't expose any additional properties.
* @method
* @example blogPostCommentRoute.purge();
**/
purge(): string;
/**
* Parses create blogPost route; this URI template doesn't expose any additional properties.
* @method
* @example blogPostCommentRoute.create();
**/
create(): string;
/**
* Parses update blogPost route; this URI template doesn't expose any additional properties.
* @method
* @param data An blogPost object that needs to be updated into the system.
* @example blogPostCommentRoute.update(data);
**/
update(data: IBlogPostComment): string;
/**
* Parses delete blogPost route; this URI template doesn't expose any additional properties.
* @method
* @param data An blogPost object that needs to be removed from the system.
* @example blogPostCommentRoute.delete(data);
**/
delete(data: IBlogPostComment): string;
/**
* Parses approve blogPost route; this URI template doesn't expose any additional properties.
* @method
* @param data An blogPost object that needs to be approved into the system.
* @example blogPostCommentRoute.approve(data);
**/
approve(data: IBlogPostComment): string;
/**
* Parses flag blogPost route; this URI template doesn't expose any additional properties.
* @method
* @param data An blogPost object that needs to be flaged into the system.
* @example blogPostCommentRoute.flag(data);
**/
flag(data: IBlogPostComment): string;
/**
* Parses spam blogPost route; this URI template doesn't expose any additional properties.
* @method
* @param data An blogPost object that needs to be marked as spam into the system.
* @example blogPostCommentRoute.spam(data);
**/
spam(data: IBlogPostComment): string;
/**
* Parses report blogPost route; this URI template doesn't expose any additional properties.
* @method
* @param data An blogPost object that needs to be reported into the system.
* @example blogPostCommentRoute.report(data);
**/
report(data: IBlogPostComment): string;
/**
* Parses unapprove blogPost route; this URI template doesn't expose any additional properties.
* @method
* @param data An blogPost object that needs to be unapproved into the system.
* @example blogPostCommentRoute.unapprove(data);
**/
unapprove(data: IBlogPostComment): string;
/**
* Parses unflag blogPost route; this URI template doesn't expose any additional properties.
* @method
* @param data An blogPost object that needs to be unflaged into the system.
* @example blogPostCommentRoute.unflag(data);
**/
unflag(data: IBlogPostComment): string;
/**
* Parses unspam blogPost route; this URI template doesn't expose any additional properties.
* @method
* @param data An blogPost object that needs to be unspamed into the system.
* @example blogPostCommentRoute.unspam(data);
**/
unspam(data: IBlogPostComment): string;
/**
* Parses unreport blogPost route; this URI template doesn't expose any additional properties.
* @method
* @param data An blogPost object that needs to be unreported into the system.
* @example blogPostCommentRoute.unreport(data);
**/
unreport(data: IBlogPostComment): string;
}
/**
* @copyright (c) 2017 Mono Ltd
* @license MIT
* @author Mono Ltd
* @overview
***Notes:**
- Refer to the [Baasic REST API](http://dev.baasic.com/api/reference/home) 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.
*/