12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879 |
- 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 Unibase;
- (function (Unibase) {
- let Platform;
- (function (Platform) {
- let Communications;
- (function (Communications) {
- let Managers;
- (function (Managers) {
- class TaskManager extends Unibase.Platform.Core.BaseManager {
- getTasks(taskid) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/communications/tasks/gettask/taskid/' + taskid;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- changeApprovalStatus(obj) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/communications/tasks/changeapprovalstatus';
- return yield this.dataHelper().postAsync(url, obj).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- getTasksByRefId(refid) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/communications/tasks/gettasksByrefid/refid/' + refid;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- getTaskByRefId(refid, taskid) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/communications/tasks/gettaskByrefid/refid/' + refid + '/taskid/' + taskid;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- getTasksByRefGuid(refguid) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/communications/tasks/gettasksByrefguid/refguid/' + refguid;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- static Instance() {
- if (this._instance === undefined)
- this._instance = new TaskManager();
- return this._instance;
- }
- }
- Managers.TaskManager = TaskManager;
- })(Managers = Communications.Managers || (Communications.Managers = {}));
- })(Communications = Platform.Communications || (Platform.Communications = {}));
- })(Platform = Unibase.Platform || (Unibase.Platform = {}));
- })(Unibase || (Unibase = {}));
|