UNPKG

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

Version:
420 lines (419 loc) 25.6 kB
import { HttpClient, HttpHeaders, HttpResponse, HttpEvent, HttpParameterCodec, HttpContext } from '@angular/common/http'; import { Observable } from 'rxjs'; import { AccountArray } from '../model/accountArray'; import { AccountTypeFilter } from '../model/accountTypeFilter'; import { AvailableBudgetArray } from '../model/availableBudgetArray'; import { BillArray } from '../model/billArray'; import { BudgetLimitArray } from '../model/budgetLimitArray'; import { CurrencyArray } from '../model/currencyArray'; import { CurrencySingle } from '../model/currencySingle'; import { CurrencyStore } from '../model/currencyStore'; import { CurrencyUpdate } from '../model/currencyUpdate'; import { RecurrenceArray } from '../model/recurrenceArray'; import { RuleArray } from '../model/ruleArray'; import { TransactionArray } from '../model/transactionArray'; import { TransactionTypeFilter } from '../model/transactionTypeFilter'; import { HttpConfiguration } from '../configuration'; import * as i0 from "@angular/core"; export declare class CurrenciesService { protected httpClient: HttpClient; protected basePath: string; defaultHeaders: HttpHeaders; configuration: HttpConfiguration; encoder: HttpParameterCodec; constructor(httpClient: HttpClient, basePath: string | string[], configuration: HttpConfiguration); private addToHttpParams; private addToHttpParamsRecursive; /** * Make currency default currency. * Make this currency the default currency for the user. If the currency is not enabled, it will be enabled as well. * @param code The currency code. * @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. */ defaultCurrency(code: string, xTraceId?: string, observe?: 'body', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/vnd.api+json' | 'application/json'; context?: HttpContext; transferCache?: boolean; }): Observable<CurrencySingle>; defaultCurrency(code: string, xTraceId?: string, observe?: 'response', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/vnd.api+json' | 'application/json'; context?: HttpContext; transferCache?: boolean; }): Observable<HttpResponse<CurrencySingle>>; defaultCurrency(code: string, xTraceId?: string, observe?: 'events', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/vnd.api+json' | 'application/json'; context?: HttpContext; transferCache?: boolean; }): Observable<HttpEvent<CurrencySingle>>; /** * Delete a currency. * Delete a currency. * @param code The currency code. * @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. */ deleteCurrency(code: string, xTraceId?: string, observe?: 'body', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean; }): Observable<any>; deleteCurrency(code: string, xTraceId?: string, observe?: 'response', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean; }): Observable<HttpResponse<any>>; deleteCurrency(code: string, xTraceId?: string, observe?: 'events', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean; }): Observable<HttpEvent<any>>; /** * Disable a currency. * Disable a currency. * @param code The currency code. * @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. */ disableCurrency(code: string, xTraceId?: string, observe?: 'body', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/vnd.api+json' | 'application/json'; context?: HttpContext; transferCache?: boolean; }): Observable<CurrencySingle>; disableCurrency(code: string, xTraceId?: string, observe?: 'response', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/vnd.api+json' | 'application/json'; context?: HttpContext; transferCache?: boolean; }): Observable<HttpResponse<CurrencySingle>>; disableCurrency(code: string, xTraceId?: string, observe?: 'events', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/vnd.api+json' | 'application/json'; context?: HttpContext; transferCache?: boolean; }): Observable<HttpEvent<CurrencySingle>>; /** * Enable a single currency. * Enable a single currency. * @param code The currency code. * @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. */ enableCurrency(code: string, xTraceId?: string, observe?: 'body', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/vnd.api+json' | 'application/json'; context?: HttpContext; transferCache?: boolean; }): Observable<CurrencySingle>; enableCurrency(code: string, xTraceId?: string, observe?: 'response', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/vnd.api+json' | 'application/json'; context?: HttpContext; transferCache?: boolean; }): Observable<HttpResponse<CurrencySingle>>; enableCurrency(code: string, xTraceId?: string, observe?: 'events', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/vnd.api+json' | 'application/json'; context?: HttpContext; transferCache?: boolean; }): Observable<HttpEvent<CurrencySingle>>; /** * Get a single currency. * Get a single currency. * @param code The currency code. * @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. */ getCurrency(code: string, xTraceId?: string, observe?: 'body', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/vnd.api+json' | 'application/json'; context?: HttpContext; transferCache?: boolean; }): Observable<CurrencySingle>; getCurrency(code: string, xTraceId?: string, observe?: 'response', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/vnd.api+json' | 'application/json'; context?: HttpContext; transferCache?: boolean; }): Observable<HttpResponse<CurrencySingle>>; getCurrency(code: string, xTraceId?: string, observe?: 'events', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/vnd.api+json' | 'application/json'; context?: HttpContext; transferCache?: boolean; }): Observable<HttpEvent<CurrencySingle>>; /** * Get the user\&#39;s default currency. * Get the user\&#39;s default currency. * @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. */ getDefaultCurrency(xTraceId?: string, observe?: 'body', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean; }): Observable<CurrencySingle>; getDefaultCurrency(xTraceId?: string, observe?: 'response', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean; }): Observable<HttpResponse<CurrencySingle>>; getDefaultCurrency(xTraceId?: string, observe?: 'events', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean; }): Observable<HttpEvent<CurrencySingle>>; /** * List all accounts with this currency. * List all accounts with this currency. * @param code The currency code. * @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 date A date formatted YYYY-MM-DD. When added to the request, Firefly III will show the account\&#39;s balance on that day. * @param type Optional filter on the account type(s) returned * @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. */ listAccountByCurrency(code: string, xTraceId?: string, limit?: number, page?: number, date?: string, type?: AccountTypeFilter, observe?: 'body', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/vnd.api+json' | 'application/json'; context?: HttpContext; transferCache?: boolean; }): Observable<AccountArray>; listAccountByCurrency(code: string, xTraceId?: string, limit?: number, page?: number, date?: string, type?: AccountTypeFilter, observe?: 'response', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/vnd.api+json' | 'application/json'; context?: HttpContext; transferCache?: boolean; }): Observable<HttpResponse<AccountArray>>; listAccountByCurrency(code: string, xTraceId?: string, limit?: number, page?: number, date?: string, type?: AccountTypeFilter, observe?: 'events', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/vnd.api+json' | 'application/json'; context?: HttpContext; transferCache?: boolean; }): Observable<HttpEvent<AccountArray>>; /** * List all available budgets with this currency. * List all available budgets with this currency. * @param code The currency code. * @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. */ listAvailableBudgetByCurrency(code: string, xTraceId?: string, limit?: number, page?: number, observe?: 'body', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/vnd.api+json' | 'application/json'; context?: HttpContext; transferCache?: boolean; }): Observable<AvailableBudgetArray>; listAvailableBudgetByCurrency(code: string, xTraceId?: string, limit?: number, page?: number, observe?: 'response', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/vnd.api+json' | 'application/json'; context?: HttpContext; transferCache?: boolean; }): Observable<HttpResponse<AvailableBudgetArray>>; listAvailableBudgetByCurrency(code: string, xTraceId?: string, limit?: number, page?: number, observe?: 'events', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/vnd.api+json' | 'application/json'; context?: HttpContext; transferCache?: boolean; }): Observable<HttpEvent<AvailableBudgetArray>>; /** * List all bills with this currency. * List all bills with this currency. * @param code The currency code. * @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. */ listBillByCurrency(code: string, xTraceId?: string, limit?: number, page?: number, observe?: 'body', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/vnd.api+json' | 'application/json'; context?: HttpContext; transferCache?: boolean; }): Observable<BillArray>; listBillByCurrency(code: string, xTraceId?: string, limit?: number, page?: number, observe?: 'response', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/vnd.api+json' | 'application/json'; context?: HttpContext; transferCache?: boolean; }): Observable<HttpResponse<BillArray>>; listBillByCurrency(code: string, xTraceId?: string, limit?: number, page?: number, observe?: 'events', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/vnd.api+json' | 'application/json'; context?: HttpContext; transferCache?: boolean; }): Observable<HttpEvent<BillArray>>; /** * List all budget limits with this currency * List all budget limits with this currency * @param code The currency code. * @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 start Start date for the budget limit list. * @param end End date for the budget limit list. * @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. */ listBudgetLimitByCurrency(code: string, xTraceId?: string, limit?: number, page?: number, start?: string, end?: string, observe?: 'body', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/vnd.api+json' | 'application/json'; context?: HttpContext; transferCache?: boolean; }): Observable<BudgetLimitArray>; listBudgetLimitByCurrency(code: string, xTraceId?: string, limit?: number, page?: number, start?: string, end?: string, observe?: 'response', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/vnd.api+json' | 'application/json'; context?: HttpContext; transferCache?: boolean; }): Observable<HttpResponse<BudgetLimitArray>>; listBudgetLimitByCurrency(code: string, xTraceId?: string, limit?: number, page?: number, start?: string, end?: string, observe?: 'events', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/vnd.api+json' | 'application/json'; context?: HttpContext; transferCache?: boolean; }): Observable<HttpEvent<BudgetLimitArray>>; /** * List all currencies. * List all currencies. * @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. */ listCurrency(xTraceId?: string, limit?: number, page?: number, observe?: 'body', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/vnd.api+json' | 'application/json'; context?: HttpContext; transferCache?: boolean; }): Observable<CurrencyArray>; listCurrency(xTraceId?: string, limit?: number, page?: number, observe?: 'response', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/vnd.api+json' | 'application/json'; context?: HttpContext; transferCache?: boolean; }): Observable<HttpResponse<CurrencyArray>>; listCurrency(xTraceId?: string, limit?: number, page?: number, observe?: 'events', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/vnd.api+json' | 'application/json'; context?: HttpContext; transferCache?: boolean; }): Observable<HttpEvent<CurrencyArray>>; /** * List all recurring transactions with this currency. * List all recurring transactions with this currency. * @param code The currency code. * @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. */ listRecurrenceByCurrency(code: string, xTraceId?: string, limit?: number, page?: number, observe?: 'body', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/vnd.api+json' | 'application/json'; context?: HttpContext; transferCache?: boolean; }): Observable<RecurrenceArray>; listRecurrenceByCurrency(code: string, xTraceId?: string, limit?: number, page?: number, observe?: 'response', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/vnd.api+json' | 'application/json'; context?: HttpContext; transferCache?: boolean; }): Observable<HttpResponse<RecurrenceArray>>; listRecurrenceByCurrency(code: string, xTraceId?: string, limit?: number, page?: number, observe?: 'events', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/vnd.api+json' | 'application/json'; context?: HttpContext; transferCache?: boolean; }): Observable<HttpEvent<RecurrenceArray>>; /** * List all rules with this currency. * List all rules with this currency. * @param code The currency code. * @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. */ listRuleByCurrency(code: string, xTraceId?: string, limit?: number, page?: number, observe?: 'body', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/vnd.api+json' | 'application/json'; context?: HttpContext; transferCache?: boolean; }): Observable<RuleArray>; listRuleByCurrency(code: string, 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>>; listRuleByCurrency(code: string, 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>>; /** * List all transactions with this currency. * List all transactions with this currency. * @param code The currency code. * @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 start A date formatted YYYY-MM-DD, to limit the list of transactions. * @param end A date formatted YYYY-MM-DD, to limit the list of transactions. * @param type Optional filter on the transaction type(s) returned * @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. */ listTransactionByCurrency(code: string, xTraceId?: string, limit?: number, page?: number, start?: string, end?: string, type?: TransactionTypeFilter, observe?: 'body', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/vnd.api+json' | 'application/json'; context?: HttpContext; transferCache?: boolean; }): Observable<TransactionArray>; listTransactionByCurrency(code: string, xTraceId?: string, limit?: number, page?: number, start?: string, end?: string, type?: TransactionTypeFilter, observe?: 'response', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/vnd.api+json' | 'application/json'; context?: HttpContext; transferCache?: boolean; }): Observable<HttpResponse<TransactionArray>>; listTransactionByCurrency(code: string, xTraceId?: string, limit?: number, page?: number, start?: string, end?: string, type?: TransactionTypeFilter, observe?: 'events', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/vnd.api+json' | 'application/json'; context?: HttpContext; transferCache?: boolean; }): Observable<HttpEvent<TransactionArray>>; /** * Store a new currency * Creates a new currency. The data required can be submitted as a JSON body or as a list of parameters. * @param currencyStore JSON array or key&#x3D;value pairs with the necessary currency 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. */ storeCurrency(currencyStore: CurrencyStore, xTraceId?: string, observe?: 'body', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/vnd.api+json' | 'application/json'; context?: HttpContext; transferCache?: boolean; }): Observable<CurrencySingle>; storeCurrency(currencyStore: CurrencyStore, xTraceId?: string, observe?: 'response', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/vnd.api+json' | 'application/json'; context?: HttpContext; transferCache?: boolean; }): Observable<HttpResponse<CurrencySingle>>; storeCurrency(currencyStore: CurrencyStore, xTraceId?: string, observe?: 'events', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/vnd.api+json' | 'application/json'; context?: HttpContext; transferCache?: boolean; }): Observable<HttpEvent<CurrencySingle>>; /** * Update existing currency. * Update existing currency. * @param code The currency code. * @param currencyUpdate JSON array with updated currency 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. */ updateCurrency(code: string, currencyUpdate: CurrencyUpdate, xTraceId?: string, observe?: 'body', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean; }): Observable<CurrencySingle>; updateCurrency(code: string, currencyUpdate: CurrencyUpdate, xTraceId?: string, observe?: 'response', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean; }): Observable<HttpResponse<CurrencySingle>>; updateCurrency(code: string, currencyUpdate: CurrencyUpdate, xTraceId?: string, observe?: 'events', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean; }): Observable<HttpEvent<CurrencySingle>>; static ɵfac: i0.ɵɵFactoryDeclaration<CurrenciesService, [null, { optional: true; }, { optional: true; }]>; static ɵprov: i0.ɵɵInjectableDeclaration<CurrenciesService>; }