/** Angular Imports */ import { Injectable } from '@angular/core' ; import { HttpClient , HttpParams } from '@angular/common/http' ; /** rxjs Imports */ import { Observable } from 'rxjs' ; /**
 * System service.
 */ @ Injectable ( { providedIn : 'root' } ) export class SystemService { param { HttpClient } http constructor ( private http ) { } returns { Observable < any > } getDataTables ( ) { return this . http . get ( '/datatables' ) ; } returns { Observable < any > } getHooks ( ) { return this . http . get ( '/hooks' ) ; } param { string } hookId returns { Observable < any > } getHook ( hookId ) { return this . http . get ( `/hooks/${ hookId }` ) ; } returns { Observable < any > } getHooksTemplate ( ) { return this . http . get ( '/hooks/template' ) ; } param { any } hook returns { Observable < any > } createHook ( hook ) { return this . http . post ( '/hooks' , hook ) ; } param { string } hookId param { any } hook returns { Observable < any > } updateHook ( hookId , hook ) { return this . http . put ( `/hooks/${ hookId }` , hook ) ; } param { string } hookId returns { Observable < any > } deleteHook ( hookId ) { return this . http . delete ( `/hooks/${ hookId }` ) ; } returns { Observable < any > } getRoles ( ) { return this . http . get ( '/roles' ) ; } returns { Observable < any > } getRole ( roleId ) { return this . http . get ( `/roles/${ roleId }/permissions` ) ; } param role param roleId returns { Observable < any > } updateRole ( role , roleId ) { return this . http . put ( `/roles/${ roleId }` , role ) ; } param roleID param roleValueChanges returns { Observable < any > } updateRolePermission ( roleId , roleValueChanges ) { return this . http . put ( `/roles/${ roleId }/permissions` , roleValueChanges ) ; } param roleId returns { Observable < any > } deleteRole ( roleId ) { return this . http . delete ( `/roles/${ roleId }` ) ; } param { any } role returns { Observable < any > } createRole ( role ) { return this . http . post ( '/roles' , role ) ; } param roleId returns { Observable < any > } enableRole ( roleId ) { const httpParams = new HttpParams ( ) . set ( 'command' , 'enable' ) ; return this . http . post ( `/roles/${ roleId }` , { } , { params : httpParams } ) ; } param roleId returns { Observable < any > } disableRole ( roleId ) { const httpParams = new HttpParams ( ) . set ( 'command' , 'disable' ) ; return this . http . post ( `/roles/${ roleId }` , { } , { params : httpParams } ) ; } returns { Observable < any > } getCodes ( ) { return this . http . get ( '/codes' ) ; } param codeId returns { Observable < any > } getCode ( codeId ) { return this . http . get ( `/codes/${ codeId }` ) ; } param code param codeId returns { Observable < any > } updateCode ( code , codeId ) { return this . http . put ( `/codes/${ codeId }` , code ) ; } param codeId returns { Observable < any > } getCodeValues ( codeId ) { return this . http . get ( `/codes/${ codeId }/codevalues` ) ; } param codeId param codeValueId returns { Observable < any > } deleteCodeValue ( codeId , codeValueId ) { return this . http . delete ( `/codes/${ codeId }/codevalues/${ codeValueId }` ) ; } param codeId param codeValueId param codeValueChanges returns { Observable < any > } updateCodeValue ( codeId , codeValueId , codeValueChanges ) { return this . http . put ( `/codes/${ codeId }/codevalues/${ codeValueId }` , codeValueChanges ) ; } param codeId param codeValueId returns { Observable < any > } createCodeValue ( codeId , codeValue ) { return this . http . post ( `/codes/${ codeId }/codevalues` , codeValue ) ; } param codeId returns { Observable < any > } deleteCode ( codeId ) { return this . http . delete ( `/codes/${ codeId }` ) ; } returns { Observable < any > } getSurveys ( ) { return this . http . get ( '/surveys' ) ; } param { any } survey returns { Observable < any > } createSurvey ( survey ) { return this . http . post ( '/surveys' , survey ) ; } param { string } reportId returns { Observable < any > } getSurvey ( surveyId ) { return this . http . get ( `/surveys/${ surveyId }?template=true` ) ; } returns { Observable < any > } getJobs ( ) { return this . http . get ( '/jobs' ) ; } returns { Observable < any > } getScheduler ( ) { return this . http . get ( '/scheduler' ) ; } param jobId returns { Observable < any > } getSelectedJob ( jobId ) { return this . http . get ( `/jobs/${ jobId }` ) ; } param { string } jobId param { any } Job returns { Observable < any > } updateScheduler ( jobId , job ) { return this . http . put ( `/jobs/${ jobId }` , job ) ; } getHistoryScheduler ( jobId ) { return this . http . get ( `/jobs/${ jobId }/runhistory` ) ; } param { any } code returns { Observable < any > } createCode ( code ) { return this . http . post ( '/codes' , code ) ; } param { any } dataTable return { Observable < any > } createDataTable ( dataTable ) { return this . http . post ( '/datatables' , dataTable ) ; } param dataTableName return { Observable < any > } getDataTable ( dataTableName ) { return this . http . get ( `/datatables/${ dataTableName }` ) ; } param dataTableName return { Observable < any > } deleteDataTable ( dataTableName ) { return this . http . delete ( `/datatables/${ dataTableName }` ) ; } param dataTable param dataTableName return { Observable < any > } updateDataTable ( dataTable , dataTableName ) { return this . http . put ( `/datatables/${ dataTableName }` , dataTable ) ; } returns { Observable < any > } getConfigurations ( ) { return this . http . get ( '/configurations' ) ; } param { string } configurationId returns { Observable < any > } getConfiguration ( configurationId ) { return this . http . get ( `/configurations/${ configurationId }` ) ; } param { string } configurationId param { any } configuration returns { Observable < any > } updateConfiguration ( configurationId , configuration ) { return this . http . put ( `/configurations/${ configurationId }` , configuration ) ; } param { string } externalConfigurationName returns { Observable < any > } getExternalConfiguration ( externalConfigurationName ) { return this . http . get ( `/externalservice/${ externalConfigurationName }` ) ; } param { string } externalConfigurationName param { any } externalConfiguration returns { Observable < any > } updateExternalConfiguration ( externalConfigurationName , externalConfiguration ) { return this . http . put ( `/externalservice/${ externalConfigurationName }` , externalConfiguration ) ; } returns { Observable < any > } getAccountNumberPreferences ( ) { return this . http . get ( '/accountnumberformats' ) ; } returns { Observable < any > } getAccountNumberPreferencesTemplate ( ) { return this . http . get ( '/accountnumberformats/template' ) ; } param { string } accountNumberPreferenceId returns { Observable < any > } getAccountNumberPreference ( accountNumberPreferenceId ) { return this . http . get ( `/accountnumberformats/${ accountNumberPreferenceId }` ) ; } param accountNumberPreference returns { Observable < any > } createAccountNumberPreference ( accountNumberPreference ) { return this . http . post ( '/accountnumberformats' , accountNumberPreference ) ; } param { string } accountNumberPreferenceId returns { Observable < any > } deleteAccountNumberPreference ( accountNumberPreferenceId ) { return this . http . delete ( `/accountnumberformats/${ accountNumberPreferenceId }` ) ; } param { string } accountNumberPreferenceId param { any } accountNumberPreferenceChanges returns { Observable < any > } updateAccountNumberPreference ( accountNumberPreferenceId , accountNumberPreferenceChanges ) { return this . http . put ( `/accountnumberformats/${ accountNumberPreferenceId }` , accountNumberPreferenceChanges ) ; } returns { Observable < any > } getReports ( ) { return this . http . get ( '/reports' ) ; } param { string } reportId returns { Observable < any > } getReport ( reportId ) { return this . http . get ( `/reports/${ reportId }?template=true` ) ; } returns { Observable < any > } getReportTemplate ( ) { return this . http . get ( '/reports/template' ) ; } param { any } report returns { Observable < any > } createReport ( report ) { return this . http . post ( '/reports' , report ) ; } param { string } reportId param { any } report returns { Observable < any > } updateReport ( reportId , report ) { return this . http . put ( `/reports/${ reportId }` , report ) ; } param { string } reportId returns { Observable < any > } deleteReport ( reportId ) { return this . http . delete ( `/reports/${ reportId }` ) ; } param { any } filterBy param { string } orderBy param { string } sortOrder param { number } offset param { number } limit returns { Observable < any > } getAuditTrails ( filterBy , orderBy , sortOrder , offset , limit ) { let httpParams = new HttpParams ( ) . set ( 'offset' , offset . toString ( ) ) . set ( 'limit' , limit . toString ( ) ) . set ( 'sortOrder' , sortOrder ) . set ( 'orderBy' , orderBy ) . set ( 'paged' , 'true' ) ; filterBy . forEach ( function ( filter ) { if ( filter . value !== '' ) { httpParams = httpParams . set ( filter . type , filter . value ) ; } } ) ; return this . http . get ( '/audits' , { params : httpParams } ) ; } param { string } auditTrailId returns { Observable < any > } getAuditTrail ( auditTrailId ) { return this . http . get ( `/audits/${ auditTrailId }` ) ; } returns { Observable < any > } getAuditTrailSearchTemplate ( ) { return this . http . get ( '/audits/searchtemplate' ) ; } returns { Observable < any > } getEntityMappings ( ) { return this . http . get ( '/entitytoentitymapping' ) ; } param mappingId param fromId param toId returns { Observable < any > } getEntitytoEntityData ( mappingId , fromId , toId ) { return this . http . get ( `/entitytoentitymapping/${ mappingId }/${ fromId }/${ toId }` ) ; } param mapId getMapIdData ( mapId ) { return this . http . get ( `/entitytoentitymapping/${ mapId }` ) ; } param { any } mapType param { any } mapData returns { Observable < any > } createMapping ( mapType , mapData ) { return this . http . post ( `/entitytoentitymapping/${ mapType }` , mapData ) ; } param { any } mapType param { any } mapData returns { Observable < any > } editMapping ( mapId , mapData ) { return this . http . put ( `/entitytoentitymapping/${ mapId }` , mapData ) ; } param mapId deleteMapping ( mapId ) { return this . http . delete ( `/entitytoentitymapping/${ mapId }` ) ; } returns { Observable < any > } getOffices ( ) { return this . http . get ( '/offices' ) ; } returns { Observable < any > } getLoanProducts ( ) { return this . http . get ( '/loanproducts' ) ; } returns { Observable < any > } getSavingProducts ( ) { return this . http . get ( '/savingsproducts' ) ; } returns { Observable < any > } getCharges ( ) { return this . http . get ( '/charges' ) ; } returns { Observable < any > } getMakerCheckerPermissions ( ) { const httpParams = new HttpParams ( ) . set ( 'makerCheckerable' , 'true' ) ; return this . http . get ( '/permissions' , { params : httpParams } ) ; } param data returns { Observable < any > } updateMakerCheckerPermission ( data ) { const httpParams = new HttpParams ( ) . set ( 'makerCheckerable' , 'true' ) ; return this . http . put ( '/permissions' , data , { params : httpParams } ) ; } }