Files
doneit-web/.angular/cache/14.2.12/babel-webpack/f832042f3d30f98257b4cc7ed950ce5d.json
T

1 line
43 KiB
JSON
Raw Normal View History

2023-06-30 09:54:21 +01:00
{"ast":null,"code":"import _asyncToGenerator from \"C:/Users/eudes.inacio/GabineteDigital/gabinete-digital-fo/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js\";\nimport { __decorate } from \"tslib\";\nimport { HttpHeaders, HttpParams } from '@angular/common/http';\nimport { Injectable } from '@angular/core';\nimport { HttpService } from './http.service';\nimport { StorageService } from './storage.service';\nimport { HttpClient } from '@angular/common/http';\nimport { environment } from 'src/environments/environment';\nimport { Storage } from '@ionic/storage';\nimport { PermissionService } from './permission.service';\nimport { SessionStore } from '../store/session.service';\nimport { ChangeProfileService } from 'src/app/services/change-profile.service';\nimport { NetworkServiceService, ConnectionStatus } from 'src/app/services/network-service.service';\nimport { RochetChatConnectorService } from 'src/app/services/chat/rochet-chat-connector.service';\nlet ChatService = class ChatService {\n constructor(http, httpService, storage, storageService, p, changeProfileService, NetworkServiceService, RochetChatConnectorService) {\n this.http = http;\n this.httpService = httpService;\n this.storage = storage;\n this.storageService = storageService;\n this.p = p;\n this.changeProfileService = changeProfileService;\n this.NetworkServiceService = NetworkServiceService;\n this.RochetChatConnectorService = RochetChatConnectorService;\n this.functionTimer = null;\n this.timerEventTriggerDate = null;\n this.timerEventTriggerDateLastUpdate = null;\n this.changeProfileService.registerCallback(() => {\n this.setheader();\n });\n }\n getDocumentDetails(url) {\n let headersc = new HttpHeaders();\n headersc = headersc.set('X-User-Id', SessionStore.user.ChatData.data.userId);\n headersc = headersc.set('X-Auth-Token', SessionStore.user.ChatData.data.authToken);\n headersc = headersc.set('Sec-Fetch-Dest', 'attachment');\n headersc = headersc.set('Sec-Fetch-Mode', 'navigate');\n headersc = headersc.set('Cookie', 'rc_uid=fsMwcNdufWvdnChj7');\n headersc = headersc.set('Cookie', 'rc_token=MLbhikLQI4xo9_vL43HqheKPPbxjag7hKfwxe9AjcvY');\n // headersc = headersc.set(\"Host\", \"www.tabularium.pt\");\n // headersc = headersc.set(\"Origin\", \"http://localhost:8100\");\n headersc = headersc.set('Referer', 'http://localhost:8100/');\n let optionsc = {\n headers: headersc,\n withCredentials: true\n };\n // let fullUrl = \"https://www.tabularium.pt/\" + url;\n return this.http.get(url, optionsc).subscribe(() => {\n // this.fileService.viewDocumentByUrl(url)\n });\n }\n getAllChannels() {\n return this.http.get(environment.apiChatUrl + 'channels.list', this.options);\n }\n getAllUserChannels() {\n return this.http.get(environment.apiChatUrl + 'channels.list.joined', this.options);\n }\n getAllRooms() {\n return this.http.get(environment.apiChatUrl + 'rooms.get', this.options);\n }\n getRoomInfo(roomId) {\n let params = new HttpParams();\n params = params.set(\"roomId\", roomId);\n let opts = {\n headers: this.headers,\n params: params\n };\n return this.http.get(environment.apiChatUrl + 'rooms.info', opts);\n }\n customsRooms(params) {\n let opts = {\n headers: this.headers,\n params: params\n };\n return this.http.get(environment.apiChatUrl + 'rooms.get', opts);\n }\n getAllPrivateGroups() {\n return this.http.get(environment.apiChatUrl + 'groups.list', this.options);\n }\n getAllUsers() {\n return this.http.get(environment.apiChatUrl + 'users.list', this.options);\n }\n getAllConnectedUsers() {\n return this.http.get(environment.apiChatUrl + 'users.presence', this.options);\n }\n //Load messages from roomId\n getAllDirectMessages() {\n return this.http.get(environment.apiChatUrl + 'im.list', this.options);\n }\n //Load messages from roomId\n getRoomMessages(roomId) {\n let params = new HttpParams();\n params = params.set(\"roomId\", roomId);\n l