123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501 |
- 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 Bizgaze;
- (function (Bizgaze) {
- let Apps;
- (function (Apps) {
- let Crm;
- (function (Crm) {
- let Contacts;
- (function (Contacts) {
- let Managers;
- (function (Managers) {
- class ContactManager extends Unibase.Platform.Core.BaseManager {
- changedefaultemail(contactId, contactEmailId) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/crm/contacts/changedefaultemail/contactid/' + contactId + '/contactemailid/' + contactEmailId;
- return yield this.dataHelper().postAsync(url, null).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- changedefaultbranch(ContactId, DefaultBranchId) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/crm/contacts/changedefaultbranch/contactid/' + ContactId + '/defaultbranchid/' + DefaultBranchId;
- return yield this.dataHelper().postAsync(url, null).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- deletedefaultbranch(UserBranchId) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/crm/contacts/deletedefaultbranch/userbranchid/' + UserBranchId;
- return yield this.dataHelper().postAsync(url, null).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- getleadbyleadid(contactId) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/crm/leads/getleadbyleadid/leadid/' + contactId;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- getleadtagsbyleadid(contactId, formid) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/forms/bindtagcontroldata/refid/' + contactId + '/formid/' + formid;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null)
- response.result = response.result;
- return response;
- });
- });
- }
- changedefaulturl(contactId, contactUrlId) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/crm/contacts/changedefaulturl/contactid/' + contactId + '/contacturlid/' + contactUrlId;
- return yield this.dataHelper().postAsync(url, null).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- changedefaultloginemail(contactId, contactEmailId, userName) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/crm/contacts/changedefaultloginemail/contactid/' + contactId + '/contactemailid/' + contactEmailId + '/username/' + userName;
- return yield this.dataHelper().postAsync(url, null).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- changedefaultphone(contactId, contactPhoneId) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/crm/contacts/changedefaultphone/contactid/' + contactId + '/contactnumberid/' + contactPhoneId;
- return yield this.dataHelper().postAsync(url, null).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- changedefaultloginphone(contactId, contactPhoneId, userName) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/crm/contacts/changedefaultloginphonenumber/contactid/' + contactId + '/contactnumberid/' + contactPhoneId + '/username/' + userName;
- return yield this.dataHelper().postAsync(url, null).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- deleteMappingContact(MappingContactId) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/crm/organization/deletemappingcontact/mappingcontactid/' + MappingContactId;
- return yield this.dataHelper().postAsync(url, null).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- getManagerDetails(LobId, AddressId) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/crm/contacts/getmanagerdetails/lobid/' + LobId + '/addressid/' + AddressId;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- getContactByUserId(UserId) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/crm/contacts/getcontactbyuserid/userid/' + UserId;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null && response.result != "")
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- getContactnumuberdetails(phonenumner) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/crm/contacts/getcontactnumberbynumber/' + phonenumner;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null && response.result != "")
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- getContactDetails(email, phone) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/crm/contacts/getcontactdetailsemailphone/email/' + email + '/phone/' + phone;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null) {
- response.result = JSON.parse(response.result);
- }
- return response;
- });
- });
- }
- getAddressByContactId(ContactId) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/crm/address/getdefaultaddressbycontactid/contactid/' + ContactId;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null && response.result != "")
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- ChangeDefaultAddress(postdata) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/crm/address/changedefaultaddress';
- return yield this.dataHelper().postAsync(url, postdata).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- getContactDetailsBycontactid(ContactId) {
- return __awaiter(this, void 0, void 0, function* () {
- debugger;
- const url = 'apis/v4/bizgaze/crm/organization/getorganizationdetails/organizationid/' + ContactId;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null && response.result != "")
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- ChangeAddressStatus(postdata) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/crm/address/changeaddressstatus';
- return yield this.dataHelper().postAsync(url, postdata).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- saveAddressCoordinates(postdata) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/crm/address/saveaddresscoordinates';
- return yield this.dataHelper().postAsync(url, postdata).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- getOrgContact(OrgContactId) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/crm/orgcontacts/getorgcontact/orgcontactid/' + OrgContactId;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null && response.result != "")
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- getsprlOrgContact(OrgContactId) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/sprl/contacts/getorgcontacts/orgcontactid/' + OrgContactId;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- debugger;
- if (response.result !== null && response.result != "")
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- getLatLongByAddress(address) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/crm/orgcontacts/getlatlongbyaddress/address/' + address;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- getAddressById(ContactAddressId) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/crm/address/getaddressbycontactaddressid/contactaddressid/' + ContactAddressId;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null && response.result != "")
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- getGridForManagers(LobId, ContactId, empId, page, rows) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/crm/contacts/getmanagersbylobandemp/lobid/' + LobId + '/contactid/' + ContactId + '/empid/' + empId + '/page/' + page + '/rows/' + rows;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- saveManager(postdata) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/crm/organization/changeorganizationmanager';
- return yield this.dataHelper().postAsync(url, postdata).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- getOrganizationDetails(OrganizationId) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/crm/organization/getorganization/organizationid/' + OrganizationId + '';
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- }).fail(function () {
- });
- });
- }
- getOrganizationById(OrganizationId) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/crm/organization/getorganizationbyorgid/organizationid/' + OrganizationId + '';
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- }).fail(function () {
- });
- });
- }
- getEmployeeManager(employeeid) {
- return __awaiter(this, void 0, void 0, function* () {
- debugger;
- const url = 'apis/v4/bizgaze/crm/contacts/getemployeemanager/employeeid/' + employeeid;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- getEmployeesByManagerId(employeeId, managerId) {
- return __awaiter(this, void 0, void 0, function* () {
- debugger;
- const url = 'apis/v4/bizgaze/crm/contacts/getemployeesbymanagerid/employeeid/' + employeeId + '/managerid/' + managerId;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- deletetcscontactcompanies(tcscontactcompanyid) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = "apis/v4/bizgaze/crm/contacts/deletetcscontactcompanies/id/" + tcscontactcompanyid + "";
- return yield this.dataHelper().postAsync(url, null).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- getOrganizationByLeadId(LeadId) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/crm/organization/getorganizationbylead/leadid/' + LeadId + '';
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- }).fail(function () {
- });
- });
- }
- GetTenants(tenantid) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/crm/contacts/gettenant/tenantid/' + tenantid;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null) {
- response.result = JSON.parse(response.result);
- }
- return response;
- });
- });
- }
- saveSelfDeclaration(obj) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/crm/contacts/saveselfdeclaration';
- return yield this.dataHelper().postAsync(url, obj).then(function (response) {
- if (response.result !== null) {
- response.result = JSON.parse(response.result);
- }
- return response;
- });
- });
- }
- getSelfDeclarationByDate(declarationdate, month) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/crm/contacts/getselfdeclarationbydate/declarationdate/' + declarationdate + '/month/' + month;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- return response;
- });
- });
- }
- getOrganizationDetailsByspocid(orgContactId) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/crm/organization/getorganizationbyspocid/orgcontactid/' + orgContactId;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null && response.result != "")
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- getCustomerLocations() {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/crm/contacts/getcustomerlocations';
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null && response.result != "")
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- changeManager(obj) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/crm/changemanagers/updatemanagerdetails';
- return yield this.dataHelper().postAsync(url, obj).then(function (response) {
- return response;
- });
- });
- }
- GetCustomersubtypeDetails(Customertypeid) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/crm/leads/getcustomersubtypes/customertypeid/' + Customertypeid;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- GetCustomerQualificationDetails(Customerqualificationid) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/crm/leads/getcustomerqualificationdetails/customerqualificationmatrixid/' + Customerqualificationid;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- GetCustomerSubType(customersubtypeid) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/crm/leads/getcustomersubtypebyid/customersubtypeid/' + customersubtypeid;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- getEmployeeBrekUp(tagids, fromdate, todate, ownerid, employeeid) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/crm/employees/breakupbyemployeecount/tagids/' + tagids + '/fromdate/' + fromdate + '/todate/' + todate + '/ownerid/' + ownerid + '/employeeid/' + employeeid;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null) {
- response.result = JSON.parse(response.result);
- }
- return response;
- });
- });
- }
- getEmployeeBrekUpDesignation(tagids, fromdate, todate, ownerid, employeeid) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/crm/employees/breakupemployeecountbydesignation/tagids/' + tagids + '/fromdate/' + fromdate + '/todate/' + todate + '/ownerid/' + ownerid + '/employeeid/' + employeeid;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null) {
- response.result = JSON.parse(response.result);
- }
- return response;
- });
- });
- }
- getEmployee(employeeid) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/crm/employees/getemployeebyid/employeeid/' + employeeid;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- updateCheckList(workflowchecklistid, leadid, checkliststatus) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/crm/leads/updatechecklist/workflowchecklistid/' + workflowchecklistid + '/leadid/' + leadid + '/checkliststatus/' + checkliststatus;
- return yield this.dataHelper().postAsync(url, null).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- getChecklist(Leadid) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/crm/leads/getleadchecklists/leadid/' + Leadid;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- getalldistributornames() {
- return __awaiter(this, void 0, void 0, function* () {
- debugger;
- const url = 'apis/v4/bizgaze/crm/employees/getalldistributornames';
- 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 ContactManager();
- return this._instance;
- }
- }
- Managers.ContactManager = ContactManager;
- })(Managers = Contacts.Managers || (Contacts.Managers = {}));
- })(Contacts = Crm.Contacts || (Crm.Contacts = {}));
- })(Crm = Apps.Crm || (Apps.Crm = {}));
- })(Apps = Bizgaze.Apps || (Bizgaze.Apps = {}));
- })(Bizgaze || (Bizgaze = {}));
|