UNPKG

baasic-sdk-javascript

Version:

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

61 lines (60 loc) 2.93 kB
/** * @module skillRoute * @description Baasic Skill Route Definition provides Baasic route templates which can be expanded to Baasic REST URIs. Various services can use Baasic Skill 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 { SkillBatchRoute } from './'; import { ISkill } from './contracts'; import { IAppOptions } from '../../../core/contracts'; export declare class SkillRoute extends BaseRoute { protected appOptions: IAppOptions; protected skillBatchRoute: SkillBatchRoute; readonly findRoute: string; readonly getRoute: string; readonly createRoute: string; readonly updateRoute: string; readonly deleteRoute: string; readonly batch: SkillBatchRoute; constructor(appOptions: IAppOptions, skillBatchRoute: SkillBatchRoute); /** * Parses find route which can be expanded with additional options. Supported items are: * - `searchQuery` - A string referencing skill properties using the phrase or BQL (Baasic Query Language) search. * - `page` - A value used to set the page number, i.e. to retrieve certain skill subset from the storage. * - `rpp` - A value used to limit the size of result set per page. * - `sort` - A string used to set the skill property to sort the result collection by. * - `embed` - Comma separated list of resources to be contained within the current representation. * @method * @param options Query resource options object. * @example skillRoute.find({searchQuery: '<search-phrase>'}); **/ find(options?: IOptions): any; /** * Parses get route; this route doesn't expose any properties. * @method * @param id Skill id which uniquely identifies skill resource that needs to be retrieved. * @param options Query resource options object. * @example skillRoute.get(id, options); **/ get(id: string, options?: IGetRequestOptions): any; /** * Parses create route; this URI template does not expose any additional options. * @method * @example skillRoute.create(); **/ create(): any; /** * Parses update route; this URI template does not expose any additional options. * @method * @param data A skill object used to update specified skill resource. * @example skillRoute.update(data); **/ update(data: ISkill): any; /** * Parses delete route; this URI template does not expose any additional options. * @method * @param data A skill object used to delete specified skill resource. * @example skillRoute.delete(data); **/ delete(data: ISkill): any; }