node-calendly
Version:
Node module to access calendly api.
48 lines • 1.67 kB
JavaScript
"use strict";
/******************************************
* Author : Dr. Sebastian Herden
* Created On : Fri Sep 16 2022
* File : EventType.ts
*******************************************/
Object.defineProperty(exports, "__esModule", { value: true });
/**
* A configuration for an Event. Provides two methods:
* - fromJson: Creates an event type object from a json object.
* - getUUID: Returns the uuid of the event type.
* @export default
* @interface EventType
* @implements {EventTypeDefinition}
* @see https://developer.calendly.com/api-docs/f3185c91567db-event-type
*/
class EventType {
constructor(data) {
this.uri = data.uri;
this.name = data.name;
this.active = data.active;
this.slug = data.slug;
this.scheduling_url = data.scheduling_url;
this.duration = data.duration;
this.kind = data.kind;
this.pooling_type = data.pooling_type;
this.type = data.type;
this.color = data.color;
this.created_at = data.created_at;
this.updated_at = data.updated_at;
this.internal_notes = data.internal_notes;
this.description_plain = data.description_plain;
this.description_html = data.description_html;
this.profile = data.profile;
this.secret = data.secret;
this.booking_method = data.booking_method;
this.custom_questions = data.custom_questions;
this.deleted_at = data.deleted_at;
}
static fromJson(data) {
return new EventType(data);
}
getUuid() {
return this.uri.split('/').pop() || '';
}
}
exports.default = EventType;
//# sourceMappingURL=EventType.js.map