UNPKG

baasic-sdk-javascript

Version:

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

75 lines (74 loc) 3.75 kB
/** * @module ShoppingCartItemRoute * @description Baasic Shopping Cart Item Route Definition provides Baasic route templates which can be expanded to Baasic REST URIs. Various services can use BaasicShopping Cart Item 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 { ShoppingCartItemBatchRoute } from './'; import { IShoppingCartItem } from './contracts'; import { IAppOptions } from '../../core/contracts'; export declare class ShoppingCartItemRoute extends BaseRoute { protected appOptions: IAppOptions; protected shoppingCartItemBatchRoute: ShoppingCartItemBatchRoute; readonly findRoute: string; readonly findByUserIdRoute: string; readonly getRoute: string; readonly getbyUserIdAndProductIdRoute: string; readonly updateRoute: string; readonly updateByUserIdAndProductIdRoute: string; readonly deleteRoute: string; readonly deleteByUserIdAndProductIdRoute: string; readonly deleteByUserIdRoute: string; readonly createRoute: string; readonly createByUserIdAndProductIdRoute: string; readonly purgeRoute: string; readonly batch: ShoppingCartItemBatchRoute; constructor(appOptions: IAppOptions, shoppingCartItemBatchRoute: ShoppingCartItemBatchRoute); /** * Parses delete route; this route should be expanded with the Id of shopping cart item resource. * @method * @param id Shopping Cart Id of specific Shopping Cart item resource in the system. * @example shoppingCartItemRoute.delete(<id>); **/ delete(id: string): any; /** * Parses delete route; this route should be expanded with the Id of shopping cart item resource. * @method * @param userId User Id of the User resource that the Shopping Cart resource in the system bellongs to. * @param productId Product Id of the Product resource that the Shopping Cart resource in the system is linked to. * @example shoppingCartItemRoute.delete(<user-id>, <product-id>); **/ deleteByUserIdAndProductId(userId: string, productId: string): any; /** * Parses delete route; this route should be expanded with the userId. * @method * @param userId User Id of the User resource that the Shopping Cart resource in the system bellongs to. * @example shoppingCartItemRoute.deleteByUserId(<user-id>); **/ deleteByUserId(userId: string): any; /** * Parses create route; this URI template doesnt support any additional options. * @method * @example shoppingCartItemRoute.create(); **/ create(): any; /** * Parses create route; this URI template doesnt support any additional options. * @method * @param data An shopping cart item object that needs to be inserted into the system. * @example shoppingCartItemRoute.create(data); **/ createByUserIdAndProductId(data: IShoppingCartItem): any; /** * Parses purge route; this URI template does not expose any additional options. * @method * @example shoppingCartItemRoute.purge(); **/ purge(): any; } /** * @overview ***Notes:** - Refer to the [REST API documentation](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. */