UNPKG

baasic-sdk-javascript

Version:

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

78 lines (77 loc) 4.3 kB
/** * @module blogPostStatusRoute * @description Baasic Blog Post Status Route Definition provides Baasic route templates which can be expanded to Baasic REST URIs. Various services can use Baasic Blog Post Status 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 { IBlogPostStatus } from './contracts'; export declare class BlogPostStatusRoute extends BaseRoute { protected appOptions: IAppOptions; readonly findRoute: string; readonly getRoute: string; readonly purgeRoute: string; readonly createRoute: string; readonly updateRoute: string; readonly deleteRoute: string; constructor(appOptions: IAppOptions); /** * Parses find blog post status route which can be expanded with additional options. Supported items are: * - `searchQuery` - A string referencing blog properties using the phrase or BQL (Baasic Query Language) search. * - `page` - A value used to set the page number, i.e. to retrieve certain blog subset from the storage. * - `rpp` - A value used to limit the size of result set per page. * - `sort` - A string used to set the blog 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 blog creation, publish or archive date date starting from which blog resource collection should be returned. * - `endDate` - A value used to specify the blog creation, publish or archive date until (and including) which blog resource collection should be returned. * @method * @param options A promise that is resolved once the find action has been performed. * @example blogPostStatusRoute.find.expand({searchQuery: '<search-phrase>'}); **/ find(options?: any): string; /** * Parses get blog route which must be expanded with the Id of the previously created blog 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 blog slug or id which uniquely identifies blog resource that needs to be retrieved. * @param options Options object that contains embed items. * @example blogPostStatusRoute.get({id: '<blog-id>'}); **/ get(id: string, options?: IGetRequestOptions): string; /** * Parses purge blog route, this URI template doesn't expose any additional properties. * @method * @example blogPostStatusRoute.purge(); **/ purge(): string; /** * Parses create blog post status route; this URI template doesn't expose any additional properties. * @method * @example blogPostStatusRoute.create(); **/ create(): string; /** * Parses update blog post status route; this URI template doesn't expose any additional properties. * @method * @param data An blog post status object that needs to be updated into the system. * @example blogPostStatusRoute.update(data); **/ update(data: IBlogPostStatus): string; /** * Parses delete blog post status route; this URI template doesn't expose any additional properties. * @method * @param data An blog post status object that needs to be removed from the system. * @example blogPostStatusRoute.delete(data); **/ delete(data: IBlogPostStatus): 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. */