UNPKG

node-calendly

Version:
46 lines 2.18 kB
"use strict"; /****************************************** * Author : Dr. Sebastian Herden * Created On : Fri Sep 16 2022 * File : DataCompliance.ts *******************************************/ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); const CalendlyApiEndpoint_1 = __importDefault(require("./CalendlyApiEndpoint")); /** * The data compliance endpoint. * @export default * @class DataCompliance * @extends {CalendlyApiEndpoint} * @see https://developer.calendly.com/api-docs/4cf896120a018-delete-invitee-data */ class DataCompliance extends CalendlyApiEndpoint_1.default { /** * To submit a request to remove invitee data from all previously booked events in your * organization, use this endpoint. Requests for data deletion can take up to 7 days to complete. * @param emails The emails of the invitees to delete. * @returns {Promise<DataComplianceResponse>} A list of processed emails. */ deleteInviteeData(emails) { return __awaiter(this, void 0, void 0, function* () { const body = JSON.stringify({ emails }); const url = `https://api.calendly.com/data_compliance/deletion/invitees`; return yield this.fetchPost(url, body); }); } } exports.default = DataCompliance; //# sourceMappingURL=DataCompliance.js.map