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F,2BAAiGjH,QAAO,SAA7ED,EAAkB4E,EAAsBuC,yBAAA,IAAAA,IAAAA,GAAA,6CAIlD,OAHTjH,EAAWC,EAAAC,EAAYC,mBAAmBuC,SAASoE,aACnDzG,EAAML,EAASK,MAEN,GAAMV,KAAKF,KAAKa,MAAMD,EAAK,CACxCyB,MAAM,EAAAC,EAAAC,IAAK,CAAClC,SAAUA,EAAU4E,aAAcA,EAAcuC,oBAAmBA,IAC/EZ,QAASrG,EAASqG,QAClB9F,OAAQP,EAASO,iBAGnB,OANMC,EAASC,EAAAC,QAMJC,GAAK,GAAOH,EAAOI,kBAG1BpB,EAAAI,UAAAsH,mBAAN,SAAyBC,wBAAapH,QAAO,sEAI5B,OAHTC,EAAWC,EAAAC,EAAYC,mBAAmBuC,SAASwE,mBACnD7G,EAAML,EAASK,IAAI,CAAC8G,IAEX,GAAMxH,KAAKF,KAAKa,MAAMD,EAAK,CAAEE,OAAQP,EAASO,iBAC7D,OADMC,EAASC,EAAAC,QACJC,GAAK,GAAOH,EAAOI,kBAG1BpB,EAAAI,UAAAwH,iBAAN,SAAuBD,wBAAapH,QAAO,sEAI1B,OAHTC,EAAWC,EAAAC,EAAYC,mBAAmBuC,SAAS0E,iBACnD/G,EAAML,EAASK,IAAI,CAAC8G,IAEX,GAAMxH,KAAKF,KAAKa,MAAMD,EAAK,CAAEE,OAAQP,EAASO,iBAC7D,OADMC,EAASC,EAAAC,QACJC,GAAK,GAAOH,EAAOI,qVAralByG,CAAA,EADf,EAAAC,EAAAC,qCAEqC,8BAAVxF,EAAAyF,IAAAzF,EAAAyF,IAAU/G,EAAAgH,OAA0C,mBAA1CC,OAA0C,IAAfC,EAAAC,GAAAD,EAAAC,GAAeF,EAAAD,UADnEjI,GAAb","sources":["webpack://iadviser/./src/components/document-management/api.ts"],"sourcesContent":["import { DocumentService } from './document-service';\r\nimport { autoinject } from 'aurelia-framework';\r\nimport { HttpClient, json } from 'aurelia-fetch-client';\r\nimport { environment } from 'environment';\r\nimport * as Dtos from 'components/document-management/dtos';\r\nimport { Operation } from 'resources/models/operation';\r\nimport { Guid } from 'components/forms/phone-number/insecure-guid';\r\n\r\n@autoinject()\r\nexport class Api {\r\n constructor(private http: HttpClient, private documentService: DocumentService) { }\r\n\r\n async fillDocumentTree(clientId: number): Promise {\r\n const endpoint = environment.documentManagement.fillDocTree;\r\n const uri = endpoint.uri([clientId]);\r\n\r\n const result = await this.http.fetch(uri, { method: endpoint.method });\r\n if (result.ok) { return result.json(); }\r\n }\r\n\r\n async getConfig(clientId: number): Promise {\r\n const endpoint = environment.documentManagement.config;\r\n const uri = endpoint.uri([clientId]);\r\n\r\n const result = await this.http.fetch(uri, { method: endpoint.method });\r\n if (result.ok) { return result.json(); }\r\n }\r\n\r\n async getAllFolders(clientId: number): Promise {\r\n const endpoint = environment.documentManagement.folder.getAllFolders;\r\n const uri = endpoint.uri([clientId]);\r\n\r\n const result = await this.http.fetch(uri, { method: endpoint.method });\r\n if (result.ok) { return result.json(); }\r\n }\r\n\r\n async getFolderById(clientId: number, folderId: number, ignoreDocs = false): Promise {\r\n const endpoint = environment.documentManagement.folder.getAllFoldersByFolderId;\r\n const fileTypes = this.documentService.currentSortingValue === '' ? null : this.documentService.currentSortingValue.split(',');\r\n\r\n const uri = endpoint.uri([clientId, folderId, ignoreDocs, fileTypes]);\r\n\r\n const result = await this.http.fetch(uri, { method: endpoint.method });\r\n if (result.ok) { return result.json(); }\r\n }\r\n\r\n async getAllFoldersByFolderId(clientId: number, folderId: number, ignoreDocs = false): Promise {\r\n const endpoint = environment.documentManagement.folder.getAllFoldersByFolderId;\r\n const fileTypes = this.documentService.currentSortingValue === '' ? null : this.documentService.currentSortingValue.split(',');\r\n\r\n const uri = endpoint.uri([clientId, folderId, ignoreDocs, fileTypes]);\r\n\r\n const result = await this.http.fetch(uri, { method: endpoint.method });\r\n if (result.ok) { return result.json(); }\r\n }\r\n\r\n async getFolderBreadcrumbs(clientId: number, folderId: number): Promise {\r\n const endpoint = environment.documentManagement.folder.getFolderBreadcrumbs;\r\n const uri = endpoint.uri([clientId, folderId]);\r\n\r\n const result = await this.http.fetch(uri, { method: endpoint.method });\r\n if (result.ok) { return result.json(); }\r\n }\r\n\r\n async addFolder(clientId: number, newFolder: Dtos.AddFolder): Promise {\r\n const endpoint = environment.documentManagement.folder.addFolder;\r\n const uri = endpoint.uri([clientId, newFolder.parentFolderId]);\r\n\r\n const result = await this.http.fetch(uri, {\r\n method: endpoint.method,\r\n body: json(newFolder)\r\n });\r\n\r\n return result.ok;\r\n }\r\n\r\n async updateFolder(clientId: number, updatedFolder: Dtos.UpdateFolder): Promise {\r\n const endpoint = environment.documentManagement.folder.updateFolder;\r\n const uri = endpoint.uri([clientId, updatedFolder.folderId]);\r\n\r\n const result = await this.http.fetch(uri, {\r\n method: endpoint.method,\r\n body: json(updatedFolder)\r\n });\r\n\r\n return result.ok;\r\n }\r\n\r\n async deleteFolder(clientId: number, folderId: number): Promise {\r\n const endpoint = environment.documentManagement.folder.deleteFolder;\r\n const uri = endpoint.uri([clientId, folderId]);\r\n\r\n const result = await this.http.fetch(uri, { method: endpoint.method });\r\n\r\n return result.ok;\r\n }\r\n\r\n async getRecentDocuments(clientId: number): Promise {\r\n const endpoint = environment.documentManagement.recent;\r\n const fileTypes = this.documentService.currentSortingValue === '' ? null : this.documentService.currentSortingValue.split(',');\r\n\r\n const uri = endpoint.uri([clientId, fileTypes]);\r\n\r\n const result = await this.http.fetch(uri, { method: endpoint.method });\r\n if (result.ok) { return result.json(); }\r\n }\r\n\r\n async searchDocuments(clientId: number, searchPhrase: string, includeTasks = false): Promise {\r\n const endpoint = environment.documentManagement.document.search;\r\n const fileTypes = this.documentService.currentSortingValue === '' ? null : this.documentService.currentSortingValue.split(',');\r\n\r\n const uri = endpoint.uri([clientId, searchPhrase, includeTasks, fileTypes]);\r\n\r\n const result = await this.http.fetch(uri, { method: endpoint.method });\r\n if (result.ok) { return result.json(); }\r\n }\r\n\r\n async getFolderDocuments(clientId: number, folderId: number): Promise {\r\n const endpoint = environment.documentManagement.document.getFolderDocuments;\r\n const fileTypes = this.documentService.currentSortingValue === '' ? null : this.documentService.currentSortingValue.split(',');\r\n\r\n const uri = endpoint.uri([clientId, folderId, fileTypes]);\r\n\r\n const result = await this.http.fetch(uri, { method: endpoint.method });\r\n if (result.ok) { return result.json(); }\r\n }\r\n\r\n async getDocumentUrl(clientId: number, folderId: number, documentId: number): Promise {\r\n const endpoint = environment.documentManagement.document.getDocumentUrl;\r\n const uri = endpoint.uri([clientId, folderId, documentId]);\r\n\r\n const result = await this.http.fetch(uri, { method: endpoint.method });\r\n if (result.ok) { return result.json(); }\r\n }\r\n\r\n async uploadTemporaryDocument(clientId: number, document): Promise {\r\n const endpoint = environment.documentManagement.upload;\r\n const uri = endpoint.uri([clientId]);\r\n\r\n try {\r\n const formData = new FormData();\r\n\r\n formData.append(`File`, document);\r\n\r\n const result = await this.http.fetch(uri, {\r\n method: endpoint.method,\r\n body: formData\r\n });\r\n\r\n if (result.ok) {\r\n return result.text();\r\n }\r\n } catch (error) {\r\n console.log(error)\r\n }\r\n }\r\n\r\n async addTemporaryDocument(clientId: number, folderId: number, fileName, allowableTypeId, blobUri: string): Promise {\r\n const endpoint = environment.documentManagement.document.addDocument;\r\n const uri = endpoint.uri([clientId, folderId]);\r\n\r\n try {\r\n const result = await this.http.fetch(uri, {\r\n method: endpoint.method,\r\n body: json({\r\n EntityDocumentFolderId: folderId,\r\n EntityDocumentAllowableTypeId: allowableTypeId,\r\n FileName: fileName,\r\n TempBlobUri: blobUri\r\n })\r\n });\r\n\r\n if (result.ok) {\r\n return result.json();\r\n }\r\n } catch (error) {\r\n console.log(error)\r\n }\r\n }\r\n\r\n async addDocument(clientId: number, folderId: number, document: Dtos.AddDocument): Promise {\r\n const endpoint = environment.documentManagement.document.addDocument;\r\n const uri = endpoint.uri([clientId, folderId]);\r\n\r\n try {\r\n const result = await this.http.fetch(uri, {\r\n method: endpoint.method,\r\n body: json(document)\r\n });\r\n\r\n if (result.ok) {\r\n return result.json();\r\n }\r\n } catch (error) {\r\n console.log(error)\r\n }\r\n }\r\n\r\n async updateDocument(clientId: number, originalFolderId: number, updatedDocument: Dtos.UpdateDocument): Promise {\r\n const endpoint = environment.documentManagement.document.updateDocument;\r\n const uri = endpoint.uri([clientId, originalFolderId, updatedDocument.entityDocumentId]);\r\n\r\n const result = await this.http.fetch(uri, {\r\n method: endpoint.method,\r\n body: json(updatedDocument)\r\n });\r\n\r\n return result.ok;\r\n }\r\n\r\n async patchDocument(clientId: number, originalFolderId: number, updatedDocument: Dtos.UpdateDocument, operation: Operation): Promise {\r\n const endpoint = environment.documentManagement.document.patchDocument;\r\n const uri = endpoint.uri([clientId, originalFolderId, updatedDocument.entityDocumentId]);\r\n const method = endpoint.method;\r\n\r\n const result = await this.http.fetch(uri, {\r\n body: json([operation]),\r\n method: method\r\n });\r\n\r\n return result.json();\r\n }\r\n\r\n async patchFileNote(clientId: number, entityTaskId: number, operation: Operation): Promise {\r\n const endpoint = environment.clientEndpoints.tasks.patch;\r\n const uri = endpoint.uri([clientId, entityTaskId]);\r\n const method = endpoint.method;\r\n\r\n const result = await this.http.fetch(uri, {\r\n body: json([operation]),\r\n method: method\r\n });\r\n\r\n return result.json();\r\n }\r\n\r\n async updateFileNote(clientId: number, entityTaskId: number, updatedDocument: Dtos.UpdateDocument): Promise {\r\n const endpoint = environment.clientEndpoints.tasks.update;\r\n const uri = endpoint.uri([clientId, entityTaskId, false]);\r\n\r\n const result = await this.http.fetch(uri, {\r\n method: endpoint.method,\r\n body: json(updatedDocument)\r\n });\r\n\r\n return result.ok;\r\n }\r\n\r\n async getFileNote(clientId: number, entityTaskId: number): Promise {\r\n const endpoint = environment.clientEndpoints.tasks.get;\r\n const uri = endpoint.uri([clientId, entityTaskId]);\r\n\r\n const result = await this.http.fetch(uri, {\r\n method: endpoint.method\r\n });\r\n\r\n return result.json();\r\n }\r\n\r\n async deleteDocument(clientId: number, folderId: number, documentId: number): Promise {\r\n const endpoint = environment.documentManagement.document.deleteDocument;\r\n const uri = endpoint.uri([clientId, folderId, documentId]);\r\n\r\n const result = await this.http.fetch(uri, { method: endpoint.method });\r\n\r\n return result.ok;\r\n }\r\n\r\n async deleteFileNote(clientId: number, entityTaskId: number): Promise {\r\n const endpoint = environment.clientEndpoints.tasks.delete;\r\n const uri = endpoint.uri([clientId, entityTaskId]);\r\n\r\n const result = await this.http.fetch(uri, { method: endpoint.method });\r\n\r\n return result.ok;\r\n }\r\n\r\n async getFolderActions(clientId: number, folderId: number): Promise {\r\n const endpoint = environment.documentManagement.action.getFolderActions;\r\n const uri = endpoint.uri([clientId, folderId]);\r\n\r\n const result = await this.http.fetch(uri, { method: endpoint.method });\r\n\r\n if (result.ok) {\r\n return result.json();\r\n }\r\n }\r\n\r\n async getDocumentActions(clientId: number, folderId: number, documentId: number): Promise {\r\n const endpoint = environment.documentManagement.action.getDocumentActions;\r\n const uri = endpoint.uri([clientId, folderId, documentId]);\r\n\r\n const result = await this.http.fetch(uri, { method: endpoint.method });\r\n\r\n if (result.ok) {\r\n return result.json();\r\n }\r\n }\r\n\r\n async getFileNoteActions(clientId: number, entityTaskId: number): Promise {\r\n const endpoint = environment.clientEndpoints.tasks.actions;\r\n const uri = endpoint.uri([clientId, entityTaskId]);\r\n\r\n const result = await this.http.fetch(uri);\r\n\r\n return result.json();\r\n }\r\n\r\n async getDocumentKeywords(clientId: number, folderId: number, documentId: number, isFileNote = false): Promise {\r\n const endpoint = environment.documentManagement.keyword.getDocumentKeywords;\r\n const uri = endpoint.uri([clientId, folderId, documentId, isFileNote]);\r\n\r\n const result = await this.http.fetch(uri, { method: endpoint.method });\r\n\r\n if (result.ok) {\r\n return result.json();\r\n }\r\n }\r\n\r\n async addDocumentKeyword(clientId: number, folderId: number, documentId: number, keyword: string): Promise {\r\n const endpoint = environment.documentManagement.keyword.addKeyword;\r\n const uri = endpoint.uri([clientId, folderId, documentId]);\r\n\r\n const result = await this.http.fetch(uri, {\r\n method: endpoint.method,\r\n body: json(keyword)\r\n });\r\n\r\n return result.ok;\r\n }\r\n\r\n async addFilenoteKeyword(clientId: number, taskId: number, body: string): Promise {\r\n const endpoint = environment.clientEndpoints.taskKeywords.add;\r\n const uri = endpoint.uri([clientId, taskId]);\r\n\r\n const result = await this.http.fetch(uri, {\r\n body: `\"${body}\"`,\r\n headers: endpoint.headers,\r\n method: endpoint.method\r\n });\r\n\r\n return result.ok;\r\n }\r\n\r\n async deleteDocumentKeyword(clientId: number, folderId: number, documentId: number, keywordId: number): Promise {\r\n const endpoint = environment.documentManagement.keyword.deleteKeyword;\r\n const uri = endpoint.uri([clientId, folderId, documentId, keywordId]);\r\n\r\n const result = await this.http.fetch(uri, { method: endpoint.method });\r\n\r\n return result.ok;\r\n }\r\n\r\n async deleteFilenoteKeyword(clientId: number, taskId: number, keywordId: number): Promise {\r\n const endpoint = environment.clientEndpoints.taskKeywords.delete;\r\n const uri = endpoint.uri([clientId, taskId, keywordId]);\r\n\r\n const result = await this.http.fetch(uri, {\r\n headers: endpoint.headers,\r\n method: endpoint.method\r\n });\r\n\r\n return result.ok;\r\n }\r\n\r\n async createFileNoteAction(clientId: number, taskId: number, body: any): Promise {\r\n const endpoint = environment.clientEndpoints.tasks.createAction;\r\n const uri = endpoint.uri([clientId, taskId]);\r\n\r\n const result = await this.http.fetch(uri, {\r\n body: json(body),\r\n headers: endpoint.headers,\r\n method: endpoint.method\r\n });\r\n\r\n return result.ok;\r\n }\r\n\r\n async createDocumentAction(clientId: number, folderId: number, documentId: number, body: any): Promise {\r\n const endpoint = environment.documentManagement.action.createAction;\r\n const uri = endpoint.uri([clientId, folderId, documentId]);\r\n\r\n const result = await this.http.fetch(uri, {\r\n body: json(body),\r\n headers: endpoint.headers,\r\n method: endpoint.method\r\n });\r\n\r\n return result.ok;\r\n }\r\n\r\n async convertDocumentToPdf(clientId: number, documentId: number): Promise{\r\n const endpoint = environment.documentManagement.document.convertToPdf;\r\n const uri = endpoint.uri();\r\n\r\n const result = await this.http.fetch(uri, {\r\n body: json({clientId: clientId, documentId: documentId}),\r\n headers: endpoint.headers,\r\n method: endpoint.method\r\n });\r\n\r\n if (result.ok) {return result.json();}\r\n }\r\n\r\n async convertFileNoteToPdf(clientId: number, entityTaskId: number, includeRelatedItems = false): Promise{\r\n const endpoint = environment.documentManagement.document.convertToPdf;\r\n const uri = endpoint.uri();\r\n\r\n const result = await this.http.fetch(uri, {\r\n body: json({clientId: clientId, entityTaskId: entityTaskId, includeRelatedItems}),\r\n headers: endpoint.headers,\r\n method: endpoint.method\r\n });\r\n\r\n if (result.ok) {return result.json();}\r\n }\r\n\r\n async convertToPdfStatus(guid: Guid): Promise{\r\n const endpoint = environment.documentManagement.document.convertToPdfStatus;\r\n const uri = endpoint.uri([guid]);\r\n\r\n const result = await this.http.fetch(uri, { method: endpoint.method });\r\n if (result.ok) {return result.json();}\r\n }\r\n\r\n async convertToPdfUrls(guid: Guid): Promise{\r\n const endpoint = environment.documentManagement.document.convertToPdfUrls;\r\n const uri = endpoint.uri([guid]);\r\n\r\n const result = await this.http.fetch(uri, { method: endpoint.method });\r\n if (result.ok) {return result.json();}\r\n }\r\n\r\n}\r\n"],"names":["Api","http","documentService","this","prototype","fillDocumentTree","clientId","Promise","endpoint","environment__WEBPACK_IMPORTED_MODULE_3__","c","documentManagement","fillDocTree","uri","fetch","method","result","_a","sent","ok","json","getConfig","config","getAllFolders","folder","getFolderById","clientId_1","folderId_1","folderId","ignoreDocs","getAllFoldersByFolderId","fileTypes","currentSortingValue","split","getFolderBreadcrumbs","addFolder","newFolder","parentFolderId","body","aurelia_fetch_client__WEBPACK_IMPORTED_MODULE_2__","Pq","updateFolder","updatedFolder","deleteFolder","getRecentDocuments","recent","searchDocuments","searchPhrase_1","searchPhrase","includeTasks","document","search","getFolderDocuments","getDocumentUrl","documentId","uploadTemporaryDocument","upload","formData","FormData","append","text","console","log","error_1","addTemporaryDocument","fileName","allowableTypeId","blobUri","addDocument","EntityDocumentFolderId","EntityDocumentAllowableTypeId","FileName","TempBlobUri","error_2","error_3","updateDocument","originalFolderId","updatedDocument","entityDocumentId","patchDocument","operation","patchFileNote","entityTaskId","clientEndpoints","tasks","patch","updateFileNote","update","getFileNote","get","deleteDocument","deleteFileNote","delete","getFolderActions","action","getDocumentActions","getFileNoteActions","actions","getDocumentKeywords","documentId_1","isFileNote","keyword","addDocumentKeyword","addKeyword","addFilenoteKeyword","taskId","taskKeywords","add","concat","headers","deleteDocumentKeyword","keywordId","deleteKeyword","deleteFilenoteKeyword","createFileNoteAction","createAction","createDocumentAction","convertDocumentToPdf","convertToPdf","convertFileNoteToPdf","entityTaskId_1","includeRelatedItems","convertToPdfStatus","guid","convertToPdfUrls","__decorate","aurelia_framework__WEBPACK_IMPORTED_MODULE_1__","autoinject","Qq","Object","_b","_document_service__WEBPACK_IMPORTED_MODULE_0__","D"],"sourceRoot":""}