UNPKG

swipelime-client-node

Version:

swipelime-client-node is the official swipelime Node.js client library

32 lines (31 loc) 993 B
"use strict"; // Copyright (c) 2024 swipelime (https://swipelime.com) // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); const Task_1 = __importDefault(require("./Task")); const types_1 = require("../types"); class TaskEvent extends Task_1.default { data; taskType = types_1.TaskType.event; constructor(doc, serviceHandler, timestampReceived) { super(doc, serviceHandler, timestampReceived); this.data = doc.data; } /** * Confirms the task event. */ async confirm() { return this._serviceHandler.confirmTaskEvent(this); } /** * Refuses the task event. */ async refuse() { return this._serviceHandler.refuseTasks([this]); } } exports.default = TaskEvent;