UNPKG

baasic-sdk-javascript

Version:

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

97 lines (96 loc) 5.55 kB
"use strict"; /* globals module */ /** * @module calendarEventRsvpAttendeeStatusBatchClient * @description CalendarEventRsvpAttendeeStatusBatchClient provides an easy way to consume CalendarEventRsvpAttendeeStatusBatch REST API end-points. In order to obtain needed routes `calendarEventRsvpAttendeeStatusBatchClient` uses `calendarEventRsvpAttendeeStatusBatchRoute`. */ Object.defineProperty(exports, "__esModule", { value: true }); var tslib_1 = require("tslib"); var inversify_1 = require("inversify"); var httpApi_1 = require("../../../../httpApi"); var __1 = require("../../"); var CalendarEventRsvpAttendeeStatusBatchClient = /** @class */ (function () { function CalendarEventRsvpAttendeeStatusBatchClient(calendarEventRsvpAttendeeStatusBatchRoute, apiClient) { this.calendarEventRsvpAttendeeStatusBatchRoute = calendarEventRsvpAttendeeStatusBatchRoute; this.apiClient = apiClient; } Object.defineProperty(CalendarEventRsvpAttendeeStatusBatchClient.prototype, "routeDefinition", { get: function () { return this.calendarEventRsvpAttendeeStatusBatchRoute; }, enumerable: true, configurable: true }); /** * Returns a promise that is resolved once the create CalendarEventRsvpAttendeeStatuses action has been performed. This action creates new CalendarEventRsvpAttendeeStatus resources. * @method * @param data CalendarEventRsvpAttendeeStatus objects that need to be inserted into the system. * @returns A promise that is resolved once the create CalendarEventRsvpAttendeeStatuses action has been performed. * @example calendarEventRsvpAttendeeStatusBatchClient.create([{ abrv: '<abrv>', json: '<json>', name: '<name>' }]) .then(function (data) { // perform success action here }, function (response, status, headers, config) { // perform error handling here }); */ CalendarEventRsvpAttendeeStatusBatchClient.prototype.create = function (data) { return this.apiClient.post(this.routeDefinition.create(), this.routeDefinition.createParams(data)); }; /** * Returns a promise that is resolved once the update CalendarEventRsvpAttendeeStatuses action has been performed. This action updates CalendarEventRsvpAttendeeStatus resources. * @method * @param data CalendarEventRsvpAttendeeStatus objects used to update specified CalendarEventRsvpAttendeeStatus resources. * @returns A promise that is resolved once the update CalendarEventRsvpAttendeeStatuses action has been performed. * @example calendarEventRsvpAttendeeStatuses are resources previously fetched using get action. calendarEventRsvpAttendeeStatusBatchClient.update(calendarEventRsvpAttendeeStatuses) .then(function (data) { // perform success action here }, function (response, status, headers, config) { // perform error handling here }); */ CalendarEventRsvpAttendeeStatusBatchClient.prototype.update = function (data) { return this.apiClient.put(this.routeDefinition.update(), this.routeDefinition.updateParams(data)); }; /** * Returns a promise that is resolved once the remove action has been performed. This action will remove CalendarEventRsvpAttendeeStatus resources from the system if successfully completed. * @method * @param data CalendarEventRsvpAttendeeStatus Ids which uniquely identify CalendarEventRsvpAttendeeStatus resources to be deleted. * @returns A promise that is resolved once the remove action has been performed. * @example calendarEventRsvpAttendeeStatusIds are identifiers which uniquely identify CalendarEventRsvpAttendeeStatus resources. calendarEventRsvpAttendeeStatusBatchClient.remove(calendarEventRsvpAttendeeStatusIds) .then(function (data) { // perform success action here }, function (response, status, headers, config) { // perform error handling here }); */ CalendarEventRsvpAttendeeStatusBatchClient.prototype.remove = function (data) { return this.apiClient.delete(this.routeDefinition.delete(), undefined, this.routeDefinition.deleteParams(data)); }; CalendarEventRsvpAttendeeStatusBatchClient = tslib_1.__decorate([ inversify_1.injectable(), tslib_1.__param(0, inversify_1.inject(__1.TYPES.CalendarEventRsvpAttendeeStatusBatchRoute)), tslib_1.__param(1, inversify_1.inject(httpApi_1.httpTYPES.ApiClient)), tslib_1.__metadata("design:paramtypes", [__1.CalendarEventRsvpAttendeeStatusBatchRoute, httpApi_1.ApiClient]) ], CalendarEventRsvpAttendeeStatusBatchClient); return CalendarEventRsvpAttendeeStatusBatchClient; }()); exports.CalendarEventRsvpAttendeeStatusBatchClient = CalendarEventRsvpAttendeeStatusBatchClient; /** * @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. - All end-point objects are transformed by the associated route definition. */