baasic-sdk-javascript
Version:
JavaScript SDK provides core functionality for building web and mobile applications on [Baasic](http://www.baasic.com/).
87 lines (86 loc) • 4.25 kB
TypeScript
import { BaseRoute } from '../../common';
import { IOptions } from '../../common/contracts';
import { MeteringACLRoute, MeteringBatchRoute, MeteringStatisticsRoute } from './';
import { IAppOptions } from '../../core/contracts';
import { IMeteringData } from './contracts';
export declare class MeteringRoute extends BaseRoute {
protected appOptions: IAppOptions;
protected meteringBatchRoute: MeteringBatchRoute;
protected meteringStatisticsRoute: MeteringStatisticsRoute;
protected meteringACLRoute: MeteringACLRoute;
readonly findRoute: string;
readonly getRoute: string;
readonly createRoute: string;
readonly updateRoute: string;
readonly deleteRoute: string;
readonly purgeRoute: string;
readonly batch: MeteringBatchRoute;
readonly statistics: MeteringStatisticsRoute;
readonly acl: MeteringACLRoute;
constructor(appOptions: IAppOptions, meteringBatchRoute: MeteringBatchRoute, meteringStatisticsRoute: MeteringStatisticsRoute, meteringACLRoute: MeteringACLRoute);
/**
* Parses find metering route which can be expanded with additional options. Supported items are:
* - `applicationId` - The application identifier.
* - `categories` - The metering categories in CSV format.
* - `from` - The from date.
* - `to` - The to date.
* - `names` - The name of the resource inside the category in CSV format.
* - `moduleNames` - The name of the resource inside the category in CSV format.
* - `statuses` - The operation status in CSV format.
* - `endpoints` - The back-end endpoint in CSV format.
* - `sources` - The metering collector source in CSV format.
* - `searchQuery` - A string value used to identify metering resources using the phrase search.
* - `page` - A value used to set the page number, i.e. to retrieve certain metering subset from the storage.
* - `rpp` - A value used to limit the size of result set per page.
* - `sort` - A string used to set the metering 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 meteringRoute.find({searchQuery: '<search-phrase>'});
**/
find(options?: IOptions): any;
/**
* Parses get route; this route doesn't expose any properties.
* @method
* @param id MeteringData id which uniquely identifies MeteringData resource that needs to be retrieved.
* @param options Query resource options object.
* @example meteringRoute.get();
**/
get(id: string, options?: IOptions): any;
/**
* Parses create metering route; this URI template does not expose any additional options.
* @method
* @example meteringRoute.create();
**/
create(): any;
/**
* Parses update metering route; this URI template does not expose any additional options.
* @method
* @param data An metering data object used to update specified MeteringData resource.
* @example meteringRoute.update(data);
**/
update(data: IMeteringData): any;
/**
* Parses delete metering route; this URI template does not expose any additional options.
* @method
* @param data An metering data object used to delete specified MeteringData resource.
* @example meteringRoute.delete(data);
**/
delete(data: IMeteringData): any;
/**
* Parses purge metering data route: this URI template does not expose any additional options.
* @method
* @example meteringRoute.purge();
**/
purge(): any;
}
/**
* @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.
*/