import { IMineMeldAPIService } from './minemeldapi' ; export interface IMinemeldValidateService { syslogMinerRule ( rule ) : angular . IPromise < any > ; } interface IMinemeldValidateResource extends angular . resource . IResourceClass < angular . resource . IResource < any > > { post ( params , postdata ) ; } export class MinemeldValidateService implements IMinemeldValidateService { $state : angular . ui . IStateService ; $q : angular . IQService ; MineMeldAPIService : IMineMeldAPIService ; ngInject constructor ( $resource , $state , $q , MineMeldAPIService ) { this . $state = $state ; this . $q = $q ; this . MineMeldAPIService = MineMeldAPIService ; } syslogMinerRule ( rule ) { var r ; r = < IMinemeldValidateResource > ( this . MineMeldAPIService . getAPIResource ( '/validate/syslogminerrule' , { } , { post : { method : 'POST' } } ) ) ; return r . post ( { } , JSON . stringify ( rule ) ) . $promise . then ( ( result ) => { return result . result ; } ) ; } }