UNPKG

baasic-sdk-javascript

Version:

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

109 lines (108 loc) 5.86 kB
"use strict"; /* globals module */ /** * @module calendarEventRsvpAttendeeBatchClient * @description CalendarEventRsvpAttendeeBatchClient provides an easy way to consume CalendarEventRsvpAttendeeBatch REST API end-points. In order to obtain needed routes `calendarEventRsvpAttendeeBatchClient` uses `calendarEventRsvpAttendeeBatchRoute`. */ 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 CalendarEventRsvpAttendeeBatchClient = /** @class */ (function () { function CalendarEventRsvpAttendeeBatchClient(calendarEventRsvpAttendeeBatchRoute, apiClient) { this.calendarEventRsvpAttendeeBatchRoute = calendarEventRsvpAttendeeBatchRoute; this.apiClient = apiClient; } Object.defineProperty(CalendarEventRsvpAttendeeBatchClient.prototype, "routeDefinition", { get: function () { return this.calendarEventRsvpAttendeeBatchRoute; }, enumerable: true, configurable: true }); /** * Returns a promise that is resolved once the create CalendarEvenAttendees action has been performed; this action creates new CalendarEventAttendee resources. * @method * @param data CalendarEventAttendee objects that need to be inserted into the system. * @returns A promise that is resolved once the create CalendarEventAttendees action has been performed. * @example calendarEventRsvpAttendeeBatchClient.create([{ AttendeeStatus: <calendar-evetn-attendee-status>, AttendeeStatusId '<attendee-status-id>', DateCreated: '<date-created>', DateUpdated: '<date-updated>', Email: '<email>', EventID: '<calendar-event-id>', FullName: '<full-name>', Id: '<id>', InvitationType: <calendar-event-invitation-type>, InvitationTypeId: '<invitation-type-id>', Json: '<json>', Slots: <slots>, SlotsRequested: <slots-requested>, User: <user-profile>, UserID: '<user-id>' }]) .then(function (data) { // perform success action here }, function (response, status, headers, config) { // perform error handling here }); */ CalendarEventRsvpAttendeeBatchClient.prototype.create = function (data) { return this.apiClient.post(this.routeDefinition.create(), this.routeDefinition.createParams(data)); }; /** * Returns a promise that is resolved once the update CalendarEventAttendees action has been performed; this action updates CalendarEventAttendee resources. * @method * @param data CalendarEventAttendee objects used to update specified CalendarEventAttendee resources. * @returns A promise that is resolved once the update CalendarEventAttendees action has been performed. * @example calendarEventAttendees are resources previously fetched using get action. calendarEventRsvpAttendeeBatchClient.update(calendarEventAttendees) .then(function (data) { // perform success action here }, function (response, status, headers, config) { // perform error handling here }); */ CalendarEventRsvpAttendeeBatchClient.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 CalendarEventAttendee resources from the system if successfully completed. * @method * @param data CalendarEventAttendee Ids which uniquely identify CalendarEventAttendee resources to be deleted. * @returns A promise that is resolved once the remove action has been performed. * @example calendarEventAttendeeIds are identifiers which uniquely identify CalendarEventAttendee resources. calendarEventRsvpAttendeeBatchClient.remove(calendarEventAttendeeIds) .then(function (data) { // perform success action here }, function (response, status, headers, config) { // perform error handling here }); */ CalendarEventRsvpAttendeeBatchClient.prototype.remove = function (data) { return this.apiClient.delete(this.routeDefinition.delete(), undefined, this.routeDefinition.deleteParams(data)); }; CalendarEventRsvpAttendeeBatchClient = tslib_1.__decorate([ inversify_1.injectable(), tslib_1.__param(0, inversify_1.inject(__1.TYPES.CalendarEventRsvpAttendeeBatchRoute)), tslib_1.__param(1, inversify_1.inject(httpApi_1.httpTYPES.ApiClient)), tslib_1.__metadata("design:paramtypes", [__1.CalendarEventRsvpAttendeeBatchRoute, httpApi_1.ApiClient]) ], CalendarEventRsvpAttendeeBatchClient); return CalendarEventRsvpAttendeeBatchClient; }()); exports.CalendarEventRsvpAttendeeBatchClient = CalendarEventRsvpAttendeeBatchClient; /** * @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. */