Iniit
This commit is contained in:
@@ -0,0 +1,181 @@
|
||||
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 ReminderManager extends Platform.Core.BaseManager {
|
||||
static Instance() {
|
||||
if (this._instance === undefined)
|
||||
this._instance = new ReminderManager();
|
||||
return this._instance;
|
||||
}
|
||||
getReminders(ReminderType, pagesize) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const url = 'apis/v4/unibase/reminders/platform/getunreadreminders/ReminderType/' + ReminderType + '/PageSize/' + pagesize;
|
||||
return yield this.dataHelper().getAsync(url).then(function (response) {
|
||||
return JSON.parse(response.result);
|
||||
});
|
||||
});
|
||||
}
|
||||
changeReminderStatus(reminderid, status) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const url = 'apis/v4/unibase/reminders/platform/changereminderstatus/reminderid/' + reminderid + '/status/' + status;
|
||||
return yield this.dataHelper().postAsync(url, null).then(function (response) {
|
||||
if (response.result !== null)
|
||||
response.result = JSON.parse(response.result);
|
||||
return response;
|
||||
});
|
||||
});
|
||||
}
|
||||
getUnreadRemindersCount(ReminderType) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const url = 'apis/v4/unibase/reminders/platform/unreadreminderscount/remindertype/' + ReminderType;
|
||||
return yield this.dataHelper().getAsync(url).then(function (response) {
|
||||
return response;
|
||||
});
|
||||
});
|
||||
}
|
||||
getUnreadRemindersCountByUserId() {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const url = 'apis/v4/unibase/reminders/platform/getunreadreminderscount';
|
||||
return yield this.dataHelper().getAsync(url).then(function (response) {
|
||||
if (response.result != null) {
|
||||
response.result = JSON.parse(response.result);
|
||||
}
|
||||
return response;
|
||||
});
|
||||
});
|
||||
}
|
||||
saveInstantReminder(obj) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const url = 'apis/v4/unibase/instantreminders/platform/saveinstantreminder';
|
||||
return yield this.dataHelper().postAsync(url, obj).then(function (response) {
|
||||
if (response.result != null) {
|
||||
response.result = JSON.parse(response.result);
|
||||
}
|
||||
return response;
|
||||
});
|
||||
});
|
||||
}
|
||||
sendInstantReminder(obj) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const url = 'apis/v4/unibase/instantreminders/platform/sendinstantreminder';
|
||||
return yield this.dataHelper().postAsync(url, obj).then(function (response) {
|
||||
if (response.result != null) {
|
||||
response.result = JSON.parse(response.result);
|
||||
}
|
||||
return response;
|
||||
});
|
||||
});
|
||||
}
|
||||
getInstantReminder(instantreminderid) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const url = 'apis/v4/unibase/instantreminders/platform/Getinstantreminder/instantreminderid/' + instantreminderid;
|
||||
return yield this.dataHelper().getAsync(url).then(function (response) {
|
||||
if (response.result != null) {
|
||||
response.result = JSON.parse(response.result);
|
||||
}
|
||||
return response;
|
||||
});
|
||||
});
|
||||
}
|
||||
getRemindersWithType(ExecutedActionId, IsTask) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const url = 'apis/v4/unibase/reminders/platform/getreminders/executedactionid/' + ExecutedActionId + '/istask/' + IsTask;
|
||||
return yield this.dataHelper().getAsync(url).then(function (response) {
|
||||
if (response.result != null) {
|
||||
response.result = JSON.parse(response.result);
|
||||
}
|
||||
return response;
|
||||
});
|
||||
});
|
||||
}
|
||||
updateIsDuplicate(instantreminderid, Isduplicate) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const url = 'apis/v4/unibase/instantreminders/platform/UpdateIsduplicate/instantreminderid/' + instantreminderid + '/Isduplicate/' + Isduplicate;
|
||||
return yield this.dataHelper().postAsync(url, null).then(function (response) {
|
||||
if (response.result != null) {
|
||||
response.result = JSON.parse(response.result);
|
||||
}
|
||||
return response;
|
||||
});
|
||||
});
|
||||
}
|
||||
getRecipients(instantreminderid, isduplicate) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const url = 'apis/v4/unibase/instantreminders/platform/Getrecipients/instantreminderid/' + instantreminderid + '/isduplicate/' + isduplicate;
|
||||
return yield this.dataHelper().getAsync(url).then(function (response) {
|
||||
if (response.result != null) {
|
||||
response.result = JSON.parse(response.result);
|
||||
}
|
||||
return response;
|
||||
});
|
||||
});
|
||||
}
|
||||
markAsReadUnreadReminders(reminders) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const url = 'apis/v4/unibase/reminders/platform/MarkallUnreadreminders';
|
||||
return yield this.dataHelper().postAsync(url, reminders).then(function (response) {
|
||||
return response;
|
||||
});
|
||||
});
|
||||
}
|
||||
ChangeAllReminderStatusAsRead() {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const url = 'apis/v4/unibase/reminders/platform/ChangeReminderStatusAsRead/np';
|
||||
return yield this.dataHelper().postAsync(url, null).then(function (response) {
|
||||
return response;
|
||||
});
|
||||
});
|
||||
}
|
||||
ExportSingleInstantReminder(Instantreminderid) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const url = 'apis/v4/unibase/instantreminders/platform/ExportInstantReminder/InstantReminderId/' + Instantreminderid;
|
||||
return yield this.dataHelper().getAsync(url).then(function (response) {
|
||||
if (response.result != null) {
|
||||
response = response.result;
|
||||
}
|
||||
return response;
|
||||
});
|
||||
});
|
||||
}
|
||||
ExportInstantReminders() {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const url = 'apis/v4/unibase/instantreminders/platform/ExportAllnstantReminders';
|
||||
return yield this.dataHelper().getAsync(url).then(function (response) {
|
||||
if (response.result != null) {
|
||||
response = response.result;
|
||||
}
|
||||
return response;
|
||||
});
|
||||
});
|
||||
}
|
||||
SendToAll(refguid) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const url = 'apis/v4/unibase/instantreminders/platform/SendInstantReminderToAllTenants/RefGuid/' + refguid;
|
||||
return yield this.dataHelper().postAsync(url, null).then(function (response) {
|
||||
if (response.result != null) {
|
||||
response = response.result;
|
||||
}
|
||||
return response;
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
Managers.ReminderManager = ReminderManager;
|
||||
})(Managers = Communications.Managers || (Communications.Managers = {}));
|
||||
})(Communications = Platform.Communications || (Platform.Communications = {}));
|
||||
})(Platform = Unibase.Platform || (Unibase.Platform = {}));
|
||||
})(Unibase || (Unibase = {}));
|
||||
File diff suppressed because one or more lines are too long
+1
@@ -0,0 +1 @@
|
||||
var __awaiter=this&&this.__awaiter||function(n,t,i,r){function u(n){return n instanceof i?n:new i(function(t){t(n)})}return new(i||(i=Promise))(function(i,f){function o(n){try{e(r.next(n))}catch(t){f(t)}}function s(n){try{e(r["throw"](n))}catch(t){f(t)}}function e(n){n.done?i(n.value):u(n.value).then(o,s)}e((r=r.apply(n,t||[])).next())})},Unibase;(function(n){let t;(function(n){let t;(function(t){let i;(function(t){class i extends n.Core.BaseManager{static Instance(){return this._instance===undefined&&(this._instance=new i),this._instance}getReminders(n,t){return __awaiter(this,void 0,void 0,function*(){const i="apis/v4/unibase/reminders/platform/getunreadreminders/ReminderType/"+n+"/PageSize/"+t;return yield this.dataHelper().getAsync(i).then(function(n){return JSON.parse(n.result)})})}changeReminderStatus(n,t){return __awaiter(this,void 0,void 0,function*(){const i="apis/v4/unibase/reminders/platform/changereminderstatus/reminderid/"+n+"/status/"+t;return yield this.dataHelper().postAsync(i,null).then(function(n){return n.result!==null&&(n.result=JSON.parse(n.result)),n})})}getUnreadRemindersCount(n){return __awaiter(this,void 0,void 0,function*(){const t="apis/v4/unibase/reminders/platform/unreadreminderscount/remindertype/"+n;return yield this.dataHelper().getAsync(t).then(function(n){return n})})}getUnreadRemindersCountByUserId(){return __awaiter(this,void 0,void 0,function*(){return yield this.dataHelper().getAsync("apis/v4/unibase/reminders/platform/getunreadreminderscount").then(function(n){return n.result!=null&&(n.result=JSON.parse(n.result)),n})})}saveInstantReminder(n){return __awaiter(this,void 0,void 0,function*(){return yield this.dataHelper().postAsync("apis/v4/unibase/instantreminders/platform/saveinstantreminder",n).then(function(n){return n.result!=null&&(n.result=JSON.parse(n.result)),n})})}sendInstantReminder(n){return __awaiter(this,void 0,void 0,function*(){return yield this.dataHelper().postAsync("apis/v4/unibase/instantreminders/platform/sendinstantreminder",n).then(function(n){return n.result!=null&&(n.result=JSON.parse(n.result)),n})})}getInstantReminder(n){return __awaiter(this,void 0,void 0,function*(){const t="apis/v4/unibase/instantreminders/platform/Getinstantreminder/instantreminderid/"+n;return yield this.dataHelper().getAsync(t).then(function(n){return n.result!=null&&(n.result=JSON.parse(n.result)),n})})}getRemindersWithType(n,t){return __awaiter(this,void 0,void 0,function*(){const i="apis/v4/unibase/reminders/platform/getreminders/executedactionid/"+n+"/istask/"+t;return yield this.dataHelper().getAsync(i).then(function(n){return n.result!=null&&(n.result=JSON.parse(n.result)),n})})}updateIsDuplicate(n,t){return __awaiter(this,void 0,void 0,function*(){const i="apis/v4/unibase/instantreminders/platform/UpdateIsduplicate/instantreminderid/"+n+"/Isduplicate/"+t;return yield this.dataHelper().postAsync(i,null).then(function(n){return n.result!=null&&(n.result=JSON.parse(n.result)),n})})}getRecipients(n,t){return __awaiter(this,void 0,void 0,function*(){const i="apis/v4/unibase/instantreminders/platform/Getrecipients/instantreminderid/"+n+"/isduplicate/"+t;return yield this.dataHelper().getAsync(i).then(function(n){return n.result!=null&&(n.result=JSON.parse(n.result)),n})})}markAsReadUnreadReminders(n){return __awaiter(this,void 0,void 0,function*(){return yield this.dataHelper().postAsync("apis/v4/unibase/reminders/platform/MarkallUnreadreminders",n).then(function(n){return n})})}ChangeAllReminderStatusAsRead(){return __awaiter(this,void 0,void 0,function*(){return yield this.dataHelper().postAsync("apis/v4/unibase/reminders/platform/ChangeReminderStatusAsRead/np",null).then(function(n){return n})})}ExportSingleInstantReminder(n){return __awaiter(this,void 0,void 0,function*(){const t="apis/v4/unibase/instantreminders/platform/ExportInstantReminder/InstantReminderId/"+n;return yield this.dataHelper().getAsync(t).then(function(n){return n.result!=null&&(n=n.result),n})})}ExportInstantReminders(){return __awaiter(this,void 0,void 0,function*(){return yield this.dataHelper().getAsync("apis/v4/unibase/instantreminders/platform/ExportAllnstantReminders").then(function(n){return n.result!=null&&(n=n.result),n})})}SendToAll(n){return __awaiter(this,void 0,void 0,function*(){const t="apis/v4/unibase/instantreminders/platform/SendInstantReminderToAllTenants/RefGuid/"+n;return yield this.dataHelper().postAsync(t,null).then(function(n){return n.result!=null&&(n=n.result),n})})}}t.ReminderManager=i})(i=t.Managers||(t.Managers={}))})(t=n.Communications||(n.Communications={}))})(t=n.Platform||(n.Platform={}))})(Unibase||(Unibase={}));
|
||||
Reference in New Issue
Block a user