baasic-sdk-javascript
Version:
JavaScript SDK provides core functionality for building web and mobile applications on [Baasic](http://www.baasic.com/).
80 lines (79 loc) • 4.45 kB
TypeScript
/**
* @module blogTagRoute
* @description Baasic Blog Route Definition provides Baasic route templates which can be expanded to Baasic REST URIs. Various services can use Baasic blog 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 { IBlogTag, IBlogTagOptions } from './contracts';
export declare class BlogTagRoute 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 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.
* - `statuses` - Comma separated list of blog statuses that specify where search should be done (Allowed statuses: Published, Draft and Archived).
* - `tags` - A value used to restrict the search to blog 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 blogTagRoute.find.expand({searchQuery: '<search-phrase>'});
**/
find(options?: IBlogTagOptions): 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 blogTagRoute.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 blogTagRoute.purge();
**/
purge(): string;
/**
* Parses create blog route; this URI template doesn't expose any additional properties.
* @method
* @example blogTagRoute.create();
**/
create(): string;
/**
* Parses update blog route; this URI template doesn't expose any additional properties.
* @method
* @param data An blog object that needs to be updated into the system.
* @example blogTagRoute.update(data);
**/
update(data: IBlogTag): string;
/**
* Parses delete blog route; this URI template doesn't expose any additional properties.
* @method
* @param data An blog object that needs to be removed from the system.
* @example blogTagRoute.delete(data);
**/
delete(data: IBlogTag): 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.
*/