UNPKG

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

Version:
96 lines (95 loc) 5.56 kB
import { HttpClient, HttpHeaders, HttpResponse, HttpEvent, HttpParameterCodec, HttpContext } from '@angular/common/http'; import { Observable } from 'rxjs'; import { ConfigValueFilter } from '../model/configValueFilter'; import { ConfigValueUpdateFilter } from '../model/configValueUpdateFilter'; import { Configuration } from '../model/configuration'; import { ConfigurationSingle } from '../model/configurationSingle'; import { PolymorphicProperty } from '../model/polymorphicProperty'; import { HttpConfiguration } from '../configuration'; import * as i0 from "@angular/core"; export declare class ConfigurationService { protected httpClient: HttpClient; protected basePath: string; defaultHeaders: HttpHeaders; configuration: HttpConfiguration; encoder: HttpParameterCodec; constructor(httpClient: HttpClient, basePath: string | string[], configuration: HttpConfiguration); /** * @param consumes string[] mime-types * @return true: consumes contains 'multipart/form-data', false: otherwise */ private canConsumeForm; private addToHttpParams; private addToHttpParamsRecursive; /** * Get Firefly III system configuration values. * Returns all editable and not-editable configuration values for this Firefly III installation * @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. */ getConfiguration(xTraceId?: string, observe?: 'body', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json' | 'application/x-www-form-urlencoded'; context?: HttpContext; transferCache?: boolean; }): Observable<Array<Configuration>>; getConfiguration(xTraceId?: string, observe?: 'response', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json' | 'application/x-www-form-urlencoded'; context?: HttpContext; transferCache?: boolean; }): Observable<HttpResponse<Array<Configuration>>>; getConfiguration(xTraceId?: string, observe?: 'events', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json' | 'application/x-www-form-urlencoded'; context?: HttpContext; transferCache?: boolean; }): Observable<HttpEvent<Array<Configuration>>>; /** * Get a single Firefly III system configuration value * Returns one configuration variable for this Firefly III installation * @param name The name of the configuration value you want to know. * @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. */ getSingleConfiguration(name: ConfigValueFilter, xTraceId?: string, observe?: 'body', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean; }): Observable<ConfigurationSingle>; getSingleConfiguration(name: ConfigValueFilter, xTraceId?: string, observe?: 'response', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean; }): Observable<HttpResponse<ConfigurationSingle>>; getSingleConfiguration(name: ConfigValueFilter, xTraceId?: string, observe?: 'events', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean; }): Observable<HttpEvent<ConfigurationSingle>>; /** * Update configuration value * Set a single configuration value. Not all configuration values can be updated so the list of accepted configuration variables is small. * @param name The name of the configuration value you want to update. * @param value * @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. */ setConfiguration(name: ConfigValueUpdateFilter, value: PolymorphicProperty, xTraceId?: string, observe?: 'body', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean; }): Observable<ConfigurationSingle>; setConfiguration(name: ConfigValueUpdateFilter, value: PolymorphicProperty, xTraceId?: string, observe?: 'response', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean; }): Observable<HttpResponse<ConfigurationSingle>>; setConfiguration(name: ConfigValueUpdateFilter, value: PolymorphicProperty, xTraceId?: string, observe?: 'events', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean; }): Observable<HttpEvent<ConfigurationSingle>>; static ɵfac: i0.ɵɵFactoryDeclaration<ConfigurationService, [null, { optional: true; }, { optional: true; }]>; static ɵprov: i0.ɵɵInjectableDeclaration<ConfigurationService>; }