UNPKG

@nikhil-patil/ngx-firefly-iii-api-client

Version:
191 lines (190 loc) 11.9 kB
import { HttpClient, HttpHeaders, HttpResponse, HttpEvent, HttpParameterCodec, HttpContext } from '@angular/common/http'; import { Observable } from 'rxjs'; import { RuleArray } from '../model/ruleArray'; import { RuleSingle } from '../model/ruleSingle'; import { RuleStore } from '../model/ruleStore'; import { RuleUpdate } from '../model/ruleUpdate'; import { TransactionArray } from '../model/transactionArray'; import { HttpConfiguration } from '../configuration'; import * as i0 from "@angular/core"; export declare class RulesService { protected httpClient: HttpClient; protected basePath: string; defaultHeaders: HttpHeaders; configuration: HttpConfiguration; encoder: HttpParameterCodec; constructor(httpClient: HttpClient, basePath: string | string[], configuration: HttpConfiguration); private addToHttpParams; private addToHttpParamsRecursive; /** * Delete an rule. * Delete an rule. * @param id The ID of the rule. * @param xTraceId Unique identifier associated with this request. * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ deleteRule(id: string, xTraceId?: string, observe?: 'body', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean; }): Observable<any>; deleteRule(id: string, xTraceId?: string, observe?: 'response', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean; }): Observable<HttpResponse<any>>; deleteRule(id: string, xTraceId?: string, observe?: 'events', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean; }): Observable<HttpEvent<any>>; /** * Fire the rule on your transactions. * Fire the rule group on your transactions. Changes will be made by the rules in the group! Limit the result if you want to. * @param id The ID of the rule. * @param xTraceId Unique identifier associated with this request. * @param start A date formatted YYYY-MM-DD, to limit the transactions the actions will be applied to. If the start date is not present, it will be set to one year ago. If you use this field, both the start date and the end date must be present. * @param end A date formatted YYYY-MM-DD, to limit the transactions the actions will be applied to. If the end date is not present, it will be set to today. If you use this field, both the start date and the end date must be present. * @param accounts Limit the triggering of the rule to these asset accounts or liabilities. Only asset accounts and liabilities will be accepted. Other types will be silently dropped. * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ fireRule(id: string, xTraceId?: string, start?: string, end?: string, accounts?: Array<number>, observe?: 'body', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean; }): Observable<any>; fireRule(id: string, xTraceId?: string, start?: string, end?: string, accounts?: Array<number>, observe?: 'response', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean; }): Observable<HttpResponse<any>>; fireRule(id: string, xTraceId?: string, start?: string, end?: string, accounts?: Array<number>, observe?: 'events', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean; }): Observable<HttpEvent<any>>; /** * Get a single rule. * Get a single rule. * @param id The ID of the object. * @param xTraceId Unique identifier associated with this request. * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ getRule(id: string, xTraceId?: string, observe?: 'body', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/vnd.api+json' | 'application/json'; context?: HttpContext; transferCache?: boolean; }): Observable<RuleSingle>; getRule(id: string, xTraceId?: string, observe?: 'response', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/vnd.api+json' | 'application/json'; context?: HttpContext; transferCache?: boolean; }): Observable<HttpResponse<RuleSingle>>; getRule(id: string, xTraceId?: string, observe?: 'events', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/vnd.api+json' | 'application/json'; context?: HttpContext; transferCache?: boolean; }): Observable<HttpEvent<RuleSingle>>; /** * List all rules. * List all rules. * @param xTraceId Unique identifier associated with this request. * @param limit Number of items per page. The default pagination is per 50 items. * @param page Page number. The default pagination is per 50 items. * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ listRule(xTraceId?: string, limit?: number, page?: number, observe?: 'body', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/vnd.api+json' | 'application/json'; context?: HttpContext; transferCache?: boolean; }): Observable<RuleArray>; listRule(xTraceId?: string, limit?: number, page?: number, observe?: 'response', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/vnd.api+json' | 'application/json'; context?: HttpContext; transferCache?: boolean; }): Observable<HttpResponse<RuleArray>>; listRule(xTraceId?: string, limit?: number, page?: number, observe?: 'events', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/vnd.api+json' | 'application/json'; context?: HttpContext; transferCache?: boolean; }): Observable<HttpEvent<RuleArray>>; /** * Store a new rule * Creates a new rule. The data required can be submitted as a JSON body or as a list of parameters. * @param ruleStore JSON array or key&#x3D;value pairs with the necessary rule information. See the model for the exact specifications. * @param xTraceId Unique identifier associated with this request. * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ storeRule(ruleStore: RuleStore, xTraceId?: string, observe?: 'body', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/vnd.api+json' | 'application/json'; context?: HttpContext; transferCache?: boolean; }): Observable<RuleSingle>; storeRule(ruleStore: RuleStore, xTraceId?: string, observe?: 'response', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/vnd.api+json' | 'application/json'; context?: HttpContext; transferCache?: boolean; }): Observable<HttpResponse<RuleSingle>>; storeRule(ruleStore: RuleStore, xTraceId?: string, observe?: 'events', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/vnd.api+json' | 'application/json'; context?: HttpContext; transferCache?: boolean; }): Observable<HttpEvent<RuleSingle>>; /** * Test which transactions would be hit by the rule. No changes will be made. * Test which transactions would be hit by the rule. No changes will be made. Limit the result if you want to. * @param id The ID of the rule. * @param xTraceId Unique identifier associated with this request. * @param start A date formatted YYYY-MM-DD, to limit the transactions the test will be applied to. Both the start date and the end date must be present. * @param end A date formatted YYYY-MM-DD, to limit the transactions the test will be applied to. Both the start date and the end date must be present. * @param accounts Limit the testing of the rule to these asset accounts or liabilities. Only asset accounts and liabilities will be accepted. Other types will be silently dropped. * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ testRule(id: string, xTraceId?: string, start?: string, end?: string, accounts?: Array<number>, observe?: 'body', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/vnd.api+json' | 'application/json'; context?: HttpContext; transferCache?: boolean; }): Observable<TransactionArray>; testRule(id: string, xTraceId?: string, start?: string, end?: string, accounts?: Array<number>, observe?: 'response', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/vnd.api+json' | 'application/json'; context?: HttpContext; transferCache?: boolean; }): Observable<HttpResponse<TransactionArray>>; testRule(id: string, xTraceId?: string, start?: string, end?: string, accounts?: Array<number>, observe?: 'events', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/vnd.api+json' | 'application/json'; context?: HttpContext; transferCache?: boolean; }): Observable<HttpEvent<TransactionArray>>; /** * Update existing rule. * Update existing rule. * @param id The ID of the object. * @param ruleUpdate JSON array with updated rule information. See the model for the exact specifications. * @param xTraceId Unique identifier associated with this request. * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ updateRule(id: string, ruleUpdate: RuleUpdate, xTraceId?: string, observe?: 'body', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/vnd.api+json' | 'application/json'; context?: HttpContext; transferCache?: boolean; }): Observable<RuleSingle>; updateRule(id: string, ruleUpdate: RuleUpdate, xTraceId?: string, observe?: 'response', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/vnd.api+json' | 'application/json'; context?: HttpContext; transferCache?: boolean; }): Observable<HttpResponse<RuleSingle>>; updateRule(id: string, ruleUpdate: RuleUpdate, xTraceId?: string, observe?: 'events', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/vnd.api+json' | 'application/json'; context?: HttpContext; transferCache?: boolean; }): Observable<HttpEvent<RuleSingle>>; static ɵfac: i0.ɵɵFactoryDeclaration<RulesService, [null, { optional: true; }, { optional: true; }]>; static ɵprov: i0.ɵɵInjectableDeclaration<RulesService>; }